{"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/ButtonIcons/close.svg","webpack:///./public/svg/ButtonIcons/doc.svg","webpack:///./public/svg/ButtonIcons/download.svg","webpack:///./public/svg/ButtonIcons/left-arrow.svg","webpack:///./public/svg/ButtonIcons/radio-checked-black.svg","webpack:///./public/svg/ButtonIcons/radio-checked.svg","webpack:///./public/svg/ButtonIcons/radio-unchecked-black.svg","webpack:///./public/svg/ButtonIcons/radio-unchecked.svg","webpack:///./public/svg/ButtonIcons/right-arrow.svg","webpack:///./public/svg/Currencies/pyg.svg","webpack:///./public/svg/Currencies/usd.svg","webpack:///./public/svg/LoginInIcons/engine.svg","webpack:///./public/svg/LoginInIcons/info.svg","webpack:///./public/svg/LoginInIcons/person.svg","webpack:///./public/svg/SideBarIcons/autorizaciones.svg","webpack:///./public/svg/SideBarIcons/checkedMenu.svg","webpack:///./public/svg/SideBarIcons/estadosMensuales.svg","webpack:///./public/svg/SideBarIcons/green-dot.svg","webpack:///./public/svg/SideBarIcons/greenCircle.svg","webpack:///./public/svg/SideBarIcons/historico.svg","webpack:///./public/svg/SideBarIcons/ingresosFuturos.svg","webpack:///./public/svg/SideBarIcons/invertir.svg","webpack:///./public/svg/SideBarIcons/logo-home-white.svg","webpack:///./public/svg/SideBarIcons/logo-home.svg","webpack:///./public/svg/SideBarIcons/ordenes.svg","webpack:///./public/svg/SideBarIcons/phone.svg","webpack:///./public/svg/SideBarIcons/portafolio.svg","webpack:///./public/svg/SideBarIcons/uncheckedMenu.svg","webpack:///./public/svg/SideBarIcons/user.svg","webpack:///./public/svg/add.svg","webpack:///./public/svg/advisor.svg","webpack:///./public/svg/assignment_returned.svg","webpack:///./public/svg/calendar.svg","webpack:///./public/svg/card_travel.svg","webpack:///./public/svg/changeAccount.svg","webpack:///./public/svg/checkInfo.svg","webpack:///./public/svg/checkbox-checked.svg","webpack:///./public/svg/checkbox-unchecked.svg","webpack:///./public/svg/checkboxContract.svg","webpack:///./public/svg/closeSession.svg","webpack:///./public/svg/csv.svg","webpack:///./public/svg/dashboard.svg","webpack:///./public/svg/documentacion.svg","webpack:///./public/svg/download-svgrepo-com.svg","webpack:///./public/svg/downloadPdf.svg","webpack:///./public/svg/error.svg","webpack:///./public/svg/file.svg","webpack:///./public/svg/greenFace.svg","webpack:///./public/svg/greenStar.svg","webpack:///./public/svg/help.svg","webpack:///./public/svg/i.svg","webpack:///./public/svg/information.svg","webpack:///./public/svg/keyboard_arrow_down.svg","webpack:///./public/svg/lock.svg","webpack:///./public/svg/logout.svg","webpack:///./public/svg/magnifying-glass-svgrepo-com.svg","webpack:///./public/svg/menu.svg","webpack:///./public/svg/notificaciones.svg","webpack:///./public/svg/pdf.svg","webpack:///./public/svg/pencil.svg","webpack:///./public/svg/print-solid.svg","webpack:///./public/svg/profile.svg","webpack:///./public/svg/radioCheckAccount.svg","webpack:///./public/svg/radioCheckedAnswer.svg","webpack:///./public/svg/radioUncheckAccount.svg","webpack:///./public/svg/redoTest.svg","webpack:///./public/svg/rejectAuthorizations.svg","webpack:///./public/svg/success.svg","webpack:///./public/svg/tickAuthorizations.svg","webpack:///./public/svg/warning.svg","webpack:///./public/svg/welcomeTick.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/AccessConfiguration/AccessConfiguration.js","webpack:///./src/components/AccessConfiguration/AccessConfiguration.scss?1923","webpack:///./src/components/AccessConfiguration/AccessConfigurationAccount/AccessConfigurationAccount.js","webpack:///./src/components/AccessConfiguration/AccessConfigurationAccount/AccessConfigurationAccount.scss?dca1","webpack:///./src/components/AccessConfiguration/AccessConfigurationGrid/AccessConfigurationGrid.js","webpack:///./src/components/AccessConfiguration/AccessConfigurationGrid/AccessConfigurationGrid.scss?32d7","webpack:///./src/components/AccessConfiguration/Confirmation/Confirmation.js","webpack:///./src/components/AccessConfiguration/Confirmation/Confirmation.scss?af12","webpack:///./src/components/AccessConfiguration/Contract/Contract.js","webpack:///./src/components/AccessConfiguration/Contract/Contract.scss?c8c3","webpack:///./src/components/AccessConfiguration/Suitability/Suitability.js","webpack:///./src/components/AccessConfiguration/Suitability/Suitability.scss?455f","webpack:///./src/components/Auth/Login.scss?c99b","webpack:///./src/components/Auth/Login2.js","webpack:///./src/components/Auth/PrivateRoute.js","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/Autologin/Autologin.js","webpack:///./src/components/BankAccountsSelector/BankAccountsSelector.js","webpack:///./src/components/BankAccountsSelector/BankAccountsSelector.scss?6d2f","webpack:///./src/components/DocumentTable/DocumentTable.js","webpack:///./src/components/DocumentTable/DocumentTable.scss?2aec","webpack:///./src/components/FormattedNumber/FormattedNumber.js","webpack:///./src/components/Help/Help.js","webpack:///./src/components/Help/Help.scss?c5e1","webpack:///./src/components/HistoryForm/HistorModal.js","webpack:///./src/components/HistoryForm/HistoryChart.js","webpack:///./src/components/HistoryForm/HistoryForm.js","webpack:///./src/components/HistoryForm/HistoryForm.scss?bd69","webpack:///./src/components/HistoryForm/HistoryModal.scss?46fd","webpack:///./src/components/HistoryForm/HistoryTable.js","webpack:///./src/components/HistoryForm/HistoryTable.scss?fdb5","webpack:///./src/components/InConstruction/InConstruction.js","webpack:///./src/components/InConstruction/InConstruction.scss?190e","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/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/InvestorProfile/InvestorProfile.js","webpack:///./src/components/InvestorProfile/InvestorProfile.scss?41be","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.js","webpack:///./src/components/Layout/MyData/MyData.scss?8f7c","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/AuthorizationModal/AuthorizationModal.js","webpack:///./src/components/Modal/AuthorizationModal/AuthorizationModal.scss?98fa","webpack:///./src/components/Modal/FirstAccessModal/FirstAccessModal.js","webpack:///./src/components/Modal/FirstAccessModal/FirstAccessModal.scss?8b71","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/Modal/PersonalDataModal/PersonalDataModal.js","webpack:///./src/components/Modal/PersonalDataModal/PersonalDataModal.scss?bb90","webpack:///./src/components/Modal/Popup/Popup.js","webpack:///./src/components/Modal/PortfolioModal/PortfolioModal.js","webpack:///./src/components/Modal/PortfolioModal/PortfolioModal.scss?6df3","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/Onboarding/ConfirmDataOnboarding/ConfirmDataOnboarding.js","webpack:///./src/components/Onboarding/ConfirmDataOnboarding/ConfirmDataOnboarding.scss?8ec6","webpack:///./src/components/Onboarding/ContractOnboarding/ContractOnboarding.js","webpack:///./src/components/Onboarding/ContractOnboarding/ContractOnboarding.scss?d79b","webpack:///./src/components/Onboarding/HeaderOnboarding/HeaderOnboarding.js","webpack:///./src/components/Onboarding/HeaderOnboarding/HeaderOnboarding.scss?9b93","webpack:///./src/components/Onboarding/InvestorProfileOnboarding/InvestorProfileOnboarding.js","webpack:///./src/components/Onboarding/InvestorProfileOnboarding/InvestorProfileOnboarding.scss?955b","webpack:///./src/components/Onboarding/PepOnboarding/PepOnboarding.js","webpack:///./src/components/Onboarding/PepOnboarding/PepOnboarding.scss?ed1e","webpack:///./src/components/Onboarding/WelcomeOnboarding/WelcomeOnboarding.js","webpack:///./src/components/Onboarding/WelcomeOnboarding/WelcomeOnboarding.scss?3f90","webpack:///./src/components/PageWrapper/PageWrapper.js","webpack:///./src/components/PageWrapper/PageWrapper.scss?6206","webpack:///./src/components/PopupWrapper/PopupWrapper.js","webpack:///./src/components/Portfolio/AssetClass/AssetClass.js","webpack:///./src/components/Portfolio/AssetClass/AssetClass.scss?2e7d","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/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/Portfolio/Summary/Summary.js","webpack:///./src/components/Portfolio/Summary/Summary.scss?b134","webpack:///./src/components/ProfileInfoForm/ProfileInfoForm.js","webpack:///./src/components/ProfileInfoForm/ProfileInfoForm.scss?3fb9","webpack:///./src/components/ProfileTest/ProfileTest.js","webpack:///./src/components/ProfileTest/ProfileTest.scss?8d6e","webpack:///./src/components/ProfileTestAnswer/ProfileTestAnswer.js","webpack:///./src/components/ProfileTestAnswer/ProfileTestAnswer.scss?11cf","webpack:///./src/components/SidebarOnboarding/SidebarOnboarding.scss?fe85","webpack:///./src/components/SidebarOnboarding/Sidebaronboarding.js","webpack:///./src/components/Suitability/AccountProfileTest.js","webpack:///./src/components/Suitability/AccountProfileTest.scss?fd45","webpack:///./src/components/Toaster/Toaster.js","webpack:///./src/components/Toaster/Toaster.scss?a2fd","webpack:///./src/components/Tooltip/Tooltip.js","webpack:///./src/components/UI/Button/Button.js","webpack:///./src/components/UI/Button/Button.scss","webpack:///./src/components/UI/Button/CounterBox.js","webpack:///./src/components/UI/Button/FutureButton.js","webpack:///./src/components/UI/Button/FutureButton.scss","webpack:///./src/components/UI/CircularProgress/CircularProgress.js","webpack:///./src/components/UI/CircularProgress/CircularProgress.scss?20cf","webpack:///./src/components/UI/CompositionBar/CompositionBar.js","webpack:///./src/components/UI/CompositionBar/CompositionBar.scss?32e4","webpack:///./src/components/UI/Container/Container.js","webpack:///./src/components/UI/Container/Container.scss?5441","webpack:///./src/components/UI/Customstrap/Customstrap.js","webpack:///./src/components/UI/Customstrap/Customstrap.scss?9cbd","webpack:///./src/components/UI/Icon/Icon.js","webpack:///./src/components/UI/RadioButton/RadioButton.js","webpack:///./src/components/UI/RadioButton/RadioButton.scss?eff5","webpack:///./src/components/UI/Safearea/Safearea.js","webpack:///./src/components/UI/Safearea/Safearea.scss?67ab","webpack:///./src/components/UI/TitleLabel/TitleLabel.js","webpack:///./src/components/UI/TitleLabel/TitleLabel.scss?09ea","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/Autologin.js","webpack:///./src/pages/FutureIncome.js","webpack:///./src/pages/Help.js","webpack:///./src/pages/History.js","webpack:///./src/pages/IconsPage.js","webpack:///./src/pages/Invest.js","webpack:///./src/pages/Login.js","webpack:///./src/pages/MonthlyStates.js","webpack:///./src/pages/Notifications.js","webpack:///./src/pages/Onboarding.js","webpack:///./src/pages/Orders.js","webpack:///./src/pages/Portfolio.js","webpack:///./src/pages/ProfileInfo.js","webpack:///./src/pages/Redirection.js","webpack:///./src/pages/RedirectionPayments.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/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/AppInfoWrapper.scss?ef83","webpack:///./src/utils/dimentions.js","webpack:///./src/utils/global.js","webpack:///./src/utils/handleRedirectionData.js","webpack:///./src/utils/helper.js","webpack:///./src/utils/helper.scss?bfa1","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","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","defaultCustody","EventBalanceType","EventAccountTaxImputability","Coldebit","Colcredit","EventAccountIsCurrency","EventAccountSecurityId","added","defaultCustomer","concatData","client","custodies","clientdata","accountPortfolio","Footprints","rounded","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","paddingBottom","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","isEditable","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","creatingUser","CREATING_USER","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","AccessConfiguration","approved","handleAuthorize","contractId","setContractId","innerWidth","vpWidth","toggleString","newContractId","Title","currentTab","buttonContainer","col","xxl","CustomButton","ActiveTab","buttonDisabled","buttonActive","AccessConfigurationGrid","Contract","AccessConfigurationAccount","Confirmation","guaraniAccounts","setGuaraniAccounts","usdAccounts","setUsdAccounts","useSelector","getSavedPersonInfo","getPersonBankAccount","personBankAccountInfo","guaraniArray","usdArray","AccountTable","gray","classsName","accentColor","mainRow","innerRow","confirmContainer","confirmButton","mobilePhone","setMobilePhone","personDocument","setPersonDocument","newMobilePhone","phoneItem","newPersonDocument","documentItem","subTitle","gridRow","greySubtitle","buttonColumn","redirectionSite","REDIRECTION_SITE","useDispatch","grayContent","sessionStorage","legalContract","setLegalContract","contractLoading","setContractLoading","getLegalContracts","LegalContractSDT","LegalContractAttachmentName","LegalContractAttachmentBlob","LegalContractAttachmentExtension","orangeText","LegalContractId","getQuestions","setAnswer","answerItem","answer","profileTestWrapper","TestQuestion","questionItem","updateAnswers","sdtQuestion","sdtresult","getPersonInfo","questionContainer","questionTitle","answerRow","answerRowActive","answerText","credentials","getAuthCredentials","authenticated","localLoading","setLocalLoading","onSignIn","currentCredentials","preLogin","encryptedCredentials","preAuthService","newSession","mustCreate","newContext","setItem","token","accessToken","information","infoIcons","Icons","InformationLoginIcon","EngineIcon","PersonIcon","Redirect","headerDiv","headerDiv2","headerLabel","headerLabel2","welcome","backgrountColor","welcomeFirstRow","secondLogo","infoContainer","infoLabels","cardDiv","formText","submitRow","submit","errorWrapper","withRouter","connect","Route","useLocation","handleAuthorizeWrapper","redirectionData","handleReject","respondAuthorization","newData","onAuthorize","onReject","authItem","ammount","operationValue","setOrder","getCurrentAccount","orderInfo","ammountString","tableRow","tableTitleMobile","actionButtons","primary","iconSvg","acceptAuthIcon","textColor","rejectAuthIcon","getTexts","EmptyAuthorizations","emptyMessage","headerTitle","isMobile","authorizationItem","cardContainer","isWeb","authorizationsTableRow","tableHead","tableH","tablaMonto","tableBody","authorizations_note","Autologin","useQuery","redirectionUrl","querySession","atob","flexDirection","defaultFilters","amount","setAllBankAccountAreInvalid","validBankAccounts","setValidBankAccounts","allInvalid","setBankAccountIsValid","valid","wrapper","BankAccountItem","bankAccountItem","onSelectBankAccount","setAnyError","balanceResult","setBalanceResult","notEnoughFunds","setNotEnoughFunds","setIsCurrency","setLoadingBalance","modes","BUY","PersonBankAccountCurrencyISO","getBankAccountBalanceAsync","getBankAccountBalance","bankAccountNumber","RadioCheckedBlackIcon","RadioUncheckedBlackIcon","balanceLoader","DocumentTable","pdfSvg","downloadSvg","resDec","Help","toggleHelp","setCorexVersion","setApiVersion","fetchCorexBuildVersion","currentBuildVersion","fetchApiBuildVersion","version","advisorName","advisorFirstLastName","subAssetClassDisplay","titleWrapper","iconWrapper","ArrowLeftIcon","boxInfo","titleInfo","boxTable","tdInfo","companyPhone","companyEmail","companyLocation","companyOpeningHours","boxAdvisor","advisor","advisorIcon","wrapperTableAdvisor","tableAdvisor","advisorPhone","advisorEmail","changeDateHandler","displayDate","backdrop","keyboard","modalContainer","modalHeader","modalBody","dateContainer","fluid","modalFooter","modalButtonSearch","modalButtonCancel","xData","splitArea","axisLabel","yData","smooth","lineStyle","HistoryForm","loadingPosition","setLoadingPosition","portfolioNoLogs","setPortfolioNoLogs","setActivity","userDropdownIsOpen","setUserDropdownIsOpen","setFromDate","setToDate","instrumento","ISO","currencyFilter","setDisplayDate","tableFilter","setTableFilter","chartData","setChartData","currentFilter","setCurrentFilter","saldoInicial","saldoFinal","difSigno","diferencia","saldo","setSaldo","fetchGetPortfolioNoLogs","valores","reverse","moneda","currencyName","esEfectivo","saldoInicialEncontrado","concepto","saldo_total","saldoFinalEncontrado","fechasExtraidas","saldosExtraidos","acumulado","updateActivity","handleChangeFilter","toggleFilterType","filterType","desde","subtract","valueOf","milliseconds","hasta","timeSpan","diff","moment","_data","months","fetchGetActivity","fetchGetActivityProduct","newActivity","actividad","nombre","totales","finalBalance","concept","activityId","journalEntryId","detalle","valor","noAccounts","rowContainer","TitleLabel","colEnd","dropdownToggle","arrow","itemCuentas","greyFont","activeItem","rowContainerSecond","radioBut","RadioButtonGroup","RadioButton","calendarButton","selectDates","exportButton","getHistoryXLS","charContainer","resumeInfo","BalanceContainer","BalanceContainerDiference","tableTitle","toPascalCase","getActivityPDF","activityItem","fetchProductActivityPDF","rowBalance","balanceTitle","balancePrice","rowDiference","tableWrapper","minDecimal","maxDecimal","InConstruction","Safearea","FundInvestModal","minAmmount","setValue","afterHoursModal","activeAccount","setActiveAccount","setErrorMessage","isFullLiquidation","setIsFullLiquidation","allBankAccountsAreInvalid","setAllBankAccountsAreInvalid","isScheduledRescue","setIsScheduledRescue","tomorrowDate","processDate","setProcessDate","isProcessDateEligible","setIsProcessDateEligible","SettlementCurrency","DebitTotal","BuyTotal","Charges","IVA","Available","maxAmmount","defaultCurrency","settlementCurrenciesItem","available","paymentItem","paymentItemAssetCouponDate","executePrechecks","getPrechecks","orderStatus","availableBalance","updateFund","modalWrapper","sellContainer","closeIcon","sellAssetName","sellTitle","qtyLabel","qtyInput","getNumber","invalidInput","SELL","fullLiquidationWrapper","BankAccountsSelector","allAreInvalid","buttonSell","FundsAssetTable","portfolioDate","fetchGetPortfolio","setPortfolioTotal","valueTotalUSD","positionPYG","currencypairprice","rawprice","currentPosition","assetClass","valuetotal","AssetXIRR","FundAnnualVariation","AssetTargetPerformance","TargetPerformance","offerCard","offerInfo","offerField","secondCol","thirdCol","handleDeposit","secondButton","handleWithdraw","allowedCurrencies","PYG","USD","Invest","activeOffers","activeFunds","availableOffers","setAvailableOffers","loadingOffers","setLoadingOffers","loadingFunds","setLoadingFunds","setFunds","offers","setOffers","filteredFunds","setFilteredFunds","filteredOffers","setFilteredOffers","activeCurrency","setActiveCurrency","loadOffers","loadFunds","fetchOffers","SdtOffers","OffersItems","fetchFunds","outstanding","handleActiveCurrency","wrapperCol","containerCurrency","TitleLabelMobile","colRadioButton","hasSEN","disclaimer","InfoIcon","sen_warning_bold","sen_warning_text","InvestTable","InvestModal","InvestAssetClassTable","totalValueWrapper","InvestSubAssetClassTable","assetRow","collapseActive","titulo","destacada","setBonds","cdas","setCDAs","equities","setEquities","setOptions","mFunds","setMFunds","setRepo","Todos","Bonos","CDAs","Acciones","Opciones","mFondos","Fondos","openSections","setOpenSections","newBonds","newCda","newEquities","newOptions","newFunds","newRepo","offerItem","isCDA","titlesInvest","collapseRowOpen","collapseRow","collapseOpen","collapseHeader","titleActive","toggleSection","updatedSections","containerOffers","collapseRowActive","titleRow","titleDivider","profileRiskDescriptionString","Conservative","investor_profile_conservative","Moderate","investor_profile_moderate","Aggressive","investor_profile_aggressive","Aggresive","orangeButton","blueButton","circle","Footer","logoButton","footer_line_1","footer_line_2","NoAccounts","futureIncomeRow","FutureIncomeRow","totalUSD","totalUSDAccumulated","totalAccumulated","Chart","setData","labels","chartWrapper","notMerge","lazyUpdate","splitLine","showSymbol","barWidth","hoverAnimation","futureIncome","setFutureIncome","setActivePortfolio","estimatedTotalReturn","setEstimatedTotalReturn","estimatedTotal","getFutureIncome","cuenta","newFutureIncome","iterator","newActivePortfolio","positionUSD","portfolioTotalUSD","subAssetClassItem","rowBeginning","colCambioActual","fxLabel","containerRow","tableMargin","confirmIcon","divChartWrapper","chartRow","chartRowSub","ColumnLineStyleFutureIncome","expectedIncomeTitle","expectedIncomeValueAlign","expectedIncomeValue","expectedIncomeValueISO","scrollableTable","circularProgressRow","environmentName","ENV_NAME","AccountJSON","isProdEnv","Username","IsProductionEnv","isTestingUser","IsTestingUser","showEnvironmentSign","environmentSignText","environmentSignColor","getUserContext","idleTimeout","setIdleTimeout","showHelp","setShowHelp","isAppMobile","setIsAppMobile","APP_MOBILE","MaxIdleSessionTime","logoutTimer","useIdleTimer","timeout","crossTab","syncTimers","onIdle","activate","toggleShowHelp","stateHelp","appHeader","hambMenuLogo","NavbarToggler","navToggler","mobileSidebarToggle","hambIcon","menuLine","navbar","Prompt","when","bindActionCreators","getAuth","Toaster","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","byteArrays","byteNumbers","charCodeAt","byteArray","bateToBlob","mainStateDiv","ReportRow","noResultsText","reportRow","reportLabel","MyData","toggleMyData","showProfileAnswers","setShowProfileAnswers","showRedoTest","setShowRedoTest","fetchGetAccounts","handleChangeAccount","toggleUserDropdown","newAccount","toggleShowProfileAnswers","stateProfileAnswers","toggleShowRedoTest","stateRedoTest","iconArrow","titleProfile","boxPersonalData","buttonPersonalData","changeAccount","lineHeight","border-radius","changeAccountIcon","inNavbar","userSelector","dropDownMenu","accountItem","greenDotIcon","greenDot","closeSessionIcon","colProfile","boxProfile","ProfileIcon","profileType","textProfile","profileButtons","wrapperData","boxData","dataTitle","ProfileTestAnswer","toggleProfileAnswers","ProfileTest","toggleRedoTest","setOrders","activityTable","containerTable","tableScroll","errror","fetchInProcesOrderPDF","getCounters","showMyData","setShowMyData","parentElement","activeRoute","routeName","hideMobile","contains","onLogout","variant","attributes","navLink","iconUrl","isExternal","activeClassName","isActive","tmp","isActiveItem","iconLabels","NavBadge","hrItems","navType","navLabel","navList","navDropdown","navItem","toggleShowMyData","stateMyData","sidebar","sidebarNav","imgLogo","hr","mobileSidebarHeader","hrDiv1","verticaLine","logoLabel","hrDiv","orangeBackground","lastDiv","myAccountButton","accountWrap","LegalContracts","setContract","contractLoaded","setContractLoaded","updateContractLoading","setUpdateContractLoading","updateLegalContract","handleChangeCheckbox","contractContainer","contractTitle","contractFileCard","boxContract","FileIcon","contractPdf","pdfButtons","downloadIcon","chekboxContract","CheckboxCheckedIcon","CheckboxUncheckedIcon","textAcceptContract","buttonConfirmContract","AuthorizationModal","contentClassName","titleContainer","toggleIcon","bodyTitle","bodySubTitle","buttonsWrapper","botonAutorizar","disclaimersWrapper","disclaimers","FirstAccessModal","InvestBuyModal","ioTotal","setIoTotal","newCharges","feeitem","feevalue","newIoTotal","ioItem","successTitle","containerFirstRow","getAssetClassName","containerSecondRow","sx","operationNumber","containerThirdRow","AssetPerformance","printButton","print","debValue","setBankAccountsLoading","setLoadingEarnings","getEarnings","newIVA","offerid","takeOffer","firstCol","offerTitle","valueContainer","offerValue","ISINContainer","propertyContainer","propertyTitle","propertyValue","AssetPaymentRate","paymentString","getPaymentString","rowFirstStep","colFirstStep","quantityCol","boxStep","numberStep","titleStep","quantityContainer","quantityBox","inputBox","inputQuantity","PencilInput","iconPencil","quantityAvailable","amountQuantity","offerDetails","detailTitle","detailValue","colAccount","colSubAccount","boxAccount","accountContainer","confirmBuy","totalAmountContainer","totalContainer","totalText","totalAmount","buttonCol","PersonalDataModal","Popup","internalMessage","isBlocking","redirectData","setRedirectData","loadingUpdate","setLoadingUpdate","loadingAbsolute","setLoadingAbsolute","handleToggle","newRedirectData","getRedirectionData","handleAuthorizeFirstAccess","setSessionRedirectionData","handlePreAuthorize","getTransactionalPinURL","pre_pin_validation_token","redirect_url","InternalMessageId","setRedirectionData","updateMessage","InternalMessageForm","InternalMessageRead","InternalMessageTitle","InternalMessageText","InternalMessageApproved","nominalValueAvailable","tooltips","sell_quote","NotificationCollapse","notification","handleNotificationRead","setCollapseActive","arrowActive","InternalMessageAttachmentName","getMessageAttachment","InternalMessageAttachmentExtension","NotificationsCard","getNotificationsLoading","getNotifications","handlePreNotificationRead","EmptyNotifications","emptyWrapper","ConfirmDataOnboarding","activeSidebar","toggleMobileSidebar","confirmPersonInfo","confirmContract","confirmAccounts","confirmInvestmentProfile","showContract","setShowContract","noContainer","containerData","HeaderOnboarding","dataRow","PersonWorkingBy","stateContract","ContractOnboarding","setActualLegalContract","setShowAccounts","isAlreadyAccepted","setIsAlreadyAccepted","toggleShowAccounts","stateAccounts","colContract","InvestorProfileOnboarding","headerHr","numQuestion","setNumQuestion","checkedAnswer","setCheckedAnswer","showPep","setShowPep","toggleShowPep","Question","indexQuestion","questionForm","radioButton","RadioCheckedAnswer","handleChangeQuestion","prevStateAnswer","profileContainer","colInvestor","firstText","progressContainer","textBar","progressBar","PepOnboarding","showWelcome","setShowWelcome","setPadding","loadingButtons","setLoadingButtons","handleResize","addEventListener","removeEventListener","firstAccess","confirmFirstAccess","ContractDocumentIds","toggleShowWelcomeIsPep","personUpdate","toggleShowWelcomeNotPep","blankSpace","secondary","WelcomeOnboarding","welcomeDisplay","CheckInfo","iconTick","welcomeText","configurationText","profileText","PageWrapper","PopupWrapper","activeNotification","setActiveNotification","notificationsOrder","FirstAccess","PersonalData","BlockingPopup","Notification","newNotifications","AssetClass","assetClasses","portfolioTotal","activeClass","setActiveClass","activeSubAssetClass","setActiveSubAssetClass","assetClassRow","separator","counterWrapper","ArrowRightIcon","SubAssetClassDisplay","totalMarketValue","setTotalMarketValue","totalMarketValueOneValue","setTotalMarketValueOneValue","setTotalInvestmentCost","setTotalInvestmentCostOneValue","setTotalAbsoluteReturn","setTotalNetReturn","setTotalNetReturnOneValue","totalYTM","setTotalYTM","totalPortfolio","setTotalPortfolio","setSell","isSubAssetFund","totalInvestmentCost","totalInvestmentCostOneValue","totalAbsoluteReturn","totalNetReturn","totalNetReturnOneValue","investCost","NetReturn","realizePL","investCostUSD","netReturnUSD","emissionCurrencyISO","totalUSDWithCoupon","totalOriginCurrencyWithCoupon","emissionCurrencyId","TRT","isMutualFunds","totalValue","toggleSell","hrTitle","centeredCol","centeredRow","titleRisk","graphWrapper","AssetsRisksDoghnut","AssetRiskList","hrDivider","assetContainer","assetField","parvalue","nominalValue","riskType","paymentRateFixed","nominalValueExtended","cda","getAssetAttachment","DocumentIcon","SellModal","totalSell","qty","setQty","maxQty","colors","riskColors","AssetClassDoghnut","onSelectItem","chartOptions","setChartOptions","tooltipFormatter","optionData","assetClassItem","fontFamily","screen","orient","renderer","onEvents","doghnutWrapper","SubAssetClassDoghnut","subAssetClassesItem","emphasis","SubAssetClassDoghnutItems","pillColorIdx","legendWrapper","legendItem","risks","minAngle","riskList","setRiskList","newList","riskListItem","PortfolioDoghnut","valueOriginal","valueTotal","portfolioDoghnutWrapper","SectionTitle","activePortfolio","fullCenter","investments","titleInvestments","colCurrency","spacedRow","compositionSectionAsset","CompositionBar","compositionSectionSubAsset","instrumentRow","cardLabel","cardLabelLine","PortfolioHeader","secondRow","titleAndInput","excel","getPortfolioXLS","csv","getPortfolioCSV","AssetClassTable","orangeRowCollapse","setOrangeRowCollapse","collapseOrangedata","indexCuentas","SubAssetClassTable","orangeRow","orangeRowText","arrowActivated","AssetTable","tooltTipStyles","grayTableH","toolTip","portfolio_actual_price","portfolio_nominal_value","portfolio_investment_cost","portfolio_pl","portfolio_trt","portfolio_ytm","portfolio_percentage","itemIndex","AssetRow","assetIsin","actualPrice","PortfolioTable","isFirstCollapseOpen","setFirstCollapse","selectedAsset","setSelectedAsset","assetQuantity","setAssetQuantity","setAssetClass","collapseTable","tableHeadActivated","collapseTitle","cashTotal","collapseTitleText","chartsRow","isCollapseBlueOpen","setIsCollapseBlueOpen","blueRow","titleSummary","currencyTotal","USDIcon","currencyIcon","balanceWrapper","PYGIcon","totalDivider","totalLabel","totalBalace","totalBalaceISO","totalBalanceNumber","ProfileInfoForm","setExpirationDate","setDocType","setContracts","setDocuments","setDocumentTypes","fileToUpload","setFileToUpload","newContracts","archiveItem","getArchivesTypes","addButton","lifelong","validateFields","typeId","postArchive","dropdownContainer","prevOpen","dropdownMenu","documentTypeItem","selectFileButton","prevFile","prevErrors","selectFileInput","expirtionDateContainer","documentRowWrapper","ContractRow","DocumentRow","documentRow","documentRowItem","setStart","setShowTestQuestions","toggleShowTestQuestions","stateTestQuestions","welcomeContainer","getAnswers","buttonRedoTest","redoTestIcon","answerTitle","indexSidebar","setIndexSidebar","mobileSidebar","setMobileSidebar","elementsSidebarOnboarding","updateSidebar","stateMobile","MenuItems","menuItems","menuElement","textMenu","RadioCheckedIcon","greenCircle","CheckedMenu","unchecked","UncheckedMenu","containerSidebar","sidebarMobile","sidebarOnboarding","HomeIconWhite","homeIcon","verticalLine","optionsContainer","optionsTitle","sidebarMenu","HomeIcon","AccountProfileTest","getAccountAnswers","investorType","accountProfileRisk","ToastContainer","toastContainer","containerStyles","marginRightIcon","pl0","grayDark","btnGeneric","roundedMd","pNormal","normal","activeButton","boxWidth","labelColor","roundedXs","divCounterBox","labelCounterBox","numberCounterBox","labelNumber","activeFilter","barColorIdx","barWrapper","tooltipIndex","itemSpan","newClassName","containerWrapper","sizes","AuthorizationsIcon","MonthlyReportsIcon","GreenDotIcon","HistoryIcon","FutureCashFlowIcon","InvestIcon","OrdersIcon","PhoneIcon","PortfolioIcon","UserIcon","AddIcon","ReturnedIcon","CalendarIcon","TravelIcon","CSVIcon","DashboardIcon","DocumentationIcon","DownloadIcon","HelpIcon","InformationIcon","ArrowDownIcon","LockIcon","LogoutIcon","SearchIcon","MenuIcon","NotificationIcon","PDFIcon","PrintIcon","CloseIcon","XLSXIcon","CloseSessionIcon","RadioUncheckedIcon","CheckedContractIcon","RadioCheckedAccount","RadioUncheckedAccount","WelcomeTick","GreenFaceIcon","GreenStarIcon","GreenCircle","ErrorIcon","SuccessIcon","WarningIcon","buttonGroup","safearea","newClasses","cardTitle","UserSelector","isInNavbar","setLoadingInfo","myData","setMyData","setInvestorProfile","rightContainer","accountHolderName","secondRowContainer","inactiveItem","arrowImgActive","arrowImg","blueTextContainer","investor","assesor","path","exact","LoginPage","PortfolioPage","HistoryPage","FutureIncome","InvestPage","MonthlyStates","store","HelpPage","IconsPage","iconKeys","IconComponent","iconUsage","boxShadow","Login","Notifications","Onboarding","ProfileInfo","Redirection","redirectTo","setRedirectTo","auth_code","redirectionId","redirectionResponse","validateTransactionalAuthCode","pin_valid","RedirectionPayments","pre_transaction_id","validatePaymentAuthCode","valid_payment","IntlProvider","locale","AppInfoWrapper","HashRouter","createReducer","removeIfExists","authorizationsLoaded","notificationsLoaded","portfolio_general","invest_isin","invest_performance","invest_coupon_rate","invest_maturity_date","invest_commission","invest_charges","history_note","orders_note","future_note","statements_note","help_text","reducers","combineReducers","getTextsLoading","getAuthorizationsLoaded","getNotificationsLoaded","inProcessOrders","authFlowSaga","authorize","signout","LoginResult","getAuthStatus","setUserContext","setAuthStatus","isAuthenticated","userContext","take","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","ok","encrypt","JSEncrypt","publicKey","setPublicKey","getCurrentVersion","encodeURI","fetchGetAccountInfo","GetDigitalLinks","getClientPositionDigital","getClientHistoryAUM","getClientHistoryPerformance","GetDigitalReprofile","numCli","setPersonInfo","getHistoryCSV","timezone","resolvedOptions","fetchOpenId","getPaymentURL","fetchGetBankSuggestions","fetchGetCountrySuggestions","fetchTooltipsAndNotes","fetchGetWithdrawals","estatus","fetchGetDeposits","fetchAddWithdrawal","withdraw","fetchIO","fetchDepositableAccounts","getMessages","setClientBankAccounts","_api","require","sagaMiddleware","createStore","rootReducer","applyMiddleware","registerFetchInterceptor","run","bodyUsed","statusText","updateAuthorizations","newAuthorizations","isFirstAccess","setIsFirstAccess","updateMessages","InternalMessageSDTList","stopCheckContract","notificationItem","authorizationsLoading","setAuthorizationsLoading","xxxl","spaces","HH","II","getSeconds","charAt","word","customToast","toPascalCaseString","division","espLang","monthAbbr","dayOfWeek","dayOfWeekAbbr","selector","inverse","toolbox","brush","rect","polygon","lineX","lineY","keep","dataView","lang","dataZoom","zoom","back","magicType","stack","tiled","restore","saveAsImage","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,UACr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ACA,0E,KACA,yD,KACA,6D,KACA,gE,KACA,mE,KACA,sE,KACA,gE,KACA,6E,KACA,iE,KACA,6D,KACA,2E,KACA,2D,KACA,mD,KACA,qE,KACA,oE,KACA,uD,KACA,0DACA,gEACA,0E,KACA,uE,KACA,yD,KACA,yD,KACA,6F,KACA,6G,KACA,0D,KACA,yD,KACA,uE,KACA,6D,MACA,0DACYpxF,G,GAAZ,kD,MACA,+DACYiqD,G,GAAZ,uD,MACA,6D,MACA,mE,MACA,yE,MACA,0E,MACA,8E,MACA,mE,MACA,sEACA,qE,MACA,iE,MACA,yDACY7hJ,G,GAAZ,uDACA,+D,MACA,uE,MACA,wDACYirB,G,GAAZ,gDACYnjB,G,GAAZ,gFACA,mEACA,2D,MACA,qDACA,uEACYmhL,G,GAAZ,mD,MACA,2D,gNAGE3qJ,gB,EACAf,gB,EACA4tE,oB,EACAixC,gB,EACA0G,kB,EACA1nB,gB,EACAwoB,sB,EACAuhC,oB,EACApwE,kB,EACAm0E,uB,EACAz+K,yB,EACA0+K,e,EACAzkE,kB,EACA0kE,sB,EACArxJ,a,EACAooF,sB,EACAkpE,kB,EACAC,qB,EACAn8L,2B,EACA8nH,6B,EACA+uC,6B,EACApsD,e,EACAv/D,W,EACAF,U,EACA6wJ,U,EACA/zG,qB,EACAs0G,wB,EACAx9L,sB,EACA02L,2B,EACAh4B,sB,EACAv1C,0B,EACA2sC,U,EACA7hJ,U,EACAirB,M,EACAyjG,sC,EACAF,0B,EACAG,wC,EACc/4H,MAAd4zL,U,EACAC,uB,EACAphM,c,EACAmjK,4B,EACAP,yB,EACAy+B,qB,EACAvrH,0B,EACAwrH,qB,EACAvgK,iB,EACA2/J,a,EACAa,6B,EACAlmE,2B,EACAmmE,uB,EACA55C,kC,EACAyE,0C,EACAo1C,0B,EACAj+B,8B,EACAgB,kC,EACAk9B,yB,EACAv1B,4B,EACA0B,uC,EACAI,2B,EACA7pH,yB,EACArb,Q,EACA44J,uB,EACAC,sB,EACAC,kC,EACA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AA4B,uDAApB,GAAIjtC,EAAgB,4BAAPuE,EAAO,EAAPA,IAClD,OAAO0oC,EAAMp6B,QAAO,SAAAgsB,GAAA,OAAQA,EAAKt6B,IAAQvE,EAAMuE,Q","file":"index~493df0b3.01db87ec10a223a9cdec.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 const defaultCustody = {\r\n BasicAccountId: 0,\r\n BasicAccountNumber: \"\",\r\n BasicAccountName: \"\",\r\n EventBalanceType: \"Current\",\r\n EventAccountAmount: \"0.00000000\",\r\n BasicAccountType: \"Bank\",\r\n EventAccountTaxImputability: \"0.00000\",\r\n IsProp: propia,\r\n Coldebit: 1,\r\n Colcredit: 4,\r\n FootPrintCredit: [\r\n {\r\n EventAccountFootprintId: \"1\",\r\n EventAccountDebitCredit: 1,\r\n EventAccountDebitCreditVolume: \"0.00000000\",\r\n EventAccountIsCurrency: true,\r\n EventAccountSecurityId: \"1\",\r\n EventAccountTicker: \"PYG\",\r\n EventAccountIsCommission: false,\r\n EventAccountIsFee: true,\r\n EventAccountIsTax: false,\r\n EventAccountIsWithholding: false,\r\n EventAccountBaseForTax: false,\r\n EventAccountModified: false,\r\n Tooltip: \"PYG Fee\",\r\n },\r\n {\r\n EventAccountFootprintId: \"2\",\r\n EventAccountDebitCredit: 1,\r\n EventAccountDebitCreditVolume: \"0.00000000\",\r\n EventAccountIsCurrency: true,\r\n EventAccountSecurityId: \"1\",\r\n EventAccountTicker: \"PYG\",\r\n EventAccountIsCommission: false,\r\n EventAccountIsFee: false,\r\n EventAccountIsTax: false,\r\n EventAccountIsWithholding: true,\r\n EventAccountBaseForTax: false,\r\n EventAccountModified: false,\r\n Tooltip: \"PYG Withholding\",\r\n },\r\n {\r\n EventAccountFootprintId: \"3\",\r\n EventAccountDebitCredit: 1,\r\n EventAccountDebitCreditVolume: \"0.00000000\",\r\n EventAccountIsCurrency: true,\r\n EventAccountSecurityId: \"1\",\r\n EventAccountTicker: \"PYG\",\r\n EventAccountIsCommission: false,\r\n EventAccountIsFee: false,\r\n EventAccountIsTax: true,\r\n EventAccountIsWithholding: false,\r\n EventAccountBaseForTax: false,\r\n EventAccountModified: false,\r\n Tooltip: \"PYG TAX (Calculated)\",\r\n },\r\n {\r\n EventAccountFootprintId: \"4\",\r\n EventAccountDebitCredit: 1,\r\n EventAccountDebitCreditVolume: \"0.00000000\",\r\n EventAccountIsCurrency: false,\r\n EventAccountSecurityId: \"1\",\r\n EventAccountTicker: \"UYU TAX (Executed)\",\r\n EventAccountIsCommission: false,\r\n EventAccountIsFee: false,\r\n EventAccountIsTax: false,\r\n EventAccountIsWithholding: false,\r\n EventAccountBaseForTax: false,\r\n EventAccountModified: false,\r\n Tooltip: \"PYG TAX (Executed)\",\r\n },\r\n ],\r\n FootPrintDebit: [\r\n {\r\n EventAccountFootprintId: \"5\",\r\n EventAccountDebitCredit: -1,\r\n EventAccountDebitCreditVolume: \"11219178.00000000\",\r\n EventAccountIsCurrency: true,\r\n EventAccountSecurityId: \"1\",\r\n EventAccountTicker: \"PYG\",\r\n EventAccountIsCommission: false,\r\n EventAccountIsTax: false,\r\n EventAccountIsFee: false,\r\n EventAccountIsWithholding: false,\r\n EventAccountBaseForTax: true,\r\n EventAccountModified: false,\r\n Tooltip: \"PYG\",\r\n },\r\n ],\r\n EventCashCustAccountName: \"New Custody Cash Account\",\r\n EventCashCustAccountId: 0,\r\n added: true,\r\n };\r\n \r\n const defaultCustomer = {\r\n BasicAccountId: 0,\r\n BasicAccountNumber: \"\",\r\n BasicAccountName: \"\",\r\n EventBalanceType: \"Current\",\r\n EventAccountAmount: \"100.00000000\",\r\n BasicAccountType: \"Customer\",\r\n EventAccountTaxImputability: \"100.00000\",\r\n IsProp: propia,\r\n Coldebit: 5,\r\n Colcredit: 1,\r\n FootPrintCredit: [\r\n {\r\n EventAccountFootprintId: \"1\",\r\n EventAccountDebitCredit: 1,\r\n EventAccountDebitCreditVolume: \"2817260.00000000\",\r\n EventAccountIsCurrency: true,\r\n EventAccountSecurityId: \"1\",\r\n EventAccountTicker: \"PYG\",\r\n EventAccountIsCommission: false,\r\n EventAccountIsFee: false,\r\n EventAccountIsTax: false,\r\n EventAccountIsWithholding: false,\r\n EventAccountBaseForTax: true,\r\n EventAccountModified: true,\r\n Tooltip: \"PYG\",\r\n },\r\n ],\r\n FootPrintDebit: [\r\n {\r\n EventAccountFootprintId: \"2\",\r\n EventAccountDebitCredit: -1,\r\n EventAccountDebitCreditVolume: \"0.00000000\",\r\n EventAccountIsCurrency: true,\r\n EventAccountSecurityId: \"1\",\r\n EventAccountTicker: \"PYG\",\r\n EventAccountIsCommission: true,\r\n EventAccountIsTax: false,\r\n EventAccountIsFee: false,\r\n EventAccountIsWithholding: false,\r\n EventAccountBaseForTax: false,\r\n EventAccountModified: true,\r\n Tooltip: \"PYG Commission\",\r\n },\r\n {\r\n EventAccountFootprintId: \"3\",\r\n EventAccountDebitCredit: -1,\r\n EventAccountDebitCreditVolume: \"0.00000000\",\r\n EventAccountIsCurrency: true,\r\n EventAccountSecurityId: \"1\",\r\n EventAccountTicker: \"PYG\",\r\n EventAccountIsCommission: false,\r\n EventAccountIsTax: false,\r\n EventAccountIsFee: false,\r\n EventAccountIsWithholding: true,\r\n EventAccountBaseForTax: false,\r\n EventAccountModified: true,\r\n Tooltip: \"PYG Withholding\",\r\n },\r\n {\r\n EventAccountFootprintId: \"4\",\r\n EventAccountDebitCredit: -1,\r\n EventAccountDebitCreditVolume: \"0.00000000\",\r\n EventAccountIsCurrency: true,\r\n EventAccountSecurityId: \"1\",\r\n EventAccountTicker: \"PYG\",\r\n EventAccountIsCommission: false,\r\n EventAccountIsTax: true,\r\n EventAccountIsFee: false,\r\n EventAccountIsWithholding: false,\r\n EventAccountBaseForTax: false,\r\n EventAccountModified: true,\r\n Tooltip: \"PYG TAX\",\r\n },\r\n {\r\n EventAccountFootprintId: \"0\",\r\n EventAccountDebitCredit: -1,\r\n EventAccountDebitCreditVolume: \"100.00000\",\r\n EventAccountIsCurrency: true,\r\n EventAccountSecurityId: \"0\",\r\n EventAccountTicker: \"PYG\",\r\n EventAccountIsCommission: false,\r\n EventAccountIsTax: false,\r\n EventAccountIsFee: false,\r\n EventAccountIsWithholding: false,\r\n EventAccountBaseForTax: false,\r\n EventAccountModified: true,\r\n Tooltip: \"Imputability\",\r\n },\r\n {\r\n EventAccountFootprintId: \"5\",\r\n EventAccountDebitCredit: -1,\r\n EventAccountDebitCreditVolume: \"0.00000000\",\r\n EventAccountIsCurrency: true,\r\n EventAccountSecurityId: \"1\",\r\n EventAccountTicker: \"PYG\",\r\n EventAccountIsCommission: false,\r\n EventAccountIsTax: false,\r\n EventAccountIsFee: true,\r\n EventAccountIsWithholding: false,\r\n EventAccountBaseForTax: false,\r\n EventAccountModified: true,\r\n Tooltip: \"PYG Fee\",\r\n },\r\n ],\r\n added: true,\r\n };\r\n \r\n let item;\r\n \r\n if (type === \"Custody\") {\r\n item = custodyaux && Object.keys(custodyaux).length ? JSON.parse(JSON.stringify(custodyaux)) : defaultCustody;\r\n \r\n if (propia) {\r\n Corpevent.Account = [...Corpevent.Account, item];\r\n accountaux = [...custodyProp, item];\r\n setCustodyProp(accountaux);\r\n } else {\r\n Corpevent.Account = [...Corpevent.Account, item];\r\n accountaux = [...custody, item];\r\n setCustody(accountaux);\r\n }\r\n }\r\n \r\n if (type === \"Customer\") {\r\n item = accountaux && Object.keys(accountaux).length ? JSON.parse(JSON.stringify(accountaux)) : defaultCustomer;\r\n \r\n if (propia) {\r\n Corpevent.Account = [...Corpevent.Account, item];\r\n accountaux = [...accountProp, item];\r\n setAccountProp(accountaux);\r\n } else {\r\n Corpevent.Account = [...Corpevent.Account, item];\r\n accountaux = [...account, item];\r\n setAccount(accountaux);\r\n }\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 let isEditable = state.ui.mode == Mode.EDIT;\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 && isEditable) {\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/close.527f1e0f.svg\";","export default __webpack_public_path__ + \"./fonts/doc.42ccb3a3.svg\";","export default __webpack_public_path__ + \"./fonts/download.db9f1e2f.svg\";","export default __webpack_public_path__ + \"./fonts/left-arrow.39fff725.svg\";","export default __webpack_public_path__ + \"./fonts/radio-checked-black.ce3c4559.svg\";","export default __webpack_public_path__ + \"./fonts/radio-checked.3fa1ff24.svg\";","export default __webpack_public_path__ + \"./fonts/radio-unchecked-black.2874ac59.svg\";","export default __webpack_public_path__ + \"./fonts/radio-unchecked.b3b7b926.svg\";","export default __webpack_public_path__ + \"./fonts/right-arrow.35d1a919.svg\";","export default __webpack_public_path__ + \"./fonts/pyg.b8464637.svg\";","export default __webpack_public_path__ + \"./fonts/usd.2de01a18.svg\";","export default __webpack_public_path__ + \"./fonts/engine.201cd3b7.svg\";","export default __webpack_public_path__ + \"./fonts/info.4e91300a.svg\";","export default __webpack_public_path__ + \"./fonts/person.f30d25cd.svg\";","export default __webpack_public_path__ + \"./fonts/autorizaciones.43dcd897.svg\";","export default __webpack_public_path__ + \"./fonts/checkedMenu.d55c8791.svg\";","export default __webpack_public_path__ + \"./fonts/estadosMensuales.4d2150aa.svg\";","export default __webpack_public_path__ + \"./fonts/green-dot.57c5b441.svg\";","export default __webpack_public_path__ + \"./fonts/greenCircle.f4fd4e52.svg\";","export default __webpack_public_path__ + \"./fonts/historico.4890205e.svg\";","export default __webpack_public_path__ + \"./fonts/ingresosFuturos.18075513.svg\";","export default __webpack_public_path__ + \"./fonts/invertir.36eabc92.svg\";","export default __webpack_public_path__ + \"./fonts/logo-home-white.110e3aa2.svg\";","export default __webpack_public_path__ + \"./fonts/logo-home.52038f6d.svg\";","export default __webpack_public_path__ + \"./fonts/ordenes.4d19ec51.svg\";","export default __webpack_public_path__ + \"./fonts/phone.7d2814d8.svg\";","export default __webpack_public_path__ + \"./fonts/portafolio.9c342079.svg\";","export default __webpack_public_path__ + \"./fonts/uncheckedMenu.6635066d.svg\";","export default __webpack_public_path__ + \"./fonts/user.17b4c958.svg\";","export default __webpack_public_path__ + \"./fonts/add.9a06f663.svg\";","export default __webpack_public_path__ + \"./fonts/advisor.f7f7b34c.svg\";","export default __webpack_public_path__ + \"./fonts/assignment_returned.970db316.svg\";","export default __webpack_public_path__ + \"./fonts/calendar.c6a31c00.svg\";","export default __webpack_public_path__ + \"./fonts/card_travel.a011ab63.svg\";","export default __webpack_public_path__ + \"./fonts/changeAccount.245ad613.svg\";","export default __webpack_public_path__ + \"./fonts/checkInfo.1378f91a.svg\";","export default __webpack_public_path__ + \"./fonts/checkbox-checked.bf1a2129.svg\";","export default __webpack_public_path__ + \"./fonts/checkbox-unchecked.478eecd3.svg\";","export default __webpack_public_path__ + \"./fonts/checkboxContract.f85c2dbe.svg\";","export default __webpack_public_path__ + \"./fonts/closeSession.1def4f5c.svg\";","export default __webpack_public_path__ + \"./fonts/csv.67be4365.svg\";","export default __webpack_public_path__ + \"./fonts/dashboard.573f733b.svg\";","export default __webpack_public_path__ + \"./fonts/documentacion.74844277.svg\";","export default __webpack_public_path__ + \"./fonts/download-svgrepo-com.46df6723.svg\";","export default __webpack_public_path__ + \"./fonts/downloadPdf.d2a6dd65.svg\";","export default __webpack_public_path__ + \"./fonts/error.9914815d.svg\";","export default __webpack_public_path__ + \"./fonts/file.aa000357.svg\";","export default __webpack_public_path__ + \"./fonts/greenFace.d1888914.svg\";","export default __webpack_public_path__ + \"./fonts/greenStar.751d869e.svg\";","export default __webpack_public_path__ + \"./fonts/help.7abd8f5e.svg\";","export default __webpack_public_path__ + \"./fonts/i.fdaa9584.svg\";","export default __webpack_public_path__ + \"./fonts/information.2a7d8b07.svg\";","export default __webpack_public_path__ + \"./fonts/keyboard_arrow_down.29295fb5.svg\";","export default __webpack_public_path__ + \"./fonts/lock.23a24f8d.svg\";","export default __webpack_public_path__ + \"./fonts/logout.533405e4.svg\";","export default __webpack_public_path__ + \"./fonts/magnifying-glass-svgrepo-com.22075a79.svg\";","export default __webpack_public_path__ + \"./fonts/menu.d4e6eba2.svg\";","export default __webpack_public_path__ + \"./fonts/notificaciones.3ce15484.svg\";","export default __webpack_public_path__ + \"./fonts/pdf.df02c011.svg\";","export default __webpack_public_path__ + \"./fonts/pencil.0ab65af1.svg\";","export default __webpack_public_path__ + \"./fonts/print-solid.8156b394.svg\";","export default __webpack_public_path__ + \"./fonts/profile.5558965d.svg\";","export default __webpack_public_path__ + \"./fonts/radioCheckAccount.9969cff5.svg\";","export default __webpack_public_path__ + \"./fonts/radioCheckedAnswer.9d238495.svg\";","export default __webpack_public_path__ + \"./fonts/radioUncheckAccount.9899442a.svg\";","export default __webpack_public_path__ + \"./fonts/redoTest.78b87cf5.svg\";","export default __webpack_public_path__ + \"./fonts/rejectAuthorizations.5dc847a4.svg\";","export default __webpack_public_path__ + \"./fonts/success.c9d01bb8.svg\";","export default __webpack_public_path__ + \"./fonts/tickAuthorizations.c066f150.svg\";","export default __webpack_public_path__ + \"./fonts/warning.092ad831.svg\";","export default __webpack_public_path__ + \"./fonts/welcomeTick.c37b87ae.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 CREATING_USER = \"auth/CREATING_USER\";\r\nexport function creatingUser() {\r\n return {\r\n type: CREATING_USER,\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\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\n","import React, { useState, Fragment, useEffect } from \"react\";\r\nimport { Row, Col, Button } from \"reactstrap\";\r\nimport style from \"./AccessConfiguration.scss\";\r\nimport { Contract } from \"./Contract/Contract\";\r\nimport { AccessConfigurationGrid } from \"./AccessConfigurationGrid/AccessConfigurationGrid\";\r\nimport { AccessConfigurationAccount } from \"./AccessConfigurationAccount/AccessConfigurationAccount\";\r\nimport { Confirmation } from \"./Confirmation/Confirmation\";\r\nimport { Suitability } from \"./Suitability/Suitability\";\r\n\r\nexport const AccessConfiguration = ({ approved, handleAuthorize }) => {\r\n const [tab, setTab] = useState(approved ? \"confirmation\" : \"data\");\r\n const [contractId, setContractId] = useState(0);\r\n const [vpWidth, setVPWidth] = useState({width: window.innerWidth});\r\n\r\n const toggle = (toggleString, newContractId) => {\r\n if (toggleString === \"confirmation\") {\r\n handleAuthorize(contractId);\r\n }\r\n if (newContractId) {\r\n setContractId(newContractId);\r\n }\r\n setTab(toggleString);\r\n };\r\n\r\n return (\r\n
    \r\n \r\n \r\n <Row className={style.buttonContainer}>\r\n <Col className={style.col} xs={3} sm={3} md={3} lg={2} xl={2} xxl={2}>\r\n <CustomButton currentTab={tab} name={\"data\"} label={vpWidth.width > 576 ? \"01. datos\" : tab === \"data\" ? \"01. datos\" : \"01.\"} onClick={toggle} />\r\n </Col>\r\n <Col className={style.col} xs={2} sm={2} md={2} lg={2} xl={2} xxl={2}>\r\n <CustomButton currentTab={tab} name={\"contract\"} label={vpWidth.width > 576 ? \"02. contrato\" : tab === \"contract\" ? \"02. contrato\" : \"02.\"} onClick={toggle} />\r\n </Col>\r\n <Col className={style.col} xs={2} sm={2} md={2} lg={2} xl={2} xxl={2}>\r\n <CustomButton currentTab={tab} name={\"account\"} label={ vpWidth.width > 576 ? \"03. cuentas\" : tab === \"account\" ? \"03. cuentas\" : \"03.\"} onClick={toggle} />\r\n </Col>\r\n <Col className={style.col} xs={2} sm={2} md={2} lg={2} xl={2} xxl={2}>\r\n <CustomButton currentTab={tab} name={\"suitability\"} label={vpWidth.width > 576 ? \"04. Perfil del Inversor\" : tab === \"questions\" ? \"04. Perfil del Inversor\" : \"04.\"} onClick={toggle} />\r\n </Col>\r\n <Col className={style.col} xs={3} sm={3} md={3} lg={2} xl={2} xxl={2}>\r\n <CustomButton currentTab={tab} name={\"confirmation\"} label={vpWidth.width > 576 ? \"05. confirmación\" : tab === \"confirmation\" ? \"05. confirmación\" : \"05.\"} onClick={toggle} />\r\n </Col>\r\n </Row>\r\n <ActiveTab currentTab={tab} toggle={toggle} />\r\n </Fragment>\r\n </div>\r\n );\r\n};\r\n\r\nconst CustomButton = ({ currentTab, name, label, onClick }) => {\r\n const disabled = currentTab !== name;\r\n return (\r\n <Button\r\n className={!disabled ? style.buttonActive : style.buttonDisabled}\r\n onClick={() => {\r\n currentTab !== name ? onClick(currentTab) : null;\r\n }}\r\n disabled={disabled}\r\n >\r\n {label}\r\n </Button>\r\n );\r\n};\r\n\r\nconst ActiveTab = ({ currentTab, toggle }) => {\r\n switch (currentTab) {\r\n case \"data\":\r\n return <AccessConfigurationGrid toggle={toggle} />;\r\n case \"contract\":\r\n return <Contract toggle={toggle} />;\r\n case \"account\":\r\n return <AccessConfigurationAccount toggle={toggle} />;\r\n case \"suitability\":\r\n return <Suitability toggle={toggle} />;\r\n case \"confirmation\":\r\n return <Confirmation toggle={toggle} />;\r\n default:\r\n return null;\r\n }\r\n};\r\n\r\nconst Title = ({ currentTab }) => {\r\n switch (currentTab) {\r\n case \"data\":\r\n return <p className={style.title}>Configuración de acceso</p>;\r\n case \"contract\":\r\n return <p className={style.title}>Configuración de acceso / Contrato</p>;\r\n case \"account\":\r\n return <p className={style.title}>Configuración de acceso / Cuentas</p>;\r\n case \"suitability\":\r\n return <p className={style.title}>Configuración de acceso / Suitability</p>;\r\n case \"confirmation\":\r\n return <p className={style.title}>Configuración de acceso / Confirmación</p>;\r\n default:\r\n return null;\r\n }\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"body\":\"AccessConfiguration_body_1Uclg\",\"title\":\"AccessConfiguration_title_3K1sv\",\"col\":\"AccessConfiguration_col_dCfG2\",\"buttonContainer\":\"AccessConfiguration_buttonContainer_dXvX1\",\"buttonDisabled\":\"AccessConfiguration_buttonDisabled_3USw9\",\"buttonActive\":\"AccessConfiguration_buttonActive_d3aOV\"};","import React, { useState, useEffect, Fragment } from \"react\";\r\nimport { Col, Row, Button } from \"reactstrap\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { CircularProgress } from \"../../UI/CircularProgress/CircularProgress\";\r\nimport { currentAccountSet } from \"../../../actions/entities\";\r\nimport { fetchGetAccounts } from \"../../../services/api/accounts\";\r\nimport { getPersonBankAccount } from \"../../../services/api/accounts\";\r\nimport { getSession, getCurrentAccount, getSavedPersonInfo } from \"../../../reducers/selectors\";\r\n\r\nimport style from \"./AccessConfigurationAccount.scss\";\r\n\r\nexport const AccessConfigurationAccount = ({ toggle }) => {\r\n const [bankAccounts, setBankAccounts] = useState([]);\r\n const [guaraniAccounts, setGuaraniAccounts] = useState([]);\r\n const [usdAccounts, setUsdAccounts] = useState([]);\r\n const [loading, setLoading] = useState(true);\r\n const personInfo = useSelector(getSavedPersonInfo);\r\n\r\n useEffect(() => {\r\n if (personInfo) {\r\n setLoading(() => true);\r\n getPersonBankAccount({ accountId: 0 })\r\n .then(({ response }) => {\r\n setBankAccounts(response.personBankAccountInfo.BankAccounts);\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n })\r\n .finally(() => {\r\n setLoading(() => false);\r\n });\r\n }\r\n }, [personInfo]);\r\n\r\n useEffect(() => {\r\n let guaraniArray = [];\r\n let usdArray = [];\r\n bankAccounts.forEach((bankAccount) => {\r\n bankAccount.PersonBankAccountCurrency == \"USD\"\r\n ? usdArray.push(bankAccount)\r\n : guaraniArray.push(bankAccount);\r\n });\r\n setUsdAccounts(usdArray);\r\n setGuaraniAccounts(guaraniArray);\r\n }, [bankAccounts]);\r\n\r\n const AccountTable = (accounts) => {\r\n return (\r\n <Fragment>\r\n {accounts.accounts.map((account, index) => {\r\n return (\r\n <tr className={style.row} key={index}>\r\n <td className={`${style.td} ${style.currency}`}>\r\n {index === 0 ? (account.PersonBankAccountCurrency == \"USD\" ? \"USD\" : \"Guaraníes\") : null}\r\n </td>\r\n <td className={`${style.td} ${style.gray}`}>\r\n {account.PersonBankAccountType == \"Current\" ? \"cuenta corriente\" : \"caja de ahorro\"}\r\n </td>\r\n <td className={`${style.td} ${style.gray} ${style.accountNumber}`}>\r\n nº {account.PersonBankAccountNumber}\r\n </td>\r\n <td classsName={style.td}>\r\n <input type=\"radio\" checked style={{ accentColor: \"#EC7000\" }} />\r\n </td>\r\n </tr>\r\n );\r\n })}\r\n </Fragment>\r\n );\r\n };\r\n\r\n return (\r\n <div className={style.account}>\r\n <div className={style.title}>\r\n tus cuentas <img className={style.logo} src=\"/img/logo-blue.png\" alt=\"logo\" />\r\n para operar con nosotros son:\r\n </div>\r\n\r\n <Row className={style.mainRow}>\r\n <Row className={style.innerRow}>\r\n <table className={style.table}>\r\n {loading ? <CircularProgress /> : null}\r\n {guaraniAccounts ? <AccountTable title=\"Guaraníes\" accounts={guaraniAccounts} /> : null}\r\n {usdAccounts ? <AccountTable title=\"USD\" accounts={usdAccounts} /> : null}\r\n {!guaraniAccounts && !usdAccounts && !loading ? \"No hay cuentas de banco disponibles.\" : null}\r\n </table>\r\n </Row>\r\n </Row>\r\n\r\n <span className={style.confirmContainer}>\r\n <Button\r\n className={style.confirmButton}\r\n onClick={() => {\r\n toggle(\"suitability\");\r\n }}\r\n >\r\n confirmar datos\r\n </Button>\r\n </span>\r\n </div>\r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"account\":\"AccessConfigurationAccount_account_3iFp7\",\"title\":\"AccessConfigurationAccount_title_2ky-2\",\"logo\":\"AccessConfigurationAccount_logo_2rAC7\",\"mainRow\":\"AccessConfigurationAccount_mainRow_wZAbO\",\"innerRow\":\"AccessConfigurationAccount_innerRow_154hb\",\"table\":\"AccessConfigurationAccount_table_2neAP\",\"currency\":\"AccessConfigurationAccount_currency_g34Be\",\"td\":\"AccessConfigurationAccount_td_3ky2z\",\"gray\":\"AccessConfigurationAccount_gray_3iU2T\",\"accountNumber\":\"AccessConfigurationAccount_accountNumber_1FL4R\",\"confirmContainer\":\"AccessConfigurationAccount_confirmContainer_2R_Wj\",\"confirmButton\":\"AccessConfigurationAccount_confirmButton_2-3EI\",\"Logo\":\"AccessConfigurationAccount_Logo_3nGa3\"};","import React, { useState } from \"react\";\r\nimport { Col, Row, Button, Container } from \"reactstrap\";\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\nimport moment from \"moment\";\r\nimport { CircularProgress } from \"../../UI/CircularProgress/CircularProgress\";\r\n\r\nimport { getSession, getCurrentAccount, getSavedPersonInfo } from \"../../../reducers/selectors\";\r\n\r\nimport style from \"./AccessConfigurationGrid.scss\";\r\nimport { useEffect } from \"react\";\r\n\r\nexport const AccessConfigurationGrid = ({ toggle }) => {\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 <CircularProgress />;\r\n\r\n return (\r\n <Container className={style.container}>\r\n <p className={style.subTitle}>Confirmá tus datos</p>\r\n\r\n {personInfo && (\r\n <Row className={style.gridRow}>\r\n <Col className={style.col} xs={6} sm={4} md={4} lg={4} xl={4} xxl={4}>\r\n <p className={style.greySubtitle}>Nombre y Apellido</p>\r\n <p\r\n className={style.text}\r\n >{`${personInfo.PhysicalPersonFirstName} ${personInfo.PhysicalPersonFirstLastName}`}</p>\r\n </Col>\r\n <Col className={style.col} xs={6} sm={4} md={4} lg={4} xl={4} xxl={4}>\r\n <p className={style.greySubtitle}>Género</p>\r\n <p className={style.text}>{genderString[personInfo.PhysicalPersonGender]}</p>\r\n </Col>\r\n <Col className={style.col} xs={6} sm={4} md={4} lg={4} xl={4} xxl={4}>\r\n <p className={style.greySubtitle}>Fecha de Nacimiento</p>\r\n <p className={style.text}>{moment(personInfo.PhysicalPersonDateOfBirth).format(\"DD/MM/YYYY\")}</p>\r\n </Col>\r\n <Col className={style.col} xs={6} sm={4} md={4} lg={4} xl={4} xxl={4}>\r\n <p className={style.greySubtitle}>Nacionalidad</p>\r\n <p className={style.text}>\r\n {personInfo.PhysicalPersonNationality === undefined\r\n ? \"-\"\r\n : personInfo.PhysicalPersonNationality}\r\n </p>\r\n </Col>\r\n <Col className={style.col} xs={6} sm={4} md={4} lg={4} xl={4} xxl={4}>\r\n <p className={style.greySubtitle}>Estado Civil</p>\r\n <p className={style.text}>{civilStatusString[personInfo.PhysicalPersonCivilStatus]}</p>\r\n </Col>\r\n <Col className={style.col} xs={12} sm={4} md={4} lg={4} xl={4} xxl={4}>\r\n <p className={style.greySubtitle}>Dirección</p>\r\n <p\r\n className={style.text}\r\n >{`${legalAddress.LegalAddressStreet} ${legalAddress.LegalAddressNumber}, ${legalAddress.LegalAddressCityName}`}</p>\r\n </Col>\r\n <Col className={style.col} xs={6} sm={4} md={4} lg={4} xl={4} xxl={4}>\r\n <p className={style.greySubtitle}>Celular</p>\r\n <p className={style.text}>{mobilePhone.PhoneNumber}</p>\r\n </Col>\r\n <Col className={style.col} xs={6} sm={4} md={4} lg={4} xl={4} xxl={4}>\r\n <p className={style.greySubtitle}>Correo electrónico</p>\r\n <p className={style.text}>{personInfo.PhysicalPersonEmail}</p>\r\n </Col>\r\n <Col className={style.col} xs={6} sm={4} md={4} lg={4} xl={4} xxl={4}>\r\n <p className={style.greySubtitle}>Tipo de documento</p>\r\n <p className={style.text}>{personDocument.PhysicalPersonDocumentTypeName}</p>\r\n </Col>\r\n <Col className={style.col} xs={6} sm={4} md={4} lg={4} xl={4} xxl={4}>\r\n <p className={style.greySubtitle}>Número de documento</p>\r\n <p className={style.text}>{personDocument.PhysicalPersonDocumentNumber}</p>\r\n </Col>\r\n <Col className={style.col} xs={6} sm={4} md={4} lg={4} xl={4} xxl={4}>\r\n <p className={style.greySubtitle}>Ocupación</p>\r\n <p className={style.text}>{personInfo.PersonProfessionName}</p>\r\n </Col>\r\n <Col className={style.col} xs={6} sm={4} md={4} lg={4} xl={4} xxl={4}>\r\n <p className={style.greySubtitle}>Nombre de la empresa</p>\r\n <p className={style.text}>{personInfo.PhysicalPersonInstitution}</p>\r\n </Col>\r\n <Col className={style.col} xs={6} sm={4} md={4} lg={4} xl={4} xxl={4}>\r\n <p className={style.greySubtitle}>Ciudad (laboral)</p>\r\n <p className={style.text}>{legalAddress.LegalAddressCityName}</p>\r\n </Col>\r\n <Col className={style.col} xs={6} sm={4} md={4} lg={4} xl={4} xxl={4}>\r\n <p className={style.greySubtitle}>Actividad del negocio</p>\r\n <p className={style.text}>{personInfo.PersonActivitySectorName}</p>\r\n </Col>\r\n <Col className={style.col} xs={6} sm={4} md={4} lg={4} xl={4} xxl={4}></Col>\r\n\r\n <Col className={style.col} xs={6} sm={4} md={4} lg={4} xl={4} xxl={4}></Col>\r\n <Col className={style.col} xs={6} sm={4} md={4} lg={4} xl={4} xxl={4}></Col>\r\n <Col className={`${style.col} ${style.buttonColumn}`} xs={6} sm={4} md={4} lg={4} xl={4} xxl={4}>\r\n <Button\r\n className={style.confirmButton}\r\n onClick={() => {\r\n toggle(\"contract\");\r\n }}\r\n >\r\n confirmar datos\r\n </Button>\r\n </Col>\r\n </Row>\r\n )}\r\n </Container>\r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"AccessConfigurationGrid_container_3QLYb\",\"subTitle\":\"AccessConfigurationGrid_subTitle_21DV7\",\"gridRow\":\"AccessConfigurationGrid_gridRow_6h5LA\",\"col\":\"AccessConfigurationGrid_col_3J5lf\",\"greySubtitle\":\"AccessConfigurationGrid_greySubtitle_2bNIv\",\"buttonColumn\":\"AccessConfigurationGrid_buttonColumn_29Clv\",\"confirmButton\":\"AccessConfigurationGrid_confirmButton_zmHyW\"};","import React, { Fragment, useState } from \"react\";\r\nimport { Button } from \"reactstrap\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\n\r\nimport { signOut } from \"../../../actions/auth\";\r\n\r\nimport style from \"./Confirmation.scss\";\r\n\r\nconst redirectionSite = window.___APP_CONFIG___.REDIRECTION_SITE;\r\n\r\nexport const Confirmation = () => {\r\n const dispatch = useDispatch();\r\n\r\n return (\r\n <Fragment>\r\n <div className={style.container}>\r\n <div className={style.grayContent}>\r\n la creación de tu cuenta está en proceso, te estaremos contactando cuando ya este activa para\r\n comenzar a invertir.\r\n </div>\r\n </div>\r\n <span className={style.footer}>\r\n <Button\r\n className={style.button}\r\n onClick={() => {\r\n dispatch(signOut());\r\n sessionStorage.clear();\r\n window.location.href = redirectionSite;\r\n }}\r\n >\r\n Salir\r\n </Button>\r\n </span>\r\n </Fragment>\r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"Confirmation_container_1jrU7\",\"grayContent\":\"Confirmation_grayContent_8D9sO\",\"footer\":\"Confirmation_footer_27wQ2\",\"button\":\"Confirmation_button_H1GAm\"};","import React, { Fragment, useState, useEffect } from \"react\";\r\nimport { Button } from \"reactstrap\";\r\nimport { useDispatch } from \"react-redux\";\r\nimport { CircularProgress } from \"../../UI/CircularProgress/CircularProgress\";\r\n\r\nimport { getLegalContracts, setLegalContract } from \"../../../services/api/person\";\r\nimport { signOut } from \"../../../actions/auth\";\r\nimport { showToast } from \"../../../utils/helper\";\r\n\r\nimport style from \"./Contract.scss\";\r\n\r\nconst redirectionSite = window.___APP_CONFIG___.REDIRECTION_SITE;\r\n\r\nexport const Contract = ({ toggle }) => {\r\n const [legalContract, setLegalContract] = useState({});\r\n const [contractLoading, setContractLoading] = useState(true);\r\n const dispatch = useDispatch();\r\n\r\n useEffect(() => {\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 setLegalContract({\r\n ...response.LegalContractSDT,\r\n LegalContractAttachmentBlob: response.blobfile,\r\n });\r\n }\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,${legalContract.LegalContractAttachmentBlob}`;\r\n a.download = `${legalContract.LegalContractAttachmentName}.${legalContract.LegalContractAttachmentExtension}`;\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 <div className={style.body}>\r\n <div className={style.header}>\r\n <span className={style.title}>Antes de continuar, confirma el contrato:</span>\r\n </div>\r\n\r\n {contractLoading ? (\r\n <CircularProgress />\r\n ) : (\r\n <Fragment>\r\n <div className={style.contract}>\r\n <div className={style.subTitle}>Contrato de intermediación</div>\r\n <a onClick={getFile} className={style.attachment}>\r\n <i className=\"fa fa-file-pdf-o\" />{\" \"}\r\n {legalContract && legalContract.LegalContractAttachmentName\r\n ? `${legalContract.LegalContractAttachmentName}.${legalContract.LegalContractAttachmentExtension}`\r\n : \"No hay contratos disponibles.\"}\r\n </a>\r\n <p className={style.orangeText}>Podrás ver el contrato confirmado en la sección “Documentos”</p>\r\n </div>\r\n <span className={style.footer}>\r\n <Button\r\n className={style.button}\r\n onClick={() => {\r\n if (!legalContract || !legalContract.LegalContractAttachmentName) {\r\n dispatch(signOut());\r\n sessionStorage.clear();\r\n window.location.href = redirectionSite;\r\n } else {\r\n toggle(\"account\", legalContract.LegalContractId);\r\n }\r\n }}\r\n >\r\n {!legalContract || !legalContract.LegalContractAttachmentName ? \"Salir\" : \"confirmar\"}\r\n </Button>\r\n </span>\r\n </Fragment>\r\n )}\r\n </div>\r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"body\":\"Contract_body_1dQzZ\",\"header\":\"Contract_header_1LqHR\",\"title\":\"Contract_title_2rsA4\",\"contract\":\"Contract_contract_16x7K\",\"subTitle\":\"Contract_subTitle_2KZkD\",\"orangeText\":\"Contract_orangeText__yadC\",\"footer\":\"Contract_footer_1yM8b\",\"button\":\"Contract_button_3Fyfy\",\"attachment\":\"Contract_attachment_2a4aQ\"};","import React, { useState, useEffect, Fragment } from \"react\";\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\nimport { Button } from \"reactstrap\";\r\nimport { CircularProgress } from \"../../UI/CircularProgress/CircularProgress\";\r\nimport { getSession, getCurrentAccount, getSavedPersonInfo } from \"../../../reducers/selectors\";\r\nimport { getQuestions, updateAnswers, getPersonInfo } from \"../../../services/api/person\";\r\nimport { currentAccountSet, personInfoSet } from \"../../../actions/entities\";\r\n\r\nimport { showToast } from \"../../../utils/helper\";\r\n\r\nimport style from \"./Suitability.scss\";\r\n\r\nexport const Suitability = ({ toggle }) => {\r\n const [start, setStart] = useState(false);\r\n const [loading, setLoading] = useState(false);\r\n const [loadingSave, setLoadingSave] = useState(false);\r\n const [questions, setQuestions] = useState([]);\r\n const personInfo = useSelector(getSavedPersonInfo);\r\n const dispatch = useDispatch();\r\n\r\n useEffect(() => {\r\n setLoading(() => true);\r\n getQuestions()\r\n .then(({ response }) => {\r\n setQuestions(response.questions);\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n })\r\n .finally(() => {\r\n setLoading(() => false);\r\n });\r\n }, []);\r\n\r\n const setAnswer = (questionIndex, answerIndex) => {\r\n const newQuestions = [...questions];\r\n\r\n newQuestions.find((question) => question.QuestionId === questionIndex).Answer = newQuestions\r\n .find((question) => question.QuestionId === questionIndex)\r\n .Answer.map((answerItem) => {\r\n return {\r\n ...answerItem,\r\n AnswerIsResponse: false,\r\n };\r\n });\r\n\r\n newQuestions\r\n .find((question) => question.QuestionId === questionIndex)\r\n .Answer.find((answer) => answer.AnswerId === answerIndex).AnswerIsResponse = true;\r\n\r\n setQuestions(newQuestions);\r\n };\r\n\r\n const onConfirm = () => {\r\n const newQuestions = questions.filter((questionItem) => {\r\n if (questionItem.Answer.find((answerItem) => answerItem.AnswerIsResponse)) return questionItem;\r\n });\r\n\r\n if (newQuestions.length < questions.length) {\r\n showToast(\"Debe responder todas las preguntas\", true);\r\n return;\r\n } else {\r\n setLoadingSave(() => true);\r\n updateAnswers({ sdtQuestion: questions })\r\n .then(({ response }) => {\r\n if (response.sdtresult.Code !== 200) showToast(\"Error enviando respuestas\", true);\r\n else {\r\n getPersonInfo()\r\n .then(({ response }) => {\r\n dispatch(personInfoSet(response.personInfo));\r\n toggle(\"confirmation\");\r\n })\r\n .catch((err) => console.error(err))\r\n .finally(() => {\r\n setLoadingSave(() => false);\r\n });\r\n }\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n });\r\n }\r\n };\r\n\r\n if (!personInfo || loading || loadingSave) return <CircularProgress />;\r\n\r\n return (\r\n <div className={style.profileTestWrapper}>\r\n <Fragment>\r\n <div className={style.header}>\r\n <span className={style.title}>Antes de continuar, completa el cuestionario:</span>\r\n </div>\r\n {questions.map((question, index) => {\r\n return <TestQuestion key={index} question={question} setAnswer={setAnswer} />;\r\n })}\r\n </Fragment>\r\n <span className={style.confirmContainer}>\r\n <Button\r\n className={style.confirmButton}\r\n onClick={() => {\r\n onConfirm();\r\n }}\r\n >\r\n confirmar datos\r\n </Button>\r\n </span>\r\n </div>\r\n );\r\n};\r\n\r\nconst TestQuestion = ({ question, setAnswer }) => {\r\n const [active, setActive] = useState(\"\");\r\n\r\n return (\r\n <form className={style.questionContainer}>\r\n <p className={style.questionTitle}>{question.QuestionDescription}</p>\r\n {question.Answer.map((answer, index) => {\r\n const key = `${question.QuestionId}-${index}`;\r\n\r\n return (\r\n <div key={key} className={`${style.answerRow} ${active == key ? style.answerRowActive : \"\"}`}>\r\n <input\r\n type=\"radio\"\r\n name=\"answer\"\r\n id={key}\r\n style={{ accentColor: \"#EC7000\" }}\r\n onClick={() => {\r\n setActive(key);\r\n setAnswer(question.QuestionId, answer.AnswerId);\r\n }}\r\n />\r\n <label className={style.answerText} for={key}>\r\n {answer.AnswerDescription}\r\n </label>\r\n </div>\r\n );\r\n })}\r\n </form>\r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"profileTestWrapper\":\"Suitability_profileTestWrapper_27y5n\",\"header\":\"Suitability_header_1uNcV\",\"title\":\"Suitability_title_2u5P5\",\"questionContainer\":\"Suitability_questionContainer_xo37y\",\"questionTitle\":\"Suitability_questionTitle_2LRo5\",\"answerRow\":\"Suitability_answerRow_1kfcN\",\"answerText\":\"Suitability_answerText_bs-XI\",\"answerRowActive\":\"Suitability_answerRowActive_3L-1H\",\"confirmContainer\":\"Suitability_confirmContainer_3CkfF\",\"confirmButton\":\"Suitability_confirmButton_2xgnK\",\"buttonContainer\":\"Suitability_buttonContainer_1ixwA\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"logo\":\"Login_logo_N1umq\",\"principal\":\"Login_principal_2DrPp\",\"verticaLine\":\"Login_verticaLine_vyb_I\",\"verticaLineGreen\":\"Login_verticaLineGreen_3xgfc\",\"logoLabel\":\"Login_logoLabel_3_ePD\",\"header\":\"Login_header_3t_z8\",\"headerLabel\":\"Login_headerLabel_1JNWE\",\"headerDiv\":\"Login_headerDiv_19lmH\",\"headerDiv2\":\"Login_headerDiv2_1Zafu\",\"labelDiv1\":\"Login_labelDiv1_2Iei5\",\"labelDiv\":\"Login_labelDiv_xECX3\",\"circle\":\"Login_circle_9j-gu\",\"log\":\"Login_log_3Mwbx\",\"card\":\"Login_card_2zuVp\",\"btn\":\"Login_btn_1Hyu7\",\"submit\":\"Login_submit_2yOL7\",\"titleCard\":\"Login_titleCard_1yfFS\",\"checkbox\":\"Login_checkbox_H7qrm\",\"checkboxLabel\":\"Login_checkboxLabel_1NF10\",\"form\":\"Login_form_3q9ta\",\"formText\":\"Login_formText_18RVz\",\"submitRow\":\"Login_submitRow_18XEQ\",\"smile\":\"Login_smile_1Zmsu\",\"bigCircle\":\"Login_bigCircle_1L-t-\",\"star\":\"Login_star_X1Jqm\",\"app\":\"Login_app_1OOoR\",\"welcome\":\"Login_welcome_3Aovu\",\"secondLogo\":\"Login_secondLogo_17pFX\",\"row\":\"Login_row_1vQM_\",\"cardDiv\":\"Login_cardDiv_1C_xv\",\"headerLabel2\":\"Login_headerLabel2_1BiKP\",\"infoContainer\":\"Login_infoContainer_2MS_H\",\"infoLabels\":\"Login_infoLabels_3SaXc\",\"welcomeFirstRow\":\"Login_welcomeFirstRow_2I_0Y\",\"errorWrapper\":\"Login_errorWrapper_D3Yp0\",\"error\":\"Login_error_1DajN\"};","import React, { Fragment, useEffect, useState } from \"react\";\r\nimport { Card, CardBody, Button, Input, InputGroup, Alert, Label, Media } from \"reactstrap\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { NavLink, Redirect } from \"react-router-dom\";\r\nimport { CircularProgress } from \"../UI/CircularProgress/CircularProgress\";\r\n\r\nimport { Row, Col } from \"../UI/Customstrap/Customstrap\";\r\nimport { Container } from \"../UI/Container/Container\";\r\nimport {\r\n changeUsername,\r\n changePassword,\r\n signIn,\r\n authSuccess,\r\n creatingUser,\r\n authFailure,\r\n} from \"./../../actions/auth\";\r\nimport { Icons } from \"../UI/Icon/Icon\";\r\nimport style from \"./Login.scss\";\r\nimport MediaQuery from \"react-responsive\";\r\nimport { preAuthService, preLogin } from \"../../services/api\";\r\nimport { getAuthCredentials } from \"../../reducers/selectors\";\r\n\r\nconst Login = () => {\r\n const dispatch = useDispatch();\r\n const auth = useSelector((state) => state.auth);\r\n const credentials = useSelector(getAuthCredentials);\r\n const { authenticated, error, loading, username, password } = auth;\r\n const [localLoading, setLocalLoading] = useState(false);\r\n\r\n const onSignIn = async () => {\r\n try {\r\n setLocalLoading(() => true);\r\n // Comprobar si usuario existe en GAM\r\n const currentCredentials = { ...credentials };\r\n const encryptedCredentials = await preLogin(currentCredentials);\r\n\r\n // Si existe, login\r\n const newSession = await preAuthService(encryptedCredentials);\r\n if (newSession.response.error) {\r\n setLocalLoading(() => false);\r\n dispatch(authFailure(\"Usuario o contraseña incorrecta\"));\r\n return;\r\n }\r\n\r\n if (newSession.response.mustCreate) {\r\n // Si no existe pero sí existe en sistema externo, login con creación\r\n dispatch(creatingUser());\r\n dispatch(signIn());\r\n } else {\r\n // Ya hay login, setear datos y redirigir\r\n const newContext = newSession.response;\r\n sessionStorage.setItem(\"authenticated\", \"true\");\r\n sessionStorage.setItem(\"context\", JSON.stringify(newContext));\r\n dispatch(authSuccess());\r\n dispatch({ type: \"server/authenticate\", payload: { token: newContext.accessToken } });\r\n }\r\n } catch (error) {\r\n console.error(error);\r\n dispatch(authFailure(\"Hubo un error, comuníquese con un administrador\"));\r\n setLocalLoading(() => false);\r\n }\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 onSignIn();\r\n }\r\n }\r\n };\r\n const information = [\r\n \"Los datos para ingresar a ueno Casa de Bolsa son los mismos que usás en ueno bank.\",\r\n \"Si necesitás recuperar tu contraseña, podés hacerlo desde la app de ueno bank.\",\r\n ];\r\n const infoIcons = [\r\n () => <Icons.InformationLoginIcon width=\"24px\" height=\"24px\"></Icons.InformationLoginIcon>,\r\n () => <Icons.EngineIcon width=\"24px\" height=\"24px\"></Icons.EngineIcon>,\r\n () => <Icons.PersonIcon width=\"24px\" height=\"24px\"></Icons.PersonIcon>,\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 <Redirect to=\"/\" />;\r\n }\r\n\r\n return (\r\n <div className={style.principal}>\r\n <Row className={style.header}>\r\n <MediaQuery minWidth={576}>\r\n <div className={style.headerDiv}>\r\n <img id={style.logo} src=\"/svg/SideBarIcons/full-logo-home-white.svg\" alt=\"logo\" />\r\n </div>\r\n <div className={style.headerDiv2}>\r\n <Label className={style.headerLabel}>Ante cualquier duda contactanos</Label>\r\n <Label className={style.headerLabel2}>(021)618 8000</Label>\r\n </div>\r\n </MediaQuery>\r\n <MediaQuery maxWidth={576}>\r\n <img id={style.logo} src=\"/svg/SideBarIcons/full-logo-home-white.svg\" alt=\"logo\" />\r\n </MediaQuery>\r\n </Row>\r\n <Row className={style.row}>\r\n <Col className={style.welcome} style={{ backgrountColor: \"#f3f5f5\" }}>\r\n <Row className={style.welcomeFirstRow}>\r\n <MediaQuery minWidth={576}>\r\n <Label>Te damos la bienvenida </Label>\r\n <div className={style.secondLogo}>\r\n <div>\r\n <img src=\"/svg/SideBarIcons/logo-home-black.svg\" alt=\"logo\" />\r\n </div>\r\n </div>\r\n </MediaQuery>\r\n <MediaQuery maxWidth={576}>\r\n <Label>¡Bienvenido a ueno casa de bolsa!</Label>\r\n </MediaQuery>\r\n </Row>\r\n <MediaQuery minWidth={576}>\r\n <Row>\r\n <div className={style.infoContainer}>\r\n {information.map((elem, index) => (\r\n <Row>\r\n <div>{infoIcons[index]()}</div>\r\n <Label className={style.infoLabels}>{elem}</Label>\r\n </Row>\r\n ))}\r\n </div>\r\n </Row>\r\n </MediaQuery>\r\n </Col>\r\n <Col className={style.log} md=\"6\">\r\n <div className={style.cardDiv}>\r\n <Card className={style.card} style={auth.creatingUser === true ? { height: \"min-content\" } : {}}>\r\n <CardBody>\r\n {auth.creatingUser === true ? (\r\n <Row className={style.formText}>\r\n <Label>Se está creando tu usuario</Label>\r\n <Col xs={12}>\r\n <CircularProgress />\r\n </Col>\r\n </Row>\r\n ) : (\r\n <React.Fragment>\r\n <Row className={style.formText}>\r\n <Label>Ingresá con tus credenciales ueno</Label>\r\n </Row>\r\n <hr />\r\n <Row className={style.form}>\r\n <Label>Número de documento</Label>\r\n <input\r\n className={style.btn}\r\n placeholder=\"Tu número de documento\"\r\n type=\"text\"\r\n onKeyDown={onKeyDown}\r\n onChange={onChangeUserName}\r\n />\r\n <Label>Clave de acceso</Label>\r\n <input\r\n className={style.btn}\r\n placeholder=\"Tu clave de acceso\"\r\n type=\"password\"\r\n onKeyDown={onKeyDown}\r\n onChange={onChangePassword}\r\n />\r\n </Row>\r\n <Row className={style.submitRow}>\r\n {loading || localLoading ? (\r\n <CircularProgress />\r\n ) : (\r\n <button\r\n className={style.submit}\r\n onClick={onSignIn}\r\n disabled={loading || !username || !password || localLoading}\r\n >\r\n Ingresar\r\n </button>\r\n )}\r\n </Row>\r\n </React.Fragment>\r\n )}\r\n {error && (\r\n <Row>\r\n <Col className={style.errorWrapper}>\r\n <span className={style.error}>{error}</span>\r\n </Col>\r\n </Row>\r\n )}\r\n </CardBody>\r\n </Card>\r\n </div>\r\n </Col>\r\n <MediaQuery maxWidth={576}>\r\n <Col className={style.welcome} style={{ backgrountColor: \"#f3f5f5\" }}>\r\n <Row>\r\n <div className={style.infoContainer}>\r\n {information.map((elem, index) => (\r\n <Row>\r\n <div>{infoIcons[index]()}</div>\r\n <Label className={style.infoLabels}>{elem}</Label>\r\n </Row>\r\n ))}\r\n </div>\r\n </Row>\r\n </Col>\r\n </MediaQuery>\r\n </Row>\r\n </div>\r\n );\r\n};\r\n\r\nexport default Login;\r\n","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 <Route {...rest} render={(props) =>{\r\n return (\r\n rest.authenticated == true\r\n ? <Component {...props} />\r\n : <Redirect to={{\r\n pathname: '/login',\r\n state: { from: props.location }\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, { Fragment, useState, useEffect } from \"react\";\r\nimport { Col, Row, Table, Button } from \"reactstrap\";\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\nimport { showToast } from \"../../utils/helper\";\r\nimport { CircularProgress } from \"../UI/CircularProgress/CircularProgress\";\r\nimport { useLocation } from \"react-router-dom\";\r\n\r\nimport { AuthorizationModal } from \"../Modal/AuthorizationModal/AuthorizationModal\";\r\nimport { getAuthorizations, getRedirectData } from \"../../reducers/selectors\";\r\nimport { authorizationsReload } from \"../../actions/entities\";\r\nimport { getTransactionalPinURL, respondAuthorization } from \"../../services/api/authorizations\";\r\nimport { setRedirectionData } from \"../../services/api/entities\";\r\nimport { Grid } from \"./Grid/Grid\";\r\n\r\nconst AuthorizationComponent = () => {\r\n const [loading, setLoading] = useState(false);\r\n const authorizations = useSelector(getAuthorizations);\r\n const dispatch = useDispatch();\r\n\r\n let { state } = useLocation();\r\n\r\n useEffect(() => {\r\n if (state) {\r\n handleAuthorizeWrapper(state.redirectionData);\r\n }\r\n }, [state]);\r\n\r\n const handleAuthorizeWrapper = (payload) => {\r\n if (payload.accepted) {\r\n handleAuthorize(payload);\r\n } else {\r\n handleReject(payload);\r\n }\r\n };\r\n\r\n const handlePreReject = (authorization) => {\r\n setLoading(() => true);\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: \"Authorization\",\r\n payload: { id: authorization.id, accepted: false },\r\n },\r\n };\r\n setRedirectionData(newRedirectData)\r\n .then(({ response }) => {\r\n if (response.result.Code === 200) {\r\n window.location.href = redirect_url;\r\n } else {\r\n showToast(\"Error procesando autorización\", true);\r\n setLoading(() => false);\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 .catch((err) => {\r\n console.error(err);\r\n showToast(\"Error procesando autorización\", true);\r\n setLoading(() => false);\r\n dispatch(authorizationsReload());\r\n });\r\n };\r\n\r\n const handleReject = (payload) => {\r\n setLoading(() => true);\r\n respondAuthorization(payload)\r\n .then(({ response }) => {\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 .catch((err) => {\r\n console.error(err);\r\n showToast(\"Error procesando autorización\", true);\r\n })\r\n .finally(() => {\r\n setLoading(() => false);\r\n dispatch(authorizationsReload());\r\n });\r\n };\r\n\r\n const handlePreAuthorize = (authorization) => {\r\n setLoading(() => true);\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: \"Authorization\",\r\n payload: { id: authorization.id, accepted: true },\r\n },\r\n };\r\n setRedirectionData(newRedirectData)\r\n .then(({ response }) => {\r\n if (response.result.Code === 200) {\r\n window.location.href = redirect_url;\r\n } else {\r\n showToast(\"Error procesando autorización\", true);\r\n setLoading(() => false);\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 dispatch(authorizationsReload());\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 dispatch(authorizationsReload());\r\n });\r\n };\r\n\r\n const handleAuthorize = (payload) => {\r\n const newData = {\r\n id: payload.id,\r\n accepted: true,\r\n };\r\n setLoading(() => true);\r\n respondAuthorization(newData)\r\n .then(({ response }) => {\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 .catch((err) => {\r\n console.error(err);\r\n showToast(\"Error procesando autorización\", true);\r\n })\r\n .finally(() => {\r\n setLoading(() => false);\r\n dispatch(authorizationsReload());\r\n });\r\n };\r\n\r\n if (loading) return <CircularProgress />;\r\n\r\n return (\r\n <Row>\r\n <Col lg=\"12\">\r\n <Grid\r\n authorizations={authorizations}\r\n onAuthorize={handleAuthorize}\r\n onReject={handleReject}\r\n loading={loading}\r\n setLoading={setLoading}\r\n />\r\n </Col>\r\n </Row>\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 \"../../../FormattedNumber/FormattedNumber\";\r\nimport moment from \"moment\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport GenericButton from \"../../../UI/Button/Button\";\r\nimport acceptAuthIcon from \"../../../../../public/svg/tickAuthorizations.svg\";\r\nimport rejectAuthIcon from \"../../../../../public/svg/rejectAuthorizations.svg\";\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/downloadPdf.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.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 onAuthorize(authItem);\r\n };\r\n\r\n const onRejectWrapper = () => {\r\n onReject(authItem);\r\n };\r\n\r\n return (\r\n <tr key={idx} className={style.tableRow}>\r\n <td className={style.sm}>\r\n <span className={style.tableTitleMobile}>Fecha</span>\r\n {moment(authItem.dateTime).format(\"DD MMM YYYY\")}\r\n </td>\r\n <td className={`${style.md} ${style.sm}`}>\r\n <span className={style.tableTitleMobile}>Tipo</span>\r\n {side}\r\n </td>\r\n <td>\r\n <span className={style.tableTitleMobile}>Instrumento</span>\r\n {description ? description : \"-\"}\r\n </td>\r\n <td className={`${style.md} ${style.sm}`}>\r\n <span className={style.tableTitleMobile}>Precio</span>\r\n {+ammount === 0 ? (\r\n \"-\"\r\n ) : (\r\n <FormattedNumber\r\n value={ammount}\r\n minimumFractionDigits={currency === \"GS\" ? 0 : 2}\r\n maximumFractionDigits={currency === \"GS\" ? 0 : 2}\r\n />\r\n )}\r\n </td>\r\n <td className={style.sm}>\r\n <span className={style.tableTitleMobile}>Monto total a operar</span>\r\n <FormattedNumber\r\n value={operationValue}\r\n minimumFractionDigits={currency === \"GS\" ? 0 : 2}\r\n maximumFractionDigits={currency === \"GS\" ? 0 : 2}\r\n />\r\n </td>\r\n <td className={`${style.md} ${style.sm}`}>\r\n <span className={style.tableTitleMobile}>Moneda</span>\r\n {currency}\r\n </td>\r\n {/* <td>\r\n <img src={pdf} className={style.icon} alt=\"pdf-icon\" onClick={() => handleDownload(order)} />\r\n </td> */}\r\n <td className={style.actionButtons}>\r\n <GenericButton\r\n label={\"Autorizar\"}\r\n primary\r\n padding={\"10px 10px 10px 6px\"}\r\n backgroundColor={\"#27272A\"}\r\n loading={loading}\r\n width={\"130px\"}\r\n handleClick={onAuthorizeWrapper}\r\n iconSvg={[{ width: \"24px\", item: acceptAuthIcon }]}\r\n ></GenericButton>\r\n <GenericButton\r\n label={\"Rechazar\"}\r\n padding={\"10px 10px 10px 6px\"}\r\n backgroundColor={\"#E4E4E7\"}\r\n loading={loading}\r\n width={\"130px\"}\r\n textColor={\"#27272A\"}\r\n handleClick={onRejectWrapper}\r\n iconSvg={[{ width: \"24px\", item: rejectAuthIcon }]}\r\n ></GenericButton>\r\n </td>\r\n </tr>\r\n );\r\n};\r\n\r\nexport default AuthorizationRow;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"tableTitleMobile\":\"AuthorizationRow_tableTitleMobile_3RAEJ\",\"tableRow\":\"AuthorizationRow_tableRow_3pk8n\",\"actionButtons\":\"AuthorizationRow_actionButtons_ym0mF\",\"icon\":\"AuthorizationRow_icon_37u4U\",\"md\":\"AuthorizationRow_md_3YVnH\"};","import React, { Fragment } from \"react\";\r\nimport { Table, Label } from \"reactstrap\";\r\nimport { Warning } from \"../../Warning/Warning\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { Container } from \"../../UI/Container/Container\";\r\nimport { Col, Row } from \"../../UI/Customstrap/Customstrap\";\r\nimport { getTexts } from \"../../../reducers/selectors\";\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 <div className={style.emptyMessage} colSpan={7}>\r\n No hay autorizaciones.\r\n </div>\r\n );\r\n };\r\n\r\n return (\r\n <Fragment>\r\n <Row className={style.headerTitle}>\r\n <Label>Autorizaciones</Label>\r\n </Row>\r\n <div className={style.isMobile}>\r\n {authorizations.length === 0 ? (\r\n <EmptyAuthorizations />\r\n ) : (\r\n <div className=\"cards-container\">\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\r\n currency = orderInfo.OrderCurrencySymbol;\r\n if (orderInfo.OrderCurrencySymbol.trim() === \"PYG\") {\r\n currency = \"GS\";\r\n }\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 ? \"Rescate Total \" : \"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 <div className={style.cardContainer}>\r\n <AuthorizationRow\r\n authItem={authorizationItem}\r\n side={side}\r\n description={description}\r\n ammount={ammount}\r\n operationValue={operationValue}\r\n currency={currency}\r\n idx={idx}\r\n onAuthorize={onAuthorize}\r\n onReject={onReject}\r\n loading={loading}\r\n setLoading={setLoading}\r\n />\r\n </div>\r\n );\r\n })}\r\n </div>\r\n )}\r\n </div>\r\n <Row className={style.isWeb}>\r\n <Col lg=\"12\">\r\n <Container className={style.container}>\r\n {authorizations.length === 0 ? (\r\n <EmptyAuthorizations />\r\n ) : (\r\n <Row className={style.authorizationsTableRow}>\r\n <Table className={style.table}>\r\n <thead className={style.tableHead}>\r\n <tr className={style.tableRow}>\r\n <th className={`${style.tableH} ${style.sm}`}>Fecha</th>\r\n <th className={`${style.tableH} ${style.md} ${style.sm}`}>Tipo</th>\r\n <th className={style.tableH}>Instrumento</th>\r\n <th className={`${style.tableH} ${style.sm}`}>Precio</th>\r\n <th className={`${style.tableH} ${style.md} ${style.sm}`} id={style.tablaMonto}>\r\n Monto total a operar\r\n </th>\r\n <th className={`${style.tableH} ${style.md} ${style.sm}`}>Moneda</th>\r\n {/* <th className={style.tableH}></th> */}\r\n <th className={style.tableH}></th>\r\n </tr>\r\n </thead>\r\n <tbody className={style.tableBody}>\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\r\n currency = orderInfo.OrderCurrencySymbol;\r\n if (orderInfo.OrderCurrencySymbol.trim() === \"PYG\") {\r\n currency = \"GS\";\r\n }\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 <AuthorizationRow\r\n authItem={authorizationItem}\r\n side={side}\r\n description={description}\r\n ammount={ammount}\r\n operationValue={operationValue}\r\n currency={currency}\r\n idx={idx}\r\n onAuthorize={onAuthorize}\r\n onReject={onReject}\r\n loading={loading}\r\n setLoading={setLoading}\r\n />\r\n );\r\n })}\r\n </tbody>\r\n </Table>\r\n </Row>\r\n )}\r\n </Container>\r\n </Col>\r\n </Row>\r\n <Row>\r\n <Warning text={texts.notes.authorizations_note} />\r\n </Row>\r\n </Fragment>\r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"headerTitle\":\"Grid_headerTitle_318ou\",\"isMobile\":\"Grid_isMobile_3vLWX\",\"isWeb\":\"Grid_isWeb_2M2xL\",\"container\":\"Grid_container_3WDxg\",\"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\",\"cardContainer\":\"Grid_cardContainer_gC6HM\",\"actionButtons\":\"Grid_actionButtons_2XO9r\"};","import React, { useState, useEffect } from \"react\";\r\nimport { CircularProgress } from \"../UI/CircularProgress/CircularProgress\";\r\nimport { Redirect } from \"react-router-dom\";\r\nimport { useQuery } from \"../../utils/hooks/useQuery\";\r\nimport { fetchOpenId } from \"../../services/api/accounts\";\r\nimport { showToast } from \"../../utils/helper\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { authSuccess } from \"../../actions/auth\";\r\n\r\nexport const Autologin = () => {\r\n const [loading, setLoading] = useState(true);\r\n const auth = useSelector((state) => state.auth);\r\n const { authenticated, error, loading: loadingAuth } = auth;\r\n const dispatch = useDispatch();\r\n let query = useQuery();\r\n const redirectionUrl = query.get(\"redirectionUrl\");\r\n\r\n useEffect(() => {\r\n setLoading(() => true);\r\n const querySession = query.get(\"session\");\r\n const context = JSON.parse(atob(querySession));\r\n\r\n sessionStorage.setItem(\"authenticated\", \"true\");\r\n sessionStorage.setItem(\"context\", JSON.stringify(context));\r\n dispatch(authSuccess());\r\n dispatch({ type: \"server/authenticate\", payload: { token: context.accessToken } });\r\n setLoading(() => false);\r\n }, []);\r\n\r\n if (authenticated === true) {\r\n return <Redirect to={redirectionUrl} />;\r\n }\r\n\r\n return loading ? (\r\n <CircularProgress style={{ height: \"150px\", width: \"150px\" }} />\r\n ) : (\r\n <div\r\n style={{\r\n display: \"flex\",\r\n flexDirection: \"column\",\r\n justifyContent: \"center\",\r\n alignItems: \"center\",\r\n height: \"100vh\",\r\n }}\r\n >\r\n <h1>El usuario no existe en el sistema</h1>\r\n </div>\r\n );\r\n};\r\n","import React, { useState, useEffect, Fragment } from \"react\";\r\nimport { useSelector } from \"react-redux\";\r\n\r\nimport { FormattedNumber } from \"../FormattedNumber/FormattedNumber\";\r\nimport { getSavedPersonInfo } from \"../../reducers/selectors\";\r\nimport { showToast } from \"../../utils/helper\";\r\nimport { getBankAccountBalance } from \"../../services/api/accounts\";\r\nimport { Icons } from \"../UI/Icon/Icon\";\r\nimport { CircularProgress } from \"../UI/CircularProgress/CircularProgress\";\r\n\r\nimport style from \"./BankAccountsSelector.scss\";\r\nimport { modes } from \"../Invest/FundsTable/FundsAssetTable/FundsAssetTable\";\r\n\r\nconst defaultFilters = {\r\n currencyISO: \"\",\r\n amount: 0,\r\n};\r\n\r\nexport const BankAccountsSelector = ({ bankAccounts, setAllBankAccountAreInvalid = () => {}, ...props }) => {\r\n const [validBankAccounts, setValidBankAccounts] = useState({});\r\n\r\n useEffect(() => {\r\n let allInvalid = true;\r\n if (props.filters.amount == 0) allInvalid = false;\r\n Object.values(validBankAccounts).forEach((key) => {\r\n if (key) allInvalid = false;\r\n });\r\n\r\n setAllBankAccountAreInvalid(allInvalid);\r\n }, [bankAccounts, validBankAccounts]);\r\n\r\n const setBankAccountIsValid = (PersonBankAccountNumber, valid) => {\r\n setValidBankAccounts((prev) => ({ ...prev, [PersonBankAccountNumber]: valid }));\r\n };\r\n\r\n return (\r\n <div className={style.wrapper}>\r\n {bankAccounts\r\n .filter((account) => account.PersonBankAccountStatus === \"Active\")\r\n .map((account, index) => (\r\n <BankAccountItem\r\n bankAccountItem={account}\r\n index={index}\r\n setBankAccountIsValid={setBankAccountIsValid}\r\n {...props}\r\n />\r\n ))}\r\n </div>\r\n );\r\n};\r\n\r\nconst BankAccountItem = ({\r\n bankAccountItem,\r\n selectedBankAccount,\r\n onSelectBankAccount = () => {},\r\n filters = defaultFilters,\r\n disabled = false,\r\n loading,\r\n index,\r\n setBankAccountIsValid = () => {},\r\n setAnyError = () => {},\r\n}) => {\r\n const [balance, setBalance] = useState(0);\r\n const [balanceResult, setBalanceResult] = useState(0);\r\n const [notEnoughFunds, setNotEnoughFunds] = useState(true);\r\n const [isCurrency, setIsCurrency] = useState(true);\r\n const [loadingBalance, setLoadingBalance] = useState(true);\r\n const personInfo = useSelector(getSavedPersonInfo);\r\n\r\n useEffect(() => {\r\n setNotEnoughFunds(\r\n () =>\r\n (filters.mode === modes.BUY && filters.amount && +filters.amount > +balance) ||\r\n (filters.mode === modes.BUY && balance == 0)\r\n );\r\n setIsCurrency(\r\n () => filters.currencyISO && bankAccountItem.PersonBankAccountCurrencyISO !== filters.currencyISO\r\n );\r\n }, [filters, balance, bankAccountItem]);\r\n\r\n useEffect(() => {\r\n setBankAccountIsValid(bankAccountItem.PersonBankAccountNumber, !isCurrency && !notEnoughFunds);\r\n }, [bankAccountItem, isCurrency, notEnoughFunds]);\r\n\r\n useEffect(() => {\r\n if (bankAccountItem) getBankAccountBalanceAsync();\r\n }, [bankAccountItem]);\r\n\r\n const getBankAccountBalanceAsync = async () => {\r\n setLoadingBalance(() => true);\r\n\r\n try {\r\n const { response } = await getBankAccountBalance({\r\n bankAccountNumber: bankAccountItem.PersonBankAccountNumber,\r\n });\r\n if (response !== undefined) {\r\n setBalance(() => response.balance);\r\n setBalanceResult(() => response.result);\r\n if (response.result && response.result.Code !== 200) {\r\n setAnyError();\r\n }\r\n } else {\r\n setBalanceResult(() => ({\r\n Code: 400,\r\n }));\r\n setAnyError();\r\n }\r\n } catch (error) {\r\n setBalanceResult(() => ({\r\n Code: 400,\r\n }));\r\n console.error(error);\r\n setAnyError();\r\n }\r\n\r\n setLoadingBalance(() => false);\r\n };\r\n\r\n return (\r\n <div\r\n className={`${style.bankAccountItem} ${\r\n selectedBankAccount &&\r\n selectedBankAccount.PersonBankAccountNumber === bankAccountItem.PersonBankAccountNumber\r\n ? style.active\r\n : \"\"\r\n } ${notEnoughFunds || isCurrency || disabled ? style.disabled : null}`}\r\n key={index}\r\n onClick={() => {\r\n if (!loading && !isCurrency && !disabled && !notEnoughFunds) onSelectBankAccount(bankAccountItem);\r\n }}\r\n >\r\n <div className={style.row}>\r\n <div>{`${personInfo.PhysicalPersonFirstName} ${personInfo.PhysicalPersonSecondName} ${personInfo.PhysicalPersonFirstLastName} ${personInfo.PhysicalPersonSecondLastName}`}</div>\r\n <span>\r\n {selectedBankAccount ? (\r\n selectedBankAccount.PersonBankAccountNumber === bankAccountItem.PersonBankAccountNumber ? (\r\n <Icons.RadioCheckedBlackIcon size=\"sm\" />\r\n ) : (\r\n <Icons.RadioUncheckedBlackIcon size=\"sm\" />\r\n )\r\n ) : (\r\n <Icons.RadioUncheckedBlackIcon size=\"sm\" />\r\n )}\r\n </span>\r\n </div>\r\n <hr />\r\n <span\r\n className={`${style.row} ${style.balance} ${\r\n notEnoughFunds || isCurrency || disabled ? style.disabled : \"\"\r\n }`}\r\n >\r\n <p> Nº cuenta: {bankAccountItem.PersonBankAccountNumber}</p>\r\n <p>\r\n <span className={style.balanceLoader}>\r\n {`Saldo: `}\r\n {loadingBalance ? (\r\n <CircularProgress sm />\r\n ) : (\r\n <Fragment>\r\n {balanceResult && balanceResult.Code !== 200 ? (\r\n <span className={style.balanceLoader} style={{ color: \"red\" }}>\r\n No disponible\r\n </span>\r\n ) : (\r\n <Fragment>\r\n <FormattedNumber\r\n value={balance}\r\n minimumFractionDigits={bankAccountItem.PersonBankAccountCurrencyISO == \"USD\" ? 2 : 0}\r\n maximumFractionDigits={bankAccountItem.PersonBankAccountCurrencyISO == \"USD\" ? 2 : 0}\r\n />\r\n </Fragment>\r\n )}\r\n {` ${bankAccountItem.PersonBankAccountCurrencyISO}`}\r\n </Fragment>\r\n )}\r\n </span>\r\n </p>\r\n </span>\r\n </div>\r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"wrapper\":\"BankAccountsSelector_wrapper__J3Fa\",\"bankAccountItem\":\"BankAccountsSelector_bankAccountItem_3MnaQ\",\"active\":\"BankAccountsSelector_active_364Cr\",\"row\":\"BankAccountsSelector_row_29ASl\",\"balance\":\"BankAccountsSelector_balance_3K8Ox\",\"disabled\":\"BankAccountsSelector_disabled_2WI5b\",\"balanceLoader\":\"BankAccountsSelector_balanceLoader_3FpEB\"};","import React, { useState } from \"react\";\r\nimport { Table } from \"reactstrap\";\r\nimport style from \"./DocumentTable.scss\";\r\nimport downloadSvg from \"../../../public/svg/download-svgrepo-com.svg\";\r\nimport pdfSvg from \"../../../public/svg/pdf.svg\";\r\n\r\nexport const DocumentTable = ({ docType, date, download, pdf }) => {\r\n return (\r\n <Table className={style.table}>\r\n <tbody className={style.tbody}>\r\n <tr>\r\n <td>{docType}</td>\r\n <td>{date}</td>\r\n <td>{pdf ? <img src={pdfSvg} className={style.icon} alt=\"pdf\"/> : null}</td>\r\n <td>{download ? <img src={downloadSvg} className={style.icon} alt=\"download\"/> : null}</td>\r\n </tr>\r\n </tbody>\r\n </Table>\r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"table\":\"DocumentTable_table_2IuEY\",\"tbody\":\"DocumentTable_tbody_A4AMt\",\"icon\":\"DocumentTable_icon_cigJf\"};","import React from \"react\";\r\n\r\nconst decimalSeparator = window.___APP_CONFIG___.DECIMAL_SEPARATOR == \",\" ? \",\" : \".\";\r\nconst thousandSeparator = window.___APP_CONFIG___.DECIMAL_SEPARATOR == \",\" ? \".\" : \",\";\r\n\r\n//PRE: Receives a float/int value and two int min and max values\r\n//POS: Returns value with specific decimal and thousands separators and min and max decimal numbers.\r\nexport const formattedNumber = (value, minimumFractionDigits, maximumFractionDigits) => {\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 //Here we change the decimals.\r\n if (res.includes(\".\")) {\r\n let resDec = res.split(\".\")[1];\r\n\r\n //Decimal numbers must be between the min and the max\r\n if (minimumFractionDigits != undefined && maximumFractionDigits != undefined) {\r\n if (minimumFractionDigits === maximumFractionDigits) {\r\n if (minimumFractionDigits === 0 && maximumFractionDigits === 0) {\r\n res = Math.round(res) + \"\";\r\n } else {\r\n res = parseFloat(res).toFixed(minimumFractionDigits) + \"\";\r\n }\r\n } else if (resDec.length < minimumFractionDigits) {\r\n res = parseFloat(res).toFixed(minimumFractionDigits) + \"\";\r\n } else if (resDec.length > maximumFractionDigits) {\r\n res = parseFloat(res).toFixed(maximumFractionDigits) + \"\";\r\n }\r\n } //Decimal numbers must be at least as long as the min, with no limit.\r\n else if (minimumFractionDigits && !maximumFractionDigits) {\r\n if (resDec.length < minimumFractionDigits) {\r\n res = parseFloat(res).toFixed(minimumFractionDigits) + \"\";\r\n }\r\n } //Value can have zero fraction digits, but it has a max\r\n else if (!minimumFractionDigits && maximumFractionDigits) {\r\n if (resDec.length > maximumFractionDigits) {\r\n res = parseFloat(res).toFixed(maximumFractionDigits) + \"\";\r\n }\r\n }\r\n //If there's no min and max value stays as it is.\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 (isNegative && parseFloat(res) != 0) res = \"-\" + res;\r\n return res;\r\n};\r\n\r\n//PRE: Receives a float/int value and two int min and max values\r\n//POS: Returns value with specific decimal and thousands separators and min and max decimal numbers.\r\nexport const FormattedNumber = ({ value, minimumFractionDigits, maximumFractionDigits }) => {\r\n let isNegative = false;\r\n let res = \"\" + value;\r\n res = res.trim();\r\n if (value === null || value === undefined || value === \"\" || isNaN(res)) return <span>-</span>;\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 //Here we change the decimals.\r\n if (res.includes(\".\")) {\r\n let resDec = res.split(\".\")[1];\r\n\r\n //Decimal numbers must be between the min and the max\r\n if (minimumFractionDigits != undefined && maximumFractionDigits != undefined) {\r\n if (minimumFractionDigits === maximumFractionDigits) {\r\n if (minimumFractionDigits === 0 && maximumFractionDigits === 0) {\r\n res = Math.round(res) + \"\";\r\n } else {\r\n res = parseFloat(res).toFixed(minimumFractionDigits) + \"\";\r\n }\r\n } else if (resDec.length < minimumFractionDigits) {\r\n res = parseFloat(res).toFixed(minimumFractionDigits) + \"\";\r\n } else if (resDec.length > maximumFractionDigits) {\r\n res = parseFloat(res).toFixed(maximumFractionDigits) + \"\";\r\n }\r\n } //Decimal numbers must be at least as long as the min, with no limit.\r\n else if (minimumFractionDigits && !maximumFractionDigits) {\r\n if (resDec.length < minimumFractionDigits) {\r\n res = parseFloat(res).toFixed(minimumFractionDigits) + \"\";\r\n }\r\n } //Value can have zero fraction digits, but it has a max\r\n else if (!minimumFractionDigits && maximumFractionDigits) {\r\n if (resDec.length > maximumFractionDigits) {\r\n res = parseFloat(res).toFixed(maximumFractionDigits) + \"\";\r\n }\r\n }\r\n //If there's no min and max value stays as it is.\r\n } else {\r\n res = parseFloat(res).toFixed(minimumFractionDigits) + \"\";\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 if (thousandSeparator === \".\") {\r\n res = res.split(\"\")[0] + thousandSeparator + res.substr(1, res.length);\r\n } else {\r\n res = res.split(\"\")[0] + thousandSeparator + res.substr(1, res.length);\r\n }\r\n }\r\n\r\n if (isNegative && parseFloat(res) != 0) res = \"-\" + res;\r\n return <span>{res}</span>;\r\n};\r\n","import React, { useEffect, useState, Fragment } from \"react\";\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\nimport { Safearea } from \"../UI/Safearea/Safearea\";\r\nimport { Row, Col } from \"../UI/Customstrap/Customstrap\";\r\nimport { Container } from \"../UI/Container/Container\";\r\nimport { Table } from \"reactstrap\";\r\nimport data from \"../../../ver.json\";\r\nimport { fetchCorexBuildVersion, fetchApiBuildVersion } from \"../../services/api/entities\";\r\nimport { getSession, getCurrentAccount, getTexts } from \"../../reducers/selectors\";\r\nimport calendar from \"../../../public/svg/calendar.svg\";\r\nimport advisorIcon from \"../../../public/svg/advisor.svg\"\r\nimport { Icons } from \"../UI/Icon/Icon\";\r\n\r\nimport style from \"./Help.scss\";\r\n\r\nexport const Help = ({toggleHelp}) => {\r\n const currentAccount = useSelector(getCurrentAccount);\r\n const texts = useSelector(getTexts);\r\n const [corexVersion, setCorexVersion] = useState();\r\n const [apiVersion, setApiVersion] = useState();\r\n\r\n useEffect(() => {\r\n fetchCorexBuildVersion()\r\n .then((res) => {\r\n setCorexVersion(res.response.currentBuildVersion);\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n });\r\n fetchApiBuildVersion()\r\n .then((res) => {\r\n setApiVersion(res.response.version);\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n });\r\n }, []);\r\n\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 <div className={style.subAssetClassDisplay}>\r\n <Row>\r\n <Col xs={12} className={style.titleWrapper}>\r\n <span className={style.iconWrapper} onClick={toggleHelp}>\r\n <Icons.ArrowLeftIcon className={style.icon}/>\r\n </span>\r\n <span className={style.title}>Ayuda</span>\r\n </Col>\r\n <hr />\r\n </Row>\r\n <Row>\r\n <Col>\r\n <Container className={style.boxInfo}>\r\n <div className={style.titleInfo}>Informaciones y consultas generales: </div>\r\n <div className={style.boxTable}>\r\n <Table className={style.table}>\r\n <tbody>\r\n <tr>\r\n <td>\r\n <p>Teléfono: </p>\r\n <p className={style.tdInfo}>{currentAccount.companyPhone}</p>\r\n </td>\r\n <td>\r\n <p>Correo: </p>\r\n <p className={style.tdInfo}>{currentAccount.companyEmail}</p>\r\n </td>\r\n <td>\r\n <p>Ubicación: </p>\r\n <p className={style.tdInfo}>{currentAccount.companyLocation}</p>\r\n </td>\r\n <td>\r\n <p>Horario: </p>\r\n <p className={style.tdInfo}>{currentAccount.companyOpeningHours}</p>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </Table>\r\n </div>\r\n </Container>\r\n </Col>\r\n </Row>\r\n <Row>\r\n <Col>\r\n <Container className={style.boxAdvisor}>\r\n <div className={style.advisor}>\r\n <img src={advisorIcon}/>\r\n <p>Mi asesor</p>\r\n </div>\r\n <div className={style.wrapperTableAdvisor}>\r\n <Table className={style.tableAdvisor}>\r\n <tbody>\r\n <tr>\r\n <td>\r\n <p>Nombre: </p>\r\n <p className={style.tdInfo}>{`${currentAccount.advisorName} ${currentAccount.advisorFirstLastName}`}</p>\r\n </td>\r\n <td>\r\n <p>Teléfono: </p>\r\n <p className={style.tdInfo}>{currentAccount.advisorPhone}</p>\r\n </td>\r\n <td>\r\n <p>Correo: </p>\r\n <p className={style.tdInfo}>{currentAccount.advisorEmail}</p>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </Table>\r\n </div>\r\n </Container>\r\n </Col>\r\n </Row>\r\n </div>\r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"subAssetClassDisplay\":\"Help_subAssetClassDisplay_Gby3L\",\"titleWrapper\":\"Help_titleWrapper_zyCmR\",\"title\":\"Help_title_365r3\",\"iconWrapper\":\"Help_iconWrapper_sEqmf\",\"icon\":\"Help_icon_3pyZ9\",\"boxInfo\":\"Help_boxInfo_F9_vS\",\"titleInfo\":\"Help_titleInfo_mRPT6\",\"boxTable\":\"Help_boxTable_3D5c6\",\"table\":\"Help_table_3zNug\",\"tdInfo\":\"Help_tdInfo_1Q8id\",\"boxAdvisor\":\"Help_boxAdvisor_2mSII\",\"advisor\":\"Help_advisor_1etAb\",\"wrapperTableAdvisor\":\"Help_wrapperTableAdvisor_2rsUB\",\"tableAdvisor\":\"Help_tableAdvisor_2Z3c6\",\"versions\":\"Help_versions_BXvEv\"};","import React, { useState } from \"react\";\r\nimport {\r\n Button,\r\n Modal,\r\n ModalHeader,\r\n ModalBody,\r\n ModalFooter,\r\n Input,\r\n Label,\r\n Form,\r\n FormGroup,\r\n Container,\r\n Row,\r\n Col,\r\n} from \"reactstrap\";\r\nimport PropTypes from \"prop-types\";\r\nimport style from \"./HistoryModal.scss\";\r\n\r\nfunction HistoryModal({ fromDate, changeDateHandler, toDate, displayDate, onSearch, modal, setModal }) {\r\n const [backdrop, setBackdrop] = useState(true);\r\n const [keyboard, setKeyboard] = useState(true);\r\n\r\n const toggle = () => setModal(!modal);\r\n\r\n const changeBackdrop = (e) => {\r\n let { value } = e.target;\r\n if (value !== \"static\") {\r\n value = JSON.parse(value);\r\n }\r\n setBackdrop(value);\r\n };\r\n\r\n const changeKeyboard = (e) => {\r\n setKeyboard(e.currentTarget.checked);\r\n };\r\n\r\n return (\r\n <div>\r\n <Modal className={style.modalContainer} isOpen={modal} toggle={toggle} backdrop={backdrop} keyboard={keyboard}>\r\n <ModalHeader className={style.modalHeader} toggle={toggle}>Seleccionar fechas</ModalHeader>\r\n <ModalBody className={style.modalBody}>\r\n {displayDate && (\r\n <span className={style.dateContainer}>\r\n <p>Rango de fechas máximo de 3 meses</p>\r\n <span>\r\n <Container fluid>\r\n <Row>\r\n <Col sm=\"12\" md=\"5\" lg=\"5\" xl=\"5\">\r\n <Input\r\n type=\"date\"\r\n name=\"fromDate\"\r\n id=\"fromDate\"\r\n value={fromDate}\r\n onChange={changeDateHandler}\r\n />\r\n </Col>\r\n <Col sm=\"12\" md=\"5\" lg=\"5\" xl=\"5\">\r\n <Input\r\n type=\"date\"\r\n name=\"toDate\"\r\n id=\"toDate\"\r\n value={toDate}\r\n onChange={changeDateHandler}\r\n />\r\n </Col>\r\n </Row>\r\n </Container>\r\n </span>\r\n </span>\r\n )}\r\n </ModalBody>\r\n <ModalFooter className={style.modalFooter}>\r\n <Button className={style.modalButtonSearch} onClick={onSearch}>\r\n Buscar\r\n </Button>{\" \"}\r\n <Button className={style.modalButtonCancel} onClick={toggle}>\r\n Cancelar\r\n </Button>\r\n </ModalFooter>\r\n </Modal>\r\n </div>\r\n );\r\n}\r\n\r\nexport default HistoryModal;\r\n","import React from \"react\";\r\nimport ReactECharts from \"echarts-for-react\";\r\n\r\nconst HistoryChart = ({ xData, yData }) => {\r\n const options = {\r\n grid: { top: 8, right: 8, bottom: 24, left: 36, width: \"100%\" },\r\n xAxis: {\r\n type: \"category\",\r\n data: xData,\r\n splitArea: {\r\n show: false,\r\n },\r\n },\r\n yAxis: {\r\n type: \"value\",\r\n axisLabel: {\r\n formatter: function (value, index) {\r\n if (value.toString().length > 6) {\r\n return parseFloat((value / 1e6).toFixed(2)) + \" M\";\r\n } else return value;\r\n },\r\n },\r\n },\r\n series: [\r\n {\r\n data: yData,\r\n type: \"line\",\r\n smooth: false,\r\n lineStyle: { color: \"#000\", width: 5, type: \"solid\" },\r\n },\r\n ],\r\n tooltip: {\r\n trigger: \"axis\",\r\n },\r\n };\r\n\r\n return <ReactECharts option={options} />;\r\n};\r\n\r\nexport default HistoryChart;\r\n","import React, { Fragment, useState, useEffect } from \"react\";\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 Label,\r\n Container,\r\n} from \"reactstrap\";\r\nimport GenericButton from \"../UI/Button/Button\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { TitleLabel } from \"../UI/TitleLabel/TitleLabel\";\r\n\r\nimport {\r\n fetchGetPortfolioNoLogs,\r\n fetchGetActivity,\r\n fetchGetActivityProduct,\r\n fetchProductActivityPDF,\r\n getPortfolioXLS,\r\n} from \"../../services/api/accounts\";\r\n\r\nimport { RadioButton, RadioButtonGroup } from \"../UI/RadioButton/RadioButton\";\r\nimport HistoryTable from \"./HistoryTable\";\r\nimport { getHistoryXLS, getHistoryCSV } from \"../../services/api/accounts\";\r\nimport { getCurrentAccount, getTexts } from \"../../reducers/selectors\";\r\nimport { showToast } from \"../../utils/helper\";\r\nimport { FormattedNumber } from \"../FormattedNumber/FormattedNumber\";\r\nimport moment from \"moment\";\r\nimport HistoryChart from \"./HistoryChart\";\r\nimport { toPascalCase } from \"../../utils/helper\";\r\nimport { Warning } from \"../Warning/Warning\";\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\nimport arrow from \"../../../public/svg/keyboard_arrow_down.svg\";\r\n\r\nimport style from \"./HistoryForm.scss\";\r\nimport HistoryModal from \"./HistorModal\";\r\nimport { CircularProgress } from \"../UI/CircularProgress/CircularProgress\";\r\n\r\nexport const HistoryForm = () => {\r\n const [loadingPosition, setLoadingPosition] = useState(true);\r\n const [portfolioNoLogs, setPortfolioNoLogs] = useState([]);\r\n const [activity, setActivity] = useState();\r\n const [modal, setModal] = useState(false);\r\n\r\n const currentAccount = useSelector(getCurrentAccount);\r\n const texts = useSelector(getTexts);\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: \"\", ISO: \"\" });\r\n\r\n const [displayDate, setDisplayDate] = useState(false);\r\n const [tableFilter, setTableFilter] = useState();\r\n const [chartData, setChartData] = useState({ xData: [], yData: [] });\r\n\r\n const [currentFilter, setCurrentFilter] = useState(\"30\");\r\n const [saldo, setSaldo] = useState({ saldoInicial: \"\", saldoFinal: \"\", difSigno: \"\", diferencia: \"\" });\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 ISO: moneda.currencyISO,\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 ISO: \"\",\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 (activity) {\r\n setChartData({ yData: [], xData: [] });\r\n const saldoInicialEncontrado = activity.find((item) => item.concepto === \"Saldo Inicial\").saldo_total;\r\n\r\n const saldoFinalEncontrado = activity.find((item) => item.concepto === \"Saldo Final\").saldo_total;\r\n const diferencia = saldoInicialEncontrado\r\n ? ((saldoFinalEncontrado - saldoInicialEncontrado) * 100) / saldoInicialEncontrado\r\n : saldoFinalEncontrado * 100;\r\n\r\n setSaldo({\r\n ...saldo,\r\n saldoInicial: saldoInicialEncontrado || 0,\r\n saldoFinal: saldoFinalEncontrado || 0,\r\n diferencia: diferencia || 0,\r\n difSigno: diferencia < 0 ? \"-\" : \"+\",\r\n });\r\n const fechasExtraidas = activity.map((item) => item.fecha);\r\n const saldosExtraidos = activity.map((item) => item.acumulado);\r\n setChartData({ yData: saldosExtraidos, xData: fechasExtraidas });\r\n }\r\n }, [activity]);\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 \"30\":\r\n setDisplayDate(false);\r\n newFilter.desde = moment().subtract(30, \"days\").valueOf();\r\n break;\r\n case \"7\":\r\n setDisplayDate(false);\r\n newFilter.desde = moment().subtract(7, \"days\").valueOf();\r\n break;\r\n case \"24\":\r\n setDisplayDate(false);\r\n newFilter.desde = moment().subtract(24, \"hours\").valueOf();\r\n break;\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 updateActivity = () => {\r\n if (currentAccount.AccountNumber && currencyFilter.id !== 0) {\r\n // controlar que sea máximo 3 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 <= -3) 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 let actividad = {\r\n nombre: \"\",\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 acumulado: parseFloat(response.activity[0].balance),\r\n totales: [],\r\n };\r\n response.activity[0].acumulado = actividad.acumulado;\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 acumulado:\r\n parseFloat(response.activity[index - 1].acumulado) +\r\n (parseFloat(it.credit) - parseFloat(it.debit)),\r\n activityId: it.activityId,\r\n journalEntryId: it.journalEntryId,\r\n totales: [\r\n {\r\n detalle: \"Balance\",\r\n valor: parseFloat(it.credit) - parseFloat(it.debit),\r\n },\r\n ],\r\n currencyISO: it.CurrencyISO,\r\n };\r\n newActivity.push(actividad);\r\n it.acumulado = actividad.acumulado;\r\n }\r\n finalBalance += parseFloat(it.credit) - parseFloat(it.debit);\r\n });\r\n actividad = {\r\n nombre: \"\",\r\n concepto: \"Saldo Final\",\r\n fecha: moment(tableFilter.hasta).format(\"DD-MM-YY\"),\r\n saldo_total: finalBalance,\r\n acumulado: 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 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 <Row>\r\n <Col>\r\n <span>No hay cuentas asociadas</span>\r\n </Col>\r\n </Row>\r\n );\r\n\r\n return (\r\n <Row>\r\n <Row className={style.headerTitle}>\r\n <Label>Histórico</Label>\r\n </Row>\r\n <Row className={style.rowContainer} style={{ margin: \"12px\", width: \"100%\" }}>\r\n <Col style={{ width: \"100%\" }}>\r\n <Container className={style.history}>\r\n <Row style={{ width: \"100%\" }}>\r\n <Col>\r\n <TitleLabel className={style.TitleLabel} label=\"Selecciona el tipo de activo\" />\r\n </Col>\r\n <Col className={style.colEnd}>\r\n <Dropdown isOpen={userDropdownIsOpen} toggle={toggleUserDropdown} direction={\"down\"}>\r\n <DropdownToggle className={style.dropdownToggle}>\r\n <span>{currencyFilter.instrumento}</span>\r\n <img src={arrow} />\r\n </DropdownToggle>\r\n <DropdownMenu>\r\n {portfolioNoLogs.map((itemCuentas) => {\r\n return (\r\n <DropdownItem\r\n className={`${style.greyFont} ${style.activeItem}`}\r\n onClick={() => {\r\n setCurrency(itemCuentas);\r\n }}\r\n tag=\"span\"\r\n >\r\n {itemCuentas.instrumento}\r\n </DropdownItem>\r\n );\r\n })}\r\n </DropdownMenu>\r\n </Dropdown>\r\n </Col>\r\n </Row>\r\n </Container>\r\n </Col>\r\n </Row>\r\n <Row className={style.rowContainerSecond} style={{ width: \"100%\" }}>\r\n <Col style={{ width: \"100%\" }}>\r\n <Container className={style.history}>\r\n <Row style={{ width: \"100%\" }}>\r\n <Col className={style.radioBut}>\r\n <RadioButtonGroup>\r\n <RadioButton\r\n label=\"30 dias\"\r\n onClick={() => {\r\n toggleFilterType(\"30\");\r\n }}\r\n active={currentFilter === \"30\"}\r\n />\r\n <RadioButton\r\n label=\"7 dias\"\r\n onClick={() => {\r\n toggleFilterType(\"7\");\r\n }}\r\n active={currentFilter === \"7\"}\r\n />\r\n <RadioButton\r\n label=\"24 horas\"\r\n onClick={() => {\r\n toggleFilterType(\"24\");\r\n }}\r\n active={currentFilter === \"24\"}\r\n />\r\n </RadioButtonGroup>\r\n </Col>\r\n <div className={style.buttonContainer}>\r\n <Col\r\n className={style.calendarButton}\r\n active={currentFilter === \"date\"}\r\n onClick={() => {\r\n toggleFilterType(\"date\");\r\n setModal(!modal);\r\n setDisplayDate(true);\r\n }}\r\n >\r\n <img src=\"../../svg/ButtonIcons/calendar.svg\"></img>\r\n <div>\r\n <label className={style.selectDates}>Seleccionar fechas</label>\r\n </div>\r\n </Col>\r\n <HistoryModal\r\n fromDate={fromDate}\r\n changeDateHandler={changeDateHandler}\r\n toDate={toDate}\r\n displayDate={displayDate}\r\n onSearch={onSearch}\r\n modal={modal}\r\n setModal={setModal}\r\n />\r\n <Col className={style.exportButton}>\r\n <img src=\"../../svg/ButtonIcons/export.svg\" onClick={handleXLS}></img>\r\n </Col>\r\n </div>\r\n </Row>\r\n\r\n <Row style={{ width: \"100%\" }}>\r\n <Col className={style.charContainer}>\r\n {chartData.yData.length === 0 ? (\r\n <CircularProgress />\r\n ) : (\r\n <HistoryChart yData={chartData.yData} xData={chartData.xData} />\r\n )}\r\n </Col>\r\n <Col\r\n style={{\r\n width: \"fit-content\",\r\n maxWidth: \"fit-content\",\r\n margin: \" 50px 100px 30px 44px\",\r\n }}\r\n className={style.resumeInfo}\r\n >\r\n <BalanceContainer\r\n title={\"Saldo inicial\"}\r\n price={saldo.saldoInicial}\r\n decimals={currencyFilter.ISO === \"PYG\" ? 0 : 2}\r\n />\r\n <BalanceContainer\r\n title={\"Saldo final\"}\r\n price={saldo.saldoFinal}\r\n decimals={currencyFilter.ISO === \"PYG\" ? 0 : 2}\r\n />\r\n <BalanceContainerDiference\r\n title={\"Diferencia\"}\r\n //price={saldo.difSigno + parseFloat(saldo.diferencia).toFixed(2) + \"%\"}\r\n price={parseFloat((100 * (saldo.saldoFinal - saldo.saldoInicial)) / saldo.saldoFinal)}\r\n />\r\n </Col>\r\n </Row>\r\n <Row style={{ width: \"100%\", margin: \"0px\" }}>\r\n <Col>\r\n <div className={style.tableTitle}>Últimos movimientos</div>\r\n <HistoryTable\r\n activity={activity}\r\n toPascalCase={toPascalCase}\r\n getActivityPDF={getActivityPDF}\r\n pdf={pdf}\r\n currencyFilter={currencyFilter}\r\n ></HistoryTable>\r\n </Col>\r\n </Row>\r\n </Container>\r\n </Col>\r\n </Row>\r\n </Row>\r\n );\r\n};\r\nconst BalanceContainer = ({ title, price, decimals = 2 }) => {\r\n return (\r\n <React.Fragment>\r\n <Row className={style.rowBalance}>\r\n <Col>\r\n <Label className={style.balanceTitle}>{title}</Label>\r\n </Col>\r\n <Col>\r\n <Label className={style.balancePrice}>\r\n <FormattedNumber\r\n value={price}\r\n minimumFractionDigits={decimals}\r\n maximumFractionDigits={decimals}\r\n />\r\n </Label>\r\n </Col>\r\n </Row>\r\n </React.Fragment>\r\n );\r\n};\r\n\r\nconst BalanceContainerDiference = ({ title, price }) => {\r\n return (\r\n <React.Fragment>\r\n <Row className={style.rowDiference}>\r\n <Col>\r\n <Label className={style.balanceTitle}>{title}</Label>\r\n </Col>\r\n <Col>\r\n <Label className={style.balancePrice}>\r\n <FormattedNumber value={price} minimumFractionDigits={2} maximumFractionDigits={2} />%\r\n </Label>\r\n </Col>\r\n </Row>\r\n </React.Fragment>\r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"headerTitle\":\"HistoryForm_headerTitle_2o3-E\",\"TitleLabel\":\"HistoryForm_TitleLabel_3IdQN\",\"charContainer\":\"HistoryForm_charContainer_1v3CL\",\"radioBut\":\"HistoryForm_radioBut_2P1ZK\",\"dropDownMenu\":\"HistoryForm_dropDownMenu_1s8nR\",\"colEnd\":\"HistoryForm_colEnd_1-WI8\",\"button\":\"HistoryForm_button_1IJW3\",\"balanceTitle\":\"HistoryForm_balanceTitle_207az\",\"balancePrice\":\"HistoryForm_balancePrice_33Q31\",\"calendarButton\":\"HistoryForm_calendarButton_36zAQ\",\"exportButton\":\"HistoryForm_exportButton_3Eruc\",\"history\":\"HistoryForm_history_1Ca-S\",\"rowContainer\":\"HistoryForm_rowContainer_3p_qe\",\"rowContainerSecond\":\"HistoryForm_rowContainerSecond_1eLuL\",\"tableTitle\":\"HistoryForm_tableTitle_1O8dG\",\"buttonContainer\":\"HistoryForm_buttonContainer_d1niZ\",\"resumeInfo\":\"HistoryForm_resumeInfo_UUstc\",\"rowBalance\":\"HistoryForm_rowBalance_kkSHr\",\"rowDiference\":\"HistoryForm_rowDiference_3Je4t\",\"selectDates\":\"HistoryForm_selectDates_4AsAn\",\"warning\":\"HistoryForm_warning_Cx_qO\",\"activeItem\":\"HistoryForm_activeItem_2ST9O\",\"wrapperCol\":\"HistoryForm_wrapperCol_oCgAA\",\"buttonRow\":\"HistoryForm_buttonRow_1U1k9\",\"leftContainer\":\"HistoryForm_leftContainer_hGz7T\",\"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\",\"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\",\"tableBody\":\"HistoryForm_tableBody_3rzJ-\",\"circularProgressRow\":\"HistoryForm_circularProgressRow_1e0B0\",\"pdfIcon\":\"HistoryForm_pdfIcon_7FZTe\",\"dateThirdRow\":\"HistoryForm_dateThirdRow_2YyX0\",\"sm\":\"HistoryForm_sm_3ZhNQ\",\"hideOnPrint\":\"HistoryForm_hideOnPrint_1ZEOI\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"modalContainer\":\"HistoryModal_modalContainer_CTaKk\",\"modalHeader\":\"HistoryModal_modalHeader_2WQHP\",\"modalFooter\":\"HistoryModal_modalFooter_23a3x\",\"modalBody\":\"HistoryModal_modalBody_1p-B_\",\"dateContainer\":\"HistoryModal_dateContainer_295Es\",\"modalButtonSearch\":\"HistoryModal_modalButtonSearch_3kuP9\",\"modalButtonCancel\":\"HistoryModal_modalButtonCancel_2Moeu\"};","import React, { Fragment } from \"react\";\r\nimport { Table } from \"reactstrap\";\r\nimport style from \"./HistoryTable.scss\";\r\nimport { FormattedNumber } from \"../FormattedNumber/FormattedNumber\";\r\n\r\nconst HistoryTable = ({ activity, currencyFilter, getActivityPDF, toPascalCase, pdf }) => {\r\n return (\r\n <div className={style.tableWrapper}>\r\n <Table responsive>\r\n <thead>\r\n <tr>\r\n <th>Fecha</th>\r\n <th>Tipo</th>\r\n <th>Descripción</th>\r\n <th>Monto operado</th>\r\n <th>Moneda</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <Fragment>\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 let minDecimal = 0;\r\n let maxDecimal = 8;\r\n if (currencyFilter.esEfectivo) {\r\n if (currencyFilter.ISO === \"USD\") {\r\n minDecimal = 2;\r\n maxDecimal = 2;\r\n } else {\r\n minDecimal = 0;\r\n maxDecimal = 0;\r\n }\r\n }\r\n\r\n return (\r\n <tr>\r\n <td>{activityItem.fecha}</td>\r\n <td>{toPascalCase(activityItem.concepto)}</td>\r\n <td>{activityItem.nombre === \"\" ? \"-\" : activityItem.nombre}</td>\r\n <td>\r\n <FormattedNumber\r\n value={activityItem.saldo_total}\r\n minimumFractionDigits={minDecimal}\r\n maximumFractionDigits={maxDecimal}\r\n />\r\n </td>\r\n <td>{activityItem.currencyISO}</td>\r\n <td>\r\n {!currencyFilter.esEfectivo &&\r\n ![\"Saldo Inicial\", \"Saldo Final\"].includes(activityItem.concepto) && (\r\n <img\r\n src={pdf}\r\n alt=\"PDF\"\r\n style={{ cursor: \"pointer\" }}\r\n onClick={() => getActivityPDF(activityItem)}\r\n />\r\n )}\r\n </td>\r\n </tr>\r\n );\r\n })}\r\n </Fragment>\r\n </tbody>\r\n </Table>\r\n </div>\r\n );\r\n};\r\nexport default HistoryTable;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"tableWrapper\":\"HistoryTable_tableWrapper_32sL4\"};","import React, { Fragment } from \"react\";\r\nimport { Label } from \"reactstrap\";\r\nimport { Safearea } from \"../UI/Safearea/Safearea\";\r\nimport { Row, Col } from \"../UI/Customstrap/Customstrap\";\r\nimport { Container } from \"../UI/Container/Container\";\r\nimport style from \"./InConstruction.scss\";\r\nimport { Header } from \"../Layout/Header/Header\";\r\n\r\nexport const InConstruction = () => {\r\n return (\r\n <Fragment>\r\n <Header title={\"Proximamente...\"}></Header>\r\n <Safearea>\r\n <Row className={style.headerTitle}>\r\n <Label>Proximamente...</Label>\r\n </Row>\r\n <Row>\r\n <Col>\r\n <Container>\r\n <div className={style.titleInfo}>Estamos trabajando en la construcción de esta funcionalidad.</div>\r\n </Container>\r\n </Col>\r\n </Row>\r\n </Safearea>\r\n </Fragment>\r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"headerTitle\":\"InConstruction_headerTitle_eCoKA\",\"titleInfo\":\"InConstruction_titleInfo_ywDWQ\"};","import React, { useState, useEffect } from \"react\";\r\nimport { Modal, Button, Input } from \"reactstrap\";\r\nimport { formattedNumber } from \"../../../FormattedNumber/FormattedNumber\";\r\nimport { NumberFormatInput } from \"bx-react-ui/src/components/NumberFormatInput/NumberFormatInput\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { CircularProgress } from \"bx-react-ui\";\r\nimport { Icons } from \"../../../UI/Icon/Icon\";\r\nimport { getSavedPersonInfo, getCurrentAccount } from \"../../../../reducers/selectors\";\r\nimport { showToast } from \"../../../../utils/helper\";\r\nimport { updateFund, getPrechecks } from \"../../../../services/api/inout\";\r\nimport style from \"./FundInvestModal.scss\";\r\nimport { modes } from \"../FundsAssetTable/FundsAssetTable\";\r\nimport { Container } from \"../../../UI/Container/Container\";\r\nimport { BankAccountsSelector } from \"../../../BankAccountsSelector/BankAccountsSelector\";\r\n\r\nexport const FundInvestModal = ({ toggle, fund, mode }) => {\r\n const [value, setValue] = useState(fund.minAmmount);\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 [activeAccount, setActiveAccount] = useState(null);\r\n const [errorMessage, setErrorMessage] = useState();\r\n const [bankAccounts, setBankAccounts] = useState([]);\r\n const [isFullLiquidation, setIsFullLiquidation] = useState(false);\r\n const [allBankAccountsAreInvalid, setAllBankAccountsAreInvalid] = useState(false);\r\n const [anyError, setAnyError] = useState(false);\r\n const [isScheduledRescue, setIsScheduledRescue] = useState(false);\r\n const tomorrowDate = new Date(new Date().setDate(new Date().getDate() + 1)).toISOString().slice(0, 10);\r\n const [processDate, setProcessDate] = useState(tomorrowDate);\r\n const [isProcessDateEligible, setIsProcessDateEligible] = useState(false);\r\n const personInfo = useSelector(getSavedPersonInfo);\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\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 useEffect(() => {\r\n if (personInfo.PersonBankAccount) {\r\n setBankAccounts(personInfo.PersonBankAccount);\r\n }\r\n }, [personInfo]);\r\n\r\n useEffect(() => {\r\n setIsProcessDateEligible(fund.isProcessDateEligible);\r\n }, [fund.isProcessDateEligible]);\r\n\r\n useEffect(() => {\r\n if (!fields.SettlementCurrency) {\r\n const defaultCurrency = fund.AssetInformation.SettlementCurrencies.find(\r\n (settlementCurrenciesItem) => settlementCurrenciesItem.SettlementCurrencyIsDefault\r\n );\r\n setFields((prevFields) => ({\r\n ...prevFields,\r\n SettlementCurrency: defaultCurrency.SettlementCurrencyISO,\r\n SettlementCurrencyId: defaultCurrency.SettlementCurrencyId,\r\n }));\r\n }\r\n });\r\n\r\n useEffect(() => {\r\n if (fields.Available === 0) {\r\n const available = fund.OfferQuantitytoClient - fund.OfferQuantityTakenByClient;\r\n setFields((prevFields) => ({\r\n ...prevFields,\r\n Available: available,\r\n }));\r\n }\r\n if (fields.AssetCouponRate === 0) {\r\n fund.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 }, [fund]);\r\n\r\n const handleCheckboxChange = (event) => {\r\n setIsScheduledRescue(event.target.checked);\r\n };\r\n\r\n const executePrechecks = async () => {\r\n try {\r\n const { response } = await getPrechecks({\r\n order: {\r\n OrderSide: mode === modes.BUY ? \"Buy\" : \"Sell\",\r\n OrderSettlementCurrencyId: fields.SettlementCurrencyId,\r\n CurrentAccount: {\r\n Precheck: {\r\n Total: +value,\r\n },\r\n HolderId: personInfo.PersonId,\r\n AccountId: currentAccount.id,\r\n },\r\n },\r\n });\r\n\r\n if (response.result.Code !== 200) {\r\n showToast(response.result.Description, true);\r\n return false;\r\n }\r\n return true;\r\n } catch (err) {\r\n console.error(err);\r\n showToast(\"Error comprobando la inversión\", true);\r\n return false;\r\n }\r\n };\r\n\r\n const validate = async () => {\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) {\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) {\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 if (!activeAccount) {\r\n showToast(\"Debe seleccionar una cuenta\", true);\r\n return false;\r\n }\r\n\r\n const prechecks = await executePrechecks();\r\n if (!prechecks) 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 if (result.Description == \"Error generating order. Process date must be after the current day.\") {\r\n showToast(\"La fecha debe ser un día hábil a partir de mañana\", true);\r\n } else {\r\n showToast(\r\n `Error enviando la solicitud de ${mode === modes.BUY ? \"suscripción\" : \"rescate\"}.`,\r\n true\r\n );\r\n }\r\n console.error(result.Description);\r\n } else {\r\n showToast(`Se envió la solicitud de ${mode === modes.BUY ? \"suscripción\" : \"rescate\"}.`);\r\n toggle();\r\n }\r\n })\r\n .catch((err) => {\r\n showToast(`Error enviando la solicitud de ${mode === modes.BUY ? \"suscripción\" : \"rescate\"}.`, true);\r\n console.error(err);\r\n })\r\n .finally(() => {\r\n setLoading(() => false);\r\n });\r\n };\r\n\r\n const onConfirm = async () => {\r\n setLoading(() => true);\r\n const validated = await validate();\r\n\r\n if (validated) {\r\n setLoading(() => true);\r\n\r\n confirmFund({\r\n fund: true,\r\n orderStatus: \"Parked\",\r\n accountId: currentAccount.id,\r\n bankAccountNumber: activeAccount.PersonBankAccountNumber,\r\n orderSide: mode === modes.BUY ? \"Buy\" : \"Sell\",\r\n assetId: fund.AssetInformation.AssetId,\r\n processDate: isScheduledRescue ? processDate : null,\r\n ammount: value,\r\n isFullLiquidation:\r\n isFullLiquidation || (value * 100) / parseFloat(fund.AssetInformation.availableBalance) > 98.0,\r\n });\r\n } else {\r\n setLoading(() => false);\r\n }\r\n };\r\n\r\n const handleChange = (event) => {\r\n setValue(getNumber(event));\r\n setActiveAccount(null);\r\n };\r\n\r\n const changeDateHandler = (event) => {\r\n event.target.id === \"processDate\" ? setProcessDate(event.target.value) : null;\r\n };\r\n\r\n const toggleFullLiquidation = () => {\r\n setIsFullLiquidation((prev) => !prev);\r\n };\r\n\r\n const setAllBankAccountAreInvalid = (allAreInvalid) => {\r\n setAllBankAccountsAreInvalid(() => (allAreInvalid ? true : false));\r\n };\r\n\r\n const handleSetAnyError = () => {\r\n setAnyError(() => true);\r\n };\r\n\r\n return (\r\n <Modal isOpen={open} className={style.modalWrapper}>\r\n <Container className={style.sellContainer}>\r\n <span className={style.closeIcon} onClick={toggle}>\r\n <Icons.Close />\r\n </span>\r\n <span className={style.sellAssetName}>{fund.AssetInformation.AssetName}</span>\r\n <span className={style.sellTitle}>{`¿Cuánto querés ${\r\n mode === modes.BUY ? \"suscribir\" : \"rescatar\"\r\n }?`}</span>\r\n <hr className={style.divider} />\r\n <span className={style.qtyLabel}>Monto</span>\r\n <NumberFormatInput\r\n type=\"text\"\r\n className={style.qtyInput}\r\n value={isFullLiquidation ? \"Rescate total\" : value}\r\n invalid={\r\n isFullLiquidation\r\n ? false\r\n : (mode === modes.BUY && value < +fund.minAmmount) ||\r\n (mode === modes.BUY && (+fund.maxAmmount === 0 ? false : value > 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}\r\n />\r\n {value < fund.minAmmount ? (\r\n <div className={style.invalidInput}>\r\n El monto mínimo es: {formattedNumber(fund.minAmmount, 0, 0)}\r\n </div>\r\n ) : null}\r\n {allBankAccountsAreInvalid && (\r\n <div className={style.invalidInput}>No hay cuentas válidas para esta inversion</div>\r\n )}\r\n {errorMessage ? <div className={style.invalidInput}>{errorMessage}</div> : null}\r\n {mode === modes.SELL && (\r\n <div className={style.fullLiquidationWrapper}>\r\n <span className={style.checkbox} onClick={toggleFullLiquidation}>\r\n <input type=\"checkbox\" checked={isFullLiquidation} onChange={() => null} />\r\n <span>Rescate total</span>\r\n </span>\r\n </div>\r\n )}\r\n {mode === modes.BUY || !isProcessDateEligible ? null : (\r\n <div className={style.fullLiquidationWrapper}>\r\n <span className={style.checkbox}>\r\n <input type=\"checkbox\" checked={isScheduledRescue} onChange={handleCheckboxChange} />\r\n <span>Programar rescate</span>\r\n </span>\r\n {isScheduledRescue && (\r\n <div>\r\n <Input\r\n type=\"date\"\r\n name=\"processDate\"\r\n id=\"processDate\"\r\n value={processDate}\r\n onChange={changeDateHandler}\r\n />\r\n </div>\r\n )}\r\n </div>\r\n )}\r\n <div className={style.bankAccounts}>\r\n <p className={style.title}>Elegí una cuenta para la acreditación</p>\r\n <BankAccountsSelector\r\n bankAccounts={bankAccounts}\r\n selectedBankAccount={activeAccount}\r\n onSelectBankAccount={setActiveAccount}\r\n setAllBankAccountAreInvalid={setAllBankAccountAreInvalid}\r\n filters={{\r\n currencyISO: fund.AssetInformation.CurrencyISO,\r\n amount: mode === modes.BUY ? +value : 0,\r\n mode,\r\n }}\r\n setAnyError={handleSetAnyError}\r\n />\r\n </div>\r\n {loading ? (\r\n <CircularProgress />\r\n ) : (\r\n <Button\r\n className={style.buttonSell}\r\n onClick={onConfirm}\r\n disabled={\r\n loading ||\r\n (!isFullLiquidation && !+value) ||\r\n (!isFullLiquidation && mode === modes.BUY && value < fund.minAmmount) ||\r\n (!isFullLiquidation &&\r\n mode === modes.BUY &&\r\n +fund.maxAmmount !== 0 &&\r\n value > fund.maxAmmount) ||\r\n (afterHoursModal.show && !afterHoursModal.accepted) ||\r\n !activeAccount\r\n }\r\n >\r\n {mode === modes.BUY ? \"Suscribir\" : \"Rescatar\"}\r\n </Button>\r\n )}\r\n </Container>\r\n </Modal>\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\",\"invalidInput\":\"FundInvestModal_invalidInput_3DpNw\",\"programmedResc\":\"FundInvestModal_programmedResc_hkCMK\",\"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\",\"bodyClassName\":\"FundInvestModal_bodyClassName_199oU\",\"toastClassName\":\"FundInvestModal_toastClassName_3A6se\",\"button\":\"FundInvestModal_button_AnFsw\",\"secondButton\":\"FundInvestModal_secondButton_2zdwT\",\"confirmButton\":\"FundInvestModal_confirmButton_2mJmM\",\"afterHoursWrapper\":\"FundInvestModal_afterHoursWrapper_3ey0U\",\"checkbox\":\"FundInvestModal_checkbox_CTe9z\",\"disabled\":\"FundInvestModal_disabled_sA5og\",\"disabledBtn\":\"FundInvestModal_disabledBtn_e1CEk\",\"description\":\"FundInvestModal_description_3h-Oh\",\"colFirstStep\":\"FundInvestModal_colFirstStep_q7wiF\",\"rowFirstStep\":\"FundInvestModal_rowFirstStep_3R5Fg\",\"colAccount\":\"FundInvestModal_colAccount_1_RGM\",\"ISINContainer\":\"FundInvestModal_ISINContainer_2c9j9\",\"buttonContainer\":\"FundInvestModal_buttonContainer_1Lh-r\",\"firstCol\":\"FundInvestModal_firstCol_11KTQ\",\"secondCol\":\"FundInvestModal_secondCol_1-ytZ\",\"propertyTitle\":\"FundInvestModal_propertyTitle_21Ulr\",\"summary\":\"FundInvestModal_summary__l1qG\",\"propertyContainer\":\"FundInvestModal_propertyContainer_2sBl8\",\"offerDetails\":\"FundInvestModal_offerDetails_1-PjC\",\"quantityCol\":\"FundInvestModal_quantityCol_3OOjc\",\"confirmBuy\":\"FundInvestModal_confirmBuy_10ns5\",\"buttonCol\":\"FundInvestModal_buttonCol_DbtNR\",\"totalAmountContainer\":\"FundInvestModal_totalAmountContainer_2Lmpj\",\"inputQuantity\":\"FundInvestModal_inputQuantity_1b6R0\",\"quantityContainer\":\"FundInvestModal_quantityContainer__af5O\",\"colSubAccount\":\"FundInvestModal_colSubAccount_2IhaU\",\"quantityAvailable\":\"FundInvestModal_quantityAvailable_TVsTN\",\"inputBox\":\"FundInvestModal_inputBox_2nchI\",\"personalAccount\":\"FundInvestModal_personalAccount_2pJIx\",\"personalAccountDisable\":\"FundInvestModal_personalAccountDisable_1QYze\",\"modalWrapper\":\"FundInvestModal_modalWrapper_3IND0\",\"sellContainer\":\"FundInvestModal_sellContainer_3j50m\",\"closeIcon\":\"FundInvestModal_closeIcon_1EvkP\",\"sellAssetName\":\"FundInvestModal_sellAssetName_1FWuL\",\"sellTitle\":\"FundInvestModal_sellTitle_eO7to\",\"divider\":\"FundInvestModal_divider_3ZMqg\",\"qtyLabel\":\"FundInvestModal_qtyLabel_2WSLZ\",\"qtyInput\":\"FundInvestModal_qtyInput_34NWy\",\"fullLiquidationWrapper\":\"FundInvestModal_fullLiquidationWrapper_-sWYi\",\"bankAccounts\":\"FundInvestModal_bankAccounts_10qid\",\"buttonSell\":\"FundInvestModal_buttonSell_McoAv\",\"disclaimer\":\"FundInvestModal_disclaimer_3hixZ\"};","import React, { useState, useEffect, Fragment } from \"react\";\r\nimport { Row, Col } from \"../../../UI/Customstrap/Customstrap\";\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 <Fragment>\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.FundAnnualVariation;\r\n item.AssetTargetPerformance = asset.TargetPerformance;\r\n }\r\n });\r\n });\r\n })[0];\r\n }\r\n\r\n fund.AssetInformation = item;\r\n }\r\n return (\r\n <div className={style.offerCard}>\r\n <Col xs={12} lg={4} className={style.offerInfo}>\r\n <span className={`${style.offerField} ${style.name}`}>{item.AssetName}</span>\r\n <span className={`${style.offerField} ${style.nominal}`}>\r\n <span className={style.label}>Saldo Actual: </span>\r\n <FormattedNumber\r\n value={item.availableBalance}\r\n minimumFractionDigits={item.CurrencyISO == \"USD\" ? 2 : 0}\r\n maximumFractionDigits={item.CurrencyISO == \"USD\" ? 2 : 0}\r\n />\r\n </span>\r\n <span className={style.offerField}>\r\n <span className={style.label}>Moneda: </span>\r\n {item.CurrencyISO}\r\n </span>\r\n {/* <span className={style.offerField}>\r\n <span className={style.label}>Rendimiento del año: </span>\r\n <FormattedNumber value={item.AssetXIRR} minimumFractionDigits={2} maximumFractionDigits={2} />\r\n </span> */}\r\n {item.AssetAnnualTargetPerformance && item.AssetAnnualTargetPerformance != 0 && (\r\n <span className={style.offerField}>\r\n <span className={style.label}>Rendimiento Objetivo Anual: </span>\r\n <FormattedNumber\r\n value={ item.AssetAnnualTargetPerformance }\r\n minimumFractionDigits={2}\r\n maximumFractionDigits={2}\r\n />\r\n <span className={style.label}> %</span>\r\n </span>\r\n )}\r\n </Col>\r\n <Col xs={12} lg={5} className={`${style.offerInfo} ${style.secondCol}`}></Col>\r\n <Col xs={12} lg={3} className={`${style.offerInfo} ${style.thirdCol}`}>\r\n <Button className={style.button} onClick={() => handleDeposit(fund)}>\r\n Suscribir\r\n </Button>\r\n\r\n <Button className={style.secondButton} onClick={() => handleWithdraw(fund)}>\r\n Rescatar\r\n </Button>\r\n </Col>\r\n </div>\r\n );\r\n })}\r\n {modal.open && (\r\n <FundInvestModal isOpen={modal.open} toggle={closeModal} fund={modal.fund} mode={modal.mode} />\r\n )}\r\n </Fragment>\r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"offerCard\":\"FundsAssetTable_offerCard_1VD6b\",\"offerInfo\":\"FundsAssetTable_offerInfo_o8SEc\",\"offerField\":\"FundsAssetTable_offerField_1i2XV\",\"currency\":\"FundsAssetTable_currency_2jGTA\",\"label\":\"FundsAssetTable_label_1d3o-\",\"name\":\"FundsAssetTable_name_UdfsV\",\"nominal\":\"FundsAssetTable_nominal_3q6D2\",\"thirdCol\":\"FundsAssetTable_thirdCol_hMeq3\",\"totalValueWrapper\":\"FundsAssetTable_totalValueWrapper_3ewlZ\",\"value\":\"FundsAssetTable_value_3g_9-\",\"button\":\"FundsAssetTable_button_1h6BI\",\"secondButton\":\"FundsAssetTable_secondButton_oKNEk\",\"secondCol\":\"FundsAssetTable_secondCol_Z2XIf\"};","import React, { Fragment, useState, useEffect } from \"react\";\r\nimport { Col, Row, Table, Button, Modal, ModalBody, ModalHeader, Label } from \"reactstrap\";\r\nimport { CircularProgress } from \"../UI/CircularProgress/CircularProgress\";\r\nimport { useLocation } from \"react-router-dom\";\r\nimport { useSelector } from \"react-redux\";\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 { fetchOffers, fetchFunds, updateFund } from \"../../services/api/inout\";\r\nimport { getEarnings, takeOffer } from \"../../services/api/inout\";\r\nimport { getSession, getCurrentAccount, getSavedPersonInfo, getTexts } from \"../../reducers/selectors\";\r\nimport { Container } from \"../UI/Container/Container\";\r\nimport { TitleLabel } from \"../UI/TitleLabel/TitleLabel\";\r\nimport { RadioButton, RadioButtonGroup } from \"../UI/RadioButton/RadioButton\";\r\nimport { Icons } from \"../../components/UI/Icon/Icon\";\r\nimport style from \"./Invest.scss\";\r\n\r\nconst allowedCurrencies = {\r\n ALL: \"ALL\",\r\n PYG: \"PYG\",\r\n USD: \"USD\",\r\n};\r\n\r\nexport const Invest = () => {\r\n const [modal, setModal] = useState(false);\r\n const [item, setItem] = useState();\r\n const [activeOffers, setActiveOffers] = useState({ activeOffers: [], activeFunds: [] });\r\n const [availableOffers, setAvailableOffers] = useState([]);\r\n\r\n const [loadingOffers, setLoadingOffers] = useState(true);\r\n const [loadingFunds, setLoadingFunds] = useState(true);\r\n\r\n const [funds, setFunds] = useState([]);\r\n const [offers, setOffers] = useState([]);\r\n\r\n const [filteredFunds, setFilteredFunds] = useState([]);\r\n const [filteredOffers, setFilteredOffers] = useState([]);\r\n\r\n const currentAccount = useSelector(getCurrentAccount);\r\n const [activeCurrency, setActiveCurrency] = useState(allowedCurrencies.ALL);\r\n\r\n const texts = useSelector(getTexts);\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 useEffect(() => {\r\n if (offers) {\r\n setFilteredOffers(() =>\r\n offers.filter((offer) =>\r\n activeCurrency === allowedCurrencies.ALL\r\n ? offer\r\n : offer.AssetInformation.CurrencyISO === activeCurrency\r\n )\r\n );\r\n }\r\n if (funds) {\r\n setFilteredFunds(() =>\r\n funds.filter((fund) =>\r\n activeCurrency === allowedCurrencies.ALL\r\n ? fund\r\n : fund.AssetInformation.CurrencyISO === activeCurrency\r\n )\r\n );\r\n }\r\n }, [activeCurrency, offers, funds]);\r\n\r\n const loadOffers = () => {\r\n if (currentAccount.id) {\r\n setLoadingOffers(() => true);\r\n setOffers(() => []);\r\n fetchOffers(currentAccount.id)\r\n .then(({ response }) => response)\r\n .then(({ result, SdtOffers }) => {\r\n if (result.Code === 400) {\r\n showToast(\"Hubo un error obteniendo ofertas de inversión\", true);\r\n } else {\r\n setOffers(() => SdtOffers.OffersItems);\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 setFunds(() => []);\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 setFunds(() => funds);\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 activeOffers.activeOffers.forEach((offer) => {\r\n offer.featured === true ? outstanding.push(offer) : available.push(offer);\r\n });\r\n setAvailableOffers(available);\r\n }, [activeOffers.activeOffers]);\r\n\r\n const toggle = (item) => {\r\n setModal((prev) => !prev);\r\n setItem(item);\r\n };\r\n\r\n const handleActiveCurrency = (name) => {\r\n setActiveCurrency(allowedCurrencies[name]);\r\n };\r\n\r\n const EmptyInvests = () => {\r\n return <div className={style.emptyMessage}>No hay inversiones disponibles.</div>;\r\n };\r\n\r\n return (\r\n <Fragment>\r\n <Row className={style.headerTitle}>\r\n <Label>Invertir</Label>\r\n </Row>\r\n <Row>\r\n <Col className={style.wrapperCol} lg=\"12\">\r\n <Fragment>\r\n <Container className={style.containerCurrency}>\r\n <Col>\r\n <TitleLabel className={style.TitleLabel} label=\"Inversiones disponibles\" />\r\n <TitleLabel className={style.TitleLabelMobile} label=\"Inversiones\" />\r\n </Col>\r\n <Col className={style.colRadioButton}>\r\n <RadioButtonGroup>\r\n <RadioButton\r\n label=\"Todos\"\r\n onClick={handleActiveCurrency}\r\n name={allowedCurrencies.ALL}\r\n active={activeCurrency === allowedCurrencies.ALL}\r\n />\r\n <RadioButton\r\n label=\"Guaraníes\"\r\n onClick={handleActiveCurrency}\r\n name={allowedCurrencies.PYG}\r\n active={activeCurrency === allowedCurrencies.PYG}\r\n />\r\n <RadioButton\r\n label=\"Dólares\"\r\n onClick={handleActiveCurrency}\r\n name={allowedCurrencies.USD}\r\n active={activeCurrency === allowedCurrencies.USD}\r\n />\r\n </RadioButtonGroup>\r\n </Col>\r\n </Container>\r\n {currentAccount.hasSEN || loadingOffers || loadingFunds ? null : (\r\n <div className={style.disclaimer} colSpan={7}>\r\n <div className=\"iconCol\">\r\n <Icons.InfoIcon size=\"md\" className={style.icon} />\r\n </div>\r\n <div className=\"textCol\">\r\n <p className={style.bold}>{texts.notes.sen_warning_bold}</p>\r\n <p className={style.text}>{texts.notes.sen_warning_text}</p>\r\n </div>\r\n </div>\r\n )}\r\n <Container className={style.container}>\r\n {loadingOffers || loadingFunds ? (\r\n <CircularProgress />\r\n ) : (\r\n <Fragment>\r\n {availableOffers.length > 0 || funds.length > 0 ? (\r\n <InvestTable offers={filteredOffers} funds={filteredFunds} toggle={toggle} />\r\n ) : (\r\n <EmptyInvests />\r\n )}\r\n </Fragment>\r\n )}\r\n </Container>\r\n </Fragment>\r\n {modal && <InvestModal modal={modal} toggle={toggle} item={item} />}\r\n </Col>\r\n </Row>\r\n </Fragment>\r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"wrapperCol\":\"Invest_wrapperCol_IiEPp\",\"container\":\"Invest_container_3JBcY\",\"containerCurrency\":\"Invest_containerCurrency_5gTQK\",\"headerTitle\":\"Invest_headerTitle_1vYEt\",\"TitleLabelMobile\":\"Invest_TitleLabelMobile_Xff2w\",\"TitleLabel\":\"Invest_TitleLabel_1nGHY\",\"colRadioButton\":\"Invest_colRadioButton_3rofg\",\"emptyMessage\":\"Invest_emptyMessage_jmQSk\",\"disclaimer\":\"Invest_disclaimer_1o-_1\",\"bold\":\"Invest_bold_1OXFf\",\"iconCol\":\"Invest_iconCol_2YIEf\",\"textCol\":\"Invest_textCol_3el0I\",\"icon\":\"Invest_icon_PJuIN\",\"text\":\"Invest_text_1EMq7\",\"redirectionModalBody\":\"Invest_redirectionModalBody_2NYyd\"};","import React, { Fragment } from \"react\";\r\nimport { Row, Col } from \"../../../UI/Customstrap/Customstrap\";\r\nimport { Container } from \"../../../UI/Container/Container\";\r\nimport { Table, Button } from \"reactstrap\";\r\nimport moment from \"moment\";\r\nimport { FormattedNumber } from \"../../../FormattedNumber/FormattedNumber\";\r\n\r\nimport style from \"./InvestAssetClassTable.scss\";\r\n\r\nexport const InvestAssetClassTable = ({ offers, toggle }) => {\r\n return (\r\n <Fragment>\r\n {offers.map((offer, index) => {\r\n const available = offer.OfferQuantitytoClient - offer.OfferQuantityTakenByClient;\r\n return (\r\n <div className={style.offerCard}>\r\n <Col xs={12} lg={4} className={style.offerInfo}>\r\n <span className={`${style.offerField} ${style.name}`}>{offer.AssetName}</span>\r\n <span className={`${style.offerField} ${style.nominal}`}>\r\n <span className={style.label}>Rendimiento: </span>\r\n <FormattedNumber\r\n value={offer.NominalRate}\r\n minimumFractionDigits={2}\r\n maximumFractionDigits={2}\r\n />\r\n <span>%</span>\r\n </span>\r\n <span className={style.offerField}>\r\n <span className={style.label}>Cantidad disponible: </span>\r\n <FormattedNumber\r\n value={available}\r\n minimumFractionDigits={offer.AssetInformation.CurrencyISO == \"USD\" ? 2 : 0}\r\n maximumFractionDigits={offer.AssetInformation.CurrencyISO == \"USD\" ? 2 : 0}\r\n />\r\n </span>\r\n <span className={style.offerField}>\r\n <span className={style.label}>ISIN: </span>\r\n <span>\r\n {offer.AssetInformation.AssetDefaultIdentifierValue\r\n ? offer.AssetInformation.AssetDefaultIdentifierValue\r\n : \"-\"}\r\n </span>\r\n </span>\r\n </Col>\r\n <Col xs={12} lg={5} className={`${style.offerInfo} ${style.secondCol}`}>\r\n <span className={style.offerField}>\r\n <span className={style.label}>Calificación de riesgo: </span>\r\n {offer.AssetInformation.AssetRiskTypeDesc}\r\n </span>\r\n <span className={style.offerField}>\r\n <span className={style.label}>Tipo: </span>\r\n {offer.AssetInformation.SubAssetClassInfo.SubAssetClassName}\r\n </span>\r\n <span className={style.offerField}>\r\n <span className={style.label}>Vencimiento: </span>\r\n {offer.AssetInformation.AssetMaturityDate === \"0000-00-00\"\r\n ? \"-\"\r\n : moment(offer.AssetInformation.AssetMaturityDate).format(\"DD/MM/YYYY\")}\r\n </span>\r\n <span className={style.offerField}>\r\n <span className={style.label}>Moneda: </span>\r\n {offer.AssetInformation.CurrencyISO}\r\n </span>\r\n </Col>\r\n <Col xs={12} lg={3} className={`${style.offerInfo} ${style.thirdCol}`}>\r\n <div className={style.totalValueWrapper}>\r\n <span className={style.value}>\r\n <FormattedNumber\r\n value={(offer.AssetInformation.AssetParValue * offer.OfferPrice) / 100}\r\n minimumFractionDigits={offer.AssetInformation.CurrencyISO === \"PYG\" ? 0 : 2}\r\n maximumFractionDigits={offer.AssetInformation.CurrencyISO === \"PYG\" ? 0 : 2}\r\n />\r\n <span className={style.currency}> {offer.AssetInformation.CurrencyISO}</span>\r\n </span>\r\n <span className={style.label}>Valor por titulo</span>\r\n </div>\r\n <Button\r\n className={style.button}\r\n onClick={() => {\r\n toggle(offer);\r\n }}\r\n >\r\n Pedir cotización\r\n </Button>\r\n </Col>\r\n </div>\r\n );\r\n })}\r\n </Fragment>\r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"offerCard\":\"InvestAssetClassTable_offerCard_UXi_u\",\"offerInfo\":\"InvestAssetClassTable_offerInfo_1OUOK\",\"offerField\":\"InvestAssetClassTable_offerField_352hN\",\"currency\":\"InvestAssetClassTable_currency_2Awrf\",\"label\":\"InvestAssetClassTable_label_1XzQZ\",\"name\":\"InvestAssetClassTable_name_3IgWt\",\"nominal\":\"InvestAssetClassTable_nominal_3MeVG\",\"secondCol\":\"InvestAssetClassTable_secondCol_FfenB\",\"thirdCol\":\"InvestAssetClassTable_thirdCol_1M-ci\",\"totalValueWrapper\":\"InvestAssetClassTable_totalValueWrapper_3NHlP\",\"value\":\"InvestAssetClassTable_value_ABQdx\",\"button\":\"InvestAssetClassTable_button_uNARI\"};","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.svg\";\r\n\r\nimport style from \"./InvestSubAssetClassTable.scss\";\r\n\r\nexport const InvestSubAssetClassTable = ({ offers, toggle, open }) => {\r\n return (\r\n <Fragment>\r\n <Row className={style.assetRow}>\r\n <Collapse className={open ? style.collapseActive : style.collapse} isOpen={open}>\r\n <InvestAssetClassTable offers={offers} toggle={toggle} />\r\n </Collapse>\r\n </Row>\r\n </Fragment>\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\",\"titleActive\":\"InvestSubAssetClassTable_titleActive_2J-ZN\",\"title\":\"InvestSubAssetClassTable_title_3hLuX\",\"assetRow\":\"InvestSubAssetClassTable_assetRow_1CUoT\"};","import React, { useState, useEffect, Fragment } from \"react\";\r\nimport { Row, Collapse } from \"reactstrap\";\r\nimport { InvestSubAssetClassTable } from \"./InvestSubAssetClassTable/InvestSubAssetClassTable\";\r\nimport arrow from \"../../../../public/svg/keyboard_arrow_down.svg\";\r\nimport { toPascalCase } from \"../../../utils/helper\";\r\nimport { FundsAssetTable } from \"../FundsTable/FundsAssetTable/FundsAssetTable\";\r\n\r\nimport style from \"./InvestTable.scss\";\r\n\r\nexport const InvestTable = ({ titulo, offers = [], funds = [], toggle, destacada = false }) => {\r\n const [bonds, setBonds] = useState([]);\r\n const [cdas, setCDAs] = useState([]);\r\n const [equities, setEquities] = useState([]);\r\n const [options, setOptions] = useState([]);\r\n const [mFunds, setMFunds] = useState([]);\r\n const [repo, setRepo] = useState([]);\r\n const [openSections, setOpenSections] = useState({\r\n Todos: true,\r\n Bonos: false,\r\n CDAs: false,\r\n Acciones: false,\r\n Opciones: false,\r\n mFondos: false,\r\n Repo: false,\r\n Fondos: false,\r\n });\r\n\r\n useEffect(() => {\r\n // filter offers\r\n const newBonds = [];\r\n const newCda = [];\r\n const newEquities = [];\r\n const newOptions = [];\r\n const newFunds = [];\r\n const newRepo = [];\r\n\r\n offers.map((offerItem) => {\r\n switch (offerItem.AssetClassForm) {\r\n case \"Bonds\":\r\n if (offerItem.isCDA) {\r\n newCda.push(offerItem);\r\n } else {\r\n newBonds.push(offerItem);\r\n }\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 setCDAs(newCda);\r\n setEquities(newEquities);\r\n setOptions(newOptions);\r\n setMFunds(newFunds);\r\n setRepo(newRepo);\r\n }, [offers]);\r\n\r\n const titlesInvest = (title, isOpen, toggle) => {\r\n return (\r\n <Row className={isOpen ? style.collapseRowOpen : style.collapseRow}>\r\n <div\r\n className={isOpen ? style.collapseOpen : style.collapseHeader}\r\n onClick={() => {\r\n toggle(title);\r\n }}\r\n >\r\n <span className={isOpen ? style.titleActive : style.title}>{title}</span>\r\n </div>\r\n </Row>\r\n );\r\n };\r\n\r\n const toggleSection = (section) => {\r\n setOpenSections((prevState) => {\r\n const updatedSections = {};\r\n Object.keys(prevState).forEach((key) => {\r\n updatedSections[key] = false;\r\n });\r\n updatedSections[section] = true;\r\n\r\n return updatedSections;\r\n });\r\n };\r\n\r\n return (\r\n <div className={style.containerOffers}>\r\n <Row className={style.collapseRowActive}>\r\n <div className={style.titleRow}>\r\n {offers.length > 0 && titlesInvest(\"Todos\", openSections.Todos, () => toggleSection(\"Todos\"))}\r\n {bonds.length > 0 && titlesInvest(\"Bonos\", openSections.Bonos, () => toggleSection(\"Bonos\"))}\r\n {cdas.length > 0 && titlesInvest(\"CDAs\", openSections.CDAs, () => toggleSection(\"CDAs\"))}\r\n {equities.length > 0 &&\r\n titlesInvest(\"Acciones\", openSections.Acciones, () => toggleSection(\"Acciones\"))}\r\n {options.length > 0 &&\r\n titlesInvest(\"Opciones\", openSections.Opciones, () => toggleSection(\"Opciones\"))}\r\n {mFunds.length > 0 &&\r\n titlesInvest(\"M. Fondos\", openSections.mFondos, () => toggleSection(\"M. Fondos\"))}\r\n {repo.length > 0 && titlesInvest(\"Repo\", openSections.Repo, () => toggleSection(\"Repo\"))}\r\n {funds.length > 0 && titlesInvest(\"Fondos\", openSections.Fondos, () => toggleSection(\"Fondos\"))}\r\n </div>\r\n <hr className={style.titleDivider} />\r\n </Row>\r\n\r\n <div className={style.assetRow}>\r\n {openSections.Todos &&\r\n (offers.length > 0 || funds.length > 0) &&\r\n (offers.length > 0 && funds.length <= 0 ? (\r\n <InvestSubAssetClassTable offers={offers} toggle={toggle} open={openSections.Todos} />\r\n ) : offers.length <= 0 && funds.length > 0 ? (\r\n <FundsAssetTable funds={funds} />\r\n ) : (\r\n <div>\r\n <InvestSubAssetClassTable offers={offers} toggle={toggle} open={openSections.Todos} />\r\n <FundsAssetTable funds={funds} />\r\n </div>\r\n ))}\r\n {openSections.Bonos && bonds.length > 0 && (\r\n <InvestSubAssetClassTable offers={bonds} toggle={toggle} open={openSections.Bonos} />\r\n )}\r\n {openSections.CDAs && cdas.length > 0 && (\r\n <InvestSubAssetClassTable offers={cdas} toggle={toggle} open={openSections.CDAs} />\r\n )}\r\n {openSections.Acciones && equities.length > 0 && (\r\n <InvestSubAssetClassTable offers={equities} toggle={toggle} open={openSections.Acciones} />\r\n )}\r\n {openSections.Opciones && options.length > 0 && (\r\n <InvestSubAssetClassTable offers={options} toggle={toggle} open={openSections.Opciones} />\r\n )}\r\n {openSections.mFondos && mFunds.length > 0 && (\r\n <InvestSubAssetClassTable offers={mFunds} toggle={toggle} open={openSections.Fondos} />\r\n )}\r\n {openSections.Repo && repo.length > 0 && (\r\n <InvestSubAssetClassTable offers={repo} toggle={toggle} open={openSections.Repo} />\r\n )}\r\n {openSections.Fondos && funds.length > 0 && <FundsAssetTable funds={funds} />}\r\n </div>\r\n </div>\r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"containerOffers\":\"InvestTable_containerOffers_1MBCM\",\"collapseRowActive\":\"InvestTable_collapseRowActive_FLHDs\",\"titleRow\":\"InvestTable_titleRow_2fID8\",\"titleDivider\":\"InvestTable_titleDivider_2gojZ\",\"collapseRowOpen\":\"InvestTable_collapseRowOpen_1rVNL\",\"collapseRow\":\"InvestTable_collapseRow_34Tg5\",\"collapseHeader\":\"InvestTable_collapseHeader_1-G1p\",\"arrow\":\"InvestTable_arrow_2UhJa\",\"arrowActive\":\"InvestTable_arrowActive_1_hYG\",\"titleActive\":\"InvestTable_titleActive_1SmsD\",\"title\":\"InvestTable_title_1hLJI\",\"assetRow\":\"InvestTable_assetRow_2_eYV\"};","import React from \"react\";\r\nimport { Row, Col, Button } from \"reactstrap\";\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\n\r\nimport { getSession, getCurrentAccount, getSavedPersonInfo, getTexts } from \"../../reducers/selectors\";\r\nimport icon from \"../../../public/svg/i.svg\";\r\nimport { Link } from \"react-router-dom\";\r\n\r\nimport style from \"./InvestorProfile.scss\";\r\nimport { CircularProgress } from \"../UI/CircularProgress/CircularProgress\";\r\n\r\nexport const InvestorProfile = () => {\r\n const currentAccount = useSelector(getCurrentAccount);\r\n const personInfo = useSelector(getSavedPersonInfo);\r\n const texts = useSelector(getTexts);\r\n\r\n const profileRiskString = {\r\n Conservative: \"Conservador\",\r\n Moderate: \"Moderado\",\r\n Aggressive: \"Agresivo\",\r\n Aggresive: \"Agresivo\",\r\n };\r\n\r\n const profileRiskDescriptionString = {\r\n Conservative: texts.notes.investor_profile_conservative,\r\n Moderate: texts.notes.investor_profile_moderate,\r\n Aggressive: texts.notes.investor_profile_aggressive,\r\n Aggresive: texts.notes.investor_profile_aggressive,\r\n };\r\n\r\n if (!personInfo) return <CircularProgress />;\r\n\r\n return (\r\n <Col className={style.wrapperCol} lg=\"12\">\r\n <div className={style.title}>Perfil inversor</div>\r\n\r\n <div className={style.container}>\r\n <div>tú perfil de inversionista es</div>\r\n <div>{profileRiskString[personInfo.PersonProfileRiskName]}</div>\r\n <div>{profileRiskDescriptionString[personInfo.PersonProfileRiskName]}</div>\r\n\r\n <Link to=\"/investorProfile/profileTestAnswer\">\r\n <Button className={style.orangeButton}>ver respuestas de prueba de perfil</Button>\r\n </Link>\r\n <img className={style.icon} src={icon} alt=\"icon\" />\r\n <br></br>\r\n <Link to=\"/investorProfile/profileTest\">\r\n <Button className={style.blueButton}>rehacer prueba de perfil</Button>\r\n </Link>\r\n <br></br>\r\n <Link to=\"/investorProfile/accountProfileTest\">\r\n <Button className={style.orangeButton}>ver respuestas de perfil de la cuenta</Button>\r\n </Link>\r\n <img className={style.icon} src={icon} alt=\"icon\" />\r\n </div>\r\n </Col>\r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"wrapperCol\":\"InvestorProfile_wrapperCol_2zAx1\",\"title\":\"InvestorProfile_title_26s5r\",\"container\":\"InvestorProfile_container_10vMN\",\"icon\":\"InvestorProfile_icon_3SPgk\",\"orangeButton\":\"InvestorProfile_orangeButton_UgAk3\",\"blueButton\":\"InvestorProfile_blueButton_1ZLUL\"};","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 <div className={style.circle}>\r\n <span>{count}</span>\r\n </div>\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 { useSelector } from \"react-redux\";\r\nimport { getTexts } from \"../../../reducers/selectors\";\r\n\r\nimport style from \"./Footer.scss\";\r\n\r\nexport const Footer = () => {\r\n const texts = useSelector(getTexts);\r\n\r\n return (\r\n <div className={style.footer}>\r\n <img className={style.logoButton} src=\"/img/logo-blanco.png\" alt=\"logo\" />\r\n\r\n <span className={style.text}>\r\n <p>{texts.notes.footer_line_1}</p>\r\n <p>{texts.notes.footer_line_2}</p>\r\n </span>\r\n </div>\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 { useSelector } from \"react-redux\";\r\nimport { FormattedNumber, formattedNumber } from \"../../FormattedNumber/FormattedNumber\";\r\nimport { CircularProgress } from \"../../UI/CircularProgress/CircularProgress\";\r\nimport moment from \"moment\";\r\nimport { showToast } from \"../../../utils/helper\";\r\nimport ReactEcharts from \"echarts-for-react\";\r\nimport { getCurrentAccount, getTexts } from \"../../../reducers/selectors\";\r\nimport { getFutureIncome } from \"../../../services/api/accounts\";\r\nimport { Row, Col } from \"../../UI/Customstrap/Customstrap\";\r\nimport { TitleLabel } from \"../../UI/TitleLabel/TitleLabel\";\r\nimport { RadioButton, RadioButtonGroup } from \"../../UI/RadioButton/RadioButton\";\r\nimport GenericButton from \"../../UI/Button/Button\";\r\nimport { fetchGetPortfolio, getClientPositionDigital } from \"../../../services/api/accounts\";\r\nimport confirmIcon from \"../../../../public/svg/ButtonIcons/right-arrow.svg\";\r\nimport { Table, Label } from \"reactstrap\";\r\n\r\nimport style from \"./FutureIncomeComponent.scss\";\r\nimport { Warning } from \"../../Warning/Warning\";\r\nimport { Container } from \"../../UI/Container/Container\";\r\nimport { Future } from \"bx-react-ui/src/components/Modal/Order/Form\";\r\nimport FutureButton from \"../../UI/Button/FutureButton\";\r\n\r\nconst allowedCurrencies = {\r\n ALL: \"ALL\",\r\n PYG: \"PYG\",\r\n USD: \"USD\",\r\n};\r\n\r\nconst FutureIncomeComponent = ({ title }) => {\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 texts = useSelector(getTexts);\r\n const [currency, setCurrency] = useState(\"USD\");\r\n const [activeCurrency, setActiveCurrency] = useState(allowedCurrencies.ALL);\r\n const [portfolioDate, setPortfolioDate] = useState(new Date().toISOString().slice(0, 10));\r\n const [portfolio, setPortfolio] = useState(null);\r\n const [loadingPosition, setLoadingPosition] = useState(true);\r\n const [activePortfolio, setActivePortfolio] = useState(null);\r\n const [estimatedTotalReturn, setEstimatedTotalReturn] = useState();\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 \"threeMonth\":\r\n newFilter.hasta = moment().add(3, \"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 <div className={`${style.button} ${active ? style.activeButton : \"\"}`} onClick={onClick}>\r\n {label}\r\n </div>\r\n );\r\n\r\n const handleActiveCurrency = (name) => {\r\n setActiveCurrency(allowedCurrencies[name]);\r\n };\r\n\r\n useEffect(() => {\r\n handleChangeFilter(currentFilter);\r\n }, [currentFilter]);\r\n\r\n useEffect(() => {\r\n let estimatedTotal = 0;\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) =>\r\n activeCurrency === \"ALL\" ? true : item.currencyISO === activeCurrency\r\n );\r\n setFutureIncome(newFutureIncome);\r\n newFutureIncome.map((iterator) => {\r\n estimatedTotal += activeCurrency === \"PYG\" ? +iterator.total : +iterator.totalUSD;\r\n });\r\n setEstimatedTotalReturn(estimatedTotal);\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, activeCurrency]);\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 })\r\n .catch((err) => console.error(err));\r\n setLoadingPosition(false);\r\n }\r\n if (currentAccount.noAccounts) {\r\n setLoadingPosition(false);\r\n }\r\n }, [currentAccount, portfolioDate]);\r\n\r\n //if (!loadingPosition) return <CircularProgress/>;\r\n\r\n useEffect(() => {\r\n if (portfolio && !loadingPosition) {\r\n let newActivePortfolio;\r\n switch (activeCurrency) {\r\n case allowedCurrencies.ALL:\r\n newActivePortfolio = portfolio.positionUSD;\r\n break;\r\n case allowedCurrencies.PYG:\r\n newActivePortfolio = portfolio.positionPYG;\r\n break;\r\n case allowedCurrencies.USD:\r\n newActivePortfolio = portfolio.position;\r\n break;\r\n }\r\n\r\n newActivePortfolio.assetClass = newActivePortfolio.assetClass.map((assetClass) => {\r\n assetClass.percentage =\r\n Math.round(((+assetClass.totalUSD * 100) / +newActivePortfolio.portfolioTotalUSD) * 100) / 100;\r\n return assetClass;\r\n });\r\n newActivePortfolio.assetClass = newActivePortfolio.assetClass.sort((a, b) => {\r\n return a.percentage < b.percentage ? 1 : -1;\r\n });\r\n // if (newActivePortfolio && newActivePortfolio.assetClass) {\r\n // } else {\r\n // return (newActivePortfolio = \"20%\");\r\n // }\r\n\r\n const subAssetClasses = [];\r\n newActivePortfolio.assetClass.map((assetClass) => {\r\n assetClass.subAssetClass.map((subAssetClassItem) => {\r\n subAssetClasses.push(subAssetClassItem);\r\n });\r\n });\r\n\r\n newActivePortfolio.subAssetClasses = subAssetClasses;\r\n setActivePortfolio(newActivePortfolio);\r\n }\r\n }, [activeCurrency, portfolio, loadingPosition]);\r\n\r\n return (\r\n <Row>\r\n <Col xs={12} xl={12}>\r\n <Row>\r\n <Col xs={12}>\r\n <Row className={style.headerTitle}>\r\n <Label>{title}</Label>\r\n </Row>\r\n <Container >\r\n <Row className={style.rowBeginning}>\r\n <Col>\r\n <RadioButtonGroup>\r\n <RadioButton\r\n label=\"Todos\"\r\n onClick={handleActiveCurrency}\r\n name={allowedCurrencies.ALL}\r\n active={activeCurrency === allowedCurrencies.ALL}\r\n />\r\n <RadioButton\r\n label=\"Guaraníes\"\r\n onClick={handleActiveCurrency}\r\n name={allowedCurrencies.PYG}\r\n active={activeCurrency === allowedCurrencies.PYG}\r\n />\r\n <RadioButton\r\n label=\"Dólares\"\r\n onClick={handleActiveCurrency}\r\n name={allowedCurrencies.USD}\r\n active={activeCurrency === allowedCurrencies.USD}\r\n />\r\n </RadioButtonGroup>\r\n </Col>\r\n <Col className={style.colCambioActual} xs={3}>\r\n {portfolio && portfolio.currencypairprice && (\r\n <div className={style.fx}>\r\n <span className={style.fxLabel}>Cambio actual:</span>\r\n <span>{`Gs ${formattedNumber(portfolio.currencypairprice.rawprice, 0, 0)}`}</span>\r\n </div>\r\n )}\r\n </Col>\r\n </Row>\r\n </Container>\r\n </Col>\r\n </Row>\r\n\r\n <Row>\r\n <Col xs={12}>\r\n <Col xs={12}>\r\n <Container className={style.container}>\r\n <Row className={style.containerRow}>\r\n <Col xs={3} className={style.tableMargin}>\r\n <FutureButton\r\n label=\"1 mes\"\r\n style\r\n active={currentFilter === \"month\"}\r\n labelStyle={{ fontSize: \"21px\", fontWeight: \"470\", color: \"#79716B\" }}\r\n handleClick={() => {\r\n toggleFilterType(\"month\");\r\n }}\r\n iconSvg={[{ width: \"10px\", item: confirmIcon }]}\r\n />\r\n\r\n <FutureButton\r\n label=\"3 meses\"\r\n style\r\n active={currentFilter === \"threeMonth\"}\r\n labelStyle={{ fontSize: \"20px\", fontWeight: \"470\", color: \"#79716B\" }}\r\n handleClick={() => {\r\n toggleFilterType(\"threeMonth\");\r\n }}\r\n iconSvg={[{ width: \"10px\", item: confirmIcon }]}\r\n />\r\n <FutureButton\r\n label=\"6 meses\"\r\n style\r\n active={currentFilter === \"sixMonth\"}\r\n labelStyle={{ fontSize: \"20px\", fontWeight: \"470\", color: \"#79716B\" }}\r\n handleClick={() => {\r\n toggleFilterType(\"sixMonth\");\r\n }}\r\n iconSvg={[{ width: \"10px\", item: confirmIcon }]}\r\n />\r\n <FutureButton\r\n label=\"12 meses\"\r\n style\r\n active={currentFilter === \"year\"}\r\n labelStyle={{ fontSize: \"20px\", fontWeight: \"470\", color: \"#79716B\" }}\r\n handleClick={() => {\r\n toggleFilterType(\"year\");\r\n }}\r\n iconSvg={[{ width: \"10px\", item: confirmIcon }]}\r\n />\r\n </Col>\r\n <Col xs={9} className={style.tableMargin}>\r\n <div className={style.divChartWrapper}>\r\n <Row className={style.chartRow}>\r\n <Col className={style.chartRowSub} xs={8}>\r\n {!loading && <Chart items={futureIncome} />}\r\n </Col>\r\n <Col className={style.ColumnLineStyleFutureIncome} xs={4}>\r\n <Row>\r\n <TitleLabel className={style.expectedIncomeTitle} label=\"Ingreso esperado\" />\r\n </Row>\r\n <Row>\r\n {\r\n <div className={style.expectedIncomeValueAlign}>\r\n {\r\n <div className={style.expectedIncomeValue}>\r\n <FormattedNumber\r\n value={estimatedTotalReturn}\r\n minimumFractionDigits={activeCurrency == \"PYG\" ? 0 : 2}\r\n maximumFractionDigits={activeCurrency == \"PYG\" ? 0 : 2}\r\n />\r\n </div>\r\n }\r\n {\r\n <div className={style.expectedIncomeValueISO}>\r\n {activeCurrency === \"PYG\" ? \"PYG\" : \"USD\"}\r\n </div>\r\n }\r\n </div>\r\n }\r\n </Row>\r\n </Col>\r\n </Row>\r\n </div>\r\n </Col>\r\n <div className={style.tableTitle}>Próximos movimientos</div>\r\n <div className={style.scrollableTable}>\r\n <Table className={style.table}>\r\n <thead className={style.tableHead}>\r\n <tr className={style.tableRow}>\r\n <th className={style.tableH}>Fecha</th>\r\n <th className={`${style.tableH} ${style.sm}`} style={{ textAlign: \"center\" }}>\r\n Tipo\r\n </th>\r\n <th className={style.tableH}>Instrumento</th>\r\n <th className={style.tableH}>{`Monto ${\r\n activeCurrency === \"PYG\" ? \"Gs\" : \"USD\"\r\n }`}</th>\r\n <th className={`${style.tableH} ${style.md} ${style.sm}`}>{`Monto acumulado ${\r\n activeCurrency === \"PYG\" ? \"Gs\" : \"USD\"\r\n }`}</th>\r\n </tr>\r\n </thead>\r\n <tbody className={style.tableBody}>\r\n {currentAccount.noAccounts ? (\r\n <NoAccounts />\r\n ) : loading ? (\r\n <tr>\r\n <td colSpan={5} className={style.circularProgressRow}>\r\n <CircularProgress />\r\n </td>\r\n </tr>\r\n ) : futureIncome.length > 0 ? (\r\n futureIncome.map((item) => (\r\n <FutureIncomeRow item={item} currency={activeCurrency} />\r\n ))\r\n ) : (\r\n <tr className={style.futureIncomeRow}>\r\n <td colSpan={5} style={{ textAlign: \"center\" }}>\r\n No hay futuros ingresos para los filtros seleccionados\r\n </td>\r\n </tr>\r\n )}\r\n </tbody>\r\n </Table>\r\n </div>\r\n </Row>\r\n </Container>\r\n </Col>\r\n </Col>\r\n </Row>\r\n </Col>\r\n </Row>\r\n\r\n // <Row>\r\n // <Col className={style.wrapperCol} lg=\"12\">\r\n // <Row className={style.buttonRow}>\r\n // <FilterButton\r\n // label=\"1 mes\"\r\n // active={currentFilter === \"month\"}\r\n // onClick={() => {\r\n // toggleFilterType(\"month\");\r\n // }}\r\n // />\r\n // <FilterButton\r\n // label=\"2 meses\"\r\n // active={currentFilter === \"twoMonth\"}\r\n // onClick={() => {\r\n // toggleFilterType(\"twoMonth\");\r\n // }}\r\n // />\r\n // <FilterButton\r\n // label=\"6 meses\"\r\n // active={currentFilter === \"sixMonth\"}\r\n // onClick={() => {\r\n // toggleFilterType(\"sixMonth\");\r\n // }}\r\n // />\r\n // <FilterButton\r\n // label=\"1 año\"\r\n // active={currentFilter === \"year\"}\r\n // onClick={() => {\r\n // toggleFilterType(\"year\");\r\n // }}\r\n // />\r\n // </Row>\r\n // <Row className={style.tableRow}>\r\n // <span className={style.toggleButtonRow}>\r\n // <Button\r\n // className={`${style.toggleButton} ${currency === \"PYG\" ? style.toggleButtonActive : \"\"}`}\r\n // onClick={() => {\r\n // setCurrency(\"PYG\");\r\n // }}\r\n // >\r\n // Guaraníes\r\n // </Button>\r\n // <Button\r\n // className={`${style.toggleButton} ${currency === \"USD\" ? style.toggleButtonActive : \"\"}`}\r\n // onClick={() => {\r\n // setCurrency(\"USD\");\r\n // }}\r\n // >\r\n // Dólares\r\n // </Button>\r\n // </span>\r\n // <Fragment>\r\n // <Table className={style.table}>\r\n // <thead className={style.tableHead}>\r\n // <tr className={style.tableRow}>\r\n // <th className={style.tableH}>Fecha</th>\r\n // <th className={`${style.tableH} ${style.sm}`} style={{ textAlign: \"center\" }}>\r\n // Concepto\r\n // </th>\r\n // <th className={style.tableH}>Instrumento</th>\r\n // <th className={style.tableH}>{`Monto ${currency === \"PYG\" ? \"Gs\" : \"USD\"}`}</th>\r\n // <th className={`${style.tableH} ${style.md} ${style.sm}`}>{`Monto acumulado ${\r\n // currency === \"PYG\" ? \"Gs\" : \"USD\"\r\n // }`}</th>\r\n // </tr>\r\n // </thead>\r\n // <tbody className={style.tableBody}>\r\n // {currentAccount.noAccounts ? (\r\n // <NoAccounts />\r\n // ) : loading ? (\r\n // <tr>\r\n // <td colSpan={5} className={style.circularProgressRow}>\r\n // <CircularProgress />\r\n // </td>\r\n // </tr>\r\n // ) : futureIncome.length > 0 ? (\r\n // futureIncome.map((item) => <FutureIncomeRow item={item} currency={currency} />)\r\n // ) : (\r\n // <tr className={style.futureIncomeRow}>\r\n // <td colSpan={5} style={{ textAlign: \"center\" }}>\r\n // No hay futuros ingresos para los filtros seleccionados\r\n // </td>\r\n // </tr>\r\n // )}\r\n // </tbody>\r\n // </Table>\r\n // </Fragment>\r\n // </Row>\r\n // <Row>\r\n // <Col>{!loading && <Chart items={futureIncome} />}</Col>\r\n // </Row>\r\n // <Row className={style.warning}>\r\n // <Warning text={texts.notes.future_note} />\r\n // </Row>\r\n // </Col>\r\n // </Row>\r\n );\r\n};\r\n\r\nconst NoAccounts = () => (\r\n <tr className={style.futureIncomeRow}>\r\n <td colSpan={5}>No hay cuentas asociadas</td>\r\n </tr>\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() === \"coupon\" ? (res = \"Cupón\") : null;\r\n return res;\r\n};\r\n\r\nconst FutureIncomeRow = ({ item, currency }) => {\r\n return (\r\n <tr className={style.futureIncomeRow}>\r\n <td>{moment(item.date).format(\"DD/MM/YYYY\")}</td>\r\n <td className={`${style.tableH} ${style.sm}`} style={{ textAlign: \"center\" }}>\r\n {conceptDictionary(item.concept)}\r\n </td>\r\n <td>{item.assetName}</td>\r\n <td>\r\n {item.total == 0 ? (\r\n \"-\"\r\n ) : (\r\n <FormattedNumber\r\n value={currency == \"USD\" || currency == \"ALL\" ? item.totalUSD : item.total}\r\n minimumFractionDigits={currency == \"USD\" || currency == \"ALL\" ? 2 : 0}\r\n maximumFractionDigits={currency == \"USD\" || currency == \"ALL\" ? 2 : 0}\r\n />\r\n )}\r\n </td>\r\n <td className={`${style.tableH} ${style.md} ${style.sm}`}>\r\n {item.totalUSDAccumulated == 0 ? (\r\n \"-\"\r\n ) : (\r\n <FormattedNumber\r\n value={currency == \"USD\" || currency == \"ALL\" ? item.totalUSDAccumulated : item.totalAccumulated}\r\n minimumFractionDigits={currency == \"USD\" || currency == \"ALL\" ? 2 : 0}\r\n maximumFractionDigits={currency == \"USD\" || currency == \"ALL\" ? 2 : 0}\r\n />\r\n )}\r\n </td>\r\n </tr>\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) {\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 <div className={style.chartWrapper}>\r\n {data && (\r\n <ReactEcharts\r\n option={options(data)}\r\n notMerge={true}\r\n lazyUpdate={false}\r\n style={{\r\n height: \"100%\",\r\n width: \"92%\",\r\n }}\r\n />\r\n )}\r\n </div>\r\n );\r\n};\r\n\r\nconst options = ({ values, labels }) => ({\r\n color: [\"#27272A\"],\r\n grid: {\r\n top: 20,\r\n bottom: 30,\r\n left: 60,\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);\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 boundaryGap: [0, \"100%\"],\r\n splitLine: {\r\n show: true,\r\n },\r\n axisLabel: {\r\n formatter: function (params) {\r\n if (params.toString().length > 6) {\r\n return parseFloat((params / 1e6).toFixed(2)) + \" M\";\r\n } else return formattedNumber(params);\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: \"90%\",\r\n hoverAnimation: true,\r\n data: values,\r\n height: \"100%\",\r\n itemStyle: {\r\n borderRadius: [5, 5, 0, 0],\r\n },\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_\",\"scrollableTable\":\"FutureIncomeComponent_scrollableTable_3YztA\",\"tableTitle\":\"FutureIncomeComponent_tableTitle_CQ1jj\",\"md\":\"FutureIncomeComponent_md_1Zt-z\",\"title\":\"FutureIncomeComponent_title_MjqMQ\",\"sm\":\"FutureIncomeComponent_sm_2Wnz7\",\"chartWrapper\":\"FutureIncomeComponent_chartWrapper_1V6e0\",\"headerTitle\":\"FutureIncomeComponent_headerTitle_38UIK\",\"container\":\"FutureIncomeComponent_container_1PjHf\",\"containerRow\":\"FutureIncomeComponent_containerRow_ITAwl\",\"tableMargin\":\"FutureIncomeComponent_tableMargin_Ye_5z\",\"chartRow\":\"FutureIncomeComponent_chartRow_35LHY\",\"chartRowSub\":\"FutureIncomeComponent_chartRowSub_1Mbng\",\"ColumnLineStyleFutureIncome\":\"FutureIncomeComponent_ColumnLineStyleFutureIncome_2Rxz1\",\"rowBeginning\":\"FutureIncomeComponent_rowBeginning_2F4CV\",\"colCambioActual\":\"FutureIncomeComponent_colCambioActual_12ime\",\"fx\":\"FutureIncomeComponent_fx_3KMgX\",\"divChartWrapper\":\"FutureIncomeComponent_divChartWrapper_3Ruau\",\"expectedIncomeTitle\":\"FutureIncomeComponent_expectedIncomeTitle_3pEf0\",\"expectedIncomeValue\":\"FutureIncomeComponent_expectedIncomeValue_3C2OR\",\"expectedIncomeValueISO\":\"FutureIncomeComponent_expectedIncomeValueISO_d_Qpx\",\"titleInfo\":\"FutureIncomeComponent_titleInfo_Xc4dH\",\"fxLabel\":\"FutureIncomeComponent_fxLabel_1C3Ei\",\"RowStretch\":\"FutureIncomeComponent_RowStretch_14MPn\",\"expectedIncomeValueAlign\":\"FutureIncomeComponent_expectedIncomeValueAlign_e9ISy\"};","import React, { useState, useEffect, Fragment } from \"react\";\r\nimport {\r\n Nav,\r\n NavbarToggler,\r\n Badge,\r\n Dropdown,\r\n DropdownToggle,\r\n DropdownMenu,\r\n DropdownItem,\r\n Label,\r\n} 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 } from \"bx-react-ui\";\r\nimport { CircularProgress } from \"../../UI/CircularProgress/CircularProgress\";\r\nimport { Prompt } from \"react-router-dom\";\r\n\r\nimport { getUserContext, getAuth, getSession } 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 GenericButton from \"../../UI/Button/Button\";\r\nimport { Help } from \"../../Help/Help\";\r\n\r\nimport style from \"./Header.scss\";\r\nimport { useInterval } from \"bx-react-ui/src/utils/hooks\";\r\nimport { getPersonInfo } from \"../../../services/api/person\";\r\n\r\nconst environmentName = window.___APP_CONFIG___.ENV_NAME ? window.___APP_CONFIG___.ENV_NAME : \"TESTING\";\r\n\r\nexport const Header = ({ AccountJSON, actions, title }) => {\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 const showEnvironmentSign = !isProdEnv || isTestingUser;\r\n const environmentSignText = isProdEnv ? \"PRODUCTION\" : environmentName;\r\n const environmentSignColor = isProdEnv ? \"red\" : \"#34784B\";\r\n const dispatch = useDispatch();\r\n\r\n const context = useSelector(getUserContext);\r\n const [idleTimeout, setIdleTimeout] = useState(1);\r\n const [showHelp, setShowHelp] = useState(false);\r\n const [isAppMobile, setIsAppMobile] = useState(false);\r\n\r\n useEffect(() => {\r\n if (context !== null) {\r\n if (Object.keys(context)) {\r\n setIsAppMobile(window.___APP_CONFIG___.APP_MOBILE);\r\n setIdleTimeout(context.session.MaxIdleSessionTime);\r\n }\r\n }\r\n }, [context]);\r\n\r\n useEffect(() => {\r\n setIsAppMobile(window.___APP_CONFIG___.APP_MOBILE);\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 useInterval(() => {\r\n if (isAppMobile) {\r\n logoutTimer.activate();\r\n getPersonInfo();\r\n }\r\n }, [idleTimeout * 60 * 1000 - 5000]);\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 toggleShowHelp = () => {\r\n setShowHelp((stateHelp) => !stateHelp);\r\n };\r\n\r\n return (\r\n <header\r\n className={!isAppMobile ? `${style.appHeader} app-header navbar` : \"hideElement\"}\r\n style={{ margin: \"0 !important\" }}\r\n >\r\n <span className={style.hambMenuLogo}>\r\n <Fragment>\r\n <NavbarToggler\r\n className={`${style.navToggler} d-md-down-none`}\r\n onClick={(e) => {\r\n mobileSidebarToggle(e);\r\n }}\r\n >\r\n <img className={style.hambIcon} src={menuLine} alt=\"hamburger menu\" />\r\n </NavbarToggler>\r\n </Fragment>\r\n </span>\r\n <img className={style.logo} src=\"./svg/SideBarIcons/full-logo-home-white.svg\" alt=\"Logo\" />\r\n {/* <p className={style.dummyDiv}></p> */}\r\n <MediaQuery minWidth={576}>\r\n <Label className={style.headerTitle}>{title}</Label>\r\n <Nav className=\"d-md-down-none\" navbar>\r\n <GenericButton\r\n label={\"Ayuda\"}\r\n // icon={\"fa fa-phone mr-3\"}\r\n rounded\r\n padding={\"12px 60px\"}\r\n handleClick={toggleShowHelp}\r\n iconSvg={[{ width: \"20px\", item: \"../../svg/SideBarIcons/phone.svg\" }]}\r\n ></GenericButton>\r\n {/* <UserSelector isInNavbar className={style.userSelector} /> */}\r\n </Nav>\r\n {showEnvironmentSign && <EnvironmentSign text={environmentSignText} color={environmentSignColor} />}\r\n <hr style={{ width: \"100%\", marginBottom: \"0px\", paddingBottom: \"0px\" }}></hr>\r\n </MediaQuery>\r\n <Prompt\r\n when={showHelp}\r\n message={(location) => {\r\n // Ejecutar la función personalizada antes de la navegación hacia atrás\r\n toggleShowHelp();\r\n // No permitir la navegación hacia atrás\r\n return false;\r\n }}\r\n />\r\n {showHelp && <Help toggleHelp={toggleShowHelp} />}\r\n </header>\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 <Dropdown nav isOpen={open} toggle={toggle} key={`event-alert-list`}>\r\n <DropdownToggle nav>\r\n <span>\r\n <i className=\"icon-bell\"></i>\r\n <Badge pill color=\"danger\">\r\n {eventsCounter}\r\n </Badge>\r\n </span>\r\n </DropdownToggle>\r\n <DropdownMenu right>\r\n <div className={style.container}>\r\n <DropdownItem header tag=\"div\" className=\"text-center\">\r\n <strong>Notificaciones</strong>\r\n </DropdownItem>\r\n {loading ? (\r\n <CircularProgress sm />\r\n ) : (\r\n items && items.length == 0 && <h6 className={style.empty}>No hay notificaciones</h6>\r\n )}\r\n {items &&\r\n items.map((item, i) =>\r\n i < 5 ? (\r\n <span>\r\n {item}\r\n <hr />\r\n </span>\r\n ) : null\r\n )}\r\n </div>\r\n <DropdownItem tag={Link} to=\"notifications\" className={`view-more ${style.more}`}>\r\n Ver todas las notificaciones\r\n </DropdownItem>\r\n </DropdownMenu>\r\n </Dropdown>,\r\n ];\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"headerTitle\":\"Header_headerTitle_7LRc9\",\"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\",\"hideElement\":\"Header_hideElement_1RSI6\"};","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, { useState, useEffect } from \"react\";\r\nimport { Container } from \"reactstrap\";\r\nimport { connect } from \"react-redux\";\r\nimport { bindActionCreators } from \"redux\";\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\nimport { Toaster } from \"../Toaster/Toaster\";\r\n\r\nconst MainLayout = (props) => {\r\n const { actions } = props;\r\n return (\r\n <div className=\"app\">\r\n <Toaster />\r\n <div className=\"app-body\">\r\n <Sidebar {...props} />\r\n <main className=\"main\">\r\n {/* <Header actions={actions} /> */}\r\n <Container fluid>{props.children}</Container>\r\n </main>\r\n <MediaQuery minWidth={576}>{/* <Footer /> */}</MediaQuery>\r\n </div>\r\n </div>\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, Label } from \"reactstrap\";\r\nimport { getMonthsPositionReport, getAccountStatement } from \"../../../services/api/accounts\";\r\nimport { useSelector } from \"react-redux\";\r\nimport style from \"./MonthlyStateComponent.scss\";\r\nimport { getCurrentAccount, getTexts } 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 GenericButton from \"../../UI/Button/Button\";\r\nimport { Safearea } from \"../../UI/Safearea/Safearea\";\r\n\r\nexport const MonthlyStateComponent = ({ title }) => {\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(false);\r\n const [months, setMonths] = useState([]);\r\n const currentAccount = useSelector(getCurrentAccount);\r\n const texts = useSelector(getTexts);\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 useEffect(() => {\r\n if (currentAccount.id) {\r\n setLoading(true);\r\n getMonthsPositionReport({ AccountId: currentAccount.id })\r\n .then(({ response }) => {\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\", true);\r\n }\r\n });\r\n };\r\n\r\n if (currentAccount.noAccounts)\r\n return (\r\n <Row>\r\n <Col>\r\n <span>No hay cuentas asociadas</span>\r\n </Col>\r\n </Row>\r\n );\r\n\r\n return (\r\n <React.Fragment>\r\n <Row className={style.headerTitle}>\r\n <Label>{title}</Label>\r\n </Row>\r\n <Row style={{ backgroundColor: \"#f7f7f7\", height: \"100%\" }}>\r\n <div className={style.mainStateDiv}>\r\n <Row>\r\n <Label className={style.desc}>Mes y año</Label>\r\n <hr style={{ width: \"100%\" }} />\r\n </Row>\r\n <Row>\r\n {months.length > 0 ? (\r\n months.map((month) => <ReportRow reportDate={month} onClick={handleClick}></ReportRow>)\r\n ) : (\r\n <th className={style.noResultsText}>Sin Resultados</th>\r\n )}\r\n </Row>\r\n </div>\r\n {/* <Row className={style.body}>\r\n <button\r\n id={style.dropdownButton}\r\n onClick={() => {\r\n setUserDropdownIsOpen(!userDropdownIsOpen);\r\n }}\r\n >\r\n <span className={style.textImageWrapper}>\r\n <p>{currentFilter}</p>\r\n <img src={pdfSvg} className={style.pdf} />\r\n </span>\r\n <Dropdown\r\n isOpen={userDropdownIsOpen}\r\n toggle={toggleUserDropdown}\r\n nav\r\n inNavbar\r\n className={style.dropdown}\r\n tag=\"ul\"\r\n >\r\n <DropdownToggle nav caret className={style.dropdownToggle}>\r\n <DropdownMenu className={style.dropDownMenu}>\r\n {months.length > 0 ? (\r\n months.map((month) => (\r\n <DropdownItem\r\n className={style.item}\r\n onClick={() => {\r\n handleClick(month);\r\n }}\r\n >\r\n {month}\r\n </DropdownItem>\r\n ))\r\n ) : (\r\n <th>Sin Resultados</th>\r\n )}\r\n </DropdownMenu>\r\n </DropdownToggle>\r\n </Dropdown>\r\n </button>\r\n </Row> */}\r\n {/* <Col className={style.wrapperCol} lg=\"12\">\r\n <p className={style.titleSubText}>Ver estado de cuenta:</p>\r\n <Row className={style.body}>\r\n <button\r\n id={style.dropdownButton}\r\n onClick={() => {\r\n setUserDropdownIsOpen(!userDropdownIsOpen);\r\n }}\r\n >\r\n <span className={style.textImageWrapper}>\r\n <p>{currentFilter}</p>\r\n <img src={pdfSvg} className={style.pdf} />\r\n </span>\r\n <Dropdown\r\n isOpen={userDropdownIsOpen}\r\n toggle={toggleUserDropdown}\r\n nav\r\n inNavbar\r\n className={style.dropdown}\r\n tag=\"ul\"\r\n >\r\n <DropdownToggle nav caret className={style.dropdownToggle}>\r\n <DropdownMenu className={style.dropDownMenu}>\r\n {months.length > 0 ? (\r\n months.map((month) => (\r\n <DropdownItem\r\n className={style.item}\r\n onClick={() => {\r\n handleClick(month);\r\n }}\r\n >\r\n {month}\r\n </DropdownItem>\r\n ))\r\n ) : (\r\n <th>Sin Resultados</th>\r\n )}\r\n </DropdownMenu>\r\n </DropdownToggle>\r\n </Dropdown>\r\n </button>\r\n </Row>\r\n <Row className={style.warning}>\r\n <Warning text={texts.notes.statements_note} />\r\n </Row>\r\n </Col> */}\r\n </Row>\r\n </React.Fragment>\r\n );\r\n};\r\n\r\nexport const ReportRow = ({ reportDate, onClick }) => {\r\n return (\r\n <React.Fragment>\r\n <div className={style.reportRow}>\r\n <Label className={style.reportLabel}>{reportDate}</Label>\r\n <GenericButton\r\n handleClick={() => onClick(reportDate)}\r\n right\r\n rounded\r\n label={\"Descargar PDF\"}\r\n padding={\"8px 12px\"}\r\n iconSvg={[{ width: \"20px\", item: \" ../../svg/ButtonIcons/download.svg\" }]}\r\n ></GenericButton>\r\n </div>\r\n <hr style={{ width: \"100%\" }} />\r\n </React.Fragment>\r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"mainStateDiv\":\"MonthlyStateComponent_mainStateDiv_NCZO4\",\"headerTitle\":\"MonthlyStateComponent_headerTitle_1DYJN\",\"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\",\"wrapperCol\":\"MonthlyStateComponent_wrapperCol_354bK\",\"title\":\"MonthlyStateComponent_title_2Lmr8\",\"reportRow\":\"MonthlyStateComponent_reportRow_3Nwcx\",\"noResultsText\":\"MonthlyStateComponent_noResultsText_2zQKQ\",\"desc\":\"MonthlyStateComponent_desc_2Ahim\"};","import React, { useState, useEffect, Fragment } from \"react\";\r\nimport moment from \"moment\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { DropdownToggle, DropdownMenu, DropdownItem, Dropdown } from \"reactstrap\";\r\nimport { Table } from \"reactstrap\";\r\nimport { CircularProgress } from \"../../UI/CircularProgress/CircularProgress\";\r\nimport changeAccountIcon from \"../../../../public/svg/changeAccount.svg\";\r\nimport closeSessionIcon from \"../../../../public/svg/closeSession.svg\";\r\nimport { Link } from \"react-router-dom\";\r\nimport { currentAccountSet } from \"../../../actions/entities\";\r\nimport { Icons } from \"../../UI/Icon/Icon\";\r\nimport { Safearea } from \"../../UI/Safearea/Safearea\";\r\nimport { Container } from \"../../UI/Container/Container\";\r\nimport { Col, Row } from \"../../UI/Customstrap/Customstrap\";\r\nimport { fetchGetAccounts } from \"../../../services/api/accounts\";\r\nimport { getSavedPersonInfo, getCurrentAccount, getTexts } from \"../../../reducers/selectors\";\r\nimport greenDotIcon from \"../../../../public/svg/SideBarIcons/green-dot.svg\";\r\nimport { ProfileTestAnswer } from \"../../ProfileTestAnswer/ProfileTestAnswer\";\r\nimport { ProfileTest } from \"../../ProfileTest/ProfileTest\";\r\nimport { signOut } from \"../../../actions/auth\";\r\nimport { Prompt } from \"react-router-dom\";\r\n\r\nimport style from \"./MyData.scss\";\r\nimport GenericButton from \"../../UI/Button/Button\";\r\nimport { showDateTime } from \"bx-react-ui/src/utils/Helper\";\r\n\r\nexport const MyData = ({ toggleMyData }) => {\r\n const personInfo = useSelector(getSavedPersonInfo);\r\n const [accounts, setAccounts] = useState([]);\r\n const currentAccount = useSelector(getCurrentAccount);\r\n const dispatch = useDispatch();\r\n const [userDropdownIsOpen, setUserDropdownIsOpen] = useState(false);\r\n const [showProfileAnswers, setShowProfileAnswers] = useState(false);\r\n const [showRedoTest, setShowRedoTest] = useState(false);\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 const texts = useSelector(getTexts);\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 const profileRiskString = {\r\n Conservative: \"Conservador\",\r\n Moderate: \"Moderado\",\r\n Aggressive: \"Agresivo\",\r\n Aggresive: \"Agresivo\",\r\n };\r\n\r\n const profileRiskDescriptionString = {\r\n Conservative: texts.notes.investor_profile_conservative,\r\n Moderate: texts.notes.investor_profile_moderate,\r\n Aggressive: texts.notes.investor_profile_aggressive,\r\n Aggresive: texts.notes.investor_profile_aggressive,\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 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 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 });\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 toggleShowProfileAnswers = () => {\r\n setShowProfileAnswers((stateProfileAnswers) => !stateProfileAnswers);\r\n };\r\n\r\n const toggleShowRedoTest = () => {\r\n setShowRedoTest((stateRedoTest) => !stateRedoTest);\r\n };\r\n\r\n const userSelectorData = () => {\r\n return (\r\n <Fragment>\r\n {accounts.map((account, index) => (\r\n <DropdownItem\r\n className={style.accountItem}\r\n key={index}\r\n onClick={() => {\r\n handleChangeAccount(account);\r\n toggleUserDropdown();\r\n }}\r\n >\r\n <img src={greenDotIcon} alt=\"green-dot\" className={style.greenDot} />\r\n Cuenta {account.number}\r\n </DropdownItem>\r\n ))}\r\n </Fragment>\r\n );\r\n };\r\n\r\n if (!personInfo) return <CircularProgress />;\r\n\r\n return (\r\n <div className={style.subAssetClassDisplay}>\r\n <Row>\r\n <Col xs={12} className={style.titleWrapper}>\r\n <span className={style.iconWrapper} onClick={toggleMyData}>\r\n <Icons.ArrowLeftIcon className={style.iconArrow} />\r\n </span>\r\n <span className={style.titleProfile}>Mi perfil</span>\r\n </Col>\r\n <hr />\r\n </Row>\r\n <Row>\r\n <Col>\r\n <Container className={style.boxPersonalData}>\r\n <div>\r\n <p\r\n className={style.personName}\r\n >{`${personInfo.PhysicalPersonFirstName} ${personInfo.PhysicalPersonFirstLastName}`}</p>\r\n <p className={style.account}>Cuenta {currentAccount.AccountNumber}</p>\r\n </div>\r\n <div className={style.buttonPersonalData}>\r\n <div className={style.changeAccount}>\r\n <GenericButton\r\n label={\"Cambiar cuenta\"}\r\n rounded\r\n padding={\"16px 20px 16px 20px\"}\r\n lineHeight={\"28px\"}\r\n border-radius={\"24px\"}\r\n iconSvg={[{ width: \"20px\", item: changeAccountIcon }]}\r\n handleClick={() => {\r\n setUserDropdownIsOpen(!userDropdownIsOpen);\r\n }}\r\n ></GenericButton>\r\n <Dropdown\r\n isOpen={userDropdownIsOpen}\r\n toggle={toggleUserDropdown}\r\n nav\r\n inNavbar\r\n className={style.dropdown}\r\n tag=\"ul\"\r\n >\r\n <DropdownToggle nav caret className={style.userSelector}>\r\n <DropdownMenu className={style.dropDownMenu}>{userSelectorData()}</DropdownMenu>\r\n </DropdownToggle>\r\n </Dropdown>\r\n </div>\r\n <GenericButton\r\n label={\"Cerrar sesión\"}\r\n rounded\r\n padding={\"16px 26px 16px 26px\"}\r\n lineHeight={\"28px\"}\r\n handleClick={() => {\r\n dispatch(signOut());\r\n sessionStorage.clear();\r\n window.location.reload();\r\n }}\r\n iconSvg={[{ width: \"20px\", item: closeSessionIcon }]}\r\n ></GenericButton>\r\n </div>\r\n </Container>\r\n </Col>\r\n </Row>\r\n <Row>\r\n <Col md={5} className={style.colProfile}>\r\n <Container className={style.boxProfile}>\r\n <div>\r\n <p className={style.title}>Perfil del inversor </p>\r\n <div className={style.icon}>\r\n <Icons.ProfileIcon size=\"98px 86px\"></Icons.ProfileIcon>\r\n <p className={style.profileType}>\r\n Perfil {profileRiskString[personInfo.PersonProfileRiskName]}\r\n </p>\r\n </div>\r\n <div className={style.textProfile}>\r\n {profileRiskDescriptionString[personInfo.PersonProfileRiskName]}\r\n </div>\r\n </div>\r\n <div className={style.profileButtons}>\r\n <GenericButton\r\n label={\"Ver mis respuestas\"}\r\n padding={\"12px 35px 12px 35px\"}\r\n font-weight={600}\r\n backgroundColor={\"#E7E5E4\"}\r\n lineHeight={\"24px\"}\r\n rounded\r\n handleClick={toggleShowProfileAnswers}\r\n className={style.buttons}\r\n ></GenericButton>\r\n <GenericButton\r\n label={\"Rehacer prueba\"}\r\n padding={\"12px 45px 12px 45px\"}\r\n font-weight={600}\r\n backgroundColor={\"#E7E5E4\"}\r\n lineHeight={\"24px\"}\r\n rounded\r\n handleClick={toggleShowRedoTest}\r\n className={style.buttons}\r\n ></GenericButton>\r\n </div>\r\n </Container>\r\n </Col>\r\n <Col md={7}>\r\n <Container className={style.wrapperData}>\r\n <p className={style.title}>Mis datos </p>\r\n <div className={style.boxData}>\r\n <div className={style.data}>\r\n <div className={style.dataTitle}> Datos personales </div>\r\n <div className={style.divider}></div>\r\n </div>\r\n <p className={style.info}>\r\n <strong>Nombre y apellido: </strong>\r\n {`${personInfo.PhysicalPersonFirstName} ${personInfo.PhysicalPersonSecondName} ${personInfo.PhysicalPersonFirstLastName} ${personInfo.PhysicalPersonSecondLastName}`}\r\n </p>\r\n <p className={style.info}>\r\n <strong>Celular: </strong>\r\n {mobilePhone.PhoneNumber}\r\n </p>\r\n <p className={style.info}>\r\n <strong>Correo electrónico: </strong>\r\n {personInfo.PhysicalPersonEmail}\r\n </p>\r\n <p className={style.info}>\r\n <strong>Dirección: </strong>\r\n {`${legalAddress.LegalAddressStreet} ${legalAddress.LegalAddressNumber}, ${legalAddress.LegalAddressCityName}`}\r\n </p>\r\n </div>\r\n <div className={style.boxData}>\r\n <div className={style.data}>\r\n <div className={style.dataTitle}> Documento </div>\r\n <div className={style.divider}></div>\r\n </div>\r\n <Table className={style.table}>\r\n <tbody>\r\n <tr>\r\n <td>\r\n <strong>Tipo de documento: </strong>\r\n {personDocument.PhysicalPersonDocumentTypeName}\r\n </td>\r\n <td>\r\n <strong>Número de documento: </strong>\r\n {personDocument.PhysicalPersonDocumentNumber}\r\n </td>\r\n </tr>\r\n <tr>\r\n <td>\r\n <strong>Género: </strong>\r\n {genderString[personInfo.PhysicalPersonGender]}\r\n </td>\r\n <td>\r\n <strong>Estado civil: </strong>\r\n {civilStatusString[personInfo.PhysicalPersonCivilStatus]}\r\n </td>\r\n </tr>\r\n <tr>\r\n <td>\r\n <strong>Fecha de nacimiento: </strong>\r\n {moment(personInfo.PhysicalPersonDateOfBirth).format(\"DD/MM/YYYY\")}\r\n </td>\r\n <td>\r\n <strong>Lugar de nacimiento: </strong>\r\n {`${personInfo.PhysicalPersonCityOfBirthName}`}\r\n </td>\r\n </tr>\r\n </tbody>\r\n </Table>\r\n </div>\r\n <div className={style.boxData}>\r\n <div className={style.data}>\r\n <div className={style.dataTitle}> Ocupación </div>\r\n <div className={style.divider}></div>\r\n </div>\r\n <Table className={style.table}>\r\n <tbody>\r\n <tr>\r\n <td>\r\n <strong>Ocupación: </strong>\r\n {personInfo.PersonProfessionName}\r\n </td>\r\n <td>\r\n <strong>Ciudad (laboral): </strong>\r\n {legalAddress.LegalAddressCityName}\r\n </td>\r\n </tr>\r\n <tr>\r\n <td>\r\n <strong>Nombre de la empresa: </strong>\r\n {personInfo.PhysicalPersonInstitution}\r\n </td>\r\n <td>\r\n <strong>Actividad del negocio: </strong>\r\n {personInfo.PersonActivitySectorName}\r\n </td>\r\n </tr>\r\n </tbody>\r\n </Table>\r\n </div>\r\n </Container>\r\n </Col>\r\n </Row>\r\n <Prompt\r\n when={showProfileAnswers}\r\n message={(location) => {\r\n toggleShowProfileAnswers();\r\n // No permitir la navegación hacia atrás\r\n return false;\r\n }}\r\n />\r\n <Prompt\r\n when={showRedoTest}\r\n message={(location) => {\r\n toggleShowRedoTest();\r\n // No permitir la navegación hacia atrás\r\n return false;\r\n }}\r\n />\r\n {showProfileAnswers && <ProfileTestAnswer toggleProfileAnswers={toggleShowProfileAnswers} />}\r\n {showRedoTest && <ProfileTest toggleRedoTest={toggleShowRedoTest} />}\r\n </div>\r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"subAssetClassDisplay\":\"MyData_subAssetClassDisplay_sm6J7\",\"titleWrapper\":\"MyData_titleWrapper_3B7FW\",\"titleProfile\":\"MyData_titleProfile_3NCY1\",\"iconWrapper\":\"MyData_iconWrapper_HTXoR\",\"iconArrow\":\"MyData_iconArrow_2xPb4\",\"boxPersonalData\":\"MyData_boxPersonalData_3apJe\",\"buttonPersonalData\":\"MyData_buttonPersonalData_3Cl8_\",\"changeAccount\":\"MyData_changeAccount_XXwv4\",\"dropdown\":\"MyData_dropdown_ZeJ-J\",\"accountItem\":\"MyData_accountItem_1FhYN\",\"greenDot\":\"MyData_greenDot_1MZhc\",\"userSelector\":\"MyData_userSelector_2--FR\",\"dropDownMenu\":\"MyData_dropDownMenu_1hEjv\",\"personName\":\"MyData_personName_3CBP5\",\"account\":\"MyData_account_3rOxK\",\"colProfile\":\"MyData_colProfile_3wUkB\",\"boxProfile\":\"MyData_boxProfile_1fVzd\",\"title\":\"MyData_title_3ObaK\",\"profileType\":\"MyData_profileType_3sz8C\",\"icon\":\"MyData_icon_39eIE\",\"textProfile\":\"MyData_textProfile_3jIuN\",\"profileButtons\":\"MyData_profileButtons_1FaQ9\",\"wrapperData\":\"MyData_wrapperData_32mwG\",\"boxData\":\"MyData_boxData_2RdJ2\",\"data\":\"MyData_data_12yf3\",\"dataTitle\":\"MyData_dataTitle_1TJbm\",\"divider\":\"MyData_divider_3KQ7l\",\"info\":\"MyData_info_2gfiD\",\"table\":\"MyData_table_3Y9o_\",\"wrapperCol\":\"MyData_wrapperCol_31O01\"};","import React, { useState, Fragment } from \"react\";\r\nimport { Table, Label } from \"reactstrap\";\r\nimport { useSelector } from \"react-redux\";\r\nimport style from \"./OrdersComponent.scss\";\r\nimport pdf from \"../../../../public/svg/downloadPdf.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, getTexts } from \"../../../reducers/selectors\";\r\nimport { showToast } from \"../../../utils/helper\";\r\nimport { CircularProgress } from \"../../UI/CircularProgress/CircularProgress\";\r\nimport { Container } from \"../../UI/Container/Container\";\r\nimport { Col, Row } from \"../../UI/Customstrap/Customstrap\";\r\nimport moment from \"moment\";\r\nimport { FormattedNumber } from \"../../FormattedNumber/FormattedNumber\";\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 <CircularProgress />;\r\n\r\n const EmptyTable = () => {\r\n return <div className={style.message}>No hay órdenes disponibles.</div>;\r\n };\r\n\r\n if (loading) return <CircularProgress />;\r\n\r\n return (\r\n <Fragment>\r\n <Row className={style.headerTitle}>\r\n <Label>Órdenes en proceso</Label>\r\n </Row>\r\n <Row>\r\n <Col className={style.activityTable} lg=\"12\">\r\n <Container className={style.containerTable}>\r\n {orders.length === 0 ? (\r\n <EmptyTable />\r\n ) : (\r\n <div className={style.tableScroll}>\r\n <Table className={style.table}>\r\n <thead className={style.tableHead}>\r\n <tr className={style.tableRow}>\r\n <th className={`${style.tableH}`}>Fecha</th>\r\n <th className={`${style.tableH} `}>Producto</th>\r\n <th className={`${style.tableH} `}>Tipo</th>\r\n <th className={`${style.tableH}`}>Instrumento</th>\r\n <th className={style.tableH}>Monto total a operar</th>\r\n <th className={style.tableH}>Moneda</th>\r\n <th className={style.tableH}>{\" \"}</th>\r\n </tr>\r\n </thead>\r\n <tbody className={style.tableBody}>\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\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 += `${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 ammount = item.OrderPrice;\r\n break;\r\n case \"Stop\":\r\n ammountString = \"Stop\";\r\n ammount = item.OrderStopPrice;\r\n break;\r\n case \"StopLimit\":\r\n ammountString = \"Stop Limit\";\r\n ammount = item.OrderStopPrice;\r\n break;\r\n default:\r\n break;\r\n }\r\n description += `@ ${ammountString}`;\r\n\r\n try {\r\n if (+item.CurrentAccount.Precheck.Total !== 0)\r\n ammount = +item.CurrentAccount.Precheck.Total;\r\n } catch (errror) {\r\n console.error(error);\r\n }\r\n let side = item.OrderSide === \"Buy\" ? \"Compra\" : \"Venta\";\r\n if (item.AssetClassForm.trim() === \"Mutual Funds\") {\r\n if (item.OrderSide.trim() === \"Buy\") {\r\n side = \"Suscripción\";\r\n } else {\r\n side = item.CurrentAccount.IsFullLiquidation ? \"Rescate Total\" : \"Rescate Parcial\";\r\n }\r\n }\r\n\r\n if (item.AssetClassForm.trim() === \"Repo\") {\r\n side = item.OrderSide.trim() === \"Buy\" ? \"Reportador \" : \"Reportado \";\r\n }\r\n\r\n currency = item.OrderSettlementCurrencySymbol;\r\n if (item.OrderSettlementCurrencySymbol.trim() === \"PYG\") {\r\n currency = \"GS\";\r\n }\r\n\r\n return (\r\n <Fragment>\r\n <tr key={index} className={style.tableRow}>\r\n <td>{moment(item.OrderInitDate).format(\"DD MMM YYYY\")}</td>\r\n <td>{formString[item.AssetClassForm]}</td>\r\n <td>{side}</td>\r\n <td>{description}</td>\r\n <td>\r\n {ammount == 0 ? (\r\n \"-\"\r\n ) : (\r\n <FormattedNumber\r\n value={ammount}\r\n minimumFractionDigits={\r\n item.AssetClassForm === \"Mutual Funds\" && currency !== \"GS\" ? 2 : 0\r\n }\r\n maximumFractionDigits={\r\n item.AssetClassForm === \"Mutual Funds\" && currency !== \"GS\" ? 2 : 0\r\n }\r\n />\r\n )}\r\n </td>\r\n <td>{currency}</td>\r\n <td>\r\n <img\r\n src={pdf}\r\n className={style.icon}\r\n alt=\"pdf-icon\"\r\n onClick={() => handleDownload(item)}\r\n />\r\n </td>\r\n </tr>\r\n </Fragment>\r\n );\r\n })}\r\n </tbody>\r\n </Table>\r\n </div>\r\n )}\r\n </Container>\r\n </Col>\r\n </Row>\r\n {/* <Warning text={texts.notes.orders_note} /> */}\r\n </Fragment>\r\n );\r\n};\r\n\r\nexport default OrdersComponent;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"message\":\"OrdersComponent_message_pWRAK\",\"headerTitle\":\"OrdersComponent_headerTitle_1T3Hk\",\"activityTable\":\"OrdersComponent_activityTable_r_U4r\",\"containerTable\":\"OrdersComponent_containerTable_2v8sV\",\"table\":\"OrdersComponent_table_1GWoO\",\"tableHead\":\"OrdersComponent_tableHead_V4WA5\",\"tableRow\":\"OrdersComponent_tableRow_1w7LK\",\"tableH\":\"OrdersComponent_tableH_2hONj\",\"tableBody\":\"OrdersComponent_tableBody_1hHN0\",\"icon\":\"OrdersComponent_icon_nSspi\",\"md\":\"OrdersComponent_md_B8nIz\",\"sm\":\"OrdersComponent_sm_93Eyo\",\"tableScroll\":\"OrdersComponent_tableScroll_15z_f\"};","import React, { useEffect, useState } from \"react\";\r\nimport { NavLink, Link } from \"react-router-dom\";\r\nimport { Badge, Nav, NavItem, NavLink as RsNavLink, NavbarBrand, Label } from \"reactstrap\";\r\nimport classNames from \"classnames\";\r\nimport nav from \"./_nav\";\r\nimport cross from \"../../../../public/svg/x-symbol-svgrepo-com.svg\";\r\nimport MediaQuery from \"react-responsive\";\r\nimport BadgeIcon from \"../../Layout/BadgeIcon/BadgeIcon\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { getCounters } from \"../../../reducers/selectors\";\r\nimport { signOut } from \"../../../actions/auth\";\r\nimport { UserSelector } from \"../../UserSelector/UserSelector\";\r\nimport NavbarToggler from \"reactstrap/lib/NavbarToggler\";\r\nimport GenericButton from \"../../UI/Button/Button\";\r\nimport { currentAccountSet, personInfoSet } from \"../../../actions/entities\";\r\nimport { getCurrentAccount, getSavedPersonInfo } from \"../../../reducers/selectors\";\r\nimport { fetchGetAccounts } from \"../../../services/api/accounts\";\r\nimport { getPersonInfo } from \"../../../services/api/person\";\r\nimport { Prompt } from \"react-router-dom\";\r\nimport { MyData } from \"../MyData/MyData\";\r\n\r\nimport style from \"./Sidebar.scss\";\r\n\r\nimport menuIcon from \"../../../../public/svg/menu.svg\";\r\n\r\nconst Sidebar = () => {\r\n const dispatch = useDispatch();\r\n const counters = useSelector(getCounters);\r\n const personInfo = useSelector(getSavedPersonInfo);\r\n const [showMyData, setShowMyData] = useState(false);\r\n const currentAccount = useSelector(getCurrentAccount);\r\n const [isAppMobile, setIsAppMobile] = useState(false);\r\n\r\n useEffect(() => {\r\n setIsAppMobile(window.___APP_CONFIG___.APP_MOBILE);\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 }, []);\r\n\r\n useEffect(() => {\r\n fetchGetAccounts()\r\n .then((r) => {\r\n if (r.response.accounts.length > 0) {\r\n handleChangeAccount(r.response.accounts[0]);\r\n } else {\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 });\r\n }\r\n })\r\n .catch((err) => console.error(err));\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 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 <Badge className={classes} color={badge.variant}>\r\n {badge.text}\r\n </Badge>\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 <li key={key} className={classes}>\r\n {wrapper(title)}{\" \"}\r\n </li>\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 <li key={key} className={classes}></li>;\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 return (\r\n <React.Fragment>\r\n <NavItem key={key} className={style.item}>\r\n {isExternal(url) ? (\r\n <RsNavLink href={url} className={classes.link} active>\r\n <span className={style.wrapper}>\r\n <img src={iconUrl} className={style.iconSvg} />\r\n </span>\r\n <span>\r\n <i className={classes.icon}></i>\r\n {item.name}\r\n {badge(item.badge)}\r\n </span>\r\n </RsNavLink>\r\n ) : (\r\n <NavLink\r\n to={url}\r\n className={classes.link}\r\n activeClassName=\"active\"\r\n isActive={(tmp, e) => isActiveItem(e, url)}\r\n onClick={onClick}\r\n >\r\n <span>\r\n <span className={style.wrapper}>\r\n <img src={iconUrl} className={style.iconSvg} />\r\n </span>\r\n <i className={classes.icon}></i>\r\n <Label className={style.iconLabels}>{item.name}</Label>\r\n\r\n {badge(item.badge)}\r\n </span>\r\n </NavLink>\r\n )}\r\n <NavBadge counter={item.counter} />\r\n </NavItem>\r\n {item.name == \"Autorizaciones\" && (\r\n // <div\r\n // className={style.divHrFirst}\r\n // style={{ padding: \"10px\", paddingBottom: \"0px\", backgroundColor: \"#EDEDED\" }}\r\n // >\r\n //</div>\r\n <hr className={style.hrItems} />\r\n )}\r\n </React.Fragment>\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 : <BadgeIcon count={total} />;\r\n }\r\n };\r\n\r\n // nav dropdown\r\n const navDropdown = (item, key) => {\r\n return (\r\n <li key={key} className={activeRoute(item.url, props)}>\r\n <a className=\"nav-link nav-dropdown-toggle\" href=\"#\" onClick={handleClick}>\r\n <i className={item.icon}></i>\r\n {item.name}\r\n </a>\r\n <ul className=\"nav-dropdown-items\">{navList(item.children)}</ul>\r\n </li>\r\n );\r\n };\r\n\r\n // nav type\r\n\r\n const navType = (item, idx) => {\r\n return 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\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 toggleShowMyData = () => {\r\n setShowMyData((stateMyData) => !stateMyData);\r\n };\r\n\r\n // sidebar-nav root\r\n return (\r\n <div className={!isAppMobile ? `${style.sidebar} sidebar` : \"hideElement\"}>\r\n <nav style={{ height: \"100%\" }} className={`${style.sidebarNav} sidebar-nav`}>\r\n <MediaQuery minWidth={1023}>\r\n <div\r\n style={{\r\n background: \"#27272A\",\r\n display: \"flex\",\r\n alignItems: \"center\",\r\n paddingTop: \"35px\",\r\n justifyContent: \"space-around\",\r\n }}\r\n >\r\n <img\r\n id={style.imgLogo}\r\n src=\"/svg/SideBarIcons/full-logo-home-white.svg\"\r\n alt=\"logo\"\r\n style={{ width: \"235px\", backgroundColor: \"#27272A\" }}\r\n />\r\n </div>\r\n <div style={{ paddingTop: \"6px\", paddingBottom: \"0px\", backgroundColor: \"#27272A\" }}>\r\n <hr className={style.hr} />\r\n </div>\r\n </MediaQuery>\r\n <MediaQuery maxWidth={575}>\r\n <div className={style.mobileSidebarHeader}>\r\n <span className={style.hambMenuLogo}>\r\n <NavbarToggler\r\n className={`${style.navToggler} d-md-down-none`}\r\n onClick={(e) => {\r\n mobileSidebarToggle(e);\r\n }}\r\n >\r\n <img className={style.hambIcon} src={cross} alt=\"hamburger menu\" />\r\n </NavbarToggler>\r\n </span>\r\n\r\n {/* <img className={style.logo} src=\"/svg/SideBarIcons/logo-home.svg\" alt=\"Logo\" />\r\n <p className={style.dummyDiv}></p> */}\r\n </div>\r\n <div\r\n //id={style.imgLogo}\r\n src=\"/svg/SideBarIcons/full-logo-home-white.svg\"\r\n alt=\"logo\"\r\n style={{\r\n backgroundColor: \"#27272A\",\r\n display: \"flex\",\r\n justifyContent: \"start\",\r\n margin: \"0 auto\",\r\n }}\r\n >\r\n <img\r\n id={style.imgLogo}\r\n src=\"/svg/SideBarIcons/full-logo-home-white.svg\"\r\n alt=\"logo\"\r\n style={{ width: \"250px\", backgroundColor: \"#27272A\" }}\r\n />\r\n </div>\r\n <div className={style.hrDiv1} style={{ backgroundColor: \"#27272A\" }}>\r\n <hr className={style.hr} />\r\n </div>\r\n </MediaQuery>\r\n\r\n {/* <MediaQuery maxWidth={575}>\r\n <UserSelector isInNavbar />\r\n </MediaQuery> */}\r\n <MediaQuery minWidth={576}>\r\n <span id={style.mobileSidebarHeader}>\r\n <img\r\n src={cross}\r\n alt=\"cross\"\r\n className={style.cross}\r\n onClick={(e) => {\r\n mobileSidebarToggle(e);\r\n }}\r\n />\r\n <div\r\n id={style.imgLogo}\r\n src=\"/svg/SideBarIcons/logo-home.svg\"\r\n alt=\"logo\"\r\n style={{ backgroundColor: \"#EDEDED\", display: \"flex\" }}\r\n >\r\n <img\r\n id={style.imgLogo}\r\n src=\"/svg/SideBarIcons/logo-home.svg\"\r\n alt=\"logo\"\r\n style={{ width: \"100px\", backgroundColor: \"#EDEDED\" }}\r\n />\r\n <div className={style.verticaLine}></div>\r\n <Label className={style.logoLabel}>Casa de Bolsa</Label>\r\n </div>\r\n <div className={style.hrDiv} style={{ backgroundColor: \"#EDEDED\" }}>\r\n <hr className={style.hr} />\r\n </div>\r\n </span>\r\n </MediaQuery>\r\n\r\n <div className={style.orangeBackground} style={{ justifyContent: \"space-between\" }}>\r\n <Nav className={style.nav} id=\"navSidebar\">\r\n {navList(nav.items)}\r\n </Nav>\r\n <div className={style.lastDiv}>\r\n {/* <div className={style.asesor}>\r\n <Label style={{ fontWeight: 500, color: \"#57534E\" }}>Mi asesor</Label>\r\n <Label>\r\n {currentAccount.advisorName}\r\n {currentAccount.advisorFirstLastName}\r\n </Label>\r\n <Label>{currentAccount.advisorPhone}</Label>\r\n </div> */}\r\n <MediaQuery maxWidth={320}>\r\n <div className={style.hrDiv}>\r\n <hr className={style.hr} />\r\n </div>\r\n <GenericButton\r\n width={\"100%\"}\r\n // position={\"absolute\"}\r\n //bottom={\"2px\"}\r\n label={\"Mi cuenta\"}\r\n padding={\"12px 16px\"}\r\n border={\"1px solid #E7E5E4\"}\r\n textColor={\"#79716B\"}\r\n font-weight={600}\r\n backgroundColor={\"#FFFF\"}\r\n className={style.myAccountButton}\r\n lineHeight={\"24px\"}\r\n handleClick={toggleShowMyData}\r\n iconSvg={[\r\n { width: \"7px\", item: \"../../svg/SideBarIcons/green-dot.svg\" },\r\n { width: \"20px\", item: \"../../svg/SideBarIcons/user.svg\" },\r\n ]}\r\n style={{ margin: \"0 auto\", width: 264 }}\r\n ></GenericButton>\r\n </MediaQuery>\r\n <MediaQuery minWidth={321} maxWidth={575}>\r\n <div className={style.hrDiv}>\r\n <hr className={style.hr} />\r\n </div>\r\n <GenericButton\r\n width={\"100%\"}\r\n // position={\"absolute\"}\r\n //bottom={\"2px\"}\r\n label={\"Mi cuenta\"}\r\n padding={\"12px 16px\"}\r\n border={\"1px solid #3F3F46\"}\r\n textColor={\"#FAFAFA\"}\r\n fontWeight={600}\r\n className={style.myAccountButton}\r\n backgroundColor={\"#3F3F46\"}\r\n lineHeight={\"24px\"}\r\n handleClick={toggleShowMyData}\r\n iconSvg={[\r\n { width: \"7px\", item: \"../../svg/SideBarIcons/green-dot.svg\" },\r\n { width: \"20px\", item: \"../../svg/SideBarIcons/user.svg\" },\r\n ]}\r\n style={{ margin: \"0 auto\", width: 264 }}\r\n ></GenericButton>\r\n </MediaQuery>\r\n <MediaQuery minWidth={576}>\r\n <div className={style.hrDiv}>\r\n <hr className={style.hr} />\r\n </div>\r\n {/* <Link to=\"/myData\"> */}\r\n <div className={style.accountWrap}>\r\n <GenericButton\r\n width={\"312px\"}\r\n // position={\"absolute\"}\r\n //bottom={\"60px\"}\r\n label={\"Mi cuenta\"}\r\n padding={\"12px 16px\"}\r\n className={style.myAccountButton}\r\n border={\"1px solid #E7E5E4\"}\r\n textColor={\"#79716B\"}\r\n font-weight={600}\r\n backgroundColor={\"#FFFF\"}\r\n lineHeight={\"24px\"}\r\n handleClick={toggleShowMyData}\r\n iconSvg={[\r\n { width: \"7px\", item: \"../../svg/SideBarIcons/green-dot.svg\" },\r\n { width: \"20px\", item: \"../../svg/SideBarIcons/user.svg\" },\r\n ]}\r\n style={{ margin: \"0 auto\", width: 264 }}\r\n ></GenericButton>\r\n </div>\r\n\r\n {/* </Link> */}\r\n </MediaQuery>\r\n </div>\r\n </div>\r\n </nav>\r\n <Prompt\r\n when={showMyData}\r\n message={(location) => {\r\n // Ejecutar la función personalizada antes de la navegación hacia atrás\r\n toggleShowMyData();\r\n // No permitir la navegación hacia atrás\r\n return false;\r\n }}\r\n />\r\n {showMyData && <MyData toggleMyData={toggleShowMyData} />}\r\n </div>\r\n );\r\n};\r\n\r\nexport default Sidebar;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"hr\":\"Sidebar_hr_tcCt0\",\"active\":\"Sidebar_active_HzgPf\",\"accountWrap\":\"Sidebar_accountWrap_2ugTm\",\"navSidebar\":\"Sidebar_navSidebar_3wttx\",\"asesor\":\"Sidebar_asesor_1Lw4s\",\"lastDiv\":\"Sidebar_lastDiv_RD3GN\",\"wrapper\":\"Sidebar_wrapper_28rvT\",\"badgeIcon\":\"Sidebar_badgeIcon_1_iOH\",\"badgeIconCounter\":\"Sidebar_badgeIconCounter_Jlq6b\",\"circle\":\"Sidebar_circle_3Ae41\",\"verticaLine\":\"Sidebar_verticaLine_20-c7\",\"logoLabel\":\"Sidebar_logoLabel_1AZ1W\",\"iconLabels\":\"Sidebar_iconLabels_179WH\",\"imgLogo\":\"Sidebar_imgLogo_hLf_g\",\"mobileSidebarHeader\":\"Sidebar_mobileSidebarHeader_j_PNo\",\"hideElement\":\"Sidebar_hideElement_CSOdk\",\"orangeBackground\":\"Sidebar_orangeBackground_o3f8I\",\"nav\":\"Sidebar_nav_3EVl-\",\"item\":\"Sidebar_item_3ptqQ\",\"iconSvg\":\"Sidebar_iconSvg_2t2bn\",\"hrItems\":\"Sidebar_hrItems_3MQ6M\",\"hrDiv\":\"Sidebar_hrDiv_16J5n\",\"divHrFirst\":\"Sidebar_divHrFirst_Uyga2\",\"sidebar\":\"Sidebar_sidebar_3uHTX\",\"cross\":\"Sidebar_cross_19emx\",\"nav-link\":\"Sidebar_nav-link_wvx67\",\"sidebarNav\":\"Sidebar_sidebarNav_3IIRP\",\"hambMenuLogo\":\"Sidebar_hambMenuLogo_6VM0I\",\"navToggler\":\"Sidebar_navToggler_1Zuwe\",\"logo\":\"Sidebar_logo_wFUKg\",\"dummyDiv\":\"Sidebar_dummyDiv_3Trfb\",\"hambIcon\":\"Sidebar_hambIcon_3_yfG\",\"myAccountButton\":\"Sidebar_myAccountButton_2X2IW\"};","export default {\r\n items: [\r\n {\r\n name: \"Portafolio\",\r\n url: \"/\",\r\n iconUrl: \"../svg/SideBarIcons/portafolio.svg\",\r\n },\r\n {\r\n name: \"Histórico\",\r\n url: \"/history\",\r\n iconUrl: \"../svg/SideBarIcons/historico.svg\",\r\n },\r\n {\r\n name: \"Ingresos futuros\",\r\n url: \"/futureIncome\",\r\n iconUrl: \"../svg/SideBarIcons/ingresosFuturos.svg\",\r\n },\r\n {\r\n name: \"Reportes mensuales\",\r\n url: \"/calendar\",\r\n iconUrl: \"../svg/SideBarIcons/estadosMensuales.svg\",\r\n },\r\n {\r\n name: \"Órdenes en proceso\",\r\n url: \"/orders\",\r\n iconUrl: \"../svg/SideBarIcons/ordenes.svg\",\r\n counter: \"inProcessOrders\",\r\n },\r\n {\r\n name: \"Autorizaciones\",\r\n url: \"/authorizations\",\r\n iconUrl: \"../svg/SideBarIcons/autorizaciones.svg\",\r\n },\r\n {\r\n name: \"Invertir\",\r\n url: \"/invest\",\r\n iconUrl: \"../svg/SideBarIcons/invertir.svg\",\r\n },\r\n\r\n // {\r\n // name: \"Notificaciones\",\r\n // url: \"/notifications\",\r\n // iconUrl: \"../svg/notificaciones.svg\",\r\n // counter: \"notifications\",\r\n // },\r\n // {\r\n // name: \"Documentación\",\r\n // url: \"/documentation\",\r\n // iconUrl: \"../svg/documentacion.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 // name: \"Cerrar sesión\",\r\n // url: \"/login\",\r\n // iconUrl: \"../svg/logout.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 { Icons } from \"../../components/UI/Icon/Icon\";\r\nimport GenericButton from \"../../components/UI/Button/Button\";\r\nimport downloadIcon from \"../../../public/svg/ButtonIcons/download.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 showToast(\"Contrato confirmado correctamente\");\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 <Modal isOpen={contract} className={style.modalWrapper}>\r\n <Container className={style.contractContainer}>\r\n <span className={style.contractTitle}>Aceptá el Contrato legal</span>\r\n <div className={style.text}>Revisá el siguiente documento:</div>\r\n <div className={style.contractFileCard}>\r\n <div className={style.boxContract}>\r\n <Icons.FileIcon size=\"md\" />\r\n <div>\r\n <p className={style.contractPdf}>\r\n {contract && contract.LegalContractAttachmentName\r\n ? `${contract.LegalContractAttachmentName}.${contract.LegalContractAttachmentExtension}`\r\n : \"No hay contratos disponibles.\"}\r\n </p>\r\n </div>\r\n </div>\r\n <div className={style.pdfButtons}>\r\n <div className={style.downloadPdf}>\r\n <GenericButton\r\n handleClick={getFile}\r\n right\r\n rounded\r\n width={\"200px\"}\r\n marginLeft={\"0px\"}\r\n label={\"Descargar PDF\"}\r\n padding={\"10px 22px\"}\r\n iconSvg={[{ width: \"24px\", item: downloadIcon }]}\r\n ></GenericButton>\r\n </div>\r\n </div>\r\n </div>\r\n <div className={style.chekboxContract}>\r\n <span onClick={handleChangeCheckbox}>\r\n {checked ? (\r\n <Icons.CheckboxCheckedIcon className={style.icon} />\r\n ) : (\r\n <Icons.CheckboxUncheckedIcon className={style.icon} />\r\n )}\r\n </span>\r\n <p className={style.textAcceptContract} onClick={handleChangeCheckbox}>\r\n He leído, comprendido y acepto los términos y condiciones del documento que acabo de leer\r\n </p>\r\n </div>\r\n\r\n {loading ? (\r\n <CircularProgress />\r\n ) : (\r\n <Button\r\n className={style.buttonConfirmContract}\r\n onClick={handleAuthorizeContract}\r\n disabled={loading || !checked}\r\n >\r\n Confirmar\r\n </Button>\r\n )}\r\n </Container>\r\n </Modal>\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\"};","import React, { useState, useEffect } from \"react\";\r\nimport { Modal, ModalHeader, ModalBody, ModalFooter, Button, Row, Col } from \"reactstrap\";\r\nimport { useSelector } from \"react-redux\";\r\nimport moment from \"moment\";\r\nimport { FormattedNumber } from \"../../FormattedNumber/FormattedNumber\";\r\nimport { getCurrentAccount } from \"../../../reducers/selectors\";\r\nimport { fetchInProcesOrderPDF } from \"../../../services/api/accounts\";\r\n\r\nimport toggleIcon from \"../../../../public/svg/x-symbol-svgrepo-com.svg\";\r\nimport pdf from \"../../../../public/svg/pdf.svg\";\r\n\r\nimport style from \"./AuthorizationModal.scss\";\r\n\r\nexport const AuthorizationModal = ({ modal, toggle, authItem, onReject, onAuthorize }) => {\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\") {\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 fetchInProcesOrderPDF({\r\n orderId: order.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(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 };\r\n\r\n return (\r\n <Modal size=\"lg\" isOpen={modal} contentClassName={style.content}>\r\n <div className={style.modalWrapper}>\r\n <ModalHeader className={style.header}>\r\n <span className={style.titleContainer}>\r\n <p className={style.title}>Autorización</p>\r\n <img\r\n className={style.toggleIcon}\r\n src={toggleIcon}\r\n alt=\"X\"\r\n onClick={() => {\r\n toggle();\r\n }}\r\n />\r\n </span>\r\n <p>Nueva orden - pedido de autorización de orden - pendiente</p>\r\n </ModalHeader>\r\n {authItem && order && (\r\n <ModalBody className={style.body}>\r\n <p className={style.bodyTitle}>Lado de la orden</p>\r\n <p className={style.bodySubTitle}>{order.OrderSide === \"Buy\" ? \"Compra \" : \"Venta \"}</p>\r\n\r\n <p className={style.bodyTitle}>Descripción de los valores</p>\r\n <p\r\n className={style.bodySubTitle}\r\n >{`${order.AssetTicker.trim()} - ${order.AssetDescription.trim()} `}</p>\r\n\r\n <p className={style.bodyTitle}>Valor nominal</p>\r\n <p className={style.bodySubTitle}>\r\n {order.ammount === 0 ? (\r\n \"-\"\r\n ) : (\r\n <FormattedNumber\r\n value={order.ammount}\r\n minimumFractionDigits={order.currency == \"USD\" ? 2 : 0}\r\n maximumFractionDigits={order.currency == \"USD\" ? 2 : 0}\r\n />\r\n )}\r\n </p>\r\n\r\n <p className={style.bodyTitle}>Precio</p>\r\n <p className={style.bodySubTitle}>{order.ammountString}</p>\r\n\r\n <p className={style.bodyTitle}>ISIN</p>\r\n <p className={style.bodySubTitle}>{order.AssetISIN}</p>\r\n\r\n <p className={style.bodyTitle}>Cuenta</p>\r\n <p className={style.bodySubTitle}>{order.CurrentAccount.AccountNumber}</p>\r\n\r\n <p className={style.bodyTitle}>Fecha de la orden</p>\r\n <p className={style.bodySubTitle}>{moment(authItem.dateTime).format(\"DD/MM/YYYY\")}</p>\r\n </ModalBody>\r\n )}\r\n <ModalFooter className={style.footer}>\r\n <Row className={style.buttonsWrapper}>\r\n <div className={style.buttonContainer}>\r\n <img src={pdf} className={style.icon} alt=\"pdf-icon\" onClick={() => handleDownload(order)} />\r\n <Button\r\n className={style.button}\r\n onClick={() => {\r\n onReject(authItem);\r\n toggle();\r\n }}\r\n >\r\n rechazar\r\n </Button>\r\n <Button\r\n className={`${style.button} ${style.botonAutorizar}`}\r\n onClick={() => {\r\n onAuthorize(authItem);\r\n toggle();\r\n }}\r\n >\r\n autorizar\r\n </Button>\r\n </div>\r\n </Row>\r\n <Row className={style.disclaimersWrapper}>\r\n <div className={style.disclaimers}>\r\n <p>*De no completarse se considera válida por 30 días corridos</p>\r\n <p>Disclaimer</p>\r\n <p>Dejo constancia que recibo copia de las presentes instrucciones.</p>\r\n </div>\r\n </Row>\r\n </ModalFooter>\r\n </div>\r\n </Modal>\r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"content\":\"AuthorizationModal_content_1ELae\",\"header\":\"AuthorizationModal_header_XJwXr\",\"titleContainer\":\"AuthorizationModal_titleContainer_38IRK\",\"title\":\"AuthorizationModal_title_2z0cr\",\"toggleIcon\":\"AuthorizationModal_toggleIcon_1xhsX\",\"body\":\"AuthorizationModal_body_te6Dm\",\"bodyTitle\":\"AuthorizationModal_bodyTitle_3OvHC\",\"bodySubTitle\":\"AuthorizationModal_bodySubTitle_2kXC1\",\"footer\":\"AuthorizationModal_footer_2F28D\",\"icon\":\"AuthorizationModal_icon_D5wcF\",\"button\":\"AuthorizationModal_button_1bIJq\",\"botonAutorizar\":\"AuthorizationModal_botonAutorizar_2muSX\",\"contrato\":\"AuthorizationModal_contrato_2nXHL\",\"buttonsWrapper\":\"AuthorizationModal_buttonsWrapper_DOwv9\",\"disclaimersWrapper\":\"AuthorizationModal_disclaimersWrapper_o464N\",\"disclaimers\":\"AuthorizationModal_disclaimers_1xN2V\"};","import React, { useState } from \"react\";\r\nimport { Modal, ModalBody } from \"reactstrap\";\r\nimport { AccessConfiguration } from \"../../AccessConfiguration/AccessConfiguration\";\r\n\r\nimport style from \"./FirstAccessModal.scss\";\r\n\r\nexport const FirstAccessModal = ({ approved, handleAuthorize }) => {\r\n return (\r\n <Modal size=\"lg\" isOpen contentClassName={style.content}>\r\n <ModalBody>\r\n <AccessConfiguration approved={approved} handleAuthorize={handleAuthorize} />\r\n </ModalBody>\r\n </Modal>\r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"content\":\"FirstAccessModal_content_326rY\"};","import React, { useEffect, useState } from \"react\";\r\nimport { Modal, ModalBody, Col, Row, Button } from \"reactstrap\";\r\nimport cross from \"../../../../public/svg/x-symbol-svgrepo-com.svg\";\r\nimport style from \"./InvestBuyModal.scss\";\r\nimport { FormattedNumber } from \"../../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\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 }\r\n }, [io]);\r\n\r\n if (!trade || !item) return null;\r\n\r\n // const getName = (assetInformation) => {\r\n // let res = assetInformation.IssuerName + \" \" + assetInformation.AssetRiskTypeDesc;\r\n // return res;\r\n // };\r\n\r\n return (\r\n <Modal size=\"lg\" isOpen={modal} contentClassName={style.content}>\r\n <ModalBody className={style.body}>\r\n <Row>\r\n <Col className={style.wrapperCol} lg=\"12\">\r\n <Row className={style.row}>\r\n <div className={style.container}>\r\n <div className={style.successTitle}>\r\n <p>Inversión realizada con éxito</p>\r\n <img className={style.cross} src={cross} alt=\"cross\" onClick={toggle} />\r\n </div>\r\n <div className={style.containerFirstRow}>\r\n <div className={style.subtitle}>{getAssetClassName(item.AssetClassForm)}</div>\r\n <h4 className={style.name}>{item.AssetName}</h4>\r\n </div>\r\n <div className={style.containerSecondRow}>\r\n <Row>\r\n <Col className={style.col} xs={6} sx={6} md={6} lg={3} xl={3} xxl={3}>\r\n <div className={style.subtitle}>total debitado</div>\r\n <div className={style.total}>\r\n <FormattedNumber\r\n value={ioTotal}\r\n minimumFractionDigits={item.AssetInformation.CurrencyISO == \"USD\" ? 2 : 0}\r\n maximumFractionDigits={item.AssetInformation.CurrencyISO == \"USD\" ? 2 : 0}\r\n />\r\n </div>\r\n </Col>\r\n <Col className={style.col} xs={6} sx={6} md={6} lg={3} xl={3} xxl={3}>\r\n <div className={style.subtitle}>estado de la transacción</div>\r\n <div className={style.state}>en proceso</div>\r\n </Col>\r\n <Col className={style.col} xs={6} sx={6} md={6} lg={3} xl={3} xxl={3}>\r\n <div className={style.subtitle}>fecha</div>\r\n <div className={style.date}>{moment().format(\"DD/MM/YYYY\")}</div>\r\n </Col>\r\n <Col className={style.col} xs={6} sx={6} md={6} lg={3} xl={3} xxl={3}>\r\n <div className={style.subtitle}>número de la operación</div>\r\n <div className={style.operationNumber}>{trade.TradeId}</div>\r\n </Col>\r\n </Row>\r\n </div>\r\n <div className={style.containerThirdRow}>\r\n <Row>\r\n <Col className={style.col} xs={6} sm={4} md={3} lg={3} xl={3} xxl={3}>\r\n <div className={style.subtitle}>número de la operación</div>\r\n <div className={style.total}>{trade.TradeId}</div>\r\n </Col>\r\n <Col className={style.col} xs={6} sm={4} md={3} lg={3} xl={3} xxl={3}>\r\n <div className={style.subtitle}>tipo de inversión</div>\r\n <div className={style.state}>\r\n {item.AssetInformation.AssetOfferType === \"Private\" ? \"Privado\" : null}\r\n {item.AssetInformation.AssetOfferType === \"Public\" ? \"Público\" : null}\r\n </div>\r\n </Col>\r\n <Col className={style.col} xs={6} sm={4} md={3} lg={3} xl={3} xxl={3}>\r\n <div className={style.subtitle}>operación</div>\r\n <div className={style.date}>compra</div>\r\n </Col>\r\n <Col className={style.col} xs={6} sm={4} md={3} lg={3} xl={3} xxl={3}>\r\n <div className={style.subtitle}>precio</div>\r\n <div className={style.operationNumber}>\r\n <FormattedNumber\r\n value={trade.TradeAvgPrice}\r\n minimumFractionDigits={4}\r\n maximumFractionDigits={4}\r\n />\r\n </div>\r\n </Col>\r\n\r\n <Col className={style.col} xs={6} sm={4} md={3} lg={3} xl={3} xxl={3}>\r\n <div className={style.subtitle}>cantidad</div>\r\n <div className={style.total}>\r\n <FormattedNumber\r\n value={trade.TradeQuantity}\r\n minimumFractionDigits={0}\r\n maximumFractionDigits={0}\r\n />\r\n </div>\r\n </Col>\r\n <Col className={style.col} xs={6} sm={4} md={3} lg={3} xl={3} xxl={3}>\r\n <div className={style.subtitle}>rendimiento</div>\r\n <div className={style.state}>\r\n <FormattedNumber\r\n value={item.AssetPerformance}\r\n minimumFractionDigits={2}\r\n maximumFractionDigits={2}\r\n />\r\n %\r\n </div>\r\n </Col>\r\n <Col className={style.col} xs={6} sm={4} md={3} lg={3} xl={3} xxl={3}>\r\n <div className={style.subtitle}>tasa nominal</div>\r\n <div className={style.date}>\r\n <FormattedNumber\r\n value={item.AssetInformation.AssetPaymentRateFixed}\r\n minimumFractionDigits={2}\r\n maximumFractionDigits={2}\r\n />\r\n %\r\n </div>\r\n </Col>\r\n <Col className={style.col} xs={6} sm={4} md={3} lg={3} xl={3} xxl={3}>\r\n <div className={style.subtitle}>vencimiento</div>\r\n <div className={style.operationNumber}>\r\n {moment(item.AssetInformation.AssetMaturityDate).format(\"DD/MM/YYYY\")}\r\n </div>\r\n </Col>\r\n\r\n <Col className={style.col} xs={6} sm={4} md={3} lg={3} xl={3} xxl={3}>\r\n <div className={style.subtitle}>comisión corretaje</div>\r\n <div className={style.total}>\r\n {`${fields.SettlementCurrency} `}\r\n <FormattedNumber\r\n value={fields.Commission}\r\n minimumFractionDigits={item.AssetInformation.CurrencyISO == \"USD\" ? 2 : 0}\r\n maximumFractionDigits={item.AssetInformation.CurrencyISO == \"USD\" ? 2 : 0}\r\n />\r\n </div>\r\n </Col>\r\n <Col className={style.col} xs={6} sm={4} md={3} lg={3} xl={3} xxl={3}>\r\n <div className={style.subtitle}>ISIN</div>\r\n <div className={style.state}>{item.AssetInformation.AssetTicker}</div>\r\n </Col>\r\n <Col className={style.col} xs={12} sm={8} md={6} lg={6} xl={6} xxl={6}>\r\n <div className={style.subtitle}>cuenta débito</div>\r\n <div\r\n className={style.date}\r\n >{`${trade.activeAccount.PersonBankAccountName} nº${trade.activeAccount.PersonBankAccountNumber}`}</div>\r\n </Col>\r\n </Row>\r\n </div>\r\n <div className={style.footer}>\r\n <Button\r\n className={style.printButton}\r\n onClick={() => {\r\n window.print();\r\n }}\r\n >\r\n Imprimir\r\n </Button>\r\n </div>\r\n </div>\r\n </Row>\r\n </Col>\r\n </Row>\r\n </ModalBody>\r\n </Modal>\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 { Button } from \"reactstrap\";\r\nimport moment from \"moment\";\r\nimport { FormattedNumber } from \"../../FormattedNumber/FormattedNumber\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { useDebounce } from \"bx-react-ui/src/utils/hooks\";\r\nimport { CircularProgress } from \"../../UI/CircularProgress/CircularProgress\";\r\nimport { Icons } from \"../../UI/Icon/Icon\";\r\nimport { Row, Col } from \"../../UI/Customstrap/Customstrap\";\r\nimport GenericButton from \"../../../components/UI/Button/Button\";\r\nimport confirmIcon from \"../../../../public/svg/ButtonIcons/right-arrow.svg\";\r\nimport { getEarnings, getPrechecks, takeOffer } from \"../../../services/api/inout\";\r\nimport { getSavedPersonInfo, getCurrentAccount, getTexts } from \"../../../reducers/selectors\";\r\nimport { showToast } from \"../../../utils/helper\";\r\n\r\nimport style from \"./InvestModal.scss\";\r\nimport { BankAccountsSelector } from \"../../BankAccountsSelector/BankAccountsSelector\";\r\nimport { modes } from \"../../Invest/FundsTable/FundsAssetTable/FundsAssetTable\";\r\n\r\nexport const InvestModal = ({ modal, toggle, item }) => {\r\n const [value, setValue] = useState(0);\r\n const debValue = useDebounce(value, 300);\r\n const [activeAccount, setActiveAccount] = useState(null);\r\n const [loading, setLoading] = useState(false);\r\n const [bankAccountsLoading, setBankAccountsLoading] = useState(true);\r\n const [loadingEarnings, setLoadingEarnings] = useState(false);\r\n const [bankAccounts, setBankAccounts] = useState([]);\r\n const [anyError, setAnyError] = useState(false);\r\n const [fields, setFields] = useState({\r\n AssetCouponRate: 0,\r\n SettlementCurrency: \"\",\r\n SettlementCurrencyId: \"\",\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 (personInfo.PersonBankAccount) {\r\n setBankAccounts(personInfo.PersonBankAccount);\r\n }\r\n }, [personInfo]);\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 SettlementCurrencyId: defaultCurrency.SettlementCurrencyId,\r\n }));\r\n }\r\n });\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 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, fields.SettlementCurrency]);\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 executePrechecks = async () => {\r\n try {\r\n const { response } = await getPrechecks({\r\n order: {\r\n OrderSide: \"Buy\",\r\n OrderSettlementCurrencyId: fields.SettlementCurrencyId,\r\n CurrentAccount: {\r\n Precheck: {\r\n Total: +fields.DebitTotal,\r\n },\r\n HolderId: personInfo.PersonId,\r\n AccountId: currentAccount.id,\r\n },\r\n },\r\n });\r\n\r\n if (response.result.Code !== 200) {\r\n showToast(response.result.Description, true);\r\n return false;\r\n }\r\n return true;\r\n } catch (err) {\r\n console.error(err);\r\n showToast(\"Error comprobando la inversión\", true);\r\n return false;\r\n }\r\n };\r\n\r\n const validate = async () => {\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 (!activeAccount) {\r\n showToast(\"Debe seleccionar una cuenta\", true);\r\n return false;\r\n }\r\n\r\n const prechecks = await executePrechecks();\r\n if (!prechecks) return false;\r\n\r\n return true;\r\n };\r\n\r\n const onConfirm = async () => {\r\n setLoading(() => true);\r\n const validated = await validate();\r\n if (validated) {\r\n const payload = {\r\n offerid: item.OfferId,\r\n quantity: value,\r\n accountNumber: currentAccount.AccountNumber,\r\n bankAccountNumber: activeAccount.PersonBankAccountNumber,\r\n };\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 showToast(\"Se envió la solicitud de compra.\");\r\n toggle(this);\r\n }\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n showToast(\"Error enviando la solicitud de compra.\", true);\r\n })\r\n .finally(() => {\r\n setLoading(() => false);\r\n });\r\n } else {\r\n setLoading(() => false);\r\n }\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 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 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 handleSetAnyError = () => {\r\n setAnyError(() => true);\r\n };\r\n\r\n const handleBankAccountsLoading = (value) => {\r\n setBankAccountsLoading(() => value);\r\n };\r\n\r\n const NoBankAccountsAvailable = () => {\r\n return (\r\n <div style={{ textAlign: \"center\", marginTop: \"15px\" }}>\r\n <span style={{ fontSize: \"16px\", fontWeight: \"bold\" }}>\r\n No hay cuentas de banco disponibles en esta moneda o no tienen saldo suficiente para realizar esta\r\n compra.\r\n </span>\r\n </div>\r\n );\r\n };\r\n\r\n return (\r\n <div className={style.subAssetClassDisplay}>\r\n <Row>\r\n <Col xs={12} className={style.titleWrapper}>\r\n <span className={style.iconWrapper} onClick={toggle}>\r\n <Icons.ArrowLeftIcon className={style.iconArrow} />\r\n </span>\r\n <span className={style.title}>Detalle de la inversión</span>\r\n </Col>\r\n <hr className={style.hr} />\r\n </Row>\r\n <Row>\r\n <div className={style.summary}>\r\n <Col className={style.firstCol} xs={3}>\r\n <span className={style.offerTitle}>\r\n {\" \"}\r\n {item.AssetName.substring(0, item.AssetName.indexOf(\"-\"))}\r\n </span>\r\n <span className={style.valueContainer}>\r\n <span className={style.offerValue}> Valor: </span>\r\n <FormattedNumber\r\n value={(item.AssetInformation.AssetParValue * item.OfferPrice) / 100}\r\n minimumFractionDigits={item.AssetInformation.CurrencyISO === \"PYG\" ? 0 : 2}\r\n maximumFractionDigits={item.AssetInformation.CurrencyISO === \"PYG\" ? 0 : 2}\r\n />\r\n <span className={style.currency}> {item.AssetInformation.CurrencyISO}</span>\r\n </span>\r\n <span className={style.ISINContainer}>\r\n <span className={style.offerValue}> ISIN: </span>\r\n <span>\r\n {item.AssetInformation.AssetDefaultIdentifierValue\r\n ? item.AssetInformation.AssetDefaultIdentifierValue\r\n : \"-\"}\r\n </span>\r\n </span>\r\n </Col>\r\n <Col className={style.secondCol} xs={8}>\r\n <span className={style.propertyContainer}>\r\n <span className={style.propertyTitle}>Valor por unidad</span>\r\n <FormattedNumber\r\n value={item.OfferPrice}\r\n minimumFractionDigits={item.AssetInformation.CurrencyISO === \"PYG\" ? 4 : 4}\r\n maximumFractionDigits={item.AssetInformation.CurrencyISO === \"PYG\" ? 4 : 4}\r\n />\r\n </span>\r\n <span className={style.propertyContainer}>\r\n <span className={style.propertyTitle}> Rendimiento (TIR)</span>\r\n <span className={style.propertyValue}>\r\n <FormattedNumber\r\n value={item.NominalRate}\r\n minimumFractionDigits={2}\r\n maximumFractionDigits={2}\r\n />\r\n %\r\n </span>\r\n </span>\r\n <span className={style.propertyContainer}>\r\n <span className={style.propertyTitle}> Tasa cupón</span>\r\n <span className={style.propertyValue}>\r\n <FormattedNumber\r\n value={item.AssetInformation.AssetPaymentRate}\r\n minimumFractionDigits={2}\r\n maximumFractionDigits={2}\r\n />\r\n %\r\n </span>\r\n </span>\r\n <span className={style.propertyContainer}>\r\n <span className={style.propertyTitle}> Vencimiento</span>\r\n {item.AssetInformation.AssetMaturityDate === \"0000-00-00\"\r\n ? \"-\"\r\n : moment(item.AssetInformation.AssetMaturityDate).format(\"DD/MM/YYYY\")}\r\n </span>\r\n <span className={style.propertyContainer}>\r\n <span className={style.propertyTitle}> Pago de interés</span>\r\n {getPaymentString(\r\n item.AssetInformation.AssetCouponDividendPaymentBase,\r\n item.AssetInformation.AssetCouponDividendPaymentFrecuency\r\n )}\r\n </span>\r\n <span className={style.propertyContainer}>\r\n <span className={style.propertyTitle}> Plazo residual</span>\r\n {item.AssetInformation.SubAssetClassInfo.SubAssetClassHasMaturity\r\n ? `${getResidualTerm()} meses`\r\n : \"-\"}\r\n </span>\r\n </Col>\r\n </div>\r\n </Row>\r\n <Row className={style.rowFirstStep}>\r\n <Col className={style.colFirstStep} xs={8}>\r\n <div className={style.quantityCol}>\r\n <div className={style.boxStep}>\r\n <div className={style.numberStep}> 1 </div>\r\n <div className={style.titleStep}>¿Cuánto querés comprar?</div>\r\n </div>\r\n <div className={style.quantityContainer}>\r\n <div className={style.quantityBox}>\r\n <div className={style.quantityTitle}>Cantidad</div>\r\n <div className={style.inputBox}>\r\n <input\r\n className={style.inputQuantity}\r\n type=\"number\"\r\n min={0}\r\n value={value}\r\n onChange={handleChange}\r\n max={fields.Available}\r\n />\r\n <Icons.PencilInput size=\"sm\" className={style.iconPencil} />\r\n </div>\r\n </div>\r\n <div className={style.quantityAvailable}>\r\n <div>Cantidad disponible </div>\r\n <div className={style.amountQuantity}>{fields.Available}</div>\r\n </div>\r\n </div>\r\n <div className={style.offerDetails}>\r\n <div>\r\n <div className={style.detailTitle}>Valor</div>\r\n <div className={style.detailValue}>\r\n <FormattedNumber\r\n value={fields.BuyTotal}\r\n minimumFractionDigits={item.AssetInformation.CurrencyISO === \"PYG\" ? 0 : 2}\r\n maximumFractionDigits={item.AssetInformation.CurrencyISO === \"PYG\" ? 0 : 2}\r\n />\r\n <span className={style.currency}> {item.AssetInformation.CurrencyISO}</span>\r\n </div>\r\n </div>\r\n <div>\r\n <div className={style.detailTitle}>Arancel operativo</div>\r\n <div className={style.detailValue}>\r\n <FormattedNumber\r\n value={fields.Charges}\r\n minimumFractionDigits={item.AssetInformation.CurrencyISO === \"PYG\" ? 0 : 2}\r\n maximumFractionDigits={item.AssetInformation.CurrencyISO === \"PYG\" ? 0 : 2}\r\n />\r\n <span className={style.currency}> {item.AssetInformation.CurrencyISO}</span>\r\n </div>\r\n </div>\r\n <div>\r\n <div className={style.detailTitle}>IVA</div>\r\n <div className={style.detailValue}>\r\n <FormattedNumber\r\n value={fields.IVA}\r\n minimumFractionDigits={item.AssetInformation.CurrencyISO === \"PYG\" ? 0 : 2}\r\n maximumFractionDigits={item.AssetInformation.CurrencyISO === \"PYG\" ? 0 : 2}\r\n />\r\n <span className={style.currency}> {item.AssetInformation.CurrencyISO}</span>\r\n </div>\r\n </div>\r\n <div>\r\n <div className={style.detailTitle}>Comisión corretaje</div>\r\n <div className={style.detailValue}>\r\n <FormattedNumber\r\n value={fields.Commission}\r\n minimumFractionDigits={item.AssetInformation.CurrencyISO === \"PYG\" ? 0 : 2}\r\n maximumFractionDigits={item.AssetInformation.CurrencyISO === \"PYG\" ? 0 : 2}\r\n />\r\n <span className={style.currency}> {item.AssetInformation.CurrencyISO}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </Col>\r\n <Col xs={4} className={style.colAccount}>\r\n <div className={style.colSubAccount}>\r\n <div className={style.boxStep}>\r\n <div className={style.numberStep}> 2 </div>\r\n <div className={style.titleStep}>Elegí una cuenta para debitar</div>\r\n </div>\r\n <div className={style.boxAccount}>\r\n <Fragment>\r\n <span className={style.accountContainer}>\r\n {!bankAccounts.length && !loadingEarnings ? (\r\n <NoBankAccountsAvailable />\r\n ) : (\r\n <BankAccountsSelector\r\n bankAccounts={bankAccounts}\r\n selectedBankAccount={activeAccount}\r\n onSelectBankAccount={setActiveAccount}\r\n disabled={loadingEarnings}\r\n filters={{\r\n currencyISO: fields.SettlementCurrency,\r\n amount: +fields.DebitTotal,\r\n mode: modes.BUY,\r\n }}\r\n setAnyError={handleSetAnyError}\r\n setLoading={handleBankAccountsLoading}\r\n />\r\n )}\r\n </span>\r\n </Fragment>\r\n </div>\r\n </div>\r\n </Col>\r\n </Row>\r\n <Row>\r\n <div className={style.hr}></div>\r\n </Row>\r\n <Row className={style.confirmBuy}>\r\n <Col xs={8} className={style.totalAmountContainer}>\r\n <div className={style.totalContainer}>\r\n <div className={style.totalText}>Total a debitar: </div>\r\n <div className={style.totalAmount}>\r\n <FormattedNumber\r\n value={fields.DebitTotal}\r\n minimumFractionDigits={item.AssetInformation.CurrencyISO === \"PYG\" ? 0 : 2}\r\n maximumFractionDigits={item.AssetInformation.CurrencyISO === \"PYG\" ? 0 : 2}\r\n />\r\n <span className={style.currency}> {item.AssetInformation.CurrencyISO}</span>\r\n </div>\r\n </div>\r\n </Col>\r\n <Col className={style.buttonCol} xs={4}>\r\n <div className={style.buttonContainer}>\r\n <GenericButton\r\n label={\"Confirmar compra\"}\r\n rounded\r\n loading={loading || loadingEarnings}\r\n padding={\"12px 64px\"}\r\n disabled={!activeAccount || +value === 0 || +value > item.OfferQuantitytoClient}\r\n primary\r\n right\r\n handleClick={onConfirm}\r\n iconSvg={[{ width: \"16px\", item: confirmIcon }]}\r\n ></GenericButton>\r\n </div>\r\n </Col>\r\n </Row>\r\n </div>\r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"subAssetClassDisplay\":\"InvestModal_subAssetClassDisplay_wrqdJ\",\"titleWrapper\":\"InvestModal_titleWrapper_1OYqi\",\"hr\":\"InvestModal_hr_N4e3j\",\"title\":\"InvestModal_title_PSz2p\",\"iconWrapper\":\"InvestModal_iconWrapper_2nJOV\",\"iconArrow\":\"InvestModal_iconArrow_xE-qN\",\"summary\":\"InvestModal_summary_X3LiA\",\"firstCol\":\"InvestModal_firstCol_3xOUy\",\"offerTitle\":\"InvestModal_offerTitle_1XobE\",\"valueContainer\":\"InvestModal_valueContainer_2Mwx5\",\"offerValue\":\"InvestModal_offerValue_15sRL\",\"ISINContainer\":\"InvestModal_ISINContainer_1zC1-\",\"currency\":\"InvestModal_currency_32bD0\",\"secondCol\":\"InvestModal_secondCol_15DAJ\",\"propertyTitle\":\"InvestModal_propertyTitle_2gXUw\",\"propertyValue\":\"InvestModal_propertyValue_2Ebkv\",\"propertyContainer\":\"InvestModal_propertyContainer_1eezN\",\"colFirstStep\":\"InvestModal_colFirstStep_2wAOm\",\"quantityCol\":\"InvestModal_quantityCol_ohVwI\",\"boxStep\":\"InvestModal_boxStep_3LhuT\",\"quantityContainer\":\"InvestModal_quantityContainer_3nQvD\",\"colSubAccount\":\"InvestModal_colSubAccount_3_BjO\",\"numberStep\":\"InvestModal_numberStep_3Lai6\",\"titleStep\":\"InvestModal_titleStep_3wc3h\",\"quantityBox\":\"InvestModal_quantityBox_1F7nU\",\"quantityTitle\":\"InvestModal_quantityTitle_1OW4R\",\"inputBox\":\"InvestModal_inputBox_3tgNz\",\"inputQuantity\":\"InvestModal_inputQuantity_2Q4fM\",\"iconPencil\":\"InvestModal_iconPencil_1d78B\",\"quantityAvailable\":\"InvestModal_quantityAvailable_2ysYS\",\"amountQuantity\":\"InvestModal_amountQuantity_271v9\",\"offerDetails\":\"InvestModal_offerDetails_32cDQ\",\"detailTitle\":\"InvestModal_detailTitle_1kQva\",\"detailValue\":\"InvestModal_detailValue_2LX9Z\",\"boxAccount\":\"InvestModal_boxAccount_2RKfR\",\"accountContainer\":\"InvestModal_accountContainer_2n0Zl\",\"personalAccount\":\"InvestModal_personalAccount_32N76\",\"personalAccountDisable\":\"InvestModal_personalAccountDisable_3xFCi\",\"disabled\":\"InvestModal_disabled_1fp0R\",\"disabledBtn\":\"InvestModal_disabledBtn_1gxPH\",\"accountName\":\"InvestModal_accountName_1saN6\",\"radioButton\":\"InvestModal_radioButton_XLnIB\",\"radioActive\":\"InvestModal_radioActive_3mPuG\",\"accountNumber\":\"InvestModal_accountNumber_2fhCi\",\"totalContainer\":\"InvestModal_totalContainer_2QMqR\",\"totalText\":\"InvestModal_totalText_15QDB\",\"totalAmount\":\"InvestModal_totalAmount_1Lx5G\",\"buttonCol\":\"InvestModal_buttonCol_1I3h6\",\"buttonContainer\":\"InvestModal_buttonContainer_5HAEB\",\"rowFirstStep\":\"InvestModal_rowFirstStep_1vnL8\",\"colAccount\":\"InvestModal_colAccount_DyBPo\",\"confirmBuy\":\"InvestModal_confirmBuy_61M9R\",\"totalAmountContainer\":\"InvestModal_totalAmountContainer_3oY1D\"};","import React, { useState, Fragment } from \"react\";\r\nimport { Col, Row, Button, Container, Modal, ModalBody } from \"reactstrap\";\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\nimport moment from \"moment\";\r\nimport { CircularProgress } from \"../../UI/CircularProgress/CircularProgress\";\r\n\r\nimport { getSession, getCurrentAccount, getSavedPersonInfo } from \"../../../reducers/selectors\";\r\n\r\nimport style from \"./PersonalDataModal.scss\";\r\n\r\nexport const PersonalDataModal = ({ handleAuthorize }) => {\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 <CircularProgress />;\r\n\r\n return (\r\n <Modal size=\"lg\" isOpen contentClassName={style.content}>\r\n <ModalBody>\r\n <div className={style.body}>\r\n <Fragment>\r\n <Container className={style.container}>\r\n <p className={style.subTitle}>Confirmá tus datos</p>\r\n\r\n {personInfo && (\r\n <Row className={style.gridRow}>\r\n <Col className={style.col} xs={6} sm={4} md={4} lg={4} xl={4} xxl={4}>\r\n <p className={style.greySubtitle}>Nombre y Apellido</p>\r\n <p\r\n className={style.text}\r\n >{`${personInfo.PhysicalPersonFirstName} ${personInfo.PhysicalPersonFirstLastName}`}</p>\r\n </Col>\r\n <Col className={style.col} xs={6} sm={4} md={4} lg={4} xl={4} xxl={4}>\r\n <p className={style.greySubtitle}>Género</p>\r\n <p className={style.text}>{genderString[personInfo.PhysicalPersonGender]}</p>\r\n </Col>\r\n <Col className={style.col} xs={6} sm={4} md={4} lg={4} xl={4} xxl={4}>\r\n <p className={style.greySubtitle}>Fecha de Nacimiento</p>\r\n <p className={style.text}>\r\n {moment(personInfo.PhysicalPersonDateOfBirth).format(\"DD/MM/YYYY\")}\r\n </p>\r\n </Col>\r\n <Col className={style.col} xs={6} sm={4} md={4} lg={4} xl={4} xxl={4}>\r\n <p className={style.greySubtitle}>Nacionalidad</p>\r\n <p className={style.text}>{personInfo.PhysicalPersonNationality}</p>\r\n </Col>\r\n <Col className={style.col} xs={6} sm={4} md={4} lg={4} xl={4} xxl={4}>\r\n <p className={style.greySubtitle}>Estado Civil</p>\r\n <p className={style.text}>{civilStatusString[personInfo.PhysicalPersonCivilStatus]}</p>\r\n </Col>\r\n <Col className={style.col} xs={12} sm={4} md={4} lg={4} xl={4} xxl={4}>\r\n <p className={style.greySubtitle}>Dirección</p>\r\n <p className={style.text}>\r\n {`${legalAddress.LegalAddressStreet} ${legalAddress.LegalAddressNumber}, ${legalAddress.LegalAddressCityName}`}\r\n </p>\r\n </Col>\r\n <Col className={style.col} xs={6} sm={4} md={4} lg={4} xl={4} xxl={4}>\r\n <p className={style.greySubtitle}>Celular</p>\r\n <p className={style.text}>{mobilePhone.PhoneNumber}</p>\r\n </Col>\r\n <Col className={style.col} xs={6} sm={4} md={4} lg={4} xl={4} xxl={4}>\r\n <p className={style.greySubtitle}>Correo electrónico</p>\r\n <p className={style.text}>{personInfo.PhysicalPersonEmail}</p>\r\n </Col>\r\n <Col className={style.col} xs={6} sm={4} md={4} lg={4} xl={4} xxl={4}>\r\n <p className={style.greySubtitle}>Tipo de documento</p>\r\n <p className={style.text}>{personDocument.PhysicalPersonDocumentTypeName}</p>\r\n </Col>\r\n <Col className={style.col} xs={6} sm={4} md={4} lg={4} xl={4} xxl={4}>\r\n <p className={style.greySubtitle}>Número de documento</p>\r\n <p className={style.text}>{personDocument.PhysicalPersonDocumentNumber}</p>\r\n </Col>\r\n <Col className={style.col} xs={6} sm={4} md={4} lg={4} xl={4} xxl={4}>\r\n <p className={style.greySubtitle}>Ocupación</p>\r\n <p className={style.text}>{personInfo.PersonProfessionName}</p>\r\n </Col>\r\n <Col className={style.col} xs={6} sm={4} md={4} lg={4} xl={4} xxl={4}>\r\n <p className={style.greySubtitle}>Nombre de la empresa</p>\r\n <p className={style.text}>{personInfo.PhysicalPersonInstitution}</p>\r\n </Col>\r\n <Col className={style.col} xs={6} sm={4} md={4} lg={4} xl={4} xxl={4}>\r\n <p className={style.greySubtitle}>Ciudad (laboral)</p>\r\n <p className={style.text}>{legalAddress.LegalAddressCityName}</p>\r\n </Col>\r\n <Col className={style.col} xs={6} sm={4} md={4} lg={4} xl={4} xxl={4}>\r\n <p className={style.greySubtitle}>Actividad del negocio</p>\r\n <p className={style.text}>{personInfo.PersonActivitySectorName}</p>\r\n </Col>\r\n <Col className={style.col} xs={6} sm={4} md={4} lg={4} xl={4} xxl={4}></Col>\r\n\r\n <Col className={style.col} xs={6} sm={4} md={4} lg={4} xl={4} xxl={4}></Col>\r\n <Col className={style.col} xs={6} sm={4} md={4} lg={4} xl={4} xxl={4}></Col>\r\n <Col\r\n className={`${style.col} ${style.buttonColumn}`}\r\n xs={6}\r\n sm={4}\r\n md={4}\r\n lg={4}\r\n xl={4}\r\n xxl={4}\r\n >\r\n <Button className={style.confirmButton} onClick={handleAuthorize}>\r\n confirmar datos\r\n </Button>\r\n </Col>\r\n </Row>\r\n )}\r\n </Container>\r\n </Fragment>\r\n </div>\r\n </ModalBody>\r\n </Modal>\r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"content\":\"PersonalDataModal_content_3iEyN\",\"container\":\"PersonalDataModal_container_3kLTF\",\"subTitle\":\"PersonalDataModal_subTitle_3yEe2\",\"gridRow\":\"PersonalDataModal_gridRow_1f1Fx\",\"col\":\"PersonalDataModal_col_1nzDE\",\"greySubtitle\":\"PersonalDataModal_greySubtitle_MnC1A\",\"buttonColumn\":\"PersonalDataModal_buttonColumn_tqyI3\",\"confirmButton\":\"PersonalDataModal_confirmButton_Xiacm\",\"body\":\"PersonalDataModal_body_3GFOr\",\"title\":\"PersonalDataModal_title_1-Ngi\",\"buttonContainer\":\"PersonalDataModal_buttonContainer_3e4ha\",\"buttonDisabled\":\"PersonalDataModal_buttonDisabled_2xPC8\",\"buttonActive\":\"PersonalDataModal_buttonActive_3H2YL\"};","import React, { useState, useEffect } from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { Modal, ModalHeader, ModalBody, ModalFooter, Row, Col, Button } from \"reactstrap\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport { CircularProgress } from \"../../UI/CircularProgress/CircularProgress\";\r\n\r\nimport { updateMessage } from \"../../../services/api/internalMessages\";\r\nimport { setLegalContract } from \"../../../services/api/person\";\r\nimport { notificationsReload } from \"../../../actions/entities\";\r\nimport { FirstAccessModal } from \"../FirstAccessModal/FirstAccessModal\";\r\nimport { PersonalDataModal } from \"../PersonalDataModal/PersonalDataModal\";\r\nimport { getTransactionalPinURL } from \"../../../services/api/authorizations\";\r\nimport { getSession } from \"../../../reducers/selectors\";\r\nimport { getRedirectionData, setSessionRedirectionData } from \"../../../utils/handleRedirectionData\";\r\nimport { setRedirectionData as setRedirectionDataAPI } from \"../../../services/api/entities\";\r\nimport { showToast } from \"../../../utils/helper\";\r\n\r\nexport const Popup = React.memo(({ internalMessage, open, toggle, isBlocking }) => {\r\n const dispatch = useDispatch();\r\n const session = useSelector(getSession);\r\n const [redirectData, setRedirectData] = useState(null);\r\n const [loadingUpdate, setLoadingUpdate] = useState(false);\r\n const [loading, setLoading] = useState(false);\r\n const [loadingAbsolute, setLoadingAbsolute] = useState(false);\r\n const handleToggle = () => {\r\n if (isBlocking) {\r\n } else {\r\n toggle();\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n if (session) {\r\n const newRedirectData = getRedirectionData();\r\n if (newRedirectData) {\r\n if (!redirectData) {\r\n setRedirectData(() => newRedirectData);\r\n } else {\r\n if (newRedirectData.id !== redirectData.id) {\r\n setRedirectData(() => newRedirectData);\r\n } else {\r\n setRedirectData(() => null);\r\n }\r\n }\r\n } else {\r\n setRedirectData(() => null);\r\n }\r\n }\r\n }, [session]);\r\n\r\n useEffect(() => {\r\n if (redirectData) {\r\n setLoadingAbsolute(() => true);\r\n if (redirectData.data.type === \"FirstAccess\") {\r\n handleAuthorizeFirstAccess(redirectData.data.payload);\r\n } else {\r\n handleAuthorize(redirectData.data.payload);\r\n }\r\n setSessionRedirectionData(false);\r\n }\r\n }, [redirectData]);\r\n\r\n const handlePreAuthorize = () => {\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: \"Popup\",\r\n payload: { read: true, approved: true, InternalMessageId: internalMessage.InternalMessageId },\r\n },\r\n };\r\n\r\n setRedirectionDataAPI(newRedirectData)\r\n .then(({ response }) => {\r\n if (response.result.Code === 200) {\r\n window.location.href = redirect_url;\r\n } else {\r\n showToast(\"Error procesando autorización\", true);\r\n }\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n showToast(\"Error procesando autorización\", true);\r\n });\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n showToast(\"Error autorizando notificación\", true);\r\n })\r\n .finally(() => {\r\n setLoading(() => false);\r\n dispatch(notificationsReload());\r\n });\r\n };\r\n\r\n const handleAuthorize = (payload) => {\r\n updateMessage(payload)\r\n .then(({ response }) => {\r\n if (response.result.Code === 200) {\r\n let message = \"Notificación autorizada correctamente\";\r\n switch (internalMessage.InternalMessageForm) {\r\n case \"PersonalData\":\r\n message = \"Datos personales confirmados correctamente.\";\r\n }\r\n\r\n showToast(message);\r\n setTimeout(() => {\r\n window.location.reload();\r\n }, 3000);\r\n }\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n showToast(\"Error autorizando notificación\", true);\r\n })\r\n .finally(() => {\r\n dispatch(notificationsReload());\r\n });\r\n };\r\n\r\n const handlePreAuthorizeFirstAccess = (contractId) => {\r\n setLoadingAbsolute(() => true);\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: \"FirstAccess\",\r\n payload: {\r\n message: { read: false, approved: true, InternalMessageId: internalMessage.InternalMessageId },\r\n contract: { LegalContractId: contractId },\r\n },\r\n },\r\n };\r\n\r\n setRedirectionDataAPI(newRedirectData)\r\n .then(({ response }) => {\r\n if (response.result.Code === 200) {\r\n window.location.href = redirect_url;\r\n } else {\r\n setLoadingAbsolute(() => true);\r\n showToast(\"Error procesando autorización\", true);\r\n }\r\n })\r\n .catch((err) => {\r\n setLoadingAbsolute(() => true);\r\n console.error(err);\r\n showToast(\"Error procesando autorización\", true);\r\n });\r\n })\r\n .catch((err) => {\r\n setLoadingAbsolute(() => true);\r\n console.error(err);\r\n showToast(\"Error autorizando notificación\", true);\r\n })\r\n .finally(() => {\r\n setLoading(() => false);\r\n dispatch(notificationsReload());\r\n });\r\n };\r\n\r\n const handleAuthorizeFirstAccess = (payload) => {\r\n if (!loadingUpdate) {\r\n setLoadingUpdate(() => true);\r\n updateMessage(payload.message)\r\n .then(({ response }) => {\r\n if (response.result.Code === 200) {\r\n setLegalContract(payload.contract)\r\n .then((res) => {\r\n if (res.response.result.Code !== 200) {\r\n showToast(\"Error confirmando el contrato\", true);\r\n } else {\r\n showToast(\"Información enviada correctamente\");\r\n\r\n setTimeout(() => {\r\n window.location.reload();\r\n }, 3000);\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 dispatch(notificationsReload());\r\n setLoadingUpdate(() => true);\r\n setRedirectData(() => null);\r\n });\r\n }\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n showToast(\"Error enviando información\", true);\r\n })\r\n .finally(() => {\r\n dispatch(notificationsReload());\r\n });\r\n }\r\n };\r\n\r\n if (loadingAbsolute)\r\n return (\r\n <div\r\n style={{\r\n display: \"flex\",\r\n justifyContent: \"center\",\r\n alignItems: \"center\",\r\n zIndex: 9999,\r\n height: \"100vh\",\r\n }}\r\n >\r\n <CircularProgress />\r\n </div>\r\n );\r\n\r\n if (internalMessage.InternalMessageForm === \"FirstAccess\" && !internalMessage.InternalMessageRead)\r\n return (\r\n <FirstAccessModal\r\n approved={internalMessage.InternalMessageApproved}\r\n handleAuthorize={handlePreAuthorizeFirstAccess}\r\n />\r\n );\r\n\r\n if (internalMessage.InternalMessageForm === \"PersonalData\")\r\n return <PersonalDataModal handleAuthorize={handlePreAuthorize} />;\r\n\r\n return (\r\n <Modal isOpen={open} toggle={handleToggle}>\r\n <ModalHeader toggle={handleToggle}>{internalMessage.InternalMessageTitle}</ModalHeader>\r\n <ModalBody>{internalMessage.InternalMessageText}</ModalBody>\r\n <ModalFooter>\r\n {!isBlocking && <Button onClick={handleToggle}>Cancelar</Button>}\r\n <LaddaButton\r\n className=\"btn btn-ladda btn-primary\"\r\n loading={loading}\r\n onClick={handlePreAuthorize}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n Autorizar\r\n </LaddaButton>\r\n </ModalFooter>\r\n </Modal>\r\n );\r\n});\r\n","import React, { useState } from \"react\";\r\nimport { Modal, ModalHeader, ModalBody, ModalFooter, Button } from \"reactstrap\";\r\nimport style from \"./PortfolioModal.scss\";\r\nimport toggleIcon from \"../../../../public/svg/x-symbol-svgrepo-com.svg\";\r\nimport { showToast } from \"../../../utils/helper\";\r\nimport \"react-toastify/dist/ReactToastify.css\";\r\nimport { getOriginalBodyPadding } from \"reactstrap/lib/utils\";\r\nimport { Tooltip } from \"../../Tooltip/Tooltip\";\r\nimport { askPrice } from \"../../../services/api/inout\";\r\nimport { getCurrentAccount, getTexts } from \"../../../reducers/selectors\";\r\nimport { useSelector } from \"react-redux\";\r\n\r\nconst PortfolioModal = ({ modal, toggle, asset }) => {\r\n const [value, setValue] = useState(\"\");\r\n const [loading, setLoading] = useState(false);\r\n const currentAccount = useSelector(getCurrentAccount);\r\n const texts = useSelector(getTexts);\r\n\r\n const onConfirm = () => {\r\n if (+value > +asset.nominalValueAvailable)\r\n showToast(\"La cantidad ingresada no puede ser mayor a la cantidad del portafolio.\", true);\r\n else {\r\n setLoading(() => true);\r\n const Order = {\r\n AssetId: asset.id,\r\n OrderHierarchy: \"Parent\",\r\n CurrentAccount: {\r\n AccountId: currentAccount.id,\r\n Quantity: value,\r\n },\r\n };\r\n askPrice({ Order })\r\n .then(({ response }) => {\r\n if (response.result.Code !== 200) showToast(\"Error solicitando precio\", true);\r\n else {\r\n showToast(\"Precio solicitado correctamente\");\r\n toggle();\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\r\n const handleChange = (event) => {\r\n const result = event.target.value.replace(/\\D/g, \"\");\r\n setValue(result);\r\n };\r\n\r\n return (\r\n <Modal size=\"sm\" isOpen={modal} contentClassName={style.content}>\r\n <div className={style.modalWrapper}>\r\n <ModalBody className={style.body}>\r\n <div className={style.header}>\r\n <span>Inicio proceso de venta:</span>\r\n <img className={style.toggleIcon} src={toggleIcon} alt=\"X\" onClick={toggle} />\r\n </div>\r\n <span className={style.name}>{asset.name}</span>\r\n <br></br>\r\n <span className={style.amount}>\r\n <p>cantidad:</p>\r\n <input type=\"text\" value={value} onChange={handleChange} />\r\n </span>\r\n </ModalBody>\r\n {currentAccount.id && (\r\n <ModalFooter className={style.footer}>\r\n <Button className={style.button} onClick={onConfirm} disabled={loading}>\r\n solicitar precio\r\n </Button>\r\n </ModalFooter>\r\n )}\r\n </div>\r\n <Tooltip\r\n text={texts.tooltips.sell_quote}\r\n height=\"30px\"\r\n width=\"30px\"\r\n top=\"100px\"\r\n right=\"-40px\"\r\n backgroundColor=\"white\"\r\n borderRadius=\"50%\"\r\n />\r\n </Modal>\r\n );\r\n};\r\n\r\nexport default PortfolioModal;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"content\":\"PortfolioModal_content_uU4F-\",\"body\":\"PortfolioModal_body_zu3e0\",\"header\":\"PortfolioModal_header_3eJ40\",\"toggleIcon\":\"PortfolioModal_toggleIcon_85jZo\",\"name\":\"PortfolioModal_name_1c_Mt\",\"date\":\"PortfolioModal_date_2DaGc\",\"amount\":\"PortfolioModal_amount_3k-5w\",\"footer\":\"PortfolioModal_footer_1yW6d\",\"button\":\"PortfolioModal_button_P-Hve\"};","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.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 <Fragment>\r\n <div\r\n className={style.collapseRow}\r\n onClick={() => {\r\n setCollapseActive(!collapseActive);\r\n }}\r\n >\r\n <span className={collapseActive ? style.active : \"\"}>{notification.InternalMessageTitle}</span>\r\n <img\r\n src={arrow}\r\n alt=\"arrow image\"\r\n className={`${style.arrow} ${collapseActive ? style.arrowActive : \"\"}`}\r\n />\r\n </div>\r\n <Collapse isOpen={collapseActive} className={style.collapse}>\r\n <p>\r\n <p>{notification.InternalMessageText}</p>\r\n {notification.InternalMessageAttachmentName && (\r\n <div>\r\n <a onClick={getFile} className={style.attachment}>\r\n <i className=\"fa fa-file-pdf-o\" />{\" \"}\r\n {`${notification.InternalMessageAttachmentName}.${notification.InternalMessageAttachmentExtension}`}\r\n </a>\r\n </div>\r\n )}\r\n </p>\r\n <img\r\n src={cross}\r\n alt=\"cross image\"\r\n className={style.cross}\r\n onClick={() => handleNotificationRead(notification)}\r\n />\r\n </Collapse>\r\n </Fragment>\r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"collapseRow\":\"NotificationCollapse_collapseRow_1QjkI\",\"active\":\"NotificationCollapse_active_3Qiso\",\"arrow\":\"NotificationCollapse_arrow_2UM08\",\"arrowActive\":\"NotificationCollapse_arrowActive_3raWt\",\"collapse\":\"NotificationCollapse_collapse_1V37X\",\"cross\":\"NotificationCollapse_cross_HWyFD\",\"buttonRow\":\"NotificationCollapse_buttonRow_10i6z\",\"button\":\"NotificationCollapse_button_1-V8a\",\"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 \"../UI/CircularProgress/CircularProgress\";\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 <Fragment>\r\n {notificationsLoading ? (\r\n <CircularProgress />\r\n ) : (\r\n <Row>\r\n {notifications.map((notification, index) => {\r\n return (\r\n <NotificationCollapse\r\n key={index}\r\n notification={notification}\r\n handleNotificationRead={handlePreNotificationRead}\r\n />\r\n );\r\n })}\r\n {!notifications.length && <EmptyNotifications />}\r\n </Row>\r\n )}\r\n </Fragment>\r\n );\r\n};\r\n\r\nconst EmptyNotifications = () => (\r\n <div className={style.emptyWrapper}>\r\n <p className={style.emptyMessage}>No hay notificaciones</p>\r\n </div>\r\n);\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"emptyWrapper\":\"NotificationsCard_emptyWrapper_1id1U\",\"emptyMessage\":\"NotificationsCard_emptyMessage_2vw7q\",\"wrapperCol\":\"NotificationsCard_wrapperCol_12a5v\",\"title\":\"NotificationsCard_title_3WDMs\"};","import React, { useState, useEffect, Fragment } from \"react\";\r\nimport { useSelector } from \"react-redux\";\r\nimport moment from \"moment\";\r\nimport { Label, Table } from \"reactstrap\";\r\nimport { CircularProgress } from \"../../UI/CircularProgress/CircularProgress\";\r\nimport { Col, Row } from \"../../../components/UI/Customstrap/Customstrap\";\r\nimport { getSavedPersonInfo } from \"../../../reducers/selectors\";\r\nimport GenericButton from \"../../../components/UI/Button/Button\";\r\nimport confirmIcon from \"../../../../public/svg/ButtonIcons/right-arrow.svg\";\r\nimport style from \"./ConfirmDataOnboarding.scss\";\r\nimport { HeaderOnboarding } from \"../HeaderOnboarding/HeaderOnboarding\";\r\nimport { ContractOnboarding } from \"../ContractOnboarding/ContractOnboarding\";\r\n\r\nexport const ConfirmDataOnboarding = ({\r\n activeSidebar,\r\n toggleMobileSidebar,\r\n confirmPersonInfo,\r\n confirmContract,\r\n confirmAccounts,\r\n confirmInvestmentProfile,\r\n}) => {\r\n const [showPep, setShowPep] = useState(false);\r\n const personInfo = useSelector(getSavedPersonInfo);\r\n const [showContract, setShowContract] = useState(false);\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 setMobilePhone((prev) => ({\r\n ...prev,\r\n ...personInfo.Phone[0],\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 const toggleShowContract = () => {\r\n confirmPersonInfo();\r\n setShowContract((stateContract) => !stateContract);\r\n };\r\n\r\n if (!personInfo) return <CircularProgress />;\r\n\r\n return (\r\n <div className={activeSidebar ? style.noContainer : style.containerData}>\r\n <HeaderOnboarding title=\"Confirmá tus datos\" toggleMobileSidebar={toggleMobileSidebar} />\r\n <Row className={style.headerTitle}>\r\n <Label>Confirmá tus datos</Label>\r\n </Row>\r\n <Row className={style.dataRow}>\r\n <Col>\r\n <div className={style.boxData}>\r\n <div className={style.data}>\r\n <div className={style.dataTitle}> Datos personales </div>\r\n <div className={style.divider}></div>\r\n </div>\r\n <Table className={style.table}>\r\n <tbody>\r\n <tr>\r\n <td>\r\n <strong>Nombre y apellido: </strong>\r\n {`${personInfo.PhysicalPersonFirstName} ${personInfo.PhysicalPersonFirstLastName}`}\r\n </td>\r\n <td className={style.column}>\r\n <strong>Correo electrónico: </strong>\r\n {personInfo.PhysicalPersonEmail}\r\n </td>\r\n </tr>\r\n <tr>\r\n <td>\r\n <strong>Dirección: </strong>\r\n {`${legalAddress.LegalAddressStreet} ${legalAddress.LegalAddressNumber}, ${legalAddress.LegalAddressCityName}`}\r\n </td>\r\n <td className={style.column}>\r\n <strong>Celular: </strong>\r\n {mobilePhone.PhoneNumber}\r\n </td>\r\n </tr>\r\n </tbody>\r\n </Table>\r\n </div>\r\n <div className={style.boxData}>\r\n <div className={style.data}>\r\n <div className={style.dataTitle}> Documento </div>\r\n <div className={style.divider}></div>\r\n </div>\r\n <Table className={style.table}>\r\n <tbody>\r\n <tr>\r\n <td>\r\n <strong>Tipo de documento: </strong>\r\n {\"Cédula de Identidad\"}\r\n </td>\r\n {/* <td><strong>Tipo de documento: </strong>{personDocument.PhysicalPersonDocumentTypeName}</td> */}\r\n <td className={style.column}>\r\n <strong>Nacionalidad: </strong>\r\n {personInfo.PhysicalPersonNationality}\r\n </td>\r\n </tr>\r\n <tr>\r\n <td>\r\n <strong>Número de documento: </strong>\r\n {personDocument.PhysicalPersonDocumentNumber}\r\n </td>\r\n <td className={style.column}>\r\n <strong>Lugar de nacimiento: </strong>\r\n {personInfo.PhysicalPersonCityOfBirthName}\r\n </td>\r\n </tr>\r\n <tr>\r\n <td>\r\n <strong>Fecha de nacimiento: </strong>\r\n {moment(personInfo.PhysicalPersonDateOfBirth).format(\"DD/MM/YYYY\")}\r\n </td>\r\n </tr>\r\n </tbody>\r\n </Table>\r\n </div>\r\n <div className={style.boxData}>\r\n <div className={style.data}>\r\n <div className={style.dataTitle}> Datos laborales </div>\r\n <div className={style.divider}></div>\r\n </div>\r\n <Table className={style.table}>\r\n <tbody>\r\n <tr>\r\n <td>\r\n <strong>Ocupación: </strong>\r\n {personInfo.PersonProfessionName}\r\n </td>\r\n <td className={style.column}>\r\n <strong>Nombre de la empresa: </strong>\r\n {personInfo.PersonWorkingBy}\r\n </td>\r\n </tr>\r\n <tr>\r\n <td>\r\n <strong>Actividad del negocio: </strong>\r\n {personInfo.PersonActivitySectorName}\r\n </td>\r\n </tr>\r\n </tbody>\r\n </Table>\r\n </div>\r\n <div className={style.buttonContainer}>\r\n <GenericButton\r\n label={\"Confirmar\"}\r\n rounded\r\n padding={\"8px 46px\"}\r\n primary\r\n right\r\n handleClick={toggleShowContract}\r\n iconSvg={[{ width: \"16px\", item: confirmIcon }]}\r\n ></GenericButton>\r\n </div>\r\n </Col>\r\n </Row>\r\n {showContract && (\r\n <ContractOnboarding\r\n toggleMobileSidebar={toggleMobileSidebar}\r\n confirmContract={confirmContract}\r\n confirmAccounts={confirmAccounts}\r\n confirmInvestmentProfile={confirmInvestmentProfile}\r\n />\r\n )}\r\n </div>\r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"containerData\":\"ConfirmDataOnboarding_containerData_1zlso\",\"noContainer\":\"ConfirmDataOnboarding_noContainer_1T_oI\",\"headerTitle\":\"ConfirmDataOnboarding_headerTitle_3bO5l\",\"dataRow\":\"ConfirmDataOnboarding_dataRow_3oMNr\",\"dataCol\":\"ConfirmDataOnboarding_dataCol_1n6mx\",\"boxData\":\"ConfirmDataOnboarding_boxData_3AIVd\",\"data\":\"ConfirmDataOnboarding_data_2fUU-\",\"dataTitle\":\"ConfirmDataOnboarding_dataTitle_3WyBg\",\"divider\":\"ConfirmDataOnboarding_divider_g5N_v\",\"table\":\"ConfirmDataOnboarding_table_1jc9X\",\"column\":\"ConfirmDataOnboarding_column_1Cs9a\",\"buttonContainer\":\"ConfirmDataOnboarding_buttonContainer_27AR8\"};","import React, { useState, useEffect, Fragment } from \"react\";\r\nimport { Label, Button } from \"reactstrap\";\r\nimport { CircularProgress } from \"../../UI/CircularProgress/CircularProgress\";\r\nimport { Col, Row } from \"../../../components/UI/Customstrap/Customstrap\";\r\nimport GenericButton from \"../../../components/UI/Button/Button\";\r\nimport confirmIcon from \"../../../../public/svg/ButtonIcons/right-arrow.svg\";\r\nimport downloadIcon from \"../../../../public/svg/ButtonIcons/download.svg\";\r\nimport { Icons } from \"../../../components/UI/Icon/Icon\";\r\nimport { getLegalContracts, setLegalContract } from \"../../../services/api/person\";\r\nimport style from \"./ContractOnboarding.scss\";\r\nimport { HeaderOnboarding } from \"../HeaderOnboarding/HeaderOnboarding\";\r\nimport { showToast } from \"../../../utils/helper\";\r\nimport { InvestorProfileOnboarding } from \"../InvestorProfileOnboarding/InvestorProfileOnboarding\";\r\nimport MediaQuery from \"react-responsive\";\r\n\r\nexport const ContractOnboarding = ({ toggleMobileSidebar, confirmContract, confirmInvestmentProfile }) => {\r\n const [legalContract, setActualLegalContract] = useState({});\r\n const [contractLoading, setContractLoading] = useState(true);\r\n const [checked, setChecked] = useState(false);\r\n const [showAccounts, setShowAccounts] = useState(false);\r\n const [isAlreadyAccepted, setIsAlreadyAccepted] = useState(false);\r\n\r\n useEffect(() => {\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 setIsAlreadyAccepted(response.isAlreadyAccepted);\r\n if (response.LegalContractSDT.LegalContractAttachmentName) {\r\n setActualLegalContract({\r\n ...response.LegalContractSDT,\r\n LegalContractAttachmentBlob: response.blobfile,\r\n });\r\n }\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 downloadFile = () => {\r\n var a = document.createElement(\"A\");\r\n a.href = `data:application/octet-stream;base64,${legalContract.LegalContractAttachmentBlob}`;\r\n a.download = `${legalContract.LegalContractAttachmentName}.${legalContract.LegalContractAttachmentExtension}`;\r\n document.body.appendChild(a);\r\n a.click();\r\n document.body.removeChild(a);\r\n };\r\n\r\n const handleChangeCheckbox = () => {\r\n setChecked((prevState) => !prevState);\r\n };\r\n\r\n const handleChangePage = () => {\r\n {\r\n checked\r\n ? toggleShowAccounts()\r\n : showToast(\"Debe aceptar los términos y condiciones del contrato\", true);\r\n }\r\n };\r\n\r\n const handleChangePageAlreadyAccepted = () => {\r\n confirmContract();\r\n setShowAccounts((stateAccounts) => !stateAccounts);\r\n };\r\n\r\n const toggleShowAccounts = () => {\r\n setLegalContract({ LegalContractId: legalContract.LegalContractId })\r\n .then(({ response }) => {\r\n if (response.result.Code === 200) {\r\n showToast(\"Contrato confirmado correctamente\");\r\n confirmContract();\r\n setShowAccounts((stateAccounts) => !stateAccounts);\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 };\r\n\r\n if (isAlreadyAccepted) {\r\n return (\r\n <div className={style.contract}>\r\n <HeaderOnboarding title=\"Contrato legal\" toggleMobileSidebar={toggleMobileSidebar} />\r\n <Row className={style.headerTitle}>\r\n <Label>Contrato legal</Label>\r\n <MediaQuery maxWidth={576}>\r\n <div className={style.divider}></div>\r\n </MediaQuery>\r\n </Row>\r\n <Row className={style.dataRow}>\r\n <Col className={style.colContract}>\r\n <div>\r\n <div className={style.text}>Usted ya ha firmado el último contrato vigente.</div>\r\n <div className={style.buttonContainer}>\r\n <GenericButton\r\n label={\"Continuar\"}\r\n rounded\r\n padding={\"8px 46px\"}\r\n primary\r\n right\r\n handleClick={handleChangePageAlreadyAccepted}\r\n iconSvg={[{ width: \"16px\", item: confirmIcon }]}\r\n ></GenericButton>\r\n </div>\r\n </div>\r\n </Col>\r\n {showAccounts && (\r\n <InvestorProfileOnboarding\r\n toggleMobileSidebar={toggleMobileSidebar}\r\n confirmInvestmentProfile={confirmInvestmentProfile}\r\n />\r\n )}\r\n </Row>\r\n </div>\r\n );\r\n }\r\n\r\n return (\r\n <div className={style.contract}>\r\n <HeaderOnboarding title=\"Aceptá el Contrato legal\" toggleMobileSidebar={toggleMobileSidebar} />\r\n <Row className={style.headerTitle}>\r\n <Label>Aceptá el Contrato legal</Label>\r\n <MediaQuery maxWidth={576}>\r\n <div className={style.divider}></div>\r\n </MediaQuery>\r\n </Row>\r\n <Row className={style.dataRow}>\r\n <Col className={style.colContract}>\r\n <div>\r\n <div className={style.text}>Revisá el Contrato legal y el Anexo I en el siguiente documento:</div>\r\n <div className={style.contractContainer}>\r\n <div className={style.boxContract}>\r\n <Icons.FileIcon size=\"md\" />\r\n {contractLoading ? (\r\n <CircularProgress />\r\n ) : (\r\n <Fragment>\r\n <div>\r\n <p className={style.contractPdf}>\r\n {legalContract && legalContract.LegalContractAttachmentName\r\n ? `${legalContract.LegalContractAttachmentName}.${legalContract.LegalContractAttachmentExtension}`\r\n : \"No hay contratos disponibles.\"}\r\n </p>\r\n </div>\r\n </Fragment>\r\n )}\r\n </div>\r\n <div className={style.pdfButtons}>\r\n <div className={style.downloadPdf}>\r\n <GenericButton\r\n handleClick={downloadFile}\r\n right\r\n rounded\r\n width={\"200px\"}\r\n marginLeft={\"0px\"}\r\n label={\"Descargar PDF\"}\r\n padding={\"10px 22px\"}\r\n iconSvg={[{ width: \"24px\", item: downloadIcon }]}\r\n ></GenericButton>\r\n </div>\r\n </div>\r\n </div>\r\n <div className={style.chekboxContract}>\r\n <span onClick={handleChangeCheckbox}>\r\n {checked ? (\r\n <Icons.CheckboxCheckedIcon className={style.icon} />\r\n ) : (\r\n <Icons.CheckboxUncheckedIcon className={style.icon} />\r\n )}\r\n </span>\r\n <p className={style.textAcceptContract}>\r\n He leído, comprendido y acepto los términos y condiciones del Contrato legal y del Anexo I de\r\n ueno Casa de Bolsa.\r\n </p>\r\n </div>\r\n </div>\r\n <div>\r\n <div className={style.buttonContainer}>\r\n <GenericButton\r\n label={\"Confirmar\"}\r\n rounded\r\n padding={\"8px 46px\"}\r\n primary\r\n right\r\n handleClick={handleChangePage}\r\n iconSvg={[{ width: \"16px\", item: confirmIcon }]}\r\n ></GenericButton>\r\n </div>\r\n </div>\r\n </Col>\r\n </Row>\r\n {showAccounts && (\r\n <InvestorProfileOnboarding\r\n toggleMobileSidebar={toggleMobileSidebar}\r\n confirmInvestmentProfile={confirmInvestmentProfile}\r\n />\r\n )}\r\n </div>\r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"contract\":\"ContractOnboarding_contract_NT22a\",\"headerTitle\":\"ContractOnboarding_headerTitle_2vW4D\",\"dataRow\":\"ContractOnboarding_dataRow_2e9EG\",\"colContract\":\"ContractOnboarding_colContract_2WZYy\",\"text\":\"ContractOnboarding_text_psy-O\",\"contractPdf\":\"ContractOnboarding_contractPdf_uE5Lz\",\"contractContainer\":\"ContractOnboarding_contractContainer_3Y24T\",\"boxContract\":\"ContractOnboarding_boxContract_SkSLl\",\"pdfButtons\":\"ContractOnboarding_pdfButtons_31gA-\",\"watchPdf\":\"ContractOnboarding_watchPdf_2VIC7\",\"downloadPdf\":\"ContractOnboarding_downloadPdf_24aY7\",\"chekboxContract\":\"ContractOnboarding_chekboxContract_3c2EG\",\"icon\":\"ContractOnboarding_icon_2QwkK\",\"radioCheckbox\":\"ContractOnboarding_radioCheckbox_2j2iR\",\"textAcceptContract\":\"ContractOnboarding_textAcceptContract_1as7z\",\"buttonContainer\":\"ContractOnboarding_buttonContainer_1pSIK\",\"divider\":\"ContractOnboarding_divider_2yioC\"};","import React, { useState, useEffect, Fragment } from \"react\";\r\nimport { NavbarToggler, Label } from \"reactstrap\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { useIdleTimer } from \"react-idle-timer\";\r\nimport MediaQuery from \"react-responsive\";\r\nimport { EnvironmentSign } from \"bx-react-ui\";\r\nimport { CircularProgress } from \"../../UI/CircularProgress/CircularProgress\";\r\nimport { getUserContext, getAuth } from \"../../../reducers/selectors\";\r\nimport { signOut } from \"../../../actions/auth\";\r\nimport menuLine from \"../../../../public/svg/menu.svg\";\r\n\r\nimport style from \"./HeaderOnboarding.scss\";\r\n\r\nconst environmentName = window.___APP_CONFIG___.ENV_NAME ? window.___APP_CONFIG___.ENV_NAME : \"TESTING\";\r\n\r\nexport const HeaderOnboarding = ({\r\n toggleMobileSidebar,\r\n AccountJSON,\r\n actions,\r\n username,\r\n isProdEnv,\r\n isTestingUser,\r\n title,\r\n}) => {\r\n const showEnvironmentSign = !isProdEnv || isTestingUser;\r\n const environmentSignText = isProdEnv ? \"PRODUCTION\" : environmentName;\r\n const environmentSignColor = isProdEnv ? \"red\" : \"#34784B\";\r\n const dispatch = useDispatch();\r\n\r\n const context = useSelector(getUserContext);\r\n const [idleTimeout, setIdleTimeout] = useState(1);\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 // 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 return (\r\n <header className={`${style.appHeader} app-header navbar`} style={{ margin: \"0 !important\" }}>\r\n {/* <span className={style.hambMenuLogo}>\r\n <Fragment>\r\n <NavbarToggler\r\n className={`${style.navToggler} d-md-down-none`}\r\n onClick={(e) => {\r\n toggleMobileSidebar();\r\n }}\r\n >\r\n <img className={style.hambIcon} src={menuLine} alt=\"hamburger menu\" />\r\n </NavbarToggler>\r\n </Fragment>\r\n </span> */}\r\n <MediaQuery maxWidth={576}>\r\n <img id={style.logo} src=\"/svg/SideBarIcons/full-logo-home-white.svg\" alt=\"logo\" /> \r\n </MediaQuery>\r\n <MediaQuery minWidth={576}>\r\n <Label className={style.headerTitle}>{title}</Label>\r\n </MediaQuery>\r\n <hr className={style.headerHr}></hr>\r\n </header>\r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"headerTitle\":\"HeaderOnboarding_headerTitle_2x-Ut\",\"headerHr\":\"HeaderOnboarding_headerHr_2Lto5\",\"appHeader\":\"HeaderOnboarding_appHeader_2xjnv\",\"hambMenuLogo\":\"HeaderOnboarding_hambMenuLogo_BkIMY\",\"logo\":\"HeaderOnboarding_logo_3cDcT\",\"app-menu\":\"HeaderOnboarding_app-menu_1gLGI\",\"navToggler\":\"HeaderOnboarding_navToggler_1sM-m\",\"hambIcon\":\"HeaderOnboarding_hambIcon_1wlU8\",\"userSelector\":\"HeaderOnboarding_userSelector_2fgFX\",\"headerDiv\":\"HeaderOnboarding_headerDiv_2qMiV\",\"headerDiv2\":\"HeaderOnboarding_headerDiv2_2-B0U\",\"labelDiv1\":\"HeaderOnboarding_labelDiv1_494e-\",\"labelDiv\":\"HeaderOnboarding_labelDiv_1Jxk4\",\"verticaLine\":\"HeaderOnboarding_verticaLine_3Syli\"};","import React, { useState, useEffect, Fragment } from \"react\";\r\nimport { useDispatch } from \"react-redux\";\r\nimport { Label, Button, Progress } from \"reactstrap\";\r\nimport { Col, Row } from \"../../../components/UI/Customstrap/Customstrap\";\r\nimport GenericButton from \"../../../components/UI/Button/Button\";\r\nimport confirmIcon from \"../../../../public/svg/ButtonIcons/right-arrow.svg\";\r\nimport { getQuestions, updateAnswers, getPersonInfo } from \"../../../services/api/person\";\r\nimport { personInfoSet } from \"../../../actions/entities\";\r\nimport { Icons } from \"../../../components/UI/Icon/Icon\";\r\nimport { showToast } from \"../../../utils/helper\";\r\nimport style from \"./InvestorProfileOnboarding.scss\";\r\nimport { HeaderOnboarding } from \"../HeaderOnboarding/HeaderOnboarding\";\r\nimport { PepOnboarding } from \"../PepOnboarding/PepOnboarding\";\r\nimport MediaQuery from \"react-responsive\";\r\n\r\nexport const InvestorProfileOnboarding = ({ toggleMobileSidebar, confirmInvestmentProfile }) => {\r\n const [loading, setLoading] = useState(false);\r\n const [questions, setQuestions] = useState([]);\r\n const [numQuestion, setNumQuestion] = useState(1);\r\n const [checkedAnswer, setCheckedAnswer] = useState(false);\r\n const [showPep, setShowPep] = useState(false);\r\n const dispatch = useDispatch();\r\n\r\n useEffect(() => {\r\n setLoading(() => true);\r\n getQuestions()\r\n .then(({ response }) => {\r\n setQuestions(response.questions);\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n })\r\n .finally(() => {\r\n setLoading(() => false);\r\n });\r\n }, []);\r\n\r\n const setAnswer = (questionIndex, answerIndex) => {\r\n const newQuestions = [...questions];\r\n\r\n newQuestions.find((question) => question.QuestionId === questionIndex).Answer = newQuestions\r\n .find((question) => question.QuestionId === questionIndex)\r\n .Answer.map((answerItem) => {\r\n return {\r\n ...answerItem,\r\n AnswerIsResponse: false,\r\n };\r\n });\r\n\r\n newQuestions\r\n .find((question) => question.QuestionId === questionIndex)\r\n .Answer.find((answer) => answer.AnswerId === answerIndex).AnswerIsResponse = true;\r\n\r\n setQuestions(newQuestions);\r\n };\r\n\r\n const onConfirm = () => {\r\n const newQuestions = questions.filter((questionItem) => {\r\n if (questionItem.Answer.find((answerItem) => answerItem.AnswerIsResponse)) return questionItem;\r\n });\r\n if (newQuestions.length < questions.length) {\r\n showToast(\"Debe responder todas las preguntas\", true);\r\n return;\r\n } else {\r\n setLoading(() => true);\r\n updateAnswers({ sdtQuestion: questions })\r\n .then(({ response }) => {\r\n if (response.sdtresult.Code !== 200) showToast(\"Error enviando respuestas\", true);\r\n else {\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(() => {\r\n setLoading(() => false);\r\n });\r\n }\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n });\r\n toggleShowPep();\r\n }\r\n };\r\n\r\n const toggleShowPep = () => {\r\n confirmInvestmentProfile();\r\n setShowPep(true);\r\n };\r\n\r\n const Question = () => {\r\n return (\r\n <div>\r\n {questions.slice(numQuestion - 1, numQuestion).map((question, indexQuestion) => {\r\n return (\r\n <form key={indexQuestion} className={style.questionForm}>\r\n <p className={style.questionTitle}>{question.QuestionDescription}</p>\r\n {question.Answer.map((answer, index) => {\r\n const key = `${question.QuestionId}-${index}`;\r\n\r\n return (\r\n <div key={key} className={style.answerRow}>\r\n <Button\r\n className={style.radioButton}\r\n onClick={() => {\r\n setCheckedAnswer(key);\r\n setAnswer(question.QuestionId, answer.AnswerId);\r\n }}\r\n >\r\n {checkedAnswer == key ? (\r\n <Icons.RadioCheckedAnswer size=\"sm\" className={style.icon} />\r\n ) : (\r\n \"\"\r\n )}\r\n </Button>\r\n <label\r\n onClick={() => {\r\n setCheckedAnswer(key);\r\n setAnswer(question.QuestionId, answer.AnswerId);\r\n }}\r\n className={style.answerText}\r\n >\r\n {answer.AnswerDescription}\r\n </label>\r\n </div>\r\n );\r\n })}\r\n </form>\r\n );\r\n })}\r\n </div>\r\n );\r\n };\r\n\r\n const handleChangeQuestion = () => {\r\n if (checkedAnswer) {\r\n setNumQuestion(numQuestion + 1);\r\n <Question />;\r\n setCheckedAnswer((prevStateAnswer) => !prevStateAnswer);\r\n if (numQuestion >= questions.length) onConfirm();\r\n } else {\r\n showToast(\"Debe seleccionar una opción para continuar\", true);\r\n }\r\n };\r\n\r\n return (\r\n <div className={style.profileContainer}>\r\n <HeaderOnboarding title=\"Conocé tu perfil de inversión\" toggleMobileSidebar={toggleMobileSidebar} />\r\n <Row className={style.headerTitle}>\r\n <Label>Conocé tu perfil de inversión</Label>\r\n <MediaQuery maxWidth={576}>\r\n <div className={style.divider}></div>\r\n </MediaQuery>\r\n </Row>\r\n <Row className={style.dataRow}>\r\n <Col className={style.colInvestor}>\r\n <div className={style.firstText}>\r\n Respondé las siguientes preguntas\r\n </div>\r\n <div className={style.questionContainer}>\r\n <Question />\r\n <MediaQuery minWidth={576}>\r\n <div className={style.buttonContainer}>\r\n <GenericButton\r\n label={numQuestion < questions.length ? \"Continuar\" : \"Enviar respuestas\"}\r\n rounded\r\n padding={\"8px 46px\"}\r\n primary\r\n right\r\n handleClick={handleChangeQuestion}\r\n iconSvg={[{ width: \"16px\", item: confirmIcon }]}\r\n ></GenericButton>\r\n </div>\r\n </MediaQuery>\r\n <div className={style.progressContainer}>\r\n <div className={style.textBar}>{numQuestion + \" de \" + questions.length}</div>\r\n <Progress\r\n className={style.progressBar}\r\n value={(numQuestion * 100) / questions.length}\r\n ></Progress>\r\n </div>\r\n </div>\r\n <MediaQuery maxWidth={576}>\r\n <div className={style.buttonContainer}>\r\n <GenericButton\r\n label={numQuestion < questions.length ? \"Continuar\" : \"Enviar respuestas\"}\r\n rounded\r\n padding={\"8px 46px\"}\r\n primary\r\n right\r\n handleClick={handleChangeQuestion}\r\n iconSvg={[{ width: \"16px\", item: confirmIcon }]}\r\n ></GenericButton>\r\n </div>\r\n </MediaQuery>\r\n </Col>\r\n </Row>\r\n {showPep && <PepOnboarding toggleMobileSidebar={toggleMobileSidebar} />}\r\n </div>\r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"profileContainer\":\"InvestorProfileOnboarding_profileContainer_2WnMO\",\"headerTitle\":\"InvestorProfileOnboarding_headerTitle_3Q8cl\",\"dataRow\":\"InvestorProfileOnboarding_dataRow_12vzM\",\"colInvestor\":\"InvestorProfileOnboarding_colInvestor_13nGB\",\"firstText\":\"InvestorProfileOnboarding_firstText_3Pdp6\",\"questionContainer\":\"InvestorProfileOnboarding_questionContainer_3jS1G\",\"questionForm\":\"InvestorProfileOnboarding_questionForm_3AAye\",\"questionTitle\":\"InvestorProfileOnboarding_questionTitle_3R24P\",\"answerRow\":\"InvestorProfileOnboarding_answerRow_SsbPh\",\"answerText\":\"InvestorProfileOnboarding_answerText_1gk50\",\"answerRowActive\":\"InvestorProfileOnboarding_answerRowActive_q5IWx\",\"radioButton\":\"InvestorProfileOnboarding_radioButton_3scWe\",\"icon\":\"InvestorProfileOnboarding_icon_3K7JC\",\"buttonContainer\":\"InvestorProfileOnboarding_buttonContainer_3Pa_I\",\"textBar\":\"InvestorProfileOnboarding_textBar_1Aqqx\",\"progressBar\":\"InvestorProfileOnboarding_progressBar_9atFD\",\"divider\":\"InvestorProfileOnboarding_divider_1K_6F\"};","import React, { useEffect, useState } from \"react\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { Col, Row } from \"../../../components/UI/Customstrap/Customstrap\";\r\nimport { Label } from \"reactstrap\";\r\nimport { getSavedPersonInfo, getNotifications } from \"../../../reducers/selectors\";\r\nimport style from \"./PepOnboarding.scss\";\r\nimport { HeaderOnboarding } from \"../HeaderOnboarding/HeaderOnboarding\";\r\nimport GenericButton from \"../../../components/UI/Button/Button\";\r\nimport { WelcomeOnboarding } from \"../WelcomeOnboarding/WelcomeOnboarding\";\r\nimport confirmIcon from \"../../../../public/svg/ButtonIcons/right-arrow.svg\";\r\nimport { updatePerson } from \"../../../services/api/person\";\r\nimport { confirmFirstAccess } from \"../../../services/api/internalMessages\";\r\nimport { showToast } from \"../../../utils/helper\";\r\nimport MediaQuery from \"react-responsive\";\r\nimport { CircularProgress } from \"../../UI/CircularProgress/CircularProgress\";\r\n\r\nexport const PepOnboarding = ({ toggleMobileSidebar }) => {\r\n const personInfo = useSelector(getSavedPersonInfo);\r\n const notifications = useSelector(getNotifications);\r\n const [showWelcome, setShowWelcome] = useState(false);\r\n const [padding, setPadding] = useState(\"8px 46px\");\r\n const [loadingButtons, setLoadingButtons] = useState(false);\r\n\r\n //controls button padding according to the screen size\r\n useEffect(() => {\r\n const handleResize = () => {\r\n if (window.innerWidth >= 320 && window.innerWidth <= 390) {\r\n setPadding(\"8px 2px\");\r\n } else if (window.innerWidth >= 390 && window.innerWidth <= 724) {\r\n setPadding(\"8px 12px\");\r\n } else {\r\n setPadding(\"8px 46px\");\r\n }\r\n };\r\n handleResize();\r\n window.addEventListener(\"resize\", handleResize);\r\n return () => {\r\n window.removeEventListener(\"resize\", handleResize);\r\n };\r\n }, []);\r\n\r\n const firstAccess = () => {\r\n confirmFirstAccess({\r\n read: false,\r\n approved: true,\r\n InternalMessageId: notifications[0].InternalMessageId,\r\n LegalContractId: 0,\r\n ContractDocumentIds: [],\r\n })\r\n .then(({ response }) => {\r\n if (response.result.Code !== 200) {\r\n showToast(\"Error confirmando el primer acceso\", true);\r\n } else {\r\n showToast(\"Información enviada correctamente\");\r\n }\r\n })\r\n .catch((err) => {\r\n showToast(\"Error confirmando el primer acceso\", true);\r\n console.error(err);\r\n });\r\n };\r\n\r\n const toggleShowWelcomeIsPep = () => {\r\n setLoadingButtons(() => true);\r\n const personUpdate = {\r\n ...personInfo,\r\n PhysicalPersonPublicPositionId: 2,\r\n PhysicalPersonPublicPositionName: \"SI\",\r\n };\r\n\r\n updatePerson(personUpdate)\r\n .then(({ response }) => {\r\n if (response.result.Code === 200) {\r\n firstAccess();\r\n setShowWelcome(true);\r\n } else {\r\n alert(\"Problemas editando persona\");\r\n setLoadingButtons(() => false);\r\n }\r\n })\r\n .catch((err) => {\r\n console.error(\"Error updating person:\", err);\r\n setLoadingButtons(() => false);\r\n });\r\n };\r\n\r\n const toggleShowWelcomeNotPep = () => {\r\n setLoadingButtons(() => true);\r\n const personUpdate = {\r\n ...personInfo,\r\n PhysicalPersonPublicPositionId: 1,\r\n PhysicalPersonPublicPositionName: \"NO\",\r\n };\r\n\r\n updatePerson(personUpdate)\r\n .then(({ response }) => {\r\n if (response.result.Code === 200) {\r\n firstAccess();\r\n setShowWelcome(true);\r\n } else {\r\n alert(\"Problemas editando persona\");\r\n setLoadingButtons(() => false);\r\n }\r\n })\r\n .catch((err) => {\r\n console.error(\"Error updating person:\", err);\r\n setLoadingButtons(() => false);\r\n });\r\n };\r\n\r\n return (\r\n <div className={style.containerData}>\r\n <HeaderOnboarding title={<span>Declaración PEP</span>} toggleMobileSidebar={toggleMobileSidebar} />\r\n <Row className={style.headerTitle}>\r\n <Label>Declaración PEP</Label>\r\n <MediaQuery maxWidth={576}>\r\n <div className={style.divider}></div>\r\n </MediaQuery>\r\n </Row>\r\n <Row className={style.dataRow}>\r\n <Col>\r\n <div className={style.blankSpace}></div>\r\n <div className={style.dataTitle}>¿Qué es una Persona Expuesta Políticamente (PEP)?</div>\r\n <div className={style.data}>\r\n Es una persona que ocupa cargos de suma importancia como presidente, senador o diputado, ya sea en\r\n nuestro país o en el extranjero.\r\n </div>\r\n <div className={style.blankSpace}></div>\r\n <div className={style.dataTitle}>¿Por qué te pedimos este dato?</div>\r\n <div className={style.data}>\r\n Si vos o alguien de tu familia ocupa un cargo político, necesitaremos más información para abrir\r\n tu cuenta.\r\n </div>\r\n <div className={style.blankSpace}></div>\r\n <div className={style.divider}></div>\r\n <div className={style.buttonContainer}>\r\n <MediaQuery maxWidth={576}>\r\n <GenericButton\r\n label={\"Soy PEP\"}\r\n disabled={loadingButtons}\r\n rounded\r\n padding={padding}\r\n secondary\r\n right\r\n width={\"100%\"}\r\n handleClick={toggleShowWelcomeIsPep}\r\n />\r\n <GenericButton\r\n label={\"No soy PEP\"}\r\n disabled={loadingButtons}\r\n rounded\r\n padding={padding}\r\n primary\r\n right\r\n width={\"100%\"}\r\n handleClick={toggleShowWelcomeNotPep}\r\n />\r\n {loadingButtons && (\r\n <div>\r\n <CircularProgress />\r\n </div>\r\n )}\r\n </MediaQuery>\r\n <MediaQuery minWidth={577}>\r\n <GenericButton\r\n label={\"Soy PEP\"}\r\n disabled={loadingButtons}\r\n rounded\r\n padding={padding}\r\n secondary\r\n right\r\n //width={\"100%\"}\r\n handleClick={toggleShowWelcomeIsPep}\r\n iconSvg={[{ width: \"16px\", item: confirmIcon }]}\r\n />\r\n <GenericButton\r\n label={\"No soy PEP\"}\r\n disabled={loadingButtons}\r\n rounded\r\n padding={padding}\r\n primary\r\n right\r\n //marginLeft={\"20px\"}\r\n //width={\"100%\"}\r\n handleClick={toggleShowWelcomeNotPep}\r\n iconSvg={[{ width: \"16px\", item: confirmIcon }]}\r\n />\r\n {loadingButtons && <CircularProgress />}\r\n </MediaQuery>\r\n </div>\r\n </Col>\r\n </Row>\r\n {showWelcome && <WelcomeOnboarding />}\r\n </div>\r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"containerData\":\"PepOnboarding_containerData_1jVDZ\",\"noContainer\":\"PepOnboarding_noContainer_xxhm0\",\"headerTitle\":\"PepOnboarding_headerTitle_gJGSw\",\"headerPepTitle\":\"PepOnboarding_headerPepTitle_1XnIO\",\"dataRow\":\"PepOnboarding_dataRow_2VVJZ\",\"dataCol\":\"PepOnboarding_dataCol_3FIyc\",\"boxData\":\"PepOnboarding_boxData__DxsG\",\"data\":\"PepOnboarding_data_3C-Tf\",\"dataTitle\":\"PepOnboarding_dataTitle_1hEfW\",\"blankSpace\":\"PepOnboarding_blankSpace_2f8GG\",\"buttonContainer\":\"PepOnboarding_buttonContainer_1kOEK\",\"divider\":\"PepOnboarding_divider_2sj93\"};","import React, { useState, useEffect, Fragment } from \"react\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { Col, Row } from \"../../../components/UI/Customstrap/Customstrap\";\r\nimport { Link } from \"react-router-dom\";\r\nimport GenericButton from \"../../../components/UI/Button/Button\";\r\nimport confirmIcon from \"../../../../public/svg/ButtonIcons/right-arrow.svg\";\r\nimport { Icons } from \"../../../components/UI/Icon/Icon\";\r\nimport { getSavedPersonInfo, getTexts } from \"../../../reducers/selectors\";\r\nimport style from \"./WelcomeOnboarding.scss\";\r\nimport { Redirect } from \"react-router-dom\";\r\n\r\nexport const WelcomeOnboarding = () => {\r\n const personInfo = useSelector(getSavedPersonInfo);\r\n const [redirect, setRedirect] = useState(false);\r\n const texts = useSelector(getTexts);\r\n\r\n const profileRiskString = {\r\n Conservative: \"Conservador\",\r\n Moderate: \"Moderado\",\r\n Aggressive: \"Agresivo\",\r\n Aggresive: \"Agresivo\",\r\n };\r\n\r\n const profileRiskDescriptionString = {\r\n Conservative: texts.notes.investor_profile_conservative,\r\n Moderate: texts.notes.investor_profile_moderate,\r\n Aggressive: texts.notes.investor_profile_aggressive,\r\n Aggresive: texts.notes.investor_profile_aggressive,\r\n };\r\n\r\n const handleButtonClick = () => {\r\n setRedirect(true);\r\n };\r\n if (redirect) {\r\n //return <Redirect to=\"/\" />;\r\n return (window.location.href = \"/\");\r\n }\r\n\r\n return (\r\n <div className={style.welcomeDisplay}>\r\n <div className={style.infoContainer}>\r\n <div>\r\n <Icons.CheckInfo className={style.iconTick} />\r\n </div>\r\n <div className={style.welcomeText}>¡Listo! Recibimos tu información</div>\r\n <div className={style.configurationText}>\r\n Completaste tu configuración de perfil. \r\n Estaremos analizando tu información para abrirte una cuenta en ueno Casa de Bolsa.\r\n </div>\r\n <div className={style.profileType}>\r\n <div>\r\n <strong>Tu perfil de inversión:{\" \"} </strong>\r\n {profileRiskString[personInfo.PersonProfileRiskName]}\r\n </div>\r\n <div className={style.divider}></div>\r\n <div className={style.profileText}>{profileRiskDescriptionString[personInfo.PersonProfileRiskName]}</div>\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"welcomeDisplay\":\"WelcomeOnboarding_welcomeDisplay_1UyJb\",\"infoContainer\":\"WelcomeOnboarding_infoContainer_2Mz7_\",\"topGreenCircle\":\"WelcomeOnboarding_topGreenCircle_1wyxN\",\"starIcon\":\"WelcomeOnboarding_starIcon_1Ujel\",\"welcomeText\":\"WelcomeOnboarding_welcomeText_2DUxw\",\"configurationText\":\"WelcomeOnboarding_configurationText_1fpei\",\"iconTick\":\"WelcomeOnboarding_iconTick_3Mlff\",\"profileType\":\"WelcomeOnboarding_profileType_5IYsE\",\"profileText\":\"WelcomeOnboarding_profileText_1_Eyl\",\"buttonContainer\":\"WelcomeOnboarding_buttonContainer_S8sDA\",\"bottomGreenCircle\":\"WelcomeOnboarding_bottomGreenCircle_1MOy6\",\"faceIcon\":\"WelcomeOnboarding_faceIcon_2NYNZ\",\"divider\":\"WelcomeOnboarding_divider_3JoQC\"};","import React, { Fragment, useState } from \"react\";\r\n\r\nimport { Row, Col } from \"../UI/Customstrap/Customstrap\";\r\n\r\nimport style from \"./PageWrapper.scss\";\r\n\r\nexport const PageWrapper = ({ title, children }) => (\r\n <Row>\r\n <Col>\r\n <Row>\r\n <Col className={style.titleWrapper}>\r\n <span className={style.title}>{title}</span>\r\n </Col>\r\n </Row>\r\n <Row>\r\n <Col>{children}</Col>\r\n </Row>\r\n </Col>\r\n </Row>\r\n);\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"titleWrapper\":\"PageWrapper_titleWrapper_iez55\",\"title\":\"PageWrapper_title_1vy2n\"};","import React, { useState, useEffect, Fragment } from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { showToast } from \"../../utils/helper\";\r\n\r\nimport {\r\n getCurrentAccount,\r\n getNotifications,\r\n getAuthorizationsLoaded,\r\n getNotificationsLoaded,\r\n getNotificationsLoading,\r\n getSession,\r\n} from \"../../reducers/selectors\";\r\nimport { notificationsReload } from \"../../actions/entities\";\r\nimport { Popup } from \"../Modal/Popup/Popup\";\r\nimport SidebarOnboarding from \"../SidebarOnboarding/Sidebaronboarding\";\r\nimport { Toaster } from \"../Toaster/Toaster\";\r\n\r\nexport const PopupWrapper = ({ children }) => {\r\n const dispatch = useDispatch();\r\n const notifications = useSelector(getNotifications);\r\n const [activeNotification, setActiveNotification] = useState(null);\r\n\r\n const notificationsOrder = {\r\n FirstAccess: 0,\r\n Suitability: 1,\r\n PersonalData: 2,\r\n BlockingPopup: 3,\r\n Popup: 4,\r\n Alert: 5,\r\n Notification: 6,\r\n };\r\n\r\n useEffect(() => {\r\n if (notifications) {\r\n if (notifications.length) {\r\n const newNotifications = notifications.sort((a, b) => {\r\n if (notificationsOrder[a.InternalMessageForm] > notificationsOrder[b.InternalMessageForm]) return 1;\r\n if (notificationsOrder[a.InternalMessageForm] < notificationsOrder[b.InternalMessageForm])\r\n return -1;\r\n return 0;\r\n });\r\n\r\n if (notificationsOrder[newNotifications[0].InternalMessageForm] <= 2)\r\n setActiveNotification(newNotifications[0]);\r\n else {\r\n setActiveNotification(null);\r\n }\r\n }\r\n }\r\n }, [notifications]);\r\n\r\n const toggleActiveNotification = () => {\r\n setActiveNotification(null);\r\n };\r\n\r\n return !activeNotification ? (\r\n <Fragment>{children}</Fragment>\r\n ) : (\r\n <Fragment>\r\n <Toaster />\r\n {activeNotification.InternalMessageForm === \"FirstAccess\" ? (\r\n <Fragment>\r\n <SidebarOnboarding></SidebarOnboarding>\r\n </Fragment>\r\n ) : (\r\n <Fragment>\r\n <Popup\r\n internalMessage={activeNotification}\r\n open={!!activeNotification}\r\n toggle={toggleActiveNotification}\r\n isBlocking={activeNotification.InternalMessageForm === \"BlockingPopup\"}\r\n />\r\n {!activeNotification.InternalMessageForm === \"BlockingPopup\" && <Fragment>{children}</Fragment>}\r\n </Fragment>\r\n )}\r\n </Fragment>\r\n );\r\n};\r\n","import React, { useState, useEffect, Fragment } from \"react\";\r\nimport { Button, Input, Modal, ModalBody, ModalHeader } from \"reactstrap\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { CircularProgress } from \"../../UI/CircularProgress/CircularProgress\";\r\nimport { Prompt } from \"react-router-dom\";\r\n\r\nimport { Row, Col } from \"../../UI/Customstrap/Customstrap\";\r\nimport { Icons } from \"../../UI/Icon/Icon\";\r\nimport { Container } from \"../../UI/Container/Container\";\r\nimport { FormattedNumber } from \"../../FormattedNumber/FormattedNumber\";\r\nimport { AssetsRisksDoghnut, AssetRiskList } from \"../Charts/Chart\";\r\nimport { getCurrentAccount, getSavedPersonInfo } from \"../../../reducers/selectors\";\r\nimport { showToast } from \"../../../utils/helper\";\r\nimport { askPrice } from \"../../../services/api/inout\";\r\nimport { getAssetAttachment } from \"../../../services/api/entities\";\r\n\r\nimport style from \"./AssetClass.scss\";\r\nimport { getBankAccountBalance } from \"../../../services/api/accounts\";\r\nimport { BankAccountsSelector } from \"../../BankAccountsSelector/BankAccountsSelector\";\r\nimport { modes } from \"../../Invest/FundsTable/FundsAssetTable/FundsAssetTable\";\r\n\r\nexport const AssetClass = ({ assetClasses = [], portfolioTotal, activeCurrency, fx }) => {\r\n const [activeClass, setActiveClass] = useState(0);\r\n const [activeSubAssetClass, setActiveSubAssetClass] = useState(null);\r\n\r\n const handleChangeActiveClass = (idx) => {\r\n setActiveClass(idx);\r\n };\r\n\r\n return (\r\n <Row>\r\n <Col>\r\n <Row className={style.assetClassRow}>\r\n {assetClasses.map((assetClass, index) => (\r\n <Col className={style.buttonCol} key={assetClass.id}>\r\n <Button\r\n onClick={() => handleChangeActiveClass(index)}\r\n className={`${style.button} ${index === activeClass ? style.active : null}`}\r\n >\r\n {assetClass.name}\r\n </Button>\r\n </Col>\r\n ))}\r\n </Row>\r\n <Row>\r\n <Col xs={12}>\r\n <hr className={style.separator} />\r\n </Col>\r\n </Row>\r\n <Row>\r\n <Col>\r\n {/* Un row por cada sub asset class que tendrá un Link a la página siguiente */}\r\n {assetClasses.length > 0 &&\r\n assetClasses[activeClass].subAssetClass.map((subAssetClass) => (\r\n <Row key={subAssetClass.id}>\r\n <Col xs={12}>\r\n <Button\r\n className={style.subAssetClass}\r\n onClick={() => setActiveSubAssetClass(subAssetClass)}\r\n >\r\n <span>{subAssetClass.name}</span>\r\n <div className={style.counterWrapper}>\r\n <span className={style.counter}>{subAssetClass.asset.length}</span>\r\n <Icons.ArrowRightIcon size=\"sm\" />\r\n </div>\r\n </Button>\r\n </Col>\r\n </Row>\r\n ))}\r\n </Col>\r\n </Row>\r\n </Col>\r\n <Prompt\r\n when={activeSubAssetClass}\r\n message={(location) => {\r\n // Ejecutar la función personalizada antes de la navegación hacia atrás\r\n setActiveSubAssetClass(null);\r\n\r\n // No permitir la navegación hacia atrás\r\n return false;\r\n }}\r\n />\r\n {activeSubAssetClass && (\r\n <SubAssetClassDisplay\r\n activeCurrency={activeCurrency}\r\n fx={fx}\r\n subAssetClass={activeSubAssetClass}\r\n portfolioTotal={portfolioTotal}\r\n toggle={() => setActiveSubAssetClass(null)}\r\n />\r\n )}\r\n </Row>\r\n );\r\n};\r\n\r\nconst SubAssetClassDisplay = ({ subAssetClass, portfolioTotal, toggle, activeCurrency, fx }) => {\r\n const [totalMarketValue, setTotalMarketValue] = useState(0);\r\n const [totalMarketValueOneValue, setTotalMarketValueOneValue] = useState(0);\r\n const [totalInvestmentCost, setTotalInvestmentCost] = useState(0);\r\n const [totalInvestmentCostOneValue, setTotalInvestmentCostOneValue] = useState(0);\r\n const [totalAbsoluteReturn, setTotalAbsoluteReturn] = useState(0);\r\n const [totalNetReturn, setTotalNetReturn] = useState(0);\r\n const [totalNetReturnOneValue, setTotalNetReturnOneValue] = useState(0);\r\n const [totalYTM, setTotalYTM] = useState(0);\r\n const [totalPortfolio, setTotalPortfolio] = useState(0);\r\n const [sell, setSell] = useState({ open: false, asset: null, total: 0 });\r\n const currentAccount = useSelector(getCurrentAccount);\r\n\r\n // prevenir ir pa tras\r\n const isSubAssetFund = subAssetClass.asset.filter((asset) => asset.form == \"Mutual Funds\").length > 0;\r\n\r\n useEffect(() => {\r\n let totalMarketValue = 0;\r\n let totalMarketValueOneValue = 0;\r\n let totalInvestmentCost = 0;\r\n let totalInvestmentCostOneValue = 0;\r\n let totalAbsoluteReturn = 0;\r\n let totalNetReturn = 0;\r\n let totalNetReturnOneValue = 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 investCostUSD = ((+asset.NetReturn - (+asset.valuetotal + +asset.realizePL)) * -1) / fx;\r\n let netReturnUSD = asset.NetReturn / fx;\r\n if (asset.emissionCurrencyISO === \"PYG\") {\r\n totalMarketValue += parseFloat(asset.totalUSDWithCoupon);\r\n } else {\r\n totalMarketValue += parseFloat(asset.totalOriginCurrencyWithCoupon);\r\n }\r\n if (asset.emissionCurrencyISO === \"USD\") {\r\n totalMarketValueOneValue += parseFloat(asset.totalUSDWithCoupon);\r\n } else {\r\n totalMarketValueOneValue += parseFloat(asset.totalOriginCurrencyWithCoupon);\r\n }\r\n\r\n if (asset.emissionCurrencyISO === \"PYG\") {\r\n totalInvestmentCost += parseFloat(investCostUSD);\r\n } else {\r\n totalInvestmentCost += parseFloat(investCost);\r\n }\r\n if (asset.emissionCurrencyISO === \"USD\") {\r\n totalInvestmentCostOneValue += parseFloat(investCostUSD);\r\n } else {\r\n totalInvestmentCostOneValue += parseFloat(investCost);\r\n }\r\n\r\n if (asset.emissionCurrencyISO === \"PYG\" || asset.emissionCurrencyId === \"0\") {\r\n totalNetReturn += parseFloat(netReturnUSD);\r\n } else {\r\n totalNetReturn += parseFloat(asset.NetReturn);\r\n }\r\n if (asset.emissionCurrencyISO === \"USD\") {\r\n totalNetReturnOneValue += parseFloat(netReturnUSD);\r\n } else {\r\n totalNetReturnOneValue += parseFloat(asset.NetReturn);\r\n }\r\n\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 // totalYTM = totalYTM / subAssetClass.asset.length;\r\n\r\n subAssetClass.asset.forEach((asset) => {\r\n const isMutualFunds = asset.form === \"Mutual Funds\";\r\n const isPYG = asset.emissionCurrencyISO === \"PYG\";\r\n const totalValue = isPYG\r\n ? parseFloat(asset.totalUSDWithCoupon)\r\n : parseFloat(asset.totalOriginCurrencyWithCoupon);\r\n\r\n if (isMutualFunds) {\r\n totalYTM += parseFloat(asset.FundAnnualVariation);\r\n } else {\r\n totalYTM += parseFloat(asset.YTM) * (totalValue / totalMarketValue);\r\n }\r\n });\r\n\r\n setTotalMarketValue(totalMarketValue);\r\n setTotalMarketValueOneValue(totalMarketValueOneValue);\r\n setTotalInvestmentCost(totalInvestmentCost);\r\n setTotalInvestmentCostOneValue(totalInvestmentCostOneValue);\r\n setTotalAbsoluteReturn(totalAbsoluteReturn);\r\n setTotalNetReturn(totalNetReturn);\r\n setTotalNetReturnOneValue(totalNetReturnOneValue);\r\n setTotalYTM(totalYTM);\r\n setTotalPortfolio(totalPortfolio);\r\n }, []);\r\n\r\n const toggleSell = (asset, total) => {\r\n setSell((prev) => (prev.open ? { open: false } : { open: true, asset, total }));\r\n };\r\n\r\n return (\r\n <div className={style.subAssetClassDisplay}>\r\n <Row>\r\n <Col xs={12} className={style.titleWrapper}>\r\n <span className={style.iconWrapper} onClick={toggle}>\r\n <Icons.ArrowLeftIcon className={style.icon} />\r\n </span>\r\n <span className={style.title}>{subAssetClass.name}</span>\r\n </Col>\r\n <hr className={style.hrTitle} />\r\n </Row>\r\n <Row>\r\n <Col>\r\n <Container className={style.summary}>\r\n <Row>\r\n <Col xs={12} lg={6} xl={8} className={style.centeredCol}>\r\n <Row className={style.centeredRow}>\r\n <Col className={style.item} xs={12} sm={6} xl={4}>\r\n <span>Valor de mercado</span>\r\n <span className={style.label}>\r\n <span className={style.currency}> {activeCurrency !== \"PYG\" ? \"USD\" : \"PYG\"}</span>\r\n <FormattedNumber\r\n value={activeCurrency === \"ALL\" ? totalMarketValue : totalMarketValueOneValue}\r\n minimumFractionDigits={subAssetClass.asset[0].emissionCurrencyISO === \"PYG\" ? 0 : 2}\r\n maximumFractionDigits={subAssetClass.asset[0].emissionCurrencyISO === \"PYG\" ? 0 : 2}\r\n />\r\n </span>\r\n </Col>\r\n {!isSubAssetFund && (\r\n <Col className={style.item} xs={12} sm={6} xl={4}>\r\n <span>Rendimiento (TIR)</span>\r\n <span className={style.label}>\r\n <FormattedNumber\r\n value={totalYTM}\r\n minimumFractionDigits={2}\r\n maximumFractionDigits={2}\r\n />\r\n %\r\n </span>\r\n </Col>\r\n )}\r\n <Col className={style.item} xs={12} sm={6} xl={4}>\r\n <span>Portafolio</span>\r\n <span className={style.label}>\r\n <FormattedNumber\r\n value={totalPortfolio}\r\n minimumFractionDigits={2}\r\n maximumFractionDigits={2}\r\n />\r\n %\r\n </span>\r\n </Col>\r\n </Row>\r\n </Col>\r\n <Col className={style.risk} xs={12} lg={6} xl={4}>\r\n <span className={style.titleRisk}>Calificación de riesgo</span>\r\n <div className={style.graphWrapper}>\r\n <AssetsRisksDoghnut assets={subAssetClass.asset} portfolioTotal={portfolioTotal} />\r\n <AssetRiskList assets={subAssetClass.asset} portfolioTotal={portfolioTotal} />\r\n </div>\r\n </Col>\r\n </Row>\r\n </Container>\r\n <hr className={style.hrDivider} style={{ width: \"auto\" }} />\r\n </Col>\r\n </Row>\r\n {subAssetClass.asset.map((Asset) => {\r\n const investCost = (+Asset.NetReturn - (+Asset.valuetotal + +Asset.realizePL)) * -1;\r\n const totalValue = parseFloat(Asset.totalOriginCurrencyWithCoupon);\r\n\r\n const handleDownloadAttachment = () => {\r\n getAssetAttachment({\r\n accountNumber: currentAccount.AccountNumber,\r\n assetId: Asset.id,\r\n })\r\n .then(({ response }) => {\r\n if (response.result.Code == 200) {\r\n const fileName = `${response.AssetAttachmentName.trim()}.${response.AssetAttachmentExtension.trim()}`;\r\n const element = document.createElement(\"a\");\r\n element.setAttribute(\r\n \"href\",\r\n \"data:application/octet-stream;base64,\" + encodeURIComponent(response.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 } else {\r\n showToast(response.result.Description, true);\r\n }\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n showToast(\"Error obteniendo el archivo adjunto\", true);\r\n });\r\n };\r\n\r\n return (\r\n <Row>\r\n <Col>\r\n <Container className={style.assetContainer} style={{ backgroundColor: \"#FDFDFC\" }}>\r\n <Row>\r\n <Col xs={12} lg={4} className={style.assetInfo}>\r\n <span className={`${style.assetField} ${style.name}`}>{Asset.name}</span>\r\n <span className={`${style.assetField} ${style.nominal}`}>\r\n {Asset.form === \"Mutual Funds\" ? (\r\n <span className={style.label}>Total Efectivo: </span>\r\n ) : (\r\n <span className={style.label}>Valor Nominal: </span>\r\n )}\r\n\r\n <span className={style.currency}>\r\n {Asset.emissionCurrencyISO === \"\"\r\n ? Asset.emissionCurrencyId === \"0\"\r\n ? \"PYG\"\r\n : \"USD\"\r\n : Asset.emissionCurrencyISO}\r\n </span>\r\n\r\n {Asset.form !== \"Mutual Funds\" ? (\r\n <FormattedNumber\r\n value={Asset.parvalue * Asset.nominalValue}\r\n minimumFractionDigits={\r\n Asset.emissionCurrencyISO === \"PYG\" || Asset.emissionCurrencyId === \"0\" ? 0 : 2\r\n }\r\n maximumFractionDigits={\r\n Asset.emissionCurrencyISO === \"PYG\" || Asset.emissionCurrencyId === \"0\" ? 0 : 2\r\n }\r\n />\r\n ) : (\r\n <FormattedNumber\r\n value={Asset.totalOriginCurrencyWithCoupon}\r\n minimumFractionDigits={\r\n Asset.emissionCurrencyISO === \"PYG\" || Asset.emissionCurrencyId === \"0\" ? 0 : 2\r\n }\r\n maximumFractionDigits={\r\n Asset.emissionCurrencyISO === \"PYG\" || Asset.emissionCurrencyId === \"0\" ? 0 : 2\r\n }\r\n />\r\n )}\r\n </span>\r\n <span className={style.assetField}>\r\n <span className={style.label}>ISIN: </span>\r\n {Asset.isin}\r\n </span>\r\n {Asset.form !== \"Mutual Funds\" ? (\r\n <React.Fragment>\r\n <span className={style.assetField}>\r\n <span className={style.label}>Calificación de riesgo: </span>\r\n {Asset.riskType}\r\n </span>\r\n <span className={style.assetField}>\r\n <span className={style.label}>Tasa cupón: </span>\r\n <FormattedNumber\r\n value={Asset.paymentRateFixed}\r\n minimumFractionDigits={2}\r\n maximumFractionDigits={2}\r\n />\r\n <span>%</span>\r\n </span>\r\n </React.Fragment>\r\n ) : (\r\n <React.Fragment />\r\n )}\r\n </Col>\r\n <Col xs={12} lg={5} className={`${style.assetInfo} ${style.secondCol}`}>\r\n <span className={style.assetField}>\r\n <span className={style.label}>{`${\r\n Asset.form !== \"Mutual Funds\" ? \"Cantidad\" : \"Cuotapartes\"\r\n }: `}</span>\r\n\r\n {Asset.form !== \"Mutual Funds\" ? (\r\n <FormattedNumber\r\n value={Asset.nominalValue}\r\n minimumFractionDigits={0}\r\n maximumFractionDigits={0}\r\n />\r\n ) : (\r\n <FormattedNumber\r\n value={Asset.nominalValueExtended}\r\n minimumFractionDigits={6}\r\n maximumFractionDigits={6}\r\n />\r\n )}\r\n </span>\r\n {Asset.AssetAnnualTargetPerformance && Asset.AssetAnnualTargetPerformance != 0 && (\r\n <span className={style.assetField}>\r\n <span className={style.label}>{`Rendimiento Objetivo Anual: `}</span>\r\n <FormattedNumber\r\n value={Asset.AssetAnnualTargetPerformance}\r\n minimumFractionDigits={2}\r\n maximumFractionDigits={2}\r\n />\r\n <span className={style.label}> %</span>\r\n </span>\r\n )}\r\n <span className={style.assetField}>\r\n {Asset.form !== \"Mutual Funds\" ? (\r\n <React.Fragment>\r\n <span className={style.label}>Rendimiento (TIR): </span>\r\n <FormattedNumber\r\n value={Asset.YTM}\r\n minimumFractionDigits={2}\r\n maximumFractionDigits={2}\r\n />\r\n <span>%</span>\r\n </React.Fragment>\r\n ) : (\r\n <React.Fragment>\r\n {/* <span className={style.label}>Rendimiento: </span>\r\n <FormattedNumber\r\n value={Asset.FundAnnualVariation}\r\n minimumFractionDigits={2}\r\n maximumFractionDigits={6}\r\n />\r\n <span>%</span> */}\r\n </React.Fragment>\r\n )}\r\n </span>\r\n </Col>\r\n <Col xs={12} lg={3} className={`${style.assetInfo} ${style.thirdCol}`}>\r\n {Asset.form === \"Bonds\" && (\r\n <div className={style.totalValueWrapper}>\r\n <span className={style.value}>\r\n <span className={style.currency}>\r\n {Asset.emissionCurrencyISO === \"\"\r\n ? Asset.emissionCurrencyId === \"0\"\r\n ? \"PYG\"\r\n : \"USD\"\r\n : Asset.emissionCurrencyISO}\r\n </span>\r\n <FormattedNumber\r\n value={totalValue}\r\n minimumFractionDigits={\r\n Asset.emissionCurrencyISO === \"PYG\" || Asset.emissionCurrencyId === \"0\" ? 0 : 2\r\n }\r\n maximumFractionDigits={\r\n Asset.emissionCurrencyISO === \"PYG\" || Asset.emissionCurrencyId === \"0\" ? 0 : 2\r\n }\r\n />\r\n </span>\r\n <span className={style.label}>Valor de mercado</span>\r\n </div>\r\n )}\r\n {subAssetClass.cda && (\r\n <Button className={`${style.button} ${style.show}`} onClick={handleDownloadAttachment}>\r\n Mostrar título de CDA <Icons.DocumentIcon size=\"sm\" className={style.icon} />\r\n </Button>\r\n )}\r\n {Asset.form !== \"Mutual Funds\" && (\r\n <Button\r\n className={style.button}\r\n onClick={() => {\r\n toggleSell(Asset, Asset.nominalValue);\r\n }}\r\n >\r\n Pedir cotización\r\n </Button>\r\n )}\r\n </Col>\r\n </Row>\r\n </Container>\r\n </Col>\r\n </Row>\r\n );\r\n })}\r\n {sell.open && <SellModal open={sell.open} asset={sell.asset} total={sell.total} toggle={toggleSell} />}\r\n </div>\r\n );\r\n};\r\n\r\nconst SellModal = ({ open, asset, total, toggle }) => {\r\n const totalSell = <FormattedNumber value={total} minimumFractionDigits={0} maximumFractionDigits={0} />;\r\n const [loading, setLoading] = useState(false);\r\n const [qty, setQty] = useState(Math.round(1));\r\n const [error, setError] = useState(\"\");\r\n const [activeAccount, setActiveAccount] = useState(null);\r\n const [bankAccounts, setBankAccounts] = useState([]);\r\n\r\n const currentAccount = useSelector(getCurrentAccount);\r\n const personInfo = useSelector(getSavedPersonInfo);\r\n\r\n useEffect(() => {\r\n if (personInfo.PersonBankAccount) {\r\n setBankAccounts(personInfo.PersonBankAccount);\r\n }\r\n }, [personInfo]);\r\n\r\n const onConfirm = () => {\r\n if (+qty > +total) setError(\"La cantidad ingresada no puede ser mayor a la cantidad del portafolio.\");\r\n else {\r\n setLoading(() => true);\r\n setError(\"\");\r\n const Order = {\r\n AssetId: asset.id,\r\n OrderHierarchy: \"Parent\",\r\n cashdiffered: true,\r\n CurrentAccount: {\r\n AccountId: currentAccount.id,\r\n Quantity: qty,\r\n clientBankAccount: activeAccount.PersonBankAccountNumber,\r\n },\r\n };\r\n askPrice({ Order })\r\n .then(({ response }) => {\r\n if (response.result.Code !== 200) setError(\"Error enviando tu pedido de cotización.\");\r\n else {\r\n showToast(\"Enviamos tu pedido de cotización.\");\r\n toggle();\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\r\n const handleOnChangeQty = (e) => {\r\n setQty(+e.target.value);\r\n };\r\n\r\n return (\r\n <Modal isOpen={open} className={style.modalWrapper}>\r\n <Container className={style.sellContainer}>\r\n <span className={style.closeIcon} onClick={toggle}>\r\n <Icons.Close />\r\n </span>\r\n <span className={style.sellAssetName}>{asset.name}</span>\r\n <span className={style.sellTitle}>¿Cuántos querés cotizar?</span>\r\n <hr className={style.divider} />\r\n <span className={style.qtyLabel}>Cantidad</span>\r\n <input\r\n className={style.qtyInput}\r\n placeholder=\"Cantidad a vender\"\r\n type=\"number\"\r\n min={0}\r\n max={total}\r\n value={qty}\r\n onChange={handleOnChangeQty}\r\n />\r\n <span className={style.maxQty}>Cantidad disponible: {totalSell}</span>\r\n <div className={style.bankAccounts}>\r\n <p className={style.title}>Elegí una cuenta para la acreditación</p>\r\n <BankAccountsSelector\r\n bankAccounts={bankAccounts}\r\n selectedBankAccount={activeAccount}\r\n onSelectBankAccount={setActiveAccount}\r\n filters={{\r\n currencyISO: asset.emissionCurrencyISO,\r\n mode: modes.SELL,\r\n }}\r\n />\r\n </div>\r\n {loading ? (\r\n <CircularProgress />\r\n ) : (\r\n <Button className={style.buttonSell} onClick={onConfirm} disabled={!activeAccount}>\r\n Pedir cotización\r\n </Button>\r\n )}\r\n\r\n <span className={style.disclaimer}>\r\n La cotización estará disponible en la sección “Autorizaciones” dentro de las 24 horas hábiles\r\n posteriores al pedido.\r\n </span>\r\n {error && <span className={style.error}>{error}</span>}\r\n </Container>\r\n </Modal>\r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"assetClassRow\":\"AssetClass_assetClassRow_2W5OK\",\"buttonCol\":\"AssetClass_buttonCol_2LOFf\",\"button\":\"AssetClass_button_1ey1C\",\"active\":\"AssetClass_active_18w-6\",\"separator\":\"AssetClass_separator_3rPeo\",\"subAssetClass\":\"AssetClass_subAssetClass_1L_Wy\",\"counterWrapper\":\"AssetClass_counterWrapper_15_GZ\",\"counter\":\"AssetClass_counter_3HEYX\",\"subAssetClassDisplay\":\"AssetClass_subAssetClassDisplay_3WI4s\",\"titleWrapper\":\"AssetClass_titleWrapper_24rBd\",\"title\":\"AssetClass_title_VNBGh\",\"iconWrapper\":\"AssetClass_iconWrapper_3Gixb\",\"icon\":\"AssetClass_icon_2kIRv\",\"assetInfo\":\"AssetClass_assetInfo_37TGw\",\"assetField\":\"AssetClass_assetField_2BDP1\",\"currency\":\"AssetClass_currency_2qKkF\",\"label\":\"AssetClass_label_HYaRX\",\"name\":\"AssetClass_name_C5URo\",\"nominal\":\"AssetClass_nominal_14Ba5\",\"secondCol\":\"AssetClass_secondCol_17QGj\",\"thirdCol\":\"AssetClass_thirdCol_2EOSP\",\"totalValueWrapper\":\"AssetClass_totalValueWrapper_1c_-2\",\"value\":\"AssetClass_value_2LmtH\",\"show\":\"AssetClass_show_194ai\",\"summary\":\"AssetClass_summary_2M55U\",\"item\":\"AssetClass_item_3mKFM\",\"itemSummary\":\"AssetClass_itemSummary_1a39S\",\"risk\":\"AssetClass_risk_12vgQ\",\"titleRisk\":\"AssetClass_titleRisk_AbuWD\",\"graphWrapper\":\"AssetClass_graphWrapper_10LAb\",\"modalWrapper\":\"AssetClass_modalWrapper_VV7BT\",\"sellContainer\":\"AssetClass_sellContainer_32FHg\",\"closeIcon\":\"AssetClass_closeIcon_2eEDj\",\"sellAssetName\":\"AssetClass_sellAssetName_1lPOE\",\"sellTitle\":\"AssetClass_sellTitle_3ojcN\",\"divider\":\"AssetClass_divider_N4TAI\",\"qtyLabel\":\"AssetClass_qtyLabel_3pNZF\",\"qtyInput\":\"AssetClass_qtyInput_1J1k4\",\"maxQty\":\"AssetClass_maxQty_3VWIf\",\"bankAccounts\":\"AssetClass_bankAccounts_XXpdq\",\"buttonSell\":\"AssetClass_buttonSell_1DV8g\",\"disclaimer\":\"AssetClass_disclaimer_3oq6-\",\"error\":\"AssetClass_error_3PuRv\",\"middleRow\":\"AssetClass_middleRow_3XpzU\",\"centeredRow\":\"AssetClass_centeredRow_3KJxE\",\"centeredCol\":\"AssetClass_centeredCol_1hKsm\",\"hrTitle\":\"AssetClass_hrTitle_2Auoe\",\"hrDivider\":\"AssetClass_hrDivider_3opOh\",\"assetContainer\":\"AssetClass_assetContainer_3pjK5\",\"personalAccount\":\"AssetClass_personalAccount_3DUZB\",\"personalAccountDisable\":\"AssetClass_personalAccountDisable_heXTR\",\"disabled\":\"AssetClass_disabled_2OJM5\",\"accountName\":\"AssetClass_accountName_1yV0W\",\"radioActive\":\"AssetClass_radioActive_3mfKS\",\"radioButton\":\"AssetClass_radioButton_xrM82\",\"disabledBtn\":\"AssetClass_disabledBtn__RHzJ\",\"accountNumber\":\"AssetClass_accountNumber_HhxuL\"};","import React, { useState, useEffect } from \"react\";\r\nimport ReactEcharts from \"echarts-for-react\";\r\nimport { FormattedNumber, formattedNumber } from \"../../FormattedNumber/FormattedNumber\";\r\n\r\nimport style from \"./Chart.scss\";\r\n\r\nconst colors = {\r\n 1: \"color1\",\r\n 2: \"color2\",\r\n 3: \"color3\",\r\n 4: \"color4\",\r\n 5: \"color5\",\r\n 6: \"color6\",\r\n};\r\n\r\nconst riskColors = {\r\n 1: \"riskColor1\",\r\n 2: \"riskColor2\",\r\n 3: \"riskColor3\",\r\n 4: \"riskColor4\",\r\n 5: \"riskColor5\",\r\n 6: \"riskColor6\",\r\n};\r\n\r\nexport const AssetClassDoghnut = ({ position, onSelectItem }) => {\r\n const [chartOptions, setChartOptions] = useState({});\r\n\r\n const tooltipFormatter = (param) => {\r\n return `Composición por tipo de instrumento <br/><span style=\"color: ${param.color}\">●</span> ${\r\n param.data.name\r\n }: <span style=\"font-weight: bold\">${formattedNumber(param.value)}</span>`;\r\n };\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 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: 40,\r\n show: screen.width > 1200 ? true : false,\r\n textStyle: {\r\n fontFamily: \"Arial\",\r\n overflow: \"break\",\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 radius: [\"60%\", \"90%\"],\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: [\"#a3dcf7\", \"#11658d\", \"#1996d5\", \"#0d4664\"],\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 <div className={style.doghnutWrapper}>\r\n <ReactEcharts option={chartOptions} onEvents={onEvents} />\r\n </div>\r\n );\r\n};\r\n\r\nexport const SubAssetClassDoghnut = ({ subAssetClasses }) => {\r\n const [chartOptions, setChartOptions] = useState({});\r\n\r\n const tooltipFormatter = (param) => {\r\n return `Composición por instrumento <br/><span style=\"color: ${param.color}\">●</span> ${\r\n param.data.name\r\n }: <span style=\"font-weight: bold\">${formattedNumber(param.value)}</span>`;\r\n };\r\n\r\n useEffect(() => {\r\n if (subAssetClasses.length) {\r\n const optionData = subAssetClasses.map((subAssetClassesItem) => ({\r\n name: subAssetClassesItem.name,\r\n value: +subAssetClassesItem.total,\r\n }));\r\n\r\n let option = {\r\n legend: {\r\n show: false,\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 radius: [\"50%\", \"100%\"],\r\n height: 150,\r\n data: optionData,\r\n emphasis: {\r\n disabled: true,\r\n },\r\n label: {\r\n show: false,\r\n },\r\n color: [\"#3B82F6\", \"#22C55E\", \"#F43F6C\", \"#71717A\", \"#20D3A4\", \"#F59E0B\"],\r\n },\r\n ],\r\n renderer: \"svg\",\r\n };\r\n\r\n setChartOptions(option);\r\n }\r\n }, [subAssetClasses]);\r\n\r\n return (\r\n <div className={style.doghnutWrapper}>\r\n <ReactEcharts option={chartOptions} />\r\n </div>\r\n );\r\n};\r\n\r\nexport const SubAssetClassDoghnutItems = ({ subAssetClasses }) => {\r\n let pillColorIdx = 0;\r\n return (\r\n <div className={style.legendWrapper}>\r\n {subAssetClasses.map((item, index) => {\r\n if (pillColorIdx === 6) {\r\n pillColorIdx = 1;\r\n }\r\n pillColorIdx += 1;\r\n\r\n return (\r\n <span className={style.legendItem} key={item.name + \"-\" + index}>\r\n <span className={style[colors[pillColorIdx]]}>●</span>\r\n <span className={style.name}>{item.name}</span>\r\n </span>\r\n );\r\n })}\r\n </div>\r\n );\r\n};\r\n\r\nexport const AssetsRisksDoghnut = ({ assets = [], portfolioTotal }) => {\r\n const [chartOptions, setChartOptions] = useState({});\r\n\r\n const tooltipFormatter = (param) => {\r\n return `Calificación de riesgo <br/><span style=\"color: ${param.color}\">●</span> ${\r\n param.data.name\r\n }: <span style=\"font-weight: bold\">${formattedNumber(param.value)}</span>`;\r\n };\r\n\r\n useEffect(() => {\r\n if (assets.length) {\r\n let totalAssets = 0;\r\n assets.map((asset) => {\r\n totalAssets += parseFloat(asset.totalUSDWithCoupon);\r\n });\r\n\r\n let risks = [];\r\n assets.map((asset) => {\r\n if (!risks[asset.riskType]) {\r\n risks[asset.riskType] = {\r\n value: 0,\r\n name: asset.riskType,\r\n };\r\n }\r\n\r\n risks[asset.riskType].value += (+asset.totalUSDWithCoupon * 100) / +totalAssets;\r\n });\r\n\r\n const optionData = Object.values(risks).map((risk) => ({\r\n name: risk.name,\r\n value: Math.round(risk.value * 100) / 100,\r\n }));\r\n\r\n // const optionData = assets.map((Asset) => ({\r\n // name: Asset.riskType,\r\n // value: (+Asset.totalUSDWithCoupon * 100) / +portfolioTotal,\r\n // }));\r\n\r\n let option = {\r\n legend: {\r\n show: false,\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 minAngle: 5,\r\n radius: [\"60%\", \"100%\"],\r\n height: 157,\r\n data: optionData,\r\n emphasis: {\r\n disabled: true,\r\n },\r\n label: {\r\n show: false,\r\n },\r\n color: [\"#3B82F6\", \"#22C55E\", \"#F43F6C\", \"#71717A\", \"#20D3A4\", \"#F59E0B\"],\r\n },\r\n ],\r\n renderer: \"svg\",\r\n };\r\n\r\n setChartOptions(option);\r\n }\r\n }, [assets]);\r\n\r\n return (\r\n <div className={style.doghnutWrapper}>\r\n <ReactEcharts option={chartOptions} />\r\n </div>\r\n );\r\n};\r\n\r\nexport const AssetRiskList = ({ assets = [], portfolioTotal }) => {\r\n const [riskList, setRiskList] = useState([]);\r\n\r\n useEffect(() => {\r\n let totalAssets = 0;\r\n assets.map((asset) => {\r\n totalAssets += parseFloat(asset.totalUSDWithCoupon);\r\n });\r\n\r\n let risks = [];\r\n assets.map((asset) => {\r\n if (!risks[asset.riskType]) {\r\n risks[asset.riskType] = {\r\n value: 0,\r\n name: asset.riskType,\r\n };\r\n }\r\n\r\n risks[asset.riskType].value += (+asset.totalUSDWithCoupon * 100) / +totalAssets;\r\n });\r\n\r\n const newList = Object.values(risks).map((risk) => {\r\n const name = risk.name;\r\n const value = risk.value;\r\n\r\n return {\r\n name,\r\n value,\r\n width: value + 50,\r\n };\r\n });\r\n\r\n setRiskList(newList);\r\n }, []);\r\n\r\n let pillColorIdx = 0;\r\n\r\n return (\r\n <div className={style.riskList}>\r\n <ul>\r\n {riskList.map((risk) => {\r\n if (pillColorIdx === 6) {\r\n pillColorIdx = 1;\r\n }\r\n pillColorIdx += 1;\r\n\r\n return (\r\n <li className={style.item}>\r\n <span className={style.riskListItem}>\r\n <span className={style.name}>{risk.name}</span>\r\n <span\r\n className={`${style.value} ${style[riskColors[pillColorIdx]]}`}\r\n style={{ width: risk.width }}\r\n >\r\n <FormattedNumber value={risk.value} minimumFractionDigits={2} maximumFractionDigits={2} />%\r\n </span>\r\n </span>\r\n </li>\r\n );\r\n })}\r\n </ul>\r\n </div>\r\n );\r\n};\r\n\r\nexport const PortfolioDoghnut = ({ portfolio }) => {\r\n const [chartOptions, setChartOptions] = useState({});\r\n\r\n const tooltipFormatter = (param) => {\r\n return `Portafolio <br/><span style=\"color: ${param.color}\">●</span> ${\r\n param.data.name\r\n }: <span style=\"font-weight: bold\">${formattedNumber(param.data.valueOriginal)}</span>`;\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: +portfolio.position.valueTotalUSD,\r\n valueOriginal: +portfolio.position.valueTotal,\r\n });\r\n optionData.push({\r\n name: \"Total Gs\",\r\n value: +portfolio.positionPYG.valueTotalUSD,\r\n valueOriginal: +portfolio.positionPYG.valueTotal,\r\n });\r\n\r\n let option = {\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 radius: [\"60%\", \"90%\"],\r\n data: optionData,\r\n top: 30,\r\n label: {\r\n show: false,\r\n },\r\n color: [\"#a3dcf7\", \"#11658d\", \"#1996d5\", \"#0d4664\"],\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 <div className={style.portfolioDoghnutWrapper}>\r\n <ReactEcharts option={chartOptions} />\r\n </div>\r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"doghnutWrapper\":\"Chart_doghnutWrapper_f3G-y\",\"portfolioDoghnutWrapper\":\"Chart_portfolioDoghnutWrapper_3OA_j\",\"legendWrapper\":\"Chart_legendWrapper_3xybR\",\"legendItem\":\"Chart_legendItem_2ImNq\",\"name\":\"Chart_name_3yExn\",\"color1\":\"Chart_color1_1YF3p\",\"color2\":\"Chart_color2_1sZuQ\",\"color3\":\"Chart_color3_1Ya95\",\"color4\":\"Chart_color4_2-7O2\",\"color5\":\"Chart_color5_2Y-u0\",\"color6\":\"Chart_color6_3Ghxg\",\"value\":\"Chart_value_3loCH\",\"riskColor1\":\"Chart_riskColor1_rSBJG\",\"riskColor2\":\"Chart_riskColor2_mDqiw\",\"riskColor3\":\"Chart_riskColor3_1LNIa\",\"riskColor4\":\"Chart_riskColor4_1CAh2\",\"riskColor5\":\"Chart_riskColor5_3QAgV\",\"riskColor6\":\"Chart_riskColor6_3CgxI\",\"riskList\":\"Chart_riskList_3uy0b\",\"item\":\"Chart_item_25jyc\",\"riskListItem\":\"Chart_riskListItem_1hD6K\"};","import React, { useState, useEffect, Fragment } from \"react\";\r\nimport { Label, Button } from \"reactstrap\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { CircularProgress } from \"../UI/CircularProgress/CircularProgress\";\r\nimport { FormattedNumber } from \"../FormattedNumber/FormattedNumber\";\r\nimport MediaQuery from \"react-responsive\";\r\nimport { getCurrentAccount, getTexts } from \"../../reducers/selectors\";\r\nimport { fetchGetPortfolio, getClientPositionDigital } from \"../../services/api/accounts\";\r\nimport { PortfolioTable } from \"./PortfolioTable/PortfolioTable\";\r\nimport { PortfolioHeader } from \"./PortfolioHeader/PortfolioHeader\";\r\nimport { PortfolioDoghnut, SubAssetClassDoghnut, SubAssetClassDoghnutItems } from \"./Charts/Chart\";\r\nimport { getPersonInfo } from \"../../services/api/person\";\r\nimport { personInfoSet, currentAccountSet } from \"../../actions/entities\";\r\nimport { fetchGetAccounts } from \"../../services/api/accounts\";\r\nimport { RadioButton, RadioButtonGroup } from \"../UI/RadioButton/RadioButton\";\r\nimport { Icons } from \"../UI/Icon/Icon\";\r\nimport { CompositionBar } from \"../UI/CompositionBar/CompositionBar\";\r\nimport { Container } from \"../UI/Container/Container\";\r\nimport { Tooltip } from \"../Tooltip/Tooltip\";\r\nimport GenericButton from \"../UI/Button/Button\";\r\nimport CounterBox from \"../UI/Button/CounterBox\";\r\nimport { Row, Col } from \"../UI/Customstrap/Customstrap\";\r\nimport { Summary } from \"./Summary/Summary\";\r\nimport { TitleLabel } from \"../UI/TitleLabel/TitleLabel\";\r\nimport { AssetClass } from \"./AssetClass/AssetClass\";\r\n\r\nimport style from \"./Portfolio.scss\";\r\n\r\nconst allowedCurrencies = {\r\n ALL: \"ALL\",\r\n PYG: \"PYG\",\r\n USD: \"USD\",\r\n};\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 texts = useSelector(getTexts);\r\n const [activeCurrency, setActiveCurrency] = useState(allowedCurrencies.ALL);\r\n const [activePortfolio, setActivePortfolio] = useState(null);\r\n const dispatch = useDispatch();\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 setLoadingPosition(false);\r\n }\r\n if (currentAccount.noAccounts) {\r\n setLoadingPosition(false);\r\n }\r\n }, [currentAccount, portfolioDate]);\r\n\r\n useEffect(() => {\r\n if (portfolio && !loadingPosition) {\r\n let newActivePortfolio;\r\n switch (activeCurrency) {\r\n case allowedCurrencies.ALL:\r\n newActivePortfolio = portfolio.positionUSD;\r\n break;\r\n case allowedCurrencies.PYG:\r\n newActivePortfolio = portfolio.positionPYG;\r\n break;\r\n case allowedCurrencies.USD:\r\n newActivePortfolio = portfolio.position;\r\n break;\r\n }\r\n\r\n newActivePortfolio.assetClass = newActivePortfolio.assetClass.map((assetClass) => {\r\n assetClass.percentage =\r\n Math.round(((+assetClass.totalUSD * 100) / +newActivePortfolio.portfolioTotalUSD) * 100) / 100;\r\n return assetClass;\r\n });\r\n newActivePortfolio.assetClass = newActivePortfolio.assetClass.sort((a, b) => {\r\n return a.percentage < b.percentage ? 1 : -1;\r\n });\r\n // if (newActivePortfolio && newActivePortfolio.assetClass) {\r\n // } else {\r\n // return (newActivePortfolio = \"20%\");\r\n // }\r\n\r\n const subAssetClasses = [];\r\n newActivePortfolio.assetClass.map((assetClass) => {\r\n assetClass.subAssetClass.map((subAssetClassItem) => {\r\n subAssetClasses.push(subAssetClassItem);\r\n });\r\n });\r\n\r\n newActivePortfolio.subAssetClasses = subAssetClasses;\r\n setActivePortfolio(newActivePortfolio);\r\n }\r\n }, [activeCurrency, portfolio, loadingPosition]);\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 }, []);\r\n\r\n useEffect(() => {\r\n fetchGetAccounts()\r\n .then((r) => {\r\n if (r.response.accounts.length > 0) {\r\n //handleChangeAccount(r.response.accounts[0]);\r\n } else {\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 });\r\n }\r\n })\r\n .catch((err) => console.error(err));\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 handleChangeDate = (date) => {\r\n setPortfolioDate(() => date);\r\n };\r\n\r\n const handleActiveCurrency = (name) => {\r\n setActiveCurrency(allowedCurrencies[name]);\r\n };\r\n\r\n if (loadingPosition)\r\n return (\r\n <div className={style.fullCenter}>\r\n <CircularProgress />\r\n </div>\r\n );\r\n\r\n if (currentAccount.noAccounts)\r\n return (\r\n <Row>\r\n <Col>\r\n <span>No hay cuentas asociadas</span>\r\n </Col>\r\n </Row>\r\n );\r\n\r\n return (\r\n <Row>\r\n <Col xs={12} xl={9}>\r\n <Row className={style.headerTitle}>\r\n <Label>Portafolio</Label>\r\n </Row>\r\n <MediaQuery maxWidth={576}>\r\n <Col xs={12} xl={3}>\r\n <Container>\r\n <Summary portfolio={portfolio} />\r\n </Container>\r\n </Col>\r\n </MediaQuery>\r\n <Row>\r\n <Col xs={12}>\r\n <Container className={style.investments}>\r\n <Row>\r\n <Col>\r\n <TitleLabel className={style.titleInvestments} label=\"Inversiones\" />\r\n </Col>\r\n <Col className={style.colCurrency}>\r\n <RadioButtonGroup>\r\n <RadioButton\r\n label=\"Todos\"\r\n onClick={handleActiveCurrency}\r\n name={allowedCurrencies.ALL}\r\n active={activeCurrency === allowedCurrencies.ALL}\r\n />\r\n <RadioButton\r\n label=\"Guaraníes\"\r\n onClick={handleActiveCurrency}\r\n name={allowedCurrencies.PYG}\r\n active={activeCurrency === allowedCurrencies.PYG}\r\n />\r\n <RadioButton\r\n label=\"Dólares\"\r\n onClick={handleActiveCurrency}\r\n name={allowedCurrencies.USD}\r\n active={activeCurrency === allowedCurrencies.USD}\r\n />\r\n </RadioButtonGroup>\r\n </Col>\r\n </Row>\r\n </Container>\r\n </Col>\r\n </Row>\r\n <Row>\r\n <Col xs={12}>\r\n <Container>\r\n {activePortfolio && (\r\n <Row className={style.spacedRow}>\r\n <Col xs={12} xl={7} className={style.compositionSectionAsset}>\r\n <SectionTitle title=\"Composición por tipo de activo\" />\r\n <CompositionBar data={activePortfolio.assetClass} />\r\n </Col>\r\n <Col xs={12} xl={5} className={style.compositionSectionSubAsset}>\r\n <Row className={style.instrumentRow}>\r\n <SectionTitle title=\"Composición por instrumento\" />\r\n <Col xs={12} sm={6}>\r\n <SubAssetClassDoghnut subAssetClasses={activePortfolio.subAssetClasses} />\r\n </Col>\r\n <Col xs={12} sm={6}>\r\n <SubAssetClassDoghnutItems subAssetClasses={activePortfolio.subAssetClasses} />\r\n </Col>\r\n </Row>\r\n </Col>\r\n </Row>\r\n )}\r\n </Container>\r\n </Col>\r\n </Row>\r\n <Row>\r\n <Col xs={12}>\r\n <Container>\r\n {activePortfolio && (\r\n <AssetClass\r\n assetClasses={activePortfolio.assetClass}\r\n portfolioTotal={activePortfolio.valueTotalUSD}\r\n activeCurrency={activeCurrency}\r\n fx={portfolio.currencypairprice.rawprice}\r\n />\r\n )}\r\n </Container>\r\n </Col>\r\n </Row>\r\n </Col>\r\n <MediaQuery minWidth={576}>\r\n <Col xs={12} xl={3}>\r\n <Container>\r\n <Summary portfolio={portfolio} />\r\n </Container>\r\n </Col>\r\n </MediaQuery>\r\n </Row>\r\n );\r\n};\r\n\r\n// Composición por tipo de activo\r\n\r\nconst SectionTitle = ({ title }) => (\r\n <Fragment>\r\n <Label className={style.cardLabel}>{title}</Label>\r\n <hr className={style.cardLabelLine} />\r\n </Fragment>\r\n);\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"fullCenter\":\"Portfolio_fullCenter_1hzLH\",\"headerTitle\":\"Portfolio_headerTitle_2jMsQ\",\"portolioRow\":\"Portfolio_portolioRow_21lvr\",\"firstRow\":\"Portfolio_firstRow_2SOHg\",\"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\",\"cardLabel\":\"Portfolio_cardLabel_H8_Pw\",\"cardLabelLine\":\"Portfolio_cardLabelLine_1BWSz\",\"compositionSectionAsset\":\"Portfolio_compositionSectionAsset_3o-GT\",\"compositionSectionSubAsset\":\"Portfolio_compositionSectionSubAsset_1lQ3D\",\"investments\":\"Portfolio_investments_16htS\",\"titleInvestments\":\"Portfolio_titleInvestments_31hdn\",\"colCurrency\":\"Portfolio_colCurrency_3RVfA\",\"screenBreakForCharts\":\"Portfolio_screenBreakForCharts_woi0x\",\"spacedRow\":\"Portfolio_spacedRow_3bWWz\",\"spacedDiv\":\"Portfolio_spacedDiv_1eryn\",\"instrumentRow\":\"Portfolio_instrumentRow_1d30a\"};","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 \"./PortfolioHeader.scss\";\r\n\r\nexport const PortfolioHeader = ({ 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 <Fragment>\r\n <div className={style.secondRow}>\r\n <div className={style.date}>\r\n <div className={style.titleAndInput}>\r\n <p>Fecha</p>\r\n <Input\r\n type=\"date\"\r\n className={style.input}\r\n name=\"fromDate\"\r\n id=\"fromDate\"\r\n value={date}\r\n onChange={handleChangeDate}\r\n />\r\n </div>\r\n </div>\r\n <div className={style.download}>\r\n <p>Descarga el cierre del mes:</p>\r\n <img className={style.icon} src={pdf} alt=\"PDF\" onClick={window.print} />\r\n <img className={style.icon} src={excel} alt=\"XLSX\" onClick={handleXLS} />\r\n <img className={style.icon} src={csv} alt=\"CSV\" onClick={handleCSV} />\r\n </div>\r\n </div>\r\n </Fragment>\r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"secondRow\":\"PortfolioHeader_secondRow_15GeL\",\"icon\":\"PortfolioHeader_icon_1Ao-X\",\"date\":\"PortfolioHeader_date_Op1ZD\",\"titleAndInput\":\"PortfolioHeader_titleAndInput_3Bwnz\",\"input\":\"PortfolioHeader_input_339yd\",\"download\":\"PortfolioHeader_download_3EYt9\",\"title\":\"PortfolioHeader_title_1Maze\"};","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.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 <SubAssetClassTable\r\n subAssetClass={subAssetClass}\r\n toggle={toggle}\r\n position={position}\r\n currency={currency}\r\n portfolioTotal={portfolioTotal}\r\n />\r\n );\r\n });\r\n\r\n return (\r\n <Fragment>\r\n <tr\r\n className={style.collapseRow}\r\n onClick={() => {\r\n setOrangeRowCollapse(!orangeRowCollapse);\r\n }}\r\n >\r\n <td className={style.orangeRow}>\r\n <span className={style.orangeRowText}>{toPascalCase(itemCuentas.name)}</span>\r\n <img\r\n className={!orangeRowCollapse ? style.arrow : style.arrowActivated}\r\n src={arrow}\r\n alt=\"arrow image\"\r\n />\r\n </td>\r\n </tr>\r\n\r\n <Collapse\r\n className={!orangeRowCollapse ? style.collapse : style.collapseActive}\r\n isOpen={orangeRowCollapse}\r\n >\r\n {collapseOrangedata}\r\n </Collapse>\r\n </Fragment>\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 { useSelector } from \"react-redux\";\r\nimport moment from \"moment\";\r\n\r\nimport { FormattedNumber } from \"../../../FormattedNumber/FormattedNumber\";\r\nimport { getTexts } from \"../../../../reducers/selectors\";\r\n\r\nimport style from \"./AssetTable.scss\";\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 texts = useSelector(getTexts);\r\n const tooltTipStyles = {\r\n color: \"white\",\r\n backgroundColor: \"#003399\",\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 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 setTotalMarketValue(totalMarketValue);\r\n setTotalInvestmentCost(totalInvestmentCost);\r\n setTotalAbsoluteReturn(totalAbsoluteReturn);\r\n setTotalYTM(totalYTM);\r\n setTotalPortfolio(totalPortfolio);\r\n }, []);\r\n\r\n return (\r\n <Table>\r\n <table className={style.table}>\r\n <thead>\r\n <tr className={style.tableRow}>\r\n <th className={style.grayTableH} id=\"marketPrice\">\r\n <UncontrolledTooltip\r\n placement=\"right\"\r\n target=\"marketPrice\"\r\n className={style.toolTip}\r\n style={tooltTipStyles}\r\n >\r\n {texts.tooltips.portfolio_actual_price}\r\n </UncontrolledTooltip>\r\n Último precio de mercado\r\n </th>\r\n <th className={`${style.grayTableH} ${style.xs}`}>Cantidad</th>\r\n <th className={style.grayTableH} id=\"marketValue\">\r\n <UncontrolledTooltip\r\n placement=\"right\"\r\n target=\"marketValue\"\r\n className={style.toolTip}\r\n style={tooltTipStyles}\r\n >\r\n {texts.tooltips.portfolio_nominal_value}\r\n inversión\r\n </UncontrolledTooltip>\r\n Valor de mercado\r\n </th>\r\n <th className={`${style.grayTableH} ${style.xs}`} id=\"investmentCost\">\r\n <UncontrolledTooltip\r\n placement=\"right\"\r\n target=\"investmentCost\"\r\n className={style.toolTip}\r\n style={tooltTipStyles}\r\n >\r\n {texts.tooltips.portfolio_investment_cost}\r\n </UncontrolledTooltip>\r\n Costo de inversión\r\n </th>\r\n <th className={`${style.grayTableH} ${style.sm} ${style.xs}`} id=\"interest\">\r\n <UncontrolledTooltip\r\n placement=\"right\"\r\n target=\"interest\"\r\n className={style.toolTip}\r\n style={tooltTipStyles}\r\n >\r\n {texts.tooltips.portfolio_pl}\r\n </UncontrolledTooltip>\r\n Interés/ dividendo acumulado\r\n </th>\r\n <th className={`${style.grayTableH} ${style.md} ${style.sm} ${style.xs}`} id=\"absolutReturn\">\r\n <UncontrolledTooltip\r\n placement=\"right\"\r\n target=\"absolutReturn\"\r\n className={style.toolTip}\r\n style={tooltTipStyles}\r\n >\r\n {texts.tooltips.portfolio_trt}\r\n </UncontrolledTooltip>\r\n Retorno absoluto\r\n </th>\r\n <th className={`${style.grayTableH} ${style.lg} ${style.md} ${style.sm} ${style.xs}`} id=\"ytm\">\r\n <UncontrolledTooltip\r\n placement=\"right\"\r\n target=\"ytm\"\r\n className={style.toolTip}\r\n style={tooltTipStyles}\r\n >\r\n {texts.tooltips.portfolio_ytm}\r\n </UncontrolledTooltip>\r\n YTM\r\n </th>\r\n <th\r\n className={`${style.grayTableH} ${style.xl} ${style.lg} ${style.md} ${style.sm} ${style.xs}`}\r\n id=\"percentaje\"\r\n >\r\n <UncontrolledTooltip\r\n placement=\"right\"\r\n target=\"percentaje\"\r\n className={style.toolTip}\r\n style={tooltTipStyles}\r\n >\r\n {texts.tooltips.portfolio_percentage}\r\n </UncontrolledTooltip>{\" \"}\r\n Portafolio\r\n </th>\r\n <th className={style.grayTableH}></th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n {subAssetClass.asset.map((asset, itemIndex) => (\r\n <AssetRow\r\n key={itemIndex}\r\n position={position}\r\n asset={asset}\r\n toggle={toggle}\r\n currency={currency}\r\n portfolioTotal={portfolioTotal}\r\n />\r\n ))}\r\n </tbody>\r\n <tfoot>\r\n <tr className={style.tableRow}>\r\n <th className={`${style.grayTableH} ${style.xs}`}></th>\r\n <th className={style.grayTableH}>subTotal</th>\r\n <th className={style.grayTableH}>\r\n <FormattedNumber\r\n value={totalMarketValue}\r\n minimumFractionDigits={currency == \"USD\" ? 2 : 0}\r\n maximumFractionDigits={currency == \"USD\" ? 2 : 0}\r\n />\r\n </th>\r\n <th className={`${style.grayTableH} ${style.xs}`}>\r\n <FormattedNumber\r\n value={totalInvestmentCost}\r\n minimumFractionDigits={currency == \"USD\" ? 2 : 0}\r\n maximumFractionDigits={currency == \"USD\" ? 2 : 0}\r\n />\r\n </th>\r\n <th className={`${style.grayTableH} ${style.sm} ${style.xs}`}></th>\r\n <th className={`${style.grayTableH} ${style.sm} ${style.md} ${style.xs}`}>\r\n <FormattedNumber\r\n value={totalAbsoluteReturn}\r\n minimumFractionDigits={2}\r\n maximumFractionDigits={2}\r\n />\r\n </th>\r\n <th className={`${style.grayTableH} ${style.lg} ${style.md} ${style.sm} ${style.xs}`}>\r\n <FormattedNumber value={totalYTM} minimumFractionDigits={2} maximumFractionDigits={2} />%\r\n </th>\r\n <th\r\n className={`${style.grayTableH} ${style.xl} ${style.lg} ${style.md} ${style.sm} ${style.xs}`}\r\n >\r\n <FormattedNumber value={totalPortfolio} minimumFractionDigits={2} maximumFractionDigits={2} />%\r\n </th>\r\n <th className={`${style.grayTableH}`}></th>\r\n </tr>\r\n </tfoot>\r\n </table>\r\n </Table>\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\r\n return (\r\n <Fragment>\r\n <tr className={style.assetName}>\r\n <td colSpan=\"8\">{asset.name}</td>\r\n </tr>\r\n <tr className={style.assetIsin}>\r\n <td colSpan=\"8\">ISIN {asset.isin}</td>\r\n </tr>\r\n <tr className={style.tableRow}>\r\n <td className={style.td}>\r\n <FormattedNumber value={asset.actualPrice} minimumFractionDigits={4} maximumFractionDigits={4} />\r\n </td>\r\n <td className={`${style.td} ${style.xs}`}>\r\n <FormattedNumber value={asset.nominalValue} minimumFractionDigits={0} maximumFractionDigits={8} />\r\n </td>\r\n <td className={style.td}>\r\n <FormattedNumber\r\n value={asset.totalOriginCurrencyWithCoupon}\r\n minimumFractionDigits={currency == \"USD\" ? 2 : 0}\r\n maximumFractionDigits={currency == \"USD\" ? 2 : 0}\r\n />\r\n </td>\r\n <td className={`${style.td} ${style.xs}`}>\r\n <FormattedNumber\r\n value={investCost}\r\n minimumFractionDigits={currency == \"USD\" ? 2 : 0}\r\n maximumFractionDigits={currency == \"USD\" ? 2 : 0}\r\n />\r\n </td>\r\n <td className={`${style.td} ${style.sm} ${style.xs}`}>\r\n <FormattedNumber value={asset.realizePL} minimumFractionDigits={2} maximumFractionDigits={2} />\r\n </td>\r\n <td className={`${style.td} ${style.md} ${style.sm} ${style.xs}`}>\r\n <FormattedNumber value={asset.TRT} minimumFractionDigits={2} maximumFractionDigits={2} />\r\n </td>\r\n <td className={`${style.td} ${style.lg} ${style.md} ${style.sm} ${style.xs}`}>\r\n <FormattedNumber value={asset.YTM} minimumFractionDigits={2} maximumFractionDigits={2} />%\r\n </td>\r\n <td className={`${style.td} ${style.xl} ${style.lg} ${style.md} ${style.sm} ${style.xs}`}>\r\n <FormattedNumber\r\n value={(+asset.totalUSDWithCoupon * 100) / +portfolioTotal}\r\n minimumFractionDigits={2}\r\n maximumFractionDigits={2}\r\n />\r\n %\r\n </td>\r\n <td className={style.td}>\r\n {/* <a\r\n className={style.sellModal}\r\n onClick={() => {\r\n toggle(asset, asset.nominalValue);\r\n }}\r\n >\r\n vender\r\n </a> */}\r\n </td>\r\n </tr>\r\n </Fragment>\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\",\"sellModal\":\"AssetTable_sellModal_2JhN4\",\"footer\":\"AssetTable_footer_24RK9\",\"xl\":\"AssetTable_xl_393Ca\",\"lg\":\"AssetTable_lg_2PamO\",\"md\":\"AssetTable_md_1tN2Y\",\"sm\":\"AssetTable_sm_13NWz\",\"xs\":\"AssetTable_xs_33JHj\"};","import React, { Fragment, useEffect, useState } from \"react\";\r\nimport { Row, Table, Collapse } from \"reactstrap\";\r\nimport { FormattedNumber } from \"../../FormattedNumber/FormattedNumber\";\r\nimport { AssetClassTable } from \"./AssetClassTable/AssetClassTable\";\r\nimport PortfolioModal from \"../../Modal/PortfolioModal/PortfolioModal\";\r\nimport arrow from \"../../../../public/svg/keyboard_arrow_down.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 }) => {\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 setFirstCollapse((prev) => !prev);\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 <div className={style.emptyWrapper} colSpan={7}>\r\n {currency === \"USD\" ? (\r\n <p className={style.emptyMessage}>No hay datos disponibles para la cuenta en dólares.</p>\r\n ) : (\r\n <p className={style.emptyMessage}>No hay datos disponibles para la cuenta en guaraníes.</p>\r\n )}\r\n </div>\r\n );\r\n };\r\n\r\n return (\r\n <Row className={style.collapseRow}>\r\n {position.assetClass.length === 0 ? (\r\n <EmptyPortfolio currency={currency} />\r\n ) : (\r\n <Fragment>\r\n <Table className={style.collapseTable}>\r\n <thead\r\n className={!isFirstCollapseOpen ? style.tableHead : style.tableHeadActivated}\r\n onClick={handleToggle}\r\n >\r\n <tr className={style.tableRow}>\r\n <span colSpan=\"6\" className={style.collapseTitle}>\r\n {currency}\r\n </span>\r\n\r\n <span className={style.collapseTitle} style={{ color: \"#EC7000\" }}>\r\n <FormattedNumber\r\n value={+position.cashTotal + +position.valueTotal}\r\n minimumFractionDigits={currency == \"USD\" ? 2 : 0}\r\n maximumFractionDigits={currency == \"USD\" ? 2 : 0}\r\n />\r\n <span className={style.collapseTitleText}>Total</span>\r\n </span>\r\n\r\n <span className={style.collapseTitle}>\r\n <FormattedNumber\r\n value={position.cashTotal}\r\n minimumFractionDigits={currency == \"USD\" ? 2 : 0}\r\n maximumFractionDigits={currency == \"USD\" ? 2 : 0}\r\n />\r\n <span className={style.collapseTitleText}>Efectivo</span>\r\n </span>\r\n\r\n <span className={style.collapseTitle}>\r\n <FormattedNumber\r\n value={position.valueTotal}\r\n minimumFractionDigits={currency == \"USD\" ? 2 : 0}\r\n maximumFractionDigits={currency == \"USD\" ? 2 : 0}\r\n />\r\n <span className={style.collapseTitleText}>Valores</span>\r\n </span>\r\n <img\r\n className={!isFirstCollapseOpen ? style.arrow : style.arrowActivated}\r\n src={arrow}\r\n alt=\"arrow image\"\r\n />\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <Collapse className={style.collapse} isOpen={isFirstCollapseOpen}>\r\n {position.assetClass.map((itemCuentas, indexCuentas) => {\r\n return (\r\n <AssetClassTable\r\n key={indexCuentas}\r\n itemCuentas={itemCuentas}\r\n toggle={toggle}\r\n position={position}\r\n currency={currency}\r\n portfolioTotal={portfolioTotal}\r\n />\r\n );\r\n })}\r\n <div className={style.chartsRow}>\r\n <AssetClassDoghnut position={position} onSelectItem={handleSelectAssetClass} />\r\n {assetClass && <SubAssetClassDoghnut assetClass={assetClass} />}\r\n </div>\r\n </Collapse>\r\n </tbody>\r\n </Table>\r\n {selectedAsset != undefined ? (\r\n <PortfolioModal\r\n modal={modal}\r\n toggle={toggle}\r\n asset={selectedAsset}\r\n assetQuantity={assetQuantity}\r\n />\r\n ) : null}\r\n </Fragment>\r\n )}\r\n </Row>\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\",\"collapseTable\":\"PortfolioTable_collapseTable_3K3x5\",\"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\"};","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.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 <Fragment>\r\n <tr\r\n className={style.collapseRow}\r\n onClick={() => {\r\n setIsCollapseBlueOpen(!isCollapseBlueOpen);\r\n }}\r\n >\r\n <td className={`${style.orangeRow} ${style.blueRow}`}>\r\n <span className={style.orangeRowText}>{toPascalCase(subAssetClass.name)}</span>\r\n <img\r\n className={!isCollapseBlueOpen ? style.arrow : style.arrowActivated}\r\n src={arrow}\r\n alt=\"arrow image\"\r\n />\r\n </td>\r\n </tr>\r\n <Collapse className={style.collapse} isOpen={isCollapseBlueOpen}>\r\n <AssetTable\r\n subAssetClass={subAssetClass}\r\n toggle={toggle}\r\n position={position}\r\n currency={currency}\r\n portfolioTotal={portfolioTotal}\r\n />\r\n </Collapse>\r\n </Fragment>\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, { useState, useEffect } from \"react\";\r\n\r\nimport { Row, Col } from \"../../UI/Customstrap/Customstrap\";\r\nimport { TitleLabel } from \"../../UI/TitleLabel/TitleLabel\";\r\nimport { formattedNumber } from \"../../FormattedNumber/FormattedNumber\";\r\nimport { Icons } from \"../../UI/Icon/Icon\";\r\n\r\nimport style from \"./Summary.scss\";\r\nimport { CircularProgress } from \"../../UI/CircularProgress/CircularProgress\";\r\n\r\nexport const Summary = ({ portfolio }) => {\r\n const [total, setTotal] = useState(0);\r\n\r\n useEffect(() => {\r\n if (portfolio) {\r\n setTotal(+portfolio.positionUSD.portfolioTotalUSD);\r\n }\r\n }, [portfolio]);\r\n\r\n if (!portfolio) return <CircularProgress />;\r\n\r\n return (\r\n <Row>\r\n <Col>\r\n <Row>\r\n <Col xs={12}>\r\n <TitleLabel className={style.titleSummary} label=\"Resumen\" />\r\n </Col>\r\n <Col xs={12}>\r\n <div className={style.fx}>\r\n <span className={style.fxLabel}>Cambio actual:</span>\r\n <span>{`Gs ${formattedNumber(portfolio.currencypairprice.rawprice, 0, 0)}`}</span>\r\n </div>\r\n </Col>\r\n </Row>\r\n <Row>\r\n <Col xs={12} sm={6} xl={12}>\r\n <div className={style.totals}>\r\n <span className={style.title}>En efectivo</span>\r\n <div className={style.currencyTotal}>\r\n <Icons.USDIcon size=\"md\" className={style.currencyIcon} />\r\n <div className={style.balanceWrapper}>\r\n <span className={style.currencyISO}>USD</span>\r\n <span className={style.balance}>{formattedNumber(portfolio.position.cashTotal, 2, 2)}</span>\r\n </div>\r\n </div>\r\n <div className={style.currencyTotal}>\r\n <Icons.PYGIcon size=\"md\" className={style.currencyIcon} />\r\n <div className={style.balanceWrapper}>\r\n <span className={style.currencyISO}>Gs</span>\r\n <span className={style.balance}>\r\n {formattedNumber(portfolio.positionPYG.cashTotal, 0, 0)}\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n </Col>\r\n <Col xs={12} sm={6} xl={12}>\r\n <div className={style.totals}>\r\n <span className={style.title}>En valores</span>\r\n <div className={style.currencyTotal}>\r\n <Icons.USDIcon size=\"md\" className={style.currencyIcon} />\r\n <div className={style.balanceWrapper}>\r\n <span className={style.currencyISO}>USD</span>\r\n <span className={style.balance}>\r\n {formattedNumber(portfolio.position.valueTotalUSD, 2, 2)}\r\n </span>\r\n </div>\r\n </div>\r\n <div className={style.currencyTotal}>\r\n <Icons.PYGIcon size=\"md\" className={style.currencyIcon} />\r\n <div className={style.balanceWrapper}>\r\n <span className={style.currencyISO}>Gs</span>\r\n <span className={style.balance}>\r\n {formattedNumber(portfolio.positionPYG.portfolioTotal, 0, 0)}\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n </Col>\r\n </Row>\r\n <Row>\r\n <Col xs={12}>\r\n <div className={style.total}>\r\n <hr className={style.totalDivider} />\r\n <span className={style.totalLabel}>Total*</span>\r\n <span className={style.totalBalace}>\r\n <span className={style.totalBalaceISO}>USD</span>\r\n <span className={style.totalBalanceNumber}>{formattedNumber(total, 2, 2)}</span>\r\n </span>\r\n <span className={style.disclaimer}>*Valorizado en dólares</span>\r\n </div>\r\n </Col>\r\n </Row>\r\n </Col>\r\n </Row>\r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"fx\":\"Summary_fx_2HtV2\",\"fxLabel\":\"Summary_fxLabel_24gD3\",\"totals\":\"Summary_totals_5-to3\",\"title\":\"Summary_title_7FTzi\",\"currencyTotal\":\"Summary_currencyTotal_KYpJJ\",\"currencyIcon\":\"Summary_currencyIcon_3fs82\",\"balanceWrapper\":\"Summary_balanceWrapper_3fCQu\",\"balance\":\"Summary_balance_w7zdR\",\"currencyISO\":\"Summary_currencyISO_10axv\",\"total\":\"Summary_total_12yzD\",\"totalDivider\":\"Summary_totalDivider_3Eeqm\",\"totalLabel\":\"Summary_totalLabel_1gIMk\",\"totalBalace\":\"Summary_totalBalace_vT0Uj\",\"totalBalanceNumber\":\"Summary_totalBalanceNumber_2aUVA\",\"totalBalaceISO\":\"Summary_totalBalaceISO_3Hjcb\",\"disclaimer\":\"Summary_disclaimer_2AKpm\",\"titleSummary\":\"Summary_titleSummary_1tLGE\"};","import React, { useState, Fragment, useEffect } from \"react\";\r\nimport {\r\n Row,\r\n Button,\r\n Collapse,\r\n Input,\r\n DropdownToggle,\r\n DropdownMenu,\r\n DropdownItem,\r\n Dropdown,\r\n Table,\r\n} from \"reactstrap\";\r\nimport { MainCard, Field } from \"bx-react-ui\";\r\nimport { CircularProgress } from \"../UI/CircularProgress/CircularProgress\";\r\nimport LaddaButton, { EXPAND_RIGHT } from \"react-ladda\";\r\nimport { useSelector } from \"react-redux\";\r\nimport moment from \"moment\";\r\n\r\nimport { getArchivesTypes } from \"../../services/api/accounts\";\r\nimport { uploadFiles, getFile } from \"../../services/api/person\";\r\nimport { showToast } from \"../../utils/global\";\r\nimport arrow from \"../../../public/svg/keyboard_arrow_down.svg\";\r\nimport downloadSvg from \"../../../public/svg/download-svgrepo-com.svg\";\r\nimport { toPascalCase } from \"../../utils/helper\";\r\n\r\nimport { getSavedPersonInfo } from \"../../reducers/selectors\";\r\nimport { DocumentTable } from \"../DocumentTable/DocumentTable\";\r\n\r\nimport style from \"./ProfileInfoForm.scss\";\r\nimport { DayCountFractions } from \"bx-react-ui/src/components/Asset/types\";\r\n\r\nexport const ProfileInfoForm = () => {\r\n const [fields, setFields] = useState({});\r\n const [loading, setLoading] = useState(false);\r\n const [loadingInfo, setLoadingInfo] = useState(true);\r\n const [open, setOpen] = useState(false);\r\n const todayDate = new Date().toISOString().slice(0, 10);\r\n const [expirationDate, setExpirationDate] = useState(todayDate);\r\n const [docType, setDocType] = useState({ id: 0, name: \"Tipo de documento\" });\r\n const [date, setDate] = useState();\r\n const [pdf, setPdf] = useState();\r\n const [addDoc, setAddDoc] = useState(false);\r\n const [uploaded, setUploaded] = useState(false);\r\n const [contracts, setContracts] = useState([]);\r\n const [documents, setDocuments] = useState([]);\r\n const [documentTypes, setDocumentTypes] = useState([]);\r\n const [errors, setErrors] = useState({});\r\n\r\n const [fileToUpload, setFileToUpload] = useState({ blob: \"\" });\r\n\r\n const personInfo = useSelector(getSavedPersonInfo);\r\n\r\n useEffect(() => {\r\n if (personInfo) {\r\n const newContracts = [];\r\n const newDocuments = [];\r\n\r\n personInfo.Archives.map((archiveItem) => {\r\n if (archiveItem.PersonArchiveSubTypeInternalName === \"Contract\") newContracts.push(archiveItem);\r\n else newDocuments.push(archiveItem);\r\n });\r\n\r\n setContracts(newContracts);\r\n setDocuments(newDocuments);\r\n }\r\n }, [personInfo]);\r\n\r\n useEffect(() => {\r\n getArchivesTypes().then(({ response }) => {\r\n setDocumentTypes(response.archivesTypes);\r\n });\r\n }, []);\r\n\r\n const handleFileInput = (event) => {\r\n const blob = event.target.files[0];\r\n\r\n if (blob && blob.size <= 5242880) {\r\n const name = blob.name.substring(0, blob.name.indexOf(\".\"));\r\n const extension = blob.name.substring(blob.name.indexOf(\".\") + 1, blob.name.length);\r\n setFileToUpload((prevFile) => {\r\n return { ...prevFile, blob, name, extension };\r\n });\r\n setErrors((prevErrors) => {\r\n delete prevErrors[\"blob\"];\r\n return prevErrors;\r\n });\r\n } else {\r\n alert(\"El archivo es demasiado grande! (Max. 5MB)\");\r\n event.target = null;\r\n }\r\n };\r\n\r\n const validateFields = () => {\r\n const newErrors = {};\r\n\r\n if (fileToUpload.blob === \"\") {\r\n newErrors[\"blob\"] = \"Campo requerido\";\r\n }\r\n if (!fileToUpload.lifelong && fileToUpload.expirationDate === \"\") {\r\n newErrors[\"expirationDate\"] = \"Campo requerido\";\r\n }\r\n\r\n return newErrors;\r\n };\r\n\r\n const validateAndSend = () => {\r\n const newErrors = validateFields();\r\n if (Object.keys(newErrors).length !== 0) {\r\n setErrors({ ...newErrors });\r\n } else {\r\n setLoading(true);\r\n if (fileToUpload.typeId != 0) {\r\n var reader = new FileReader();\r\n reader.readAsDataURL(fileToUpload.blob);\r\n reader.onload = () => {\r\n const postArchive = {\r\n ...fileToUpload,\r\n hasExpiration: true,\r\n expirationDate,\r\n blob: reader.result,\r\n typeId: docType.id,\r\n };\r\n\r\n uploadFiles(postArchive)\r\n .then(({ response }) => {\r\n if (response.result.Code !== 200)\r\n showToast(\"Se produjo un error al intentar guardar el documento\", true);\r\n else {\r\n setUploaded(true);\r\n showToast(\"Documento enviado para revisión exitosamente\");\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 }\r\n };\r\n\r\n const reloadForm = () => {\r\n window.location.reload();\r\n };\r\n\r\n const toggle = () => {\r\n setOpen((prevOpen) => !prevOpen);\r\n };\r\n\r\n const addDocument = () => {};\r\n\r\n const changeDateHandler = (event) => {\r\n event.target.id === \"expirationDate\" ? setExpirationDate(event.target.value) : null;\r\n };\r\n\r\n const handleDownload = (file) => {\r\n const body = {\r\n fileId: file.PersonArchiveId,\r\n };\r\n getFile(body)\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 = `${file.PersonArchivesName}.${file.PersonArchivesExtension}`;\r\n document.body.appendChild(a);\r\n a.click();\r\n document.body.removeChild(a);\r\n })\r\n .catch((err) => console.error(err));\r\n };\r\n\r\n if (uploaded) {\r\n return (\r\n <Fragment>\r\n <Row className={style.row}>\r\n <Button className={style.addButton} onClick={reloadForm}>\r\n Volver\r\n </Button>\r\n </Row>\r\n </Fragment>\r\n );\r\n }\r\n\r\n if (!personInfo) return <CircularProgress />;\r\n\r\n return (\r\n <Fragment>\r\n <Row className={style.row}>\r\n <LaddaButton\r\n className={style.addButton}\r\n loading={loading}\r\n disabled={loading}\r\n onClick={validateAndSend}\r\n data-style={EXPAND_RIGHT}\r\n >\r\n {loading ? \"Cargando...\" : \"Agregar nuevo documento\"}\r\n </LaddaButton>\r\n </Row>\r\n <Row className={style.row}>\r\n <span className={style.dropdownContainer}>\r\n <Dropdown\r\n isOpen={open}\r\n className={style.dropdown}\r\n toggle={toggle}\r\n onChange={(undefined, v) => setOpen(v)}\r\n >\r\n <DropdownToggle nav caret className={style.dropdownToggle}>\r\n {docType.name}\r\n <img src={arrow} className={open ? style.arrowActive : style.arrow} alt=\"arrow\" />\r\n <DropdownMenu id={style.dropdownMenu}>\r\n {documentTypes.map((documentTypeItem) => (\r\n <DropdownItem\r\n className={style.item}\r\n onClick={() => {\r\n setOpen(false);\r\n setDocType(documentTypeItem);\r\n }}\r\n >\r\n {documentTypeItem.name}\r\n </DropdownItem>\r\n ))}\r\n </DropdownMenu>\r\n </DropdownToggle>\r\n </Dropdown>\r\n\r\n {/* <Button className={style.selectFileButton}>Seleccionar archivo</Button> */}\r\n <Field error={errors.blob} style={{ marginBottom: 0, display: \"flex\", alignItems: \"center\" }}>\r\n <div className={style.selectFileButton}>\r\n <Input\r\n type=\"file\"\r\n label={\"Seleccionar archivo\"}\r\n dataMaxSize=\"2048\"\r\n accept=\"application/pdf\"\r\n onChange={handleFileInput}\r\n name=\"blob\"\r\n id=\"blob\"\r\n disabled={uploaded}\r\n className={style.selectFileInput}\r\n />\r\n </div>\r\n </Field>\r\n </span>\r\n </Row>\r\n <Row className={style.row}>\r\n <span className={style.expirtionDateContainer}>\r\n <div className={style.expirationDate}>Fecha de vencimiento</div>\r\n <Input\r\n type=\"date\"\r\n className={style.input}\r\n name=\"expirationDate\"\r\n id=\"expirationDate\"\r\n value={expirationDate}\r\n onChange={changeDateHandler}\r\n />\r\n </span>\r\n </Row>\r\n\r\n <Row className={`${style.row} ${style.documentRowWrapper}`}>\r\n <div className={style.subTitle}>Contrato</div>\r\n {contracts.length === 0 && <span>No hay contratos</span>}\r\n {contracts.map((documentItem) => {\r\n return (\r\n <ContractRow documentItem={documentItem} handleDownload={() => handleDownload(documentItem)} />\r\n );\r\n })}\r\n </Row>\r\n\r\n <Row className={`${style.row} ${style.documentRowWrapper}`}>\r\n <div className={style.subTitle}>Documentos subidos</div>\r\n {documents.length === 0 && <span>No hay documentos</span>}\r\n {documents.map((documentItem) => {\r\n return (\r\n <DocumentRow documentItem={documentItem} handleDownload={() => handleDownload(documentItem)} />\r\n );\r\n })}\r\n </Row>\r\n </Fragment>\r\n );\r\n};\r\n\r\nconst ContractRow = ({ documentItem, handleDownload }) => {\r\n const dateString = `Fecha de autorización: ${\r\n documentItem.PersonArchivesHasExpirationDate\r\n ? moment(documentItem.PersonArchivesExpirationDate).format(\"DD/MM/YYYY\")\r\n : \"-\"\r\n }`;\r\n\r\n return (\r\n <div className={style.documentRow}>\r\n <span className={style.documentRowItem}>{documentItem.PersonArchivesSubTypeDescription}</span>\r\n <span className={style.documentRowItem}>{dateString}</span>\r\n <span onClick={handleDownload}>\r\n <img src={downloadSvg} className={style.icon} alt=\"download\" />\r\n </span>\r\n </div>\r\n );\r\n};\r\n\r\nconst DocumentRow = ({ documentItem, handleDownload }) => {\r\n const dateString = documentItem.PersonArchivesHasExpirationDate\r\n ? `Fecha de vencimiento: ${moment(documentItem.PersonArchivesExpirationDate).format(\"DD/MM/YYYY\")}`\r\n : \"No expira\";\r\n\r\n return (\r\n <div className={style.documentRow}>\r\n <span className={style.documentRowItem}>{documentItem.PersonArchivesSubTypeDescription}</span>\r\n <span className={style.documentRowItem}>{dateString}</span>\r\n <span onClick={handleDownload}>\r\n <img src={downloadSvg} className={style.icon} alt=\"download\" />\r\n </span>\r\n </div>\r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"row\":\"ProfileInfoForm_row_3lkW2\",\"addButton\":\"ProfileInfoForm_addButton_2n2ns\",\"addButtonDisabled\":\"ProfileInfoForm_addButtonDisabled_qikqy\",\"dropdownContainer\":\"ProfileInfoForm_dropdownContainer_14_vx\",\"dropdown\":\"ProfileInfoForm_dropdown_aziAn\",\"dropdownToggle\":\"ProfileInfoForm_dropdownToggle_2bfdI\",\"arrow\":\"ProfileInfoForm_arrow_1LZch\",\"arrowActive\":\"ProfileInfoForm_arrowActive_1dhn2\",\"dropdownMenu\":\"ProfileInfoForm_dropdownMenu_1CPPS\",\"expirtionDateContainer\":\"ProfileInfoForm_expirtionDateContainer_3x3hh\",\"selectFileButton\":\"ProfileInfoForm_selectFileButton_1uXrw\",\"button\":\"ProfileInfoForm_button_1uZb-\",\"expirationDate\":\"ProfileInfoForm_expirationDate_3ToFy\",\"input\":\"ProfileInfoForm_input_281Ju\",\"subTitle\":\"ProfileInfoForm_subTitle_3DveC\",\"contractRow\":\"ProfileInfoForm_contractRow_1lGj0\",\"documentRowWrapper\":\"ProfileInfoForm_documentRowWrapper_3BI-X\",\"title\":\"ProfileInfoForm_title_14M0p\",\"selectFileInput\":\"ProfileInfoForm_selectFileInput_1i8bJ\",\"table\":\"ProfileInfoForm_table_KNJCc\",\"tbody\":\"ProfileInfoForm_tbody_3EhPN\",\"icon\":\"ProfileInfoForm_icon_1yg8p\",\"documentRow\":\"ProfileInfoForm_documentRow_1fEk4\",\"documentRowItem\":\"ProfileInfoForm_documentRowItem_c6itj\"};","import React, { useState, useEffect, Fragment } from \"react\";\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\nimport { Button } from \"reactstrap\";\r\nimport { Link } from \"react-router-dom\";\r\nimport { CircularProgress } from \"../UI/CircularProgress/CircularProgress\";\r\nimport { Safearea } from \"../UI/Safearea/Safearea\";\r\nimport { Row, Col } from \"../UI/Customstrap/Customstrap\";\r\nimport { Container } from \"../UI/Container/Container\";\r\nimport { getSession, getCurrentAccount, getSavedPersonInfo } from \"../../reducers/selectors\";\r\nimport { getQuestions, updateAnswers, getPersonInfo } from \"../../services/api/person\";\r\nimport { currentAccountSet, personInfoSet } from \"../../actions/entities\";\r\nimport GenericButton from \"../UI/Button/Button\";\r\nimport style from \"./ProfileTest.scss\";\r\nimport { showToast } from \"../../utils/helper\";\r\nimport { Icons } from \"../UI/Icon/Icon\";\r\nimport { MyData } from \"../Layout/MyData/MyData\";\r\nimport { Prompt } from \"react-router-dom\";\r\n\r\nexport const ProfileTest = ({ history, toggleRedoTest }) => {\r\n const [start, setStart] = useState(false);\r\n const [loading, setLoading] = useState(false);\r\n const [questions, setQuestions] = useState([]);\r\n const [showTestQuestions, setShowTestQuestions] = useState(false);\r\n const [showMyData, setShowMyData] = useState(false);\r\n const personInfo = useSelector(getSavedPersonInfo);\r\n const dispatch = useDispatch();\r\n\r\n useEffect(() => {\r\n setLoading(() => true);\r\n getQuestions()\r\n .then(({ response }) => {\r\n setQuestions(response.questions);\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n })\r\n .finally(() => {\r\n setLoading(() => false);\r\n });\r\n }, []);\r\n\r\n const setAnswer = (questionIndex, answerIndex) => {\r\n const newQuestions = [...questions];\r\n\r\n newQuestions.find((question) => question.QuestionId === questionIndex).Answer = newQuestions\r\n .find((question) => question.QuestionId === questionIndex)\r\n .Answer.map((answerItem) => {\r\n return {\r\n ...answerItem,\r\n AnswerIsResponse: false,\r\n };\r\n });\r\n\r\n newQuestions\r\n .find((question) => question.QuestionId === questionIndex)\r\n .Answer.find((answer) => answer.AnswerId === answerIndex).AnswerIsResponse = true;\r\n\r\n setQuestions(newQuestions);\r\n };\r\n\r\n const onConfirm = () => {\r\n const newQuestions = questions.filter((questionItem) => {\r\n if (questionItem.Answer.find((answerItem) => answerItem.AnswerIsResponse)) return questionItem;\r\n });\r\n if (newQuestions.length < questions.length) {\r\n showToast(\"Debe responder todas las preguntas\", true);\r\n return;\r\n } else {\r\n setLoading(() => true);\r\n updateAnswers({ sdtQuestion: questions })\r\n .then(({ response }) => {\r\n if (response.sdtresult.Code !== 200) showToast(\"Error enviando respuestas\", true);\r\n else {\r\n getPersonInfo()\r\n .then(({ response }) => {\r\n dispatch(personInfoSet(response.personInfo));\r\n history.push(\"/investorProfile/profileTestAnswer\");\r\n window.location.reload();\r\n })\r\n .catch((err) => console.error(err))\r\n .finally(() => {\r\n setLoading(() => false);\r\n });\r\n }\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n });\r\n toggleShowTestQuestions();\r\n toggleShowMyData();\r\n }\r\n };\r\n\r\n const toggleShowTestQuestions = () => {\r\n setShowTestQuestions((stateTestQuestions) => !stateTestQuestions);\r\n setStart(!start);\r\n };\r\n\r\n const toggleShowMyData = () => {\r\n setShowMyData((stateMyData) => !stateMyData);\r\n };\r\n\r\n if (!personInfo || loading)\r\n return (\r\n <div className={style.subAssetClassDisplay}>\r\n <CircularProgress />\r\n </div>\r\n );\r\n\r\n return (\r\n <div className={style.subAssetClassDisplay}>\r\n <Row>\r\n <Col xs={12} className={style.titleWrapper}>\r\n <span className={style.iconWrapper} onClick={toggleRedoTest}>\r\n <Icons.ArrowLeftIcon className={style.iconArrow} />\r\n </span>\r\n <span className={style.title}>Perfil inversor</span>\r\n </Col>\r\n <hr />\r\n </Row>\r\n <div>\r\n {start ? (\r\n <Fragment>\r\n <Row>\r\n <Col>\r\n <Container className={style.profileTestWrapper}>\r\n {questions.map((question, index) => {\r\n return <Question key={index} question={question} setAnswer={setAnswer} />;\r\n })}\r\n <div className={style.buttonContainer}>\r\n <GenericButton\r\n label={\"Confirmar\"}\r\n rounded\r\n padding={\"12px 36px 12px 36px\"}\r\n primary\r\n handleClick={onConfirm}\r\n ></GenericButton>\r\n </div>\r\n </Container>\r\n </Col>\r\n </Row>\r\n </Fragment>\r\n ) : (\r\n <Fragment>\r\n <Row>\r\n <Col>\r\n <Container>\r\n <div className={style.welcomeContainer}>\r\n <div className={style.name}>{personInfo.PhysicalPersonFirstName},</div>\r\n <div className={style.text}>\r\n Para recomendar las mejores inversiones que se adapten a tus necesidades, queremos\r\n conocerte mejor.\r\n </div>\r\n\r\n <div className={style.buttonContainer}>\r\n <GenericButton\r\n label={\"Empezar\"}\r\n rounded\r\n padding={\"12px 36px 12px 36px\"}\r\n primary\r\n handleClick={toggleShowTestQuestions}\r\n ></GenericButton>\r\n </div>\r\n </div>\r\n </Container>\r\n </Col>\r\n </Row>\r\n </Fragment>\r\n )}\r\n </div>\r\n <Prompt\r\n when={showMyData}\r\n message={(location) => {\r\n toggleShowMyData();\r\n // No permitir la navegación hacia atrás\r\n return false;\r\n }}\r\n />\r\n {showMyData && <MyData toggleMyData={toggleShowMyData} />}\r\n </div>\r\n );\r\n};\r\n\r\nconst Question = ({ question, setAnswer }) => {\r\n const [active, setActive] = useState(\"\");\r\n\r\n return (\r\n <form className={style.questionContainer}>\r\n <p className={style.questionTitle}>{question.QuestionDescription}</p>\r\n {question.Answer.map((answer, index) => {\r\n const key = `${question.QuestionId}-${index}`;\r\n\r\n return (\r\n <div key={key} className={`${style.answerRow} ${active == key ? style.answerRowActive : \"\"}`}>\r\n <input\r\n type=\"radio\"\r\n name=\"answer\"\r\n id={key}\r\n style={{ accentColor: \"#27272A\" }}\r\n onClick={() => {\r\n setActive(key);\r\n setAnswer(question.QuestionId, answer.AnswerId);\r\n }}\r\n />\r\n <label className={style.answerText} for={key}>\r\n {answer.AnswerDescription}\r\n </label>\r\n </div>\r\n );\r\n })}\r\n </form>\r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"subAssetClassDisplay\":\"ProfileTest_subAssetClassDisplay_2BuWL\",\"titleWrapper\":\"ProfileTest_titleWrapper_1vzQp\",\"title\":\"ProfileTest_title_7Jp-o\",\"iconWrapper\":\"ProfileTest_iconWrapper_1vVML\",\"iconArrow\":\"ProfileTest_iconArrow_37XAM\",\"profileTestWrapper\":\"ProfileTest_profileTestWrapper_1dqk_\",\"welcomeContainer\":\"ProfileTest_welcomeContainer_1VMgn\",\"name\":\"ProfileTest_name_Vvz3V\",\"text\":\"ProfileTest_text_3i7HO\",\"buttonContainer\":\"ProfileTest_buttonContainer_3ydvt\",\"button\":\"ProfileTest_button_gkMpn\",\"questionContainer\":\"ProfileTest_questionContainer_2qxvb\",\"questionTitle\":\"ProfileTest_questionTitle_1utJc\",\"answerRow\":\"ProfileTest_answerRow_36e7L\",\"answerText\":\"ProfileTest_answerText_2Nfim\",\"answerRowActive\":\"ProfileTest_answerRowActive_1lfTa\",\"buttonConfirm\":\"ProfileTest_buttonConfirm_2xxyH\",\"answerTitle\":\"ProfileTest_answerTitle_22uuB\"};","import React, { useState, useEffect, Fragment } from \"react\";\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\nimport { Link } from \"react-router-dom\";\r\nimport { CircularProgress } from \"../UI/CircularProgress/CircularProgress\";\r\nimport { Safearea } from \"../UI/Safearea/Safearea\";\r\nimport { Row, Col } from \"../UI/Customstrap/Customstrap\";\r\nimport { Container } from \"../UI/Container/Container\";\r\nimport { getAnswers } from \"../../services/api/person\";\r\nimport { getSession, getCurrentAccount, getSavedPersonInfo } from \"../../reducers/selectors\";\r\nimport redoTestIcon from \"../../../public/svg/redoTest.svg\";\r\nimport { Icons } from \"../UI/Icon/Icon\";\r\nimport style from \"./ProfileTestAnswer.scss\";\r\nimport GenericButton from \"../UI/Button/Button\";\r\nimport { ProfileTest } from \"../ProfileTest/ProfileTest\";\r\nimport { Prompt } from \"react-router-dom\";\r\n\r\nexport const ProfileTestAnswer = ({ toggleProfileAnswers }) => {\r\n const [start, setStart] = useState(false);\r\n const [questions, setQuestions] = useState([]);\r\n const [loading, setLoading] = useState(false);\r\n const [showRedoTest, setShowRedoTest] = useState(false);\r\n\r\n const profileRiskString = {\r\n Conservative: \"Conservador\",\r\n Moderate: \"Moderado\",\r\n Aggressive: \"Agresivo\",\r\n Aggresive: \"Agresivo\",\r\n };\r\n\r\n const personInfo = useSelector(getSavedPersonInfo);\r\n\r\n useEffect(() => {\r\n setLoading(() => true);\r\n getAnswers()\r\n .then(({ response }) => {\r\n setQuestions(response.questions);\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n })\r\n .finally(() => {\r\n setLoading(() => false);\r\n });\r\n }, []);\r\n\r\n let isEmpty = false;\r\n if (personInfo === null || personInfo === undefined) {\r\n isEmpty = true;\r\n } else if (Object.keys(personInfo).length === 0) {\r\n isEmpty = true;\r\n }\r\n\r\n const toggleShowRedoTest = () => {\r\n setShowRedoTest((stateRedoTest) => !stateRedoTest);\r\n };\r\n\r\n if (!personInfo || loading) return <CircularProgress />;\r\n\r\n return (\r\n <div className={style.subAssetClassDisplay}>\r\n <Row>\r\n <Col xs={12} className={style.titleWrapper}>\r\n <span className={style.iconWrapper} onClick={toggleProfileAnswers}>\r\n <Icons.ArrowLeftIcon className={style.iconArrow} />\r\n </span>\r\n <span className={style.title}>Perfil inversor</span>\r\n </Col>\r\n <hr />\r\n </Row>\r\n <Fragment>\r\n <Row>\r\n <Col>\r\n <Container className={style.profileContainer}>\r\n <div className={style.boxProfile}>\r\n <div className={style.icon}>\r\n <Icons.ProfileIcon size=\"xl\"></Icons.ProfileIcon>\r\n <p className={style.profileType}>\r\n Perfil {profileRiskString[personInfo.PersonProfileRiskName]}\r\n </p>\r\n </div>\r\n <div className={style.buttonRedoTest}>\r\n <GenericButton\r\n label={isEmpty ? \"Hacer prueba de perfil\" : \"Rehacer prueba\"}\r\n rounded\r\n position={\"relative\"}\r\n padding={\"14px 20px 14px 20px\"}\r\n lineHeight={\"28px\"}\r\n handleClick={toggleShowRedoTest}\r\n iconSvg={[{ width: \"20px\", item: redoTestIcon }]}\r\n ></GenericButton>\r\n </div>\r\n </div>\r\n </Container>\r\n </Col>\r\n </Row>\r\n <Row>\r\n <Col>\r\n <Container className={style.container}>\r\n <div>\r\n {isEmpty ? (\r\n <div className={style.answerTitle}>\r\n Para ver su perfil de inversionista primero debe hacer la prueba de perfil\r\n </div>\r\n ) : (\r\n <div>\r\n <div className={style.answerTitle}>Mis respuestas</div>\r\n </div>\r\n )}\r\n\r\n {questions.map((question, index) => {\r\n return <Question key={index} question={question} />;\r\n })}\r\n </div>\r\n </Container>\r\n </Col>\r\n </Row>\r\n </Fragment>\r\n <Prompt\r\n when={showRedoTest}\r\n message={(location) => {\r\n toggleShowRedoTest();\r\n // No permitir la navegación hacia atrás\r\n return false;\r\n }}\r\n />\r\n {showRedoTest && <ProfileTest toggleRedoTest={toggleShowRedoTest} />}\r\n </div>\r\n );\r\n};\r\n\r\nconst Question = ({ question }) => {\r\n const [active, setActive] = useState(\"\");\r\n\r\n return (\r\n <form className={style.questionContainer}>\r\n <p className={style.questionTitle}>{question.QuestionDescription}</p>\r\n {question.Answer.map((answer, index) => {\r\n const key = `${question.QuestionId}-${index}`;\r\n\r\n return (\r\n <div key={key} className={`${style.answerRow} ${active == key ? style.answerRowActive : \"\"}`}>\r\n <span className={style.answerText}>{answer.AnswerDescription}</span>\r\n </div>\r\n );\r\n })}\r\n </form>\r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"subAssetClassDisplay\":\"ProfileTestAnswer_subAssetClassDisplay_2SjU6\",\"titleWrapper\":\"ProfileTestAnswer_titleWrapper_1H335\",\"title\":\"ProfileTestAnswer_title_1JNgf\",\"iconWrapper\":\"ProfileTestAnswer_iconWrapper_18aS3\",\"iconArrow\":\"ProfileTestAnswer_iconArrow_3tX46\",\"profileContainer\":\"ProfileTestAnswer_profileContainer_Wy0RT\",\"boxProfile\":\"ProfileTestAnswer_boxProfile_13VbZ\",\"icon\":\"ProfileTestAnswer_icon_Jx7SX\",\"profileType\":\"ProfileTestAnswer_profileType_2TXWq\",\"buttonRedoTest\":\"ProfileTestAnswer_buttonRedoTest_TkS4Y\",\"container\":\"ProfileTestAnswer_container_3EP37\",\"answerTitle\":\"ProfileTestAnswer_answerTitle_IHC1e\",\"investorType\":\"ProfileTestAnswer_investorType_2NpdR\",\"text\":\"ProfileTestAnswer_text_2fARj\",\"buttonContainer\":\"ProfileTestAnswer_buttonContainer_3Q_t1\",\"button\":\"ProfileTestAnswer_button_13eOa\",\"questionContainer\":\"ProfileTestAnswer_questionContainer_2BtDM\",\"questionTitle\":\"ProfileTestAnswer_questionTitle_33wtU\",\"answerRow\":\"ProfileTestAnswer_answerRow_1XGe6\",\"answerText\":\"ProfileTestAnswer_answerText_h6cNP\",\"answerRowActive\":\"ProfileTestAnswer_answerRowActive_3i_n2\",\"welcomeContainer\":\"ProfileTestAnswer_welcomeContainer_1N7kh\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"containerSidebar\":\"SidebarOnboarding_containerSidebar_rpwO1\",\"sidebarOnboarding\":\"SidebarOnboarding_sidebarOnboarding_3Aiof\",\"header\":\"SidebarOnboarding_header_qhTeX\",\"homeIcon\":\"SidebarOnboarding_homeIcon_3FKbK\",\"verticalLine\":\"SidebarOnboarding_verticalLine_2_V7F\",\"logoLabel\":\"SidebarOnboarding_logoLabel_1pUtY\",\"hr\":\"SidebarOnboarding_hr_2f0P1\",\"cross\":\"SidebarOnboarding_cross__hTL6\",\"optionsContainer\":\"SidebarOnboarding_optionsContainer_139Fw\",\"optionsTitle\":\"SidebarOnboarding_optionsTitle_3dcUn\",\"sidebarMenu\":\"SidebarOnboarding_sidebarMenu_1adL0\",\"menuItems\":\"SidebarOnboarding_menuItems_2iqyf\",\"textMenu\":\"SidebarOnboarding_textMenu_1aERb\",\"greenCircle\":\"SidebarOnboarding_greenCircle_2sY4y\",\"checked\":\"SidebarOnboarding_checked_3aX5g\",\"active\":\"SidebarOnboarding_active_232Nu\",\"unchecked\":\"SidebarOnboarding_unchecked_23dXE\",\"mobileSidebarHeader\":\"SidebarOnboarding_mobileSidebarHeader_vstsI\",\"sidebarMobile\":\"SidebarOnboarding_sidebarMobile_1NFNt\"};","import React, { useEffect, useState } from \"react\";\r\nimport {\r\n Badge,\r\n Nav,\r\n NavItem,\r\n NavLink as RsNavLink,\r\n NavbarBrand,\r\n Label,\r\n} from \"reactstrap\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport cross from \"../../../public/svg/x-symbol-svgrepo-com.svg\";\r\nimport MediaQuery from \"react-responsive\";\r\nimport NavbarToggler from \"reactstrap/lib/NavbarToggler\";\r\nimport { Prompt } from \"react-router-dom\";\r\nimport { EnvironmentSign } from \"bx-react-ui\";\r\nimport { Icons } from \"../UI/Icon/Icon\";\r\nimport { ConfirmDataOnboarding } from \"../Onboarding/ConfirmDataOnboarding/ConfirmDataOnboarding\";\r\nimport style from \"./SidebarOnboarding.scss\";\r\nimport { getSavedPersonInfo } from \"../../reducers/selectors\";\r\nimport { getPersonInfo } from \"../../services/api/person\";\r\nimport { personInfoSet } from \"../../actions/entities\";\r\nimport { ContractOnboarding } from \"../Onboarding/ContractOnboarding/ContractOnboarding\";\r\n\r\nconst environmentName = window.___APP_CONFIG___.ENV_NAME\r\n ? window.___APP_CONFIG___.ENV_NAME\r\n : \"TESTING\";\r\n\r\nconst SidebarOnboarding = ({ isProdEnv }) => {\r\n const dispatch = useDispatch();\r\n const [indexSidebar, setIndexSidebar] = useState(0);\r\n const [mobileSidebar, setMobileSidebar] = useState(false);\r\n const showEnvironmentSign = !isProdEnv || isTestingUser;\r\n const environmentSignText = isProdEnv ? \"PRODUCTION\" : environmentName;\r\n const environmentSignColor = isProdEnv ? \"red\" : \"#34784B\";\r\n\r\n const elementsSidebarOnboarding = [\r\n // \"Confirmá tus datos\",\r\n \"Contrato único\",\r\n // \"Cuentas\",\r\n \"Perfil del inversión\",\r\n \"Declaración PEP\",\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 }, []);\r\n\r\n const updateSidebar = () => {\r\n setIndexSidebar(indexSidebar + 1);\r\n };\r\n\r\n const toggleMobileSidebar = () => {\r\n setMobileSidebar((stateMobile) => !stateMobile);\r\n };\r\n\r\n const mobileSidebarToggle = (e) => {\r\n toggleMobileSidebar();\r\n };\r\n\r\n const MenuItems = () => {\r\n return (\r\n <div className={style.menuItems}>\r\n {elementsSidebarOnboarding.map((menuElement, index) => (\r\n <div key={index} className={style.textMenu}>\r\n {index < indexSidebar ? (\r\n <li className={style.checked}>\r\n <Icons.RadioCheckedIcon size=\"md\" />\r\n {menuElement.toString()}\r\n </li>\r\n ) : (\r\n <div>\r\n {index === indexSidebar ? (\r\n <li key={index} className={style.active}>\r\n <div className={style.greenCircle}>\r\n <Icons.CheckedMenu size=\"md\" />\r\n </div>\r\n {menuElement.toString()}\r\n </li>\r\n ) : (\r\n <li key={index} className={style.unchecked}>\r\n <Icons.UncheckedMenu size=\"md\" />\r\n {menuElement.toString()}\r\n </li>\r\n )}\r\n </div>\r\n )}\r\n </div>\r\n ))}\r\n </div>\r\n );\r\n };\r\n\r\n return (\r\n <div className={style.containerSidebar}>\r\n <div\r\n className={\r\n mobileSidebar ? style.sidebarMobile : style.sidebarOnboarding\r\n }\r\n >\r\n <MediaQuery minWidth={1024}>\r\n <div className={style.header}>\r\n <Icons.HomeIconWhite className={style.homeIcon} />\r\n <div className={style.verticalLine}></div>\r\n <Label className={style.logoLabel}>Casa de Bolsa</Label>\r\n </div>\r\n <div>\r\n <hr className={style.hr} />\r\n </div>\r\n\r\n <div className={style.optionsContainer}>\r\n <div className={style.optionsTitle}> Configuración de perfil </div>\r\n <div>\r\n <ul className={style.sidebarMenu}>\r\n <MenuItems />\r\n </ul>\r\n </div>\r\n </div>\r\n </MediaQuery>\r\n {mobileSidebar && (\r\n <MediaQuery maxWidth={1023}>\r\n <span id={style.mobileSidebarHeader}>\r\n <img\r\n src={cross}\r\n alt=\"cross\"\r\n className={style.cross}\r\n onClick={(e) => {\r\n mobileSidebarToggle(e);\r\n }}\r\n />\r\n </span>\r\n\r\n <div className={style.header}>\r\n <Icons.HomeIcon className={style.homeIcon} />\r\n <div className={style.verticalLine}></div>\r\n <Label className={style.logoLabel}>Casa de Bolsa</Label>\r\n </div>\r\n <div>\r\n <hr className={style.hr} />\r\n </div>\r\n\r\n <div className={style.optionsContainer}>\r\n <div className={style.optionsTitle}>\r\n {\" \"}\r\n Configuración de perfil{\" \"}\r\n </div>\r\n <div>\r\n <ul className={style.sidebarMenu}>\r\n <MenuItems />\r\n </ul>\r\n </div>\r\n </div>\r\n </MediaQuery>\r\n )}\r\n <MediaQuery minWidth={576}>\r\n {showEnvironmentSign && (\r\n <EnvironmentSign\r\n text={environmentSignText}\r\n color={environmentSignColor}\r\n />\r\n )}\r\n </MediaQuery>\r\n </div>\r\n {/* {\r\n <ConfirmDataOnboarding\r\n activeSidebar={mobileSidebar}\r\n toggleMobileSidebar={toggleMobileSidebar}\r\n confirmPersonInfo={updateSidebar}\r\n confirmContract={updateSidebar}\r\n confirmAccounts={updateSidebar}\r\n confirmInvestmentProfile={updateSidebar}\r\n />\r\n } */}\r\n {\r\n <ContractOnboarding \r\n toggleMobileSidebar={toggleMobileSidebar}\r\n confirmContract={updateSidebar}\r\n confirmAccounts={updateSidebar}\r\n confirmInvestmentProfile={updateSidebar}\r\n />\r\n }\r\n </div>\r\n );\r\n};\r\n\r\nexport default SidebarOnboarding;\r\n","import React, { useState, useEffect, Fragment } from \"react\";\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\n\r\nimport { getSession, getCurrentAccount, getSavedPersonInfo } from \"../../reducers/selectors\";\r\nimport { getAccountAnswers } from \"../../services/api/person\";\r\n\r\nimport style from \"./AccountProfileTest.scss\";\r\nimport { CircularProgress } from \"../UI/CircularProgress/CircularProgress\";\r\n\r\nexport const AccountProfileTest = () => {\r\n const currentAccount = useSelector(getCurrentAccount);\r\n const [questions, setQuestions] = useState([]);\r\n const [loading, setLoading] = 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 useEffect(() => {\r\n if (currentAccount.AccountNumber) {\r\n setLoading(() => true);\r\n getAccountAnswers({ accountNumber: currentAccount.AccountNumber })\r\n .then(({ response }) => {\r\n setQuestions(response.questions);\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n })\r\n .finally(() => {\r\n setLoading(() => false);\r\n });\r\n }\r\n }, [currentAccount]);\r\n\r\n if (!currentAccount) return <CircularProgress />;\r\n\r\n return (\r\n <Fragment>\r\n <div className={style.container}>\r\n <p className={style.title}>Perfil inversor de la cuenta</p>\r\n <div className={style.welcomeContainer}>\r\n <div className={style.answerTitle}>El perfil inversionista de su cuenta es</div>\r\n\r\n <div className={style.investorType}>{profileRiskString[currentAccount.accountProfileRisk]}</div>\r\n\r\n {questions.map((question, index) => {\r\n return <Question key={index} question={question} />;\r\n })}\r\n </div>\r\n </div>\r\n </Fragment>\r\n );\r\n};\r\n\r\nconst Question = ({ question }) => {\r\n const [active, setActive] = useState(\"\");\r\n\r\n return (\r\n <form className={style.questionContainer}>\r\n <p className={style.questionTitle}>{question.QuestionDescription}</p>\r\n {question.Answer.map((answer, index) => {\r\n const key = `${question.QuestionId}-${index}`;\r\n\r\n return (\r\n <div key={key} className={style.answerRow}>\r\n <span className={style.answerText}>{answer.AnswerDescription}</span>\r\n </div>\r\n );\r\n })}\r\n </form>\r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"AccountProfileTest_container_eDhFG\",\"title\":\"AccountProfileTest_title_1gwJt\",\"welcomeContainer\":\"AccountProfileTest_welcomeContainer_hXdlJ\",\"answerTitle\":\"AccountProfileTest_answerTitle_soeyl\",\"investorType\":\"AccountProfileTest_investorType_3_Tk6\",\"text\":\"AccountProfileTest_text_3BLzK\",\"questionContainer\":\"AccountProfileTest_questionContainer_20rew\",\"questionTitle\":\"AccountProfileTest_questionTitle_34lWX\",\"answerRow\":\"AccountProfileTest_answerRow_1BSba\",\"answerText\":\"AccountProfileTest_answerText_mX31f\",\"buttonContainer\":\"AccountProfileTest_buttonContainer_6Pnbs\",\"buttonConfirm\":\"AccountProfileTest_buttonConfirm_3c_4y\"};","import React from \"react\";\r\nimport { ToastContainer } from \"react-toastify\";\r\n\r\nimport style from \"./Toaster.scss\";\r\n\r\nexport const Toaster = () => <ToastContainer className={style.toastContainer} />;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"toastContainer\":\"Toaster_toastContainer_1BYfr\"};","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: \"#106eb0\",\r\n fontFamily: \"Arial\"\r\n };\r\n\r\n const containerStyles = {\r\n height: height,\r\n width: width,\r\n position: \"absolute\",\r\n right: 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 <div style={containerStyles}>\r\n <UncontrolledTooltip placement=\"right\" style={tooltTipStyles} target=\"tooltip\">\r\n {text}\r\n </UncontrolledTooltip>\r\n <img src={tooltip} alt=\"tooltip\" id=\"tooltip\"/>\r\n </div>\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 <div\r\n style={{ width: width || \"fit-content\", position: position, bottom: bottom }}\r\n className={`${right && styles.reverse}`}\r\n >\r\n <Button\r\n style={{\r\n marginLeft: marginLeft,\r\n backgroundColor: backgroundColor,\r\n color: textColor,\r\n border: border,\r\n fontWeight: fontWeight,\r\n lineHeight: lineHeight,\r\n padding: padding,\r\n width: \"100%\",\r\n ...style,\r\n }}\r\n className={`${styles.btnGeneric} ${rounded && styles.roundedMd} ${\r\n pl0 ? styles.pl0 : styles.pNormal\r\n } ${secondary && styles.normal} ${primary && styles.activeButton} ${\r\n grayDark && styles.grayDark\r\n } ${className}`}\r\n onClick={handleClick}\r\n disabled={loading || disabled}\r\n >\r\n {icon && <i className={`${icon} `}></i>}\r\n {iconSvg &&\r\n iconSvg.map((icon, index) => {\r\n return (\r\n <img\r\n key={\"buttonIcon\" + index}\r\n style={{ height: \"20px\", width: icon.width }}\r\n src={icon.item}\r\n ></img>\r\n );\r\n })}\r\n <Label style={{ marginRight: marginRightIcon, ...labelStyle }}>{label}</Label>\r\n {loading && <CircularProgress sm style={{ margin: 0 }} />}\r\n </Button>\r\n </div>\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 { Button, Label } from \"reactstrap\";\r\nimport style from \"./Button.scss\";\r\n\r\nconst CounterBox = ({\r\n boxWidth,\r\n height,\r\n label,\r\n labelColor,\r\n handleClick,\r\n icon,\r\n marginLeft,\r\n iconSvg,\r\n roundedXs,\r\n backgroundColor,\r\n primary,\r\n}) => {\r\n return (\r\n <div\r\n style={{ width: boxWidth, height: height, backgroundColor: backgroundColor }}\r\n className={`${roundedXs && style.roundedXs} ${style.divCounterBox} ${primary && style.activeButton}`}\r\n >\r\n <Label style={{ marginLeft: marginLeft, color: labelColor }} className={style.labelCounterBox}>\r\n {label.text}\r\n </Label>\r\n <div style={{ display: \"flex\", justifyContent: \"space-between\" }}>\r\n {label.number && (\r\n <div className={style.numberCounterBox}>\r\n <Label className={style.labelNumber}>{label.number}</Label>\r\n </div>\r\n )}\r\n <img\r\n style={{ height: \"20px\", width: icon.width, alignSelf: \"center\" }}\r\n src={icon.src}\r\n onClick={handleClick}\r\n ></img>\r\n </div>\r\n </div>\r\n );\r\n};\r\nexport default CounterBox;\r\n","import React from \"react\";\r\nimport { Button, Label } from \"reactstrap\";\r\nimport styles from \"./FutureButton.scss\";\r\n\r\nconst FutureButton = ({\r\n label,\r\n handleClick,\r\n icon,\r\n marginRightIcon,\r\n iconSvg,\r\n style,\r\n labelStyle,\r\n active\r\n}) => {\r\n return (\r\n <button\r\n className={active ? styles.activeFilter : styles.btnGeneric}\r\n onClick={handleClick}\r\n >\r\n <Label style={{ marginRight: marginRightIcon, ...labelStyle }}>{label}</Label>\r\n {icon && <i className={`${icon} `}></i>}\r\n {iconSvg &&\r\n iconSvg.map((icon, index) => {\r\n return (\r\n <img\r\n key={\"buttonIcon\" + index}\r\n style={{ height: \"14px\", width: icon.width }}\r\n src={icon.item}\r\n ></img>\r\n );\r\n })}\r\n </button>\r\n );\r\n};\r\nexport default FutureButton;","// extracted by mini-css-extract-plugin\nmodule.exports = {\"btnGeneric\":\"FutureButton_btnGeneric_37YqN\",\"activeFilter\":\"FutureButton_activeFilter_1c1_m\"};","import React from \"react\";\r\nimport style from \"./CircularProgress.scss\";\r\n\r\nexport const CircularProgress = ({ sm = false }) => (\r\n <div className={`${style.loader} ${sm ? style.sm : \"\"}`} />\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 { UncontrolledTooltip } from \"reactstrap\";\r\n\r\nimport style from \"./CompositionBar.scss\";\r\n\r\nconst colors = {\r\n 1: \"color1\",\r\n 2: \"color2\",\r\n 3: \"color3\",\r\n 4: \"color4\",\r\n 5: \"color5\",\r\n 6: \"color6\",\r\n};\r\n\r\nexport const CompositionBar = ({ data = [] }) => {\r\n let barColorIdx = 0;\r\n let pillColorIdx = 0;\r\n\r\n return (\r\n <div className={style.barWrapper}>\r\n <div className={style.bar}>\r\n {data.map((item, index) => {\r\n if (barColorIdx === 6) {\r\n barColorIdx = 1;\r\n }\r\n barColorIdx += 1;\r\n\r\n const tooltipIndex = `bar-${barColorIdx}`;\r\n return (\r\n <div\r\n key={\"bar-\" + item.name + \"-\" + index}\r\n id={tooltipIndex}\r\n className={`${style.item} ${style[colors[barColorIdx]]}`}\r\n style={{ width: item.percentage > 20 ? `${item.percentage}%` : \"auto\" }}\r\n //style={{width : `${item.percentage}%`}}\r\n >\r\n <UncontrolledTooltip\r\n placement=\"right\"\r\n target={tooltipIndex}\r\n style={{ fontFamily: \"Poppins\", fontSize: 16 }}\r\n >\r\n {`${item.name}: ${item.percentage}%`}\r\n </UncontrolledTooltip>\r\n <span className={style.itemSpan}>{`${item.percentage}%`}</span>\r\n </div>\r\n );\r\n })}\r\n </div>\r\n <div className={style.details}>\r\n {data.map((item, index) => {\r\n if (pillColorIdx === 6) {\r\n pillColorIdx = 1;\r\n }\r\n pillColorIdx += 1;\r\n\r\n return (\r\n <div className={`${style.item}`} key={item.name + \"-\" + index}>\r\n <span className={`${style.pill} ${style[colors[pillColorIdx]]}`} />\r\n <div className={style.data}>\r\n <span className={style.name}>{item.name}</span>\r\n <span className={style.percentage}>{`${item.percentage}%`}</span>\r\n </div>\r\n </div>\r\n );\r\n })}\r\n </div>\r\n </div>\r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"barWrapper\":\"CompositionBar_barWrapper_BhcRv\",\"bar\":\"CompositionBar_bar_1lHcJ\",\"item\":\"CompositionBar_item_2Qi_6\",\"itemSpan\":\"CompositionBar_itemSpan_TI-m3\",\"details\":\"CompositionBar_details_38bM5\",\"pill\":\"CompositionBar_pill_2iOep\",\"data\":\"CompositionBar_data_2ct0W\",\"name\":\"CompositionBar_name_3JP2i\",\"percentage\":\"CompositionBar_percentage_1L6Ri\",\"color1\":\"CompositionBar_color1_VJ2NZ\",\"color2\":\"CompositionBar_color2_FHxnx\",\"color3\":\"CompositionBar_color3_1Yh0q\",\"color4\":\"CompositionBar_color4_1of27\",\"color5\":\"CompositionBar_color5_3M52W\",\"color6\":\"CompositionBar_color6_29oU5\"};","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 <div className={style.containerWrapper}>\r\n <div className={newClassName} {...otherProps}>\r\n {children}\r\n </div>\r\n </div>\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 { Row as RSRow, Col as RSCol } from \"reactstrap\";\r\nimport classNames from \"classnames\";\r\n\r\nimport style from \"./Customstrap.scss\";\r\n\r\nexport const Row = (props) => {\r\n const { className, ...otherProps } = props;\r\n const newClassName = classNames(className, style.row);\r\n\r\n return <RSRow className={newClassName} {...otherProps} />;\r\n};\r\n\r\nexport const Col = (props) => {\r\n const { className, ...otherProps } = props;\r\n const newClassName = classNames(className, style.col);\r\n return <RSCol className={newClassName} {...otherProps} />;\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"row\":\"Customstrap_row_3YJNG\",\"col\":\"Customstrap_col_2eaCc\"};","import React from \"react\";\r\n\r\nimport ArrowRightIcon from \"../../../../public/svg/ButtonIcons/right-arrow.svg\";\r\nimport AuthorizationsIcon from \"../../../../public/svg/SideBarIcons/autorizaciones.svg\";\r\nimport MonthlyReportsIcon from \"../../../../public/svg/SideBarIcons/estadosMensuales.svg\";\r\nimport GreenDotIcon from \"../../../../public/svg/SideBarIcons/green-dot.svg\";\r\nimport HistoryIcon from \"../../../../public/svg/SideBarIcons/historico.svg\";\r\nimport FutureCashFlowIcon from \"../../../../public/svg/SideBarIcons/ingresosFuturos.svg\";\r\nimport InvestIcon from \"../../../../public/svg/SideBarIcons/invertir.svg\";\r\nimport HomeIcon from \"../../../../public/svg/SideBarIcons/logo-home.svg\";\r\nimport OrdersIcon from \"../../../../public/svg/SideBarIcons/ordenes.svg\";\r\nimport PhoneIcon from \"../../../../public/svg/SideBarIcons/phone.svg\";\r\nimport PortfolioIcon from \"../../../../public/svg/SideBarIcons/portafolio.svg\";\r\nimport UserIcon from \"../../../../public/svg/SideBarIcons/user.svg\";\r\nimport AddIcon from \"../../../../public/svg/add.svg\";\r\nimport ReturnedIcon from \"../../../../public/svg/assignment_returned.svg\";\r\nimport CalendarIcon from \"../../../../public/svg/calendar.svg\";\r\nimport TravelIcon from \"../../../../public/svg/card_travel.svg\";\r\nimport CSVIcon from \"../../../../public/svg/csv.svg\";\r\nimport DashboardIcon from \"../../../../public/svg/dashboard.svg\";\r\nimport DocumentationIcon from \"../../../../public/svg/documentacion.svg\";\r\nimport DownloadIcon from \"../../../../public/svg/download-svgrepo-com.svg\";\r\nimport HelpIcon from \"../../../../public/svg/help.svg\";\r\nimport InformationIcon from \"../../../../public/svg/i.svg\";\r\nimport ArrowDownIcon from \"../../../../public/svg/keyboard_arrow_down.svg\";\r\nimport LockIcon from \"../../../../public/svg/lock.svg\";\r\nimport LogoutIcon from \"../../../../public/svg/logout.svg\";\r\nimport SearchIcon from \"../../../../public/svg/magnifying-glass-svgrepo-com.svg\";\r\nimport MenuIcon from \"../../../../public/svg/menu.svg\";\r\nimport NotificationIcon from \"../../../../public/svg/notificaciones.svg\";\r\nimport PDFIcon from \"../../../../public/svg/pdf.svg\";\r\nimport PrintIcon from \"../../../../public/svg/print-solid.svg\";\r\nimport CloseIcon from \"../../../../public/svg/x-symbol-svgrepo-com.svg\";\r\nimport XLSXIcon from \"../../../../public/svg/xlsx.svg\";\r\nimport ProfileIcon from \"../../../../public/svg/profile.svg\";\r\nimport CloseSessionIcon from \"../../../../public/svg/closeSession.svg\";\r\nimport RadioCheckedIcon from \"../../../../public/svg/ButtonIcons/radio-checked.svg\";\r\nimport RadioUncheckedIcon from \"../../../../public/svg/ButtonIcons/radio-unchecked.svg\";\r\nimport RadioCheckedBlackIcon from \"../../../../public/svg/ButtonIcons/radio-checked-black.svg\";\r\nimport RadioUncheckedBlackIcon from \"../../../../public/svg/ButtonIcons/radio-unchecked-black.svg\";\r\nimport USD from \"../../../../public/svg/Currencies/usd.svg\";\r\nimport PYG from \"../../../../public/svg/Currencies/pyg.svg\";\r\nimport ArrowLeftIcon from \"../../../../public/svg/ButtonIcons/left-arrow.svg\";\r\nimport DocumentIcon from \"../../../../public/svg/ButtonIcons/doc.svg\";\r\nimport FileIcon from \"../../../../public/svg/file.svg\";\r\nimport CheckedContractIcon from \"../../../../public/svg/checkboxContract.svg\";\r\nimport RadioCheckedAccount from \"../../../../public/svg/radioCheckAccount.svg\";\r\nimport RadioUncheckedAccount from \"../../../../public/svg/radioUncheckAccount.svg\";\r\nimport RadioCheckedAnswer from \"../../../../public/svg/radioCheckedAnswer.svg\";\r\nimport WelcomeTick from \"../../../../public/svg/welcomeTick.svg\";\r\nimport GreenFaceIcon from \"../../../../public/svg/greenFace.svg\";\r\nimport GreenStarIcon from \"../../../../public/svg/greenStar.svg\";\r\nimport UncheckedMenu from \"../../../../public/svg/SideBarIcons/uncheckedMenu.svg\";\r\nimport CheckedMenu from \"../../../../public/svg/SideBarIcons/checkedMenu.svg\";\r\nimport GreenCircle from \"../../../../public/svg/SideBarIcons/greenCircle.svg\";\r\nimport PencilInput from \"../../../../public/svg/pencil.svg\";\r\nimport InformationLoginIcon from \"../../../../public/svg/LoginInIcons/info.svg\";\r\nimport EngineIcon from \"../../../../public/svg/LoginInIcons/engine.svg\";\r\nimport PersonIcon from \"../../../../public/svg/LoginInIcons/person.svg\";\r\nimport HomeIconWhite from \"../../../../public/svg/SideBarIcons/logo-home-white.svg\";\r\nimport CheckInfo from \"../../../../public/svg/checkInfo.svg\";\r\nimport Close from \"../../../../public/svg/ButtonIcons/close.svg\";\r\nimport InfoIcon from \"../../../../public/svg/information.svg\";\r\nimport ErrorIcon from \"../../../../public/svg/error.svg\";\r\nimport SuccessIcon from \"../../../../public/svg/success.svg\";\r\nimport WarningIcon from \"../../../../public/svg/warning.svg\";\r\nimport CheckboxCheckedIcon from \"../../../../public/svg/checkbox-checked.svg\";\r\nimport CheckboxUncheckedIcon from \"../../../../public/svg/checkbox-unchecked.svg\";\r\n\r\nimport { sizes } from \"../../../utils/dimentions\";\r\n\r\nexport const Icon = ({ src, size = sizes.md, ...otherProps }) => {\r\n return <img src={src} style={{ width: sizes[size], height: sizes[size] }} {...otherProps} />;\r\n};\r\n\r\nexport const Icons = {\r\n ArrowRightIcon: (props) => <Icon src={ArrowRightIcon} {...props} />,\r\n ArrowLeftIcon: (props) => <Icon src={ArrowLeftIcon} {...props} />,\r\n AuthorizationsIcon: (props) => <Icon src={AuthorizationsIcon} {...props} />,\r\n MonthlyReportsIcon: (props) => <Icon src={MonthlyReportsIcon} {...props} />,\r\n GreenDotIcon: (props) => <Icon src={GreenDotIcon} {...props} />,\r\n HistoryIcon: (props) => <Icon src={HistoryIcon} {...props} />,\r\n FutureCashFlowIcon: (props) => <Icon src={FutureCashFlowIcon} {...props} />,\r\n InvestIcon: (props) => <Icon src={InvestIcon} {...props} />,\r\n HomeIcon: (props) => <Icon src={HomeIcon} {...props} />,\r\n OrdersIcon: (props) => <Icon src={OrdersIcon} {...props} />,\r\n PhoneIcon: (props) => <Icon src={PhoneIcon} {...props} />,\r\n PortfolioIcon: (props) => <Icon src={PortfolioIcon} {...props} />,\r\n UserIcon: (props) => <Icon src={UserIcon} {...props} />,\r\n AddIcon: (props) => <Icon src={AddIcon} {...props} {...props} />,\r\n ReturnedIcon: (props) => <Icon src={ReturnedIcon} {...props} />,\r\n CalendarIcon: (props) => <Icon src={CalendarIcon} {...props} />,\r\n TravelIcon: (props) => <Icon src={TravelIcon} {...props} />,\r\n CSVIcon: (props) => <Icon src={CSVIcon} {...props} />,\r\n DashboardIcon: (props) => <Icon src={DashboardIcon} {...props} />,\r\n DocumentationIcon: (props) => <Icon src={DocumentationIcon} {...props} />,\r\n DocumentIcon: (props) => <Icon src={DocumentIcon} {...props} />,\r\n DownloadIcon: (props) => <Icon src={DownloadIcon} {...props} />,\r\n HelpIcon: (props) => <Icon src={HelpIcon} {...props} />,\r\n InformationIcon: (props) => <Icon src={InformationIcon} {...props} />,\r\n ArrowDownIcon: (props) => <Icon src={ArrowDownIcon} {...props} />,\r\n LockIcon: (props) => <Icon src={LockIcon} {...props} />,\r\n LogoutIcon: (props) => <Icon src={LogoutIcon} {...props} />,\r\n SearchIcon: (props) => <Icon src={SearchIcon} {...props} />,\r\n MenuIcon: (props) => <Icon src={MenuIcon} {...props} />,\r\n NotificationIcon: (props) => <Icon src={NotificationIcon} {...props} />,\r\n PDFIcon: (props) => <Icon src={PDFIcon} {...props} />,\r\n PrintIcon: (props) => <Icon src={PrintIcon} {...props} />,\r\n CloseIcon: (props) => <Icon src={CloseIcon} {...props} />,\r\n XLSXIcon: (props) => <Icon src={XLSXIcon} {...props} />,\r\n ProfileIcon: (props) => <Icon src={ProfileIcon} {...props} />,\r\n CloseSessionIcon: (props) => <Icon src={CloseSessionIcon} {...props} />,\r\n RadioCheckedIcon: (props) => <Icon src={RadioCheckedIcon} {...props} />,\r\n RadioUncheckedIcon: (props) => <Icon src={RadioUncheckedIcon} {...props} />,\r\n RadioCheckedBlackIcon: (props) => <Icon src={RadioCheckedBlackIcon} {...props} />,\r\n RadioUncheckedBlackIcon: (props) => <Icon src={RadioUncheckedBlackIcon} {...props} />,\r\n USDIcon: (props) => <Icon src={USD} {...props} />,\r\n PYGIcon: (props) => <Icon src={PYG} {...props} />,\r\n FileIcon: (props) => <Icon src={FileIcon} {...props} />,\r\n CheckedContractIcon: (props) => <Icon src={CheckedContractIcon} {...props} />,\r\n RadioCheckedAccount: (props) => <Icon src={RadioCheckedAccount} {...props} />,\r\n RadioUncheckedAccount: (props) => <Icon src={RadioUncheckedAccount} {...props} />,\r\n RadioCheckedAnswer: (props) => <Icon src={RadioCheckedAnswer} {...props} />,\r\n WelcomeTick: (props) => <Icon src={WelcomeTick} {...props} />,\r\n GreenFaceIcon: (props) => <Icon src={GreenFaceIcon} {...props} />,\r\n GreenStarIcon: (props) => <Icon src={GreenStarIcon} {...props} />,\r\n UncheckedMenu: (props) => <Icon src={UncheckedMenu} {...props} />,\r\n CheckedMenu: (props) => <Icon src={CheckedMenu} {...props} />,\r\n GreenCircle: (props) => <Icon src={GreenCircle} {...props} />,\r\n PencilInput: (props) => <Icon src={PencilInput} {...props} />,\r\n InformationLoginIcon: (props) => <Icon src={InformationLoginIcon} {...props} />,\r\n EngineIcon: (props) => <Icon src={EngineIcon} {...props} />,\r\n PersonIcon: (props) => <Icon src={PersonIcon} {...props} />,\r\n HomeIconWhite: (props) => <Icon src={HomeIconWhite} {...props} />,\r\n CheckInfo: (props) => <Icon src={CheckInfo} {...props} />,\r\n Close: (props) => <Icon src={Close} {...props} />,\r\n InfoIcon: (props) => <Icon src={InfoIcon} {...props} />,\r\n ErrorIcon: (props) => <Icon src={ErrorIcon} {...props} />,\r\n SuccessIcon: (props) => <Icon src={SuccessIcon} {...props} />,\r\n WarningIcon: (props) => <Icon src={WarningIcon} {...props} />,\r\n CheckboxCheckedIcon: (props) => <Icon src={CheckboxCheckedIcon} {...props} />,\r\n CheckboxUncheckedIcon: (props) => <Icon src={CheckboxUncheckedIcon} {...props} />,\r\n};\r\n","import React from \"react\";\r\nimport { Button, Label } from \"reactstrap\";\r\n\r\nimport { Icons } from \"../Icon/Icon\";\r\n\r\nimport style from \"./RadioButton.scss\";\r\n\r\nexport const RadioButton = ({ label, onClick, active, name }) => {\r\n const handleChangeDate = () => {\r\n onClick(name);\r\n };\r\n return (\r\n <Button onClick={handleChangeDate} className={style.radioButton}>\r\n {active ? (\r\n <Icons.RadioCheckedAnswer size=\"md\" className={style.icon} />\r\n ) : (\r\n <Icons.RadioUncheckedIcon size=\"md\" className={style.icon} />\r\n )}\r\n {label && <Label className={style.label}>{label}</Label>}\r\n </Button>\r\n );\r\n};\r\n\r\nexport const RadioButtonGroup = ({ children }) => <div className={style.buttonGroup}>{children}</div>;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"buttonGroup\":\"RadioButton_buttonGroup_3Hm4s\",\"radioButton\":\"RadioButton_radioButton_1aX9P\",\"label\":\"RadioButton_label_N_keA\",\"icon\":\"RadioButton_icon_2A6Er\"};","import React from \"react\";\r\n\r\nimport style from \"./Safearea.scss\";\r\n\r\nexport const Safearea = ({ children, ...props }) => <div className={style.safearea}>{children}</div>;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"safearea\":\"Safearea_safearea_nUg24\"};","import React from \"react\";\r\nimport { Label } from \"reactstrap\";\r\nimport classNames from \"classnames\";\r\n\r\nimport style from \"./TitleLabel.scss\";\r\n\r\nexport const TitleLabel = ({ label, className, ...otherProps }) => {\r\n const newClasses = classNames(className, style.cardTitle);\r\n return (\r\n <Label className={newClasses} {...otherProps}>\r\n {label}\r\n </Label>\r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"cardTitle\":\"TitleLabel_cardTitle_1VtvT\",\"titleInfo\":\"TitleLabel_titleInfo_4cKHK\",\"headerTitle\":\"TitleLabel_headerTitle_2khlT\"};","import React, { Fragment, useState, useEffect } from \"react\";\r\nimport { DropdownToggle, DropdownMenu, DropdownItem, Dropdown } 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 { getCurrentAccount, getSavedPersonInfo } from \"../../reducers/selectors\";\r\nimport { currentAccountSet, personInfoSet } from \"../../actions/entities\";\r\nimport arrow from \"../../../public/svg/keyboard_arrow_down.svg\";\r\nimport style from \"./UserSelector.scss\";\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 [investorProfile, setInvestorProfile] = 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 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 });\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 <Fragment>\r\n {accounts.map((account, index) => (\r\n <DropdownItem\r\n className={style.accountItem}\r\n key={index}\r\n onClick={() => {\r\n handleChangeAccount(account);\r\n toggleUserDropdown();\r\n }}\r\n >\r\n Cambiar a cuenta {account.number}\r\n </DropdownItem>\r\n ))}\r\n <Link className={style.link} to=\"/myData\">\r\n <DropdownItem\r\n className={myData ? style.activeItem : style.inactiveItem}\r\n onClick={() => {\r\n setUserDropdownIsOpen(false);\r\n setMyData(true);\r\n setInvestorProfile(false);\r\n hideMobile();\r\n }}\r\n >\r\n Mis datos\r\n </DropdownItem>\r\n </Link>\r\n <Link className={style.link} to=\"/investorProfile\">\r\n <DropdownItem\r\n className={investorProfile ? style.activeItem : style.inactiveItem}\r\n onClick={() => {\r\n setUserDropdownIsOpen(false);\r\n setInvestorProfile(true);\r\n setMyData(false);\r\n hideMobile();\r\n }}\r\n >\r\n Perfil inversor\r\n </DropdownItem>\r\n </Link>\r\n </Fragment>\r\n );\r\n };\r\n\r\n return (\r\n <Fragment>\r\n <span className={style.container}>\r\n <span className={style.rightContainer}>\r\n {personInfo && (\r\n <span\r\n className={style.accountHolderName}\r\n >{`${personInfo.PhysicalPersonFirstName} ${personInfo.PhysicalPersonFirstLastName}`}</span>\r\n )}\r\n <span className={style.secondRow}>\r\n <span className={style.secondRowContainer}>\r\n <Dropdown\r\n isOpen={userDropdownIsOpen}\r\n toggle={toggleUserDropdown}\r\n nav\r\n inNavbar\r\n className={style.dropdown}\r\n tag=\"ul\"\r\n >\r\n <DropdownToggle nav caret className={style.userSelector}>\r\n <DropdownMenu className={style.dropDownMenu}>{userSelectorData()}</DropdownMenu>\r\n </DropdownToggle>\r\n </Dropdown>\r\n <p className={style.accountNumber}>cuenta {currentAccount.AccountNumber}</p>\r\n <img\r\n src={arrow}\r\n className={userDropdownIsOpen ? style.arrowImgActive : style.arrowImg}\r\n onClick={() => {\r\n setUserDropdownIsOpen(!userDropdownIsOpen);\r\n }}\r\n />\r\n </span>\r\n </span>\r\n <div className={style.blueTextContainer}>\r\n <div className={style.investor}>\r\n perfil inversor <b>{profileRiskString[currentAccount.accountProfileRisk]}</b>\r\n </div>\r\n <div\r\n className={style.assesor}\r\n >{`asesor ${currentAccount.advisorName} ${currentAccount.advisorFirstLastName} / celular ${currentAccount.advisorPhone}`}</div>\r\n </div>\r\n </span>\r\n </span>\r\n </Fragment>\r\n );\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"UserSelector_container_2sVmO\",\"rightContainer\":\"UserSelector_rightContainer_2Fzq2\",\"accountHolderName\":\"UserSelector_accountHolderName_3rBJo\",\"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\",\"blueTextContainer\":\"UserSelector_blueTextContainer_1zGZr\",\"investor\":\"UserSelector_investor_3tjA2\",\"assesor\":\"UserSelector_assesor_3x-xz\",\"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 <div className={style.container}>\r\n <p className={style.text}>Importante: {text}</p>\r\n </div>\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 { ProfileInfo } from \"../pages/ProfileInfo\";\r\nimport { Authorizations } from \"../pages/Authorizations\";\r\nimport { FutureIncome } from \"../pages/FutureIncome\";\r\nimport { MonthlyStates } from \"../pages/MonthlyStates\";\r\nimport { Orders } from \"../pages/Orders\";\r\nimport { MyData } from \"../components/Layout/MyData/MyData\";\r\nimport { HelpPage } from \"../pages/Help\";\r\nimport { Help } from \"../components/Help/Help\";\r\nimport { InvestPage } from \"../pages/Invest\";\r\nimport { InvestorProfile } from \"../components/InvestorProfile/InvestorProfile\";\r\nimport { ProfileTest } from \"../components/ProfileTest/ProfileTest\";\r\nimport { ProfileTestAnswer } from \"../components/ProfileTestAnswer/ProfileTestAnswer\";\r\nimport { AccountProfileTest } from \"../components/Suitability/AccountProfileTest\";\r\nimport { Redirection } from \"../pages/Redirection\";\r\nimport { RedirectionPayments } from \"../pages/RedirectionPayments\";\r\nimport { InConstruction } from \"../components/InConstruction/InConstruction\";\r\nimport { Onboarding } from \"../pages/Onboarding\";\r\n\r\nimport LoginPage from \"../pages/Login\";\r\nimport { Autologin } from \"../pages/Autologin\";\r\nimport IconsPage from \"../pages/IconsPage\";\r\n\r\nexport const routes = (\r\n <Switch>\r\n <Route path=\"/login\" exact component={LoginPage} />\r\n <Route path=\"/autologin\" exact component={Autologin} />\r\n <MainLayout>\r\n <PrivateRoute path=\"/\" exact component={PortfolioPage} />\r\n <PrivateRoute path=\"/history\" exact component={HistoryPage} />\r\n <PrivateRoute path=\"/orders\" exact component={Orders} />\r\n <PrivateRoute path=\"/authorizations\" exact component={Authorizations} />\r\n <PrivateRoute path=\"/futureIncome\" exact component={FutureIncome} />\r\n <PrivateRoute path=\"/invest\" exact component={InvestPage} />\r\n <PrivateRoute path=\"/calendar\" exact component={MonthlyStates} />\r\n {/* <PrivateRoute path=\"/icons\" exact component={IconsPage} /> */}\r\n {/* <PrivateRoute path=\"/onboarding\" exact component={Onboarding} /> */}\r\n {/* <PrivateRoute path=\"/notifications\" exact component={Notifications} />\r\n <PrivateRoute path=\"/documentation\" exact component={ProfileInfo} /> */}\r\n {/* <PrivateRoute path=\"/myData\" exact component={MyData} />\r\n <PrivateRoute path=\"/investorProfile\" exact component={InvestorProfile} />\r\n <PrivateRoute path=\"/investorProfile/profileTest\" exact component={ProfileTest} />\r\n <PrivateRoute path=\"/investorProfile/profileTestAnswer\" exact component={ProfileTestAnswer} />\r\n <PrivateRoute path=\"/investorProfile/accountProfileTest\" exact component={AccountProfileTest} />\r\n <PrivateRoute path=\"/help\" exact component={Help} />\r\n <PrivateRoute path=\"/Detalles/ConfirmTransaction\" exact component={Redirection} />\r\n <PrivateRoute path=\"/Detalles/Confirmacion\" exact component={RedirectionPayments} /> */}\r\n </MainLayout>\r\n </Switch>\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(<Root store={store} />, document.getElementById(\"root\"));\r\n","import React, { Fragment, useState, useEffect } from \"react\";\r\nimport { Col, Row } from \"reactstrap\";\r\nimport AuthorizationComponent from \"../components/Authorization/AuthorizationComponent\";\r\nimport { PageWrapper } from \"../components/PageWrapper/PageWrapper\";\r\nimport { Header } from \"../components/Layout/Header/Header\";\r\nimport { Safearea } from \"../components/UI/Safearea/Safearea\";\r\n\r\nexport const Authorizations = () => {\r\n return (\r\n <Fragment>\r\n <Header title=\"Autorizaciones\" />\r\n <Safearea>\r\n <AuthorizationComponent />\r\n </Safearea>\r\n </Fragment>\r\n );\r\n};\r\n","import React, { Fragment } from \"react\";\r\nimport { Col, Row } from \"reactstrap\";\r\nimport { Autologin as AutologinComponent } from \"../components/Autologin/Autologin\";\r\n\r\nexport const Autologin = () => {\r\n const centerSpinner = {\r\n display: \"flex\",\r\n height: \"100vh\",\r\n alignItems: \"center\",\r\n justifyContent: \"center\",\r\n };\r\n\r\n return (\r\n <Fragment>\r\n <Row>\r\n <Col style={centerSpinner}>\r\n <AutologinComponent />\r\n </Col>\r\n </Row>\r\n </Fragment>\r\n );\r\n};\r\n","import React, { Fragment, useState, useEffect } from \"react\";\r\nimport { Col, Row } from \"reactstrap\";\r\nimport FutureIncomeComponent from \"../components/Layout/FutureIncomeComponent/FutureIncomeComponent\";\r\nimport { PageWrapper } from \"../components/PageWrapper/PageWrapper\";\r\nimport { Header } from \"../components/Layout/Header/Header\";\r\nimport { Safearea } from \"../components/UI/Safearea/Safearea\";\r\n\r\nexport const FutureIncome = () => {\r\n return (\r\n <React.Fragment>\r\n <Header title=\"Ingresos futuros\" />\r\n <Safearea>\r\n <FutureIncomeComponent title={\"Ingresos futuros\"}/>\r\n </Safearea>\r\n </React.Fragment>\r\n );\r\n};","import React, { Fragment, useState, useEffect } from \"react\";\r\nimport { Col, Row } from \"reactstrap\";\r\nimport { Help } from \"../components/Help/Help\";\r\nimport { PageWrapper } from \"../components/PageWrapper/PageWrapper\";\r\n\r\nexport const HelpPage = () => {\r\n return (\r\n <Fragment>\r\n <Row>\r\n <Col>\r\n {/*<PageWrapper title=\"Ayuda\">*/}\r\n <Help />\r\n {/*</PageWrapper>*/}\r\n </Col>\r\n </Row>\r\n </Fragment>\r\n );\r\n};\r\n","import React from \"react\";\r\n\r\nimport { HistoryForm } from \"../components/HistoryForm/HistoryForm\";\r\nimport { Safearea } from \"../components/UI/Safearea/Safearea\";\r\nimport { Header } from \"../components/Layout/Header/Header\";\r\n\r\nexport const HistoryPage = () => {\r\n return (\r\n <React.Fragment>\r\n <Header title=\"Historico\" />\r\n <Safearea>\r\n <HistoryForm />\r\n </Safearea>\r\n </React.Fragment>\r\n );\r\n};\r\n","import React, { Fragment } from \"react\";\r\nimport { Col, Row } from \"reactstrap\";\r\nimport { Icons } from \"../components/UI/Icon/Icon\";\r\nimport { showToast } from \"../utils/helper\";\r\n\r\nexport const IconsPage = () => {\r\n const iconKeys = Object.keys(Icons);\r\n\r\n const handleCopyToClipboard = (iconName) => {\r\n const iconUsage = `<Icons.${iconName} size=\"md\" />`;\r\n navigator.clipboard\r\n .writeText(iconUsage)\r\n .then(() => {\r\n // alert(`Copied to clipboard: ${iconUsage}`);\r\n showToast(`Copied to clipboard: ${iconUsage}`);\r\n })\r\n .catch((err) => {\r\n console.error(\"Failed to copy text: \", err);\r\n });\r\n };\r\n\r\n return (\r\n <div style={{ padding: 24 }}>\r\n <Row>\r\n {iconKeys.map((key) => {\r\n const IconComponent = Icons[key];\r\n return (\r\n <Col key={key} xs=\"6\" sm=\"4\" md=\"3\" lg=\"2\">\r\n <div\r\n onClick={() => handleCopyToClipboard(key)}\r\n style={{\r\n textAlign: \"center\",\r\n marginBottom: \"20px\",\r\n boxShadow: \"rgba(0, 0, 0, 0.35) 0px 5px 15px\",\r\n padding: 16,\r\n borderRadius: 8,\r\n }}\r\n >\r\n <span>{key}</span>\r\n <div>\r\n <IconComponent size=\"md\" />\r\n </div>\r\n </div>\r\n </Col>\r\n );\r\n })}\r\n </Row>\r\n </div>\r\n );\r\n};\r\n\r\nexport default IconsPage;\r\n","import React, { Fragment, useState, useEffect } from \"react\";\r\nimport { Col, Row } from \"reactstrap\";\r\nimport { PageWrapper } from \"../components/PageWrapper/PageWrapper\";\r\nimport { Invest } from \"../components/Invest/Invest\";\r\nimport { Safearea } from \"../components/UI/Safearea/Safearea\";\r\nimport { Header } from \"../components/Layout/Header/Header\";\r\n\r\nexport const InvestPage = () => {\r\n return (\r\n <Fragment>\r\n <Header title=\"Invertir\" />\r\n <Safearea>\r\n <Invest />\r\n </Safearea>\r\n </Fragment>\r\n );\r\n};\r\n","import Login from \"./../components/Auth/Login2\";\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\nimport { Header } from \"../components/Layout/Header/Header\";\r\n\r\nexport const MonthlyStates = () => {\r\n return (\r\n <React.Fragment style={{ padding: \"0\" }}>\r\n <Header title={\"Reportes mensuales\"}></Header>\r\n <MonthlyStateComponent title={\"Reportes mensuales\"} />\r\n </React.Fragment>\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 <PageWrapper title=\"Notificaciones\">\r\n <NotificationsCard />\r\n </PageWrapper>\r\n);\r\n","import React, { Fragment, useState, useEffect } from \"react\";\r\nimport { Col, Row } from \"reactstrap\";\r\nimport AuthorizationComponent from \"../components/Authorization/AuthorizationComponent\";\r\nimport { PageWrapper } from \"../components/PageWrapper/PageWrapper\";\r\nimport { CloseCustodianEntity } from \"bx-react-ui/src/components/Modal/CounterPartySet/reducer\";\r\n\r\nimport SidebarOnboarding from \"../components/SidebarOnboarding/Sidebaronboarding\";\r\n\r\nexport const Onboarding = () => {\r\n return (\r\n <div style={{width: 'vw', height: 'vh', top: 0, left: 0, zIndex: 1049, position: 'absolute'}}>\r\n <SidebarOnboarding title={\"Sidebar Onboarding\"}></SidebarOnboarding>\r\n </div>\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\nimport { Safearea } from \"../components/UI/Safearea/Safearea\";\r\nimport { Header } from \"../components/Layout/Header/Header\";\r\n\r\nexport const Orders = () => {\r\n return (\r\n <Fragment>\r\n <Header title=\"Órdenes en proceso\" />\r\n <Safearea>\r\n <OrdersComponent />\r\n </Safearea>\r\n </Fragment>\r\n );\r\n};\r\n","import React from \"react\";\r\n\r\nimport { Safearea } from \"../components/UI/Safearea/Safearea\";\r\nimport { Portfolio } from \"../components/Portfolio/Portfolio\";\r\nimport { Header } from \"../components/Layout/Header/Header\";\r\n\r\nexport const PortfolioPage = () => (\r\n <React.Fragment>\r\n <Header title=\"Portafolio\" />\r\n <Safearea>\r\n <Portfolio />\r\n </Safearea>\r\n </React.Fragment>\r\n);\r\n","import React, { Fragment } from \"react\";\r\nimport { Col, Row } from \"reactstrap\";\r\nimport { PageWrapper } from \"../components/PageWrapper/PageWrapper\";\r\nimport { ProfileInfoForm } from \"../components/ProfileInfoForm/ProfileInfoForm\";\r\n\r\nexport const ProfileInfo = () => {\r\n return (\r\n <Fragment>\r\n <Row>\r\n <Col>\r\n <PageWrapper title=\"Documentación\">\r\n <ProfileInfoForm />\r\n </PageWrapper>\r\n </Col>\r\n </Row>\r\n </Fragment>\r\n );\r\n};\r\n","import React, { Fragment, useState, useEffect } from \"react\";\r\nimport { Col, Row } from \"reactstrap\";\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\nimport { Redirect } from \"react-router-dom\";\r\n\r\nimport { validateTransactionalAuthCode } from \"../services/api/authorizations\";\r\nimport { getRedirectionData } from \"../services/api/entities\";\r\nimport { setSessionRedirectionData } from \"../utils/handleRedirectionData\";\r\nimport { setRedirectionData as setRedirectionDataAPI } from \"../services/api/entities\";\r\nimport { showToast } from \"../utils/helper\";\r\nimport { useQuery } from \"../utils/hooks/useQuery\";\r\n\r\nexport const Redirection = React.memo(() => {\r\n const [redirectTo, setRedirectTo] = useState(false);\r\n let query = useQuery();\r\n\r\n useEffect(() => {\r\n const auth_code = query.get(\"auth_code\");\r\n const pre_pin_validation_token = query.get(\"pre_pin_validation_token\");\r\n\r\n getRedirectionData({ redirectionId: pre_pin_validation_token })\r\n .then(({ response: redirectionResponse }) => {\r\n if (redirectionResponse.found) {\r\n const redirectData = redirectionResponse.redirectionData;\r\n\r\n validateTransactionalAuthCode({ auth_code })\r\n .then(({ response }) => {\r\n if (!response.pin_valid) {\r\n showToast(\"Código de autorización inválido.\");\r\n setRedirectTo({\r\n url: \"/\",\r\n data: {},\r\n });\r\n } else {\r\n setRedirectionDataAPI({});\r\n\r\n if (redirectData.id === pre_pin_validation_token) {\r\n switch (redirectData.data.type) {\r\n case \"Authorization\":\r\n setRedirectTo({\r\n url: \"/authorizations\",\r\n data: redirectData.data.payload,\r\n });\r\n break;\r\n case \"FirstAccess\":\r\n case \"InternalMessage\":\r\n case \"Popup\":\r\n case \"Contract\":\r\n break;\r\n default:\r\n showToast(\"Tipo de autorización incorrecto.\");\r\n setRedirectTo({\r\n url: \"/\",\r\n data: {},\r\n });\r\n }\r\n } else {\r\n showToast(\"Código de redirección inválido.\");\r\n setRedirectTo(\"/\");\r\n }\r\n }\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n showToast(\"Error validando código de autorización.\");\r\n setRedirectTo(\"/\");\r\n })\r\n .finally(() => {\r\n setSessionRedirectionData(false);\r\n });\r\n } else {\r\n showToast(\"Error obteniendo información de redirección\", true);\r\n setRedirectTo({\r\n url: \"/\",\r\n data: {},\r\n });\r\n }\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n showToast(\"Error obteniendo información de redirección\", true);\r\n });\r\n }, []);\r\n\r\n if (redirectTo) {\r\n return (\r\n <Redirect\r\n to={{\r\n pathname: redirectTo.url,\r\n state: { redirectionData: redirectTo.data },\r\n }}\r\n />\r\n );\r\n }\r\n\r\n return (\r\n <Fragment>\r\n <Row>\r\n <Col>\r\n <h1>Redireccionando...</h1>\r\n </Col>\r\n </Row>\r\n </Fragment>\r\n );\r\n});\r\n","import React, { Fragment, useState, useEffect } from \"react\";\r\nimport { Col, Row } from \"reactstrap\";\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\nimport { Redirect } from \"react-router-dom\";\r\n\r\nimport { validatePaymentAuthCode } from \"../services/api/authorizations\";\r\nimport { getRedirectionData } from \"../services/api/entities\";\r\nimport { setSessionRedirectionData } from \"../utils/handleRedirectionData\";\r\nimport { setRedirectionData as setRedirectionDataAPI } from \"../services/api/entities\";\r\nimport { showToast } from \"../utils/helper\";\r\nimport { useQuery } from \"../utils/hooks/useQuery\";\r\n\r\nexport const RedirectionPayments = () => {\r\n const [redirectTo, setRedirectTo] = useState(false);\r\n let query = useQuery();\r\n\r\n useEffect(() => {\r\n // http://localhost:8080/#/Detalles/Confirmacion?auth_code=authCodeResultante987&pre_transaction_id=1234\r\n const auth_code = query.get(\"auth_code\");\r\n const pre_transaction_id = query.get(\"pre_transaction_id\");\r\n\r\n getRedirectionData({ redirectionId: pre_transaction_id })\r\n .then(({ response: redirectionResponse }) => {\r\n if (redirectionResponse.found) {\r\n const redirectData = redirectionResponse.redirectionData;\r\n\r\n validatePaymentAuthCode({ auth_code })\r\n .then(({ response }) => {\r\n if (!response.valid_payment) {\r\n showToast(\"Código de autorización inválido.\");\r\n setRedirectTo({\r\n url: \"/\",\r\n data: {},\r\n });\r\n } else {\r\n setRedirectionDataAPI({});\r\n\r\n if (redirectData.id === pre_transaction_id) {\r\n switch (redirectData.data.type) {\r\n case \"Offer\":\r\n setRedirectTo({\r\n url: \"/invest\",\r\n data: redirectData.data.payload,\r\n });\r\n break;\r\n default:\r\n showToast(\"Tipo de autorización incorrecto.\");\r\n setRedirectTo({\r\n url: \"/\",\r\n data: {},\r\n });\r\n }\r\n } else {\r\n showToast(\"Código de redirección inválido.\");\r\n setRedirectTo(\"/\");\r\n }\r\n }\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n showToast(\"Error validando código de autorización.\");\r\n setRedirectTo(\"/\");\r\n })\r\n .finally(() => {\r\n setSessionRedirectionData(false);\r\n });\r\n } else {\r\n showToast(\"Error obteniendo información de redirección\", true);\r\n setRedirectTo({\r\n url: \"/\",\r\n data: {},\r\n });\r\n }\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n showToast(\"Error obteniendo información de redirección\", true);\r\n });\r\n }, []);\r\n\r\n if (redirectTo) {\r\n return (\r\n <Redirect\r\n to={{\r\n pathname: redirectTo.url,\r\n state: { redirectionData: redirectTo.data },\r\n }}\r\n />\r\n );\r\n }\r\n\r\n return (\r\n <Fragment>\r\n <Row>\r\n <Col>\r\n <h1>Redireccionando...</h1>\r\n </Col>\r\n </Row>\r\n </Fragment>\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 <Provider store={props.store}>\r\n <IntlProvider locale=\"es\">\r\n <React.Fragment>\r\n <LegalContracts />\r\n <AppInfoWrapper>\r\n <HashRouter>{routes}</HashRouter>\r\n </AppInfoWrapper>\r\n </React.Fragment>\r\n </IntlProvider>\r\n </Provider>\r\n );\r\n};\r\n\r\nexport default Root;\r\n","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 CREATING_USER,\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 creatingUser: false,\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 };\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 creatingUser: false,\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 creatingUser: false,\r\n };\r\n },\r\n [CREATING_USER](state, action) {\r\n return {\r\n ...state,\r\n creatingUser: 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 portfolio_actual_price: \"\",\r\n portfolio_nominal_value: \"\",\r\n portfolio_investment_cost: \"\",\r\n portfolio_pl: \"\",\r\n portfolio_trt: \"\",\r\n portfolio_ytm: \"\",\r\n portfolio_percentage: \"\",\r\n sell_quote: \"\",\r\n invest_isin: \"\",\r\n invest_performance: \"\",\r\n invest_coupon_rate: \"\",\r\n invest_maturity_date: \"\",\r\n invest_commission: \"\",\r\n invest_charges: \"\",\r\n },\r\n notes: {\r\n history_note: \"\",\r\n orders_note: \"\",\r\n authorizations_note: \"\",\r\n future_note: \"\",\r\n statements_note: \"\",\r\n sen_warning_bold: \"\",\r\n sen_warning_text: \"\",\r\n help_text: \"\",\r\n footer_line_1: \"\",\r\n footer_line_2: \"\",\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 getTexts = (state) => state.entities.texts || null;\r\n\r\nexport const getTextsLoading = (state) => state.entities.textsLoading || false;\r\n\r\nexport const getAuthorizations = (state) => state.entities.authorizations || [];\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};\r\n\r\nconst getAuthStatus = () => {\r\n return sessionStorage.getItem(\"authenticated\") == \"true\" ? true : false;\r\n};\r\n\r\nexport const setUserContext = (context) => {\r\n sessionStorage.setItem(\"context\", JSON.stringify(context));\r\n};\r\n\r\nexport const setAuthStatus = (status) => {\r\n if (status == false) {\r\n setUserContext({});\r\n }\r\n\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 } = yield call(authorize, credentials);\r\n\r\n if (isLoginOk) {\r\n isAuthenticated = true;\r\n\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 if (_response) {\r\n if (_response.result == 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 } else {\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 config from \"./../config/config\";\r\nimport JSEncrypt from \"jsencrypt/bin/jsencrypt.min.js\";\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 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 preLogin = (credentials) => {\r\n const encrypt = new JSEncrypt();\r\n\r\n return callApi(\"user/preLogin\", 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.publicKey = response.publicKey;\r\n\r\n return credentials;\r\n });\r\n};\r\n\r\nexport const preAuthService = (credentials) =>\r\n callApi(\"user/preExternalLogin\", { ...credentials, version: 2 }, \"POST\");\r\n\r\nexport const authService = (credentials) => {\r\n const encrypt = new JSEncrypt();\r\n\r\n return callApi(\"user/preLogin\", 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 return callApi(\r\n \"user/externalLogin\",\r\n { ...credentials, version: 2, publicKey: response.publicKey },\r\n \"POST\"\r\n );\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/${encodeURI(cuenta)}/portfolio?date=${date}&v2=true&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) =>\r\n callApi(\r\n \"orders/inprocesspdf\",\r\n { ...payload, timezone: Intl.DateTimeFormat().resolvedOptions().timeZone },\r\n \"POST\"\r\n );\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 getBankAccountBalance = (payload) => callApi(\"person/bankAccounts/balance\", payload, \"POST\");\r\n","import { callApi } from \"../api\";\r\n\r\nexport const getAuthorizations = () => 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 fetchCorexBuildVersion = () => {\r\n return callApi(\"corexBuildVersion\", null, \"GET\");\r\n};\r\n\r\nexport const fetchApiBuildVersion = () => {\r\n return callApi(\"apiBuildVersion\", null, \"GET\");\r\n};\r\n\r\nexport const fetchTooltipsAndNotes = () => {\r\n return callApi(\"tooltips\", null, \"GET\");\r\n};\r\n\r\nexport const getAssetAttachment = (body) => callApi(\"assetAttachment\", body, \"POST\");\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) =>\r\n callApi(`fundstoinvest`, { accountId, timezone: Intl.DateTimeFormat().resolvedOptions().timeZone }, \"POST\");\r\n\r\nexport const updateFund = (body) => callApi(`funds`, body, \"POST\");\r\n\r\nexport const getPrechecks = (body) => callApi(`prechecks`, body, \"POST\");\r\n","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\r\nexport const confirmFirstAccess = (body) => callApi(\"firstaccess\", 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\r\nexport const getPersonBankAccount = (body) => callApi(\"person/bankAccounts\", body, \"GET\");\r\n\r\nexport const setClientBankAccounts = (body) => callApi(\"client/bankAccounts\", body, \"POST\");\r\n\r\nexport const updatePerson = (body) => callApi(\"onboarding/update\", body, \"POST\");\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 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\nexport default function configureStore(initialState) {\r\n const sagaMiddleware = createSagaMiddleware();\r\n\r\n const store = createStore(rootReducer, initialState, applyMiddleware(sagaMiddleware));\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(request[1].hasOwnProperty(\"body\") ? request[1].body : {}),\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(<DebugTools.ModalError error={error} />, modalError);\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, useCallback } 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 { useInterval } from \"bx-react-ui/src/utils/hooks\";\r\nimport { CircularProgress } from \"../components/UI/CircularProgress/CircularProgress\";\r\nimport {\r\n getCurrentAccount,\r\n getAuthorizationsLoaded,\r\n getNotifications,\r\n getNotificationsLoaded,\r\n getNotificationsLoading,\r\n getSession,\r\n getTexts,\r\n getTextsLoading,\r\n} 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 { PopupWrapper } from \"../components/PopupWrapper/PopupWrapper\";\r\nimport { fetchTooltipsAndNotes } from \"../services/api/entities\";\r\n\r\nimport style from \"./AppInfoWrapper.scss\";\r\nimport { Container } from \"../components/UI/Container/Container\";\r\nimport { Icons } from \"../components/UI/Icon/Icon\";\r\nimport GenericButton from \"../components/UI/Button/Button\";\r\nimport downloadIcon from \"../../public/svg/ButtonIcons/download.svg\";\r\n\r\nconst updateAuthorizations = (dispatch) => {\r\n getAuthorizations()\r\n .then(({ response }) => {\r\n const newAuthorizations = response.authorizations.filter((authItem) => authItem.processedBy === \"\");\r\n dispatch(authorizationsSuccess(newAuthorizations));\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n showToast(\"Error obteniendo autorizaciones del servidor\", true);\r\n dispatch(authorizationsSuccess([]));\r\n });\r\n};\r\n\r\nexport const AppInfoWrapper = React.memo(({ children }) => {\r\n const dispatch = useDispatch();\r\n\r\n const authorizationsLoaded = useSelector(getAuthorizationsLoaded);\r\n const notificationsLoaded = useSelector(getNotificationsLoaded);\r\n const notificationsLoading = useSelector(getNotificationsLoading);\r\n const notifications = useSelector(getNotifications);\r\n\r\n const session = useSelector(getSession);\r\n const textsLoading = useSelector(getTextsLoading);\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 const [loadingAbsolute, setLoadingAbsolute] = useState(true);\r\n const [isFirstAccess, setIsFirstAccess] = useState(false);\r\n\r\n useEffect(() => {\r\n if (notifications) {\r\n notifications.map((notification) => {\r\n if (notification.InternalMessageForm === \"FirstAccess\") {\r\n setIsFirstAccess(() => true);\r\n setLoadingAbsolute(() => false);\r\n }\r\n });\r\n }\r\n }, [notifications]);\r\n\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 useEffect(() => {\r\n if (!contractLoading && session && notifications && !contract && !contractLoaded) {\r\n updateLegalContract();\r\n }\r\n }, [session]);\r\n\r\n useEffect(() => {\r\n if (!notificationsLoaded && !notificationsLoading && session) {\r\n updateMessages();\r\n }\r\n }, [session, notificationsLoaded, notificationsLoading]);\r\n\r\n useEffect(() => {\r\n if ((notificationsLoaded && !notificationsLoading && authorizationsLoaded && session) || !session) {\r\n setLoadingAbsolute(() => false);\r\n }\r\n }, [session, notificationsLoaded, notificationsLoading, authorizationsLoaded]);\r\n\r\n const updateMessages = () => {\r\n dispatch(setNotificationsLoading(true));\r\n getMessages()\r\n .then(({ response }) => {\r\n dispatch(notificationsSuccess(response.InternalMessageSDTList));\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n showToast(\"Error obteniendo notificaciones del servidor\", true);\r\n dispatch(notificationsSuccess([]));\r\n });\r\n };\r\n\r\n const updateLegalContract = () => {\r\n let stopCheckContract = false;\r\n notifications.map((notificationItem) => {\r\n if (notificationItem.InternalMessageForm === \"FirstAccess\") {\r\n stopCheckContract = true;\r\n }\r\n });\r\n\r\n if (!stopCheckContract) {\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 } else {\r\n setContract(null);\r\n setContractLoading(() => false);\r\n }\r\n };\r\n\r\n if (loadingAbsolute)\r\n return (\r\n <div\r\n style={{\r\n display: \"flex\",\r\n justifyContent: \"center\",\r\n alignItems: \"center\",\r\n zIndex: 9999,\r\n height: \"100vh\",\r\n }}\r\n >\r\n <Authorizations />\r\n <CircularProgress />\r\n </div>\r\n );\r\n\r\n if (isFirstAccess) {\r\n return <PopupWrapper>{children}</PopupWrapper>;\r\n }\r\n\r\n return (\r\n <React.Fragment>\r\n <Authorizations />\r\n {children}\r\n </React.Fragment>\r\n );\r\n});\r\n\r\nconst Authorizations = () => {\r\n const session = useSelector(getSession);\r\n const authorizationsLoaded = useSelector(getAuthorizationsLoaded);\r\n const [authorizationsLoading, setAuthorizationsLoading] = useState(false);\r\n const dispatch = useDispatch();\r\n\r\n useInterval(() => {\r\n if (session) {\r\n updateAuthorizations(dispatch);\r\n }\r\n }, 30e4);\r\n\r\n useEffect(() => {\r\n if (!authorizationsLoaded && session && !authorizationsLoading) {\r\n setAuthorizationsLoading(() => true);\r\n updateAuthorizations(dispatch);\r\n }\r\n }, [session, authorizationsLoaded, authorizationsLoading]);\r\n\r\n return null;\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"content\":\"AppInfoWrapper_content_271jq\",\"contractModal\":\"AppInfoWrapper_contractModal_2UHWZ\",\"header\":\"AppInfoWrapper_header_1KkOM\",\"title\":\"AppInfoWrapper_title_3YEJG\",\"contract\":\"AppInfoWrapper_contract_t01et\",\"subTitle\":\"AppInfoWrapper_subTitle_7hQg3\",\"orangeText\":\"AppInfoWrapper_orangeText_1e5DG\",\"footer\":\"AppInfoWrapper_footer_353Wg\",\"button\":\"AppInfoWrapper_button_V6HWe\",\"attachment\":\"AppInfoWrapper_attachment_uuMGQ\",\"loadingWrapper\":\"AppInfoWrapper_loadingWrapper_26LVv\",\"modalWrapper\":\"AppInfoWrapper_modalWrapper_Pa2OA\",\"contractContainer\":\"AppInfoWrapper_contractContainer_3djo7\",\"contractTitle\":\"AppInfoWrapper_contractTitle_1U_Mp\",\"divider\":\"AppInfoWrapper_divider_15R9x\",\"buttonConfirmContract\":\"AppInfoWrapper_buttonConfirmContract_3f8id\",\"text\":\"AppInfoWrapper_text_1kCnQ\",\"contractFileCard\":\"AppInfoWrapper_contractFileCard_2h35G\",\"boxContract\":\"AppInfoWrapper_boxContract_iSJUC\",\"downloadPdf\":\"AppInfoWrapper_downloadPdf_3BRWe\",\"chekboxContract\":\"AppInfoWrapper_chekboxContract_2iHKf\",\"textAcceptContract\":\"AppInfoWrapper_textAcceptContract_nghmg\"};","// Sizes in px\r\nexport const sizes = {\r\n sm: 16,\r\n md: 24,\r\n lg: 32,\r\n xl: 48,\r\n xxl: 72,\r\n xxxl: 80,\r\n};\r\n\r\n// Spaces in px\r\nexport const spaces = {\r\n sm: 16,\r\n md: 24,\r\n lg: 32,\r\n lg: 48,\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\nimport { Icons } from \"../components/UI/Icon/Icon\";\r\n\r\nimport style from \"./helper.scss\";\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 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 info(msg, options = {}) {\r\n return toast(\r\n <div className={style.toast}>\r\n <Icons.InformationIcon size=\"md\" />\r\n <span className={style.msg}>{msg}</span>\r\n <Icons.Close size=\"sm\" className={style.icon} />\r\n </div>,\r\n {\r\n ...options,\r\n className: css({\r\n background: \"#FFFFFF\",\r\n borderRadius: 15.63,\r\n padding: 20.85,\r\n border: \"solid #004799 1px\",\r\n }),\r\n hideProgressBar: true,\r\n closeButton: false,\r\n }\r\n );\r\n },\r\n error(msg, options = {}) {\r\n return toast(\r\n <div className={style.toast}>\r\n <Icons.ErrorIcon size=\"md\" />\r\n <span className={style.msg}>{msg}</span>\r\n <Icons.Close size=\"sm\" className={style.icon} />\r\n </div>,\r\n {\r\n ...options,\r\n className: css({\r\n background: \"#FFFFFF\",\r\n borderRadius: 15.63,\r\n padding: 20.85,\r\n color: \"#ffffff\",\r\n border: \"solid #99173C 1px\",\r\n }),\r\n hideProgressBar: true,\r\n closeButton: false,\r\n }\r\n );\r\n },\r\n success(msg, options = {}) {\r\n return toast(\r\n <div className={style.toast}>\r\n <Icons.SuccessIcon size=\"md\" />\r\n <span className={style.msg}>{msg}</span>\r\n <Icons.Close size=\"sm\" className={style.icon} />\r\n </div>,\r\n {\r\n ...options,\r\n className: css({\r\n background: \"#FFFFFF\",\r\n borderRadius: 15.63,\r\n padding: 20.85,\r\n color: \"#ffffff\",\r\n border: \"solid #146542 1px\",\r\n }),\r\n hideProgressBar: true,\r\n closeButton: false,\r\n }\r\n );\r\n },\r\n warning(msg, options = {}) {\r\n return toast(\r\n <div className={style.toast}>\r\n <Icons.WarningIcon size=\"md\" />\r\n <span className={style.msg}>{msg}</span>\r\n <Icons.Close size=\"sm\" className={style.icon} />\r\n </div>,\r\n {\r\n ...options,\r\n className: css({\r\n background: \"#FFFFFF\",\r\n borderRadius: 15.63,\r\n padding: 20.85,\r\n color: \"#ffffff\",\r\n border: \"solid #664400 1px\",\r\n }),\r\n hideProgressBar: true,\r\n closeButton: false,\r\n }\r\n );\r\n },\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"toast\":\"helper_toast_3ufkN\",\"msg\":\"helper_msg_37MSE\",\"icon\":\"helper_icon_2ELAl\"};","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":""}