{"version":3,"sources":["../public/NSCOMEX-LOGO.png","../public/donation2.png","../public/NSCOMEX-LOGO-front.png","data/models.ts","data/snackbar/snackbarDataSlice.ts","data/auth/authDataSlice.ts","core/localization/types.ts","data/initialData/initialDataReducer.ts","data/listing/employees/employeesDataReducer.ts","data/listing/clients/clientsDataReducer.ts","data/listing/roles/rolesDataReducer.ts","data/listing/users/usersDataReducer.ts","data/listing/products/productsDataReducer.ts","data/listing/productGroups/productGroupDataReducer.ts","data/listing/banks/banksDataReducer.ts","data/listing/warehouses/warehousesDataReducer.ts","data/listing/attributes/attributeDataReducer.ts","data/listing/currencies/currenciesDataReducer.ts","data/listing/regions/regionsDataReducer.ts","data/listing/curencyRates/currencyRatesDataReducer.ts","data/listing/countries/countriesDataReducer.ts","data/listing/cities/citiesDataReducer.ts","data/listing/commissions/commissionsDataReducer.ts","data/listing/payTypes/payTypesDataReducer.ts","data/listing/listingDataReducer.ts","data/trading/mainBoard/ordersDataSlice.ts","data/trading/trades/tradesDataSlice.ts","data/trading/orderBook/orderBookDataSlice.ts","data/trading/ticker/tickerDataSlice.ts","data/trading/tradingDataReducer.ts","data/clearing/payments/paymentsDataSlice.ts","data/clearing/ctrlgoods/ctrlGoodsDataSlice.ts","data/clearing/delivery/deliveryDataSlice.ts","data/clearing/dispute/disputeDataSlice.ts","data/clearing/guarantees/guaranteesDataSlice.ts","data/clearing/stockfees/stockFeesDataReducer.ts","data/clearing/transportfees/transportFeesDataReducer.ts","data/clearing/transportAndStorage/TASDataSlice.ts","data/clearing/tradingData/tradingDataSlice.ts","data/clearing/marginsData/marginsDataSlice.ts","data/clearing/bankguarantees/bankguaranteesDataSlice.ts","data/clearing/clearingDataReducer.ts","data/reports/ordersReport/ordersReportDataSlice.ts","data/reports/tradesReport/tradesReportDataSlice.ts","data/reports/tradesReportClientAll/tradesReportDataSliceAll.ts","data/reports/dailyTrade/dailyTradeDataSlice.ts","data/reports/weeklyTrade/weeklyTradeDataSlice.ts","data/reports/monthlyTrade/monthlyTradeDataSlice.ts","data/reports/annualTrade/annualTradeDataSlice.ts","data/reports/securityCommission/monthlyTrade/monthlyTradeDataSlice.ts","data/reports/securityCommission/securityDaily/dailySecurityDataSlice.ts","data/reports/securityCommission/securityAnnual/annualSecurityDataSlice.ts","data/reports/securityCommission/securityQuarterly/quarterlySecurityDataSlice.ts","data/reports/securityCommission/securityCommissionReportDataReducer.ts","data/reports/amlaundering/amlaunderingDataSlice.ts","data/reports/exmember/exchangeMemberDataSlice.ts","data/reports/exchbusiness/memberContracts/memberContractsDataSlice.ts","data/reports/exchbusiness/tradeReview/tradeReviewDataSlice.ts","data/reports/exchbusiness/tradeByProducts/tradeByProductsDataSlice.ts","data/reports/exchbusiness/tradeByClients/tradeByClientsDataSlice.ts","data/reports/exchbusiness/tradeByBrokers/tradeByBrokersDataSlice.ts","data/reports/exchbusiness/weightedPrices/weightedPriceDataSlice.ts","data/reports/exchbusiness/businessActivities/businessActivitiesDataSlice.ts","data/reports/exchbusiness/commReview/commReviewDataSlice.ts","data/reports/exchbusiness/clientOverview/clientOverviewDataSlice.ts","data/reports/exchbusiness/exchBusinessDataReducer.ts","data/reports/news/newsDataReducer.ts","data/reports/notifications/notificationDataSlice.ts","data/reports/reportsDataRecucer.ts","data/accounting/createInvoices/createInvoicesDataSlice.ts","data/accounting/invoices/invoicesDataSlice.ts","data/accounting/accountingOrder/accountingOrderDataSlice.ts","data/accounting/accountingDataReducer.ts","data/surveillance/alarmParameters/alarmDataSlice.ts","data/surveillance/surveillanceDataReducer.ts","data/dataReducer.ts","data/auth/authUXSlice.ts","data/localization/localizationUXSlice.ts","data/reports/exchbusiness/clientOverview/types.ts","data/trading/mainBoard/ordersUXSlice.ts","data/trading/trades/tradesUXSlice.ts","data/trading/orderBook/orderBookUXSlice.ts","data/trading/ticker/tickerUXSlice.ts","data/trading/tradingUXReducer.ts","data/clearing/payments/paymentsUXSlice.ts","data/clearing/ctrlgoods/ctrlGoodsUXSlice.ts","data/clearing/delivery/deliveryUXSlice.ts","data/clearing/dispute/disputeUXSlice.ts","data/clearing/guarantees/guaranteesUXSlice.ts","data/clearing/transportAndStorage/TASUXSlice.ts","data/clearing/tradingData/tradingUXSlice.ts","data/clearing/marginsData/marginsUXSlice.ts","data/clearing/bankguarantees/bankguaranteesUXSlice.ts","data/clearing/clearingUXReducer.ts","data/reports/ordersReport/ordersReportUXSlice.ts","data/reports/tradesReport/tradesReportUXSlice.ts","data/reports/tradesReportClientAll/tradesReportUXSliceAll.ts","data/reports/dailyTrade/dailyTradeUXSlice.ts","data/reports/weeklyTrade/weeklyTradeUXSlice.ts","data/reports/monthlyTrade/monthlyTradeUXSlice.ts","data/reports/annualTrade/annualTradeUXSlice.ts","data/reports/securityCommission/monthlyTrade/monthlyTradeUXSlice.ts","data/reports/securityCommission/securityDaily/dailySecurityUXSlice.ts","data/reports/securityCommission/securityAnnual/annualSecurityUXSlice.ts","data/reports/securityCommission/securityQuarterly/quarterlySecurityUXSlice.ts","data/reports/securityCommission/securityCommissionReportUXReducer.ts","data/reports/amlaundering/amlaunderingUXSlice.ts","data/reports/exchbusiness/tradeReview/tradeReviewUXSlice.ts","data/reports/exchbusiness/tradeByProducts/tradeByProductsUXSlice.ts","data/reports/exchbusiness/tradeByClients/tradeByClientsUXSlice.ts","data/reports/exchbusiness/tradeByBrokers/tradeByBrokersUXSlice.ts","data/reports/exchbusiness/weightedPrices/weightedPriceUXSlice.ts","data/reports/exchbusiness/businessActivities/businessActivitiesUXSlice.ts","data/reports/exchbusiness/commReview/commReviewUXSlice.ts","data/reports/exchbusiness/memberContracts/memberContractsUXSlice.ts","data/reports/exchbusiness/clientOverview/clientOverviewUXSlice.ts","data/reports/exchbusiness/exchBusinessUXReducer.ts","data/reports/exmember/exchangeMemberUXSlice.ts","data/reports/notifications/notificationUXSlice.ts","data/reports/news/newsUXSlice.ts","data/reports/reportsUXRecucer.ts","data/accounting/createInvoices/createInvoicesUXSlice.ts","data/accounting/invoices/invoicesUXSlice.ts","data/accounting/accountingOrder/accountingOrderUXSlice.ts","data/accounting/accountingUXReducer.ts","data/surveillance/alarmParameters/alarmUXSlice.ts","data/surveillance/surveillanceUXReducer.ts","data/uxReducer.ts","core/store/reducers.ts","core/config/config.ts","core/store/store.ts","core/store/StoreProvider.tsx","data/localization/hooks.ts","core/localization/srTranslation.ts","core/localization/srErrors.ts","core/localization/enTranslations.ts","core/localization/enErrors.ts","core/localization/Localization.tsx","core/localization/translations.ts","core/util/functions.ts","core/util/hooks.ts","layout/MainBarStyles.ts","core/http/axiosInstance.ts","core/http/types.ts","core/http/httpThunks.ts","data/auth/api/firstLogin.ts","data/auth/api/login.ts","data/auth/thunks.ts","data/auth/hooks.ts","layout/UserAvatarStyle.ts","core/util/useCapacitorAppState.tsx","core/notifications/ConnectionManager.ts","core/notifications/NotificationContext.tsx","core/util/useMoblieApp.ts","core/notifications/hooks.ts","core/notifications/NotificationsManager.ts","core/util/increment.ts","core/navigation/types.ts","layout/UserAvatar.tsx","layout/MainBar.tsx","core/navigation/menuItemsStyles.ts","core/navigation/hooks.ts","core/navigation/MenuItemComponents.tsx","views/components/common/Table.tsx","views/components/common/useMaterialTableLocalization.ts","data/listing/attributes/api/getAllAttributes.ts","data/listing/attributes/types.ts","data/listing/attributes/hooks/useAttributeData.ts","data/listing/attributes/thunks/loadAllAttributes.ts","views/components/common/DisplayBoolNumber.tsx","views/listing/attributes/DisplayAttribute.tsx","data/listing/attributes/api/getAttribute.ts","data/listing/attributes/thunks/loadAttribute.ts","data/listing/attributes/hooks/useDisplayAttribute.ts","layout/DisplayDrawerContext.ts","views/useDisplaySingleEmementStyles.tsx","views/listing/attributes/DisplayAttributeBasicInfo.tsx","data/listing/attributes/api/attributeValues/getAllAttributeValues.ts","data/listing/attributes/thunks/attributeValues/loadAttributeValues.ts","data/listing/attributes/hooks/attributeValues/useAttributeValuesData.ts","views/listing/attributes/attributeValues/DisplayAttributeValues.tsx","views/listing/attributes/Locations.ts","data/listing/attributes/api/deleteAttribute.ts","data/listing/attributes/hooks/useAttributeDelete.ts","data/listing/attributes/thunks/deleteAttribute.ts","views/listing/attributes/useAttributeActions.tsx","views/components/common/CustomDialog.tsx","views/listing/attributes/AttributeTable.tsx","views/listing/attributes/useAttributeColumns.tsx","views/pageStyles.tsx","views/components/common/SearchBox.tsx","core/util/storeHooks.ts","views/components/common/PageTitle.tsx","views/listing/attributes/AttributePage.tsx","data/listing/attributes/hooks/useAttributeSearch.ts","data/listing/attributes/hooks/useAttributeValidator.ts","data/listing/attributes/api/createAttribute.ts","data/listing/attributes/api/updateAttribute.ts","data/listing/attributes/hooks/useAttributeUpsert.ts","data/listing/attributes/thunks/upsertAttribute.ts","views/components/common/FabSave.tsx","views/components/common/StringInput.tsx","data/initialData/hooks/useUnits.ts","views/components/common/AutocompleteSelect.tsx","views/components/common/UnitSelect.tsx","views/components/common/BoolInput.tsx","views/components/common/LeavePrompt.tsx","views/listing/attributes/AttributeTypeSelect.tsx","data/listing/attributes/hooks/useAttributeTypeOptions.ts","views/listing/attributes/AttributeComparatorTypeSelect.tsx","data/listing/attributes/hooks/attributes/useAttributeComparator.ts","views/listing/attributes/EditAttributeBasicInfoPage.tsx","data/listing/attributes/api/attributeValues/deleteAttributeValue.ts","data/listing/attributes/hooks/attributeValues/useAttributeValueDelete.ts","data/listing/attributes/thunks/attributeValues/deleteAttributeValue.ts","views/listing/attributes/attributeValues/AttributeValuesTable.tsx","data/listing/attributes/hooks/useEditAttributeState.ts","data/listing/attributes/api/attributeValues/getAttributeValue.ts","data/listing/attributes/thunks/attributeValues/loadAttributeValue.ts","data/listing/attributes/hooks/attributeValues/useEditAttributeValueState.ts","data/listing/attributes/hooks/attributeValues/useAttributeValue.ts","data/listing/attributes/hooks/attributeValues/useAttributeValueValidator.ts","data/listing/attributes/api/attributeValues/createAttributeValue.ts","data/listing/attributes/api/attributeValues/updateAttribute.ts","data/listing/attributes/hooks/attributeValues/useAttributeValueUpsert.ts","data/listing/attributes/thunks/attributeValues/upsertAttributeValue.ts","views/listing/attributes/navigationComponents.ts","views/listing/attributes/attributeValues/EditAttributeValue.tsx","views/listing/attributes/EditAttributePage.tsx","data/listing/banks/api/getAllBanks.ts","data/listing/banks/thunks/loadAllBanks.ts","data/listing/banks/api/getBank.ts","data/listing/banks/thunks/loadBank.ts","data/listing/banks/hooks/useDisplayBank.ts","views/listing/banks/DisplayBankMainAttributes.tsx","views/listing/banks/DisplayBank.tsx","data/listing/banks/api/deleteBank.ts","data/listing/banks/hooks/useBankDelete.ts","data/listing/banks/thunks/deleteBank.ts","views/listing/banks/Locations.tsx","views/listing/banks/useBankActions.tsx","views/listing/banks/BanksTable.tsx","data/listing/banks/hooks/useBankData.ts","views/listing/banks/useBankColumns.tsx","views/listing/banks/BanksPage.tsx","data/listing/banks/hooks/useBankSearch.ts","data/listing/banks/hooks/useEditBankState.ts","data/listing/banks/hooks/useBankValidator.ts","data/listing/banks/api/createBank.ts","data/listing/banks/api/updateBank.ts","data/listing/banks/hooks/useBankUpsert.ts","data/listing/banks/thunks/upsertBank.ts","data/initialData/hooks/useCities.ts","views/components/common/CitySelect.tsx","data/initialData/hooks/useCommissions.ts","views/components/common/CommissionSelect.tsx","views/listing/banks/navigationComponents.tsx","views/listing/banks/EditBankPage.tsx","data/listing/cities/api/getCity.ts","data/listing/cities/thunks/loadCity.ts","data/listing/cities/hooks/useDisplayCity.ts","data/listing/cities/hooks/useEditCityState.ts","data/listing/cities/hooks/useCityValidator.ts","data/listing/cities/api/createCity.ts","data/listing/cities/api/updateCity.ts","data/listing/cities/hooks/useCityUpsert.ts","data/listing/cities/thunks/upsertCity.ts","views/listing/cities/Locations.ts","data/initialData/hooks/useRegions.ts","views/components/common/RegionSelect.tsx","data/listing/cities/api/getAllCities.ts","data/listing/cities/thunks/loadAllCities.ts","views/listing/cities/DisplayCityMainAttributes.tsx","data/listing/clients/types.ts","views/listing/cities/DisplayCity.tsx","data/listing/cities/api/deleteCity.ts","data/listing/cities/hooks/useCityDelete.ts","data/listing/cities/thunks/deleteCity.ts","views/listing/cities/useCityActions.tsx","views/listing/cities/CitiesTable.tsx","data/listing/cities/hooks/useCityData.ts","views/listing/cities/useCityColumns.tsx","views/listing/cities/navigationComponents.ts","views/listing/cities/CitiesPage.tsx","data/listing/cities/hooks/useCitySearch.ts","views/listing/cities/EditCityPage.tsx","data/listing/clients/api/getAllClients.ts","data/listing/clients/hooks/useClientData.ts","data/listing/clients/thunks/loadAllClients.ts","data/listing/clients/api/getClient.ts","views/listing/clients/DisplayClient.tsx","data/listing/clients/thunks/loadClient.ts","data/listing/clients/hooks/useDisplayClient.ts","data/initialData/hooks/useClientTypes.ts","views/listing/clients/DisplayClientBasicInfo.tsx","data/listing/clients/api/clientPerson/getAllClientPersons.ts","data/listing/clients/thunks/clientPerson/loadClientPersons.ts","data/listing/clients/hooks/clientPerson/useClientPersons.ts","views/listing/clients/clientPersons/DisplayClientPersons.tsx","data/listing/clients/api/clientBroker/getAllClientBrokers.ts","data/listing/clients/thunks/clientBroker/loadClientBrokers.ts","data/listing/clients/hooks/clientBroker/useClientBrokers.ts","views/listing/clients/clientBrokers/DisplayClientBrokers.tsx","data/listing/clients/api/clientContract/getAllClientContracts.ts","data/listing/clients/thunks/clientContract/loadClientContracts.ts","data/listing/clients/hooks/clientContract/useClientContracts.ts","views/listing/clients/clientContracts/DisplayClientContracts.tsx","data/listing/clients/api/clientAccount/getAllClientAccounts.ts","data/listing/clients/thunks/clientAccount/loadClientAccounts.ts","data/listing/clients/hooks/clientAccount/useClientAccounts.ts","data/listing/clients/hooks/clientAccount/useClientAccountSide.ts","views/listing/clients/clientAccounts/DisplayClientAccounts.tsx","views/listing/clients/Locations.ts","data/listing/clients/api/deleteClient.ts","data/listing/clients/hooks/useClientDelete.ts","data/listing/clients/thunks/deleteClient.ts","data/listing/commissions/types.ts","views/listing/clients/useClientActions.tsx","views/listing/clients/ClientTable.tsx","views/listing/clients/useClientColumns.tsx","views/listing/clients/ClientPage.tsx","data/listing/clients/hooks/useClientSearch.ts","data/listing/clients/hooks/useClientValidator.ts","data/listing/clients/api/createClient.ts","data/listing/clients/api/updateClient.ts","data/listing/clients/hooks/useClientUpsert.ts","data/listing/clients/thunks/upsertClient.ts","views/components/common/DateInput.tsx","views/listing/clients/ClientTypeSelect.tsx","views/listing/clients/EditClientBasicInfoPage.tsx","data/listing/clients/api/clientPerson/deleteClientPerson.ts","data/listing/clients/hooks/clientPerson/useClientPersonDelete.ts","data/listing/clients/thunks/clientPerson/deleteClientPerson.ts","views/listing/clients/clientPersons/ClientPersonsTable.tsx","data/listing/clients/api/clientBroker/deleteClientBroker.ts","data/listing/clients/hooks/clientBroker/useClientBrokerDelete.ts","data/listing/clients/thunks/clientBroker/deleteClientBroker.ts","views/listing/clients/clientBrokers/ClientBrokerTable.tsx","data/listing/clients/api/clientContract/deleteClientContract.ts","data/listing/clients/hooks/clientContract/useClientContractDelete.ts","data/listing/clients/thunks/clientContract/deleteClientContract.ts","data/listing/clients/api/clientContract/getClientContract.ts","data/listing/clients/thunks/clientContract/loadClientContract.ts","views/listing/clients/clientContracts/DisplayContractMainAttributes.tsx","views/components/common/CustomTooltip.tsx","data/listing/clients/api/clientContract/printClientContract.ts","data/listing/clients/hooks/clientContract/useContractPrinter.ts","data/listing/clients/thunks/clientContract/printContractThunk.ts","views/listing/clients/clientContracts/DisplayContract.tsx","data/listing/clients/hooks/clientContract/useDisplayContract.ts","views/listing/clients/clientContracts/ClientContractTable.tsx","data/listing/clients/hooks/useEditClientState.ts","data/listing/clients/api/clientAccount/deleteClientAccount.ts","data/listing/clients/hooks/clientAccount/useClientAccountDelete.ts","data/listing/clients/thunks/clientAccount/deleteClientAccount.ts","views/listing/clients/clientAccounts/ClientAccountTable.tsx","data/listing/clients/api/clientAccount/getClientAccount.ts","data/listing/clients/thunks/clientAccount/loadClientAccount.ts","data/listing/clients/hooks/clientAccount/useEditClientAccountState.ts","data/listing/clients/hooks/clientAccount/useClientAccount.ts","data/listing/clients/hooks/clientAccount/useClientAccountValidator.ts","data/listing/clients/api/clientAccount/createClientAccount.ts","data/listing/clients/api/clientAccount/updateClientAccount.ts","data/listing/clients/hooks/clientAccount/useClientAccountUpsert.ts","data/listing/clients/thunks/clientAccount/upsertClientAccount.ts","data/initialData/hooks/useBanks.ts","views/components/common/BankSelect.tsx","data/listing/currencies/api/getAllCurrencies.ts","data/listing/currencies/hooks/useCurrencyData.ts","data/listing/currencies/thunks/loadAllCurrencies.ts","views/components/common/CurrencySelect.tsx","views/listing/clients/clientAccounts/AccountOrderSideSelect.tsx","data/listing/clients/api/clientBroker/getClientBroker.ts","data/listing/clients/thunks/clientBroker/loadClientBroker.ts","data/listing/clients/hooks/clientBroker/useEditClientBrokerState.ts","data/listing/clients/hooks/clientBroker/useClientBroker.ts","data/listing/clients/hooks/clientBroker/useClientBrokerValidator.ts","data/listing/clients/api/clientBroker/createClientBroker.ts","data/listing/clients/api/clientBroker/updateClientBroker.ts","data/listing/clients/hooks/clientBroker/useClientBrokerUpsert.ts","data/listing/clients/thunks/clientBroker/upsertClientBroker.ts","data/listing/employees/api/getAllEmployees.ts","data/listing/employees/thunks/loadAllEmployees.ts","data/listing/employees/hooks/useEmployeeData.ts","views/components/listing/EmployeeSelect.tsx","data/listing/clients/hooks/clientContract/useEditClientContractState.ts","data/listing/clients/hooks/clientContract/useClientContract.ts","data/listing/clients/hooks/clientContract/useClientContractValidator.ts","data/listing/clients/api/clientContract/createClientContract.ts","data/listing/clients/api/clientContract/updateClientContract.ts","data/listing/clients/hooks/clientContract/useClientContractUpsert.ts","data/listing/clients/thunks/clientContract/upsertClientContract.ts","views/components/listing/ClientContractSelect.tsx","data/initialData/hooks/useContractTypes.ts","views/components/common/ContractTypeSelect.tsx","data/listing/clients/api/clientPerson/getClientPerson.ts","data/listing/clients/thunks/clientPerson/loadClientPerson.ts","data/listing/clients/hooks/clientPerson/useClientPerson.ts","data/listing/clients/hooks/clientPerson/useEditClientPersonState.ts","data/listing/clients/hooks/clientPerson/useClientPersonValidator.ts","data/listing/clients/api/clientPerson/createClientPerson.ts","data/listing/clients/api/clientPerson/updateClientPerson.ts","data/listing/clients/hooks/clientPerson/useClientPersonUpsert.ts","data/listing/clients/thunks/clientPerson/upsertClientPerson.ts","data/initialData/hooks/usePersonRoles.ts","views/components/common/ClientPersonRoleSelect.tsx","views/listing/clients/navigationComponents.ts","views/listing/clients/clientPersons/EditPerson.tsx","views/listing/clients/clientBrokers/EditBroker.tsx","views/listing/clients/clientContracts/EditContract.tsx","views/listing/clients/clientAccounts/EditAccounts.tsx","views/listing/clients/EditClientPage.tsx","data/listing/commissions/api/getAllCommisions.ts","data/listing/commissions/hooks/useCommissionData.ts","data/listing/commissions/thunks/loadAllCommissions.ts","data/listing/commissions/api/getCommision.ts","views/listing/commissions/DisplayCommission.tsx","data/listing/commissions/thunks/loadCommission.ts","data/listing/commissions/hooks/useDisplayCommission.ts","views/listing/commissions/DisplayCommissionBasicInfo.tsx","data/listing/commissions/api/commissionDetails/getAllCommissionDetails.ts","data/listing/commissions/thunks/detailes/loadCommissionDetails.ts","data/listing/commissions/hooks/detailes/useDetails.ts","views/listing/commissions/details/DisplayCommissionDetailes.tsx","views/listing/commissions/Locations.ts","data/listing/commissions/api/deleteCommision.ts","data/listing/commissions/hooks/useCommissionDelete.ts","data/listing/commissions/thunks/deleteCommission.ts","views/listing/commissions/useCommissionActions.tsx","views/listing/commissions/CommissionTable.tsx","views/listing/commissions/useCommissionColumns.tsx","views/listing/commissions/CommissionPage.tsx","data/listing/commissions/hooks/useCommissionSearch.ts","data/listing/commissions/hooks/useCommissionValidator.ts","data/listing/commissions/api/createCommision.ts","data/listing/commissions/api/updateCommision.ts","data/listing/commissions/hooks/useCommissionUpsert.ts","data/listing/commissions/thunks/upsertCommission.ts","data/initialData/hooks/useCommissionTypes.ts","views/components/common/CommissionTypeSelect.tsx","views/listing/commissions/EditCommissionBasicInfoPage.tsx","data/listing/commissions/api/commissionDetails/deleteCommissionDetail.ts","data/listing/commissions/hooks/detailes/useDetailDelete.ts","data/listing/commissions/thunks/detailes/deleteCommissionDetail.ts","views/listing/commissions/details/CommissionTable.tsx","data/listing/commissions/hooks/useEditCommissionState.ts","data/listing/commissions/api/commissionDetails/getCommissionDetail.ts","data/listing/commissions/thunks/detailes/loadCommissionDetail.ts","data/listing/commissions/hooks/detailes/useEditDetailState.ts","data/listing/commissions/hooks/detailes/useDetail.ts","data/listing/commissions/hooks/detailes/useDetailValidator.ts","data/listing/commissions/api/commissionDetails/createCommissionDetail.ts","data/listing/commissions/api/commissionDetails/updateCommissionDetail.ts","data/listing/commissions/hooks/detailes/useDetailUpsert.ts","data/listing/commissions/thunks/detailes/upsertCommissionDetail.ts","data/initialData/hooks/useInitProductGroups.ts","views/components/common/ProductGroupSelect.tsx","data/listing/products/api/getProductsFroSelect.ts","data/listing/products/hooks/useProductSelectData.ts","data/listing/products/thunks/loadProductsForSelect.ts","views/components/listing/ProductSelect.tsx","views/components/common/NumberInput.tsx","views/listing/commissions/details/EditCommissionDetail.tsx","views/listing/commissions/navigationComponents.ts","views/listing/commissions/EditCommissionPage.tsx","data/listing/countries/api/getCountry.ts","data/listing/countries/thunks/loadCountry.ts","data/listing/countries/hooks/useDisplayCountry.ts","data/listing/countries/hooks/useEditCountryState.ts","data/listing/countries/hooks/useCountryValidator.ts","data/listing/countries/api/createCountry.ts","data/listing/countries/api/updateCountry.ts","data/listing/countries/hooks/useCountryUpsert.ts","data/listing/countries/thunks/upsertCountry.ts","views/listing/countries/Locations.ts","data/listing/countries/api/getAllCountries.ts","data/listing/countries/thunks/loadAllCountries.ts","data/listing/countries/hooks/useCountryData.ts","views/listing/countries/DisplayCountryMainAttributes.tsx","views/listing/countries/DisplayCountry.tsx","data/listing/countries/api/deleteCountry.ts","data/listing/countries/hooks/useCountryDelete.ts","data/listing/countries/thunks/deleteCountry.ts","views/listing/countries/useCountryActions.tsx","views/listing/countries/CountriesTable.tsx","views/listing/countries/useCountryColumns.tsx","views/listing/countries/navigationComponents.ts","views/listing/countries/CountriesPage.tsx","data/listing/countries/hooks/useCountrySearch.ts","views/listing/countries/EditCountryPage.tsx","data/listing/currencies/api/getCurrency.ts","data/listing/currencies/thunks/loadCurrency.ts","data/listing/currencies/hooks/useDisplayCurrency.ts","data/listing/currencies/hooks/useEditCurrencyState.ts","data/listing/currencies/hooks/useCurrencyValidator.ts","data/listing/currencies/api/createCurrency.ts","data/listing/currencies/api/updateCurrency.ts","data/listing/currencies/hooks/useCurrencyUpsert.ts","data/listing/currencies/thunks/upsertCurrency.ts","views/listing/currencies/Locations.ts","views/listing/currencies/DisplayCurrencyBasicInfo.tsx","data/listing/curencyRates/types.ts","views/listing/currencies/DisplayCurrency.tsx","views/listing/currencies/useCurrenciesActions.tsx","views/listing/currencies/CurrenciesTable.tsx","views/listing/currencies/useCurrenciesColumns.tsx","views/listing/currencies/navigationComponents.ts","views/listing/currencies/CurrencyPage.tsx","data/listing/currencies/hooks/useCurrencySearch.ts","views/listing/currencies/EditCurrencyPage.tsx","data/listing/curencyRates/api/getCurrencyRate.ts","data/listing/curencyRates/thunks/loadCurrencyRate.ts","data/listing/curencyRates/hooks/useDisplayCurrencyRate.ts","data/listing/curencyRates/hooks/useEditCurrencyRateState.ts","data/listing/curencyRates/hooks/useCurrencyRateValidator.ts","data/listing/curencyRates/api/createCurrencyRate.ts","data/listing/curencyRates/api/updateCurrencyRate.ts","data/listing/curencyRates/hooks/useCurrencyRateUpsert.ts","data/listing/curencyRates/thunks/upsertCurrencyRate.ts","views/listing/currencyRates/Locations.ts","data/listing/curencyRates/api/getAllCurrencyRates.ts","data/listing/curencyRates/hooks/useCurrencyRateData.ts","data/listing/curencyRates/thunks/loadAllCurrencyRates.ts","data/initialData/hooks/useCurrencies.ts","views/listing/currencyRates/DisplayCurrencyRateBasicInfo.tsx","views/listing/currencyRates/DisplayCurrencyRate.tsx","views/listing/currencyRates/useCurrencyRatesActions.tsx","views/listing/currencyRates/CurrencyRateTable.tsx","views/listing/currencyRates/useCurrencyRatesColumns.tsx","views/listing/currencyRates/CurrencyRatePage.tsx","views/listing/currencyRates/navigationComponents.ts","data/listing/curencyRates/hooks/useCurrencyRateFilter.ts","views/listing/currencyRates/EditCurrencyRatePage.tsx","data/listing/employees/api/getEmployee.ts","data/listing/employees/hooks/useDisplayEmployee.ts","data/listing/employees/thunks/loadEmployee.ts","data/listing/employees/hooks/useEditEmployeeState.ts","data/listing/employees/hooks/useEmployeeValidator.ts","data/listing/employees/api/createEmployee.ts","data/listing/employees/api/updateEmployee.ts","data/listing/employees/hooks/useEmployeeUpsert.ts","data/listing/employees/thunks/upsertEmployee.ts","views/components/common/GenderOptions.tsx","views/listing/employees/EmployeeGenderSelect.tsx","views/listing/employees/EmployeeCitySelect.tsx","views/listing/employees/Locations.tsx","views/listing/employees/DisplayEmployeeMainAttributes.tsx","views/listing/employees/DisplayEmployee.tsx","data/listing/employees/api/deleteEmployee.ts","data/listing/employees/hooks/useEmployeeDelete.ts","data/listing/employees/thunks/deleteEmployee.ts","views/listing/employees/useEmployeeActions.tsx","views/listing/employees/EmployeesTable.tsx","views/listing/employees/useEmployeeColumns.tsx","views/listing/employees/navigationComponents.tsx","views/listing/employees/EmployeesPage.tsx","data/listing/employees/hooks/useEmployeeSearch.ts","views/listing/employees/EditEmployeePage.tsx","data/listing/productGroups/api/getAllProductGroups.ts","data/listing/productGroups/hooks/useProductGroupData.ts","data/listing/productGroups/thunks/loadAllProductGroups.ts","data/listing/productGroups/api/getProductGroup.ts","data/listing/products/types.ts","data/listing/productGroups/thunks/loadProductGroup.ts","data/listing/productGroups/hooks/useDisplayProductGroup.ts","views/listing/productGroups/DisplayProductGroupBasicInfo.tsx","views/listing/productGroups/DisplayProductGroup.tsx","data/listing/productGroups/api/deleteProductGroup.ts","data/listing/productGroups/hooks/useProductGroupDelete.ts","data/listing/productGroups/thunks/deleteProductGroup.ts","views/listing/productGroups/Locations.ts","views/listing/productGroups/useProductGroupActions.tsx","views/listing/productGroups/ProductGroupsTable.tsx","views/listing/productGroups/useProductGroupColumns.tsx","data/listing/roles/hooks/useRoleSearch.ts","views/listing/productGroups/ProductGroupPage.tsx","data/listing/productGroups/hooks/useEditProductGroupState.ts","data/listing/productGroups/hooks/useProductGroupValidator.ts","data/listing/productGroups/api/createProductGroup.ts","data/listing/productGroups/api/updateProductGroup.ts","data/listing/productGroups/hooks/useProductGroupUpsert.ts","data/listing/productGroups/thunks/upsertProductGroup.ts","views/listing/productGroups/navigationComponents.ts","views/listing/productGroups/EditProductGroupPage.tsx","data/listing/products/api/getAllProducts.ts","data/listing/products/hooks/useProductData.ts","data/listing/products/thunks/loadAllProducts.ts","data/listing/products/api/getProduct.ts","views/listing/products/DisplayProduct.tsx","data/listing/products/thunks/loadProduct.ts","data/listing/products/hooks/useDisplayProduct.ts","views/listing/products/DisplayProductBasicInfo.tsx","data/listing/products/api/attributes/getAllAttributes.ts","data/listing/products/thunks/attributes/loadAttributes.ts","data/listing/products/hooks/attributes/useAttributes.ts","views/listing/products/attributes/DisplayAttributes.tsx","views/listing/products/Locations.ts","data/listing/products/api/deleteProduct.ts","data/listing/products/hooks/useProductDelete.ts","data/listing/products/thunks/deleteProduct.ts","views/listing/products/useProductActions.tsx","views/listing/products/ProductTable.tsx","views/listing/products/useProductColumns.tsx","views/listing/products/ProductPage.tsx","data/listing/products/hooks/useProductSearch.ts","data/listing/products/api/attributes/getAttribute.ts","data/listing/products/thunks/attributes/loadAttribute.ts","data/listing/products/hooks/attributes/useEditAttributeState.ts","data/listing/products/hooks/attributes/useAttribute.ts","data/listing/products/hooks/attributes/useAttributeValidator.ts","data/listing/products/api/attributes/createAttribute.ts","data/listing/products/api/attributes/updateAttribute.ts","data/listing/products/hooks/attributes/useAttributeUpsert.ts","data/listing/products/thunks/attributes/upsertAttribute.ts","data/initialData/hooks/useProductAttributes.ts","views/components/common/ProductAttributeSelect.tsx","data/listing/products/hooks/useProductValidator.ts","data/listing/products/api/createProduct.ts","data/listing/products/api/updateProduct.ts","data/listing/products/hooks/useProductUpsert.ts","data/listing/products/thunks/upsertProduct.ts","data/initialData/hooks/useVatRates.ts","views/components/common/VatRateSelect.tsx","views/listing/products/EditProductBasicInfoPage.tsx","data/listing/products/api/attributes/deleteAttribute.ts","data/listing/products/hooks/attributes/useAttributeDelete.ts","data/listing/products/thunks/attributes/deleteAttribute.ts","views/listing/products/attributes/AttributeTable.tsx","data/listing/products/hooks/useEditPRoductState.ts","views/listing/products/navigationComponents.ts","views/listing/products/attributes/EditAttribute.tsx","views/listing/products/EditProductPage.tsx","data/listing/regions/api/getAllRegion.ts","data/listing/regions/hooks/useRegionData.ts","data/listing/regions/thunks/loadAllRegions.ts","data/listing/regions/api/getRegion.ts","data/listing/regions/thunks/loadRegion.ts","data/listing/regions/hooks/useDisplayRegion.ts","views/listing/regions/DisplayRegionMainAttributes.tsx","views/listing/regions/DisplayRegion.tsx","data/listing/regions/api/deleteRegion.ts","data/listing/regions/hooks/useRegionDelete.ts","data/listing/regions/thunks/deleteRegion.ts","views/listing/regions/Locations.ts","views/listing/regions/useRegionsActions.tsx","views/listing/regions/RegionsTable.tsx","views/listing/regions/useRegionsColumns.tsx","data/listing/regions/hooks/useRegionSearch.ts","data/listing/regions/hooks/useRegionType.ts","views/listing/regions/RegionsPage.tsx","views/listing/regions/TopRegionsPage.tsx","data/listing/regions/hooks/useEditRegionState.ts","data/listing/regions/hooks/useRegionValidator.ts","data/listing/regions/api/createRegion.ts","data/listing/regions/api/updateRegion.ts","data/listing/regions/hooks/useRegionUpsert.ts","data/listing/regions/thunks/upsertRegion.ts","data/initialData/hooks/useCountries.ts","views/components/common/CountriesSelect.tsx","views/components/listing/RegionSelect.tsx","views/listing/regions/navigationComponents.ts","views/listing/regions/EditRegionPage.tsx","data/listing/roles/api/getAllRoles.ts","data/listing/roles/thunks/loadAllRoles.ts","data/listing/roles/hooks/useRoleData.ts","data/listing/roles/api/getRole.ts","data/listing/roles/thunks/loadRole.ts","data/listing/roles/hooks/useDisplayRole.ts","views/listing/roles/DisplayRoleMainAttributes.tsx","views/listing/roles/DisplayRole.tsx","data/listing/roles/api/deleteRole.ts","data/listing/roles/hooks/useRoleDelete.ts","data/listing/roles/thunks/deleteRole.ts","views/listing/roles/Locations.ts","views/listing/roles/useRoleActions.tsx","views/listing/roles/RolesTable.tsx","views/listing/roles/useRoleColumns.tsx","views/listing/roles/RolesPage.tsx","data/listing/roles/hooks/useEditRoleState.ts","data/listing/roles/hooks/useRoleValidator.ts","data/listing/roles/api/createRole.ts","data/listing/roles/api/updateRole.ts","data/listing/roles/hooks/useRoleUpsert.ts","data/listing/roles/thunks/upsertRole.ts","views/listing/roles/navigationComponents.ts","views/listing/roles/EditRolePage.tsx","data/listing/users/api/getAllUsers.ts","data/listing/users/thunks/loadAllUsers.ts","data/listing/users/api/getUser.ts","data/listing/users/types.ts","data/listing/users/hooks/useDisplayUser.ts","data/listing/users/thunks/loadUser.ts","views/components/common/SkeletonLoader.tsx","views/listing/users/DisplayUserMainAttributes.tsx","data/listing/clients/hooks/useClient.ts","data/listing/roles/hooks/useRole.ts","views/listing/users/DisplayUser.tsx","data/listing/users/api/deleteUser.ts","data/listing/users/hooks/useUserDelete.ts","data/listing/users/thunks/deleteUser.ts","views/listing/users/Locations.tsx","views/listing/users/useUserActions.tsx","views/listing/users/UserTable.tsx","data/listing/users/hooks/useUserData.ts","views/listing/users/useUserColumns.tsx","views/listing/users/UserPage.tsx","data/listing/users/hooks/useUserSearch.ts","data/listing/users/hooks/useEditUserState.ts","data/listing/users/hooks/useUserValidator.ts","data/listing/users/api/createUser.ts","data/listing/users/api/updateUser.ts","data/listing/users/hooks/useUserUpsert.ts","data/listing/users/thunks/upsertUser.ts","views/components/listing/ClientSelect.tsx","views/components/listing/ClientPersonSelect.tsx","views/components/listing/RoleSelect.tsx","views/listing/users/navigationComponents.tsx","views/listing/users/EditUserPage.tsx","data/listing/warehouses/api/getAllWhs.ts","data/listing/warehouses/thunks/loadAllWhs.ts","data/listing/warehouses/hooks/useWhsData.ts","data/listing/warehouses/api/getWhs.ts","data/listing/warehouses/thunks/loadWhs.ts","data/listing/warehouses/hooks/useDisplayWhs.ts","views/listing/warehouses/DisplayWhsMainAttributes.tsx","views/listing/warehouses/DisplayWhs.tsx","data/listing/warehouses/api/deleteWhs.ts","data/listing/warehouses/hooks/useWhsDelete.ts","data/listing/warehouses/thunks/deleteWhs.ts","views/listing/warehouses/Locations.tsx","views/listing/warehouses/useWhsActions.tsx","views/listing/warehouses/WhsTable.tsx","views/listing/warehouses/useWhsColumns.tsx","views/listing/warehouses/WhsPage.tsx","data/listing/warehouses/hooks/useWhsSearch.ts","data/listing/warehouses/hooks/useEditWhsState.ts","data/listing/warehouses/hooks/useWhsValidator.ts","data/listing/warehouses/api/createWhs.ts","data/listing/warehouses/api/updateWhs.ts","data/listing/warehouses/hooks/useWhsUpsert.ts","data/listing/warehouses/thunks/upsertWhs.ts","data/initialData/hooks/usePorts.ts","views/components/common/PortSelect.tsx","views/listing/warehouses/navigationComponents.tsx","views/listing/warehouses/EditWhsPage.tsx","data/listing/payTypes/api/getAllPayTypes.ts","data/listing/payTypes/thunks/loadAllPayTypes.ts","data/listing/payTypes/api/getPayType.ts","data/listing/payTypes/thunks/loadPayType.ts","data/listing/payTypes/hooks/useDisplayPayType.ts","views/listing/payTypes/DisplayPayTypeMainAttributes.tsx","views/listing/payTypes/DisplayPayType.tsx","data/listing/payTypes/api/deletePayType.ts","data/listing/payTypes/hooks/usePayTypeDelete.ts","data/listing/payTypes/thunks/deletePayType.ts","views/listing/payTypes/Locations.tsx","views/listing/payTypes/usePayTypeActions.tsx","views/listing/payTypes/PayTypesTable.tsx","data/listing/payTypes/hooks/usePayTypeData.ts","views/listing/payTypes/usePayTypeColumns.tsx","views/listing/payTypes/PayTypePage.tsx","data/listing/payTypes/hooks/usePayTypeSearch.ts","data/listing/payTypes/hooks/useEditPayTypeState.ts","data/listing/payTypes/hooks/usePayTypeValidator.ts","data/listing/payTypes/api/createPayType.ts","data/listing/payTypes/api/updatePayType.ts","data/listing/payTypes/hooks/usePayTypeUpsert.ts","data/listing/payTypes/thunks/upsertPayType.ts","views/listing/payTypes/navigationComponents.tsx","views/listing/payTypes/EditPayTypePage.tsx","views/listing/listingNavigationItems.ts","views/components/common/ControledTable.tsx","views/components/common/PagginationTable.tsx","data/trading/orders/types.ts","data/trading/orders/api/getOrder.ts","data/trading/orders/thunks/getOrder.ts","data/trading/mainBoard/hooks/useDisplayMainBoard.ts","data/trading/mainBoard/thunks/loadMainBoardOrder.ts","data/trading/orders/hooks/useOrderSideOptions.ts","views/trading/orders/DisplayOrderMainAttributes.tsx","data/trading/orders/hooks/useOrderMarketOptions.ts","views/trading/mainBoard/Locations.ts","views/trading/orders/DisplayOrderLogData.tsx","data/initialData/hooks/useAttributeValues.ts","views/trading/orders/attributes/DisplayAttributes.tsx","data/trading/orders/api/printOrder.ts","data/trading/orderBook/hooks/useOrderPrinter.ts","data/trading/orderBook/thunks/printOrderThunk.ts","views/trading/orders/DisplayOrder.tsx","views/trading/mainBoard/useOrderActions.tsx","views/trading/orders/OrderFilterEditor.tsx","views/trading/orders/styles.ts","views/trading/orders/columRenderers.tsx","views/trading/orders/useOrderRowColor.tsx","views/trading/mainBoard/OrdersTable.tsx","views/trading/mainBoard/useOrderColumns.tsx","data/trading/orders/api/getOrders.ts","data/trading/orders/thunks/getOrdersThunk.ts","data/trading/mainBoard/hooks/useMainBoardData.ts","data/trading/mainBoard/thunks/loadMainBoard.ts","data/trading/mainBoard/hooks/useMainBoardIndex.ts","data/trading/mainBoard/hooks/useMainBoardFilter.ts","views/trading/orders/OrderSideSelect.tsx","data/initialData/hooks/useOrderStatuses.ts","views/components/common/OrderStatusSelect.tsx","views/trading/orders/OrderMarketSelect.tsx","data/trading/ticker/types.ts","views/trading/orders/OrderFilterChips.tsx","views/trading/mainBoard/MainBoardFilter.tsx","data/trading/ticker/api/getChartData.ts","views/trading/orderBook/Locations.ts","data/trading/ticker/hooks/useGraphData.ts","data/trading/ticker/thunks/loadGraphData.ts","data/trading/ticker/hooks/useGraphPeriod.ts","data/trading/ticker/hooks/useGraphProduct.ts","views/trading/mainBoard/ProductGraph.tsx","data/trading/ticker/api/getTickerData.ts","data/trading/ticker/hooks/useTickerData.ts","data/trading/ticker/thunks/loadTickerData.ts","views/trading/mainBoard/Ticker.tsx","views/trading/mainBoard/MainBoard.tsx","data/trading/orders/hooks/useOrderValidator.ts","data/trading/orders/api/createOrder.ts","data/trading/orders/api/updateOrder.ts","data/trading/orders/api/modifyOrder.ts","data/trading/orders/api/oppositeOrder.ts","data/trading/orders/hooks/useOrderUpsert.ts","data/trading/orders/thunks/upsertOrder.ts","data/initialData/hooks/useRecieveMethods.ts","views/components/common/OrderRecieveMethodSelect.tsx","data/initialData/hooks/useFrancoList.ts","views/components/common/FrancoSelect.tsx","data/initialData/hooks/useGuarantees.ts","views/components/common/GuaranteesSelect.tsx","views/trading/mainpanelm/Locations.ts","data/listing/attributes/hooks/useAttribute.ts","views/components/listing/ProductAttributeValueSelect.tsx","views/trading/orders/attributes/EditAttributeValue.tsx","data/trading/orders/hooks/useOrderPSTM.ts","data/trading/orders/thunks/thunkPSTM.ts","views/trading/orders/attributes/EditAttributes.tsx","data/initialData/hooks/useTopRegions.ts","views/components/common/TopRegionSelect.tsx","views/components/listing/WarehouseSelect.tsx","data/initialData/hooks/useOrderNotes.ts","views/components/common/OrderNoteSelect.tsx","data/initialData/hooks/usePayTypes.ts","views/components/common/Pay_TypeSelect.tsx","views/trading/orders/EditOrderBasicInfoPage.tsx","data/trading/orders/api/getOppositeOrder.ts","data/trading/orders/hooks/useEditOrderState.ts","data/trading/orders/hooks/useOrderForEdit.ts","views/trading/orders/EditOrderPage.tsx","views/trading/mainBoard/navigationComponents.ts","data/trading/trades/api/getTrade.ts","data/trading/trades/thunks/loadTrade.ts","data/trading/trades/hooks/useDisplayTrades.ts","views/trading/trades/DisplayTradeMainAttributes.tsx","views/trading/trades/DisplayTradeLogData.tsx","data/trading/trades/api/printTrade.ts","data/trading/trades/hooks/useTradePrinter.ts","data/trading/trades/thunks/printTradeThunk.ts","views/trading/trades/DisplayTrade.tsx","data/trading/trades/api/cancelTrade.ts","data/trading/trades/hooks/useTradeCancel.ts","data/trading/trades/thunks/cancelTrade.ts","views/trading/trades/CancelTrade.tsx","views/trading/trades/useTradeActions.tsx","views/trading/trades/useTradeColumns.tsx","views/trading/trades/TradesTable.tsx","data/trading/trades/api/getTrades.ts","data/trading/trades/thunks/getTradesThunk.ts","data/trading/trades/thunks/loadTrades.ts","data/trading/trades/hooks/useTradesIndex.ts","views/trading/trades/TradesFilterChips.tsx","data/initialData/hooks/useTradeStatuses.ts","views/components/common/TradeStatusSelect.tsx","views/trading/trades/TradesFilterEditor.tsx","views/trading/trades/TradesFilter.tsx","data/trading/trades/hooks/useTradesFilter.ts","views/trading/trades/navigationComponents.ts","views/trading/trades/TradesPage.tsx","data/trading/trades/hooks/useTradesData.ts","views/trading/trades/Locations.ts","data/trading/orders/api/cancelOrder.ts","data/trading/orders/hooks/useOrderCancel.ts","data/trading/orders/thunks/cancelOrderThunk.ts","views/trading/orders/CancelOrder.tsx","data/trading/orders/api/delOrder.ts","data/trading/orders/hooks/useOrderDel.ts","data/trading/orders/thunks/delOrderThunk.ts","views/trading/orders/DeleteOrder.tsx","views/trading/orderBook/useOrderBookActions.tsx","views/trading/orderBook/useOrderBookColumns.tsx","views/trading/orderBook/OrderBookTable.tsx","views/trading/orderBook/useOrderBookColumnsClient.tsx","data/trading/orderBook/hooks/useOrderBookData.ts","data/trading/orderBook/thunks/loadAllOrderBook.ts","data/trading/orderBook/hooks/useOrderBookIndex.ts","data/trading/orderBook/hooks/useOrderBookFilter.ts","views/trading/orderBook/OrderBookFilter.tsx","views/trading/orderBook/navigationComponents.ts","views/trading/orderBook/OrderBook.tsx","views/trading/mainpanelm/useOrderActions.tsx","views/trading/mainpanelm/OrdersTable.tsx","views/trading/mainpanelm/useOrderColumns.tsx","views/trading/mainpanelm/MainBoardFilter.tsx","views/trading/mainpanelm/Ticker.tsx","views/trading/mainpanelm/MainBoard.tsx","views/trading/mainpanelm/navigationComponents.ts","views/trading/chartsmob/ProductGraph.tsx","views/trading/chartsmob/navigationComponents.ts","views/trading/chartsmob/ChartMob.tsx","views/trading/chartsmob/Locations.ts","views/trading/tradingNavigationItems.ts","data/clearing/payments/api/getPayment.ts","data/clearing/payments/thunks/loadPayment.ts","data/clearing/payments/hooks/useDisplayPayments.ts","views/clearing/payments/DisplayPaymentMainAttributes.tsx","data/clearing/payments/api/printPayment.ts","data/clearing/payments/hooks/usePaymentPrinter.ts","data/clearing/payments/thunks/printPaymentThunk.ts","views/clearing/payments/DisplayPayment.tsx","views/clearing/payments/Locations.ts","data/clearing/payments/api/deletePayment.ts","data/clearing/payments/hooks/usePaymentDelete.ts","data/clearing/payments/thunks/deletePayment.ts","views/clearing/payments/usePaymentsActions.tsx","data/clearing/payments/types.ts","views/clearing/payments/PaymentsTable.tsx","views/clearing/payments/usePaymentsColumns.tsx","data/clearing/payments/api/getPayments.ts","views/clearing/payments/PaymentFilterEditor.tsx","data/clearing/payments/hooks/usePaymentsData.ts","data/clearing/payments/thunks/loadAllPayment.ts","data/clearing/payments/hooks/usePaymentsIndex.ts","data/clearing/payments/hooks/usePaymentsFilter.ts","data/clearing/payments/hooks/usePaymentSideOptions.ts","data/clearing/payments/hooks/usePaymentDedicationOptions.ts","data/trading/transactions/api/getSimpleTrades.ts","data/trading/transactions/thunks/getSimpleTradesThunk.ts","views/components/trading/FiltredTransactionsSelect.tsx","data/trading/transactions/hooks/useSimpleTradesData.ts","views/clearing/payments/PaymentFilterChips.tsx","views/clearing/payments/PaymentFilter.tsx","data/clearing/payments/api/getPaymentsReport.ts","data/clearing/payments/hooks/usePaymentsReportDownloader.ts","data/clearing/payments/thunks/downloadReport.ts","data/clearing/payments/api/getPaymentsExcel.ts","data/clearing/payments/hooks/usePaymentsExcelDownloader.ts","data/clearing/payments/thunks/downloadReportExcel.ts","views/clearing/payments/DownloadButton.tsx","views/clearing/payments/PaymentsPage.tsx","data/clearing/payments/hooks/useEditPaymentState.ts","data/clearing/payments/hooks/usePaymentValidator.ts","data/clearing/payments/api/createPayment.ts","data/clearing/payments/api/updatePayment.ts","data/clearing/payments/hooks/usePaymentUpsert.ts","data/clearing/payments/thunks/upsertPayment.ts","data/initialData/hooks/usePaymentTypes.ts","views/components/common/PaymentTypeSelect.tsx","views/clearing/payments/EditPaymentsPage.tsx","views/clearing/payments/navigationComponents.ts","data/clearing/ctrlgoods/api/getCtrlGood.ts","data/clearing/ctrlgoods/thunks/loadCtrlGood.ts","data/clearing/ctrlgoods/hooks/useDisplayCtrlGoods.ts","views/clearing/ctrlgoods/DisplayCtrlGoodMainAttributes.tsx","data/clearing/ctrlgoods/api/printCtrlGoods.ts","data/clearing/ctrlgoods/hooks/useCtrlGoodsPrinter.ts","data/clearing/ctrlgoods/thunks/printCtrlGoodsThunk.ts","views/clearing/ctrlgoods/DisplayCtrlGood.tsx","views/clearing/ctrlgoods/Locations.ts","data/clearing/ctrlgoods/api/deleteCtrlGoods.ts","data/clearing/ctrlgoods/hooks/useCtrlGoodDelete.ts","data/clearing/ctrlgoods/thunks/deleteCtrlGood.ts","views/clearing/ctrlgoods/useCtrlGoodsActions.tsx","views/clearing/ctrlgoods/CtrlGoodsFilterEditor.tsx","views/clearing/ctrlgoods/CtrlGoodsTable.tsx","views/clearing/ctrlgoods/useCtrlGoodsColumns.tsx","data/clearing/ctrlgoods/api/getCtrlGoods.ts","data/clearing/ctrlgoods/hooks/useCtrlGoodsData.ts","data/clearing/ctrlgoods/thunks/loadAllCtrlGoods.ts","data/clearing/ctrlgoods/hooks/useCtrlGoodsIndex.ts","data/clearing/ctrlgoods/hooks/useCtrlGoodsFilter.ts","views/clearing/ctrlgoods/CtrlGoodsFilterChips.tsx","views/clearing/ctrlgoods/CtrlGoodsFilter.tsx","data/clearing/ctrlgoods/api/getCtrlGoodsReport.ts","data/clearing/ctrlgoods/hooks/useCtrlGoodsReportDownloader.ts","data/clearing/ctrlgoods/thunks/downloadReport.ts","data/clearing/ctrlgoods/api/getCtrlGoodsExcel.ts","data/clearing/ctrlgoods/hooks/useCtrlGoodsExcelDownloader.ts","data/clearing/ctrlgoods/thunks/downloadReportExcel.ts","views/clearing/ctrlgoods/DownloadButton.tsx","views/clearing/ctrlgoods/CtrlGoodsPage.tsx","data/clearing/ctrlgoods/hooks/useEditCtrlGoodsState.ts","data/clearing/ctrlgoods/hooks/useCtrlGoodsValidator.ts","data/clearing/ctrlgoods/api/createCtrlGoods.ts","data/clearing/ctrlgoods/api/updateCtrlGoods.ts","data/clearing/ctrlgoods/hooks/useCtrlGoodUpsert.ts","data/clearing/ctrlgoods/thunks/upsertCtrlGood.ts","data/initialData/hooks/useCheckPoints.ts","views/components/common/CheckPointSelect.tsx","data/initialData/hooks/useCheckPointPayers.ts","views/components/common/CheckPointPayerSelect.tsx","data/initialData/hooks/useCheckDoneByList.ts","views/components/common/CheckDoneBySelect.tsx","data/trading/trades/thunks/getTradesActiveThunk.ts","data/trading/trades/api/getTradesActive.ts","views/components/trading/TradesSelect.tsx","data/trading/trades/hooks/useTradesActiveData.ts","data/initialData/hooks/useQualityCtrlList.ts","views/components/common/QualityCtrlListSelect.tsx","views/clearing/ctrlgoods/navigationComponents.ts","views/clearing/ctrlgoods/EditCtrlGoodsPage.tsx","data/clearing/delivery/api/getDelivery.ts","data/clearing/delivery/thunks/loadDelivery.ts","data/clearing/delivery/hooks/useDisplayDelivery.ts","views/clearing/delivery/DisplayDeliveryMainAttributes.tsx","data/clearing/delivery/api/printDelivery.ts","data/clearing/delivery/hooks/useDeliveryPrinter.ts","data/clearing/delivery/thunks/printDeliveryThunk.ts","views/clearing/delivery/DisplayDelivery.tsx","views/clearing/delivery/Locations.ts","data/clearing/delivery/api/deleteDelivery.ts","data/clearing/delivery/hooks/useDeliveryDelete.ts","data/clearing/delivery/thunks/deleteDelivery.ts","views/clearing/delivery/useDeliveriesActions.tsx","views/clearing/delivery/DeliveryFilterEditor.tsx","views/clearing/delivery/DeliveriesTable.tsx","views/clearing/delivery/useDeliveriesColumns.tsx","data/clearing/delivery/api/getDeliveries.ts","data/clearing/delivery/hooks/useDeliveryData.ts","data/clearing/delivery/thunks/loadDeliveries.ts","data/clearing/delivery/hooks/useDeliveryIndex.ts","data/clearing/delivery/hooks/useDeliveryFilter.ts","views/clearing/delivery/DeliveryFilterChips.tsx","views/clearing/delivery/DeliveryFilter.tsx","data/clearing/delivery/api/getDeliveryReport.ts","data/clearing/delivery/hooks/useDeliveryReportDownloader.ts","data/clearing/delivery/thunks/downloadReport.ts","data/clearing/delivery/api/getDeliverysExcel.ts","data/clearing/delivery/hooks/useDeliveryExcelDownloader.ts","data/clearing/delivery/thunks/downloadReportExcel.ts","views/clearing/delivery/DownloadButton.tsx","views/clearing/delivery/DeliveriesPage.tsx","data/clearing/delivery/hooks/useEditDeliveryState.ts","data/clearing/delivery/hooks/useDeliveryValidator.ts","data/clearing/delivery/api/createDelivery.ts","data/clearing/delivery/api/updateDelivery.ts","data/clearing/delivery/hooks/useDeliveryUpsert.ts","data/clearing/delivery/thunks/upsertDelivery.ts","views/clearing/delivery/navigationComponents.ts","views/clearing/delivery/EditDeliveryPage.tsx","data/clearing/dispute/api/getDispute.ts","data/clearing/dispute/thunks/loadDispute.ts","data/clearing/dispute/hooks/useDisplayDispute.ts","views/clearing/dispute/DisplayDisputeMainAttributes.tsx","data/clearing/dispute/api/printDispute.ts","data/clearing/dispute/hooks/useDisputePrinter.ts","data/clearing/dispute/thunks/printDisputeThunk.ts","views/clearing/dispute/DisplayDispute.tsx","views/clearing/dispute/Locations.ts","data/clearing/dispute/api/deleteDispute.ts","data/clearing/dispute/hooks/useDisputeDelete.ts","data/clearing/dispute/thunks/deleteDispute.ts","views/clearing/dispute/useDisputesActions.tsx","views/clearing/dispute/columRenderers.tsx","views/clearing/dispute/DisputeFilterEditor.tsx","views/clearing/dispute/styles.ts","views/clearing/dispute/DisputeTable.tsx","views/clearing/dispute/useDisputesColumns.tsx","data/clearing/dispute/api/getDisputes.ts","data/clearing/dispute/hooks/useDisputeData.ts","data/clearing/dispute/thunks/loadDisputes.ts","data/clearing/dispute/hooks/useDisputeIndex.ts","data/clearing/dispute/hooks/useDisputeFilter.ts","data/initialData/hooks/useDispSitList.ts","views/components/common/DispSitListSelect.tsx","views/clearing/dispute/DisputeFilterChips.tsx","views/clearing/dispute/DisputeFilter.tsx","data/clearing/dispute/api/getDisputeReport.ts","data/clearing/dispute/hooks/useDisputeReportDownloader.ts","data/clearing/dispute/thunks/downloadReport.ts","data/clearing/dispute/api/getDisputeExcel.ts","data/clearing/dispute/hooks/useDisputeExcelDownloader.ts","data/clearing/dispute/thunks/downloadReportExcel.ts","views/clearing/dispute/DownloadButton.tsx","views/clearing/dispute/DisputePage.tsx","data/clearing/dispute/hooks/useEditDisputeState.ts","data/clearing/dispute/hooks/useDisputeValidator.ts","data/clearing/dispute/api/createDispute.ts","data/clearing/dispute/api/updateDispute.ts","data/clearing/dispute/hooks/useDisputeUpsert.ts","data/clearing/dispute/thunks/upsertDispute.ts","views/clearing/dispute/navigationComponents.ts","views/clearing/dispute/EditDisputePage.tsx","data/clearing/guarantees/api/getGuarantee.ts","data/clearing/guarantees/thunks/loadGuarantees.ts","data/clearing/guarantees/hooks/useDisplayGuarantees.ts","views/clearing/guarantees/DisplayGuaranteeMainAttributes.tsx","data/clearing/guarantees/api/printGuarantee.ts","data/clearing/guarantees/hooks/useGuaranteePrinter.ts","data/clearing/guarantees/thunks/printGuaranteeThunk.ts","views/clearing/guarantees/DisplayGuarantee.tsx","views/clearing/guarantees/Locations.ts","data/clearing/guarantees/api/deleteGuarantees.ts","data/clearing/guarantees/hooks/useGuaranteeDelete.ts","data/clearing/guarantees/thunks/deleteGuarantees.ts","views/clearing/guarantees/useGuaranteesActions.tsx","data/clearing/guarantees/types.ts","views/clearing/guarantees/GuaranteesTable.tsx","views/clearing/guarantees/useGuaranteesColumns.tsx","data/clearing/guarantees/api/getGuarantees.ts","views/clearing/guarantees/GuaranteeFilterEditor.tsx","data/clearing/guarantees/hooks/useGuaranteeData.ts","data/clearing/guarantees/thunks/loadAllGuarantees.ts","data/clearing/guarantees/hooks/useGuaranteeIndex.ts","data/clearing/guarantees/hooks/useGuaranteeFilter.ts","data/clearing/guarantees/hooks/useGuaranteeSideOptions.ts","data/clearing/guarantees/hooks/useGuaranteeDedicationOptions.ts","views/clearing/guarantees/GuaranteesFilterChips.tsx","views/clearing/guarantees/GuaranteeFilter.tsx","data/clearing/guarantees/api/getGuaranteesReport.ts","data/clearing/guarantees/hooks/useGuaranteesReportDownloader.ts","data/clearing/guarantees/thunks/downloadReport.ts","data/clearing/guarantees/api/getGuaranteesExcel.ts","data/clearing/guarantees/hooks/useGuaranteesExcelDownloader.ts","data/clearing/guarantees/thunks/downloadReportExcel.ts","views/clearing/guarantees/DownloadButton.tsx","views/clearing/guarantees/GuaranteesPage.tsx","data/clearing/guarantees/hooks/useEditGuaranteeState.ts","data/clearing/guarantees/hooks/useGuaranteeValidator.ts","data/clearing/guarantees/api/createGuarantees.ts","data/clearing/guarantees/api/updateGuarantees.ts","data/clearing/guarantees/hooks/useGuaranteeUpsert.ts","data/clearing/guarantees/thunks/upsertGuarantees.ts","data/initialData/hooks/usePaymentGuarTypes.ts","views/components/common/PaymentTypeGuarSelect.tsx","data/trading/orders/api/getSimpleOrders.ts","data/trading/orders/thunks/getSimpleOrdersThunk.ts","views/components/trading/FiltredOrdersSelect.tsx","data/trading/orders/hooks/useSimpleOrdersData.ts","data/clearing/bankguarantees/api/getBankGuaranteesSelected.ts","data/clearing/bankguarantees/thunks/loadAllBankGuaranteesSelected.ts","views/components/clearing/BankGuaranteeSelect.tsx","data/clearing/bankguarantees/hooks/useBankGuaranteeDataSelect.ts","views/clearing/guarantees/EditGuaranteePage.tsx","views/clearing/guarantees/navigationComponents.ts","data/clearing/stockfees/api/getAllStockFees.ts","data/clearing/stockfees/thunks/loadAllStockFees.ts","data/clearing/stockfees/api/getStockFee.ts","data/clearing/stockfees/thunks/loadStockFee.ts","data/clearing/stockfees/hooks/useDisplayStockFee.ts","views/clearing/stockFees/DisplayStockFeeMainAttributes.tsx","views/clearing/stockFees/DisplayStockFee.tsx","data/clearing/stockfees/api/deleteStockFee.ts","data/clearing/stockfees/hooks/useStockFeeDelete.ts","data/clearing/stockfees/thunks/deleteStockFee.ts","views/clearing/stockFees/Locations.tsx","views/clearing/stockFees/useStockFeeActions.tsx","views/clearing/stockFees/StockFeesTable.tsx","data/clearing/stockfees/hooks/useStockFeeData.ts","views/clearing/stockFees/useStockFeeColumns.tsx","views/clearing/stockFees/StockFeesPage.tsx","data/clearing/stockfees/hooks/useStockFeeSearch.ts","data/clearing/stockfees/hooks/useEditstockFeeState.ts","data/clearing/stockfees/hooks/useStockFeeValidator.ts","data/clearing/stockfees/api/createStockFee.ts","data/clearing/stockfees/api/updateStockFee.ts","data/clearing/stockfees/hooks/useStockFeeUpsert.ts","data/clearing/stockfees/thunks/upsertStockFee.ts","views/clearing/stockFees/navigationComponents.tsx","views/clearing/stockFees/EditStockFeePage.tsx","data/clearing/transportfees/api/getAllTransportFees.ts","data/clearing/transportfees/thunks/loadAllTransportFees.ts","data/clearing/transportfees/api/getTransportFee.ts","data/clearing/transportAndStorage/types.ts","data/clearing/transportfees/thunks/loadTransportFee.ts","data/clearing/transportfees/hooks/useDisplayTransportFee.ts","views/clearing/transportFees/DisplayTransportFeeMainAttributes.tsx","views/clearing/transportFees/DisplayTransportFee.tsx","data/clearing/transportfees/api/deleteTransportFee.ts","data/clearing/transportfees/hooks/useTransportFeeDelete.ts","data/clearing/transportfees/thunks/deleteTransportFee.ts","views/clearing/transportFees/Locations.tsx","views/clearing/transportFees/useTransportFeeActions.tsx","views/clearing/transportFees/TransportFeesTable.tsx","data/clearing/transportfees/hooks/useTransportFeeData.ts","views/clearing/transportFees/useTransportFeeColumns.tsx","views/clearing/transportFees/TransportFeesPage.tsx","data/clearing/transportfees/hooks/useTransportFeeSearch.ts","data/clearing/transportfees/hooks/useEditTransportFeeState.ts","data/clearing/transportfees/hooks/useTransportFeeValidator.ts","data/clearing/transportfees/api/createTransportFee.ts","data/clearing/transportfees/api/updateTransportFee.ts","data/clearing/transportfees/hooks/useTransportFeeUpsert.ts","data/clearing/transportfees/thunks/upsertTransportFee.ts","views/clearing/transportFees/navigationComponents.tsx","views/clearing/transportFees/EditTransportFeePage.tsx","data/clearing/transportAndStorage/hooks/useEditCalculationParamsState.ts","data/clearing/transportAndStorage/hooks/useCalculationParamsValidator.ts","data/clearing/transportAndStorage/hooks/useTASCalculator.ts","data/clearing/transportAndStorage/thunks/calculateTASCostsThunk.ts","data/clearing/transportAndStorage/api/getTASCosts.ts","data/clearing/transportAndStorage/hooks/useTASCostSaver.ts","data/clearing/transportAndStorage/thunks/saveTASCostsThunk.ts","data/clearing/transportAndStorage/api/updateTASCosts.ts","views/clearing/transportAndStorage/ClaculateTASCosts.tsx","views/clearing/transportAndStorage/ClaculateTASCostsDrawer.tsx","views/clearing/transportAndStorage/useTTASCostsActions.tsx","views/clearing/transportAndStorage/TradesTable.tsx","data/clearing/transportAndStorage/thunks/getTradesThunk.ts","data/clearing/transportAndStorage/thunks/loadTrades.ts","data/clearing/transportAndStorage/hooks/useTradesIndex.ts","views/clearing/transportAndStorage/TradesFilter.tsx","data/clearing/transportAndStorage/hooks/useTradesFilter.ts","views/clearing/transportAndStorage/navigationComponents.ts","views/clearing/transportAndStorage/TASCostPage.tsx","data/clearing/transportAndStorage/hooks/useTradesData.ts","views/clearing/transportAndStorage/Locations.ts","data/clearing/tradingData/api/getTradingData.ts","data/clearing/tradingData/thunks/loadTradingData.ts","data/clearing/tradingData/hooks/useDisplayTradingData.ts","views/clearing/tradingData/DisplayTradingDataMainAttributes.tsx","data/clearing/tradingData/api/printTradingData.ts","data/clearing/tradingData/hooks/useTradingDataPrinter.ts","data/clearing/tradingData/thunks/printTradingDataThunk.ts","views/clearing/tradingData/DisplayTradingData.tsx","views/clearing/tradingData/Locations.ts","views/clearing/tradingData/useTradingDataActions.tsx","views/clearing/tradingData/TradingDataFilterEditor.tsx","views/clearing/tradingData/TradingDataTable.tsx","views/clearing/tradingData/useTradingDataColumns.tsx","data/clearing/tradingData/api/getAllTradingData.ts","data/clearing/tradingData/hooks/useTradingDataData.ts","data/clearing/tradingData/thunks/loadAllTradingData.ts","data/clearing/tradingData/hooks/useTradingDataIndex.ts","data/clearing/tradingData/hooks/useTradingDataFilter.ts","views/clearing/tradingData/TradingDataFilterChips.tsx","views/clearing/tradingData/TradingDataFilter.tsx","data/clearing/tradingData/api/getRefPriceButton.ts","data/clearing/tradingData/hooks/useRefPriceButton.ts","data/clearing/tradingData/thunks/loadRefPriceButton.ts","views/clearing/tradingData/RefPriceButton.tsx","views/clearing/tradingData/TradingDateInput.tsx","data/clearing/tradingData/api/getRefPriceReport.ts","data/clearing/tradingData/hooks/useRefPriceReportDownloader.ts","data/clearing/tradingData/thunks/downloadReport.ts","data/clearing/tradingData/api/getRefPriceExcel.ts","data/clearing/tradingData/hooks/useRefPriceExcelDownloader.ts","data/clearing/tradingData/thunks/downloadReportExcel.ts","views/clearing/tradingData/DownloadButton.tsx","views/clearing/tradingData/TradingDataPage.tsx","data/clearing/tradingData/hooks/useEditTradingDataState.ts","data/clearing/tradingData/hooks/useTradingDataValidator.ts","data/clearing/tradingData/api/updateTradingData.ts","data/clearing/tradingData/hooks/useTradingDataUpsert.ts","data/clearing/tradingData/thunks/upsertTradingData.ts","views/clearing/tradingData/navigationComponents.ts","views/clearing/tradingData/EditTradingDataPage.tsx","data/clearing/marginsData/api/getMarginsData.ts","data/clearing/marginsData/thunks/loadMarginsData.ts","data/clearing/marginsData/hooks/useDisplayMarginsData.ts","views/clearing/marginsData/DisplayMarginsDataMainAttributes.tsx","data/clearing/marginsData/api/printMargins.ts","data/clearing/marginsData/hooks/useMarginsPrinter.ts","data/clearing/marginsData/thunks/printMarginsThunk.ts","views/clearing/marginsData/DisplayMarginsData.tsx","views/clearing/marginsData/useMarginsDataActions.tsx","views/clearing/marginsData/useMarginsDataColumns.tsx","data/trading/trades/types.ts","views/clearing/marginsData/MarginsDataFilterEditor.tsx","views/clearing/marginsData/MarginsDataTable.tsx","data/clearing/marginsData/api/getAllMarginsData.ts","data/clearing/marginsData/hooks/useMarginsDataData.ts","data/clearing/marginsData/thunks/loadAllMarginsData.ts","data/clearing/marginsData/hooks/useMarginsDataIndex.ts","data/clearing/marginsData/hooks/useMarginsDataFilter.ts","data/trading/trades/api/getTradesSimpleData.ts","data/trading/trades/thunks/getSimpleTradesThunk.ts","views/components/trading/FiltredSimpleOrdersSelect.tsx","data/trading/trades/hooks/useSimpleTradesData.ts","views/clearing/marginsData/MarginsDataFilterChips.tsx","views/clearing/marginsData/MarginsDataFilter.tsx","data/clearing/marginsData/api/getMarginsDataButton.ts","data/clearing/marginsData/hooks/useMarginsDataButton.ts","data/clearing/marginsData/thunks/loadMarginsDataButton.ts","views/clearing/marginsData/MarginsDataButton.tsx","views/clearing/marginsData/MarginsDateInput.tsx","data/clearing/marginsData/api/getMarginsReport.ts","data/clearing/marginsData/hooks/useMarginsReportDownloader.ts","data/clearing/marginsData/thunks/downloadReport.ts","data/clearing/marginsData/api/getMarginsExcel.ts","data/clearing/marginsData/hooks/useMarginsExcelDownloader.ts","data/clearing/marginsData/thunks/downloadReportExcel.ts","views/clearing/marginsData/DownloadButton.tsx","views/clearing/marginsData/MarginsDataPage.tsx","views/clearing/marginsData/navigationComponents.ts","views/clearing/marginsData/Locations.ts","data/clearing/bankguarantees/api/getBankGuarantee.ts","data/clearing/bankguarantees/thunks/loadBankGuarantees.ts","data/clearing/bankguarantees/hooks/useDisplayBankGuarantees.ts","views/clearing/bankguarantees/DisplayBankGuaranteeMainAttributes.tsx","data/clearing/bankguarantees/api/printBankGuarantees.ts","data/clearing/bankguarantees/hooks/useBankGuaranteesPrinter.ts","data/clearing/bankguarantees/thunks/printBankGuaranteesThunk.ts","views/clearing/bankguarantees/DisplayBankGuarantee.tsx","views/clearing/bankguarantees/Locations.ts","data/clearing/bankguarantees/api/deleteBankGuarantees.ts","data/clearing/bankguarantees/hooks/useBankGuaranteeDelete.ts","data/clearing/bankguarantees/thunks/deleteBankGuarantees.ts","views/clearing/bankguarantees/useBankGuaranteesActions.tsx","views/clearing/bankguarantees/BankGuaranteeFilterEditor.tsx","views/clearing/bankguarantees/BankGuaranteesTable.tsx","views/clearing/bankguarantees/useBankGuaranteesColumns.tsx","data/clearing/bankguarantees/api/getBankGuarantees.ts","data/clearing/bankguarantees/hooks/useBankGuaranteeData.ts","data/clearing/bankguarantees/thunks/loadAllBankGuarantees.ts","data/clearing/bankguarantees/hooks/useBankGuaranteeIndex.ts","data/clearing/bankguarantees/hooks/useBankGuaranteeFilter.ts","views/reports/weeklyTrades/WTRFilterEditor.tsx","views/clearing/bankguarantees/BankGuaranteesFilterChips.tsx","views/clearing/bankguarantees/BankGuaranteeFilter.tsx","data/clearing/bankguarantees/api/getBankGuaranteesReport.ts","data/clearing/bankguarantees/hooks/useBankGuaranteesReportDownloader.ts","data/clearing/bankguarantees/thunks/downloadReport.ts","data/clearing/bankguarantees/api/getBankGuaranteesExcel.ts","data/clearing/bankguarantees/hooks/useBankGuaranteesExcelDownloader.ts","data/clearing/bankguarantees/thunks/downloadReportExcel.ts","views/clearing/bankguarantees/DownloadButton.tsx","views/clearing/bankguarantees/BankGuaranteesPage.tsx","data/clearing/bankguarantees/hooks/useEditBankGuaranteeState.ts","data/clearing/bankguarantees/hooks/useBankGuaranteeValidator.ts","data/clearing/bankguarantees/api/createBankGuarantees.ts","data/clearing/bankguarantees/api/updateBankGuarantees.ts","data/clearing/bankguarantees/hooks/useBankGuaranteeUpsert.ts","data/clearing/bankguarantees/thunks/upsertBankGuarantees.ts","views/clearing/bankguarantees/navigationComponents.ts","views/clearing/bankguarantees/EditBankGuaranteePage.tsx","views/clearing/clearingNavigationItems.ts","views/reports/ordersReport/OrdersTable.tsx","views/reports/ordersReport/useOrderReportsColumns.tsx","data/reports/ordersReport/hooks/useOrdersReportData.ts","data/reports/ordersReport/thunks/loadOrdersReport.ts","data/reports/ordersReport/hooks/useOrdersReportIndex.ts","data/reports/ordersReport/hooks/useOrdersReportFilter.ts","views/reports/ordersReport/OrdersReportFilter.tsx","data/reports/ordersReport/api/getOrderListReport.ts","data/reports/ordersReport/hooks/useOrderReportDownloader.ts","data/reports/ordersReport/thunks/downloadReport.ts","data/reports/ordersReport/api/getOrderListReportExcel.ts","data/reports/ordersReport/hooks/useOrderExcelReportDownloader.ts","data/reports/ordersReport/thunks/downloadReportExcel.ts","views/reports/ordersReport/DownloadButton.tsx","views/reports/ordersReport/OrdersReport.tsx","views/reports/ordersReport/navigationComponents.ts","views/reports/ordersReport/Locations.ts","views/reports/tradesReport/TradesReportTable.tsx","views/reports/tradesReport/useTradesReportColumns.tsx","data/reports/tradesReport/hooks/useTradesReportData.ts","data/reports/tradesReport/thunks/loadTradesReport.ts","data/reports/tradesReport/hooks/useTradesReportIndex.ts","data/reports/tradesReport/hooks/useTradesReportFilter.ts","views/reports/tradesReport/TradesReportFilter.tsx","data/reports/tradesReport/api/getTradeBookReport.ts","data/reports/tradesReport/hooks/useTradesReportDownloader.ts","data/reports/tradesReport/thunks/downloadReport.ts","data/reports/tradesReport/api/getTradeBookExcel.ts","data/reports/tradesReport/hooks/useTradesExcelDownloader.ts","data/reports/tradesReport/thunks/downloadReportExcel.ts","views/reports/tradesReport/DownloadButton.tsx","views/reports/tradesReport/TradesReport.tsx","views/reports/tradesReport/navigationComponents.ts","views/reports/tradesReport/Locations.ts","views/reports/tradesReportClientAll/TradesReportTable.tsx","views/reports/tradesReportClientAll/useTradesReportColumns.tsx","data/reports/tradesReportClientAll/api/getTrades.ts","data/reports/tradesReportClientAll/thunks/getTradesThunk.ts","data/reports/tradesReportClientAll/hooks/useTradesReportData.ts","data/reports/tradesReportClientAll/thunks/loadTradesReport.ts","data/reports/tradesReportClientAll/hooks/useTradesReportIndex.ts","data/reports/tradesReportClientAll/hooks/useTradesReportFilter.ts","views/reports/tradesReportClientAll/TradesFilterEditor.tsx","views/reports/tradesReportClientAll/TradesReportFilter.tsx","data/reports/tradesReportClientAll/api/getTradeBookReport.ts","data/reports/tradesReportClientAll/hooks/useTradesReportDownloader.ts","data/reports/tradesReportClientAll/thunks/downloadReport.ts","data/reports/tradesReportClientAll/api/getTradeBookExcel.ts","data/reports/tradesReportClientAll/hooks/useTradesExcelDownloader.ts","data/reports/tradesReportClientAll/thunks/downloadReportExcel.ts","views/reports/tradesReportClientAll/DownloadButton.tsx","views/reports/tradesReportClientAll/TradesReport.tsx","views/reports/tradesReportClientAll/navigationComponents.ts","views/reports/tradesReportClientAll/Locations.ts","data/reports/dailyTrade/api/getDailyTradingData.ts","data/reports/dailyTrade/hooks/useTradesReportData.ts","data/reports/dailyTrade/thunks/loadReportData.ts","views/reports/dailyTrades/DailyTradesReportTable.tsx","views/reports/dailyTrades/useDailyTradingReportColumns.tsx","data/reports/dailyTrade/hooks/useDailyTradesReportIndex.ts","views/reports/dailyTrades/DailyTradesReportFilter.tsx","data/reports/dailyTrade/hooks/useTradesReportFilter.ts","data/reports/dailyTrade/api/getDailyTradingReport.ts","data/reports/dailyTrade/hooks/useTradesReportDownloader.ts","data/reports/dailyTrade/thunks/downloadReport.ts","data/reports/dailyTrade/api/getDailyTradingExcel.ts","data/reports/dailyTrade/hooks/useDailyTradingExcelDownloader.ts","data/reports/dailyTrade/thunks/downloadReportExcel.ts","views/reports/dailyTrades/DownloadButton.tsx","views/reports/dailyTrades/DailyTradesReport.tsx","views/reports/dailyTrades/navigationComponents.ts","views/reports/dailyTrades/Locations.ts","data/reports/weeklyTrade/api/getWeeklyTradingDataList.ts","data/reports/weeklyTrade/hooks/useTradesReportData.ts","data/reports/weeklyTrade/thunks/loadReportData.ts","views/reports/weeklyTrades/Locations.ts","views/reports/weeklyTrades/useWeeklyActions.tsx","views/reports/weeklyTrades/WeeklyTradesReportTable.tsx","views/reports/weeklyTrades/useWeeklyTradingReportColumns.tsx","data/reports/weeklyTrade/hooks/useWeeklyTradesReportIndex.ts","data/reports/weeklyTrade/api/getWeeklyProductReport.ts","data/reports/weeklyTrade/hooks/useWTReportDownloaderProduct.ts","data/reports/weeklyTrade/thunks/downloadWeeklyProductReport.ts","data/reports/weeklyTrade/api/getWeeklyProductExcel.ts","data/reports/weeklyTrade/hooks/useWTExcelDownloaderProducts.ts","data/reports/weeklyTrade/thunks/downloadWeeklyProductReportExcel.ts","data/reports/weeklyTrade/api/getWeeklyClientReport.ts","data/reports/weeklyTrade/hooks/useWTReportDownloaderClients.ts","data/reports/weeklyTrade/thunks/downloadWeeklyClientReport.ts","data/reports/weeklyTrade/api/getWeeklyClientExcel.ts","data/reports/weeklyTrade/hooks/useWTExcelDownloaderClients.ts","data/reports/weeklyTrade/thunks/downloadWeeklyClientReportExcel.ts","data/reports/weeklyTrade/api/getWeeklyDateReport.ts","data/reports/weeklyTrade/hooks/useWTReportDownloaderDate.ts","data/reports/weeklyTrade/thunks/downloadWeeklyDateReport.ts","data/reports/weeklyTrade/api/getWeeklyDateExcel.ts","data/reports/weeklyTrade/hooks/useWTExcelDownloaderDate.ts","data/reports/weeklyTrade/thunks/downloadWeeklyDateReportExcel.ts","data/reports/weeklyTrade/api/getWeeklyTradingDataReport.ts","data/reports/weeklyTrade/hooks/useWTReportDownloader.ts","data/reports/weeklyTrade/thunks/downloadWeeklyReport.ts","data/reports/weeklyTrade/api/getWeeklyTradingDataExcel.ts","data/reports/weeklyTrade/hooks/useWTExcelDownloader.ts","data/reports/weeklyTrade/thunks/downloadWeeklyTradingExcel.ts","views/reports/weeklyTrades/DownloadButton.tsx","views/reports/monthlyTrades/MTRFilterEditor.tsx","views/reports/weeklyTrades/WTRFilter.tsx","data/reports/weeklyTrade/hooks/useWTRFilter.ts","views/reports/weeklyTrades/WeeklyTradesReport.tsx","data/reports/weeklyTrade/api/getWeeklyProductData.ts","data/reports/weeklyTrade/hooks/useReportProductData.ts","data/reports/weeklyTrade/thunks/loadReportProductData.ts","views/reports/weeklyTrades/WTRProductTable.tsx","views/reports/weeklyTrades/useWTReportProductColumns.tsx","data/reports/weeklyTrade/hooks/useTradesReportFilter.ts","views/reports/weeklyTrades/WTRProductPage.tsx","data/reports/weeklyTrade/api/getWeeklyClientData.ts","data/reports/weeklyTrade/hooks/useReportClientData.ts","data/reports/weeklyTrade/thunks/loadReportClientData.ts","views/reports/weeklyTrades/WTRClientTable.tsx","views/reports/weeklyTrades/useWTReportClientColumns.tsx","views/reports/weeklyTrades/WTRClientPage.tsx","data/reports/weeklyTrade/api/getWeeklyDateData.ts","data/reports/weeklyTrade/hooks/useReportDateData.ts","data/reports/weeklyTrade/thunks/loadReportDateData.ts","views/reports/weeklyTrades/WTRDateTable.tsx","views/reports/weeklyTrades/useWTReportDateColumns.tsx","views/reports/weeklyTrades/WTRDatePage.tsx","views/reports/weeklyTrades/navigationComponents.ts","data/reports/monthlyTrade/api/getMonthlyTradingDataList.ts","data/reports/monthlyTrade/hooks/useTradesReportData.ts","data/reports/monthlyTrade/thunks/loadReportData.ts","views/reports/monthlyTrades/Locations.ts","views/reports/monthlyTrades/useMonthlyActions.tsx","views/reports/monthlyTrades/MonthlyTradesReportTable.tsx","views/reports/monthlyTrades/useMonthlyTradingReportColumns.tsx","data/reports/monthlyTrade/hooks/useMonthlyTradesReportIndex.ts","data/reports/monthlyTrade/api/getMonthlyProductReport.ts","data/reports/monthlyTrade/hooks/useMTReportDownloaderProduct.ts","data/reports/monthlyTrade/thunks/downloadMonthlyProductReport.ts","data/reports/monthlyTrade/api/getMonthlyProductExcel.ts","data/reports/monthlyTrade/hooks/useMTExcelDownloaderProducts.ts","data/reports/monthlyTrade/thunks/downloadMonthlyProductReportExcel.ts","data/reports/monthlyTrade/api/getMonthlyClientReport.ts","data/reports/monthlyTrade/hooks/useMTReportDownloaderClients.ts","data/reports/monthlyTrade/thunks/downloadMonthlyClientReport.ts","data/reports/monthlyTrade/api/getMonthlyClientExcel.ts","data/reports/monthlyTrade/hooks/useMTExcelDownloaderClients.ts","data/reports/monthlyTrade/thunks/downloadMonthlyClientReportExcel.ts","data/reports/monthlyTrade/api/getMonthlyDateReport.ts","data/reports/monthlyTrade/hooks/useMTReportDownloaderDate.ts","data/reports/monthlyTrade/thunks/downloadMonthlyDateReport.ts","data/reports/monthlyTrade/api/getMonthlyDateExcel.ts","data/reports/monthlyTrade/hooks/useMTExcelDownloaderDate.ts","data/reports/monthlyTrade/thunks/downloadMonthlyDateReportExcel.ts","data/reports/monthlyTrade/api/getMonthlyReport.ts","data/reports/monthlyTrade/hooks/useMTReportDownloader.ts","data/reports/monthlyTrade/thunks/downloadMonthlyReport.ts","data/reports/monthlyTrade/api/getMonthlyExcel.ts","data/reports/monthlyTrade/hooks/useMTExcelDownloader.ts","data/reports/monthlyTrade/thunks/downloadMonthlyReportExcel.ts","views/reports/monthlyTrades/DownloadButton.tsx","views/reports/annualTrades/ATRFilterEditor.tsx","views/reports/monthlyTrades/MTRFilter.tsx","data/reports/monthlyTrade/hooks/useMTRFilter.ts","views/reports/monthlyTrades/MonthlyTradesReport.tsx","data/reports/monthlyTrade/api/getMonthlyProductData.ts","data/reports/monthlyTrade/hooks/useReportProductData.ts","data/reports/monthlyTrade/thunks/loadReportProductData.ts","views/reports/monthlyTrades/MTRProductTable.tsx","views/reports/monthlyTrades/useMTReportProductColumns.tsx","data/reports/monthlyTrade/hooks/useTradesReportFilter.ts","views/reports/monthlyTrades/MTRProductPage.tsx","data/reports/monthlyTrade/api/getMonthlyClientData.ts","data/reports/monthlyTrade/hooks/useReportClientData.ts","data/reports/monthlyTrade/thunks/loadReportClientData.ts","views/reports/monthlyTrades/MTRClientTable.tsx","views/reports/monthlyTrades/useMTReportClientColumns.tsx","views/reports/monthlyTrades/MTRClientPage.tsx","data/reports/monthlyTrade/api/getMonthlyDateData.ts","data/reports/monthlyTrade/hooks/useReportDateData.ts","data/reports/monthlyTrade/thunks/loadReportDateData.ts","views/reports/monthlyTrades/MTRDateTable.tsx","views/reports/monthlyTrades/useMTReportDateColumns.tsx","views/reports/monthlyTrades/MTRDatePage.tsx","views/reports/monthlyTrades/navigationComponents.ts","data/reports/annualTrade/api/getAnnualTradingDataList.ts","data/reports/annualTrade/hooks/useTradesReportData.ts","data/reports/annualTrade/thunks/loadReportData.ts","views/reports/annualTrades/Locations.ts","views/reports/annualTrades/useAnnualActions.tsx","views/reports/annualTrades/AnnualTradesReportTable.tsx","views/reports/annualTrades/useAnnualTradingReportColumns.tsx","data/reports/annualTrade/hooks/useAnnualTradesReportIndex.ts","data/reports/annualTrade/api/getAnnualProductReport.ts","data/reports/annualTrade/hooks/useATReportDownloaderProduct.ts","data/reports/annualTrade/thunks/downloadAnnualProductReport.ts","data/reports/annualTrade/api/getAnnualProductExcel.ts","data/reports/annualTrade/hooks/useATExcelDownloaderProducts.ts","data/reports/annualTrade/thunks/downloadAnnualProductReportExcel.ts","data/reports/annualTrade/api/getAnnualClientReport.ts","data/reports/annualTrade/hooks/useATReportDownloaderClients.ts","data/reports/annualTrade/thunks/downloadAnnualClientReport.ts","data/reports/annualTrade/api/getAnnualClientExcel.ts","data/reports/annualTrade/hooks/useATExcelDownloaderClients.ts","data/reports/annualTrade/thunks/downloadAnnualClientReportExcel.ts","data/reports/annualTrade/api/getAnnualDateReport.ts","data/reports/annualTrade/hooks/useATReportDownloaderDate.ts","data/reports/annualTrade/thunks/downloadAnnualDateReport.ts","data/reports/annualTrade/api/getAnnualDateExcel.ts","data/reports/annualTrade/hooks/useATExcelDownloaderDate.ts","data/reports/annualTrade/thunks/downloadAnnualDateReportExcel.ts","data/reports/annualTrade/api/getAnnualReport.ts","data/reports/annualTrade/hooks/useATReportDownloader.ts","data/reports/annualTrade/thunks/downloadAnnualReport.ts","data/reports/annualTrade/api/getAnnualExcel.ts","data/reports/annualTrade/hooks/useATExcelDownloader.ts","data/reports/annualTrade/thunks/downloadAnnualExcel.ts","views/reports/annualTrades/DownloadButton.tsx","views/reports/annualTrades/ATRFilter.tsx","data/reports/annualTrade/hooks/useATRFilter.ts","views/reports/annualTrades/AnnualTradesReport.tsx","data/reports/annualTrade/api/getAnnualProductData.ts","data/reports/annualTrade/hooks/useReportProductData.ts","data/reports/annualTrade/thunks/loadReportProductData.ts","views/reports/annualTrades/ATRProductTable.tsx","views/reports/annualTrades/useATReportProductColumns.tsx","data/reports/annualTrade/hooks/useTradesReportFilter.ts","views/reports/annualTrades/ATRProductPage.tsx","data/reports/annualTrade/api/getAnnualClientData.ts","data/reports/annualTrade/hooks/useReportClientData.ts","data/reports/annualTrade/thunks/loadReportClientData.ts","views/reports/annualTrades/ATRClientTable.tsx","views/reports/annualTrades/useATReportClientColumns.tsx","views/reports/annualTrades/ATRClientPage.tsx","data/reports/annualTrade/api/getAnnualDateData.ts","data/reports/annualTrade/hooks/useReportDateData.ts","data/reports/annualTrade/thunks/loadReportDateData.ts","views/reports/annualTrades/ATRDateTable.tsx","views/reports/annualTrades/useATReportDateColumns.tsx","views/reports/annualTrades/ATRDatePage.tsx","views/reports/annualTrades/navigationComponents.ts","data/reports/securityCommission/monthlyTrade/api/getMonthlyTradingData.ts","data/reports/securityCommission/monthlyTrade/hooks/useTradesReportData.ts","data/reports/securityCommission/monthlyTrade/thunks/loadReportData.ts","views/reports/securityCommission/monthlyTrades/MonthlyTradesReportTable.tsx","views/reports/securityCommission/monthlyTrades/useMonthlyTradingReportColumns.tsx","data/reports/securityCommission/monthlyTrade/hooks/useTradesReportIndex.ts","views/components/reports/DatePartSelect.tsx","views/reports/securityCommission/monthlyTrades/MonthlyTradesReportFilter.tsx","data/reports/securityCommission/monthlyTrade/hooks/useTradesReportFilter.ts","data/reports/securityCommission/monthlyTrade/api/getMonthlyTradingReport.ts","data/reports/securityCommission/monthlyTrade/hooks/useTradesReportDownloader.ts","data/reports/securityCommission/monthlyTrade/thunks/downloadReport.ts","data/reports/securityCommission/monthlyTrade/api/getMonthlyTradingExcel.ts","data/reports/securityCommission/monthlyTrade/hooks/useTradesReportExcelDownloader.ts","data/reports/securityCommission/monthlyTrade/thunks/downloadReportExcel.ts","views/reports/securityCommission/monthlyTrades/DownloadButton.tsx","views/reports/securityCommission/monthlyTrades/MonthlyTradesReport.tsx","views/reports/securityCommission/monthlyTrades/navigationComponents.ts","views/reports/securityCommission/monthlyTrades/Locations.ts","data/reports/securityCommission/securityDaily/api/getDailySecurityData.ts","data/reports/securityCommission/securityDaily/hooks/useSecurityReportData.ts","data/reports/securityCommission/securityDaily/thunks/loadReportData.ts","views/reports/securityCommission/securityDaily/DailySecurityReportTable.tsx","views/reports/securityCommission/securityDaily/useDailySecurityReportColumns.tsx","data/reports/securityCommission/securityDaily/hooks/useSecurityReportIndex.ts","views/reports/securityCommission/securityDaily/DailySecurityReportFilter.tsx","data/reports/securityCommission/securityDaily/hooks/useSecurityReportFilter.ts","data/reports/securityCommission/securityDaily/api/getDailySecurityReport.ts","data/reports/securityCommission/securityDaily/hooks/useSecurityReportDownloader.ts","data/reports/securityCommission/securityDaily/thunks/downloadReport.ts","data/reports/securityCommission/securityDaily/api/getDailySecurityExcel.ts","data/reports/securityCommission/securityDaily/hooks/useDailySecurityExcelDownloader.ts","data/reports/securityCommission/securityDaily/thunks/downloadReportExcel.ts","views/reports/securityCommission/securityDaily/DownloadButton.tsx","views/reports/securityCommission/securityDaily/DailySecurityReport.tsx","views/reports/securityCommission/securityDaily/navigationComponents.ts","views/reports/securityCommission/securityDaily/Locations.ts","data/reports/securityCommission/securityAnnual/api/getAnnualSecurityData.ts","data/reports/securityCommission/securityAnnual/hooks/useSecurityReportData.ts","data/reports/securityCommission/securityAnnual/thunks/loadReportData.ts","views/reports/securityCommission/securityAnnual/AnnualTradesReportTable.tsx","views/reports/securityCommission/securityAnnual/useAnnualTradingReportColumns.tsx","data/reports/securityCommission/securityAnnual/hooks/useSecurityReportIndex.ts","views/reports/securityCommission/securityAnnual/AnnualTradesReportFilter.tsx","data/reports/securityCommission/securityAnnual/hooks/useSecurityReportFilter.ts","data/reports/securityCommission/securityAnnual/api/getAnnualSecurityReport.ts","data/reports/securityCommission/securityAnnual/hooks/useSecurityReportDownloader.ts","data/reports/securityCommission/securityAnnual/thunks/downloadReport.ts","data/reports/securityCommission/securityAnnual/api/getAnnualSecurityExcel.ts","data/reports/securityCommission/securityAnnual/hooks/useAnnualSecurityExcelDownloader.ts","data/reports/securityCommission/securityAnnual/thunks/downloadReportExcel.ts","views/reports/securityCommission/securityAnnual/DownloadButton.tsx","views/reports/securityCommission/securityAnnual/AnnualTradesReport.tsx","views/reports/securityCommission/securityAnnual/navigationComponents.ts","views/reports/securityCommission/securityAnnual/Locations.ts","data/reports/securityCommission/securityQuarterly/api/getQuarterlySecurityData.ts","data/reports/securityCommission/securityQuarterly/hooks/useSecurityReportData.ts","data/reports/securityCommission/securityQuarterly/thunks/loadReportData.ts","views/reports/securityCommission/securityQuarterly/QuarterlyTradesReportTable.tsx","views/reports/securityCommission/securityQuarterly/useQuarterlyTradingReportColumns.tsx","data/reports/securityCommission/securityQuarterly/hooks/useSecurityReportIndex.ts","views/reports/securityCommission/securityQuarterly/QuarterlyTradesReportFilter.tsx","data/reports/securityCommission/securityQuarterly/hooks/useSecurityReportFilter.ts","data/reports/securityCommission/securityQuarterly/api/getQuarterlySecurityReport.ts","data/reports/securityCommission/securityQuarterly/hooks/useSecurityReportDownloader.ts","data/reports/securityCommission/securityQuarterly/thunks/downloadReport.ts","data/reports/securityCommission/securityQuarterly/api/getQuarterlySecurityExcel.ts","data/reports/securityCommission/securityQuarterly/hooks/useQuarterlySecurityExcelDownloader.ts","data/reports/securityCommission/securityQuarterly/thunks/downloadReportExcel.ts","views/reports/securityCommission/securityQuarterly/DownloadButton.tsx","views/reports/securityCommission/securityQuarterly/QuarterlyTradesReport.tsx","views/reports/securityCommission/securityQuarterly/navigationComponents.ts","views/reports/securityCommission/securityQuarterly/Locations.ts","views/reports/securityCommission/securityCommissionComponents.ts","data/reports/amlaundering/api/getAntiLaunderingData.ts","data/reports/amlaundering/hooks/useAntiMnyLndCommReportData.ts","data/reports/amlaundering/thunks/loadReportData.ts","views/reports/amlaundering/AntiMnyLndCommReportTable.tsx","views/reports/amlaundering/useAntiMnyLndCommReportColumns.tsx","data/reports/amlaundering/hooks/useAntiMnyLndCommReportIndex.ts","data/reports/amlaundering/hooks/useAntiMnyLndCommReportFilter.ts","views/reports/amlaundering/AntiMnyLndCommFilterEditor.tsx","views/reports/amlaundering/AntiMnyLndCommReportFilter.tsx","data/reports/amlaundering/api/getAntiLaunderingReport.ts","data/reports/amlaundering/hooks/useAntiMnyLndCommReportDownloader.ts","data/reports/amlaundering/thunks/downloadReport.ts","data/reports/amlaundering/api/getAntiLaunderingExcel.ts","data/reports/amlaundering/hooks/useAntiMnyLndCommExcelDownloader.ts","data/reports/amlaundering/thunks/downloadReportExcel.ts","views/reports/amlaundering/DownloadButton.tsx","views/reports/amlaundering/AntiMnyLndCommReport.tsx","views/reports/amlaundering/navigationComponents.ts","views/reports/amlaundering/Locations.ts","data/reports/exchbusiness/memberContracts/api/getMemberContractsData.ts","data/reports/exchbusiness/memberContracts/hooks/useMemberContractsReportData.ts","data/reports/exchbusiness/memberContracts/thunks/loadReportData.ts","views/reports/exchbusiness/memberContracts/MemberContractsReportTable.tsx","views/reports/exchbusiness/memberContracts/useMemberContractsReportColumns.tsx","data/reports/exchbusiness/memberContracts/hooks/useMemberContractsReportIndex.ts","data/reports/exchbusiness/memberContracts/api/getMemberContractsReport.ts","data/reports/exchbusiness/memberContracts/hooks/useMemberContractsReportDownloader.ts","data/reports/exchbusiness/memberContracts/thunks/downloadReport.ts","data/reports/exchbusiness/memberContracts/api/getMemberContractsExcel.ts","data/reports/exchbusiness/memberContracts/hooks/useMemberContractsExcelDownloader.ts","data/reports/exchbusiness/memberContracts/thunks/downloadReportExcel.ts","views/reports/exchbusiness/memberContracts/DownloadButton.tsx","views/reports/exchbusiness/memberContracts/MemberContractsReport.tsx","views/reports/exchbusiness/memberContracts/navigationComponents.ts","views/reports/exchbusiness/memberContracts/Locations.ts","data/reports/exchbusiness/tradeReview/api/getTradeReviewData.ts","data/reports/exchbusiness/tradeReview/hooks/useTradeReviewReportData.ts","data/reports/exchbusiness/tradeReview/thunks/loadReportData.ts","views/reports/exchbusiness/tradeReview/TradeReviewReportTable.tsx","views/reports/exchbusiness/tradeReview/useTradeReviewReportColumns.tsx","data/reports/exchbusiness/tradeReview/hooks/useTradeReviewReportIndex.ts","data/reports/exchbusiness/tradeReview/hooks/useTradeReviewReportFilter.ts","views/reports/exchbusiness/tradeReview/TradereviewFilterEditor.tsx","views/reports/exchbusiness/tradeReview/TradeReviewReportFilter.tsx","data/reports/exchbusiness/tradeReview/api/getTradeReviewReport.ts","data/reports/exchbusiness/tradeReview/hooks/useTradeReviewReportDownloader.ts","data/reports/exchbusiness/tradeReview/thunks/downloadReport.ts","data/reports/exchbusiness/tradeReview/api/getTradeReviewExcel.ts","data/reports/exchbusiness/tradeReview/hooks/useTradeReviewExcelDownloader.ts","data/reports/exchbusiness/tradeReview/thunks/downloadReportExcel.ts","views/reports/exchbusiness/tradeReview/DownloadButton.tsx","views/reports/exchbusiness/tradeReview/TradeReviewReport.tsx","views/reports/exchbusiness/tradeReview/navigationComponents.ts","views/reports/exchbusiness/tradeReview/Locations.ts","data/reports/exchbusiness/tradeByProducts/api/getTradeByProductsData.ts","data/reports/exchbusiness/tradeByProducts/hooks/useTradeByProductsReportData.ts","data/reports/exchbusiness/tradeByProducts/thunks/loadReportData.ts","views/reports/exchbusiness/tradeByProducts/TradeByProductsReportTable.tsx","views/reports/exchbusiness/tradeByProducts/useTradeByProductsReportColumns.tsx","data/reports/exchbusiness/tradeByProducts/hooks/useTradeByProductsReportIndex.ts","data/reports/exchbusiness/tradeByProducts/hooks/useTradeByProductsReportFilter.ts","views/reports/exchbusiness/tradeByProducts/TradeByProductsFilterEditor.tsx","views/reports/exchbusiness/tradeByProducts/TradeByProductsReportFilter.tsx","data/reports/exchbusiness/tradeByProducts/api/getTradeByProductsReport.ts","data/reports/exchbusiness/tradeByProducts/hooks/useTradeByProductsReportDownloader.ts","data/reports/exchbusiness/tradeByProducts/thunks/downloadReport.ts","data/reports/exchbusiness/tradeByProducts/api/getTradeByProductsExcel.ts","data/reports/exchbusiness/tradeByProducts/hooks/useTradeByProductsExcelDownloader.ts","data/reports/exchbusiness/tradeByProducts/thunks/downloadReportExcel.ts","views/reports/exchbusiness/tradeByProducts/DownloadButton.tsx","views/reports/exchbusiness/tradeByProducts/TradeByProductsReport.tsx","views/reports/exchbusiness/tradeByProducts/navigationComponents.ts","views/reports/exchbusiness/tradeByProducts/Locations.ts","data/reports/exchbusiness/tradeByClients/api/getTradeByClientsData.ts","data/reports/exchbusiness/tradeByClients/hooks/useTradeByClientsReportData.ts","data/reports/exchbusiness/tradeByClients/thunks/loadReportData.ts","views/reports/exchbusiness/tradeByClients/TradeByClientsReportTable.tsx","views/reports/exchbusiness/tradeByClients/useTradeByClientsReportColumns.tsx","data/reports/exchbusiness/tradeByClients/hooks/useTradeByClientsReportIndex.ts","data/reports/exchbusiness/tradeByClients/hooks/useTradeByClientsReportFilter.ts","data/initialData/hooks/useActStatusClients.ts","views/components/common/ActStatusClients.tsx","views/reports/exchbusiness/tradeByClients/TradeByClientsEditor.tsx","views/reports/exchbusiness/tradeByClients/TradeByClientsReportFilter.tsx","data/reports/exchbusiness/tradeByClients/api/getTradeByClientsReport.ts","data/reports/exchbusiness/tradeByClients/hooks/useTradeByClientsReportDownloader.ts","data/reports/exchbusiness/tradeByClients/thunks/downloadReport.ts","data/reports/exchbusiness/tradeByClients/api/getTradeByClientsExcel.ts","data/reports/exchbusiness/tradeByClients/hooks/useTradeByClientsExcelDownloader.ts","data/reports/exchbusiness/tradeByClients/thunks/downloadReportExcel.ts","views/reports/exchbusiness/tradeByClients/DownloadButton.tsx","views/reports/exchbusiness/tradeByClients/TradeByClientsReport.tsx","views/reports/exchbusiness/tradeByClients/navigationComponents.ts","views/reports/exchbusiness/tradeByClients/Locations.ts","data/reports/exchbusiness/tradeByBrokers/api/getTradeByBrokersData.ts","data/reports/exchbusiness/tradeByBrokers/hooks/useTradeByBrokersReportData.ts","data/reports/exchbusiness/tradeByBrokers/thunks/loadReportData.ts","views/reports/exchbusiness/tradeByBrokers/TradeByBrokersReportTable.tsx","views/reports/exchbusiness/tradeByBrokers/useTradeByBrokersReportColumns.tsx","data/reports/exchbusiness/tradeByBrokers/hooks/useTradeByBrokersReportIndex.ts","data/reports/exchbusiness/tradeByBrokers/hooks/useTradeByBrokersReportFilter.ts","views/reports/exchbusiness/tradeByBrokers/TradeByBrokersEditor.tsx","views/reports/exchbusiness/tradeByBrokers/TradeByBrokersReportFilter.tsx","data/reports/exchbusiness/tradeByBrokers/api/getTradeByBrokersReport.ts","data/reports/exchbusiness/tradeByBrokers/hooks/useTradeByBrokersReportDownloader.ts","data/reports/exchbusiness/tradeByBrokers/thunks/downloadReport.ts","data/reports/exchbusiness/tradeByBrokers/api/getTradeByBrokersExcel.ts","data/reports/exchbusiness/tradeByBrokers/hooks/useTradeByBrokersExcelDownloader.ts","data/reports/exchbusiness/tradeByBrokers/thunks/downloadReportExcel.ts","views/reports/exchbusiness/tradeByBrokers/DownloadButton.tsx","views/reports/exchbusiness/tradeByBrokers/TradeByBrokersReport.tsx","views/reports/exchbusiness/tradeByBrokers/navigationComponents.ts","views/reports/exchbusiness/tradeByBrokers/Locations.ts","data/reports/exchbusiness/weightedPrices/api/getWeightedPriceData.ts","data/reports/exchbusiness/weightedPrices/hooks/useWeightedPriceReportData.ts","data/reports/exchbusiness/weightedPrices/thunks/loadReportData.ts","views/reports/exchbusiness/weightedPrices/WeightedPricesReportTable.tsx","views/reports/exchbusiness/weightedPrices/useWeightedPricesReportColumns.tsx","data/reports/exchbusiness/weightedPrices/hooks/useWeightedPriceReportIndex.ts","data/reports/exchbusiness/weightedPrices/hooks/useWeightedPriceReportFilter.ts","views/reports/exchbusiness/weightedPrices/WeightedPricesFilterEditor.tsx","views/reports/exchbusiness/weightedPrices/WeightedPricesReportFilter.tsx","data/reports/exchbusiness/weightedPrices/api/getWeightedPriceReport.ts","data/reports/exchbusiness/weightedPrices/hooks/useWeightedPriceReportDownloader.ts","data/reports/exchbusiness/weightedPrices/thunks/downloadReport.ts","data/reports/exchbusiness/weightedPrices/api/getWeightedPriceExcel.ts","data/reports/exchbusiness/weightedPrices/hooks/useWeightedPriceExcelDownloader.ts","data/reports/exchbusiness/weightedPrices/thunks/downloadReportExcel.ts","views/reports/exchbusiness/weightedPrices/DownloadButton.tsx","views/reports/exchbusiness/weightedPrices/WeightedPricesReport.tsx","views/reports/exchbusiness/weightedPrices/navigationComponents.ts","views/reports/exchbusiness/weightedPrices/Locations.ts","data/reports/exchbusiness/businessActivities/api/getBusinessActivitiesData.ts","data/reports/exchbusiness/businessActivities/hooks/useBusinessActivitiesReportData.ts","data/reports/exchbusiness/businessActivities/thunks/loadReportData.ts","views/reports/exchbusiness/businessActivities/BusinessActivitiesReportTable.tsx","views/reports/exchbusiness/businessActivities/useBusinessActivitiesReportColumns.tsx","data/reports/exchbusiness/businessActivities/hooks/useBusinessActivitiesReportIndex.ts","data/reports/exchbusiness/businessActivities/hooks/useBusinessActivitiesReportFilter.ts","views/reports/exchbusiness/businessActivities/BusinessActivitiesEditor.tsx","views/reports/exchbusiness/businessActivities/BusinessActivitiesReportFilter.tsx","data/reports/exchbusiness/businessActivities/api/getBusinessActivitiesReport.ts","data/reports/exchbusiness/businessActivities/hooks/useBusinessActivitiesReportDownloader.ts","data/reports/exchbusiness/businessActivities/thunks/downloadReport.ts","data/reports/exchbusiness/businessActivities/api/getBusinessActivitiesExcel.ts","data/reports/exchbusiness/businessActivities/hooks/useBusinessActivitiesExcelDownloader.ts","data/reports/exchbusiness/businessActivities/thunks/downloadReportExcel.ts","views/reports/exchbusiness/businessActivities/DownloadButton.tsx","views/reports/exchbusiness/businessActivities/BusinessActivitiesReport.tsx","views/reports/exchbusiness/businessActivities/navigationComponents.ts","views/reports/exchbusiness/businessActivities/Locations.ts","data/reports/exchbusiness/commReview/api/getCommReviewData.ts","data/reports/exchbusiness/commReview/hooks/useCommReviewReportData.ts","data/reports/exchbusiness/commReview/thunks/loadReportData.ts","views/reports/exchbusiness/commReview/CommReviewReportTable.tsx","views/reports/exchbusiness/commReview/useCommReviewReportColumns.tsx","data/reports/exchbusiness/commReview/hooks/useCommReviewReportIndex.ts","views/reports/exchbusiness/commReview/CommReviewFilterEditor.tsx","views/reports/exchbusiness/commReview/CommReviewFilterChips.tsx","views/reports/exchbusiness/commReview/CommReviewReportFilter.tsx","data/reports/exchbusiness/commReview/hooks/useCommReviewReportFilter.ts","data/reports/exchbusiness/commReview/api/getCommReviewReport.ts","data/reports/exchbusiness/commReview/hooks/useCommReviewReportDownloader.ts","data/reports/exchbusiness/commReview/thunks/downloadReport.ts","data/reports/exchbusiness/commReview/api/getCommReviewExcel.ts","data/reports/exchbusiness/commReview/hooks/useCommReviewExcelDownloader.ts","data/reports/exchbusiness/commReview/thunks/downloadReportExcel.ts","views/reports/exchbusiness/commReview/DownloadButton.tsx","views/reports/exchbusiness/commReview/CommReviewReport.tsx","views/reports/exchbusiness/commReview/navigationComponents.ts","views/reports/exchbusiness/commReview/Locations.ts","data/reports/exchbusiness/clientOverview/hooks/useClientOverviewIndex.ts","data/reports/exchbusiness/clientOverview/thunks/setCOIndexThunk.ts","data/reports/exchbusiness/clientOverview/api/getDeliveries.ts","data/reports/exchbusiness/clientOverview/hooks/useDeliveryData.ts","data/reports/exchbusiness/clientOverview/thunks/loadDeliveries.ts","views/reports/exchbusiness/clientOverview/clientOverviewDeliveries/ClientOverviewDeliveriesTable.tsx","views/reports/exchbusiness/clientOverview/clientOverviewDeliveries/useDeliveriesColumns.tsx","views/reports/exchbusiness/clientOverview/clientOverviewDeliveries/useDeliveriesActions.tsx","data/reports/exchbusiness/clientOverview/api/getOrders.ts","data/reports/exchbusiness/clientOverview/thunks/getOrdersThunk.ts","data/reports/exchbusiness/clientOverview/hooks/useOrderBookData.ts","data/reports/exchbusiness/clientOverview/thunks/loadAllOrderBook.ts","views/reports/exchbusiness/clientOverview/clientOverviewOrders/ClientOverviewOrdersTable.tsx","views/reports/exchbusiness/clientOverview/clientOverviewOrders/useOrderActions.tsx","data/reports/exchbusiness/clientOverview/api/getPayments.ts","data/reports/exchbusiness/clientOverview/hooks/usePaymentsData.ts","data/reports/exchbusiness/clientOverview/thunks/loadAllPayment.ts","views/reports/exchbusiness/clientOverview/clientOverviewPayments/ClientOverviewPaymentsTable.tsx","views/reports/exchbusiness/clientOverview/clientOverviewPayments/usePaymentsColumns.tsx","views/reports/exchbusiness/clientOverview/clientOverviewPayments/usePaymentsActions.tsx","data/reports/exchbusiness/clientOverview/api/getTrades.ts","data/reports/exchbusiness/clientOverview/thunks/getTradesThunk.ts","data/reports/exchbusiness/clientOverview/hooks/useTradesData.ts","data/reports/exchbusiness/clientOverview/thunks/loadTrades.ts","views/reports/exchbusiness/clientOverview/clientOverviewTrades/ClientOverviewTradesTable.tsx","views/reports/exchbusiness/clientOverview/Locations.ts","views/reports/exchbusiness/clientOverview/clientOverviewTrades/useTradeActions.tsx","views/reports/exchbusiness/historicalPrices/HistoricalPricesPage.tsx","data/reports/exchbusiness/clientOverview/hooks/useClientOverviewFilter.ts","views/reports/exchbusiness/clientOverview/ClientOverviewFilterEditor.tsx","views/reports/exchbusiness/clientOverview/ClientOverviewFilterChips.tsx","views/reports/exchbusiness/clientOverview/ClientOverviewFilter.tsx","data/reports/exchbusiness/clientOverview/api/getOrderListReport.ts","data/reports/exchbusiness/clientOverview/hooks/useOrderReportDownloader.ts","data/reports/exchbusiness/clientOverview/thunks/downloadOrdersReport.ts","data/reports/exchbusiness/clientOverview/api/getOrderListReportExcel.ts","data/reports/exchbusiness/clientOverview/hooks/useOrderExcelReportDownloader.ts","data/reports/exchbusiness/clientOverview/thunks/downloadOrdersReportExcel.ts","views/reports/exchbusiness/clientOverview/clientOverviewOrders/DownloadOrderButton.tsx","data/reports/exchbusiness/clientOverview/api/getTradeBookReport.ts","data/reports/exchbusiness/clientOverview/hooks/useTradesReportDownloader.ts","data/reports/exchbusiness/clientOverview/thunks/downloadTradesReport.ts","data/reports/exchbusiness/clientOverview/api/getTradeBookExcel.ts","data/reports/exchbusiness/clientOverview/hooks/useTradesExcelReportDownloader.ts","data/reports/exchbusiness/clientOverview/thunks/downloadTradesReportExcel.ts","views/reports/exchbusiness/clientOverview/clientOverviewTrades/DownloadTradesButton.tsx","data/reports/exchbusiness/clientOverview/api/getPaymentsReport.ts","data/reports/exchbusiness/clientOverview/hooks/usePaymentsReportDownloader.ts","data/reports/exchbusiness/clientOverview/thunks/downloadPaymentsReport.ts","data/reports/exchbusiness/clientOverview/api/getPaymentsReportExcel.ts","data/reports/exchbusiness/clientOverview/hooks/usePaymentsExcelReportDownloader.ts","data/reports/exchbusiness/clientOverview/thunks/downloadPaymentsReportExcel.ts","views/reports/exchbusiness/clientOverview/clientOverviewPayments/DownloadPaymentsButton.tsx","data/reports/exchbusiness/clientOverview/api/getDeliveryReport.ts","data/reports/exchbusiness/clientOverview/hooks/useDeliveryReportDownloader.ts","data/reports/exchbusiness/clientOverview/thunks/downloadDeliveryReport.ts","data/reports/exchbusiness/clientOverview/api/getDeliveryReportExcel.ts","data/reports/exchbusiness/clientOverview/hooks/useDeliveryExcelReportDownloader.ts","data/reports/exchbusiness/clientOverview/thunks/downloadDeliveryReportExcel.ts","views/reports/exchbusiness/clientOverview/clientOverviewDeliveries/DownloadDeliveryButton.tsx","views/reports/exchbusiness/clientOverview/ClientOverviewPage.tsx","views/reports/exchbusiness/clientOverview/navigationComponents.ts","data/reports/exchbusiness/clientOverview/hooks/useInvlidateData.ts","data/trading/ticker/api/getChartDataH.ts","data/trading/ticker/hooks/useGraphDataH.ts","data/trading/ticker/thunks/loadGraphDataH.ts","views/reports/exchbusiness/historicalPrices/ProductGraph.tsx","data/trading/ticker/hooks/useGraphPeriodH.ts","views/reports/exchbusiness/historicalPrices/Locations.ts","views/reports/exchbusiness/historicalPrices/navigationComponents.ts","views/reports/exchbusiness/exchBusinessComponents.ts","data/reports/exmember/api/getExchangeMembersData.ts","data/reports/exmember/hooks/useExchangeMembersReportData.ts","data/reports/exmember/thunks/loadReportData.ts","views/reports/exmember/ExchangeMembersReportTable.tsx","views/reports/exmember/useExchangeMembersReportColumns.tsx","data/reports/exmember/hooks/useExchangeMembersIndex.ts","data/reports/exmember/api/getExchangeMembersReport.ts","data/reports/exmember/hooks/useExchangeMembersReportDownloader.ts","data/reports/exmember/thunks/downloadReport.ts","data/reports/exmember/api/getExchangeMembersExcel.ts","data/reports/exmember/hooks/useExchangeMembersExcelDownloader.ts","data/reports/exmember/thunks/downloadReportExcel.ts","views/reports/exmember/DownloadButton.tsx","data/reports/exmember/hooks/useExchangeMembersReportFilter.ts","views/reports/exmember/ExchangeMembersFilterEditor.tsx","views/reports/exmember/ExchangeMemberReportFilter.tsx","views/reports/exmember/ExchangeMembersReport.tsx","views/reports/exmember/navigationComponents.ts","views/reports/exmember/Locations.ts","views/clearing/deliveryClient/DisplayDeliveryMainAttributes.tsx","views/clearing/deliveryClient/DisplayDelivery.tsx","views/clearing/deliveryClient/useDeliveriesActions.tsx","views/clearing/deliveryClient/useDeliveriesColumns.tsx","views/clearing/deliveryClient/DeliveryFilterEditor.tsx","views/clearing/deliveryClient/DeliveriesTable.tsx","views/clearing/deliveryClient/DeliveryFilterChips.tsx","views/clearing/deliveryClient/DeliveryFilter.tsx","views/clearing/deliveryClient/DownloadDeliveryButton.tsx","views/clearing/deliveryClient/DeliveriesPage.tsx","views/clearing/deliveryClient/navigationComponents.ts","views/clearing/deliveryClient/Locations.ts","views/clearing/paymentsClient/DisplayPaymentMainAttributes.tsx","views/clearing/paymentsClient/DisplayPayment.tsx","views/clearing/paymentsClient/usePaymentsActions.tsx","views/clearing/paymentsClient/usePaymentsColumns.tsx","views/clearing/paymentsClient/PaymentFilterEditor.tsx","views/clearing/paymentsClient/PaymentsTable.tsx","data/clearing/payments/api/getPaymentsClient.ts","data/clearing/payments/hooks/usePaymentsDataClient.ts","data/clearing/payments/thunks/loadAllPaymentClient.ts","views/clearing/paymentsClient/PaymentFilterChips.tsx","views/clearing/paymentsClient/PaymentFilter.tsx","views/clearing/paymentsClient/DownloadPaymentsButton.tsx","views/clearing/paymentsClient/PaymentsPage.tsx","views/clearing/paymentsClient/navigationComponents.ts","views/clearing/paymentsClient/Locations.ts","data/reports/news/api/getNews.ts","data/reports/news/thunks/loadNews.ts","data/reports/news/hooks/useDisplayNews.ts","views/reports/news/DisplayNewsMainAttributes.tsx","data/reports/news/api/downloadNews.ts","data/reports/news/hooks/useNewsDownload.ts","data/reports/news/thunks/downloadNewsThunk.ts","views/reports/news/DisplayNews.tsx","views/reports/news/Locations.ts","data/reports/news/api/deleteNews.ts","data/reports/news/hooks/useNewsDelete.ts","data/reports/news/thunks/deleteNews.ts","views/reports/news/useNewsActions.tsx","views/reports/news/NewsTable.tsx","views/reports/news/useNewsColumns.tsx","data/reports/news/api/getAllNews.ts","data/reports/news/hooks/useNewsData.ts","data/reports/news/thunks/loadAllNews.ts","data/reports/news/hooks/useNewsIndex.ts","data/reports/news/hooks/useNewsFilter.ts","views/reports/news/NewsEditor.tsx","views/reports/news/NewsFilterChips.tsx","views/reports/news/NewsFilter.tsx","views/reports/news/NewsPage.tsx","data/reports/news/hooks/useEditNewsState.ts","data/reports/news/hooks/useNewsValidator.ts","data/reports/news/api/createNews.ts","data/reports/news/api/updateNews.ts","data/reports/news/hooks/useNewsUpsert.ts","data/reports/news/thunks/upsertNews.ts","views/reports/news/navigationComponents.ts","views/reports/news/EditNewsPage.tsx","data/reports/notifications/api/getPushnotificationsList.ts","data/reports/notifications/hooks/usePushnotificationsListData.ts","data/reports/notifications/thunks/loadReportData.ts","views/reports/pushNotifications/PushNotificationsReportTable.tsx","views/reports/pushNotifications/usePushNotificationsReportColumns.tsx","data/reports/notifications/hooks/usePushnotificationsListIndex.ts","views/reports/pushNotifications/navigationComponents.ts","views/reports/pushNotifications/PushNotificationsReport.tsx","views/reports/pushNotifications/Locations.ts","views/reports/reportsNavigationItems.ts","data/accounting/createInvoices/api/getCreateInvoicesData.ts","data/accounting/createInvoices/hooks/useCreateInvoicesData.ts","data/accounting/createInvoices/thunks/loadCreateInvoicesData.ts","views/accounting/createInvoices/CreateInvoicesTable.tsx","views/accounting/createInvoices/useCreateInvoicesColumns.tsx","data/accounting/createInvoices/hooks/useCreateInvoicesIndex.ts","views/accounting/createInvoices/CreateInvoicesEditor.tsx","views/accounting/createInvoices/CreateInvoiceFilterChips.tsx","views/accounting/createInvoices/CreateInvoicesFilter.tsx","data/accounting/createInvoices/hooks/useCreateInvoicesFilter.ts","data/accounting/createInvoices/api/getCIDataCreateButton.ts","data/accounting/createInvoices/hooks/useCICreateButton.ts","data/accounting/createInvoices/thunks/loadCIDataCreateButton.ts","views/accounting/createInvoices/CreateButton.tsx","views/accounting/createInvoices/CreateInvoicesPage.tsx","views/accounting/createInvoices/navigationComponents.ts","views/accounting/createInvoices/Locations.ts","data/accounting/invoices/api/getInvoice.ts","data/accounting/invoices/thunks/loadInvoice.ts","data/accounting/invoices/hooks/useDisplayInvoice.ts","views/accounting/invoices/DisplayInvoiceMainAttributes.tsx","data/accounting/invoices/api/printInvoice.ts","data/accounting/invoices/hooks/useInvoicePrinter.ts","data/accounting/invoices/thunks/printInvoiceThunk.ts","data/accounting/invoices/api/getInvoiceXml.ts","data/accounting/invoices/hooks/useInvoiceXml.ts","data/accounting/invoices/thunks/xmlInvoiceThunk.ts","views/accounting/invoices/DisplayInvoice.tsx","views/accounting/invoices/Locations.ts","data/accounting/invoices/api/deleteInvoice.ts","data/accounting/invoices/hooks/useInvoiceDelete.ts","data/accounting/invoices/thunks/deleteInvoice.ts","views/accounting/invoices/useInvoicesActions.tsx","views/accounting/invoices/InvoiceFilterEditor.tsx","views/accounting/invoices/InvoicesTable.tsx","views/accounting/invoices/useInvoicesColumns.tsx","data/accounting/invoices/api/getInvoices.ts","data/accounting/invoices/hooks/useInvoicesData.ts","data/accounting/invoices/thunks/loadAllInvoices.ts","data/accounting/invoices/hooks/useInvoicesIndex.ts","data/accounting/invoices/hooks/useInvoicesFilter.ts","views/accounting/invoices/InvoiceFilterChips.tsx","views/accounting/invoices/InvoiceFilter.tsx","views/accounting/invoices/InvoicesPage.tsx","data/accounting/invoices/hooks/useEditInvoiceState.ts","data/accounting/invoices/hooks/useInvoiceValidator.ts","data/accounting/invoices/api/createInvoice.ts","data/accounting/invoices/api/updateInvoice.ts","data/accounting/invoices/hooks/useInvoicesUpsert.ts","data/accounting/invoices/thunks/upsertInvoice.ts","data/initialData/hooks/useInvoiceType.ts","views/components/common/InvoiceTypeSelect.tsx","views/accounting/invoices/EditInvoicePage.tsx","views/accounting/invoices/navigationComponents.ts","data/accounting/accountingOrder/api/getAccountingOrderData.ts","data/accounting/accountingOrder/hooks/useAccountingOrderData.ts","data/accounting/accountingOrder/thunks/loadAccountingOrderData.ts","views/accounting/accountingOrder/AccountingOrderTable.tsx","views/accounting/accountingOrder/useAccountingOrderColumns.tsx","data/accounting/accountingOrder/hooks/useAccountingOrderIndex.ts","views/accounting/accountingOrder/AccountingOrderEditor.tsx","views/accounting/accountingOrder/AccountingOrderFilterChips.tsx","views/accounting/accountingOrder/AccountingOrderFilter.tsx","data/accounting/accountingOrder/hooks/useAccountingOrderFilter.ts","data/accounting/accountingOrder/api/getAccountingOrderButton.ts","data/accounting/accountingOrder/hooks/useAccountingOrderButton.ts","data/accounting/accountingOrder/thunks/loadAccountingOrderButton.ts","views/accounting/accountingOrder/AccountingOrderButton.tsx","views/accounting/accountingOrder/AccountingOrderPage.tsx","views/accounting/accountingOrder/navigationComponents.ts","views/accounting/accountingOrder/Locations.ts","views/accounting/accountingNavigationItems.ts","data/surveillance/alarmParameters/api/getAlarm.ts","data/surveillance/alarmParameters/thunks/loadAlarm.ts","data/surveillance/alarmParameters/hooks/useDisplayAlarm.ts","data/surveillance/alarmParameters/hooks/useAlarmType.ts","views/surveillance/alarmParameters/DisplayAlarmMainAttributes.tsx","views/surveillance/alarmParameters/DisplayAlarm.tsx","views/surveillance/alarmParameters/Locations.ts","data/surveillance/alarmParameters/api/deleteAlarm.ts","data/surveillance/alarmParameters/hooks/useAlarmDelete.ts","data/surveillance/alarmParameters/thunks/deleteAlarm.ts","views/surveillance/alarmParameters/useAlarmsActions.tsx","views/surveillance/alarmParameters/AlarmsFilterEditor.tsx","views/surveillance/alarmParameters/AlarmsTable.tsx","views/surveillance/alarmParameters/usealarmsColumns.tsx","data/surveillance/alarmParameters/api/getAlarms.ts","data/surveillance/alarmParameters/hooks/useAlarmData.ts","data/surveillance/alarmParameters/thunks/loadAlarms.ts","data/surveillance/alarmParameters/hooks/useAlarmIndex.ts","data/surveillance/alarmParameters/hooks/useAlarmFilter.ts","views/surveillance/alarmParameters/AlarmsFilterChips.tsx","views/surveillance/alarmParameters/AlarmsFilter.tsx","views/surveillance/alarmParameters/AlarmsPage.tsx","data/surveillance/alarmParameters/hooks/useEditAlarmState.ts","data/surveillance/alarmParameters/hooks/useAlarmValidator.ts","data/surveillance/alarmParameters/api/createAlarm.ts","data/surveillance/alarmParameters/api/updateAlarm.ts","data/surveillance/alarmParameters/hooks/useAlarmUpsert.ts","data/surveillance/alarmParameters/thunks/upsertAlarm.ts","views/surveillance/alarmParameters/AlarmTypeSelect.tsx","views/surveillance/alarmParameters/navigationComponents.ts","views/surveillance/alarmParameters/EditAlarmsPage.tsx","views/surveillance/surveillanceNavigationItems.ts","views/navigation/appNavigationItems.ts","data/initialData/hooks/useUserMenuItems.ts","views/underConstruction/UnderConstruction.tsx","views/navigation/menuIcons.ts","views/navigation/hooks/useNavigationItems.ts","layout/NavList.tsx","layout/NavDrawerStyles.ts","layout/NavDrawer.tsx","layout/Theme.tsx","layout/DisplayDrawer.tsx","layout/ContentLayout.tsx","views/login/useLoginStyles.tsx","views/login/LoginError.tsx","views/login/LoginForm.tsx","views/login/LoginPage.tsx","views/navigation/PageRouterSwitch.tsx","views/snackbar/CollapsableMessage.tsx","data/snackbar/hooks/useSnackbarMessage.ts","views/snackbar/SnackbarMessages.tsx","views/surveillance/SurveillanceNotificationHandlers.tsx","data/snackbar/hooks/useSnackbarMessageSender.ts","data/auth/api/storetoken.ts","data/auth/useStoreTokenHooks.ts","data/auth/storetokenthunks.ts","core/notifications/PushNotifications.tsx","views/ContentRoot.tsx","App.tsx","serviceWorker.ts","index.tsx"],"names":["module","exports","OrderSide","PageDataStatus","OrdersPageType","Gender","ProductAttributeManditory","RegType","Status","snackbarSlice","createSlice","name","initialState","messages","reducers","pushError","state","action","_objectSpread","concat","_toConsumableArray","id","payload","message","title","type","pushInfo","pushwarning","dismiss","filter","m","setShownId","map","messageId","shownId","_snackbarSlice$action","actions","AlarmType","createFetchState","result","errorCode","getFetchStateChange","current","change","LocalizationLanguage","reportsSlice","status","fetchState","successfulLogin","user","uData","failedLogin","error","resetLoginState","setPendingLoginState","setToken","token","setPushToken","setFetchState","_reportsSlice$actions","initialDataSlice","cities","clientTypes","banks","currencies","productAttributes","productGroups","vatRates","units","commissions","regions","subRegions","topRegions","countries","commisionTypes","personRoles","userMenu","orderRecieveMethods","checkPointPayers","checkPoints","francoList","orderStatuses","tradeStatuses","payTypes","checkDoneByList","payTypesG","attributeValues","orderNotes","invTypes","dispSitList","qualityCtrlList","deliveryStatuses","ports","pay_Types","contractTypes","guarantees","actStatuses","extraReducers","builder","addCase","attributes","productsGroups","commissionTypes","orderReceiveMethods","attributesValues","employeesSlice","searchTerm","setEmployees","all","displayData","filterData","setSearchTerm","toLocaleLowerCase","setDisplayedEmployee","displayedEmployee","setFetchStateEmployee","undefined","data","e","firstName","includes","lastName","email","phoneOffice","empIdNumber","_employeesSlice$actio","fetchStatePerson","fetchStateBroker","fetchStateContract","fetchStateAccount","downloadContractFetchState","deleteFetchState","clientsSlice","setClients","setDisplayedClient","displayedClient","setFetchStateClient","setFetchStatePerson","setFetchStateBroker","setFetchStateContract","setFetchStateAccount","setPrintContractFetchState","setDeleteFetchState","displayed","client","cliName","cliIdNo","taxCode","city","phone","broker","_clientsSlice$actions","roleSlice","setData","setDisplayed","displayedRole","roleCode","roleName","roleNameEn","_roleSlice$actions","usersSlice","displayedUser","userName","loginUser","role","emp","cliPrs","_usersSlice$actions","fetchStateAttribute","setFetchStateAttribute","setProductsForSelect","productsForSelect","setProductsForSelectLoading","prodName","prodGroupName","vat","unit","productGroupDataSlice","prodGroupNameEn","_productGroupDataSlic","bankSlice","displayedBank","bankCode","bankName","idNumber","_bankSlice$actions","warehousesSlice","displayedWarehouse","whsCode","whsName","_warehousesSlice$acti","setFetchStateValue","attrName","attrType","comparator","currencySlice","currCode","currName","numCode","_currencySlice$action","_searchTerm","_defineProperty","Region","TopRegion","SubRegion","_all","_displayData","_fetchState","regionSlice","displayedRegion","setReg","regType","regName","_regionSlice$actions","currencyRatesSlice","filterDate","setFilterDate","setDisplayCurrencyId","displayCurrencyId","date","getDay","getMonth","getFullYear","_currencyRatesSlice$a","countrySlice","displayedCountry","cntId","cntName","cntNameen","_countrySlice$actions","citySlice","displayedCity","cityName","zipCode","_citySlice$actions","commissionsSlice","fetchStateDetail","commName","commCode","commTypeName","_commissionsSlice$act","payTypeSlice","displayedPayType","payTypeDescr","payTypeDescrEn","_payTypeSlice$actions","listingReducer","combineReducers","employees","clients","roles","users","products","warehouses","currencyRates","currentPage","_currentPage","Buy","Sell","newOrderFetchState","attributeFetchState","cancelOrderFetchState","confirmOrderFetchState","deleteOrderFetchState","ordersSlice","setOrders","side","value","displayedMBOrder","invalidateOrders","_currentPage2","buyInvalidated","DataInvalidated","sellInvalidated","invalidateSideOrders","invalidated","setNewOrderFetchState","setAttributeFetchState","setCancelOrderFetchState","setConfirmOrderFetchState","setDeleteOrderFetchState","_ordersSlice$actions","tradesSlice","cancelFetchState","printTradeFetchState","setTrades","displayedTrade","invalidateTrades","setCancelTradeFetchState","setPrintTradeFetchState","_tradesSlice$actions","invalidate","orderBookSlice","printOrderFetchState","orderPSTM","displayedOBOrder","setPrintOrderFetchState","setOrderPSTM","mainBoardInvalidate","_orderBookSlice$actio","tickerSlice","graphData","graphPeriod","graphPeriodH","setGraphData","graphId","setGraphPeriod","setGraphPeriodH","setTicketData","ticketData","_tickerSlice$actions","dataTradingReducer","mainBoard","trades","orderBook","ticker","paymentsSlice","downloadReportFetchState","printReportFetchState","setPayments","displayedPayment","invalidatePayment","setCancelPaymentFetchState","setPrintPaymentFetchState","_paymentsSlice$action","controlsSlice","setControl","displayedControl","invalidateControl","setCancelCtrlGoodsFetchState","setDownloadFetchState","_controlsSlice$action","deliveriesSlice","setDelivery","displayedDelivery","invalidateDelivery","setCancelDeliveryFetchState","setPrintDeliveryFetchState","_deliveriesSlice$acti","disputesSlice","setDisputes","displayedDispute","invalidateDispute","setCancelDisputeFetchState","_disputesSlice$action","guaranteesSlice","printGuaranteeFetchState","setGuarantees","displayedGuarantee","invalidateGuarantee","setCancelGuaranteeFetchState","setPrintGuaranteeFetchState","_guaranteesSlice$acti","stockFeesSlice","setStockFee","displayedStockFee","startDate","toString","_stockFeesSlice$actio","transportFeesSlice","setTransportFee","displayedTransportFee","_transportFeesSlice$a","tasTradesSlice","calculateFetchState","saveCalcFetchState","setCalculationFetchState","setSaveCalcFetchState","_tasTradesSlice$actio","tradingDataSlice","setTradingsData","displayedTradingData","invalidateTradingsData","setCancelTradingDataFetchState","resetData","_tradingDataSlice$act","marginsDataSlice","setMarginsData","displayedMarginsgData","invalidateMarginssData","setCancelMarginsDataFetchState","setPrintMarginsFetchState","_marginsDataSlice$act","bankguaranteesSlice","setBankGuarantees","displayedBankGuarantee","invalidateBankGuarantee","setCancelBankGuaranteeFetchState","_bankguaranteesSlice$","clearingDataReducer","payments","controls","deliveries","disputes","stockfees","transportfees","transportAndStorage","tradingData","marginsData","bankguarantees","tradesSliceAll","_tradesSliceAll$actio","dailyTradeSlice","_dailyTradeSlice$acti","weeklyTradeSlice","_weeklyTradeSlice$act","monthlyTradeSlice","_monthlyTradeSlice$ac","annualTradeSlice","_annualTradeSlice$act","dailySecuritySlice","_dailySecuritySlice$a","annualSecurityTradeSlice","_annualSecurityTradeS","quarterlySecuritySlice","_quarterlySecuritySli","securityCommissionReportDataReduer","monthlyTrade","dailySecurity","annualSecurity","quarterlylSecurity","antiLaunderingSlice","_antiLaunderingSlice$","exchangeMembersSlice","_exchangeMembersSlice","memberContractsSlice","_memberContractsSlice","tradeReviewSlice","_tradeReviewSlice$act","tradeByProductsSlice","_tradeByProductsSlice","tradeByClientsSlice","_tradeByClientsSlice$","tradeByBrokersSlice","_tradeByBrokersSlice$","weightedPricesSlice","_weightedPricesSlice$","businessActivitiesSlice","_businessActivitiesSl","commReviewSlice","invalidateCommReview","_commReviewSlice$acti","clientOverviewSlice","setCOPaymentsData","currentPagePayment","setCODeliveriesData","currentPageDelivery","setCOOrdersData","currentPageOrder","setCOTradesData","currentPageTrade","invalidateData","newState","_clientOverviewSlice$","exchBusinessDataReducer","memberContracts","tradeReview","tradeByProducts","tradeByClients","tradeByBrokers","weightedPrice","businessActivities","commReview","clientOverview","newsSlice","downloadNewsFetchState","setNews","displayedNews","invalidateNews","setCancelNewsFetchState","setDownloadNewsFetchState","_newsSlice$actions","pushnotificationsSlice","_pushnotificationsSli","dataReportsReducer","ordersReport","tradesReport","tradesReportAll","dailyTrade","weeklyTrade","annualTrade","securityCommission","antiLaundering","exchangeMember","exchbusiness","news","pushnotifications","createInvoicesSlice","invalidateCreateInvoice","resteData","_createInvoicesSlice$","invoicesSlice","printInvoiceFetchState","xmlInvoiceFetchState","setInvoices","displayedInvoice","invalidateInvoices","setCancelInvoiceFetchState","setPrintInvoiceFetchState","setXmlInvoiceFetchState","xmlOrderFetchState","createInvoiceFetchState","_invoicesSlice$action","accountingOrderSlice","invalidateAccOrder","_accountingOrderSlice","dataAccountingReducer","createInvoices","invoices","accountingOrder","alarmsSlice","setAlarm","displayedAlarm","invalidateAlarm","setCancelAlarmFetchState","_alarmsSlice$actions","surveillanceDataReducer","alarms","dataPersistConfig","key","storage","whitelist","dataComReducer","snackbar","auth","initialData","listing","trading","clearing","reports","accounting","surveillance","persistReducer","deleteUserToken","newusersDictionary","toLowerCase","lastLoginUsername","TableType","language","SR","setLocalization","index","_index","itemsPerPage","pageNumber","orderStatus","ftValue","ftDescr","setOrdersIndex","resetOrderIdices","setFilter","removeFilter","_index2","setTradesIndex","resetTradeIdices","resetFilter","graphProductId","setGraphProductId","uxTradingReducer","setPaymentIndex","resetPaymentIdices","setControlIndex","resetControlIdices","setDeliveryIndex","resetDeliveryIdices","setDisputeIndex","resetDisputeIdices","setGuaranteeIndex","resetGuaranteeIdices","tradeStatus","find","s","datefrom","Date","toISOString","dateto","reportDate","setTradingDateIndex","resetTradingDateIdices","setReportData","setMarginsDateIndex","resetMarginsDateIdices","setBankGuaranteeIndex","resetBankGuaranteeIdices","setIndex","resetIndex","_dailyTrade$actions","numofweeks","setReportWeek","yearPart","setReportYear","year","_weeklyTrade$actions","numofmonths","setReportMonth","month","_monthlyTrade$actions","numofyears","_annualTrade$actions","now","annualSecuritySlice","_annualSecuritySlice$","qtnumber","Math","floor","setReportQuarter","securityCommissionReportUXReduer","limit","productid","clientId","brokerId","Orders","Trades","Deliveries","Payments","setClientOverviewIndex","resetClientOverviewIdices","exchBusinessUXReducer","pushnotificationsList","resetNewsIdices","uxReportsReducer","exchmembers","resetCreateInvoicesIdices","setInvoiceIndex","resetInvoiceIdices","resetIdices","uxAccountingReducer","setAlarmIndex","resetAlarmIdices","localization","rootReducer","dataReducer","ux","uxReducer","windowENV","window","ENV","appConfig","http","baseURL","API_BASE","general","titleSufix","TITLE_SUFIX","deploymentDir","DEPLOYMENT_DIR","notifications","uri","NOTIFICATION_BASE_URI","defaultMiddlware","getDefaultMiddleware","immutableCheck","serializableCheck","thunk","middlware","useLogger","logger","store","configureStore","reducer","middleware","persistor","persistStore","StoreProvider","props","React","createElement","Provider","appStore","PersistGate","loading","children","useLocalizationStore","dispatch","useDispatch","useSelector","useCallback","srTranslation","decimalSeparator","momentLocale","mainTitle","tableNextPage","tablePreviousPage","tableFirsPage","tableLastPage","tableDisplayedRows","tabledDisplayedPerPage","orderActView","orderActReply","orderWaitingProducts","orderSideBuy","orderSideSell","listingOrdersTitle","userOrdersTitle","archiveOrdersTitle","search","companyClmName","companyClmHeadquorters","companyClmMemberFrom","companyClmProvision","reporClmtName","reporTitle","reporDownloadTtl","username","password","login","logout","orderChooseProduct","noDataText","orderClmOrdNo","orderTimeReceived","orderOrdType","orderRefOrd","orderClientIdNo","orderClientName","orderProduct","orderYear","orderTradingPlace","orderFranco","orderQty","orderAllOrNothing","orderPrice","orderPriceEur","orderPriceWithoutVat","orderPriceWithVat","orderPayType","orderPayDays","orderFreeStorage","orderFreeStorageByDelivery","orderFreeStorageByDate","orderCheckPoint","orderCheckPays","orderExpiryDate","orderQuality","numberOfDays","navListing","navMyOrders","navArchive","navCompanies","navMembers","navProducts","navBrokers","navEmployees","navUsers","navRoles","navCodebook","navCountries","navTopRegion","navRegion","navSubRegion","navCities","navCurrencies","navWarehouses","navTrading","navMainTable","navOrders","navTransactions","navMarketDepth","navCliring","navDeposits","navMarginCalculations","navSurveillance","navAlarmSetup","navProductReport","navMemberReport","navReports","navDailyReports","navWeeklyReports","navMonthlyReports","navQuaterlyReports","navAnnualReports","navSECReports","navMembersReports","navOrdersReports","navAccounting","navTaxes","navInvoice","navAccountingExport","navMembersDeposit","empFirstName","empLastName","empOfficePhone","empEmail","empStatus","empMidName","empGender","empAddress","empZipCode","empCity","empPhone","empDateOfBirth","empPosition","empBranch","empFax","empShowTooltip","genderMale","genderFemale","statusActive","statusInactive","empEdit","empDelete","empEditTitle","empCreateTitle","cliTaxCode","clijbkjs","cliType","cliForeign","cliCity","cliPhone","cliBroker","cliActive","cliStatus","clilFullName","cliAddress","cliMailCity","cliMailAddress","cliMobile","cliFax","cliEmail","cliHasContract","cliActiveFrom","cliActiveTo","cliCommission","cliCurrentTurnover","cliComment","cilEditTitle","cilCreateTitle","cilTitle","tableConfirmationDelete","tableDelete","tableAdd","tableEdit","tableCancel","tableSave","tableShow","roleEdit","roleCreate","roleNameColumn","roleIsEmployee","userUserName","userLoginUser","userLoginPass","userChangePass","userRoleId","userIsEmployee","userEmpId","userClientId","userCliPrsId","userSubscribedUntil","userSubscrUnlimited","userIsActive","userEditTitle","userCreateTitle","tableBasciInfo","clientPersonTitle","clientPersonName","clientPersonIDNumber","clientPersonStatus","clientPersonEmpty","clientBrokerTitle","clientBrokerName","clientBrokerIDNumber","clientBrokerStatus","clientBrokerEmpty","contractTitle","contractNumber","contractDate","contractStatus","contractEmpty","contractLincedContrNo","contractTypeDescription","contractDescription","contractPhoneOrder","contractWebUser","contractWebUserBlocked","contractTitleEdit","contractTitleCreate","accountTitle","accountTitleEdit","accountTitleCreate","accountNumber","accountBank","accountDefault","accountClientBankCode","accountCurrency","accountForBuySell","accountStatus","accountSideBuy","accountSideSell","accountSideBoth","accountEmpty","invalidDateMessage","maxDateMessage","minDateMessage","clientPersonEditTitle","clientPersonCreateTitle","clientBrokerEditTitle","clientBrokerCreateTitle","leavePageTitle","leavePageMessage","leavePageConfirm","leavePageCancel","calendarOK","calendarCancel","calendarClear","productName","productNameEN","productGroupName","productUnit","productVat","productHasYieldYear","productStatus","productTitle","productEditTitle","productCreateTitle","productAttributeTitle","productAttributeEditTitle","productAttributeCreateTitle","productAttributeName","productAttributeType","productAttributeManditory","productAttributeComparator","productAttributeStatus","productAttributeEmpty","productGroupNameSR","productGroupNameEN","productGroupStatus","productGroupTitle","productGroupEditTitle","productGroupCreateTitle","bankIdNumber","navBanks","bankEdit","bankCreate","bankRegNumber","navWhs","whsEdit","whsCreate","whsPort","whsDistanceToPort","commission","requiredMessage","messageWeakPassword","attributesTitle","attributesCreateTitle","attributesEditTitle","attributeName","attributeNameEN","attributeOrder","attributeUnit","attributeValuesTitle","attributeValuesCreateTitle","attributeValuesEditTitle","attributeValuesEmpty","attributeValueName","attributeValueNameEN","attributeValueValue","attributeValueValueEN","attributeValueOrder","attributeValueStatus","currenciesTitle","currenciesCreateTitle","currenciesEditTitle","currenciesName","currenciesCode","currenciesNumericCode","regNameDistrict","parentRegName","countryReg","regEdit","regEditDistrict","regCreate","regCreateDistrict","curRateDate","curRateBuy","curRateSell","curRateMid","curRateCurrency","curRateTitle","curRateEditTitle","curRateCreateTitle","countryEdit","countryCreate","countryCode","countryName","countryNameEN","cityEdit","cityCreate","cityZipCode","cityRegion","citySubRegion","cityIsPort","commissionTitle","commissionCreateTitle","commissionEditTitle","commissionCode","commissionName","commissionNameEN","commissionType","commissionStandard","commDetailsTitle","commDetailsCreateTitle","commDetailsEditTitle","commDetailsDate","commDetailsProductGroup","commDetailsProduct","commDetailsCurrency","commDetailsAmtCurrency","commDetailsAmtTypePercent","commDetailsAmtTypeAmount","commDetailsBuyAmtType","commDetailsBuyPerc","commDetailsBuyMin","commDetailsBuyMax","commDetailsSellAmtType","commDetailsSellPerc","commDetailsSellMin","commDetailsSellMax","productCode","clientPersonRole","clientPersonDateCertified","clientPersonPhone","clientPersonEmail","orderRecieveMethod","orderEditTitle","orderCreateTitle","orderGoodsReadyFrom","orderGoodsReadyTo","orderAttrName","orderAttrValue","orderAttrTitle","orderAttrCreateTitle","orderAttrEditAttribute","orderReceiveMethod","orderbrokName","orderUserName","orderCliPrsName","orderProdCode","orderUnit","orderQtyLeft","orderPriceVat","orderMinQty","orderComment","orderCommission","ordergoodsRedyFrom","ordergoodsRedyTo","orderStatusDescr","orderCancelReplTime","orderPayData","orderSide","orderCurrCode","orderexportReady","orderBankGuarantee","orderActive","tradeTitle","tradeNo","tradeTime","tranNoSell","orderNoSell","clientNameSell","tranNoBuy","orderNoBuy","clientNameBuy","tradeProdCode","tradeProdName","tradeQty","tradeStatusDescr","tradeDeliveryDescr","tradePrice","listingOrdersBookTitle","orderCancel","orderCancelQuestion","orderConfirmQuestion","orderCancelQuestionYes","orderCancelQuestionNo","orderModify","orderVerify","orderConfirm","orderReplay","orderDelete","tradeVatPerc","tradePriceWithVat","tradeAmt","tradeAmtWithVat","tradeTransCostSell","tradeStorCostSell","tradeTransCostBuy","tradeStorCostBuy","tradeCommPercSell","tradeCommAmtSell","tradeCommPercBuy","tradeCommAmtBuy","tradeDeliveryWhsName","tradePayTypeDescr","orderFilterConfirm","orderFilterCancel","orderFilterFrom","orderFilterTo","tradeFilterFrom","tradeFilterTo","tradeViewAction","tradeCancelAction","orderTradeQuestion","filterFrom","filterTo","paymentTitle","paymentDataTime","paymentClientCode","paymentClientName","paymentPayType","paymentClmOrdNo","paymentTranNo","paymentAmount","paymentAmountIn","paymentAmountOut","paymentCurrCode","paymentStatus","paymentEdit","paymentCreate","paymentSideIn","paymentSideOut","paymentSide","paymentSideNonDedicated","paymentSideDedicated","paymentSideDedication","paymentBankGuarantee","paymentMatchingQty","ctrlGoodsTitle","ctrlcontrolDate","ctrltradeNo","ctrlsellerCode","ctrlsellerName","ctrlbuyerCode","ctrlbuyerName","ctrlproductCode","ctrlproductName","ctrlcheckPointDescr","ctrlcheckDoneByDescr","ctrlcheckPaysDescr","ctrlcontrolHouse","ctrlcontrolReport","ctrlcontrolReportText","ctrlcontrolReportFile","ctrlstatus","crtlGoodsEdit","ctrlGoodsCreate","ctrlFilterFrom","ctrlFilterTo","dlvrDiliveryTitle","dlvrDeliveryDate","dlvrTradeNo","dlvrsellerCode","dlvrsellerName","dlvrbuyerCode","dlvrbuyerName","dlvrproductCode","dlvrproductName","dlvrDeliverQty","dlvrLeftQty","dlvrTradeQty","dlvrUnit","dlvrCityCode","dlvrCityName","dlvrWarehouseCode","dlvrWarehouseName","dlvrstatus","dlvrEdit","dlvrCreate","dlvrFilterFrom","dlvrFilterTo","dlvrValue","dlsDisputeTitle","disDispSitDate","disTradeNo","dissellerCode","dissellerName","disbuyerCode","disbuyerName","disproductCode","disproductName","disDisputeDescr","disstatus","disEdit","disCreate","disFilterFrom","disFilterTo","paymentClientOrders","paymentClientTransactions","guarGuaranteeTitle","guarEdit","guarCreate","orderDeliveryLocation","filterReset","orderMarket","orderMarketSpot","orderMarketForward","orderLocCountry","orderLocRegion","orderLocDistrict","orderLocCity","orderLocWhs","tradeFulfillmentDate","startDeliveryDate","navOrdersReport","stockFeeTitle","stockFeeEdit","stockFeeCreate","stockFeeStartDate","stockFeeStockFee","stockFeeStatus","transFeeTitle","transFeeEdit","transFeeCreate","transFeeStartDate","transFeePice","transFeeDistance","transFeeStatus","navTradesReport","navTradesReportAll","dailyTradeReportTitle","dailyTradeReportProduct","dailyTradeReportTurnoverRSD","dailyTradeReportTurnoverEUR","dailyTradeReportCountTransaction","dailyTradeReportReportDate","dailyTradeReportReportWeightedRSD","dailyTradeReportReportWeightedEUR","dailyTradeReportQuantity","monthlyTradeReportReportTitle","monthlyTradeReportReportMonth","monthlyTradeReportReportYear","monthlyTradeReportReportDate","monthlyTradeReportReportQty","monthlyTradeReportReportWeightedRSD","monthlyTradeReportReportWeightedEUR","filterTooltip","exportPDFTooltip","exportXLSXTooltip","exportXMLTooltip","printTooltip","weeklyTradeReportTitle","wTReportProductTitle","wTReportClientTitle","wTReportDateTitle","weeklyTradeWeek","weeklyTradeReportProduct","weeklyTradeReportClient","weeklyTradeReportDate","weeklyTradeReportTurnoverRSD","weeklyTradeReportTurnoverEUR","weeklyTradeReportCountTransaction","weeklyTradeReportQty","wTReportWeightedPrice","wTReportWeightedPriceeur","wTableProduct","wTableClient","wTableDate","monthlyTradeReportTitle","mTReportProductTitle","mTReportClientTitle","mTReportDateTitle","monthlyTradeMonth","monthlyTradeReportProduct","monthlyTradeReportClient","monthlyTradeReportDate","monthlyTradeReportTurnoverRSD","monthlyTradeReportTurnoverEUR","monthlyTradeReportCountTransaction","monthlyTradeReportQty","mTReportWeightedPrice","mTReportWeightedPriceeur","mTableProduct","mTableClient","mTableDate","annualTradeReportTitle","aTReportProductTitle","aTReportClientTitle","aTReportDateTitle","annualTradeYear","annualTradeReportProduct","annualTradeReportClient","annualTradeReportDate","annualTradeReportTurnoverRSD","annualTradeReportTurnoverEUR","annualTradeReportCountTransaction","annualTradeReportQty","aTReportWeightedPrice","aTReportWeightedPriceeur","aTableProduct","aTableClient","aTableDate","orderFundCheckButton","orderFundCheckTitle","weeklyNumofWeeks","monthlyNumofmonths","TASTitle","TASCalcStorage","TASCalTransport","TASCaclulate","TASConfirm","TASDistance","TASStorageCosts","TASTransportCosts","TASTooltip","TASCancel","TASWarning","secCommDailyTradeReportTitle","secCommQuarterlyTradeReportTitle","secCommAnnualyTradeReportTitle","secCommProduct","secCommTurnoverRSD","secCommTurnoverEUR","secCommCountTransaction","secCommReportDate","secCommReportWeightedRSD","secCommReportWeightedEUR","secCommReportQty","secCommReportQuarter","amtimnylndcommTradeNumber","amtimnylndcommTradeDate","amtimnylndcommProduct","amtimnylndcommQuantity","amtimnylndcommPrice","amtimnylndcommAmount","amtimnylndcommBuyer","amtimnylndcommSeller","amtimnylndcommReportTitle","amtimnylndcommLimit","exmemTitle","exmemMemberName","exmemMemberId","exmemTaxCode","exmemAdress","exmemPhone","exmemManager","exmemTrader","exmemContactPerson","memcontTitle","memcontMember","memcontContractDate","memcontExpireDate","memcontStatus","exchDateFrom","exchDateTo","exchTradeReview","exchCommissionReview","exchTradeByProduct","exchBusinessActivities","exchTurnoverByClient","exchTurnoverByBrokers","exchWeightedPrice","exchDate","exchTradeNumber","exchTradeDate","exchProduct","exchPrice","exchQuantity","exchAmount","exchClient","exchTransactionDate","exchTransactionNumber","exchOrderNumber","exchSide","exchCommission","exchTurnoverValue","exchBuyersCommission","exchSellersCommission","exchBuyerBroker","exchSellerBroker","exchCommissionValue","exchTurnoverParticipation","exchCommissionParticipation","exchBuyer","exchSeller","exchTurnoverRsd","exchTurnoverEur","exchWeightedPriceRsd","exchWeightedPriceEur","annualNumofyears","pleaseWait","createInvoiceTitle","invoiceCreate","invoiceEdit","invoiceTitle","invoiceInvNo","invoiceInvDate","invoiceInvTypeDescr","invoiceTranDate","invoiceDueDate","invoiceDescr","invoiceTranNo","invoiceClientIdNo","invoiceClientName","invoiceTradeAmt","invoiceTradeAmtWithVat","invoiceCommPerc","invoiceAmt","invoiceVatPerc","invoiceVatAmt","invoiceInvAmt","invoiceCurrCode","invoiceBookDate","invoiceCmpAccount","invoiceModel","invoiceReffNo","invoiceStatus","invoiceQuantity","invoicePrice","invoiceOrderNo","invoiceProductName","iInvoiceTooltip","invoicingMessage","invoicingMessageTitle","invoicingMessageConfim","accountingOrderTooltip","accountingOrderTitle","accountingOrderMessage","accountingOrderMessageTitle","accountingOrderConfim","tradingDataRefPriceTooltip","tradingDataTitle","tradingDataDataTime","tradingDataProductCode","tradingDataProductName","tradingDataRefPrice","tradingDataBestBid","tradingDataBestBidQty","tradingDataBestAsk","tradingDataBestAskQty","tradingDataOpenPrice","tradingDataHighPrice","tradingDataLowPrice","tradingDataClosePrice","tradingDataVolume","tradingDataAmount","tradingDataWeightedPrice","tradingDataMidPrice","tradingDatadatefrom","tradingDatadateto","tradingDataEdit","marginsDataCalculationTooltip","marginsDataTitle","marginsDataCalcDate","marginsDataTradeNo","marginsDataTradeDate","marginsDataSide","marginsDataClientIdNo","marginsDataClientName","marginsDataProductCode","marginsDataProductName","marginsDataContrPrice","marginsDataContrValue","marginsDataGainLoss","marginsDataMarginReq","marginsDataMarginCall","marginsDataMarginBal","marginsDataBalPlusGL","marginsDataCoverPerc","marginsDataMaintTriggered","marginsDatadatefrom","marginsDatadateto","noFutureDate","orderQtyMatched","alarmTime","alarmCrossName","alarmProductName","alarmClientName","notificationNewOrder","notificationNewTrade","tradingDataMessage","tradingDataMessageTitle","tradingDataConfim","tradingDataReportDate","marginsDataMessage","marginsDataMessageNoData","marginsDataMessageTitle","marginsDataConfim","marginsDataReportDate","alarmAlmType","alarmUserName","alarmClient","alarmProductCode","alarmProduct","alarmActive","alarmEdit","alarmCreate","alarmTitle","alarmTypeCros","alarmTypeProduct","alarmTypeUser","alarmUniqueMessage","alarmTypeUserProduct","alarmProductClientName","alarmBuyOrderNumber","alarmSellOrderNumber","allowSystemNotifications","attrCompTypeLessThan","attrCompTypeEqual","attrCompTypeMoreThan","attrCompType","productAttributeHasStandard","productAttributeStandardValue","orderParameters","tradeParameters","orderDepositeAmount","orderDepositeAmountPayed","paymentAmtBal","paymentAmtBalNonAlloc","attributeSRPS","paymentAmtOrdersBal","paymentAmtTradesBal","deliveryTradeQty","deliveryLeftQty","clientCardTitle","grntTitle","grntNo","grntDate","grntClientCode","grntClientName","grntBankCode","grntBankName","grntExpiryDate","grntAmount","grntCurrCode","grntStatus","grntEdit","grntCreate","grntActView","mainTableBid","mainTableAsk","tradesReportMessage","tradesReportTitle","tradesReportMessageConfim","errorTitle","errorConfirm","errorProductDelete","errorProductAttributeDelete","errorClientDelete","orderLogDataChangeTime","orderLogDataUserName","orderLogDataActivity","orderLogDataStatus","orderLogDataRefOrder","orderLogDataTable","orderLogDataEmpty","newsTime","newsTitle","newsTitleen","newsLokacija","newsTitleTitle","newsEditTitle","newsCreateTitle","newsShow","payTypeDesc","payTypeDescEn","payTypeTitle","payTypeEditTitle","payTypeCreateTitle","payTypeStatus","payTypePonder","historyProd1","historyProd2","historyProd3","AttrPsmtTitle","loginRemember","loginForget","pushNotifications","pushNotification","notifPacking","notifOrigin","notifDirectorate","srErrors","enTranslations","EN","enErrors","numeral","register","delimiters","decimal","thousands","abbreviations","thousand","million","billion","trillion","ordinal","number","currency","symbol","LocalizationContext","createContext","getString","getDateString","getDateTimeString","getErrorString","getGender","gender","getNumberString","num","format","getFormatedNumberString","getFormatedNumberStringBlanko","getFormatedNumberString4","getNumber","parseFloat","getSeparators","momentDateString","moment","LocalizationContextProvider","_useTransalation","_useLocalizationStore","_slicedToArray","useTransalation","_useTransalation2","translations","errorTranslations","useEffect","locale","translate","useMemo","code","money","numValue","Number","isNaN","numeralLocale","localeData","exhaustiveCheck","param","Error","getEditLocation","basePath","part","subItemId","location","getParamsDateString","dateString","getDate","isValidDate","getTime","countDecimals","split","length","useToggleStateDictionary","keys","openKeys","_useState3","useState","reduce","dict","some","ok","_useState4","dictionary","setDictionary","dictionaryTogglers","togglers","createToggleDictionaryState","toggleKey","newDictionary","forEach","createUseValidator","initialValidatorState","additionalValidation","_useState5","_useState6","validationState","setValidationState","validate","item","employee","normalized","Object","field","validated","validField","valid","useCopiedState","original","followOriginal","_React$useState","_React$useState2","copyState","setCopyState","_React$useState3","_React$useState4","changeCalled","setChangeCalled","editCopyState","changed","deepEqual","useMainBarStyles","makeStyles","theme","_menuButton","_theme$navDrawer","navDrawer","permanentBreakpoint","fullWidth","createStyles","appBar","width","marginLeft","appBaraContent","justifyContent","titleArea","display","logo","verticalAlign","menuButton","spacing","fontFamily","fontWeight","instance","axios","create","interceptors","request","use","requestConfig","ErrorCodes","dipatchHTTPError","responseCode","dipatchError","getHTTPErrorMessage","v4","httpWebApiRaw","responseMapper","_ref","_asyncToGenerator","_regeneratorRuntime","mark","_callee","getState","headerToken","response","_error","wrap","_context","prev","next","headers","axiosIntance","sent","abrupt","t0","stop","_x","_x2","apply","arguments","httpWebApi","webApi","getErrorMessage","_ref2","_callee2","_context2","webApiWithResponse","resCode","obj","_x3","_x4","globalErrorExceptions","errorExceptions","_ref3","_callee3","exceptionCodes","errorMessage","_error2","_context3","indexOf","resDesc","_x5","_x6","firstLoginWebApi","lang","source","method","url","loginWebApi","useAuth","authStatus","useTheme","useMediaQuery","breakpoints","only","getStore","loginResponse","AuthWrongToken","HTTPLoginError","useUserAvatarStyles","root","alignItems","avatar","badgeGreen","backgroundColor","palette","success","main","color","badgeError","useCapacitorAppState","isVisiable","setIsVisiable","console","log","listener","App","addListener","isActive","remove","RetryPolicy","_this","_classCallCheck","backoff","shouldReconnect","stopReconnect","_createClass","retryContext","this","selected","previousRetryCount","ConnextionManager","hubUrl","_this2","connection","retryPolicy","createConnection","signalR","withUrl","accessTokenFactory","configureLogging","Information","withAutomaticReconnect","build","onreconnected","connectionId","onclose","start","_this2$connection","_this2$connection2","registerHandler","handler","on","_this2$connection3","off","_this2$connection4","_this2$connection5","reconnect","_callee4","_this2$connection6","_context4","onStatusChange","callback","onreconnecting","_this2$connection7","Connected","NotificationContext","NotificationContextProvider","connect","connectionManager","setConnectionManager","isMobileApp","Capacitor","getPlatform","manager","useNotificationHandler","deps","useContext","handlerCallback","canRecieveNotifications","autoIncrement","startPosition","val","increment","makeAutoIncrement","Notification","permission","AccessRights","NotificationManager","schedule","notification","Array","isArray","LocalNotifications","n","_n$id","body","style","summary","priority","actionId","click_action","requestPermission","requestPermissions","UserAvatar","porps","styles","_useAuth","_useAuth2","authState","logaout","anchorEl","setAnchorEl","notificationStatus","setIsActive","useNotificationStatus","open","Boolean","askForPermission","showSystemNotification","employeeName","Box","className","Typography","IconButton","onClick","event","currentTarget","Badge","overlap","anchorOrigin","vertical","horizontal","variant","classes","badge","Avatar","nameWords","substring","toUpperCase","getInitials","Menu","keepMounted","transformOrigin","onClose","MenuItem","MainBar","nscomexlogo","require","AppBar","position","Toolbar","edge","aria-label","toggleNavMenu","MenuIcon","src","useMenuItemStyles","level","menuItem","whiteSpace","paddingLeft","isItemVisiable","isLinkVisiable","isSubmenuVisiable","hidden","items","visiable","subItem","accessRights","None","SubmenuMenuItem","submenu","toggleOpen","Icon","icon","Fragment","ListItem","button","ListItemIcon","ListItemText","primary","ExpandLess","ExpandMore","Collapse","in","timeout","unmountOnExit","MenuList","menuItems","LinkMenuItem","page","component","Link","to","path","currentLevel","visiableItems","submenuItemKeys","i","_useToggleStateDictio","_useToggleStateDictio2","openDictionary","toggleOpenDictionary","toogleOpen","List","disablePadding","Table","immutableData","getData","options","materialTableProps","_objectWithoutProperties","_excluded","tableData","isLoading","tableDataMutable","d","tableOptions","propOptions","padding","headerStyle","toolbar","searchPlaceholder","searchTooltip","header","pagination","firstAriaLabel","firstTooltip","lastAriaLabel","lastTooltip","labelDisplayedRows","labelRowsSelect","labelRowsPerPage","nextAriaLabel","nextTooltip","previousAriaLabel","previousTooltip","emptyDataSourceMessage","addTooltip","editTooltip","deleteTooltip","editRow","saveTooltip","cancelTooltip","deleteText","useMaterialTableLocalization","MaterialTable","assign","AttributeManditory","AttributeType","AttrCompType","ErrorCodeExceptions","getAllAttributesApi","userId","params","useAttributeData","allData","getAllProductsAPI","DisplayBoolNumber","thrutyValue","CheckIcon","RemoveIcon","AccordionNames","getAttributeApi","attrid","getAttribute","attributeId","useDisplayAttribute","attrId","storeAttribute","displayedProduct","displatch","DisplayDrawerContext","useDisplaySingleEmementStyles","paddingBottom","flexDirection","row","rowBorder","borderBottom","divider","label","active","height","DisplayAttributeBasicInfo","attribute","attrNameen","unitCode","Active","getAllAttributesValuesApi","loadAttributeValues","getAllAttributes","useAttributeValuesData","values","setValues","loadAttributes","loadedValues","DisplayAttributeValues","_useAttributeValuesDa","AttributesDisplayTable","Grid","container","justify","TableContainer","Paper","size","TableHead","TableRow","TableCell","TableBody","attrValueId","AttributeEditParts","accordionNames","DisplayAttribute","BasicInfo","direction","ExpansionPanel","expanded","onChange","ExpansionPanelSummary","expandIcon","ExpandMoreIcon","Values","disabled","Select","deleteAttributeApi","useAttributeDelete","dispatchDelete","ReferenceErrorCode","attributesLocation","getAttributeEditLocation","valueId","basicInfoEdit","valuesEdit","useAttributeActions","userAccessRights","onShowClient","showWithDrawer","useViewAttribute","onEditClient","useEditAttributeAction","ViewIcon","tooltip","rowData","EditIcon","ReadOnly","history","useHistory","atribute","push","CustomDialog","closeLabel","confirmLabel","disableBackdropClick","confirm","close","Dialog","DialogTitle","DialogContent","DialogContentText","DialogActions","Button","autoFocus","AttributeTable","tableProps","_useAttributeData","_useAttributeData2","loadAll","columns","render","product","customSort","a","b","useAttributeColumns","_useDeleteAttributeAc","_useAttributeDelete","_useAttributeDelete2","deleteAttribute","reset","attr","useDeleteAttributeAction","_useDeleteAttributeAc2","onDelete","resetState","pageSize","actionsColumnIndex","editable","onRowDelete","usePageStyles","rootSpacing","gridItem","marginBottom","mainFab","margin","top","right","bottom","left","fabProgress","secondary","dark","zIndex","fabProgressWrapper","fabSuccess","useStyles","searchButton","SearchBox","setSearch","target","TextField","placeholder","InputProps","startAdornment","InputAdornment","SearchIcon","InputLabelProps","shrink","useSearch","searchSelector","setSearchCallback","_useDebounceState","initState","initDelay","_useState9","_useState10","setState","useRef","clearTimeout","setNextState","nextState","setTimeout","useDebounceState","_useDebounceState2","deleyedSearch","setDeleyedSearch","displaySearch","setDisplaySearch","PageTitle","backLocation","subtitle","goBack","pageTitle","BackIcon","AttributePage","pageStyles","_useAttributeSearch","_useAttributeSearch2","xs","Card","CardHeader","Divider","CardContent","All","Fab","AddIcon","useAttributeValidator","validation","Text","createAttributeApi","updateAttributeApi","useAttributeUpsert","dispatchUpsert","FabSave","fabClass","SaveIcon","CircularProgress","StringInput","property","otherProps","required","helperText","getUnitLabel","AutocompleteSelect","onChangeItem","predicate","getLabel","dataFilter","handleCityChange","newValue","filtredData","selectedItem","Autocomplete","getOptionLabel","renderInput","Skeleton","UnitSelect","_useUnits","_useUnits2","renderUnitLabel","BoolInput","falsyValue","FormControlLabel","control","Switch","checked","LeavePrompt","shouldShow","dialogOpen","setDialogOpen","setLocation","_React$useState5","_React$useState6","confirmed","setConfirmed","handleRouterPrompt","dialogClosed","pathname","Prompt","when","AttributeTypeSelect","handleChange","select","option","AttrCompTypeSelect","LessThan","Equal","MoreThan","EditAttributeBasicInfoPage","editAttribute","_useAttributeValidato","_useAttributeValidato2","_useAttributeUpsert","_useAttributeUpsert2","upsert","unsavedChanges","handleChangeType","save","parseInt","newId","Inactive","deleteAttributeValueApi","attrvalid","useAttributeValueDelete","AttributeValuesTable","_useAttributeValuesDa2","reload","useValueActions","onDeleteAttribute","useDeleteValueAction","_onRowDelete","_useAttributeValueDel","deleteValue","onEditAttribute","useEditValueAction","defauiltAttribute","mandatory","False","useEditAttributeState","displayRole","useAttributeState","getAttributeValueApi","getAttributeValue","useEditAttributeValue","productId","_useAttributeValue","setAttribute","loadedAttribute","loadClient","useAttributeValue","displayAttributeValue","defaultAttribute","nameen","valueen","createDefaultAttributeValue","useAttributeValueValidator","useAttributeValueUpsert","attributeComponents","Component","isMenuItem","_props$match$params","match","_useEditAttributeValu","useEditAttributeValueState","_useEditAttributeValu2","editValue","_useAttributeValueVal","_useAttributeValueVal2","_useAttributeValueUps","_useAttributeValueUps2","handleChangeNum","editPart","_useEditAttributeStat","_useEditAttributeStat2","handleSideChange","hasSelectValues","Tabs","indicatorColor","textColor","Tab","marginTop","getAllBanksApi","loadAllBanks","getAllBanksAPI","getBankApi","bankid","getBank","bankId","useDisplayBank","storeBank","bank","loadBank","DisplayBankMainAttributes","regNumber","address","account","DisplayBank","deleteBankApi","useBankDelete","dispatchDeletebank","banksLocation","getBankEditLocation","editRouter","useBankActions","onShowBank","useViewBank","onEditBank","useEditBankAction","BanksTable","_useBankData","useBankData","_useBankData2","useBankColumns","onDeleteBank","_useBankDelete","deleteBank","useDeleteBankAction","BanksPage","_useBankSearch","_useBankSearch2","defaultBank","useEditBankState","displayBank","useEditBank","useBankValidator","cityId","createBankApi","updateBankApi","useBankUpsert","dispatchUpsertBank","upsertBank","getCityLabel","useCities","CitySelect","_useCities","_useCities2","renderCityLabel","citiesWithoutRegions","c","region","getCommissionsLabel","useCommissions","CommissionSelect","_useCommissions","_useCommissions2","renderCommissionsLabel","commType","bankComponents","BankPage","_useEditBankState","_useEditBankState2","editBank","_useBankValidator","_useBankValidator2","_useBankUpsert","_useBankUpsert2","changeCity","changeCommission","commId","getCityApi","getCity","useDisplayCity","storeCity","loadCity","defaultCity","regionId","isPort","useEditCityState","displayCity","useEditCity","useCityValidator","createCityApi","updateCityApi","useCityUpsert","dispatchUpsertCity","upsertCity","citiesLocation","getCityEditLocation","getRegionLabel","useRegions","RegionSelect","_useRegions","_useRegions2","renderRegionLabel","getAllCityApi","loadAllCities","getAllCitiesAPI","ClientActive","ClientHeadquaters","ClientHasContract","ContractWebUser","ContractWebUserBlocked","AccountDefault","AccountOrderSide","DisplayCityMainAttributes","regionName","DisplayCity","deleteCityApi","useCityDelete","dispatchDeleteCity","useCityActions","onShowCity","useViewCity","onEditCity","useEditCityAction","CitiesTable","_useCityData","useCityData","_useCityData2","useCityColumns","onDeleteCity","_useCityDelete","deleteCity","useDeleteCityAction","cityComponents","_useCitySearch","_useCitySearch2","_useEditCityState","_useEditCityState2","editCity","_useCityValidator","_useCityValidator2","_useCityUpsert","_useCityUpsert2","changeRegion","regId","getAllClientsWebApi","useClientData","getAllClientsAPI","useClientSelector","selector","_useClientData","_useClientData2","loadAllClients","setClient","getClientApi","cliid","getClient","useDisplayClient","cliId","storeClient","getTypeLabel","useClientTypes","DisplayClientBasicInfo","_React$useContext","_useClientType","typeId","_useClientTypes","typeLabel","useClientType","fullName","cliJBKJS","foreignCli","Foreign","mailCity","mailAddress","mobile","fax","hasContract","True","HasAccess","activeFrom","activeTo","comment","getClientPersonApi","getClientPersons","getAllClientPersons","useClientPersons","clientPersons","setClientPersons","loadClientPersons","loadedClientBroker","DisplayPersons","_useClientPersons","persons","ClientPersonDisplayTable","person","cliPrsId","cliPrsName","cliPrsRoleName","getAllClientBrokers","getClientBrokers","useClientBrokers","clientBrokers","setClientBrokers","loadClientBrokers","DisplayClientBrokers","_useClientBrokers","brokers","ClientBrokersDisplayTable","brokIdNo","brokName","getClientContractsApi","getClientContracts","getAllClientContracts","useClientContracts","contracts","setContracts","loadClientContracts","loadedContracts","DisplayClientContracts","_useClientContracts","ClientContractsDisplayTable","contract","cliContrId","contrNo","contrDate","getClientAccountsApi","getClientAccounts","getAllClientAccounts","useClientAccounts","accounts","setAccounts","loadClientAccounts","loadedAccounts","useClientAccountSideTranslator","Both","DisplayClientAccounts","_useClientAccounts","ClientAccountsDisplayTable","sideTranslator","monAccId","forBuySell","ClientEditParts","DisplayClient","Persons","Brokers","Contracts","Accounts","deleteClientApi","useClientDelete","dispatchDeleteEmployee","empId","CommissionStandard","CommissionAmountType","getClientsEditLocation","personsEdit","brokersEdit","contractsEdit","accountEdit","useClientActions","useViewClient","useEditClientAction","ClientTable","useClientColumns","_useDeleteClientActio","_useClientDelete","_useClientDelete2","deleteClient","useDeleteClientAction","_useDeleteClientActio2","ClientPage","_useClientSearch","_useClientSearch2","useClientValidator","createClient","updateClientApi","useClientUpsert","dispatchUpsertEmployee","upsertClient","DateInput","clearable","srLocale","enLocale","MuiPickersUtilsProvider","utils","DateFnsUtils","KeyboardDatePicker","cancelLabel","clearLabel","okLabel","ClientTypeSelect","typeValue","types","EditClientBasicInfo","editClient","_useClientValidator","_useClientValidator2","_useClientUpsert","_useClientUpsert2","handleActiveFromChange","handleActiveToChange","changeMailCity","Domestic","mailCityId","deleteClientPersonApi","cliprsid","useClientPersonDelete","personId","ClientPersonsTable","_useClientPersons2","useClientPersonColumns","onDeleteClient","useDeleteClientPersonAction","_useClientPersonDelet","_useAuth3","deleteClientBrokerApi","clibrokid","useClientBrokerDelete","dispatchDeleteBroker","ClientBrokerTable","_useClientBrokers2","useClientBrokerColumns","useClientBrokerActions","onDeleteBroker","useDeleteClientBrokerAction","_useClientBrokerDelet","deleteBroker","cliBrokId","onEditBroker","useEditClientBrokerAction","deleteClientContractApi","clicontrid","useClientContractDelete","contractId","getClientContractApi","getClientContract","clientBrokerId","DisplayContractMainAttributes","contrDescr","useTooltipStyles","arrow","common","white","fontSize","black","boxShadow","shadows","CustomTooltip","titleKeyword","tooltipStyles","Tooltip","interactive","printClientContract","responseType","userid","useContractPrinter","filename","contractReport","fileDownload","Blob","printContractThunk","DisplayContract","clientContractId","setContract","loadedBroker","useDisplayContract","_useContractPrinter","_useContractPrinter2","download","DownloadIcon","ClientContractTable","_useClientContracts2","useClientContractColumns","useClientContractActions","onDeleteContract","useDeleteClientContractAction","_useClientContractDel","deleteContract","onEditContract","useEditClientContractAction","onShowContract","useViewContract","defaultClient","rpgCode","useEditClientState","cilId","displayClient","useEditClient","deleteClientAccountApi","climonaccid","useClientAccountDelete","dispatchDeleteAccount","deleteClientAcountApi","ClientAccountTable","_useClientAccounts2","useClientAccountColumns","useClientAccountActions","onDeleteAccount","useDeleteClientAccountAction","defaultAcc","_useClientAccountDele","deleteAccount","onEditAccount","useEditClientAccountAction","getClientAccountApi","getClientAccount","clientAccountId","useEditClientAccount","accountId","_useClientAccount","setAccount","loadedAccount","useClientAccount","displayAccount","defaultPerson","clientBankCode","createDefaultAccount","useClientAccountValidator","currId","createClientAccountApi","updateClientAccountApi","useClientAccountUpsert","dispatchUpsertContract","updateClientAccounttApi","upsertClientAccount","getBankLabel","useBanks","BankSelect","_useBanks","_useBanks2","renderBankLabel","getAllCurrenciesApi","useCurrencyData","curerencies","getAllRolesAPI","CurrencySelect","_useCurrencyData","_useCurrencyData2","loadCurencies","curencies","getCurrencyLabel","AccountOrderSideSelect","translator","useClientAccountSideOptions","getClientBrokerApi","getClientBroker","useEditClientBroker","clientPersonId","_useClientBroker","setBroker","useClientBroker","createDefaultBroker","useClientBrokerValidator","createClientBrokerApi","updateClientBrokerApi","useClientBrokerUpsert","dispatchUpsertBroker","getAllEmployeesWebApi","loadAllEmployees","getAllEmployeesAPI","useEmployeeData","EmployeeSelect","_useEmployeeData","_useEmployeeData2","renderEmployeeLabel","renderIdNumber","useEditClientContract","_useClientContract","useClientContract","displayContract","contrType","contrTypeDescr","phoneOrder","webUser","webUserBlocked","useClientContractValidator","linkedContrNo","linkedContrId","createClientContractApi","updateClientContractApi","useClientContractUpsert","upsertClientContract","ClientContractSelect","renderClientContractLabel","getGroupLabel","ContractTypeSelect","_useContractTypes","_useContractTypes2","contractType","renderLabel","getClientPerson","useClientPerson","clientPerosnId","loadedClient","useEditClientPerson","_useClientPerson","cliPrsIdNo","createDefaultPerson","cliPrsRole","createClientPersonApi","updateClientPersonApi","useClientPersonUpsert","dispatchUpsertPerson","upsertClientPerson","getRoleLabel","ClientPersonRoleSelect","_usePersonRoles","_usePersonRoles2","renderRoleLabel","clientsComponents","ClientsPage","_useEditClientPersonS","useEditClientPersonState","_useEditClientPersonS2","editPerson","_useClientPersonUpser","_useClientPersonUpser2","dateCertified","_useEditClientBrokerS","useEditClientBrokerState","_useEditClientBrokerS2","editBroker","_useClientBrokerValid","_useClientBrokerValid2","_useClientBrokerUpser","_useClientBrokerUpser2","empl","contactId","_useEditClientContrac","useEditClientContractState","_useEditClientContrac2","editContract","_useClientContractVal","_useClientContractVal2","_useClientContractUps","_useClientContractUps2","changeLinkedContract","linkedContract","linked","_useEditClientAccount","useEditClientAccountState","_useEditClientAccount2","editAccount","_useClientAccountVali","_useClientAccountVali2","_useClientAccountUpse","_useClientAccountUpse2","changeBank","changeCurrency","_useEditClientState","_useEditClientState2","getAllCommisionsApi","useCommissionData","getAllCommissionsAPI","getCommisionApi","commid","getCommission","proiductId","useDisplayCommission","storeCommission","displayedCommission","loadCommission","DisplayProductBasicInfo","commNameEn","isStandard","getAllCommissionDetailsApi","loadCommissionDetails","commissionId","useDetails","details","setDetails","loadDetails","loaded","DisplayCommissionDetailes","_useDetails","detailes","DisplayCommissionDetaileTable","commDetId","fromDate","CommissionEditParts","DisplayCommission","Detailes","deleteCommisionApi","useCommissionDelete","dispatchDeleteProduct","commissionLocation","getCommissionEditLocation","detailId","detailEdit","Details","useCommissionActions","useViewCommission","useEditCommissionAction","comm","CommissionTable","_useCommissionData","_useCommissionData2","useProductColumns","_useCommissionDelete","deleteCommission","useDeleteCommissionAction","CommissionPage","_useCommissionSearch","_useCommissionSearch2","useCommissionValidator","createCommisionApi","commision","updateCommisionApi","useCommissionUpsert","dispatchUpsertRole","CommissionTypeSelect","_useCommissionTypes","_useCommissionTypes2","renderTypeLabel","EditCommissionBasicInfo","editCommission","_useCommissionValidat","_useCommissionValidat2","_useCommissionUpsert","_useCommissionUpsert2","deleteCommissionDetailApi","commdetid","useDetailDelete","dispatchDeleteAttribute","_useDetails2","useCommissionColumns","detail","diff","percSell","percBuy","_useDetailDelete","deleteDetail","useEditDetailAction","defauiltCommission","useEditCommissionState","useEditCommission","getCommissionDetailApi","loadCommissionDetail","useEditDetailS","_useDetail","setDetail","load","useDetail","displayDetail","defaultDetail","jobType","clientType","percAmtBuy","Percent","percAmtSell","createDefaultAttribute","useDetailValidator","createCommissionDetailApi","updateCommissionDetailApi","useDetailUpsert","dispatchUpsertDetail","upsertCommissionDetail","ProductGroupSelect","_useInitProductGroups","_useInitProductGroups2","groups","renderGroupLabel","getProductsFroSelect","useProductSelectData","selectProducts","getProductsFroSelectApi","loadProductsForSelect","ProductSelect","renderCode","prodCode","getDisplayValue","displayValue","NumberInput","decimalCount","_excluded2","itemValue","displayValuePair","setDisplayPair","setErrorMessage","onNumberChange","numberValue","newErrorMessage","NumberFormatCustom","inputRef","other","separators","decimalScale","NumberFormat","getInputRef","onValueChange","thousandSeparator","isNumericString","fixedDecimalScale","createNumberFormatCustom","inputComponent","commisionsComponents","detaileId","_useEditDetailState","useEditDetailState","_useEditDetailState2","editDetail","_useDetailValidator","_useDetailValidator2","_useDetailUpsert","_useDetailUpsert2","group","prodGroupId","prodId","endAdornment","Amount","_useEditCommissionSta","_useEditCommissionSta2","getCountryApi","cntid","getCountry","useDisplayCountry","storeCountry","country","loadCountry","defaultCountry","useEditCountryState","displayCountry","useEditCountry","useCountryValidator","createCountryApi","updateCountryApi","useCountryUpsert","dispatchUpsertCountry","cntCode","upsertCountry","getCountryEditLocation","getAllCountyApi","loadAllCountries","countris","getAllCountriesAPI","useCountryGetter","dispatchLoadAllCountries","DisplayCountryMainAttributes","DisplayCountry","deleteCountryApi","useCountryDelete","dispatchDeleteCountry","useCountryActions","onShowCountry","useViewCountry","onEditCountry","useEditCountryAction","CountriesTable","_useCountryData","useCountryData","_useCountryData2","useCountryColumns","onDeleteCountry","_useCountryDelete","deleteCountry","useDeleteCountryAction","countriesComponents","_useCountrySearch","_useCountrySearch2","_useEditCountryState","_useEditCountryState2","editCountry","_useCountryValidator","_useCountryValidator2","_useCountryUpsert","_useCountryUpsert2","getCurrencyApi","currid","getCurrency","roleId","useDisplayCurrency","storeCurrency","displayedCurrency","defauiltCurrency","useEditCurrencyState","currencyId","displayCurrency","useEditCurrency","useCurrencyValidator","createCurrencyApi","updateCurrencyApi","useCurrencyUpsert","currencyLocation","getCurrencyEditLocation","CurrencyRateFor","DisplayCurrencyBasicInfo","DisplayCurrency","useCurrenciesActions","onShowRole","useViewCurrency","onEditRole","useEditCurrencyAction","RolesTable","useCurrenciesColumns","currencyComponents","_useCurrencySearch","_useCurrencySearch2","CurrencyTable","_useEditCurrencyState","_useEditCurrencyState2","editCurrency","_useCurrencyValidator","_useCurrencyValidator2","_useCurrencyUpsert","_useCurrencyUpsert2","getCurrencyRateApi","currrateid","getCurrencyRate","useDisplayCurrencyRate","currRateId","storeCurrencyRate","displayedCurrencyRate","rateFor","rateId","useCurrencyRateValidator","midRate","createCurrencyRateApi","rate","updateCurrencyRateApi","useCurrencyRateUpsert","getCurrencyRateEditLocation","getAllCurrencyRatesApi","useCurrencyRateData","rates","getAllRatesAPI","useCurrency","_useCurrencies","currencyLabel","_useCurrency","buyRate","sellRate","CurrencyRateTable","_useCurrencyRateData","_useCurrencyRateData2","_useContext","useCurrencyRatesColumns","useCurrencyStyles","currencySelect","ratesComponents","_useCurrencyRateFilte","useCurrencyRateFilter","_useCurrencyRateFilte2","setCurrencyId","editRate","_useCurrencyRateValid","_useCurrencyRateValid2","_useCurrencyRateUpser","_useCurrencyRateUpser2","getEmployee","empid","useDisplayEmployee","storeEmploye","employeeId","defauiltEmployee","branch","midName","Male","useEditEmployeeState","displayEmployee","useEditEmployee","useEmployeeValidator","createEmployee","updateEmployee","useEmployeeUpsert","upsertEmployee","useGenderValues","EmployeeGenderSelect","genderValues","EmployeeCitySelect","findEmployeeCity","getEmployeeEditLocation","DisplayEmployeeMainAttributes","dateOfBirth","DisplayEmployee","deleteEmployeeApi","useEmployeeDelete","useEmployeeActions","onShowEmployee","useViewEmployee","onEditEmployee","useEditEmployeeAction","EmployeesTable","useEmployeeColumns","onDeleteEmployee","_useEmployeeDelete","deleteEmployee","useDeleteEmployeeAction","employeeComponents","_useEmployeeSearch","_useEmployeeSearch2","_useEditEmployeeState","_useEditEmployeeState2","editEmployee","_useEmployeeValidator","_useEmployeeValidator2","_useEmployeeUpsert","_useEmployeeUpsert2","handleDateChange","maxDate","getAllProductGroupsApi","useProductGroupData","getAllProductGroupsAPI","ProducAttributeManditory","ProducAttributeHasStandard","getProductGroupApi","prodgroupid","getProductGroup","groupId","useDisplayProductGroup","storeGroup","displayedGroup","prodGroupID","loadProductGroup","DisplayProductGroupBasicInfo","deleteProductGroupApi","useProductGroupDelete","dispatchDeleteRole","getProductGroupEditLocation","useProductGroupActions","useViewProductGroup","useEditRoleAction","ProductGroupsTable","_useProductGroupData","_useProductGroupData2","useProductGroupColumns","onDeleteGroup","_useProductGroupDelet","deleteGroup","useDeleteRoleAction","useRoleSearch","ProductGroupPage","_useRoleSearch","_useRoleSearch2","defauiltGroup","useEditProductGroupState","displayGroup","useEditProductGroup","useProductGroupValidator","createProductGroupApi","updateProductGroupApi","useProductGroupUpsert","dispatchUpserGroup","upsertProductGroup","productGroupComponents","_useEditProductGroupS","_useEditProductGroupS2","editGroup","_useProductGroupValid","_useProductGroupValid2","_useProductGroupUpser","_useProductGroupUpser2","getAllProductsApi","useProductData","getProductApi","prodid","getProduct","useDisplayProduct","storeProduct","loadProduct","prodNameen","vatRate","getAttributes","useAttributes","setAttributes","loadedAttributes","DisplayAttributes","_useAttributes","prodAttrId","prodAttrName","ProductEditParts","DisplayProduct","Attributes","deleteProductApi","useProductDelete","getProductEditLocation","baseEdit","atributesEdit","useProductActions","useViewProduct","ProductTable","_useProductData","_useProductData2","_useProductDelete","_useProductDelete2","deleteProduct","ProductPage","_useProductSearch","_useProductSearch2","prodattrid","useEditAttribute","_useAttribute","useAttribute","displayAttribute","hasStandard","AttributeValidation","dispatchUpsertAttribute","upsertAttribute","getAttributeLabel","ProductAttributeSelect","_useProductAttributes","_useProductAttributes2","renderAttributeLabel","useProductValidator","productGroupId","createProductApi","updateProductApi","useProductUpsert","upsertProduct","VatRateSelect","_useVatRates","_useVatRates2","EditProductBasicInfo","editProduct","_useProductValidator","_useProductValidator2","_useProductUpsert","_useProductUpsert2","_useAttributes2","standardValue","sorting","cellStyle","textAlign","orderNo","defauiltProduct","useEditProductState","useEditProduct","productsComponents","trimEnd","_useEditProductState","_useEditProductState2","getAllRegionApi","regtype","useRegionData","loadAllRegions","getRegApi","regid","getRegion","useDisplayRegion","storeRegion","loadRegion","DisplayRegionMainAttributes","_getCountry","_useCountryGetter","DisplayRegion","deleteRegionApi","useRegionDelete","dispatchDeleteRegion","deleteRegion","getRegionsEditLocation","useRegionsActions","onShowRegion","useViewRegion","onEditRegion","useEditRegionsAction","RegionsTable","_useRegionData","_useRegionData2","useRegionsColumns","onDeleteRegion","_useRegionDelete","useDeleteRegionAction","useRegionSearch","term","useRegionType","RegionsPage","_useRegionSearch","_useRegionSearch2","TopRegionsPage","useEditRegion","displayRegion","defaultRegion","createDefaultRegion","useRegionValidator","parentRegId","createRegionApi","updateRegionApi","useRegionUpsert","dispatchUpsertRegion","upsertRegion","getCountryLabel","CountriesSelect","_useCountries","_useCountries2","renderCountryLabel","regionType","trimedRegions","reg","regionsComponents","_useEditRegionState","useEditRegionState","_useEditRegionState2","editRegion","_useRegionValidator","_useRegionValidator2","_useRegionUpsert","_useRegionUpsert2","getRegionsLocation","editDisplayName","createDisplayName","_country$cntId","_region$country","trim","getAllRolesApi","loadAllRoles","useRoleData","getRoleApi","roleid","getRole","useDisplayRole","storeRole","loadRole","isEmployee","deleteRoleApi","useRoleDelete","getRoleEditLocation","useRoleActions","useViewRole","_useRoleData","_useRoleData2","useRoleColumns","_useRoleDelete","RolesPage","defauiltRole","useEditRoleState","useEditRole","useRoleValidator","createRoleApi","updateRoleApi","useRoleUpsert","rolesComponents","_useEditRoleState","_useEditRoleState2","editRole","_useRoleValidator","_useRoleValidator2","_useRoleUpsert","_useRoleUpsert2","getAllUsersApi","loadAllUsers","UserEmployee","UserActive","UserSubscribtionUnlimited","UserChangePass","getUserApi","usrid","useDisplayUser","storeUser","SkeletonLoader","finalWidth","DisplayUserMainAttributes","_useEmployee","dispatchLoadAllEmployees","useEmployee","_useClient","useClient","clientPerson","_useRole","setRole","loadedRole","useRole","changePass","r","subscribed_Until","subscrUnlimited","deleteUserApi","dispatchDeleteUser","getUserEditLocation","useUserActions","onShowUser","useViewUser","onEditUser","useEditUserAction","UserTable","_useUsersData","useUsersData","_useUsersData2","useUserColumns","deleteUser","useDeleteUserAction","UserPage","_useUserSearch","_useUserSearch2","useEditUserState","userID","displayUser","useEditUser","useUserValidator","loginPass","createUserApi","updateUserApi","useUserUpsert","upsertRole","ClientSelect","cli","renderTaxCode","ClientPersonSelect","renderClientPersonLabel","RoleSelect","userComponents","_useEditUserState","_useEditUserState2","editUser","_useUserValidator","_useUserValidator2","_useUserUpsert","_useUserUpsert2","handleSubscriptionFromFromChange","handleSubscriptionUnlimitedChange","weakPasswordMessage","startsWith","handleIsEmployeeChange","getAllWhsApi","loadAllWhs","whss","getAllWhsAPI","useWhsData","getWhsApi","whsid","getWhs","whsId","useDisplayWhs","storeWhs","displayedWhs","whs","loadWhs","DisplayWhsMainAttributes","portName","distanceToPort","DisplayWhs","deleteWhsApi","useWhsDelete","dispatchDeleteWhs","whsLocation","getWhsEditLocation","useWhsActions","onShowWhs","useViewWhs","onEditWhs","useEditWhsAction","WhsTable","_useWhsData","_useWhsData2","maxWidth","minWidth","paddingRight","useWhsColumns","onDeleteWhs","_useWhsDelete","deleteWhs","useDeleteWhsAction","WhsPage","_useWhsSearch","_useWhsSearch2","defaultWhs","useEditWhsState","displayWhs","useEditWhs","useWhsValidator","createWhsApi","updateWhsApi","useWhsUpsert","dispatchUpsertWhs","upsertWhs","getPortLabel","port","usePorts","PortSelect","_usePorts","_usePorts2","renderPortLabel","warehouseComponents","_useEditWhsState","_useEditWhsState2","editWhs","_useWhsValidator","_useWhsValidator2","_useWhsUpsert","_useWhsUpsert2","changePort","portId","getAllPayTypeApi","loadAllPayTypes","getAllPayTypeAPI","getPayTypeApi","paytypeid","getPayType","paytypeId","useDisplayPayType","storePayType","payTypeId","payType","loadPayType","DisplayPayTypeMainAttributes","inPonder","DisplayPayType","deletePayTypeApi","usePayTypeDelete","dispatchDeletePayType","payTypesLocation","getPayTypeEditLocation","usePayTypeActions","onShowPayType","useViewPayType","onEditPayType","useEditPayTypeAction","PayTypesTable","_usePayTypeData","usePayTypeData","_usePayTypeData2","usePayTypeColumns","onDeletePayType","_usePayTypeDelete","deletePayType","useDeletePayTypeAction","PayTypePage","_usePayTypeSearch","_usePayTypeSearch2","defaultPayType","useEditPayTypeState","displayPayType","useEditPayType","usePayTypeValidator","createPayTypeApi","paytype","updatePayTypeApi","usePayTypeUpsert","dispatchUpsertPayType","payTypeComponents","_useEditPayTypeState","_useEditPayTypeState2","editPayType","_usePayTypeValidator","_usePayTypeValidator2","_usePayTypeUpsert","_usePayTypeUpsert2","listingComponents","ControledTable","pageIndex","onPageIndexChange","total","initialPage","count","components","Pagination","paginationProps","TablePagination","rowsPerPage","onChangePage","evt","onChangeRowsPerPage","PaginationTable","pageData","rowStyle","currentPageData","totalCount","OrderAllOrNothing","OrderExportReady","OrderType","OrdersEditAction","OrderMarkt","FundsCheckStatus","getOrderApi","ordid","getOrder","ordId","useDisplayMBOrder","storeMB","mborder","loadMBOrder","DiplayOrderMod","useOrderSideOptionsTranslator","useOrderMarketOptionsTranslator","market","Spot","Forward","OrdersEditParts","DisplayOrderMainAttributes","order","mod","marketTranslator","Full","ordNo","timeReceived","ordTypeDescr","refOrdNo","receiveMethodDescr","clientName","unitDescr","qty","qtyLeft","price","priceEur","percVat","priceWithVat","allOrNothing","minQty","expiryDate","paymentDays","goodsReadyFrom","goodsReadyTo","francoDescr","exportReady","getDeliveryLocation","getDeliveryLocationShort","guaranteeDescr","cancReplTime","ordStatusDescr","srps","locCountryName","deliveryLocation","locRegionName","locDistrictName","locCityName","locWarehouseName","DisplayOrderLogData","orderlog","OrderLogDisplayTable","changeTime","activity","attrValName","_useAttributeValues","_useAttributeValues2","ordAttrId","attrValue","v","attrValId","printOrder","useOrderPrinter","lan","printOrderThunk","DisplayOrder","displayMod","enablePrint","_useOrderPrinter","_useOrderPrinter2","print","screenExtraSmall","orderAttrList","orderLogList","useViewOrder","getOrderEditLocation","New","OrderFilterEditorType","useReplyMBOrder","Replay","useOrderTableStyles","cellHasTooltip","longCell","valueLabel","createRenderer","TooltipColumn","displayText","typography","tooltipElement","hideIcon","TooltipElises","text","overflowX","textOverflow","mapQualityLine","qualityLine","TurnocateText","_ref6","turnocatedName","maxChars","turnocate","tunrocateString","renderOrderPrice","renderClient","_ref4","qualityLines","quality","qualityRender","firstTwoRows","splice","_ref5","useOrderRowColor","getSideColor","useOrderSideStyles","sell","background","buy","OrdersTable","onShowMBOrder","PublicData","onReplayToOrder","ReplyIcon","canReplace","useOrderActions","useOrderColumns","getOrdersWebApi","defaultOrderStatus","_filter$product","_filter$orderStatus","_filter$client","_filter$employee","fromrow","numofrows","toDate","getOrdersThunk","defaultStatus","ordersResponse","getOrders","DataCurrent","useMainBoardData","_store$ux$trading$mai","sideFilter","pagedOrders","loadMainBoard","useMainBoardIndex","setOrdersIndexThunk","useMainBoardFilter","_useCurrentMainBoardF","useCurrentMainBoardFilter","storeFilter","_useCopiedState","_useCopiedState2","editFilter","changeState","setCurrentFilter","dispatchSetFilter","dispatchResetFilter","OrderSideSelect","nullable","useOrderSideOptions","enchanchedOptions","getStatusLabel","OrderStatusSelect","_useOrderStatuses","_useOrderStatuses2","statuses","renderStatus","OrderMarketSelect","useOrderMarketOptions","ChartPeriod","OrderFilterEditor","paddingTop","Extended","sm","prod","OrderFilterChips","remnoveFilter","Chip","MainBoarFilterButton","showFilter","MainBoarFilterEditor","_useCurrentMainBoardF2","FilterIcon","_useMainBoardFilter","_useMainBoardFilter2","rest","Basic","getChartData","numofdays","useGraphData","period","loadGraphData","Month","useGraphPeriod","dispatchSetPeriod","newPeriod","useGraphProduct","ProductGraph","_useGraphProduct","_useGraphProduct2","setProdId","_useGraphData","_useGraphPeriod","_useGraphPeriod2","setPeriod","alignContent","ToggleButtonGroup","exclusive","ToggleButton","ThreeMonts","HalfYear","FromYearBeggining","Year","ResponsiveContainer","LineChart","XAxis","dataKey","tickFormatter","YAxis","yAxisId","domain","formatter","labelFormatter","CartesianGrid","stroke","Line","dot","getTickerData","useTickerData","shouldFetchData","startTickerFetcher","createTickerFetcher","loadTicker","interval","setInterval","clearInterval","PriceTicker","usePageVisibility","_useTickerData","move","setMove","onMouseEnter","onMouseLeave","Ticker","speed","priceData","MainBoard","_useMainBoardData","_useMainBoardData2","buyPageData","dispatchLoadBuyOrders","_useMainBoardIndex","_useMainBoardIndex2","buyPageIndex","dispatchSetBuyIndex","_useMainBoardData3","_useMainBoardData4","sellPageData","dispatchLoadSellOrders","_useMainBoardIndex3","_useMainBoardIndex4","sellPageIndex","dispatchSetSellIndex","md","orderValidationState","franco","maxExpiryDate","add","useOrderWarehouseRequired","f","ftType","createOrderApi","updateOrderApi","modifyOrderApi","oppositeOrderApi","useOrderUpsert","dispatchUpsertOrder","Modify","Verify","t1","t2","upsertOrder","descrAbr","OrderRecieveMethodSelect","_useRecieveMethods","_useRecieveMethods2","recieveMethods","ftDescrLong","FrancoSelect","_useFrancoList","_useFrancoList2","GuaranteesTypeSelect","_useGuaranteesTypes","_useGuaranteesTypes2","guaranteesType","getOrderBookEditLocation","SideOverviewParts","AttributeValueSelect","loadValues","att","EditAttributeValue","manditory","valueChange","valueIdChange","loadAttribute","selectedAttribute","manditoryFinal","getComaprator","comp","useOrderPSTM","EditAttributes","allManditory","_useOrderPSTM","_useOrderPSTM2","createValueChanger","prop","newAttrs","getSubRegionLabel","subRegion","TopRegionSelect","_useTopRegions","_useTopRegions2","renderTopRegionLabel","WhsSelect","renderWhsLabel","warehouse","OrderNoteSelect","_useOrderNotes","_useOrderNotes2","notes","getPayTypeLabel","Pay_TypeSelect","_usePayTypes","_usePayTypes2","EditOrderBasicInfoPage","editOrder","_useOrderValidator","_useOrderWarehouseReq","isWhsRequired","isAfter","isSameOrAfter","every","locCountryId","locRegionId","locDistrictId","locCityId","locWarehouseId","useOrderValidator","_useOrderValidator2","_useOrderUpsert","_useOrderUpsert2","selectedProduct","setSelectedProduct","requiredWhs","fundCheckState","setFundCheckState","activeCheckState","setActiveCheckState","statusProducts","saveOrder","ordStatus","fundsCheckStatus","Confirmed","fabClick","Ignore","receiveMethod","createOrderAttributes","prodAttrList","pay_type","disablePast","_order$locCountryId","_order$locCountryId2","dist","bankGuarantee","note","list","getOppositeOrder","useEditOrder","orderId","diplayedOrder","setOrder","newOrder","useOrderForEdit","defaultOrder","paysCheck","NotChecked","EditOrderPage","sideStyle","_useEditOrderState","useEditOrderState","_useEditOrderState2","mainBoardComponents","getTradeApi","tradeid","getTrade","tradeId","useDisplayTrade","storeTrade","trade","loadTrade","DisplayTradeMainAttributes","fulfillmentDate","vatPerc","amt","amtWithVat","statusDescr","commPercSell","commAmtSell","commPercBuy","commAmtBuy","deliveryWhsName","DisplayTradeLogData","tradelog","TradeLogDisplayTable","printTrade","useTradePrinter","printTradeThunk","DisplayTrade","_useTradePrinter","_useTradePrinter2","tradeLogList","useViewTrade","cancelTradeApi","useTradeCancel","dispatchCancelOrder","CancelTrade","cancel","_useTradeCancel","_useTradeCancel2","cancelTrade","useTradeActions","onShowTrade","onCancelTrade","useShowCancelTrade","trans","CancelIcon","useTradeColumns","TradesTable","getTradesWebApi","_filter$tradeStatus","_filter$delivstatus","_filter$client2","delivstatus","clientid","client2id","getTradesThunk","tradesData","getTrades","loadTrades","_store$ux$trading$tra","useTradeIndex","setTradesIndexThunk","TradesFilterChips","TradeStatusSelect","_useTradeStatuses","_useTradeStatuses2","TradesFilterEditor","TradesFilterButton","TradesFilterDrawer","_useCurrentTradesFilt","useCurrentTradesFilter","_useCurrentTradesFilt2","_useTradesFilter","useTradesFilter","_useTradesFilter2","tradesComponents","_useTradesData","useTradesData","_useTradesData2","dispatchLoadTradesPage","_useTradeIndex","_useTradeIndex2","dispatchSetIndex","cancelOrderApi","useCancelOrder","CancelOrder","_useCancelOrder","_useCancelOrder2","cancelOrder","delOrderApi","useDeleteOrder","dispatchDelOrder","DeleteOrder","_useDeleteOrder","_useDeleteOrder2","deleteOrder","useOrderBookActions","onShowOBOrder","onModifyOrder","onVerifyOrder","onCancelOrder","useShowCancelOrder","onDeleteOrder","useShowDeleteOrder","VerifyIcon","statusN","canVerify","canCancel","MofifyIcoon","DeleteIcoon","canDelete","useOrderBookColumns","OrdersBookTable","columnsClient","useOrderBookColumnsClient","actionsCellStyle","useOrderBookData","_store$ux$trading$ord","useOrderBookIndex","useCurrentOrderBookFilter","OrderBookFilterButton","OrderBookFilterEditor","_useCurrentOrderBookF","_useCurrentOrderBookF2","_useOrderBookFilter","useOrderBookFilter","_useOrderBookFilter2","orderBookComponents","_useOrderBookData","_useOrderBookData2","dispatchLoadOrders","_useOrderBookIndex","_useOrderBookIndex2","radnovreme","hour","tab","setTab","mainBoardMComponents","chartsmobComponents","tradingComponents","getPaymentApi","payid","getPayment","payId","useDisplayPayment","storePayment","payment","loadPayment","DisplayPaymentMainAttributes","payDate","clientIdNo","tranNo","amtBal","amtNonAllocBal","amtOrdersBal","amtTransBal","printPayment","usePaymentPrinter","paymentsReport","printPaymentThunk","DisplayPayment","_usePaymentPrinter","_usePaymentPrinter2","useViewPayment","paymentLocation","getPaymentEditLocation","deletePaymentApi","usePaymentDelete","dispatchDeletePayment","PaymentSide","PaymentDedication","PayGroup","useEditPaymentAction","PaymentsTable","onShowPayment","onEditPayment","usePaymentsActions","amtPay","usePaymentsColumns","onDeletePayment","_usePaymentDelete","deletePayment","useDeletePaymentAction","PaymentFilterEditorType","getPaymentsWebApi","inout","nondedicated","paygroup","tranid","tranId","usePaymentsData","_store$ux$clearing$pa","paymentsResponse","getPayments","usePaymentIndex","setPaymentsIndexThunk","usePaymentsFilter","_useCurrentPaymentsFi","useCurrentPaymentsFilter","usePaymentSideOptionsTranslator","out","usePaymentDedicationOptionsTranslator","yes","no","getSimpleTrades","getSimpleTradesThunk","FiltredTransactionsSelect","_useSimpleTradesData","orders","loadOrders","useSimpleTradesData","ordData","PaymentFilterEditor","createTransactionFilterPayment","tradesFilter","setTransactionFilter","setSelectedOrder","PaymentFilterChips","dedicatedTranslator","tranDesc","PaymentFilterButton","PaymentsFilterEditor","_useCurrentPaymentsFi2","_usePaymentsFilter","_usePaymentsFilter2","getPaymentsReport","usePaymentsReportDownloader","getPaymentsExcel","usePaymentsExcelDownloader","dailyTrading","DownloadButton","_usePaymentsReportDow","_usePaymentsReportDow2","downloader","DownloadExcelButton","_usePaymentsExcelDown","_usePaymentsExcelDown2","ExcelIcon","PaymentsActions","PaymentsPage","_usePaymentsData","_usePaymentsData2","dispatchLoadPayments","_usePaymentIndex","_usePaymentIndex2","defaultPayment","hasOrdTran","useEditPaymentState","displayPayment","useEditPayment","usePaymentValidator","createPaymentApi","updatePaymentApi","usePaymentUpsert","dispatchUpsertPayment","upsertPayment","PaymentTypeSelect","_usePaymentTypes","_usePaymentTypes2","createTransactionFilter","paymentComponents","_useEditPaymentState","_useEditPaymentState2","editPayment","_usePaymentValidator","_usePaymentValidator2","_usePaymentUpsert","_usePaymentUpsert2","selectedOrder","changeAmt","depAmt","readOnly","depAmtPayed","nonAllocAmt","amtPayment","getControlApi","ctrlid","getControlGood","controlId","useDisplayCtrlGood","storeCtrlGoods","displayedctrlGood","ctrlGood","loadCtrlGood","DisplayCtrlGoodMainAttributes","controlDate","sellerCode","sellerName","buyerCode","buyerName","checkPointDescr","checkDoneByDescr","controlHouse","controlReportText","printCtrlGoods","useCtrlGoodsPrinter","ctrlGoods","ctrlgoods","ctrlGoodsReport","DisplayCtrlGoods","_useCtrlGoodsPrinter","_useCtrlGoodsPrinter2","ctrlGoodsLocation","getCtrlGoodsEditLocation","deleteControlApi","useCtrlGoodDelete","dispatchDeleteCtrlGood","useCtrlGoodsActions","onShowCtrlGood","useViewCtrlGood","onEditCtrlGood","useEditCtrlGoodsAction","CtrlGoodsFilterEditorType","CtrlGoodsTable","pctrlGoods","useCtrlGoodsColumns","onDeleteCtrlGoods","_useCtrlGoodDelete","deleteCtrlGood","useDeleteCtrlGoodsAction","getCtrlGoodsWebApi","_filter$seller","_filter$buyer","sellerid","seller","buyerid","buyer","useCtrlGoodsData","_store$ux$clearing$co","ctrlGoodsResponse","getCtrlGoods","useCtrlGoodsIndex","setCtrlGoodsIndexThunk","useCurrentCtrlGoodsFilter","CtrlGoodsFilterEditor","CtrlGoodsFilterChips","CtrlGoodsFilterButton","ControlGoodsFilterEditor","_useCurrentCtrlGoodsF","_useCurrentCtrlGoodsF2","_useCtrlGoodsFilter","useCtrlGoodsFilter","_useCtrlGoodsFilter2","getCtrlGoodsReport","useCtrlGoodsReportDownloader","_s$data$clearing$cont","hasData","getCtrlGoodsExcel","useCtrlGoodsExcelDownloader","_useCtrlGoodsReportDo","_useCtrlGoodsReportDo2","hasdata","_useCtrlGoodsExcelDow","_useCtrlGoodsExcelDow2","CtrlGoodsDataActions","CtrlGoodsPage","_useCtrlGoodsData","_useCtrlGoodsData2","dispatchLoadCtrlGoods","_useCtrlGoodsIndex","_useCtrlGoodsIndex2","defaultCtrlGoods","useEditCtrlGoodState","displayCtrlGood","useEditCtrlGood","useCtrlGoodsValidator","createControlApi","updateCtrlGoodsApi","useCtrlGoodUpsert","dispatchUpsertCtrlGoods","upsertCtrlGood","CheckPointSelect","_useCheckPoints","_useCheckPoints2","CheckPointPayerSelect","_useCheckPointPayers","_useCheckPointPayers2","CheckDoneBySelect","_useCheckDoneByList","_useCheckDoneByList2","getTradesActiveThunk","TradesSelect","onSellerChange","onBuyerChange","_useTradesActiveData","useTradesActiveData","sellerSelector","sellerId","buyerSelector","buyerId","_useClientSelector","_useClientSelector3","tradeData","QualityCtrlListSelect","_useQualityCtrlList","_useQualityCtrlList2","ctrlGoodsComponents","_useEditCtrlGoodState","ctrlId","_useEditCtrlGoodState2","editCtrlGoods","_useCtrlGoodsValidato","_useCtrlGoodsValidato2","_useCtrlGoodUpsert","_useCtrlGoodUpsert2","checkPoint","checkPays","checkDoneBy","getDeliveryApi","dlvrid","getDelivery","deliveryId","useDisplayDelivery","dlvrId","storeDeliveries","delivery","DisplayDeliveryMainAttributes","deliveryDate","warehouseCode","warehouseName","deliveryQty","leftQty","deliveryAmt","printDelivery","useDeliveryPrinter","deliveryReport","DisplayDelivery","_useDeliveryPrinter","_useDeliveryPrinter2","useViewDelivery","deliveriesLocation","getDeliveriesEditLocation","deleteDeliveryApi","useDeliveryDelete","dispatchDeleteDelivery","DeliveryFilterEditorType","useEditDeliveryAction","DeliveriesTable","onShowDelivery","onEditDelivery","useDeliveriesActions","useDeliveriesColumns","onDeleteDelivery","_useDeliveryDelete","deleteDelivery","useDeleteDeliveryAction","getDeliveriesWebApi","useDeliveryData","_store$ux$clearing$de","deliveriesResponse","getDeliveries","useDeliveryIndex","setDeliveryIndexThunk","useDeliveryFilter","_useCurrentDeliveryil","useCurrentDeliveryilter","DeliveryFilterEditor","DeliveryFilterChips","DeliveryFilterButton","DeliveriesFilterEditor","_useCurrentDeliveryil2","_useDeliveryFilter","_useDeliveryFilter2","getDeliveryReport","useDeliveryReportDownloader","getDeliveryExcel","useDeliveryExcelDownloader","_useDeliveryReportDow","_useDeliveryReportDow2","_useDeliveryExcelDown","_useDeliveryExcelDown2","DeliveriesActions","DeliveriesPage","_useDeliveryData","_useDeliveryData2","dispatchLoadDelivery","_useDeliveryIndex","_useDeliveryIndex2","defaultDelivery","useEditDeliveryState","displayDelivery","useEditDelivery","useDeliveryValidator","createDeliveryApi","updateDeliveryApi","useDeliveryUpsert","dispatchUpsertDelivery","upsertDelivery","deliveryComponents","_useEditDeliveryState","_useEditDeliveryState2","editDelivery","_useDeliveryValidator","_useDeliveryValidator2","_useDeliveryUpsert","_useDeliveryUpsert2","changeQty","getDisputeApi","dispid","getDispute","disputeId","useDisplayDispute","dispId","storeDispute","dispSitId","dispute","DisplayDisputeMainAttributes","dispSitDate","situationDescr","printDispute","useDisputePrinter","disputeReport","printDisputeThunk","DisplayDispute","_useDisputePrinter","_useDisputePrinter2","disputesLocation","getDisputesEditLocation","deleteDisputeApi","useDisputeDelete","dispatchDeleteDispute","useDisputesActions","onShowDispute","useViewDispute","onEditDispute","useEditDisputeAction","DisputeFilterEditorType","info","InfoOutlinedIcon","renderSituation","DisputeTable","useDisputeColumns","onDeleteDispute","_useDisputeDelete","deleteDispute","useDeleteDisputeAction","getDisputesWebApi","useDisputeData","_store$ux$clearing$di","disputesResponse","getDisputes","useDisputeIndex","setDisputeIndexThunk","useCurrentDisputeFilter","DispSitListSelect","_useDispSitList","_useDispSitList2","DisputeFilterEditor","_filter$status","DisputeFilterChips","DisputeFilterButton","DisputesFilterEditor","_useCurrentDisputeFil","_useCurrentDisputeFil2","_useDisputeFilter","useDisputeFilter","_useDisputeFilter2","getDisputeReport","useDisputeReportDownloader","getDisputeExcel","useDisputeExcelDownloader","_useDisputeReportDown","_useDisputeReportDown2","_useDisputeExcelDownl","_useDisputeExcelDownl2","DisputeActions","DisputePage","_useDisputeData","_useDisputeData2","dispatchLoadDispute","_useDisputeIndex","_useDisputeIndex2","defaultDispute","useEditDisputeState","displayDispute","useEditDispute","useDisputeValidator","createDisputeApi","updateDisputeApi","useDisputeUpsert","dispatchUpsertDispute","disputeComponents","_useEditDisputeState","_useEditDisputeState2","editDispute","_useDisputeValidator","_useDisputeValidator2","_useDisputeUpsert","_useDisputeUpsert2","getGuaranteeApi","getGuarantee","useDisplayGuarantee","storeGuarantee","guarantee","loadGuarantee","DisplayGuaranteeMainAttributes","printGuarantee","useGuaranteePrinter","guaranteesReport","printGuaranteeThunk","DisplayGuarantee","_useGuaranteePrinter","_useGuaranteePrinter2","guaranteeLocation","getGuaranteeEditLocation","deleteGuaranteeApi","useGuaranteeDelete","dispatchDeleteGuarantee","useGuaranteesActions","onShowGuarantee","useViewGuarantee","onEditGuarantee","useEditGuaranteeAction","GuaranteeSide","GuaranteeDedication","GuaranteesTable","useGuaranteeColumns","onDeleteGuarantee","_useGuaranteeDelete","deleteGuarantee","useDeleteGuaranteeAction","GuaranteeFilterEditorType","getGuaranteeWebApi","Guarantees","useGuaranteeData","_store$ux$clearing$gu","guaranteesResponse","getGuarantees","useGuaranteeIndex","setGuaranteesIndexThunk","useCurrentGuaranteeFilter","useGuaranteeSideOptionsTranslator","useGuaranteeDedicationOptionsTranslator","GuaranteeFilterEditor","GuaranteesFilterChips","GuaranteeFilterButton","GuaranteesFilterEditor","_useCurrentGuaranteeF","_useCurrentGuaranteeF2","_useGuaranteeFilter","useGuaranteeFilter","_useGuaranteeFilter2","getGuaranteesReport","useGuaranteesReportDownloader","getGuaranteesExcel","useGuaranteesExcelDownloader","_useGuaranteesReportD","_useGuaranteesReportD2","_useGuaranteesExcelDo","_useGuaranteesExcelDo2","GuaranteesActions","GuaranteesPage","_useGuaranteeData","_useGuaranteeData2","dispatchLoadGuarantee","_useGuaranteeIndex","_useGuaranteeIndex2","defaultGuarantee","useEditGuaranteeState","displayGuarantee","useEditGuarantee","useGuaranteeValidator","grntId","createGuaranteeApi","updateGuaranteeApi","useGuaranteeUpsert","dispatchUpsertGuarantee","updateGuarantees","createGuarantees","upsertGuarantee","PaymentTypeGuarSelect","_usePaymentGuarTypes","_usePaymentGuarTypes2","getSimpleOrdersApi","getSimpleOrdersThunk","FiltredOrdersSelect","_useSimpleOrdersData","useSimpleOrdersData","getBankGuaranteeWebApi","loadAllBankGuaranteesSelected","bankguaranteesResponse","getBankGuaranteesSelected","BankGuaranteeSelect","_useBankGuaranteeData","bnkgrnt","setBnkGrnt","useBankGuaranteeDataSelect","createOrderFilter","createBnkGrntFilter","guaranteeComponents","_useEditGuaranteeStat","_useEditGuaranteeStat2","editGuarantee","_useGuaranteeValidato","_useGuaranteeValidato2","_useGuaranteeUpsert","_useGuaranteeUpsert2","orderFilter","setOrderFilter","bnkGrntFilter","setbnkGrntFilter","getAllStockFeesApi","loadAllStockFees","stfee","getAllStockFeesAPI","getStockFeeApi","getStockFee","useDisplayStockFee","stfeeId","storeStockFee","stockfee","DisplayStockFeeMainAttributes","stockFee","DisplayStockFee","deleteStockFeeApi","useStockFeeDelete","dispatchDeleteStockFee","sfId","stockFeeLocation","getStockFeesEditLocation","useStockFeeActions","onShowstockFee","useViewStockFee","onEditStockFee","useEditStockFeeAction","_stfee$id","StockFeesTable","_useStockFeeData","useStockFeeData","_useStockFeeData2","useStockFeeColumns","onDeleteStockFee","_useStockFeeDelete","deleteStockFee","useDeleteStockFeeAction","StockFeesPage","_useStockFeeSearch","_useStockFeeSearch2","defaultStockFee","useEditStockFeeState","displayStockFee","useEditStockFee","useStockFeeValidator","createStockFeeApi","updateStockFeeApi","useStockFeeUpsert","dispatchUpsertStockFee","updatestockFeeApi","upsertStockFee","stockFeesComponents","_useEditStockFeeState","_useEditStockFeeState2","editStockFee","_useStockFeeValidator","_useStockFeeValidator2","_useStockFeeUpsert","_useStockFeeUpsert2","getAllTransportFeesApi","loadAllTransportFees","getAllTransportFeesAPI","ShouldCalc","getTransportFeeApi","getTransport_Fee","trfeeid","useDisplayTransportFee","trfeeId","storeTransportFee","transportfee","DisplayTransportFeeMainAttributes","trfee","distance","DisplayTransportFee","deleteTransportFeeApi","useTransportFeeDelete","dispatchDeleteTransportFee","deleteTransportFee","transportFeeLocation","getTransportFeesEditLocation","useTransportFeeActions","onShowTransportFee","useViewTransportFee","onEditTransportFee","useEditTransportFeeAction","_trfee$id","TransportFeesTable","_useTransportFeeData","useTransportFeeData","_useTransportFeeData2","useTransportFeeColumns","onDeleteTransportFee","_useTransportFeeDelet","useDeleteTransportFeeAction","TransportFeesPage","_useTransportFeeSearc","_useTransportFeeSearc2","defaultTransportFee","useEditTransportFeeState","displayTransportFee","useEditTransportFee","useTransportFeeValidator","createTransportFeeApi","updateTransportFeeApi","useTransportFeeUpsert","dispatchUpsertTransportFee","transportFeesComponents","_useEditTransportFeeS","_useEditTransportFeeS2","transportFee","editTransportFee","_useTransportFeeValid","_useTransportFeeValid2","_useTransportFeeUpser","_useTransportFeeUpser2","useEditCalculationParamsState","shouldCalcDistance","shouldCalcStorage","createDefaultState","useCalculationParamsValidator","useTASCalculator","dispatchCalculate","costs","calcstoragecost","calculateTASCostsThunk","dispatchReset","useTASCostSaver","dispatchSave","cost","ClaculateTASCosts","_useEditCalculationPa","_useEditCalculationPa2","editParams","_useCalculationParams","_useCalculationParams2","_useTASCalculator","_useTASCalculator2","calculationFetchState","calculate","_useTASCostSaver","_useTASCostSaver2","saveFetchState","tasCosts","onCalculate","validParams","onSave","transCostBuy","transCostSell","storCostBuy","storCostSell","transportCost","storageCost","ClaculateTASCostsDrawer","useTTASCostsActions","useShowClaculateTASCosts","CalculateIcon","_store$ux$clearing$tr","transportAndStorageComponents","getTradingDataApi","ptdid","getTradingData","useDisplayTradingData","storeTradingData","ptdId","loadTradingData","DisplayTradingDataMainAttributes","tradingDate","refPrice","bestBid","bestBidQty","bestAsk","bestAskQty","highPrice","lowPrice","volume","amount","midPrice","printTradingData","useTradingDataPrinter","tradingdata","tradingDataCalcReport","DisplayTradingData","_useTradingDataPrinte","_useTradingDataPrinte2","getTradingDataEditLocation","useTradingDataActions","onShowTradingData","useViewTradingData","onEditTradingData","useEditTradingDataAction","TradingDataFilterEditorType","TradingDataTable","useTradingDataColumns","getTradingDataWebApi","useTradingDataData","tradingDataResponse","useTradingDataIndex","setTradingDataIndexThunk","useCurrentTradingDataFilter","TradingDataFilterEditor","disableFuture","TradingDataFilterChips","TradingDataFilterButton","TradingsDataFilterEditor","_useCurrentTradingDat","_useCurrentTradingDat2","_useTradingDataFilter","useTradingDataFilter","_useTradingDataFilter2","getRefPriceButton","tradingdate","tomorow","useRefPriceButton","_s$data$clearing$trad","dateOk","reportDateOk","RefPriceButton","_useRefPriceButton","_useRefPriceButton2","TradingDateInput","setReportDate","getRefPriceReport","useRefPriceReportDownloader","getRefPriceExcel","useRefPriceExcelDownloader","_useRefPriceReportDow","_useRefPriceReportDow2","_useRefPriceExcelDown","_useRefPriceExcelDown2","TradingDataActions","TradingDataPage","_useTradingDataData","_useTradingDataData2","dispatchLoadTradingData","_useTradingDataIndex","_useTradingDataIndex2","defaultTradingData","useEditTradingDataState","displayTradingData","useEditTradingData","useTradingDataValidator","updateTradingDataApi","traddata","useTradingDataUpsert","dispatchUpsertTradingData","updateTradingData","upsertTradingData","tradingDataComponents","_useEditTradingDataSt","_useEditTradingDataSt2","editTradingData","_useTradingDataValida","_useTradingDataValida2","_useTradingDataUpsert","_useTradingDataUpsert2","getMarginsDataApi","mrgid","getMarginsData","getMarginsgDataApi","useDisplayMarginsData","mrgId","storeMarginsData","displayedMarginsData","loadMarginsgData","DisplayMarginsDataMainAttributes","calcDate","tradeDate","contrPrice","contrValue","gainLoss","marginReq","marginCall","marginBal","marginBalPlusGL","marginCoverPerc","maintTriggered","printMargins","useMarginsPrinter","margins","marginReport","DisplayMarginsData","_useMarginsPrinter","_useMarginsPrinter2","useMarginsDataActions","onShowMarginsData","useViewMarginsData","MarketFilter","MarginsDataFilterEditorType","MarginsDataTable","useMarginsDataColumns","getMarginsDataWebApi","_filter$trade","useMarginsDataData","_store$ux$clearing$ma","marginsDataResponse","marginData","useMarginsDataIndex","setMarginsDataIndexThunk","useCurrentMarginsDataFilter","getTradesSimpleData","FiltredSimpleTradesSelect","MarginsDataFilterEditor","MarginsDataFilterChips","MarginsDataFilterButton","MarginDataFilterEditor","_useCurrentMarginsDat","_useCurrentMarginsDat2","_useMarginsDataFilter","useMarginsDataFilter","_useMarginsDataFilter2","getMarginsDataButton","useMarginsDataButton","_s$data$clearing$marg","MarginsDataButton","_useMarginsDataButton","_useMarginsDataButton2","messageError","MarginsDateInput","getMarginsReport","useMarginsReportDownloader","getMarginsExcel","useMarginsExcelDownloader","_useMarginsReportDown","_useMarginsReportDown2","_useMarginsExcelDownl","_useMarginsExcelDownl2","MarginsDataActions","MarginsDataPage","_useMarginsDataData","_useMarginsDataData2","dispatchLoadMarginsData","_useMarginsDataIndex","_useMarginsDataIndex2","marginsDataComponents","getBankGuaranteeApi","grntid","getBankGuarantee","useDisplayBankGuarantee","storeBankGuarantee","bankguarantee","loadBankGuarantee","DisplayBankGuaranteeMainAttributes","printBankGuarantees","useBankGuaranteesPrinter","bankgurantee","bankguaranteesReport","DisplayBankGuarantee","_useBankGuaranteesPri","_useBankGuaranteesPri2","getBankGuaranteeEditLocation","deleteBankGuaranteeApi","useBankGuaranteeDelete","dispatchDeleteBankGuarantee","useBankGuaranteesActions","onShowBankGuarantee","useViewBankGuarantee","onEditBankGuarantee","useEditBankGuaranteeAction","BankGuaranteeFilterEditorType","BankGuaranteesTable","useBankGuaranteeColumns","onDeleteBankGuarantee","_useBankGuaranteeDele","deleteBankGuarantee","useDeleteBankGuaranteeAction","_filter$bank","useBankGuaranteeData","_store$ux$clearing$ba","getBankGuarantees","useBankGuaranteeIndex","useCurrentBankGuaranteeFilter","WTRFilterEditorType","BankGuaranteeFilterEditor","BankGuaranteesFilterChips","BankGuaranteeFilterButton","BankGuaranteesFilterEditor","_useCurrentBankGuaran","_useCurrentBankGuaran2","_useBankGuaranteeFilt","useBankGuaranteeFilter","_useBankGuaranteeFilt2","getBankGuaranteesReport","useBankGuaranteesReportDownloader","getBankGuaranteesExcel","useBankGuaranteesExcelDownloader","_useBankGuaranteesRep","_useBankGuaranteesRep2","_useBankGuaranteesExc","_useBankGuaranteesExc2","BankGuaranteesActions","BankGuaranteesPage","_useBankGuaranteeData2","dispatchLoadBankGuarantee","_useBankGuaranteeInde","_useBankGuaranteeInde2","useEditBankGuaranteeState","useBankGuaranteeValidator","createBankGuaranteeApi","dataguarantee","useBankGuaranteeUpsert","updateBankGuarantees","createBankGuarantees","upsertBankGuarantee","bankguaranteeComponents","_useEditBankGuarantee","_useEditBankGuarantee2","editBankGuarantee","_useBankGuaranteeVali","_useBankGuaranteeVali2","_useBankGuaranteeUpse","_useBankGuaranteeUpse2","clearingComponents","useOrderReportsColumns","useOrdersReportData","_store$ux$reports$ord","useOrdersReportIndex","useCurrentOrdersReportFilter","OrdersReportFilterFilterButton","OrdersReportFilterEditor","_useCurrentOrdersRepo","_useCurrentOrdersRepo2","_useOrdersReportFilte","useOrdersReportFilter","_useOrdersReportFilte2","getOrderListReport","useOrderReportDownloader","getOrderListReportExcel","useOrderExcelReportDownloader","_useOrderReportDownlo","_useOrderReportDownlo2","_useOrderExcelReportD","_useOrderExcelReportD2","OrderReportActions","ordersReportComponents","_useOrdersReportData","_useOrdersReportData2","dispatchLoadData","_useOrdersReportIndex","_useOrdersReportIndex2","useTradesReportData","_store$ux$reports$tra","pagedTrades","useTradesReportIndex","setIndexThunk","useCurrentTradesReportFilter","_useCurrentTradesRepo","_useCurrentTradesRepo2","_useTradesReportFilte","useTradesReportFilter","_useTradesReportFilte2","getTradeBookReport","useTradesReportDownloader","getTradeBookExcel","useTradesExcelDownloader","_useTradesReportDownl","_useTradesReportDownl2","_useTradesExcelDownlo","_useTradesExcelDownlo2","TradesReportActions","tradesReportComponents","_useTradesReportData","_useTradesReportData2","_useTradesReportIndex","_useTradesReportIndex2","allTrades","tradesReportAllComponents","getDailyTradingData","reportdate","getDailyTradingDataApi","DailyTradesReportTable","turnoverRsd","turnoverEur","weightedPriceRsd","weightedPriceEur","useDailyTradesColumns","_useDailyTradesReport","useDailyTradesReportIndex","_useDailyTradesReport2","DailyTradesReportFilter","getDailyTradingReport","getDailyTradingExcel","useDailyTradingExcelDownloader","_useDailyTradingExcel","_useDailyTradingExcel2","DailyTradesReportActions","dailyTradesReportComponents","getWeeklyTradingData","getWeeklyTradingDataApi","getReportLocation","week","weeklyProductLocation","weeklyClientLocation","weeklyDateLocation","useWeeklyActions","LocalShippingOutlinedIcon","reportData","PeopleOutlineOutlinedIcon","EventOutlinedIcon","WeeklyTradesReportTable","useWeeklyTradesColumns","_useWeeklyTradesRepor","useWeeklyTradesReportIndex","_useWeeklyTradesRepor2","getWeeklyProductReport","useWeeklyReportDownloaderProduct","weeklyReport","getWeeklyProductExcel","useWeeklyProductExcelDownloader","weeklyTrading","getWeeklyClientReport","useWeeklyReportDownloaderClient","getWeeklyClientExcel","useWeeklyClientExcelDownloader","getWeeklyDateReport","useWeeklyReportDownloaderDate","getWeeklyDateExcel","useWeeklyDateExcelDownloader","getWeeklyTradingDataReport","useWeeklyReportDownloader","getWeeklyTradingDataExcel","useWeeklyExcelDownloader","_useWeeklyReportDownl","_useWeeklyReportDownl2","_useWeeklyExcelDownlo","_useWeeklyExcelDownlo2","DownloadButtonProduct","_useWeeklyReportDownl3","_useWeeklyReportDownl4","DownloadExcelButtonProduct","_useWeeklyProductExce","_useWeeklyProductExce2","DownloadButtonClient","_useWeeklyReportDownl5","_useWeeklyReportDownl6","DownloadExcelButtonClient","_useWeeklyClientExcel","_useWeeklyClientExcel2","DownloadButtonDate","_useWeeklyReportDownl7","_useWeeklyReportDownl8","DownloadExcelButtonDate","_useWeeklyDateExcelDo","_useWeeklyDateExcelDo2","MTRFilterEditorType","WTRFilterEditor","WTRFilterButton","WTRsFilterEditor","_useWTRFilter","useWTRFilter","_useWTRFilter2","WeekActions","getWeeklyProductData","useReportProductData","WTRProductTable","useWTReportProductColumns","_useReportProductData","_useReportProductData2","getWeeklyClientData","useReportClientData","WTRClientTable","useWTReportClientColumns","_useReportClientData","_useReportClientData2","getWeeklyDateData","useReportDateData","WTRDateTable","useWTReportDateColumns","_useReportDateData","_useReportDateData2","weeklyTradesReportComponents","yearNumber","weekNumber","setReporthYear","getMonthlyTradingData","getMonthlyTradingDataApi","monthlyProductLocation","monthlyClientLocation","monthlyDateLocation","useMonthlyActions","MonthlyTradesReportTable","useMonthlyTradesColumns","_useMonthlyTradesRepo","useMonthlyTradesReportIndex","_useMonthlyTradesRepo2","getMonthlyProductReport","useMonthlyReportDownloaderProduct","monthlyReport","getMonthlyProductExcel","useMonthlyProductExcelDownloader","monthlyTrading","getMonthlyClientReport","useMonthlyReportDownloaderClient","getMonthlyClientExcel","useMonthlyClientExcelDownloader","getMonthlyDateReport","useMonthlyReportDownloaderDate","getMonthlyDateExcel","useMonthlyDateExcelDownloader","getMonthlyReport","useMonthlyReportDownloader","getMonthlyExcel","useMonthlyExcelDownloader","_useMonthlyReportDown","_useMonthlyReportDown2","_useMonthlyExcelDownl","_useMonthlyExcelDownl2","_useMonthlyReportDown3","_useMonthlyReportDown4","_useMonthlyProductExc","_useMonthlyProductExc2","_useMonthlyReportDown5","_useMonthlyReportDown6","_useMonthlyClientExce","_useMonthlyClientExce2","_useMonthlyReportDown7","_useMonthlyReportDown8","_useMonthlyDateExcelD","_useMonthlyDateExcelD2","ATRFilterEditorType","MTRFilterEditor","MTRFilterButton","MTRsFilterEditor","_useMTRFilter","useMTRFilter","_useMTRFilter2","MonthActions","getMonthlyProductData","MTRProductTable","useMTReportProductColumns","getMonthlyClientData","MTRClientTable","useMTReportClientColumns","getMonthlyDateData","MTRDateTable","useMTReportDateColumns","monthlyTradesReportComponents","monthNumber","getAnnualTradingData","getAnnualTradingDataApi","annualProductLocation","annualClientLocation","annualDateLocation","useAnnualActions","AnnualTradesReportTable","useAnnualTradesColumns","_useAnnualTradesRepor","useAnnualTradesReportIndex","_useAnnualTradesRepor2","getAnnualProductReport","useAnnualReportDownloaderProduct","annualReport","getAnnualProductExcel","useAnnualProductExcelDownloader","annualTrading","getAnnualClientReport","useAnnualReportDownloaderClient","getAnnualClientExcel","useAnnualClientExcelDownloader","getAnnualDateReport","useAnnualReportDownloaderDate","getAnnualDateExcel","useAnnualDateExcelDownloader","getAnnualReport","useAnnualReportDownloader","getAnnualExcel","useAnnualExcelDownloader","_useAnnualReportDownl","_useAnnualReportDownl2","_useAnnualExcelDownlo","_useAnnualExcelDownlo2","_useAnnualReportDownl3","_useAnnualReportDownl4","_useAnnualProductExce","_useAnnualProductExce2","_useAnnualReportDownl5","_useAnnualReportDownl6","_useAnnualClientExcel","_useAnnualClientExcel2","_useAnnualReportDownl7","_useAnnualReportDownl8","_useAnnualDateExcelDo","_useAnnualDateExcelDo2","ATRFilterEditor","ATRFilterButton","ATRsFilterEditor","_useATRFilter","useATRFilter","_useATRFilter2","AnnualActions","AnnualTradesReport","getAnnualProductData","ATRaProductTable","useATReportProductColumns","ATRProductPage","ATRProductTable","getAnnualClientData","ATRClientTable","useATReportClientColumns","ATRClientPage","getAnnualDateData","ATRDateTable","useATReportDateColumns","AmmualActions","ATRDatePage","annualTradesReportComponents","YearSelect","yearChange","currentYear","MonthSelect","monthChange","QuarterSelect","quarterChange","MonthlyTradesReportFilter","getMonthlyTradingReport","getMonthlyTradingExcel","useMonthlySecurityExcelDownloader","_useMonthlySecurityEx","_useMonthlySecurityEx2","MonthlyTradesReportActions","MonthlyTradesReport","getDailySecurityData","repdate","useSecurityReportData","getDailySecurityDataApi","DailySecurityReportTable","useDailySecurityColumns","_useSecurityReportDat","_useSecurityReportDat2","_useSecurityReportInd","useSecurityReportIndex","_useSecurityReportInd2","DailySecurityReportFilter","_useCurrentSecurityRe","useCurrentSecurityReportFilter","_useCurrentSecurityRe2","getDailySecurityReport","useSecurityReportDownloader","getDailySecurityExcel","useDailySecurityExcelDownloader","_useSecurityReportDow","_useSecurityReportDow2","_useDailySecurityExce","_useDailySecurityExce2","DailySecurityReportActions","DailySecurityReport","DailySecuriyReportTable","dailySecurityReportComponents","getAnnualSecurityData","useAnnualSecurityReportData","getAnnualSecurityDataApi","_useAnnualSecurityRep","_useAnnualSecurityRep2","AnnualTradesReportFilter","getAnnualSecurityReport","useAnnualSecurityReportDownloader","getAnnualSecurityExcel","useAnnualSecurityExcelDownloader","_useAnnualSecurityExc","_useAnnualSecurityExc2","AnnualTradesReportActions","annualSecurityReportComponents","getQuarterlySecurityData","useQuarterlySecurityReportData","getQuarterlySecurityDataApi","QuarterlyTradesReportTable","useQuarterlyTradesColumns","_useQuarterlySecurity","_useQuarterlySecurity2","QuarterlyTradesReportFilter","getQuarterlySecurityReport","useQuarterlySecurityReportDownloader","getQuarterlySecurityExcel","useQuarterlySecurityExcelDownloader","_useQuarterlySecurity3","_useQuarterlySecurity4","QuarterlyTradesReportActions","QuarterlyTradesReport","quarterlySecurityReportComponents","securityCommissionComponents","getAntiLaunderingData","useAntiMnyLndCommReportData","getAntiLaunderingDataApi","AntiMnyLndCommReportTable","quantity","useAntiMnyLndCommColumns","_useAntiMnyLndCommRep","_useAntiMnyLndCommRep2","_useAntiMnyLndCommRep3","useAntiMnyLndCommReportIndex","_useAntiMnyLndCommRep4","useAntiMnyLndcommReportFilter","AntiMnyLndCommFilterEditor","AntiMnyLndCommReportFilter","AntiMnyLndCommReportsFiltEditor","_useAntiMnyLndcommRep","_useAntiMnyLndcommRep2","_useAntiMnyLndcommRep3","_useAntiMnyLndcommRep4","getAntiLaunderingReport","useAntiMnyLndCommReportDownloader","getAntiLaunderingExcel","useAntiMnyLndCommExcelDownloader","_useAntiMnyLndCommExc","_useAntiMnyLndCommExc2","AntiMnyLndCommReportActions","AntiMnyLndCommReport","antiMnyLndCommReportComponents","getMemberContractsData","useMemberContractsReportData","getMemberContractsDataApi","MemberContractsReportTable","useMemberContractsColumns","_useMemberContractsRe","_useMemberContractsRe2","_useMemberContractsRe3","useMemberContractsReportIndex","_useMemberContractsRe4","getMemberContractsReport","useMemberContractsReportDownloader","getMemberContractsExcel","useMemberContractsExcelDownloader","_useMemberContractsEx","_useMemberContractsEx2","MemberContractsReportActions","MemberContractsReport","memberContractsReportComponents","getTradeReviewData","useTradeReviewReportData","getTradeReviewDataApi","TradeReviewReportTable","useTradeReviewColumns","_useTradeReviewReport","_useTradeReviewReport2","_useTradeReviewReport3","useTradeReviewReportIndex","_useTradeReviewReport4","useTradeReviewReportFilter","TradeReviewFilterEditor","TradeReviewReportFilter","TradeReviewsFiltEditor","getTradeReviewReport","useTradeViewReportDownloader","getTradeReviewExcel","useTradeReviewExcelDownloader","_useTradeViewReportDo","_useTradeViewReportDo2","_useTradeReviewExcelD","_useTradeReviewExcelD2","TradeReviewReportActions","tradeReviewReportComponents","getTradeByProductsData","useTradeByProductsReportData","getTradeByProductsDataApi","TradeByProductsReportTable","useTradeByProductsColumns","_useTradeByProductsRe","_useTradeByProductsRe2","_useTradeByProductsRe3","useTradeByProductsReportIndex","_useTradeByProductsRe4","useTradeByProductsReportFilter","TradeByProductsFilterEditor","TradeByProductsReportFilter","TradesByProductsFilterEditor","getTradeByProductsReport","useTradeByProductsReportDownloader","getTradeByProductsExcel","useTradeByProductsExcelDownloader","_useTradeByProductsEx","_useTradeByProductsEx2","TradeByProductsReportActions","tradeByProductsReportComponents","getTradeByClinetsData","useTradeByClientsReportData","getTradeByClientsDataApi","TradeByClientsReportTable","turnoverValue","commissionValue","turnoverParticipations","commissionParticipations","useTradeByClientsColumns","_useTradeByClientsRep","_useTradeByClientsRep2","_useTradeByClientsRep3","useTradeByClientsReportIndex","_useTradeByClientsRep4","useTradeByClientsReportFilter","ActStatusClientsSelect","_useActStatusClinetsT","_useActStatusClinetsT2","actStatusClinet","TradeByClientsFilterEditor","TradeByClientsReportFilter","TradesByClientsFilterEditor","getTradeByClientsReport","useTradeByClientsReportDownloader","getTradeByClientsExcel","useTradeByclientsExcelDownloader","_useTradeByclientsExc","_useTradeByclientsExc2","TradeByClientsReportActions","tradeByClientsReportComponents","getTradeByBrokersData","useTradeByBrokersReportData","getTradeByBrokersDataApi","TradeByBrokersReportTable","useTradeByBrokersColumns","_useTradeByBrokersRep","_useTradeByBrokersRep2","_useTradeByBrokersRep3","useTradeByBrokersReportIndex","_useTradeByBrokersRep4","useTradeByBrokersReportFilter","TradeByBrokersFilterEditor","TradeByBrokersReportFilter","TradesByBrokersFilterEditor","getTradeByBrokersReport","useTradeByBrokersReportDownloader","getTradeByBrokersExcel","useTradeByBrokersExcelDownloader","_useTradeByBrokersExc","_useTradeByBrokersExc2","TradeByBrokersReportActions","tradeByBrokersReportComponents","getWeightedPriceData","useWeightedPriceReportData","getWeightedPricesDataApi","WeightedPricesReportTable","useWeightedPricesColumns","_useWeightedPriceRepo","_useWeightedPriceRepo2","_useWeightedPriceRepo3","useWeightedPriceReportIndex","_useWeightedPriceRepo4","useWeightPriceReportFilter","WeightedPricesFilterEditor","WeightedPricesReportFilter","WeightedPricesFiltersEditor","_useWeightPriceReport","_useWeightPriceReport2","_useWeightPriceReport3","_useWeightPriceReport4","getWeightedPriceReport","useWeightedPriceDownloader","getWeightedPriceExcel","useWeightedPricesExcelDownloader","_useWeightedPriceDown","_useWeightedPriceDown2","_useWeightedPricesExc","_useWeightedPricesExc2","WeightedPricesReportActions","weightedPricesReportComponents","getBusinessActivitiesData","useBusinessActivitiesReportData","getBusinesActivitiesDataApi","BusinessActivitiesReportTable","buyersCommission","sellersCommission","useBusinessActivitiesColumns","_useBusinessActivitie","_useBusinessActivitie2","_useBusinessActivitie3","useBusinessActivitiesReportIndex","_useBusinessActivitie4","useBusinessActivitiesReportFilter","BusinessActivitiesFilterEditor","BusinessActivitiesReportFilter","BusinessActivitiesFiltersEditor","getBusinessActivitiesReport","useBusinessActivitiesReportDownloader","getBusinesActivitiesExcel","useBusinessActivitiesExcelDownloader","BusinessActivitiesReportActions","businessActivitiesReportComponents","getCommReviewData","_filter$broker","useCommReviewReportData","getCommReviewDataApi","CommReviewReportTable","useCommReviewColumns","_useCommReviewReportD","_useCommReviewReportD2","_useCommReviewReportI","useCommReviewReportIndex","_useCommReviewReportI2","CommReviewFilterEditor","CommReviewFilterChips","removefilter","CommReviewReportFilter","CommReviewsFiltEditor","_useCurrentCommReview","useCurrentCommReviewFilter","_useCurrentCommReview2","_useCommReviewReportF","useCommReviewReportFilter","_useCommReviewReportF2","getCommReviewReport","useCommReviewReportDownloader","getCommReviewExcel","useCommReviewExcelDownloader","_useCommReviewExcelDo","_useCommReviewExcelDo2","CommReviewReportActions","commReviewReportComponents","useClientOverviewIndex","setCOIndex","_store$ux$reports$exc","ClientOverviewDeliveriesTable","loadData","_useClientOverviewInd","_useClientOverviewInd2","ClientOverviewOrdersTable","ClientOverviewPaymentsTable","ClientOverviewParts","ClientOverviewTradesTable","ProductSelectHistory","getClientsOverviewLocation","useCurrentClientOverviewFilter","ClientOverviewFilterEditor","ClientOverviewFilterChips","ClientOverviewFilterButton","ClientsOverviewFilterEditor","_useCurrentClientOver","_useCurrentClientOver2","_useClientOverviewFil","useClientOverviewFilter","_useClientOverviewFil2","clicard","DownloadOrderButton","DownloadOrderButtonExcel","useTradesExcelReportDownloader","DownloadTradesButton","DownloadTradesButtonExcel","_useTradesExcelReport","_useTradesExcelReport2","getPaymentsReportExcel","usePaymentsExcelReportDownloader","DownloadPaymentsButton","DownloadPaymentsButtonExcel","_usePaymentsExcelRepo","_usePaymentsExcelRepo2","getDeliveryReportExcel","useDeliveryExcelReportDownloader","DownloadDeliveryButton","DownloadDeliveryButtonExcel","_useDeliveryExcelRepo","_useDeliveryExcelRepo2","ClientOverviewActions","clientOverviewComponents","_useInvlidateData","useInvlidateData","getChartDataHistorical","hist","useGraphDataH","loadGraphDataHistorical","_useGraphDataH","_useGraphPeriodH","useGraphPeriodH","_useGraphPeriodH2","xl","HistoricalPricesPage","Kukuruz","Psenica","Soja","historicalPricesReportComponents","exchBusinessComponents","getExchangeMembersData","useExchangeMembersReportData","getExchangeMembersDataApi","ExchangeMembersReportTable","useExchangeMemberColumns","_useExchangeMembersRe","_useExchangeMembersRe2","_useExchangeMembersIn","useExchangeMembersIndex","_useExchangeMembersIn2","getExchangeMembersReport","useExchangeMemberReportDownloader","getExchangeMembersExcel","useExchangeMemberExcelDownloader","_useExchangeMemberRep","_useExchangeMemberRep2","_useExchangeMemberExc","_useExchangeMemberExc2","useExchangeMembersReportFilter","ExchangeMembersFilterEditor","ExchangeMemberReportFilter","ExchangeMemberFilterEditor","_useExchangeMembersRe3","_useExchangeMembersRe4","ExchangeMembersReportActions","exchangeMembersReportComponents","DeliveryAction","deliveryClientComponents","PaymentAction","paymentClientComponents","getNewsApi","newsid","getNews","useDisplayNews","storeNews","newsId","loadNews","DisplayNewsMainAttributes","titleEn","downloadNews","useNewsDownload","invoice","newsReport","DisplayNews","_useNewsDownload","_useNewsDownload2","getNewsEditLocation","deleteNewsApi","useNewsDelete","dispatchDeleteNews","useNewsActions","onShowNews","useViewNews","onEditNewse","useEditNewsAction","NewsTable","useNewsColumns","_useNewsDelete","deleteNews","useDeleteNewsAction","getAllNewsApi","useNewsData","_store$ux$reports$new","newsResponse","useNewsIndex","setNewsIndexThunk","useCurrentNewsFilter","NewsFilterEditor","NewsFilterChips","NewsFilterButton","NewsFiltersEditor","_useCurrentNewsFilter","_useCurrentNewsFilter2","_useNewsFilter","useNewsFilter","_useNewsFilter2","NewsPage","_useNewsData","_useNewsData2","dispatchLoadNews","_useNewsIndex","_useNewsIndex2","defaultNews","useEditNewsState","displayNews","useEditNews","useNewsValidator","createNewsApi","form","FormData","fileName1","append","fileName2","newstime","titlesr","titleen","updateNewsApi","useNewsUpsert","dispatchUpsertNews","createNewseApi","upsertNews","newsComponents","_useEditNewsState","_useEditNewsState2","editNews","_useNewsValidator","_useNewsValidator2","_useNewsUpsert","_useNewsUpsert2","FormControl","accept","files","getPushNotificationsList","usePushNotificationsListData","pagedNotifications","getPushNotificationsListApi","PushNotificationsReportTable","pnTime","usePushNotificationsColumns","_usePushNotifications","_usePushNotifications2","_usePushnotificationL","usePushnotificationListIndex","_usePushnotificationL2","pushNotificationsComponents","reportsComponents","getCreateInvoicesData","useCreateInvoicesData","getCreateInvoicesDataApi","CreateInvoicesTable","useCreateInvoicesColumns","_useCreateInvoicesDat","_useCreateInvoicesDat2","_useCreateInvoicesInd","useCreateInvoicesIndex","_useCreateInvoicesInd2","CreateInvoicesFilterEditor","CreateInvoiceFilterChips","CreateInvoicesFilter","CreateInvoicesFiltersEditor","_useCurrentCreateInvo","useCurrentCreateInvoicesFilter","_useCurrentCreateInvo2","_useCreateInvoicesFil","useCreateInvoicesFilter","_useCreateInvoicesFil2","getCICreateButton","useCICreateButton","CreateButton","_useCICreateButton","_useCICreateButton2","CreateInvoicesActions","createInvoicesComponents","getInvoiceApi","invid","getInvoice","invId","useDisplayInvoice","storeInvoice","loadInvoice","DisplayInvoiceMainAttributes","invNo","invDate","invTypeDescr","tranDate","dueDate","descr","commPerc","vatAmt","invAmt","bookDate","cmpAccount","model","reffNo","printInvoice","useInvoicePrinter","invoicesReport","printInvoiceThunk","getInvoiceXml","useInvoiceXml","invoicesXml","xmlInvoiceThunk","DisplayInvoice","_useInvoicePrinter","_useInvoicePrinter2","_useInvoiceXml","_useInvoiceXml2","xml","xmlfetchState","PrintIcon","getInvoicesEditLocation","deleteInvoiceApi","useInvoiceDelete","dispatchDeleteInvoice","useInvoiceActions","onShowInvoice","useViewInvoice","onEditInvoice","useEditInvoiceAction","InvoiceFilterEditorType","InvoicesTable","useInvoicesColumns","onDeleteInvoice","_useInvoiceDelete","deleteInvoice","useDeleteInvoiceAction","getInvoiceWebApi","useInvoicesData","_store$ux$accounting$","invoicesResponse","getInvoices","useInvoiceIndex","setInvoicesIndexThunk","useCurrentInvoicesFilter","InvoiceFilterEditor","InvoiceFilterChips","InvoiceFilterButton","InvoicesFilterEditor","_useCurrentInvoicesFi","_useCurrentInvoicesFi2","_useInvoicesFilter","useInvoicesFilter","_useInvoicesFilter2","InvoicesPage","_useInvoicesData","_useInvoicesData2","dispatchLoadInvoices","_useInvoiceIndex","_useInvoiceIndex2","defaultInvoice","useEditInvoiceState","displayInvoice","useEditInvoice","useInvoiceValidator","invType","createInvoiceApi","updateInvoiceApi","useInvoiceUpsert","dispatchUpsertInvoice","upsertInvoice","InvoiceTypeSelect","_useInvoiceType","_useInvoiceType2","invtypes","renderInvTypeLabel","createInvoiceFilter","invoicesComponents","_useEditInvoiceState","_useEditInvoiceState2","editInvoice","_useInvoiceValidator","_useInvoiceValidator2","_useInvoiceUpsert","_useInvoiceUpsert2","getAccountingOrdereWebApi","useAccountingOrderData","AccountingOrderTable","useAccountingOrderColumns","_useAccountingOrderDa","_useAccountingOrderDa2","_useAccountingOrderIn","useAccountingOrderIndex","_useAccountingOrderIn2","AccountingOrderFilterEditor","AccountingOrderFilterChips","AccountingOrderFilter","AcountingOrdersFiltersEditor","_useCurrentAccounting","useCurrentAccountingOrderFilter","_useCurrentAccounting2","_useAccountingOrderFi","useAccountingOrderFilter","_useAccountingOrderFi2","getAccountingOrderButton","accordtype","useAccountingOrderButton","accountingOrdersReport","AccountingOrderButton","_useAccountingOrderBu","_useAccountingOrderBu2","AccountingOrderActions","accountingOrderComponents","accountingComponents","getAlarmApi","almid","getAlarm","alarmId","useDisplayAlarm","almID","storeAlarm","almId","alarm","useAlarmTypeTranslator","Client","Product","ProductClient","DisplayAlarmMainAttributes","almType","DisplayAlarm","alarmsLocation","getAlarmsEditLocation","deleteAlarmApi","useAlarmDelete","dispatchDeleteAlarm","dalarmId","useAlarmsActions","onShowAlarm","useViewAlarm","AlarmFilterEditorType","AlarmsTable","useAlarmsColumns","onDeleteAlarm","_useAlarmDelete","deleteAlarm","useDeleteAlarmAction","getAlarmsWebApi","_filter$user","useAlarmData","_store$ux$surveillanc","alarmResponse","useAlarmIndex","setAlarmIndexThunk","useCurrentAlarmFilter","AlarmFilterEditor","AlarmFilterChipsComponent","AlarmFilterButton","AlarmsFilterEditor","_useCurrentAlarmFilte","_useCurrentAlarmFilte2","_useAlarmFilter","useAlarmFilter","_useAlarmFilter2","AlarmsPage","_useAlarmData","_useAlarmData2","dispatchLoadAlarm","_useAlarmIndex","_useAlarmIndex2","defaultAlarm","useEditAlarmState","displayAlarm","useEditAlarm","useAlarmValidator","createAlarmApi","getError","updateAlarmApi","useAlarmUpsert","dispatchUpsertAlarm","upsertAlarm","UniqueConstraint","AlarmTypeSelect","alarmType","useAlarmType","alarmsComponents","_useEditAlarmState","_useEditAlarmState2","editAlarm","_useAlarmValidator","_useAlarmValidator2","_useAlarmUpsert","_useAlarmUpsert2","surveillanceComponents","appComponents","useUserMenuItems","UnderConstruction","iconDictionary","BusinessIcon","DashboardIcon","CliringIcon","SurveillanceIcon","ReportIcon","AccountingIcon","Notifications","useNavigationItems","onMenu","useMenuItems","_useUserMenuItems","userMenuItems","navigationItems","sortedUserItems","sorted","sort","acc","_navigationItems$find","miId","miName","parrent","findMenuItem","parentId","submenues","found","_step","_iterator","_createForOfIteratorHelper","done","err","filterdMenuItem","_step2","_iterator2","NavList","useNavDrawerStyles","drawer","flexShrink","drawerPaper","nestedMenuItem","nestedMenuItem2","NavDrawer","setToogle","permanentDrawer","addEventListener","Drawer","paper","ModalProps","createMuiTheme","hover","default","ThemeComponent","up","hiddenWidth","ThemeProvider","useDisplayDrawerStyles","_drawerPaper","closeButton","closeIcon","DisplayDrawer","displayContent","setDisplayContext","anchor","CloseIcon","mainContent","ContentLayout","_useToggleState","_useState","_useState2","toggleState","currentState","useToggleState","_useToggleState2","drawerOpen","toggleDrawerOpen","setToogleDrawer","CssBaseline","useLoginStyles","_loginDrawerPaper","loginDrawerPaper","wraper","backgroundImage","overflow","formWrpaer","formItem","textField","formContainer","localeSelection","alert","footer","LoginError","Alert","severity","handleTBChange","setter","onEnter","LoginForm","_useLocalizationStore2","local","setLocal","setUsername","setPassword","sendLogin","setChecked","remembered","localStorage","getItem","upis","setItem","cookieUsername","cookiePassword","onKeyDown","Checkbox","donations","LoginPage","Hidden","alt","elevation","flexBasis","PageRouterSwitch","linkMenuItems","useLinkMenuItems","editComponents","Item","Route","exact","MainBoardM","_root","warning","light","actionRoot","icons","expand","transform","transition","transitions","duration","shortest","expandOpen","collapse","checkIcon","textTransform","CollapsableMessage","forwardRef","ref","closeSnackbar","useSnackbar","setExpanded","_useSnackbarMessage","dismissMessage","dispatchSetShownId","useSnackbarMessage","_useSnackbarMessage2","snackbarMessage","setShoenId","join","iconPath","process","expandClassName","cardClassName","SnackbarContent","CardActions","line","gutterBottom","SnackbarMessages","SnackbarProvider","content","MessageQueueManager","_useNextMessage","max","useNextMessage","enqueueSnackbar","persist","SurveillanceNotificationHandlers","_useSnackbarMessageSe","useSnackbarMessageSender","_useSnackbarMessageSe2","pushWarning","useAlarmsChangedHandler","orderNumber","buyOrderNumber","sellOrderNumber","qtyMatched","notifyIfNecessary","then","districtName","packing","origin","directorate","storepushnotiftokenApi","pushToken","useStoreTokenHooks","dispatcStoreToken","storepushnotiftokenThunks","PushNotificationProvider","memo","isAuth","authToken","_useStoreTokenHooks","dispatcheStoreToken","PushNotifications","JSON","stringify","registrationListener","perm","checkPermissions","receive","check","removeAllListeners","ContentRoot","_ref$user","shouldUseNotifications","notificationItems","_useUserMenuItems3","mi","useShouldConnectNotifications","Router","basename","hostname","ReactDOM","document","getElementById","navigator","serviceWorker","ready","registration","unregister","catch"],"mappings":"iLAAAA,EAAOC,QAAU,8lJ,oBCAjBD,EAAOC,QAAU,IAA0B,uC,oBCA3CD,EAAOC,QAAU,IAA0B,gD,kECQ/BC,EAUAC,EAgCAC,EAsBAC,EAsCAC,EA4MAC,EAMAC,E,6HCvSNC,EAAgBC,YAAY,CACjCC,KAHY,WAIZC,aAToC,CACpCC,SAAU,IASVC,SAAU,CACTC,UAAW,SAACC,EAAOC,GAA6B,OAAAC,wBAAA,GAC5CF,GAAK,IACRH,SAAS,GAADM,OAAAC,YACJJ,EAAMH,UAAQ,CACjB,CACCQ,GAAIJ,EAAOK,QAAQD,GACnBE,QAASN,EAAOK,QAAQC,QACxBC,MAAOP,EAAOK,QAAQE,MACtBC,KAAM,cAITC,SAAU,SAACV,EAAOC,GAA6B,OAAAC,wBAAA,GAC3CF,GAAK,IACRH,SAAS,GAADM,OAAAC,YACJJ,EAAMH,UAAQ,CACjB,CACCQ,GAAIJ,EAAOK,QAAQD,GACnBE,QAASN,EAAOK,QAAQC,QACxBC,MAAOP,EAAOK,QAAQE,MACtBC,KAAM,aAITE,YAAa,SAACX,EAAOC,GAA6B,OAAAC,wBAAA,GAC9CF,GAAK,IACRH,SAAS,GAADM,OAAAC,YACJJ,EAAMH,UAAQ,CACjB,CACCQ,GAAIJ,EAAOK,QAAQD,GACnBE,QAASN,EAAOK,QAAQC,QACxBC,MAAOP,EAAOK,QAAQE,MACtBC,KAAM,gBAITG,QAAS,SAACZ,EAAOC,GAA6B,OAAAC,wBAAA,GAC1CF,GAAK,IACRH,SAAQO,YACJJ,EAAMH,SAASgB,QAAO,SAAAC,GAAC,OAAIA,EAAET,KAAOJ,EAAOK,eAGhDS,WAAY,SAACf,EAAOC,GAAiC,OAAAC,wBAAA,GACjDF,GAAK,IACRH,SAAQO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ChCimB,IAAAC,cAACwqC,GAA2B,CAC3BnC,OAAQlqC,GAAUS,cAAcC,IAChC/kB,MAAOA,EACP2wD,QAASW,GAAwBl0C,EAAK3d,OAAS4xM,GAG/CprL,IAAAC,cAACiiL,GAAa,KACbliL,IAAAC,cAAAD,IAAAsxC,SAAA,KACCtxC,IAAAC,cAAC6oL,GAAgC,MACjC9oL,IAAAC,cAACulL,GAAgB,SAKpBxlL,IAAAC,cAACklL,GAAS,OAGZnlL,IAAAC,cAACkqL,GAAwB,CACxBG,UAAgB,QAAP/nJ,EAAGprC,SAAI,IAAAorC,GAAc,QAAd4oJ,EAAL5oJ,EAAe/oD,YAAI,IAAA2xM,OAAd,EAALA,EAAqBpxM,MAChCswM,OAAwB,eAAhBlzL,EAAK9d,WClCF,qBACd2mB,IAAAC,cAACH,GAAa,KACbE,IAAAC,cAAC86B,GAA2B,KAC3B/6B,IAAAC,cAACwrL,KAAM,CAACC,SAAUttL,GAAUI,QAAQG,eACnCqB,IAAAC,cAACirL,GAAW,UCCIv9I,QACW,cAA7BzvC,OAAOu+B,SAASkvJ,UAEe,UAA7BztL,OAAOu+B,SAASkvJ,UAEhBztL,OAAOu+B,SAASkvJ,SAAS1hI,MACvB,2D,OCZN2hI,IAASruI,OAAOv9C,IAAAC,cAACqnC,GAAG,MAAKukJ,SAASC,eAAe,SDqI3C,kBAAmBC,WACrBA,UAAUC,cAAcC,MACrBxC,MAAK,SAAAyC,GACJA,EAAaC,gBAEdC,OAAM,SAAAzyM,GACLwtD,QAAQxtD,MAAMA,EAAM7B,c","file":"static/js/main.61ef867e.chunk.js","sourcesContent":["module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGYAAABMCAYAAACf6MIyAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAA1ISURBVHhe7ZwJsB1FFYYTNllFNtkXAUEQEUTihrLIKmhANkFQVETUMlAom0Jh2ApLIiBCiQtLC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BuzK6cMLvMJ1PeaCfvK+BGMamxmhstzxcFeOCCtNaQRrGyp6brwjyND62au2vTEafjeb2rGAcjeJqm30g3zQaGT4X/AJ6Rj8Z5Q0vjQMOZncBvT9H/EYLjMd9HOqreipVqlSpUqVKlSpVqlSpUqVKlSpVqtSPGjHi/wzrlj7SSixtAAAAAElFTkSuQmCC\"","module.exports = __webpack_public_path__ + \"static/media/donation2.8db27376.png\";","module.exports = __webpack_public_path__ + \"static/media/NSCOMEX-LOGO-front.ae378e2f.png\";","import { ViewOrder, OrderMarkt } from \"./trading/orders/types\";\r\nimport { User } from \"./auth/types\";\r\nimport { Country } from \"./listing/countries/types\";\r\nimport { AccessRights } from \"../core/navigation/types\";\r\nimport { ProductList } from \"./listing/products/types\";\r\nimport { ClientListData } from \"./listing/clients/types\";\r\nimport { Employee } from \"./listing/employees/types\";\r\n\r\nexport enum OrderSide {\r\n Sell = \"SELL\",\r\n Buy = \"BUY\",\r\n}\r\n\r\nexport interface CompanyMember {\r\n id: string;\r\n name: string;\r\n}\r\n\r\nexport enum PageDataStatus {\r\n DataCurrent,\r\n DataInvalidated,\r\n}\r\nexport interface PageData {\r\n currentPageData: T[];\r\n totalCount: number;\r\n status: PageDataStatus;\r\n}\r\n\r\nexport interface PageIndex {\r\n pageNumber: number;\r\n itemsPerPage: number;\r\n}\r\n\r\nexport interface Product {\r\n prodId: string;\r\n prodName: string;\r\n unit: string;\r\n hasYear: boolean;\r\n vatRate: number;\r\n prodAtrList: ProductAttr[];\r\n}\r\n\r\nexport interface ProductAttr {\r\n prodAtrId: string;\r\n prodAtrName: string;\r\n prodAtrType: string;\r\n mandatory: boolean;\r\n comparator: string;\r\n}\r\n\r\nexport enum OrdersPageType {\r\n Listing = \"listing\",\r\n User = \"user\",\r\n Archive = \"archive\",\r\n}\r\n\r\nexport interface Report {\r\n id: string;\r\n name: string;\r\n}\r\n\r\nexport type PendingValueState = \"invalid\" | \"valid\" | \"initial\";\r\n\r\nexport type PendingValue = {\r\n status: PendingValueState;\r\n value?: T;\r\n};\r\n\r\nexport type PendingOrderType = {\r\n [field in keyof ViewOrder]: PendingValue;\r\n};\r\n\r\nexport enum Gender {\r\n Male = 1,\r\n Female = 2,\r\n}\r\n\r\nexport interface City {\r\n cityId: string;\r\n cityName: string;\r\n zipCode: string;\r\n region?: string;\r\n regionId?: string;\r\n}\r\n\r\nexport interface ClientType {\r\n ftValue: number;\r\n ftDescr: string;\r\n}\r\n\r\nexport interface Bank {\r\n bankId: string;\r\n bankCode: string;\r\n bankName: string;\r\n}\r\n\r\nexport interface Currency {\r\n currId: string;\r\n currCode: string;\r\n currName: string;\r\n}\r\n\r\nexport interface ProductAttribute {\r\n attrId: string;\r\n attrName: string;\r\n attrType: string;\r\n mandatory: ProductAttributeManditory;\r\n comparator: string;\r\n}\r\n\r\nexport enum ProductAttributeManditory {\r\n True = 1,\r\n False = 0,\r\n}\r\n\r\nexport interface ProductGroup {\r\n prodGroupId: string;\r\n prodGroupName: string;\r\n}\r\n\r\nexport interface Unit {\r\n ftValue: number;\r\n ftDescr: string;\r\n}\r\n\r\nexport interface VatRate {\r\n ftValue: number;\r\n ftDescr: string;\r\n rate: number;\r\n}\r\n\r\nexport interface Commissions {\r\n commId: string;\r\n commCode: string;\r\n commName: string;\r\n commType: number;\r\n}\r\n\r\nexport interface Region {\r\n regId: string;\r\n regName: string;\r\n parentRegId: string;\r\n country: string;\r\n}\r\n\r\nexport interface CommissionType {\r\n ftDescr: string;\r\n ftValue: number;\r\n}\r\n\r\nexport interface PersonRole {\r\n ftValue: number;\r\n ftDescr: string;\r\n}\r\n\r\nexport interface UserMenuItem {\r\n level: number;\r\n miId: string;\r\n miName: string;\r\n parentId: string;\r\n path: string;\r\n readOnly: AccessRights;\r\n}\r\n\r\nexport interface OrderRecievedMethod {\r\n ftValue: number;\r\n ftDescr: string;\r\n descrAbr: string;\r\n}\r\n\r\nexport interface CheckPoint {\r\n ftValue: number;\r\n ftDescr: string;\r\n}\r\n\r\nexport interface CheckPointPayer {\r\n ftValue: number;\r\n ftDescr: string;\r\n}\r\n\r\nexport interface Franco {\r\n ftValue: number;\r\n ftDescr: string;\r\n ftDescrLong: String;\r\n ftType: number;\r\n}\r\n\r\nexport interface OrderStatus {\r\n ftValue: number;\r\n ftDescr: string;\r\n}\r\n\r\nexport interface TradeStatus {\r\n ftValue: number;\r\n ftDescr: string;\r\n}\r\n\r\nexport interface PayTypes {\r\n ftValue: number;\r\n ftDescr: string;\r\n ftSign: number;\r\n hasOrdTran: number;\r\n}\r\n\r\nexport interface CheckDoneByList {\r\n ftValue: number;\r\n ftDescr: string;\r\n}\r\n\r\nexport interface PayTypesG {\r\n ftValue: number;\r\n ftDescr: string;\r\n ftSign: number;\r\n hasOrdTran: number;\r\n}\r\n\r\nexport interface AttributesValue {\r\n attrId: string;\r\n attrVal: string;\r\n attrValId: string;\r\n attrValName: string;\r\n}\r\n\r\nexport interface OrderNote {\r\n ftValue: number;\r\n ftDescr: string;\r\n}\r\n\r\nexport interface InvTypes {\r\n ftValue: number;\r\n ftDescr: string;\r\n}\r\n\r\nexport interface DispSitList {\r\n ftValue: number;\r\n ftDescr: string;\r\n}\r\n\r\nexport interface QualityCtrlList {\r\n ftValue: number;\r\n ftDescr: string;\r\n}\r\n\r\nexport interface DeliveryStatuses {\r\n ftValue: number;\r\n ftDescr: string;\r\n}\r\n\r\nexport interface Ports {\r\n cityId: string;\r\n cityName: string;\r\n zipCode: string;\r\n region?: string;\r\n regionId?: string;\r\n}\r\n\r\nexport interface Pay_Type {\r\n payTypeId?: string; \r\n payTypeDescr: string; \t\t\r\n}\r\n\r\nexport interface ContractType {\r\n ftValue: number;\r\n ftDescr: string;\r\n}\r\n\r\nexport interface Guarantees {\r\n ftValue: number;\r\n ftDescr: string;\r\n}\r\n\r\nexport interface LoginResponse {\r\n uData: User;\r\n attributes: ProductAttribute[];\r\n productsGroups: ProductGroup[];\r\n products: Product[];\r\n cities: City[];\r\n clientTypes: ClientType[];\r\n banks: Bank[];\r\n currencies: Currency[];\r\n units: Unit[];\r\n vatRates: VatRate[];\r\n commissions: Commissions[];\r\n regions: Region[];\r\n subRegions: Region[];\r\n topRegions: Region[];\r\n countries: Country[];\r\n commissionTypes: CommissionType[];\r\n personRoles: PersonRole[];\r\n userMenu: UserMenuItem[];\r\n orderReceiveMethods: OrderRecievedMethod[];\r\n checkPointPayers: CheckPointPayer[];\r\n checkPoints: CheckPoint[];\r\n francoList: Franco[];\r\n orderStatuses: OrderStatus[];\r\n tradeStatuses: TradeStatus[];\r\n payTypes: PayTypes[];\r\n checkDoneByList: CheckDoneByList[];\r\n payTypesG: PayTypesG[];\r\n attributesValues: AttributesValue[]\r\n orderNotes: OrderNote[]\r\n invTypes: InvTypes[];\r\n dispSitList: DispSitList[];\r\n qualityCtrlList: QualityCtrlList[];\r\n deliveryStatuses: DeliveryStatuses[];\r\n ports: Ports[];\r\n pay_Types: Pay_Type[];\r\n contractTypes: ContractType[];\r\n guarantees: Guarantees[];\r\n actStatuses: ActStatuses[];\r\n}\r\n\r\n \r\n\r\nexport enum RegType {\r\n TopRegion = 10,\r\n Region = 20,\r\n SubRegion = 30,\r\n}\r\n\r\nexport enum Status {\r\n Active = 1,\r\n Inactive = 0,\r\n}\r\n\r\nexport type FetchStateTypeType =\r\n | \"not-started\"\r\n | \"started\"\r\n | \"successful\"\r\n | \"error\";\r\n\r\nexport type FetchStateType =\r\n | { type: \"not-started\" }\r\n | { type: \"started\" }\r\n | { type: \"successful\"; result?: TSucessResult }\r\n | { type: \"error\"; errorCode?: string };\r\n\r\nexport const createFetchState = (\r\n type: FetchStateTypeType,\r\n payload?: any\r\n): FetchStateType => {\r\n switch (type) {\r\n case \"started\":\r\n case \"not-started\":\r\n return {\r\n type,\r\n };\r\n case \"successful\":\r\n return {\r\n type,\r\n result: payload,\r\n };\r\n case \"error\":\r\n return {\r\n type,\r\n errorCode: payload,\r\n };\r\n }\r\n};\r\n\r\nexport const getFetchStateChange = (\r\n current: FetchStateType,\r\n change: FetchStateType\r\n) =>\r\n current.type !== \"started\" || change.type !== \"not-started\"\r\n ? change\r\n : current;\r\n\r\nexport interface OrderFilter {\r\n product?: Partial,\r\n fromDate?: string,\r\n toDate?: string,\r\n side?: OrderSide,\r\n orderStatus?: Partial,\r\n client?: Partial;\r\n market?: OrderMarkt;\r\n employee?: Employee\r\n}\r\n\r\nexport enum AlarmType {\r\n Cross = \"Cross\",\r\n Client = \"Client\",\r\n Product = \"Product\",\r\n ProductClient = \"ProductClient\",\r\n}\r\n\r\nexport interface ActStatuses {\r\n ftValue: number;\r\n ftDescr: string;\r\n}\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { SnackbarMessage } from \"./types\";\r\n\r\ninterface ISnackbarState {\r\n\tmessages: SnackbarMessage[];\r\n}\r\n\r\ninterface IShownArgs {\r\n\tmessageId: string,\r\n\tshownId: string,\r\n}\r\n\r\ninterface IToast {\r\n\tid: string,\r\n\ttitle: string,\r\n message: string[],\r\n}\r\n\r\nconst initialState: ISnackbarState = {\r\n\tmessages: [],\r\n};\r\n\r\n\r\nconst name = \"snackbar\";\r\n\r\nconst snackbarSlice = createSlice({\r\n\tname,\r\n\tinitialState,\r\n\treducers: {\r\n\t\tpushError: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tmessages: [\r\n\t\t\t\t...state.messages,\r\n\t\t\t\t{\r\n\t\t\t\t\tid: action.payload.id,\r\n\t\t\t\t\tmessage: action.payload.message,\r\n\t\t\t\t\ttitle: action.payload.title,\r\n\t\t\t\t\ttype: \"error\",\r\n\t\t\t\t},\r\n\t\t\t],\r\n\t\t}),\r\n\t\tpushInfo: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tmessages: [\r\n\t\t\t\t...state.messages,\r\n\t\t\t\t{\r\n\t\t\t\t\tid: action.payload.id,\r\n\t\t\t\t\tmessage: action.payload.message,\r\n\t\t\t\t\ttitle: action.payload.title,\r\n\t\t\t\t\ttype: \"info\",\r\n\t\t\t\t},\r\n\t\t\t],\r\n\t\t}),\r\n\t\tpushwarning: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tmessages: [\r\n\t\t\t\t...state.messages,\r\n\t\t\t\t{\r\n\t\t\t\t\tid: action.payload.id,\r\n\t\t\t\t\tmessage: action.payload.message,\r\n\t\t\t\t\ttitle: action.payload.title,\r\n\t\t\t\t\ttype: \"warning\",\r\n\t\t\t\t},\r\n\t\t\t],\r\n\t\t}),\r\n\t\tdismiss: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tmessages: [\r\n\t\t\t\t...state.messages.filter(m => m.id !== action.payload),\r\n\t\t\t],\r\n\t\t}),\r\n\t\tsetShownId: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tmessages: [\r\n\t\t\t\t...state.messages.map(m => m.id !== action.payload.messageId ? m : {\r\n\t\t\t\t\t...m,\r\n\t\t\t\t\tshownId: action.payload.shownId\r\n\t\t\t\t}),\r\n\t\t\t],\r\n\t\t}),\r\n\t},\r\n});\r\n\r\nexport const { pushError, dismiss, pushInfo, pushwarning, setShownId } = snackbarSlice.actions;\r\n\r\nexport default snackbarSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { AuthorizationState } from \"./types\";\r\nimport { LoginResponse, FetchStateType, getFetchStateChange } from \"../models\";\r\nimport { ErrorData } from \"../../core/http/types\";\r\n\r\ninterface IAuthState {\r\n\tcurrent: AuthorizationState;\r\n\ttoken?: string;\r\n\tfetchState: FetchStateType;\r\n}\r\n\r\nconst initialState: IAuthState = {\r\n\tcurrent: { status: \"init\" },\r\n\tfetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"auth\";\r\n\r\nconst reportsSlice = createSlice({\r\n\tname,\r\n\tinitialState,\r\n\treducers: {\r\n\t\tsuccessfulLogin: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tcurrent: {\r\n\t\t\t\tstatus: \"successful\",\r\n\t\t\t\tuser: action.payload.uData,\r\n\t\t\t},\r\n\t\t}),\r\n\t\tfailedLogin: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tcurrent: {\r\n\t\t\t\tstatus: \"failed\",\r\n\t\t\t\terror: action.payload,\r\n\t\t\t},\r\n\t\t}),\r\n\t\tresetLoginState: state => ({\r\n\t\t\t...state,\r\n\t\t\tcurrent: {\r\n\t\t\t\tstatus: \"init\",\r\n\t\t\t},\r\n\t\t}),\r\n\t\tsetPendingLoginState: state => ({\r\n\t\t\t...state,\r\n\t\t\tcurrent: {\r\n\t\t\t\tstatus: \"pending\",\r\n\t\t\t},\r\n\t\t}),\r\n\t\tsetToken: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\ttoken: action.payload\r\n\t\t}),\r\n\t\tsetPushToken: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\ttoken: action.payload\r\n\t\t}),\r\n\t\tsetFetchState: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tfetchState: getFetchStateChange(state.fetchState, action.payload),\r\n\t\t}),\r\n\t},\r\n});\r\n\r\nexport const { successfulLogin, failedLogin, resetLoginState, setPendingLoginState, setToken, setPushToken, setFetchState } = reportsSlice.actions;\r\n\r\nexport default reportsSlice.reducer;\r\n","import { srTranslation } from \"./srTranslation\";\r\n\r\nexport type LocalizationKey = keyof typeof srTranslation;\r\n\r\nexport type TranslationsType = [\r\n\t{\r\n\t\t[key in LocalizationKey]: string;\r\n\t},\r\n\t{\r\n\t\t[key in string]: string;\r\n\t}\r\n];\r\n\r\nexport enum LocalizationLanguage {\r\n\tEN = \"EN\",\r\n\tSR = \"SR\",\r\n}\r\n","import { createSlice } from \"@reduxjs/toolkit\";\r\nimport { successfulLogin } from \"../auth/authDataSlice\";\r\nimport {\r\n\tCity,\r\n\tClientType,\r\n\tBank,\r\n\tCurrency,\r\n\tProductAttribute,\r\n\tProductGroup,\r\n\tVatRate,\r\n\tUnit,\r\n\tCommissions,\r\n\tRegion,\r\n\tCommissionType,\r\n\tPersonRole,\r\n\tUserMenuItem,\r\n\tOrderRecievedMethod,\r\n\tCheckPoint,\r\n\tCheckPointPayer,\r\n\tFranco,\r\n\tOrderStatus,\r\n\tTradeStatus,\r\n\tPayTypes,\r\n\tCheckDoneByList,\r\n\tPayTypesG,\r\n\tAttributesValue,\r\n\tOrderNote,\r\n\tInvTypes,\r\n\tDispSitList,\r\n\tQualityCtrlList,\r\n\tDeliveryStatuses,\r\n\tPorts,\r\n\tPay_Type,\r\n\tContractType,\r\n\tGuarantees,\r\n\tActStatuses,\r\n} from \"../models\";\r\n\r\nimport { Country } from \"../listing/countries/types\";\r\n\r\ninterface IInitialDataState {\r\n\tcities: City[];\r\n\tclientTypes: ClientType[];\r\n\tbanks: Bank[];\r\n\tcurrencies: Currency[];\r\n\tproductAttributes: ProductAttribute[];\r\n\tproductGroups: ProductGroup[];\r\n\tvatRates: VatRate[];\r\n\tunits: Unit[];\r\n\tcommissions: Commissions[];\r\n\tregions: Region[];\r\n\tsubRegions: Region[];\r\n\ttopRegions: Region[];\r\n\tcountries: Country[];\r\n\tcommisionTypes: CommissionType[];\r\n\tpersonRoles: PersonRole[];\r\n\tuserMenu: UserMenuItem[];\r\n\torderRecieveMethods: OrderRecievedMethod[];\r\n\tcheckPointPayers: CheckPointPayer[];\r\n\tcheckPoints: CheckPoint[];\r\n\tfrancoList: Franco[];\r\n\torderStatuses: OrderStatus[];\r\n\ttradeStatuses: TradeStatus[];\r\n\tpayTypes: PayTypes[];\r\n\tcheckDoneByList: CheckDoneByList[];\r\n\tpayTypesG: PayTypesG[];\r\n\tattributeValues: AttributesValue[];\r\n\torderNotes: OrderNote[];\r\n\tinvTypes: InvTypes[];\r\n\tdispSitList: DispSitList[];\r\n\tqualityCtrlList: QualityCtrlList[];\r\n\tdeliveryStatuses: DeliveryStatuses[];\r\n\tports: Ports[];\r\n\tpay_Types: Pay_Type[];\r\n\tcontractTypes: ContractType[];\r\n\tguarantees: Guarantees[];\r\n\tactStatuses: ActStatuses[];\r\n}\r\n\r\nconst initialState: IInitialDataState = {\r\n\tcities: [],\r\n\tclientTypes: [],\r\n\tbanks: [],\r\n\tcurrencies: [],\r\n\tproductAttributes: [],\r\n\tproductGroups: [],\r\n\tvatRates: [],\r\n\tunits: [],\r\n\tcommissions: [],\r\n\tregions: [],\r\n\tsubRegions: [],\r\n\ttopRegions: [],\r\n\tcountries: [],\r\n\tcommisionTypes: [],\r\n\tpersonRoles: [],\r\n\tuserMenu: [],\r\n\torderRecieveMethods: [],\r\n\tcheckPointPayers: [],\r\n\tcheckPoints: [],\r\n\tfrancoList: [],\r\n\torderStatuses: [],\r\n\ttradeStatuses: [],\r\n\tpayTypes: [],\r\n\tcheckDoneByList: [],\r\n\tpayTypesG: [],\r\n\tattributeValues: [],\r\n\torderNotes: [],\r\n\tinvTypes: [],\r\n\tdispSitList: [],\r\n\tqualityCtrlList: [],\r\n\tdeliveryStatuses: [],\r\n\tports: [],\r\n\tpay_Types: [],\r\n\tcontractTypes: [],\r\n\tguarantees: [],\r\n\tactStatuses: [],};\r\n\r\nconst name = \"initialData\";\r\n\r\nconst initialDataSlice = createSlice({\r\n\tname,\r\n\tinitialState,\r\n\treducers: {},\r\n\textraReducers: builder => {\r\n\t\tbuilder.addCase(successfulLogin, (state, action) => ({\r\n\t\t\t...state,\r\n\t\t\tcities: action.payload.cities,\r\n\t\t\tclientTypes: action.payload.clientTypes,\r\n\t\t\tbanks: action.payload.banks,\r\n\t\t\tcurrencies: action.payload.currencies,\r\n\t\t\tproductAttributes: action.payload.attributes,\r\n\t\t\tproductGroups: action.payload.productsGroups,\r\n\t\t\tvatRates: action.payload.vatRates,\r\n\t\t\tunits: action.payload.units,\r\n\t\t\tcommissions: action.payload.commissions,\r\n\t\t\tregions: action.payload.regions,\r\n\t\t\tsubRegions: action.payload.subRegions,\r\n\t\t\ttopRegions: action.payload.topRegions,\r\n\t\t\tcountries: action.payload.countries,\r\n\t\t\tcommisionTypes: action.payload.commissionTypes,\r\n\t\t\tpersonRoles: action.payload.personRoles,\r\n\t\t\tuserMenu: action.payload.userMenu,\r\n\t\t\torderRecieveMethods: action.payload.orderReceiveMethods,\r\n\t\t\tcheckPointPayers: action.payload.checkPointPayers,\r\n\t\t\tcheckPoints: action.payload.checkPoints,\r\n\t\t\tfrancoList: action.payload.francoList,\r\n\t\t\torderStatuses: action.payload.orderStatuses,\r\n\t\t\ttradeStatuses: action.payload.tradeStatuses,\r\n\t\t\tpayTypes: action.payload.payTypes,\r\n\t\t\tcheckDoneByList: action.payload.checkDoneByList,\r\n\t\t\tpayTypesG: action.payload.payTypesG,\r\n\t\t\tattributeValues: action.payload.attributesValues,\r\n\t\t\torderNotes: action.payload.orderNotes,\r\n\t\t\tinvTypes: action.payload.invTypes,\r\n\t\t\tdispSitList: action.payload.dispSitList,\r\n\t\t\tqualityCtrlList: action.payload.qualityCtrlList,\r\n\t\t\tdeliveryStatuses: action.payload.deliveryStatuses,\r\n\t\t\tports: action.payload.ports,\r\n\t\t\tpay_Types: action.payload.pay_Types,\r\n\t\t\tcontractTypes: action.payload.contractTypes,\r\n\t\t\tguarantees: action.payload.guarantees,\r\n\t\t\tactStatuses: action.payload.actStatuses,\r\n\t\t}));\r\n\t},\r\n});\r\n\r\nexport default initialDataSlice.reducer;\r\n","import { Employee } from \"./types\";\r\nimport { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { FetchStateType, getFetchStateChange } from \"../../models\";\r\n\r\ninterface IEmployeeData {\r\n\tall?: Employee[];\r\n\tsearchTerm: string;\r\n\tdisplayData?: Employee[];\r\n\tdisplayedEmployee?: Employee;\r\n\tfetchState: FetchStateType;\r\n}\r\n\r\nconst initialState: IEmployeeData = {\r\n\tsearchTerm: \"\",\r\n\tfetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"employees\";\r\n\r\nconst employeesSlice = createSlice({\r\n\tname,\r\n\tinitialState,\r\n\treducers: {\r\n\t\tsetEmployees: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tall: action.payload,\r\n\t\t\tdisplayData: filterData(action.payload, state.searchTerm),\r\n\t\t}),\r\n\t\tsetSearchTerm: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tsearchTerm: action.payload.toLocaleLowerCase(),\r\n\t\t\tdisplayData: filterData(state.all, action.payload),\r\n\t\t}),\r\n\t\tsetDisplayedEmployee: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdisplayedEmployee: action.payload,\r\n\t\t}),\r\n\t\tsetFetchStateEmployee: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdisplayedEmployee: action.payload.type === \"successful\" ? undefined : state.displayedEmployee,\r\n\t\t\tall: action.payload.type === \"successful\" ? undefined : state.all,\r\n\t\t\tdisplayData: action.payload.type === \"successful\" ? undefined : state.displayData,\r\n\t\t\tfetchState: getFetchStateChange(state.fetchState, action.payload),\r\n\t\t}),\r\n\t},\r\n});\r\n\r\nconst filterData = (data?: Employee[], searchTerm?: string) =>\r\n\tsearchTerm === undefined || searchTerm === \"\"\r\n\t\t? data\r\n\t\t: data?.filter(\r\n\t\t\t\te =>\r\n\t\t\t\t\t(e.firstName &&\r\n\t\t\t\t\t\te.firstName.toLocaleLowerCase().includes(searchTerm.toLocaleLowerCase())) ||\r\n\t\t\t\t\t(e.lastName && e.lastName.toLocaleLowerCase().includes(searchTerm.toLocaleLowerCase())) ||\r\n\t\t\t\t\t(e.email && e.email.toLocaleLowerCase().includes(searchTerm.toLocaleLowerCase())) ||\r\n\t\t\t\t\t(e.phoneOffice &&\r\n\t\t\t\t\t\te.phoneOffice.toLocaleLowerCase().includes(searchTerm.toLocaleLowerCase())) ||\r\n\t\t\t\t\t(e.empIdNumber &&\r\n\t\t\t\t\t\te.empIdNumber.toLocaleLowerCase().includes(searchTerm.toLocaleLowerCase()))\r\n\t\t );\r\n\r\nexport const {\r\n\tsetEmployees,\r\n\tsetSearchTerm,\r\n\tsetDisplayedEmployee,\r\n\tsetFetchStateEmployee,\r\n} = employeesSlice.actions;\r\n\r\nexport default employeesSlice.reducer;\r\n","import { ClientListData, Client, ClientContract } from \"./types\";\r\nimport { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { FetchStateType, createFetchState, getFetchStateChange } from \"../../models\";\r\n\r\ninterface IClientData {\r\n\tall?: ClientListData[];\r\n\tsearchTerm: string;\r\n\tdisplayData?: ClientListData[];\r\n\tdisplayedClient?: Client;\r\n\tfetchState: FetchStateType;\r\n\tfetchStatePerson: FetchStateType;\r\n\tfetchStateBroker: FetchStateType;\r\n\tfetchStateContract: FetchStateType;\r\n\tfetchStateAccount: FetchStateType;\r\n\tdownloadContractFetchState: FetchStateType;\r\n\tdeleteFetchState: FetchStateType;\r\n}\r\n\r\nconst initialState: IClientData = {\r\n\tsearchTerm: \"\",\r\n\tfetchState: createFetchState(\"not-started\"),\r\n\tfetchStatePerson: createFetchState(\"not-started\"),\r\n\tfetchStateBroker: createFetchState(\"not-started\"),\r\n\tfetchStateContract: createFetchState(\"not-started\"),\r\n\tfetchStateAccount: createFetchState(\"not-started\"),\r\n\tdownloadContractFetchState: createFetchState(\"not-started\"),\r\n\tdeleteFetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"clients\";\r\n\r\nconst clientsSlice = createSlice({\r\n\tname,\r\n\tinitialState,\r\n\treducers: {\r\n\t\tsetClients: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tall: action.payload,\r\n\t\t\tdisplayData: filterData(action.payload, state.searchTerm),\r\n\t\t}),\r\n\t\tsetSearchTerm: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tsearchTerm: action.payload.toLocaleLowerCase(),\r\n\t\t\tdisplayData: filterData(state.all, action.payload),\r\n\t\t}),\r\n\t\tsetDisplayedClient: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdisplayedClient: action.payload,\r\n\t\t}),\r\n\r\n\t\tsetFetchStateClient: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdisplayedClient: action.payload.type === \"successful\" ? undefined : state.displayedClient,\r\n\t\t\tall: action.payload.type === \"successful\" ? undefined : state.all,\r\n\t\t\tdisplayData: action.payload.type === \"successful\" ? undefined : state.displayData,\r\n\t\t\tfetchState: getFetchStateChange(state.fetchState, action.payload),\r\n\t\t}),\r\n\t\tsetFetchStatePerson: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tfetchStatePerson: getFetchStateChange(state.fetchStatePerson, action.payload),\r\n\t\t}),\r\n\t\tsetFetchStateBroker: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tfetchStateBroker: getFetchStateChange(state.fetchStateBroker, action.payload),\r\n\t\t}),\r\n\t\tsetFetchStateContract: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tfetchStateContract: getFetchStateChange(state.fetchStateContract, action.payload),\r\n\t\t}),\r\n\t\tsetFetchStateAccount: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tfetchStateAccount: getFetchStateChange(state.fetchStateAccount, action.payload),\r\n\t\t}),\r\n\t\tsetPrintContractFetchState: (\r\n\t\t\tstate,\r\n\t\t\taction: PayloadAction\r\n\t\t ) => ({\r\n\t\t\t...state,\r\n\t\t\tdownloadContractFetchState: action.payload,\r\n\t\t }),\r\n\t\t setDeleteFetchState: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdisplayed: action.payload.type === \"successful\" ? undefined : state.displayedClient,\r\n\t\t\tall: action.payload.type === \"successful\" ? undefined : state.all,\r\n\t\t\tdisplayData: action.payload.type === \"successful\" ? undefined : state.displayData,\r\n\t\t\tdeleteFetchState: getFetchStateChange(state.deleteFetchState, action.payload),\r\n\t\t}),\r\n\r\n\t },\r\n});\r\n\r\nconst filterData = (data?: ClientListData[], searchTerm?: string) =>\r\n\tsearchTerm === undefined || searchTerm === \"\"\r\n\t\t? data\r\n\t\t: data?.filter(\r\n\t\t\t\tclient =>\r\n\t\t\t\t\t(client.cliName &&\r\n\t\t\t\t\t\tclient.cliName.toLocaleLowerCase().includes(searchTerm.toLocaleLowerCase())) ||\r\n\t\t\t\t\t(client.cliIdNo &&\r\n\t\t\t\t\t\tclient.cliIdNo.toLocaleLowerCase().includes(searchTerm.toLocaleLowerCase())) ||\r\n\t\t\t\t\t(client.taxCode &&\r\n\t\t\t\t\t\tclient.taxCode.toLocaleLowerCase().includes(searchTerm.toLocaleLowerCase())) ||\r\n\t\t\t\t\t(client.city &&\r\n\t\t\t\t\t\tclient.city.toLocaleLowerCase().includes(searchTerm.toLocaleLowerCase())) ||\r\n\t\t\t\t\t(client.phone &&\r\n\t\t\t\t\t\tclient.phone.toLocaleLowerCase().includes(searchTerm.toLocaleLowerCase())) ||\r\n\t\t\t\t\t(client.broker &&\r\n\t\t\t\t\t\tclient.broker.toLocaleLowerCase().includes(searchTerm.toLocaleLowerCase()))\r\n\t\t );\r\n\r\nexport const {\r\n\tsetClients,\r\n\tsetSearchTerm,\r\n\tsetDisplayedClient,\r\n\tsetFetchStateClient,\r\n\tsetFetchStatePerson,\r\n\tsetFetchStateBroker,\r\n\tsetFetchStateContract,\r\n\tsetFetchStateAccount,\r\n\tsetPrintContractFetchState,\r\n\tsetDeleteFetchState,\r\n} = clientsSlice.actions;\r\n\r\nexport default clientsSlice.reducer;\r\n","import { Role } from \"./types\";\r\nimport { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { FetchStateType, getFetchStateChange } from \"../../models\";\r\n\r\ninterface IRoleData {\r\n\tall?: Role[];\r\n\tsearchTerm: string;\r\n\tdisplayData?: Role[];\r\n\tdisplayedRole?: Role;\r\n\tfetchState: FetchStateType;\r\n}\r\n\r\nconst initialState: IRoleData = {\r\n\tsearchTerm: \"\",\r\n\tfetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"roles\";\r\n\r\nconst roleSlice = createSlice({\r\n\tname,\r\n\tinitialState,\r\n\treducers: {\r\n\t\tsetData: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tall: action.payload,\r\n\t\t\tdisplayData: filterData(action.payload, state.searchTerm),\r\n\t\t}),\r\n\t\tsetSearchTerm: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tsearchTerm: action.payload.toLocaleLowerCase(),\r\n\t\t\tdisplayData: filterData(state.all, action.payload),\r\n\t\t}),\r\n\t\tsetDisplayed: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdisplayedRole: action.payload,\r\n\t\t}),\r\n\t\tsetFetchState: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdisplayedRole: action.payload.type === \"successful\" ? undefined : state.displayedRole,\r\n\t\t\tall: action.payload.type === \"successful\" ? undefined : state.all,\r\n\t\t\tdisplayData: action.payload.type === \"successful\" ? undefined : state.displayData,\r\n\t\t\tfetchState: getFetchStateChange(state.fetchState, action.payload),\r\n\t\t}),\r\n\t},\r\n});\r\n\r\nconst filterData = (data?: Role[], searchTerm?: string) =>\r\n\tsearchTerm === undefined || searchTerm === \"\"\r\n\t\t? data\r\n\t\t: data?.filter(\r\n\t\t\t\te =>\r\n\t\t\t\t\t(e.roleCode &&\r\n\t\t\t\t\t\te.roleCode\r\n\t\t\t\t\t\t\t.toLocaleLowerCase()\r\n\t\t\t\t\t\t\t.includes(searchTerm.toLocaleLowerCase().toLocaleLowerCase())) ||\r\n\t\t\t\t\t(e.roleName &&\r\n\t\t\t\t\t\te.roleName\r\n\t\t\t\t\t\t\t.toLocaleLowerCase()\r\n\t\t\t\t\t\t\t.includes(searchTerm.toLocaleLowerCase().toLocaleLowerCase())) ||\r\n\t\t\t\t\t(e.roleNameEn &&\r\n\t\t\t\t\t\te.roleNameEn\r\n\t\t\t\t\t\t\t.toLocaleLowerCase()\r\n\t\t\t\t\t\t\t.includes(searchTerm.toLocaleLowerCase().toLocaleLowerCase()))\r\n\t\t );\r\n\r\nexport const { setData, setSearchTerm, setDisplayed, setFetchState } = roleSlice.actions;\r\n\r\nexport default roleSlice.reducer;\r\n","import { UserListData, UserData } from \"./types\";\r\nimport { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { FetchStateType, getFetchStateChange } from \"../../models\";\r\n\r\ninterface IUserData {\r\n\tall?: UserListData[];\r\n\tsearchTerm: string;\r\n\tdisplayData?: UserListData[];\r\n\tdisplayedUser?: UserData;\r\n\tfetchState: FetchStateType;\r\n}\r\n\r\nconst initialState: IUserData = {\r\n\tsearchTerm: \"\",\r\n\tfetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"users\";\r\n\r\nconst usersSlice = createSlice({\r\n\tname,\r\n\tinitialState,\r\n\treducers: {\r\n\t\tsetData: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tall: action.payload,\r\n\t\t\tdisplayData: filterData(action.payload, state.searchTerm),\r\n\t\t}),\r\n\t\tsetSearchTerm: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tsearchTerm: action.payload.toLocaleLowerCase(),\r\n\t\t\tdisplayData: filterData(state.all, action.payload),\r\n\t\t}),\r\n\t\tsetDisplayed: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdisplayedUser: action.payload,\r\n\t\t}),\r\n\t\tsetFetchState: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdisplayedUser: action.payload.type === \"successful\" ? undefined : state.displayedUser,\r\n\t\t\tall: action.payload.type === \"successful\" ? undefined : state.all,\r\n\t\t\tdisplayData: action.payload.type === \"successful\" ? undefined : state.displayData,\r\n\t\t\tfetchState: getFetchStateChange(state.fetchState, action.payload)\r\n\t\t}),\r\n\t},\r\n});\r\n\r\nconst filterData = (data?: UserListData[], searchTerm?: string) =>\r\n\tsearchTerm === undefined || searchTerm === \"\"\r\n\t\t? data\r\n\t\t: data?.filter(\r\n\t\t\t\te =>\r\n\t\t\t\t\t(e.userName && e.userName.toLocaleLowerCase().includes(searchTerm.toLocaleLowerCase())) ||\r\n\t\t\t\t\t(e.loginUser &&\r\n\t\t\t\t\t\te.loginUser.toLocaleLowerCase().includes(searchTerm.toLocaleLowerCase())) ||\r\n\t\t\t\t\t(e.role && e.role.toLocaleLowerCase().includes(searchTerm.toLocaleLowerCase())) ||\r\n\t\t\t\t\t(e.emp && e.emp.toLocaleLowerCase().includes(searchTerm.toLocaleLowerCase())) ||\r\n\t\t\t\t\t(e.client && e.client.toLocaleLowerCase().includes(searchTerm.toLocaleLowerCase())) ||\r\n\t\t\t\t\t(e.cliPrs && e.cliPrs.toLocaleLowerCase().includes(searchTerm.toLocaleLowerCase()))\r\n\t\t );\r\n\r\nexport const { setData, setSearchTerm, setDisplayed, setFetchState } = usersSlice.actions;\r\n\r\nexport default usersSlice.reducer;\r\n","import { Product, ProductList, ProductSelectData } from \"./types\";\r\nimport { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { FetchStateType, getFetchStateChange } from \"../../models\";\r\n\r\ninterface IProductData {\r\n\tall?: ProductList[];\r\n\tsearchTerm: string;\r\n\tdisplayData?: ProductList[];\r\n\tdisplayed?: Product;\r\n\tfetchState: FetchStateType;\r\n\tfetchStateAttribute: FetchStateType;\r\n\tproductsForSelect?: ProductSelectData[] | \"loading\";\r\n\tdeleteFetchState: FetchStateType;\r\n}\r\n\r\nconst initialState: IProductData = {\r\n\tsearchTerm: \"\",\r\n\tfetchState: { type: \"not-started\" },\r\n\tfetchStateAttribute: { type: \"not-started\" },\r\n\tdeleteFetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"products\";\r\n\r\nconst roleSlice = createSlice({\r\n\tname,\r\n\tinitialState,\r\n\treducers: {\r\n\t\tsetData: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tall: action.payload,\r\n\t\t\tdisplayData: filterData(action.payload, state.searchTerm),\r\n\t\t}),\r\n\t\tsetSearchTerm: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tsearchTerm: action.payload.toLocaleLowerCase(),\r\n\t\t\tdisplayData: filterData(state.all, action.payload),\r\n\t\t}),\r\n\t\tsetDisplayed: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdisplayed: action.payload,\r\n\t\t}),\r\n\t\tsetFetchState: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdisplayed: action.payload.type === \"successful\" ? undefined : state.displayed,\r\n\t\t\tall: action.payload.type === \"successful\" ? undefined : state.all,\r\n\t\t\tdisplayData: action.payload.type === \"successful\" ? undefined : state.displayData,\r\n\t\t\tfetchState: getFetchStateChange(state.fetchState, action.payload),\r\n\t\t}),\r\n\t\tsetFetchStateAttribute: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tfetchStateAttribute: getFetchStateChange(state.fetchStateAttribute, action.payload),\r\n\t\t}),\r\n\t\tsetProductsForSelect: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tproductsForSelect: action.payload,\r\n\t\t}),\r\n\t\tsetProductsForSelectLoading: (state) => ({\r\n\t\t\t...state,\r\n\t\t\tproductsForSelect: \"loading\",\r\n\t\t}),\r\n\t\tsetDeleteFetchState: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdisplayed: action.payload.type === \"successful\" ? undefined : state.displayed,\r\n\t\t\tall: action.payload.type === \"successful\" ? undefined : state.all,\r\n\t\t\tdisplayData: action.payload.type === \"successful\" ? undefined : state.displayData,\r\n\t\t\tdeleteFetchState: getFetchStateChange(state.deleteFetchState, action.payload),\r\n\t\t}),\r\n\t},\r\n});\r\n\r\nconst filterData = (data?: ProductList[], searchTerm?: string) =>\r\n\tsearchTerm === undefined || searchTerm === \"\"\r\n\t\t? data\r\n\t\t: data?.filter(\r\n\t\t\t\te =>\r\n\t\t\t\t\t(e.prodName &&\r\n\t\t\t\t\t\te.prodName\r\n\t\t\t\t\t\t\t.toLocaleLowerCase()\r\n\t\t\t\t\t\t\t.includes(searchTerm.toLocaleLowerCase().toLocaleLowerCase())) ||\r\n\t\t\t\t\t(e.prodGroupName &&\r\n\t\t\t\t\t\te.prodGroupName\r\n\t\t\t\t\t\t\t.toLocaleLowerCase()\r\n\t\t\t\t\t\t\t.includes(searchTerm.toLocaleLowerCase().toLocaleLowerCase())) ||\r\n\t\t\t\t\t(e.vat &&\r\n\t\t\t\t\t\te.vat\r\n\t\t\t\t\t\t\t.toLocaleLowerCase()\r\n\t\t\t\t\t\t\t.includes(searchTerm.toLocaleLowerCase().toLocaleLowerCase())) ||\r\n\t\t\t\t\t(e.unit &&\r\n\t\t\t\t\t\te.unit\r\n\t\t\t\t\t\t\t.toLocaleLowerCase()\r\n\t\t\t\t\t\t\t.includes(searchTerm.toLocaleLowerCase().toLocaleLowerCase()))\r\n\t\t );\r\n\r\nexport const {\r\n\tsetData,\r\n\tsetSearchTerm,\r\n\tsetDisplayed,\r\n\tsetFetchState,\r\n\tsetFetchStateAttribute,\r\n\tsetDeleteFetchState,\r\n\tsetProductsForSelect,\r\n} = roleSlice.actions;\r\n\r\nexport default roleSlice.reducer;\r\n","import { ProductGroupData } from \"./types\";\r\nimport { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { FetchStateType, getFetchStateChange } from \"../../models\";\r\n\r\ninterface IRoleData {\r\n\tall?: ProductGroupData[];\r\n\tsearchTerm: string;\r\n\tdisplayData?: ProductGroupData[];\r\n\tdisplayed?: ProductGroupData;\r\n\tfetchState: FetchStateType;\r\n}\r\n\r\nconst initialState: IRoleData = {\r\n\tsearchTerm: \"\",\r\n\tfetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"productGroup\";\r\n\r\nconst productGroupDataSlice = createSlice({\r\n\tname,\r\n\tinitialState,\r\n\treducers: {\r\n\t\tsetData: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tall: action.payload,\r\n\t\t\tdisplayData: filterData(action.payload, state.searchTerm),\r\n\t\t}),\r\n\t\tsetSearchTerm: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tsearchTerm: action.payload.toLocaleLowerCase(),\r\n\t\t\tdisplayData: filterData(state.all, action.payload),\r\n\t\t}),\r\n\t\tsetDisplayed: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdisplayed: action.payload,\r\n\t\t}),\r\n\t\tsetFetchState: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdisplayed: action.payload.type === \"successful\" ? undefined : state.displayed,\r\n\t\t\tall: action.payload.type === \"successful\" ? undefined : state.all,\r\n\t\t\tdisplayData: action.payload.type === \"successful\" ? undefined : state.displayData,\r\n\t\t\tfetchState: getFetchStateChange(state.fetchState, action.payload),\r\n\t\t}),\r\n\t},\r\n});\r\n\r\nconst filterData = (data?: ProductGroupData[], searchTerm?: string) =>\r\n\tsearchTerm === undefined || searchTerm === \"\"\r\n\t\t? data\r\n\t\t: data?.filter(\r\n\t\t\t\te =>\r\n\t\t\t\t\t(e.prodGroupName &&\r\n\t\t\t\t\t\te.prodGroupName\r\n\t\t\t\t\t\t\t.toLocaleLowerCase()\r\n\t\t\t\t\t\t\t.includes(searchTerm.toLocaleLowerCase().toLocaleLowerCase())) ||\r\n\t\t\t\t\t(e.prodGroupNameEn &&\r\n\t\t\t\t\t\te.prodGroupNameEn\r\n\t\t\t\t\t\t\t.toLocaleLowerCase()\r\n\t\t\t\t\t\t\t.includes(searchTerm.toLocaleLowerCase().toLocaleLowerCase()))\r\n\t\t );\r\n\r\nexport const { setData, setSearchTerm, setDisplayed, setFetchState } = productGroupDataSlice.actions;\r\n\r\nexport default productGroupDataSlice.reducer;\r\n","import { Bank } from \"./types\";\r\nimport { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { FetchStateType, getFetchStateChange } from \"../../models\";\r\n\r\ninterface IBankData {\r\n all?: Bank[];\r\n searchTerm: string;\r\n displayData?: Bank[];\r\n displayedBank?: Bank;\r\n fetchState: FetchStateType;\r\n}\r\n\r\nconst initialState: IBankData = {\r\n searchTerm: \"\",\r\n fetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"banks\";\r\n\r\nconst bankSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setData: (state, action: PayloadAction) => ({\r\n ...state,\r\n all: action.payload,\r\n displayData: filterData(action.payload, state.searchTerm),\r\n }),\r\n setSearchTerm: (state, action: PayloadAction) => ({\r\n ...state,\r\n searchTerm: action.payload.toLocaleLowerCase(),\r\n displayData: filterData(state.all, action.payload),\r\n }),\r\n setDisplayed: (state, action: PayloadAction) => ({\r\n ...state,\r\n displayedBank: action.payload,\r\n }),\r\n setFetchState: (state, action: PayloadAction) => ({\r\n ...state,\r\n displayedBank:\r\n action.payload.type === \"successful\" ? undefined : state.displayedBank,\r\n all: action.payload.type === \"successful\" ? undefined : state.all,\r\n displayData:\r\n action.payload.type === \"successful\" ? undefined : state.displayData,\r\n fetchState: getFetchStateChange(state.fetchState, action.payload),\r\n }),\r\n },\r\n});\r\n\r\nconst filterData = (data?: Bank[], searchTerm?: string) =>\r\n searchTerm === undefined || searchTerm === \"\"\r\n ? data\r\n : data?.filter(\r\n (e) =>\r\n (e.bankCode &&\r\n e.bankCode\r\n .toLocaleLowerCase()\r\n .includes(searchTerm.toLocaleLowerCase().toLocaleLowerCase())) ||\r\n (e.bankName &&\r\n e.bankName\r\n .toLocaleLowerCase()\r\n .includes(searchTerm.toLocaleLowerCase().toLocaleLowerCase())) ||\r\n (e.idNumber &&\r\n e.idNumber\r\n .toLocaleLowerCase()\r\n .includes(searchTerm.toLocaleLowerCase().toLocaleLowerCase()))\r\n );\r\n\r\nexport const {\r\n setData,\r\n setSearchTerm,\r\n setDisplayed,\r\n setFetchState,\r\n} = bankSlice.actions;\r\n\r\nexport default bankSlice.reducer;\r\n","import { Warehouse } from \"./types\";\r\nimport { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { FetchStateType } from \"../../models\";\r\n\r\ninterface IWarehouseData {\r\n all?: Warehouse[];\r\n searchTerm: string;\r\n displayData?: Warehouse[];\r\n displayedWarehouse?: Warehouse;\r\n fetchState: FetchStateType;\r\n}\r\n\r\nconst initialState: IWarehouseData = {\r\n searchTerm: \"\",\r\n fetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"warehouses\";\r\n\r\nconst warehousesSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setData: (state, action: PayloadAction) => ({\r\n ...state,\r\n all: action.payload,\r\n displayData: filterData(action.payload, state.searchTerm),\r\n }),\r\n setSearchTerm: (state, action: PayloadAction) => ({\r\n ...state,\r\n searchTerm: action.payload.toLocaleLowerCase(),\r\n displayData: filterData(state.all, action.payload),\r\n }),\r\n setDisplayed: (state, action: PayloadAction) => ({\r\n ...state,\r\n displayedWarehouse: action.payload,\r\n }),\r\n setFetchState: (state, action: PayloadAction) => ({\r\n ...state,\r\n displayedWarehouse:\r\n action.payload.type === \"successful\" ? undefined : state.displayedWarehouse,\r\n all: action.payload.type === \"successful\" ? undefined : state.all,\r\n displayData:\r\n action.payload.type === \"successful\" ? undefined : state.displayData,\r\n fetchState: action.payload,\r\n }),\r\n },\r\n});\r\n\r\nconst filterData = (data?: Warehouse[], searchTerm?: string) =>\r\n searchTerm === undefined || searchTerm === \"\"\r\n ? data\r\n : data?.filter(\r\n (e) =>\r\n (e.whsCode &&\r\n e.whsCode\r\n .toLocaleLowerCase()\r\n .includes(searchTerm.toLocaleLowerCase().toLocaleLowerCase())) ||\r\n (e.whsName &&\r\n e.whsName\r\n .toLocaleLowerCase()\r\n .includes(searchTerm.toLocaleLowerCase().toLocaleLowerCase()))\r\n );\r\n\r\nexport const {\r\n setData,\r\n setSearchTerm,\r\n setDisplayed,\r\n setFetchState,\r\n} = warehousesSlice.actions;\r\n\r\nexport default warehousesSlice.reducer;\r\n","import { Attribute } from \"./types\";\r\nimport { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { FetchStateType, getFetchStateChange } from \"../../models\";\r\n\r\ninterface IProductData {\r\n\tall?: Attribute[];\r\n\tsearchTerm: string;\r\n\tdisplayData?: Attribute[];\r\n\tdisplayed?: Attribute;\r\n\tfetchState: FetchStateType;\r\n\tfetchStateAttribute: FetchStateType;\r\n\tdeleteFetchState: FetchStateType;\r\n}\r\n\r\nconst initialState: IProductData = {\r\n\tsearchTerm: \"\",\r\n\tfetchState: { type: \"not-started\" },\r\n\tfetchStateAttribute: { type: \"not-started\" },\r\n\tdeleteFetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"attributes\";\r\n\r\nconst roleSlice = createSlice({\r\n\tname,\r\n\tinitialState,\r\n\treducers: {\r\n\t\tsetData: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tall: action.payload,\r\n\t\t\tdisplayData: filterData(action.payload, state.searchTerm),\r\n\t\t}),\r\n\t\tsetSearchTerm: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tsearchTerm: action.payload.toLocaleLowerCase(),\r\n\t\t\tdisplayData: filterData(state.all, action.payload),\r\n\t\t}),\r\n\t\tsetDisplayed: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdisplayed: action.payload,\r\n\t\t}),\r\n\t\tsetFetchState: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdisplayed: action.payload.type === \"successful\" ? undefined : state.displayed,\r\n\t\t\tall: action.payload.type === \"successful\" ? undefined : state.all,\r\n\t\t\tdisplayData: action.payload.type === \"successful\" ? undefined : state.displayData,\r\n\t\t\tfetchState: getFetchStateChange(state.fetchState, action.payload),\r\n\t\t}),\r\n\t\tsetFetchStateValue: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tfetchStateAttribute: getFetchStateChange(state.fetchStateAttribute, action.payload),\r\n\t\t}),\r\n\t\tsetDeleteFetchState: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdisplayed: action.payload.type === \"successful\" ? undefined : state.displayed,\r\n\t\t\tall: action.payload.type === \"successful\" ? undefined : state.all,\r\n\t\t\tdisplayData: action.payload.type === \"successful\" ? undefined : state.displayData,\r\n\t\t\tdeleteFetchState: getFetchStateChange(state.deleteFetchState, action.payload),\r\n\t\t}),\r\n\t},\r\n});\r\n\r\nconst filterData = (data?: Attribute[], searchTerm?: string) =>\r\n\tsearchTerm === undefined || searchTerm === \"\"\r\n\t\t? data\r\n\t\t: data?.filter(\r\n\t\t\t\te =>\r\n\t\t\t\t\t(e.attrName &&\r\n\t\t\t\t\t\te.attrName\r\n\t\t\t\t\t\t\t.toLocaleLowerCase()\r\n\t\t\t\t\t\t\t.includes(searchTerm.toLocaleLowerCase().toLocaleLowerCase())) ||\r\n\t\t\t\t\t(e.attrType &&\r\n\t\t\t\t\t\te.attrType\r\n\t\t\t\t\t\t\t.toLocaleLowerCase()\r\n\t\t\t\t\t\t\t.includes(searchTerm.toLocaleLowerCase().toLocaleLowerCase())) ||\r\n\t\t\t\t\t(e.comparator &&\r\n\t\t\t\t\t\te.comparator\r\n\t\t\t\t\t\t\t.toLocaleLowerCase()\r\n\t\t\t\t\t\t\t.includes(searchTerm.toLocaleLowerCase().toLocaleLowerCase()))\r\n\t\t );\r\n\r\nexport const {\r\n\tsetData,\r\n\tsetSearchTerm,\r\n\tsetDisplayed,\r\n\tsetFetchState,\r\n\tsetFetchStateValue,\r\n\tsetDeleteFetchState,\r\n} = roleSlice.actions;\r\n\r\nexport default roleSlice.reducer;\r\n","import { Currency } from \"./types\";\r\nimport { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { FetchStateType, getFetchStateChange } from \"../../models\";\r\n\r\ninterface ICurrencyData {\r\n\tall?: Currency[];\r\n\tsearchTerm: string;\r\n\tdisplayData?: Currency[];\r\n\tdisplayed?: Currency;\r\n\tfetchState: FetchStateType;\r\n}\r\n\r\nconst initialState: ICurrencyData = {\r\n\tsearchTerm: \"\",\r\n\tfetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"currencies\";\r\n\r\nconst currencySlice = createSlice({\r\n\tname,\r\n\tinitialState,\r\n\treducers: {\r\n\t\tsetData: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tall: action.payload,\r\n\t\t\tdisplayData: filterData(action.payload, state.searchTerm),\r\n\t\t}),\r\n\t\tsetSearchTerm: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tsearchTerm: action.payload.toLocaleLowerCase(),\r\n\t\t\tdisplayData: filterData(state.all, action.payload),\r\n\t\t}),\r\n\t\tsetDisplayed: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdisplayed: action.payload,\r\n\t\t}),\r\n\t\tsetFetchState: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdisplayed: action.payload.type === \"successful\" ? undefined : state.displayed,\r\n\t\t\tall: action.payload.type === \"successful\" ? undefined : state.all,\r\n\t\t\tdisplayData: action.payload.type === \"successful\" ? undefined : state.displayData,\r\n\t\t\tfetchState: getFetchStateChange(state.fetchState, action.payload),\r\n\t\t}),\r\n\t},\r\n});\r\n\r\nconst filterData = (data?: Currency[], searchTerm?: string) =>\r\n\tsearchTerm === undefined || searchTerm === \"\"\r\n\t\t? data\r\n\t\t: data?.filter(\r\n\t\t\t\te =>\r\n\t\t\t\t\t(e.currCode &&\r\n\t\t\t\t\t\te.currCode\r\n\t\t\t\t\t\t\t.toLocaleLowerCase()\r\n\t\t\t\t\t\t\t.includes(searchTerm.toLocaleLowerCase().toLocaleLowerCase())) ||\r\n\t\t\t\t\t(e.currName &&\r\n\t\t\t\t\t\te.currName\r\n\t\t\t\t\t\t\t.toLocaleLowerCase()\r\n\t\t\t\t\t\t\t.includes(searchTerm.toLocaleLowerCase().toLocaleLowerCase())) ||\r\n\t\t\t\t\t(e.numCode &&\r\n\t\t\t\t\t\te.numCode\r\n\t\t\t\t\t\t\t.toLocaleLowerCase()\r\n\t\t\t\t\t\t\t.includes(searchTerm.toLocaleLowerCase().toLocaleLowerCase()))\r\n\t\t );\r\n\r\nexport const { setData, setSearchTerm, setDisplayed, setFetchState } = currencySlice.actions;\r\n\r\nexport default currencySlice.reducer;\r\n","import { Region } from \"./types\";\r\nimport { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { FetchStateType, getFetchStateChange } from \"../../models\";\r\nimport { RegType } from \"../../models\";\r\n\r\ntype RegionStateType = {\r\n\t[type in RegType]: T;\r\n};\r\n\r\ntype RegionArgType = {\r\n\ttype: RegType;\r\n\tdata: T;\r\n};\r\n\r\ntype RegionDataArg = RegionArgType;\r\ntype RegionDataType = RegionStateType;\r\n\r\ntype RegionaSearchArg = RegionArgType;\r\ntype RegionSearchType = RegionStateType;\r\n\r\ntype RegionaFetchArg = RegionArgType;\r\ntype RegionFetchType = RegionStateType;\r\n\r\ninterface IRegionData {\r\n\tall: RegionDataType;\r\n\tsearchTerm: RegionSearchType;\r\n\tdisplayData: RegionDataType;\r\n\tdisplayedRegion?: Region;\r\n\tfetchState: RegionFetchType;\r\n\tregType?: RegType;\r\n}\r\n\r\nconst initialState: IRegionData = {\r\n\tsearchTerm: {\r\n\t\t[RegType.Region]: \"\",\r\n\t\t[RegType.TopRegion]: \"\",\r\n\t\t[RegType.SubRegion]: \"\",\r\n\t},\r\n\tall: {\r\n\t\t[RegType.Region]: undefined,\r\n\t\t[RegType.TopRegion]: undefined,\r\n\t\t[RegType.SubRegion]: undefined,\r\n\t},\r\n\tdisplayData: {\r\n\t\t[RegType.Region]: undefined,\r\n\t\t[RegType.TopRegion]: undefined,\r\n\t\t[RegType.SubRegion]: undefined,\r\n\t},\r\n\tfetchState: {\r\n\t\t[RegType.Region]: { type: \"not-started\" },\r\n\t\t[RegType.TopRegion]: { type: \"not-started\" },\r\n\t\t[RegType.SubRegion]: { type: \"not-started\" },\r\n\t},\r\n};\r\n\r\nconst name = \"regions\";\r\n\r\nconst regionSlice = createSlice({\r\n\tname,\r\n\tinitialState,\r\n\treducers: {\r\n\t\tsetData: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tall: {\r\n\t\t\t\t...state.all,\r\n\t\t\t\t[action.payload.type]: action.payload.data,\r\n\t\t\t},\r\n\t\t\tdisplayData: {\r\n\t\t\t\t...state.displayData,\r\n\t\t\t\t[action.payload.type]: filterData(action.payload.data, state.searchTerm[action.payload.type]),\r\n\t\t\t},\r\n\t\t}),\r\n\t\tsetSearchTerm: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tsearchTerm: {\r\n\t\t\t\t...state.searchTerm,\r\n\t\t\t\t[action.payload.type]: action.payload.data,\r\n\t\t\t},\r\n\t\t\tdisplayData: {\r\n\t\t\t\t...state.displayData,\r\n\t\t\t\t[action.payload.type]: filterData(state.all[action.payload.type], action.payload.data),\r\n\t\t\t},\r\n\t\t}),\r\n\t\tsetDisplayed: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdisplayedRegion: action.payload,\r\n\t\t}),\r\n\t\tsetFetchState: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdisplayedRegion: action.payload.data.type === \"successful\" ? undefined : state.displayedRegion,\r\n\t\t\tall: {\r\n\t\t\t\t...state.all,\r\n\t\t\t\t[action.payload.type]:\r\n\t\t\t\t\taction.payload.data.type === \"successful\" ? undefined : state.all[action.payload.type],\r\n\t\t\t},\r\n\t\t\tdisplayData: {\r\n\t\t\t\t...state.displayData,\r\n\t\t\t\t[action.payload.type]:\r\n\t\t\t\t\taction.payload.data.type === \"successful\"\r\n\t\t\t\t\t\t? undefined\r\n\t\t\t\t\t\t: state.displayData[action.payload.type],\r\n\t\t\t},\r\n\t\t\tfetchState: {\r\n\t\t\t\t...state.fetchState,\r\n\t\t\t\t[action.payload.type]: getFetchStateChange(\r\n\t\t\t\t\tstate.fetchState[action.payload.type],\r\n\t\t\t\t\taction.payload.data\r\n\t\t\t\t),\r\n\t\t\t},\r\n\t\t}),\r\n\t\tsetReg: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tregType: action.payload,\r\n\t\t}),\r\n\t},\r\n});\r\n\r\nconst filterData = (data?: Region[], searchTerm?: string) =>\r\n\tsearchTerm === undefined || searchTerm === \"\"\r\n\t\t? data\r\n\t\t: data?.filter(\r\n\t\t\t\te =>\r\n\t\t\t\t\te.regName &&\r\n\t\t\t\t\te.regName.toLocaleLowerCase().includes(searchTerm.toLocaleLowerCase().toLocaleLowerCase())\r\n\t\t );\r\n\r\nexport const { setData, setSearchTerm, setDisplayed, setFetchState, setReg } = regionSlice.actions;\r\n\r\nexport default regionSlice.reducer;\r\n","import { CurrencyRate } from \"./types\";\r\nimport { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { FetchStateType, getFetchStateChange } from \"../../models\";\r\n\r\ninterface ICurrencyRateData {\r\n\tall?: CurrencyRate[];\r\n\tfilterDate: Date | null;\r\n\tdisplayCurrencyId?: string;\r\n\tdisplayData?: CurrencyRate[];\r\n\tdisplayed?: CurrencyRate;\r\n\tfetchState: FetchStateType;\r\n}\r\n\r\nconst initialState: ICurrencyRateData = {\r\n\tfilterDate: null,\r\n\tfetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"currencyRates\";\r\n\r\nconst currencyRatesSlice = createSlice({\r\n\tname,\r\n\tinitialState,\r\n\treducers: {\r\n\t\tsetData: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tall: action.payload,\r\n\t\t\tdisplayData: filterData(action.payload, state.filterDate),\r\n\t\t}),\r\n\t\tsetFilterDate: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tfilterDate: action.payload,\r\n\t\t\tdisplayData: filterData(state.all, action.payload),\r\n\t\t}),\r\n\t\tsetDisplayed: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdisplayed: action.payload,\r\n\t\t}),\r\n\t\tsetFetchState: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdisplayed: action.payload.type === \"successful\" ? undefined : state.displayed,\r\n\t\t\tall: action.payload.type === \"successful\" ? undefined : state.all,\r\n\t\t\tdisplayData: action.payload.type === \"successful\" ? undefined : state.displayData,\r\n\t\t\tfetchState: getFetchStateChange(state.fetchState, action.payload),\r\n\t\t}),\r\n\t\tsetDisplayCurrencyId: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tall: undefined,\r\n\t\t\tdisplayData: undefined,\r\n\t\t\tdisplayCurrencyId: action.payload,\r\n\t\t}),\r\n\t},\r\n});\r\n\r\nconst filterData = (data?: CurrencyRate[], filterDate?: Date | null) =>\r\n\tfilterDate === undefined || filterDate === null || filterData === undefined\r\n\t\t? data\r\n\t\t: data?.filter(\r\n\t\t\t\te =>\r\n\t\t\t\t\te.date.getDay() === filterDate.getDay() &&\r\n\t\t\t\t\te.date.getMonth() === filterDate.getMonth() &&\r\n\t\t\t\t\te.date.getFullYear() === filterDate.getFullYear()\r\n\t\t );\r\n\r\nexport const {\r\n\tsetData,\r\n\tsetFilterDate: setSearchTerm,\r\n\tsetDisplayed,\r\n\tsetFetchState,\r\n\tsetDisplayCurrencyId,\r\n} = currencyRatesSlice.actions;\r\n\r\nexport default currencyRatesSlice.reducer;\r\n","import { Country } from \"./types\";\r\nimport { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { FetchStateType, getFetchStateChange } from \"../../models\";\r\n\r\ninterface ICountryData {\r\n all?: Country[];\r\n searchTerm: string;\r\n displayData?: Country[];\r\n displayedCountry?: Country;\r\n fetchState: FetchStateType;\r\n}\r\n\r\nconst initialState: ICountryData = {\r\n searchTerm: \"\",\r\n fetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"countries\";\r\n\r\nconst countrySlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setData: (state, action: PayloadAction) => ({\r\n ...state,\r\n all: action.payload,\r\n displayData: filterData(action.payload, state.searchTerm),\r\n }),\r\n setSearchTerm: (state, action: PayloadAction) => ({\r\n ...state,\r\n searchTerm: action.payload.toLocaleLowerCase(),\r\n displayData: filterData(state.all, action.payload),\r\n }),\r\n setDisplayed: (state, action: PayloadAction) => ({\r\n ...state,\r\n displayedCountry: action.payload,\r\n }),\r\n setFetchState: (state, action: PayloadAction) => ({\r\n ...state,\r\n displayedCountry:\r\n action.payload.type === \"successful\"\r\n ? undefined\r\n : state.displayedCountry,\r\n all: action.payload.type === \"successful\" ? undefined : state.all,\r\n displayData:\r\n action.payload.type === \"successful\" ? undefined : state.displayData,\r\n fetchState: getFetchStateChange(state.fetchState, action.payload),\r\n }),\r\n },\r\n});\r\n\r\nconst filterData = (data?: Country[], searchTerm?: string) =>\r\n searchTerm === undefined || searchTerm === \"\"\r\n ? data\r\n : data?.filter(\r\n (e) =>\r\n (e.cntId &&\r\n e.cntId\r\n .toLocaleLowerCase()\r\n .includes(searchTerm.toLocaleLowerCase().toLocaleLowerCase())) ||\r\n (e.cntName &&\r\n e.cntName\r\n .toLocaleLowerCase()\r\n .includes(searchTerm.toLocaleLowerCase().toLocaleLowerCase())) ||\r\n (e.cntNameen &&\r\n e.cntName\r\n .toLocaleLowerCase()\r\n .includes(searchTerm.toLocaleLowerCase().toLocaleLowerCase()))\r\n );\r\n\r\nexport const {\r\n setData,\r\n setSearchTerm,\r\n setDisplayed,\r\n setFetchState,\r\n} = countrySlice.actions;\r\n\r\nexport default countrySlice.reducer;\r\n","import { City } from \"./types\";\r\nimport { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { FetchStateType, getFetchStateChange } from \"../../models\";\r\n\r\ninterface ICityData {\r\n all?: City[];\r\n searchTerm: string;\r\n displayData?: City[];\r\n displayedCity?: City;\r\n fetchState: FetchStateType;\r\n}\r\n\r\nconst initialState: ICityData = {\r\n searchTerm: \"\",\r\n fetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"cities\";\r\n\r\nconst citySlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setData: (state, action: PayloadAction) => ({\r\n ...state,\r\n all: action.payload,\r\n displayData: filterData(action.payload, state.searchTerm),\r\n }),\r\n setSearchTerm: (state, action: PayloadAction) => ({\r\n ...state,\r\n searchTerm: action.payload.toLocaleLowerCase(),\r\n displayData: filterData(state.all, action.payload),\r\n }),\r\n setDisplayed: (state, action: PayloadAction) => ({\r\n ...state,\r\n displayedCity: action.payload,\r\n }),\r\n setFetchState: (state, action: PayloadAction) => ({\r\n ...state,\r\n displayedCity:\r\n action.payload.type === \"successful\"\r\n ? undefined\r\n : state.displayedCity,\r\n all: action.payload.type === \"successful\" ? undefined : state.all,\r\n displayData:\r\n action.payload.type === \"successful\" ? undefined : state.displayData,\r\n fetchState: getFetchStateChange(state.fetchState, action.payload),\r\n }),\r\n },\r\n});\r\n\r\nconst filterData = (data?: City[], searchTerm?: string) =>\r\n searchTerm === undefined || searchTerm === \"\"\r\n ? data\r\n : data?.filter(\r\n (e) =>\r\n (e.cityName &&\r\n e.cityName\r\n .toLocaleLowerCase()\r\n .includes(searchTerm.toLocaleLowerCase().toLocaleLowerCase())) ||\r\n (e.zipCode &&\r\n e.zipCode\r\n .toLocaleLowerCase()\r\n .includes(searchTerm.toLocaleLowerCase().toLocaleLowerCase()))\r\n );\r\n\r\nexport const {\r\n setData,\r\n setSearchTerm,\r\n setDisplayed,\r\n setFetchState,\r\n} = citySlice.actions;\r\n\r\nexport default citySlice.reducer;\r\n","import { Commission } from \"./types\";\r\nimport { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { FetchStateType, getFetchStateChange } from \"../../models\";\r\n\r\ninterface IProductData {\r\n\tall?: Commission[];\r\n\tsearchTerm: string;\r\n\tdisplayData?: Commission[];\r\n\tdisplayed?: Commission;\r\n\tfetchState: FetchStateType;\r\n\tfetchStateDetail: FetchStateType;\r\n}\r\n\r\nconst initialState: IProductData = {\r\n\tsearchTerm: \"\",\r\n\tfetchState: { type: \"not-started\" },\r\n\tfetchStateDetail: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"commissions\";\r\n\r\nconst commissionsSlice = createSlice({\r\n\tname,\r\n\tinitialState,\r\n\treducers: {\r\n\t\tsetData: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tall: action.payload,\r\n\t\t\tdisplayData: filterData(action.payload, state.searchTerm),\r\n\t\t}),\r\n\t\tsetSearchTerm: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tsearchTerm: action.payload.toLocaleLowerCase(),\r\n\t\t\tdisplayData: filterData(state.all, action.payload),\r\n\t\t}),\r\n\t\tsetDisplayed: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdisplayed: action.payload,\r\n\t\t}),\r\n\t\tsetFetchState: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdisplayed: action.payload.type === \"successful\" ? undefined : state.displayed,\r\n\t\t\tall: action.payload.type === \"successful\" ? undefined : state.all,\r\n\t\t\tdisplayData: action.payload.type === \"successful\" ? undefined : state.displayData,\r\n\t\t\tfetchState: getFetchStateChange(state.fetchState, action.payload),\r\n\t\t}),\r\n\t\tsetFetchStateAttribute: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tfetchStateDetail: getFetchStateChange(state.fetchStateDetail, action.payload),\r\n\t\t}),\r\n\t},\r\n});\r\n\r\nconst filterData = (data?: Commission[], searchTerm?: string) =>\r\n\tsearchTerm === undefined || searchTerm === \"\"\r\n\t\t? data\r\n\t\t: data?.filter(\r\n\t\t\t\te =>\r\n\t\t\t\t\t(e.commName &&\r\n\t\t\t\t\t\te.commName\r\n\t\t\t\t\t\t\t.toLocaleLowerCase()\r\n\t\t\t\t\t\t\t.includes(searchTerm.toLocaleLowerCase())) ||\r\n\t\t\t\t\t(e.commCode &&\r\n\t\t\t\t\t\te.commCode\r\n\t\t\t\t\t\t\t.toLocaleLowerCase()\r\n\t\t\t\t\t\t\t.includes(searchTerm.toLocaleLowerCase())) ||\r\n\t\t\t\t\t(e.commTypeName &&\r\n\t\t\t\t\t\te.commTypeName\r\n\t\t\t\t\t\t\t.toLocaleLowerCase()\r\n\t\t\t\t\t\t\t.includes(searchTerm.toLocaleLowerCase()))\r\n\t\t );\r\n\r\nexport const { setData, setSearchTerm, setDisplayed, setFetchState, setFetchStateAttribute } = commissionsSlice.actions;\r\n\r\nexport default commissionsSlice.reducer;\r\n","import { PayType } from \"./types\";\r\nimport { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { FetchStateType, getFetchStateChange } from \"../../models\";\r\n\r\ninterface IPayTypeData {\r\n all?: PayType[];\r\n searchTerm: string;\r\n displayData?: PayType[];\r\n displayedPayType?: PayType;\r\n fetchState: FetchStateType;\r\n}\r\n\r\nconst initialState: IPayTypeData = {\r\n searchTerm: \"\",\r\n fetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"payType\";\r\n\r\nconst payTypeSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setData: (state, action: PayloadAction) => ({\r\n ...state,\r\n all: action.payload,\r\n displayData: filterData(action.payload, state.searchTerm),\r\n }),\r\n setSearchTerm: (state, action: PayloadAction) => ({\r\n ...state,\r\n searchTerm: action.payload.toLocaleLowerCase(),\r\n displayData: filterData(state.all, action.payload),\r\n }),\r\n setDisplayed: (state, action: PayloadAction) => ({\r\n ...state,\r\n displayedPayType: action.payload,\r\n }),\r\n setFetchState: (state, action: PayloadAction) => ({\r\n ...state,\r\n displayedPayType:\r\n action.payload.type === \"successful\" ? undefined : state.displayedPayType,\r\n all: action.payload.type === \"successful\" ? undefined : state.all,\r\n displayData:\r\n action.payload.type === \"successful\" ? undefined : state.displayData,\r\n fetchState: getFetchStateChange(state.fetchState, action.payload),\r\n }),\r\n },\r\n});\r\n\r\nconst filterData = (data?: PayType[], searchTerm?: string) =>\r\n searchTerm === undefined || searchTerm === \"\"\r\n ? data\r\n : data?.filter(\r\n (e) =>\r\n (e.payTypeDescr &&\r\n e.payTypeDescr\r\n .toLocaleLowerCase()\r\n .includes(searchTerm.toLocaleLowerCase().toLocaleLowerCase())) ||\r\n (e.payTypeDescrEn &&\r\n e.payTypeDescrEn\r\n .toLocaleLowerCase()\r\n .includes(searchTerm.toLocaleLowerCase().toLocaleLowerCase())) \r\n );\r\n\r\nexport const {\r\n setData,\r\n setSearchTerm,\r\n setDisplayed,\r\n setFetchState,\r\n} = payTypeSlice.actions;\r\n\r\nexport default payTypeSlice.reducer;\r\n","import { combineReducers, AnyAction } from \"@reduxjs/toolkit\";\r\nimport employees from \"./employees/employeesDataReducer\";\r\nimport clients from \"./clients/clientsDataReducer\";\r\nimport roles from \"./roles/rolesDataReducer\";\r\nimport users from \"./users/usersDataReducer\";\r\nimport products from \"./products/productsDataReducer\";\r\nimport productGroups from \"./productGroups/productGroupDataReducer\";\r\nimport banks from \"./banks/banksDataReducer\";\r\nimport warehouses from \"./warehouses/warehousesDataReducer\";\r\nimport attributes from \"./attributes/attributeDataReducer\";\r\nimport currencies from \"./currencies/currenciesDataReducer\";\r\nimport regions from \"./regions/regionsDataReducer\";\r\nimport currencyRates from \"./curencyRates/currencyRatesDataReducer\";\r\nimport countries from \"./countries/countriesDataReducer\";\r\nimport cities from \"./cities/citiesDataReducer\";\r\nimport commissions from \"./commissions/commissionsDataReducer\";\r\nimport { resetLoginState } from \"../auth/authDataSlice\";\r\nimport payTypes from \"./payTypes/payTypesDataReducer\";\r\n\r\nconst listingReducer = combineReducers({\r\n\temployees,\r\n\tclients,\r\n\troles,\r\n\tusers,\r\n\tproducts,\r\n\tproductGroups,\r\n\tbanks,\r\n\twarehouses,\r\n\tattributes,\r\n\tcurrencies,\r\n\tregions,\r\n\tcurrencyRates,\r\n\tcountries,\r\n\tcities,\r\n\tcommissions,\r\n\tpayTypes,\r\n});\r\n\r\nexport default (state: any, action: AnyAction) => {\r\n\tif (action.type === resetLoginState.type) {\r\n\t\treturn listingReducer(undefined, action);\r\n\t} else {\r\n\t\treturn listingReducer(state, action);\r\n\t}\r\n};\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { PageData, PageDataStatus, FetchStateType } from \"../../models\";\r\nimport { ViewOrder, Order, OrderSideDictionary, OrderSideArgs } from \"../orders/types\";\r\nimport { OrderSide } from \"../../models\";\r\n\r\ntype OrderPagedData = PageData | undefined;\r\n\r\ntype OrdersData = {\r\n\tcurrentPage: OrderSideDictionary;\r\n\tdisplayedMBOrder?: Order;\r\n\tnewOrderFetchState: FetchStateType;\r\n\tattributeFetchState: FetchStateType;\r\n\tcancelOrderFetchState: FetchStateType;\r\n\tconfirmOrderFetchState: FetchStateType;\r\n\tdeleteOrderFetchState: FetchStateType;\r\n};\r\n\r\nconst initialState: OrdersData = {\r\n\tcurrentPage: {\r\n\t\t[OrderSide.Buy]: undefined,\r\n\t\t[OrderSide.Sell]: undefined,\r\n\t},\r\n\tnewOrderFetchState: { type: \"not-started\" },\r\n\tattributeFetchState: { type: \"not-started\" },\r\n\tcancelOrderFetchState: { type: \"not-started\" },\r\n\tconfirmOrderFetchState: { type: \"not-started\" },\r\n\tdeleteOrderFetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"mainBoard\";\r\n\r\nconst ordersSlice = createSlice({\r\n\tname,\r\n\tinitialState,\r\n\treducers: {\r\n\t\tsetOrders: (state, action: PayloadAction>>) => ({\r\n\t\t\t...state,\r\n\t\t\tcurrentPage: {\r\n\t\t\t\t...state.currentPage,\r\n\t\t\t\t[action.payload.side]: action.payload.value,\r\n\t\t\t},\r\n\t\t}),\r\n\t\tsetDisplayed: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdisplayedMBOrder: action.payload,\r\n\t\t}),\r\n\t\tinvalidateOrders: state => {\r\n\t\t\tconst buyInvalidated = !state.currentPage[OrderSide.Buy]\r\n\t\t\t\t? undefined\r\n\t\t\t\t: ({\r\n\t\t\t\t\t\t...state.currentPage[OrderSide.Buy],\r\n\t\t\t\t\t\tstatus: PageDataStatus.DataInvalidated,\r\n\t\t\t\t } as OrderPagedData);\r\n\r\n\t\t\tconst sellInvalidated = !state.currentPage[OrderSide.Sell]\r\n\t\t\t\t? undefined\r\n\t\t\t\t: ({\r\n\t\t\t\t\t\t...state.currentPage[OrderSide.Sell],\r\n\t\t\t\t\t\tstatus: PageDataStatus.DataInvalidated,\r\n\t\t\t\t } as OrderPagedData);\r\n\r\n\t\t\treturn {\r\n\t\t\t\t...state,\r\n\t\t\t\tcurrentPage: {\r\n\t\t\t\t\t[OrderSide.Buy]: buyInvalidated,\r\n\t\t\t\t\t[OrderSide.Sell]: sellInvalidated,\r\n\t\t\t\t},\r\n\t\t\t};\r\n\t\t},\r\n\t\tinvalidateSideOrders: (state, action: PayloadAction) => {\r\n\t\t\tconst side = action.payload;\r\n\t\t\tconst invalidated = !state.currentPage[side]\r\n\t\t\t\t? undefined\r\n\t\t\t\t: ({\r\n\t\t\t\t\t\t...state.currentPage[side],\r\n\t\t\t\t\t\tstatus: PageDataStatus.DataInvalidated,\r\n\t\t\t\t } as OrderPagedData);\r\n\r\n\t\t\treturn {\r\n\t\t\t\t...state,\r\n\t\t\t\tcurrentPage: {\r\n\t\t\t\t\t...state.currentPage,\r\n\t\t\t\t\t[side]: invalidated,\r\n\t\t\t\t},\r\n\t\t\t};\r\n\t\t},\r\n\t\tsetNewOrderFetchState: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tnewOrderFetchState: action.payload,\r\n\t\t\tdisplayedMBOrder: action.payload.type === \"successful\" ? undefined : state.displayedMBOrder,\r\n\t\t}),\r\n\t\tsetAttributeFetchState: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tattributeFetchState: action.payload,\r\n\t\t}),\r\n\t\tsetCancelOrderFetchState: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tcancelOrderFetchState: action.payload,\r\n\t\t}),\r\n\t\tsetConfirmOrderFetchState: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tconfirmOrderFetchState: action.payload,\r\n\t\t}),\r\n\t\tsetDeleteOrderFetchState: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdeleteOrderFetchState: action.payload,\r\n\t\t}),\r\n\t},\r\n});\r\n\r\nexport const {\r\n\tsetOrders,\r\n\tsetDisplayed,\r\n\tinvalidateOrders,\r\n\tsetNewOrderFetchState,\r\n\tsetAttributeFetchState,\r\n setCancelOrderFetchState,\r\n setConfirmOrderFetchState,\r\n setDeleteOrderFetchState,\r\n invalidateSideOrders\r\n} = ordersSlice.actions;\r\n\r\nexport default ordersSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { PageData, PageDataStatus, FetchStateType } from \"../../models\";\r\nimport { TradeList } from \"./types\";\r\n\r\ntype TradesData = {\r\n\tcurrentPage?: PageData;\r\n\tdisplayedTrade?: TradeList;\r\n\tcancelFetchState: FetchStateType;\r\n\tprintTradeFetchState: FetchStateType;\r\n};\r\n\r\nconst initialState: TradesData = {\r\n\tcancelFetchState: { type: \"not-started\" },\r\n\tprintTradeFetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"trades\";\r\n\r\nconst tradesSlice = createSlice({\r\n\tname,\r\n\tinitialState,\r\n\treducers: {\r\n\t\tsetTrades: (state, action: PayloadAction>) => ({\r\n\t\t\t...state,\r\n\t\t\tcurrentPage: action.payload,\r\n\t\t}),\r\n\t\tsetDisplayed: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdisplayedTrade: action.payload,\r\n\t\t}),\r\n\t\tinvalidateTrades: state => {\r\n\t\t\tif (!state.currentPage) return state;\r\n\r\n\t\t\treturn {\r\n\t\t\t\t...state,\r\n\t\t\t\tcurrentPage: {\r\n\t\t\t\t\t...state.currentPage,\r\n\t\t\t\t\tstatus: PageDataStatus.DataInvalidated,\r\n\t\t\t\t},\r\n\t\t\t};\r\n\t\t},\r\n\t\tsetCancelTradeFetchState: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tcancelFetchState: action.payload,\r\n\t\t}),\r\n\t\tsetPrintTradeFetchState: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tprintTradeFetchState: action.payload,\r\n\t\t}),\r\n\t},\r\n});\r\n\r\nexport const { setTrades, setDisplayed, invalidateTrades, setCancelTradeFetchState, setPrintTradeFetchState,\r\n} = tradesSlice.actions;\r\n\r\nexport default tradesSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { PageData, PageDataStatus, FetchStateType } from \"../../models\";\r\nimport { ViewOrder, Order } from \"../orders/types\";\r\nimport { invalidateOrders as mainBoardInvalidate } from \"../mainBoard/ordersDataSlice\";\r\n\r\ntype OrdersData = {\r\n\tcurrentPage?: PageData;\r\n\tdisplayedOBOrder?: Order;\r\n\tnewOrderFetchState: FetchStateType;\r\n\tattributeFetchState: FetchStateType;\r\n\tprintOrderFetchState: FetchStateType;\r\n\torderPSTM:FetchStateType;\r\n};\r\n\r\nconst initialState: OrdersData = {\r\n\tnewOrderFetchState: { type: \"not-started\" },\r\n\tattributeFetchState: { type: \"not-started\" },\r\n\tprintOrderFetchState: { type: \"not-started\" },\r\n\torderPSTM: { type: \"not-started\" },\r\n};\r\n\r\nconst invalidate = (state: OrdersData) => {\r\n\tif (!state.currentPage) return state;\r\n\r\n\treturn {\r\n\t\t...state,\r\n\t\tcurrentPage: {\r\n\t\t\t...state.currentPage,\r\n\t\t\tstatus: PageDataStatus.DataInvalidated,\r\n\t\t},\r\n\t};\r\n};\r\n\r\nconst name = \"orderBook\";\r\n\r\nconst orderBookSlice = createSlice({\r\n\tname,\r\n\tinitialState,\r\n\treducers: {\r\n\t\tsetOrders: (state, action: PayloadAction>) => ({\r\n\t\t\t...state,\r\n\t\t\tcurrentPage: action.payload,\r\n\t\t}),\r\n\t\tsetDisplayed: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdisplayedOBOrder: action.payload,\r\n\t\t}),\r\n\t\tinvalidateOrders: invalidate,\r\n\t\tsetNewOrderFetchState: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tnewOrderFetchState: action.payload,\r\n\t\t}),\r\n\t\tsetAttributeFetchState: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tattributeFetchState: action.payload,\r\n\t\t}),\r\n\t\tsetPrintOrderFetchState: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tprintOrderFetchState: action.payload,\r\n\t\t}),\r\n\t\tsetOrderPSTM: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\torderPSTM: action.payload,\r\n\t\t}),\r\n\t},\r\n\textraReducers: builder => {\r\n\t\tbuilder.addCase(mainBoardInvalidate, invalidate);\r\n\t},\r\n});\r\n\r\nexport const {\r\n\tsetOrders,\r\n\tsetDisplayed,\r\n\tinvalidateOrders,\r\n\tsetNewOrderFetchState,\r\n\tsetAttributeFetchState,\r\n\tsetPrintOrderFetchState,\r\n\tsetOrderPSTM,\r\n} = orderBookSlice.actions;\r\n\r\nexport default orderBookSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { TradePricesChartData, ChartPeriod } from \"./types\";\r\n\r\ntype TickerData = {\r\n\tgraphData: {\r\n\t\t[k: string]: TradePricesChartData[] | undefined;\r\n\t};\r\n\tgraphPeriod: {\r\n\t\t[k: string]: ChartPeriod;\r\n\t};\r\n\tgraphPeriodH: {\r\n\t\t[k: string]: ChartPeriod;\r\n\t};\r\n//\tgraphProductId: {\r\n//\t\t[k: string]: string | undefined;\r\n//\t};\r\n\tticketData?: TradePricesChartData[];\r\n};\r\n\r\nexport type TickerArg = {\r\n\tgraphId: string;\r\n\tdata: T;\r\n};\r\n\r\nconst initialState: TickerData = {\r\n\tgraphData: {},\r\n\tgraphPeriod: {},\r\n\tgraphPeriodH: {},\r\n//\tgraphProductId: {\"0001\":\"00000001\", \"0002\":\"00000002\", \"0003\":\"00000003\"},\r\n};\r\n\r\nconst name = \"ticker\";\r\n\r\nconst tickerSlice = createSlice({\r\n\tname,\r\n\tinitialState,\r\n\treducers: {\r\n\t\tsetGraphData: (state, action: PayloadAction>) => ({\r\n\t\t\t...state,\r\n\t\t\tgraphData: {\r\n\t\t\t\t...state.graphData,\r\n\t\t\t\t[action.payload.graphId]: action.payload.data,\r\n\t\t\t},\r\n\t\t}),\r\n\t\tsetGraphPeriod: (state, action: PayloadAction>) => ({\r\n\t\t\t...state,\r\n\t\t\tgraphPeriod: {\r\n\t\t\t\t...state.graphPeriod,\r\n\t\t\t\t[action.payload.graphId]: action.payload.data,\r\n\t\t\t},\r\n\t\t}),\r\n\t\tsetGraphPeriodH: (state, action: PayloadAction>) => ({\r\n\t\t\t...state,\r\n\t\t\tgraphPeriodH: {\r\n\t\t\t\t...state.graphPeriodH,\r\n\t\t\t\t[action.payload.graphId]: action.payload.data,\r\n\t\t\t},\r\n\t\t}),\r\n\r\n\t\t//\t\tsetGraphProductId: (state, action: PayloadAction>) => ({\r\n//\t\t\t...state,\r\n//\t\t\tgraphProductId: {\r\n//\t\t\t\t...state.graphProductId,\r\n//\t\t\t\t[action.payload.graphId]: action.payload.data,\r\n//\t\t\t},\r\n//\t\t}),\r\n\t\tsetTicketData: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tticketData: action.payload,\r\n\t\t}),\r\n\t},\r\n});\r\n\r\n//export const { setGraphData, setGraphPeriod, setTicketData, setGraphProductId } = tickerSlice.actions;\r\nexport const { setGraphData, setGraphPeriod, setTicketData, setGraphPeriodH } = tickerSlice.actions;\r\n\r\nexport default tickerSlice.reducer;\r\n","import { combineReducers, AnyAction } from \"@reduxjs/toolkit\";\r\nimport mainBoard from \"./mainBoard/ordersDataSlice\";\r\nimport trades from \"./trades/tradesDataSlice\";\r\nimport orderBook from \"./orderBook/orderBookDataSlice\";\r\nimport { resetLoginState } from \"../auth/authDataSlice\";\r\nimport ticker from \"./ticker/tickerDataSlice\"\r\n\r\nconst dataTradingReducer = combineReducers({\r\n\tmainBoard,\r\n\ttrades,\r\n\torderBook,\r\n\tticker\r\n});\r\n\r\nexport default (state: any, action: AnyAction) => {\r\n\tif (action.type === resetLoginState.type) {\r\n\t\treturn dataTradingReducer(undefined, action);\r\n\t} else {\r\n\t\treturn dataTradingReducer(state, action);\r\n\t}\r\n};\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport {\r\n PageData,\r\n PageDataStatus,\r\n FetchStateType,\r\n getFetchStateChange,\r\n} from \"../../models\";\r\nimport { PaymentData, PaymentListData } from \"./types\";\r\n\r\ntype PaymentsData = {\r\n all?: PaymentData[];\r\n displayData?: PaymentData[];\r\n currentPage?: PageData;\r\n displayedPayment?: PaymentData;\r\n fetchState: FetchStateType;\r\n cancelFetchState: FetchStateType;\r\n downloadReportFetchState: FetchStateType;\r\n printReportFetchState: FetchStateType;\r\n};\r\n\r\nconst initialState: PaymentsData = {\r\n cancelFetchState: { type: \"not-started\" },\r\n fetchState: { type: \"not-started\" },\r\n downloadReportFetchState: { type: \"not-started\" },\r\n printReportFetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"payments\";\r\n\r\nconst paymentsSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setPayments: (state, action: PayloadAction>) => ({\r\n ...state,\r\n currentPage: action.payload,\r\n }),\r\n\r\n setDisplayed: (state, action: PayloadAction) => ({\r\n ...state,\r\n displayedPayment: action.payload,\r\n }),\r\n\r\n invalidatePayment: (state) => {\r\n if (!state.currentPage) return state;\r\n\r\n return {\r\n ...state,\r\n currentPage: {\r\n ...state.currentPage,\r\n status: PageDataStatus.DataInvalidated,\r\n },\r\n };\r\n },\r\n setFetchState: (state, action: PayloadAction) => ({\r\n ...state,\r\n displayedPayment:\r\n action.payload.type === \"successful\"\r\n ? undefined\r\n : state.displayedPayment,\r\n all: action.payload.type === \"successful\" ? undefined : state.all,\r\n displayData:\r\n action.payload.type === \"successful\" ? undefined : state.displayData,\r\n fetchState: getFetchStateChange(state.fetchState, action.payload),\r\n downloadReportFetchState: action.payload,\r\n }),\r\n setCancelPaymentFetchState: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n cancelFetchState: action.payload,\r\n }),\r\n setPrintPaymentFetchState: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n printReportFetchState: action.payload,\r\n }),\r\n },\r\n});\r\n\r\nexport const {\r\n setPayments,\r\n setDisplayed,\r\n invalidatePayment,\r\n setFetchState,\r\n setCancelPaymentFetchState,\r\n setPrintPaymentFetchState,\r\n} = paymentsSlice.actions;\r\n\r\nexport default paymentsSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport {\r\n PageData,\r\n PageDataStatus,\r\n FetchStateType,\r\n getFetchStateChange,\r\n} from \"../../models\";\r\nimport { CtrlGoodsListData, CtrlGoodsData } from \"./types\";\r\n\r\ntype ControlGoodsData = {\r\n all?: CtrlGoodsData[];\r\n displayData?: CtrlGoodsData[];\r\n currentPage?: PageData;\r\n displayedControl?: CtrlGoodsData;\r\n fetchState: FetchStateType;\r\n cancelFetchState: FetchStateType;\r\n downloadReportFetchState: FetchStateType;\r\n};\r\n\r\nconst initialState: ControlGoodsData = {\r\n cancelFetchState: { type: \"not-started\" },\r\n fetchState: { type: \"not-started\" },\r\n downloadReportFetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"controls\";\r\n\r\nconst controlsSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setControl: (\r\n state,\r\n action: PayloadAction>\r\n ) => ({\r\n ...state,\r\n currentPage: action.payload,\r\n }),\r\n\r\n setDisplayed: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n displayedControl: action.payload,\r\n }),\r\n\r\n invalidateControl: (state) => {\r\n if (!state.currentPage) return state;\r\n\r\n return {\r\n ...state,\r\n currentPage: {\r\n ...state.currentPage,\r\n status: PageDataStatus.DataInvalidated,\r\n },\r\n };\r\n },\r\n\r\n setFetchState: (state, action: PayloadAction) => ({\r\n ...state,\r\n displayedControl:\r\n action.payload.type === \"successful\"\r\n ? undefined\r\n : state.displayedControl,\r\n all: action.payload.type === \"successful\" ? undefined : state.all,\r\n displayData:\r\n action.payload.type === \"successful\" ? undefined : state.displayData,\r\n fetchState: getFetchStateChange(state.fetchState, action.payload),\r\n }),\r\n setCancelCtrlGoodsFetchState: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n cancelFetchState: action.payload,\r\n }),\r\n setDownloadFetchState: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n downloadReportFetchState: action.payload,\r\n }),\r\n },\r\n});\r\n\r\nexport const {\r\n setControl,\r\n setDisplayed,\r\n invalidateControl,\r\n setFetchState,\r\n setCancelCtrlGoodsFetchState,\r\n setDownloadFetchState,\r\n} = controlsSlice.actions;\r\n\r\nexport default controlsSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport {\r\n PageData,\r\n PageDataStatus,\r\n FetchStateType,\r\n getFetchStateChange,\r\n} from \"../../models\";\r\nimport { DeliveryListData, DeliveryData } from \"./types\";\r\n\r\ntype DeliveriesData = {\r\n all?: DeliveryData[];\r\n displayData?: DeliveryData[];\r\n currentPage?: PageData;\r\n displayedDelivery?: DeliveryData;\r\n fetchState: FetchStateType;\r\n cancelFetchState: FetchStateType;\r\n downloadReportFetchState: FetchStateType;\r\n printReportFetchState: FetchStateType;\r\n};\r\n\r\nconst initialState: DeliveriesData = {\r\n cancelFetchState: { type: \"not-started\" },\r\n fetchState: { type: \"not-started\" },\r\n downloadReportFetchState: { type: \"not-started\" },\r\n printReportFetchState:{ type: \"not-started\" },\r\n};\r\n\r\nconst name = \"deliveries\";\r\n\r\nconst deliveriesSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setDelivery: (\r\n state,\r\n action: PayloadAction>\r\n ) => ({\r\n ...state,\r\n currentPage: action.payload,\r\n }),\r\n\r\n setDisplayed: (state, action: PayloadAction) => ({\r\n ...state,\r\n displayedDelivery: action.payload,\r\n }),\r\n\r\n invalidateDelivery: (state) => {\r\n if (!state.currentPage) return state;\r\n\r\n return {\r\n ...state,\r\n currentPage: {\r\n ...state.currentPage,\r\n status: PageDataStatus.DataInvalidated,\r\n },\r\n };\r\n },\r\n\r\n setFetchState: (state, action: PayloadAction) => ({\r\n ...state,\r\n displayedDelivery:\r\n action.payload.type === \"successful\"\r\n ? undefined\r\n : state.displayedDelivery,\r\n all: action.payload.type === \"successful\" ? undefined : state.all,\r\n displayData:\r\n action.payload.type === \"successful\" ? undefined : state.displayData,\r\n fetchState: getFetchStateChange(state.fetchState, action.payload),\r\n downloadReportFetchState: action.payload,\r\n }),\r\n setCancelDeliveryFetchState: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n cancelFetchState: action.payload,\r\n }),\r\n setPrintDeliveryFetchState: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n printReportFetchState: action.payload,\r\n }),\r\n },\r\n});\r\n\r\nexport const {\r\n setDelivery,\r\n setDisplayed,\r\n invalidateDelivery,\r\n setFetchState,\r\n setCancelDeliveryFetchState,\r\n setPrintDeliveryFetchState,\r\n} = deliveriesSlice.actions;\r\n\r\nexport default deliveriesSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport {\r\n PageData,\r\n PageDataStatus,\r\n FetchStateType,\r\n getFetchStateChange,\r\n} from \"../../models\";\r\nimport { DisputeListData, DisputeData } from \"./types\";\r\n\r\ntype DisputesData = {\r\n all?: DisputeData[];\r\n displayData?: DisputeData[];\r\n currentPage?: PageData;\r\n displayedDispute?: DisputeData;\r\n fetchState: FetchStateType;\r\n cancelFetchState: FetchStateType;\r\n downloadReportFetchState: FetchStateType;\r\n};\r\n\r\nconst initialState: DisputesData = {\r\n cancelFetchState: { type: \"not-started\" },\r\n fetchState: { type: \"not-started\" },\r\n downloadReportFetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"disputes\";\r\n\r\nconst disputesSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setDisputes: (state, action: PayloadAction>) => ({\r\n ...state,\r\n currentPage: action.payload,\r\n }),\r\n\r\n setDisplayed: (state, action: PayloadAction) => ({\r\n ...state,\r\n displayedDispute: action.payload,\r\n }),\r\n\r\n invalidateDispute: (state) => {\r\n if (!state.currentPage) return state;\r\n\r\n return {\r\n ...state,\r\n currentPage: {\r\n ...state.currentPage,\r\n status: PageDataStatus.DataInvalidated,\r\n },\r\n };\r\n },\r\n\r\n setFetchState: (state, action: PayloadAction) => ({\r\n ...state,\r\n displayedDispute:\r\n action.payload.type === \"successful\"\r\n ? undefined\r\n : state.displayedDispute,\r\n all: action.payload.type === \"successful\" ? undefined : state.all,\r\n displayData:\r\n action.payload.type === \"successful\" ? undefined : state.displayData,\r\n fetchState: getFetchStateChange(state.fetchState, action.payload),\r\n downloadReportFetchState: action.payload,\r\n }),\r\n setCancelDisputeFetchState: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n cancelFetchState: action.payload,\r\n }),\r\n setDownloadFetchState: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n downloadReportFetchState: action.payload,\r\n }),\r\n },\r\n});\r\n\r\nexport const {\r\n setDisputes,\r\n setDisplayed,\r\n invalidateDispute,\r\n setFetchState,\r\n setCancelDisputeFetchState,\r\n setDownloadFetchState,\r\n} = disputesSlice.actions;\r\n\r\nexport default disputesSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport {\r\n PageData,\r\n PageDataStatus,\r\n FetchStateType,\r\n getFetchStateChange,\r\n} from \"../../models\";\r\nimport { GuaranteeData, GuaranteeListData } from \"./types\";\r\n\r\ntype GuaranteesData = {\r\n all?: GuaranteeData[];\r\n displayData?: GuaranteeData[];\r\n currentPage?: PageData;\r\n displayedGuarantee?: GuaranteeData;\r\n fetchState: FetchStateType;\r\n cancelFetchState: FetchStateType;\r\n downloadReportFetchState: FetchStateType;\r\n\tprintGuaranteeFetchState: FetchStateType;\r\n};\r\n\r\nconst initialState: GuaranteesData = {\r\n cancelFetchState: { type: \"not-started\" },\r\n fetchState: { type: \"not-started\" },\r\n downloadReportFetchState: { type: \"not-started\" },\r\n printGuaranteeFetchState: { type: \"not-started\" },\r\n\r\n};\r\n\r\nconst name = \"guarantees\";\r\n\r\nconst guaranteesSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setGuarantees: (\r\n state,\r\n action: PayloadAction>\r\n ) => ({\r\n ...state,\r\n currentPage: action.payload,\r\n }),\r\n\r\n setDisplayed: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n displayedGuarantee: action.payload,\r\n }),\r\n\r\n invalidateGuarantee: (state) => {\r\n if (!state.currentPage) return state;\r\n\r\n return {\r\n ...state,\r\n currentPage: {\r\n ...state.currentPage,\r\n status: PageDataStatus.DataInvalidated,\r\n },\r\n };\r\n },\r\n setFetchState: (state, action: PayloadAction) => ({\r\n ...state,\r\n displayedGuarantee:\r\n action.payload.type === \"successful\"\r\n ? undefined\r\n : state.displayedGuarantee,\r\n all: action.payload.type === \"successful\" ? undefined : state.all,\r\n displayData:\r\n action.payload.type === \"successful\" ? undefined : state.displayData,\r\n fetchState: getFetchStateChange(state.fetchState, action.payload),\r\n downloadReportFetchState: action.payload,\r\n }),\r\n setCancelGuaranteeFetchState: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n cancelFetchState: action.payload,\r\n }),\r\n setPrintGuaranteeFetchState: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tprintGuaranteeFetchState: action.payload,\r\n\t\t}),\r\n\r\n },\r\n});\r\n\r\nexport const {\r\n setGuarantees,\r\n setDisplayed,\r\n invalidateGuarantee,\r\n setFetchState,\r\n setCancelGuaranteeFetchState,\r\n setPrintGuaranteeFetchState,\r\n} = guaranteesSlice.actions;\r\n\r\nexport default guaranteesSlice.reducer;\r\n","import { StockFee } from \"./types\";\r\nimport { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { FetchStateType, getFetchStateChange } from \"../../models\";\r\n\r\ninterface IStockFee {\r\n all?: StockFee[];\r\n searchTerm: string;\r\n displayData?: StockFee[];\r\n displayedStockFee?: StockFee;\r\n fetchState: FetchStateType;\r\n}\r\n\r\nconst initialState: IStockFee = {\r\n searchTerm: \"\",\r\n fetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"stockfees\";\r\n\r\nconst stockFeesSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setStockFee: (state, action: PayloadAction) => ({\r\n ...state,\r\n all: action.payload,\r\n displayData: filterData(action.payload, state.searchTerm),\r\n }),\r\n setSearchTerm: (state, action: PayloadAction) => ({\r\n ...state,\r\n searchTerm: action.payload.toLocaleLowerCase(),\r\n displayData: filterData(state.all, action.payload),\r\n }),\r\n setDisplayed: (state, action: PayloadAction) => ({\r\n ...state,\r\n displayedStockFee: action.payload,\r\n }),\r\n setFetchState: (state, action: PayloadAction) => ({\r\n ...state,\r\n displayedStockFee:\r\n action.payload.type === \"successful\"\r\n ? undefined\r\n : state.displayedStockFee,\r\n all: action.payload.type === \"successful\" ? undefined : state.all,\r\n displayData:\r\n action.payload.type === \"successful\" ? undefined : state.displayData,\r\n fetchState: getFetchStateChange(state.fetchState, action.payload),\r\n }),\r\n },\r\n});\r\n\r\nconst filterData = (data?: StockFee[], searchTerm?: string) =>\r\n searchTerm === undefined || searchTerm === \"\"\r\n ? data\r\n : data?.filter(\r\n (e) =>\r\n e.startDate &&\r\n e.startDate\r\n .toString()\r\n .toLocaleLowerCase()\r\n .includes(searchTerm.toLocaleLowerCase().toLocaleLowerCase())\r\n );\r\n\r\nexport const {\r\n setStockFee,\r\n setSearchTerm,\r\n setDisplayed,\r\n setFetchState,\r\n} = stockFeesSlice.actions;\r\n\r\nexport default stockFeesSlice.reducer;\r\n","import { TransportFee } from \"./types\";\r\nimport { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { FetchStateType, getFetchStateChange } from \"../../models\";\r\n\r\ninterface ITransportFee {\r\n all?: TransportFee[];\r\n searchTerm: string;\r\n displayData?: TransportFee[];\r\n displayedTransportFee?: TransportFee;\r\n fetchState: FetchStateType;\r\n}\r\n\r\nconst initialState: ITransportFee = {\r\n searchTerm: \"\",\r\n fetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"transportfees\";\r\n\r\nconst transportFeesSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setTransportFee: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n all: action.payload,\r\n displayData: filterData(action.payload, state.searchTerm),\r\n }),\r\n setSearchTerm: (state, action: PayloadAction) => ({\r\n ...state,\r\n searchTerm: action.payload.toLocaleLowerCase(),\r\n displayData: filterData(state.all, action.payload),\r\n }),\r\n setDisplayed: (state, action: PayloadAction) => ({\r\n ...state,\r\n displayedTransportFee: action.payload,\r\n }),\r\n setFetchState: (state, action: PayloadAction) => ({\r\n ...state,\r\n displayedTransportFee:\r\n action.payload.type === \"successful\"\r\n ? undefined\r\n : state.displayedTransportFee,\r\n all: action.payload.type === \"successful\" ? undefined : state.all,\r\n displayData:\r\n action.payload.type === \"successful\" ? undefined : state.displayData,\r\n fetchState: getFetchStateChange(state.fetchState, action.payload),\r\n }),\r\n },\r\n});\r\n\r\nconst filterData = (data?: TransportFee[], searchTerm?: string) =>\r\n searchTerm === undefined || searchTerm === \"\"\r\n ? data\r\n : data?.filter(\r\n (e) =>\r\n e.startDate &&\r\n e.startDate\r\n .toString()\r\n .toLocaleLowerCase()\r\n .includes(searchTerm.toLocaleLowerCase().toLocaleLowerCase())\r\n );\r\n\r\nexport const {\r\n setTransportFee,\r\n setSearchTerm,\r\n setDisplayed,\r\n setFetchState,\r\n} = transportFeesSlice.actions;\r\n\r\nexport default transportFeesSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { PageData, PageDataStatus, FetchStateType } from \"../../models\";\r\nimport { TradeList } from \"../../trading/trades/types\";\r\nimport { TransportAndStorageCosts } from \"./types\";\r\n\r\ntype TradesData = {\r\n\tcurrentPage?: PageData;\r\n\tdisplayedTrade?: TradeList;\r\n\tcalculateFetchState: FetchStateType;\r\n\tsaveCalcFetchState: FetchStateType;\r\n};\r\n\r\nconst initialState: TradesData = {\r\n\tcalculateFetchState: { type: \"not-started\" },\r\n\tsaveCalcFetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"TAStrades\";\r\n\r\nconst tasTradesSlice = createSlice({\r\n\tname,\r\n\tinitialState,\r\n\treducers: {\r\n\t\tsetTrades: (state, action: PayloadAction>) => ({\r\n\t\t\t...state,\r\n\t\t\tcurrentPage: action.payload,\r\n\t\t}),\r\n\t\tsetDisplayed: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdisplayedTrade: action.payload,\r\n\t\t}),\r\n\t\tinvalidateTrades: state => {\r\n\t\t\tif (!state.currentPage) return state;\r\n\r\n\t\t\treturn {\r\n\t\t\t\t...state,\r\n\t\t\t\tcurrentPage: {\r\n\t\t\t\t\t...state.currentPage,\r\n\t\t\t\t\tstatus: PageDataStatus.DataInvalidated,\r\n\t\t\t\t},\r\n\t\t\t};\r\n\t\t},\r\n\t\tsetCalculationFetchState: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tcalculateFetchState: action.payload,\r\n\t\t}),\r\n\t\tsetSaveCalcFetchState: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tsaveCalcFetchState: action.payload,\r\n\t\t}),\r\n\t},\r\n});\r\n\r\nexport const { setTrades, setDisplayed, invalidateTrades, setCalculationFetchState, setSaveCalcFetchState } = tasTradesSlice.actions;\r\n\r\nexport default tasTradesSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport {\r\n PageData,\r\n PageDataStatus,\r\n FetchStateType,\r\n getFetchStateChange,\r\n} from \"../../models\";\r\nimport { TradingData } from \"./types\";\r\n\r\ntype TradingsData = {\r\n all?: TradingData[];\r\n displayData?: TradingData[];\r\n currentPage?: PageData;\r\n displayedTradingData?: TradingData;\r\n fetchState: FetchStateType;\r\n cancelFetchState: FetchStateType;\r\n downloadReportFetchState: FetchStateType;\r\n};\r\n\r\nconst initialState: TradingsData = {\r\n cancelFetchState: { type: \"not-started\" },\r\n fetchState: { type: \"not-started\" },\r\n downloadReportFetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"tradingData\";\r\n\r\nconst tradingDataSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setTradingsData: (state, action: PayloadAction>) => ({\r\n ...state,\r\n currentPage: action.payload,\r\n }),\r\n\r\n setDisplayed: (state, action: PayloadAction) => ({\r\n ...state,\r\n displayedTradingData: action.payload,\r\n }),\r\n\r\n invalidateTradingsData: (state) => {\r\n if (!state.currentPage) return state;\r\n\r\n return {\r\n ...state,\r\n currentPage: {\r\n ...state.currentPage,\r\n status: PageDataStatus.DataInvalidated,\r\n },\r\n };\r\n },\r\n setFetchState: (state, action: PayloadAction) => ({\r\n ...state,\r\n displayedTradingData:\r\n action.payload.type === \"successful\"\r\n ? undefined\r\n : state.displayedTradingData,\r\n all: action.payload.type === \"successful\" ? undefined : state.all,\r\n displayData:\r\n action.payload.type === \"successful\" ? undefined : state.displayData,\r\n fetchState: getFetchStateChange(state.fetchState, action.payload),\r\n }),\r\n setCancelTradingDataFetchState: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n cancelFetchState: action.payload,\r\n }),\r\n setDownloadFetchState: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n downloadReportFetchState: action.payload,\r\n }),\r\n resetData: (state) => ({\r\n ...state,\r\n displayedTradingData: initialState.displayedTradingData,\r\n downloadReportFetchState: initialState.downloadReportFetchState,\r\n fetchState: initialState.fetchState\r\n }),\r\n\r\n },\r\n});\r\n\r\nexport const {\r\n setTradingsData,\r\n setDisplayed,\r\n invalidateTradingsData,\r\n setFetchState,\r\n setCancelTradingDataFetchState,\r\n setDownloadFetchState,\r\n resetData,\r\n} = tradingDataSlice.actions;\r\n\r\nexport default tradingDataSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport {\r\n PageData,\r\n PageDataStatus,\r\n FetchStateType,\r\n getFetchStateChange,\r\n} from \"../../models\";\r\nimport { MarginsData } from \"./types\";\r\n\r\ntype MarginData = {\r\n all?: MarginsData[];\r\n displayData?: MarginsData[];\r\n currentPage?: PageData;\r\n displayedMarginsgData?: MarginsData;\r\n fetchState: FetchStateType;\r\n cancelFetchState: FetchStateType;\r\n downloadReportFetchState: FetchStateType;\r\n printReportFetchState: FetchStateType;\r\n};\r\n\r\nconst initialState: MarginData = {\r\n cancelFetchState: { type: \"not-started\" },\r\n fetchState: { type: \"not-started\" },\r\n downloadReportFetchState: { type: \"not-started\" },\r\n printReportFetchState:{ type: \"not-started\" },\r\n};\r\n\r\nconst name = \"marginsData\";\r\n\r\nconst marginsDataSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setMarginsData: (state, action: PayloadAction>) => ({\r\n ...state,\r\n currentPage: action.payload,\r\n }),\r\n\r\n setDisplayed: (state, action: PayloadAction) => ({\r\n ...state,\r\n displayedMarginsgData: action.payload,\r\n }),\r\n\r\n invalidateMarginssData: (state) => {\r\n if (!state.currentPage) return state;\r\n\r\n return {\r\n ...state,\r\n currentPage: {\r\n ...state.currentPage,\r\n status: PageDataStatus.DataInvalidated,\r\n },\r\n };\r\n },\r\n setFetchState: (state, action: PayloadAction) => ({\r\n ...state,\r\n displayedMarginsgData:\r\n action.payload.type === \"successful\"\r\n ? undefined\r\n : state.displayedMarginsgData,\r\n all: action.payload.type === \"successful\" ? undefined : state.all,\r\n displayData:\r\n action.payload.type === \"successful\" ? undefined : state.displayData,\r\n fetchState: getFetchStateChange(state.fetchState, action.payload),\r\n downloadReportFetchState: action.payload,\r\n }),\r\n setCancelMarginsDataFetchState: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n cancelFetchState: action.payload,\r\n }),\r\n resetData: (state) => ({\r\n ...state,\r\n displayedMarginsgData: initialState.displayedMarginsgData,\r\n downloadReportFetchState: initialState.downloadReportFetchState,\r\n fetchState: initialState.fetchState,\r\n }),\r\n setPrintMarginsFetchState: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n printReportFetchState: action.payload,\r\n }),\r\n\r\n },\r\n});\r\n\r\nexport const {\r\n setMarginsData,\r\n setDisplayed,\r\n invalidateMarginssData,\r\n setFetchState,\r\n setCancelMarginsDataFetchState,\r\n resetData,\r\n setPrintMarginsFetchState,\r\n} = marginsDataSlice.actions;\r\n\r\nexport default marginsDataSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { PageData, PageDataStatus, FetchStateType, getFetchStateChange,} from \"../../models\";\r\nimport { BankGuaranteeData } from \"./types\";\r\n\r\ntype BankGuaranteesData = {\r\n all?: BankGuaranteeData[];\r\n displayData?: BankGuaranteeData[];\r\n currentPage?: PageData;\r\n displayedBankGuarantee?: BankGuaranteeData;\r\n fetchState: FetchStateType;\r\n cancelFetchState: FetchStateType;\r\n downloadReportFetchState: FetchStateType;\r\n};\r\n\r\nconst initialState: BankGuaranteesData = {\r\n cancelFetchState: { type: \"not-started\" },\r\n fetchState: { type: \"not-started\" },\r\n downloadReportFetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"bankguarantees\";\r\n\r\nconst bankguaranteesSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setBankGuarantees: (\r\n state,\r\n action: PayloadAction>\r\n ) => ({\r\n ...state,\r\n currentPage: action.payload,\r\n }),\r\n\r\n setDisplayed: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n displayedBankGuarantee: action.payload,\r\n }),\r\n\r\n invalidateBankGuarantee: (state) => {\r\n if (!state.currentPage) return state;\r\n\r\n return {\r\n ...state,\r\n currentPage: {\r\n ...state.currentPage,\r\n status: PageDataStatus.DataInvalidated,\r\n },\r\n };\r\n },\r\n setFetchState: (state, action: PayloadAction) => ({\r\n ...state,\r\n displayedBankGuarantee:\r\n action.payload.type === \"successful\"\r\n ? undefined\r\n : state.displayedBankGuarantee,\r\n all: action.payload.type === \"successful\" ? undefined : state.all,\r\n displayData:\r\n action.payload.type === \"successful\" ? undefined : state.displayData,\r\n fetchState: getFetchStateChange(state.fetchState, action.payload),\r\n downloadReportFetchState: action.payload,\r\n }),\r\n setCancelBankGuaranteeFetchState: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n cancelFetchState: action.payload,\r\n }),\r\n setDownloadFetchState: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n downloadReportFetchState: action.payload,\r\n }),\r\n },\r\n});\r\n\r\nexport const {\r\n setBankGuarantees,\r\n setDisplayed,\r\n invalidateBankGuarantee,\r\n setFetchState,\r\n setCancelBankGuaranteeFetchState,\r\n setDownloadFetchState,\r\n} = bankguaranteesSlice.actions;\r\n\r\nexport default bankguaranteesSlice.reducer;\r\n","import { combineReducers, AnyAction } from \"@reduxjs/toolkit\";\r\nimport payments from \"./payments/paymentsDataSlice\";\r\nimport controls from \"./ctrlgoods/ctrlGoodsDataSlice\";\r\nimport deliveries from \"./delivery/deliveryDataSlice\";\r\nimport disputes from \"./dispute/disputeDataSlice\";\r\nimport guarantees from \"./guarantees/guaranteesDataSlice\";\r\nimport stockfees from \"./stockfees/stockFeesDataReducer\";\r\nimport transportfees from \"./transportfees/transportFeesDataReducer\";\r\nimport transportAndStorage from \"./transportAndStorage/TASDataSlice\";\r\nimport tradingData from \"./tradingData/tradingDataSlice\";\r\nimport marginsData from \"./marginsData/marginsDataSlice\";\r\nimport { resetLoginState } from \"../auth/authDataSlice\";\r\nimport bankguarantees from \"./bankguarantees/bankguaranteesDataSlice\";\r\n\r\nconst clearingDataReducer = combineReducers({\r\n\tpayments,\r\n\tcontrols,\r\n\tdeliveries,\r\n\tdisputes,\r\n\tguarantees,\r\n\tstockfees,\r\n\ttransportfees,\r\n\ttransportAndStorage,\r\n\ttradingData,\r\n\tmarginsData,\r\n\tbankguarantees,\r\n});\r\n\r\nexport default (state: any, action: AnyAction) => {\r\n\tif (action.type === resetLoginState.type) {\r\n\t\treturn clearingDataReducer(undefined, action);\r\n\t} else {\r\n\t\treturn clearingDataReducer(state, action);\r\n\t}\r\n};\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { PageData, PageDataStatus, FetchStateType } from \"../../models\";\r\nimport { ViewOrder, Order } from \"../../trading/orders/types\";\r\n\r\ntype OrdersData = {\r\n currentPage?: PageData;\r\n displayedMBOrder?: Order;\r\n downloadReportFetchState: FetchStateType;\r\n};\r\n\r\nconst initialState: OrdersData = {\r\n downloadReportFetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"ordersReport\";\r\n\r\nconst ordersSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setOrders: (state, action: PayloadAction>) => ({\r\n ...state,\r\n currentPage: action.payload,\r\n }),\r\n invalidateOrders: (state) => {\r\n if (!state.currentPage) return state;\r\n\r\n return {\r\n ...state,\r\n currentPage: {\r\n ...state.currentPage,\r\n status: PageDataStatus.DataInvalidated,\r\n },\r\n };\r\n },\r\n setFetchState: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdownloadReportFetchState: action.payload,\r\n\t\t}),\r\n },\r\n});\r\n\r\nexport const {\r\n setOrders,\r\n invalidateOrders,\r\n setFetchState,\r\n} = ordersSlice.actions;\r\n\r\nexport default ordersSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { PageData, PageDataStatus, FetchStateType } from \"../../models\";\r\nimport { TradeList } from \"../../trading/trades/types\";\r\n\r\ntype TradesReportData = {\r\n currentPage?: PageData;\r\n downloadReportFetchState: FetchStateType;\r\n};\r\n\r\nconst initialState: TradesReportData = {\r\n downloadReportFetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"tradesReport\";\r\n\r\nconst tradesSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setTrades: (state, action: PayloadAction>) => ({\r\n ...state,\r\n currentPage: action.payload,\r\n }),\r\n invalidateOrders: (state) => {\r\n if (!state.currentPage) return state;\r\n\r\n return {\r\n ...state,\r\n currentPage: {\r\n ...state.currentPage,\r\n status: PageDataStatus.DataInvalidated,\r\n },\r\n };\r\n },\r\n setFetchState: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdownloadReportFetchState: action.payload,\r\n\t\t}),\r\n },\r\n});\r\n\r\nexport const {\r\n setTrades,\r\n invalidateOrders,\r\n setFetchState,\r\n} = tradesSlice.actions;\r\n\r\nexport default tradesSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { PageData, PageDataStatus, FetchStateType } from \"../../models\";\r\nimport { TradeList } from \"../../trading/trades/types\";\r\n\r\ntype TradesReportData = {\r\n currentPage?: PageData;\r\n downloadReportFetchState: FetchStateType;\r\n};\r\n\r\nconst initialState: TradesReportData = {\r\n downloadReportFetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"tradesReportAll\";\r\n\r\nconst tradesSliceAll = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setTrades: (state, action: PayloadAction>) => ({\r\n ...state,\r\n currentPage: action.payload,\r\n }),\r\n invalidateOrders: (state) => {\r\n if (!state.currentPage) return state;\r\n\r\n return {\r\n ...state,\r\n currentPage: {\r\n ...state.currentPage,\r\n status: PageDataStatus.DataInvalidated,\r\n },\r\n };\r\n },\r\n setFetchState: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdownloadReportFetchState: action.payload,\r\n\t\t}),\r\n },\r\n});\r\n\r\nexport const {\r\n setTrades,\r\n invalidateOrders,\r\n setFetchState,\r\n} = tradesSliceAll.actions;\r\n\r\nexport default tradesSliceAll.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { FetchStateType } from \"../../models\";\r\nimport { DailyTradingReportData } from \"./types\";\r\n\r\ntype TradesReportData = {\r\n\tdata?: DailyTradingReportData[];\r\n\tdownloadReportFetchState: FetchStateType;\r\n};\r\n\r\nconst initialState: TradesReportData = {\r\n\tdownloadReportFetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"dailyTrade\";\r\n\r\nconst dailyTradeSlice = createSlice({\r\n\tname,\r\n\tinitialState,\r\n\treducers: {\r\n\t\tsetData: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdata: action.payload,\r\n\t\t}),\r\n\t\tsetFetchState: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdownloadReportFetchState: action.payload,\r\n\t\t}),\r\n\t},\r\n});\r\n\r\nexport const { setData, setFetchState } = dailyTradeSlice.actions;\r\n\r\nexport default dailyTradeSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { FetchStateType } from \"../../models\";\r\nimport { WeeklyTradingReportData } from \"./types\";\r\n\r\ntype WeeklyTradesReportData = {\r\n data?: WeeklyTradingReportData[];\r\n downloadReportFetchState: FetchStateType;\r\n};\r\n\r\nconst initialState: WeeklyTradesReportData = {\r\n downloadReportFetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"weeklyTrade\";\r\n\r\nconst weeklyTradeSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setData: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n data: action.payload,\r\n }),\r\n setFetchState: (state, action: PayloadAction) => ({\r\n ...state,\r\n downloadReportFetchState: action.payload,\r\n }),\r\n },\r\n});\r\n\r\nexport const { setData, setFetchState } = weeklyTradeSlice.actions;\r\n\r\nexport default weeklyTradeSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { FetchStateType } from \"../../models\";\r\nimport { MonthlyTradingReportData } from \"./types\";\r\n\r\ntype MonthlyTradesReportData = {\r\n data?: MonthlyTradingReportData[];\r\n downloadReportFetchState: FetchStateType;\r\n};\r\n\r\nconst initialState: MonthlyTradesReportData = {\r\n downloadReportFetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"monthlyTrade\";\r\n\r\nconst monthlyTradeSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setData: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n data: action.payload,\r\n }),\r\n setFetchState: (state, action: PayloadAction) => ({\r\n ...state,\r\n downloadReportFetchState: action.payload,\r\n }),\r\n },\r\n});\r\n\r\nexport const { setData, setFetchState } = monthlyTradeSlice.actions;\r\n\r\nexport default monthlyTradeSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { FetchStateType } from \"../../models\";\r\nimport { AnnualTradingReportData } from \"./types\";\r\n\r\ntype AnnualTradesReportData = {\r\n data?: AnnualTradingReportData[];\r\n downloadReportFetchState: FetchStateType;\r\n};\r\n\r\nconst initialState: AnnualTradesReportData = {\r\n downloadReportFetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"annualTrade\";\r\n\r\nconst annualTradeSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setData: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n data: action.payload,\r\n }),\r\n setFetchState: (state, action: PayloadAction) => ({\r\n ...state,\r\n downloadReportFetchState: action.payload,\r\n }),\r\n },\r\n});\r\n\r\nexport const { setData, setFetchState } = annualTradeSlice.actions;\r\n\r\nexport default annualTradeSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { MonthlyTradingReportData } from \"./types\";\r\n\r\ntype TradesReportData = {\r\n\tdata?: MonthlyTradingReportData[];\r\n\tdownloadReportFetchState: FetchStateType;\r\n};\r\n\r\nconst initialState: TradesReportData = {\r\n\tdownloadReportFetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"SECMonthlyTradeData\";\r\n\r\nconst monthlyTradeSlice = createSlice({\r\n\tname,\r\n\tinitialState,\r\n\treducers: {\r\n\t\tsetData: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdata: action.payload,\r\n\t\t}),\r\n\t\tsetFetchState: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdownloadReportFetchState: action.payload,\r\n\t\t}),\r\n\t},\r\n});\r\n\r\nexport const { setData, setFetchState } = monthlyTradeSlice.actions;\r\n\r\nexport default monthlyTradeSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { DailySecurityReportData } from \"./types\";\r\n\r\ntype TradesReportData = {\r\n\tdata?: DailySecurityReportData[];\r\n\tdownloadReportFetchState: FetchStateType;\r\n};\r\n\r\nconst initialState: TradesReportData = {\r\n\tdownloadReportFetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"dailySecurity\";\r\n\r\nconst dailySecuritySlice = createSlice({\r\n\tname,\r\n\tinitialState,\r\n\treducers: {\r\n\t\tsetData: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdata: action.payload,\r\n\t\t}),\r\n\t\tsetFetchState: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdownloadReportFetchState: action.payload,\r\n\t\t}),\r\n\t},\r\n});\r\n\r\nexport const { setData, setFetchState } = dailySecuritySlice.actions;\r\n\r\nexport default dailySecuritySlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { AnnualSecurityReportData } from \"./types\";\r\n\r\ntype TradesReportData = {\r\n\tdata?: AnnualSecurityReportData[];\r\n\tdownloadReportFetchState: FetchStateType;\r\n};\r\n\r\nconst initialState: TradesReportData = {\r\n\tdownloadReportFetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"annualSecurity\";\r\n\r\nconst annualSecurityTradeSlice = createSlice({\r\n\tname,\r\n\tinitialState,\r\n\treducers: {\r\n\t\tsetData: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdata: action.payload,\r\n\t\t}),\r\n\t\tsetFetchState: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdownloadReportFetchState: action.payload,\r\n\t\t}),\r\n\t},\r\n});\r\n\r\nexport const { setData, setFetchState } = annualSecurityTradeSlice.actions;\r\n\r\nexport default annualSecurityTradeSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { QuarterlySecurityReportData } from \"./types\";\r\n\r\ntype TradesReportData = {\r\n\tdata?: QuarterlySecurityReportData[];\r\n\tdownloadReportFetchState: FetchStateType;\r\n};\r\n\r\nconst initialState: TradesReportData = {\r\n\tdownloadReportFetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"quarterlySecurity\";\r\n\r\nconst quarterlySecuritySlice = createSlice({\r\n\tname,\r\n\tinitialState,\r\n\treducers: {\r\n\t\tsetData: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdata: action.payload,\r\n\t\t}),\r\n\t\tsetFetchState: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdownloadReportFetchState: action.payload,\r\n\t\t}),\r\n\t},\r\n});\r\n\r\nexport const { setData, setFetchState } = quarterlySecuritySlice.actions;\r\n\r\nexport default quarterlySecuritySlice.reducer;\r\n","import { combineReducers } from \"@reduxjs/toolkit\";\r\nimport monthlyTrade from \"./monthlyTrade/monthlyTradeDataSlice\";\r\nimport dailySecurity from \"./securityDaily/dailySecurityDataSlice\";\r\nimport annualSecurity from \"./securityAnnual/annualSecurityDataSlice\";\r\nimport quarterlylSecurity from \"./securityQuarterly/quarterlySecurityDataSlice\";\r\n\r\nconst securityCommissionReportDataReduer = combineReducers({\r\n\tmonthlyTrade,\r\n\tdailySecurity,\r\n\tannualSecurity,\r\n\tquarterlylSecurity,\r\n});\r\n\r\nexport default securityCommissionReportDataReduer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { FetchStateType } from \"../../models\";\r\nimport { AntiLaunderingReportData } from \"./types\";\r\n\r\ntype TradesReportData = {\r\n data?: AntiLaunderingReportData[];\r\n downloadReportFetchState: FetchStateType;\r\n};\r\n\r\nconst initialState: TradesReportData = {\r\n downloadReportFetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"antiLaundering\";\r\n\r\nconst antiLaunderingSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setData: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n data: action.payload,\r\n }),\r\n setFetchState: (state, action: PayloadAction) => ({\r\n ...state,\r\n downloadReportFetchState: action.payload,\r\n }),\r\n },\r\n});\r\n\r\nexport const { setData, setFetchState } = antiLaunderingSlice.actions;\r\n\r\nexport default antiLaunderingSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { FetchStateType } from \"../../models\";\r\nimport { ExchangeMembersReportData } from \"./types\";\r\n\r\ntype TradesReportData = {\r\n data?: ExchangeMembersReportData[];\r\n downloadReportFetchState: FetchStateType;\r\n};\r\n\r\nconst initialState: TradesReportData = {\r\n downloadReportFetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"exchangeMembers\";\r\n\r\nconst exchangeMembersSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setData: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n data: action.payload,\r\n }),\r\n setFetchState: (state, action: PayloadAction) => ({\r\n ...state,\r\n downloadReportFetchState: action.payload,\r\n }),\r\n },\r\n});\r\n\r\nexport const { setData, setFetchState } = exchangeMembersSlice.actions;\r\n\r\nexport default exchangeMembersSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { MemberContractsReportData } from \"./types\";\r\n\r\ntype TradesReportData = {\r\n data?: MemberContractsReportData[];\r\n downloadReportFetchState: FetchStateType;\r\n};\r\n\r\nconst initialState: TradesReportData = {\r\n downloadReportFetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"memberContracts\";\r\n\r\nconst memberContractsSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setData: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n data: action.payload,\r\n }),\r\n setFetchState: (state, action: PayloadAction) => ({\r\n ...state,\r\n downloadReportFetchState: action.payload,\r\n }),\r\n },\r\n});\r\n\r\nexport const { setData, setFetchState } = memberContractsSlice.actions;\r\n\r\nexport default memberContractsSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { TradeReviewReportData } from \"./types\";\r\n\r\ntype TradesReportData = {\r\n data?: TradeReviewReportData[];\r\n downloadReportFetchState: FetchStateType;\r\n};\r\n\r\nconst initialState: TradesReportData = {\r\n downloadReportFetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"tradeReview\";\r\n\r\nconst tradeReviewSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setData: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n data: action.payload,\r\n }),\r\n setFetchState: (state, action: PayloadAction) => ({\r\n ...state,\r\n downloadReportFetchState: action.payload,\r\n }),\r\n },\r\n});\r\n\r\nexport const { setData, setFetchState } = tradeReviewSlice.actions;\r\n\r\nexport default tradeReviewSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { TradeByProductsReportData } from \"./types\";\r\n\r\ntype TradesReportData = {\r\n data?: TradeByProductsReportData[];\r\n downloadReportFetchState: FetchStateType;\r\n};\r\n\r\nconst initialState: TradesReportData = {\r\n downloadReportFetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"tradeByProducts\";\r\n\r\nconst tradeByProductsSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setData: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n data: action.payload,\r\n }),\r\n setFetchState: (state, action: PayloadAction) => ({\r\n ...state,\r\n downloadReportFetchState: action.payload,\r\n }),\r\n },\r\n});\r\n\r\nexport const { setData, setFetchState } = tradeByProductsSlice.actions;\r\n\r\nexport default tradeByProductsSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { TradeByClientsReportData } from \"./types\";\r\n\r\ntype TradesReportData = {\r\n data?: TradeByClientsReportData[];\r\n downloadReportFetchState: FetchStateType;\r\n};\r\n\r\nconst initialState: TradesReportData = {\r\n downloadReportFetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"tradeByClients\";\r\n\r\nconst tradeByClientsSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setData: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n data: action.payload,\r\n }),\r\n setFetchState: (state, action: PayloadAction) => ({\r\n ...state,\r\n downloadReportFetchState: action.payload,\r\n }),\r\n },\r\n});\r\n\r\nexport const { setData, setFetchState } = tradeByClientsSlice.actions;\r\n\r\nexport default tradeByClientsSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { TurnoverByBrokersReportData } from \"./types\";\r\n\r\ntype TradesReportData = {\r\n data?: TurnoverByBrokersReportData[];\r\n downloadReportFetchState: FetchStateType;\r\n};\r\n\r\nconst initialState: TradesReportData = {\r\n downloadReportFetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"tradeByBrokers\";\r\n\r\nconst tradeByBrokersSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setData: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n data: action.payload,\r\n }),\r\n setFetchState: (state, action: PayloadAction) => ({\r\n ...state,\r\n downloadReportFetchState: action.payload,\r\n }),\r\n },\r\n});\r\n\r\nexport const { setData, setFetchState } = tradeByBrokersSlice.actions;\r\n\r\nexport default tradeByBrokersSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { WeightedPricesReportData } from \"./types\";\r\n\r\ntype TradesReportData = {\r\n data?: WeightedPricesReportData[];\r\n downloadReportFetchState: FetchStateType;\r\n};\r\n\r\nconst initialState: TradesReportData = {\r\n downloadReportFetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"weightedPrices\";\r\n\r\nconst weightedPricesSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setData: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n data: action.payload,\r\n }),\r\n setFetchState: (state, action: PayloadAction) => ({\r\n ...state,\r\n downloadReportFetchState: action.payload,\r\n }),\r\n },\r\n});\r\n\r\nexport const { setData, setFetchState } = weightedPricesSlice.actions;\r\n\r\nexport default weightedPricesSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { BusinessActivitiesReportData } from \"./types\";\r\n\r\ntype TradesReportData = {\r\n data?: BusinessActivitiesReportData[];\r\n downloadReportFetchState: FetchStateType;\r\n};\r\n\r\nconst initialState: TradesReportData = {\r\n downloadReportFetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"businessActivities\";\r\n\r\nconst businessActivitiesSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setData: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n data: action.payload,\r\n }),\r\n setFetchState: (state, action: PayloadAction) => ({\r\n ...state,\r\n downloadReportFetchState: action.payload,\r\n }),\r\n },\r\n});\r\n\r\nexport const { setData, setFetchState } = businessActivitiesSlice.actions;\r\n\r\nexport default businessActivitiesSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { PageData, PageDataStatus, FetchStateType } from \"../../../models\";\r\nimport { CommReviewReportData } from \"./types\";\r\n\r\ntype TradesReportData = {\r\n\tdata?: CommReviewReportData[];\r\n\tdownloadReportFetchState: FetchStateType;\r\n};\r\n\r\nconst initialState: TradesReportData = {\r\n\tdownloadReportFetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"commReview\";\r\n\r\nconst commReviewSlice = createSlice({\r\n\tname,\r\n\tinitialState,\r\n\treducers: {\r\n\t\tsetData: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdata: action.payload,\r\n\t\t}),\r\n\t\tinvalidateCommReview: state => {\r\n\t\t\treturn {\r\n\t\t\t\t...state,\r\n\t\t\t\tdata: undefined,\r\n\t\t\t};\r\n\t\t},\r\n\t\tsetFetchState: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdownloadReportFetchState: action.payload,\r\n\t\t}),\r\n\t},\r\n});\r\n\r\nexport const { setData, invalidateCommReview, setFetchState } = commReviewSlice.actions;\r\n\r\nexport default commReviewSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { PageData, PageDataStatus, FetchStateType, getFetchStateChange } from \"../../../models\";\r\nimport { ViewOrder } from \"../../../trading/orders/types\";\r\nimport { TradeList } from \"../../../trading/trades/types\";\r\nimport { PaymentListData } from \"../../../clearing/payments/types\";\r\nimport { DeliveryListData } from \"../../../clearing/delivery/types\";\r\n\r\ntype ClientOverviewData = {\r\n\tcurrentPageDelivery?: PageData;\r\n\tcurrentPagePayment?: PageData;\r\n\tcurrentPageOrder?: PageData;\r\n\tcurrentPageTrade?: PageData;\r\n\tfetchState: FetchStateType;\r\n\tcancelFetchState: FetchStateType;\r\n\tdownloadReportFetchState: FetchStateType;\r\n};\r\n\r\nconst initialState: ClientOverviewData = {\r\n\tcancelFetchState: { type: \"not-started\" },\r\n\tfetchState: { type: \"not-started\" },\r\n\tdownloadReportFetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"clientOverview\";\r\n\r\nconst clientOverviewSlice = createSlice({\r\n\tname,\r\n\tinitialState,\r\n\treducers: {\r\n\t\tsetCOPaymentsData: (state, action: PayloadAction>) => ({\r\n\t\t\t...state,\r\n\t\t\tcurrentPagePayment: action.payload,\r\n\t\t}),\r\n\t\tsetCODeliveriesData: (state, action: PayloadAction>) => ({\r\n\t\t\t...state,\r\n\t\t\tcurrentPageDelivery: action.payload,\r\n\t\t}),\r\n\t\tsetCOOrdersData: (state, action: PayloadAction>) => ({\r\n\t\t\t...state,\r\n\t\t\tcurrentPageOrder: action.payload,\r\n\t\t}),\r\n\t\tsetCOTradesData: (state, action: PayloadAction>) => ({\r\n\t\t\t...state,\r\n\t\t\tcurrentPageTrade: action.payload,\r\n\t\t}),\r\n\r\n\t\tinvalidateData: state => {\r\n\t\t\tlet newState = state;\r\n\t\t\tif (state.currentPageTrade) {\r\n\t\t\t\tnewState = {\r\n\t\t\t\t\t...newState,\r\n\t\t\t\t\tcurrentPageTrade: {\r\n\t\t\t\t\t\t...state.currentPageTrade,\r\n\t\t\t\t\t\tstatus: PageDataStatus.DataInvalidated,\r\n\t\t\t\t\t},\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\tif (state.currentPageOrder) {\r\n\t\t\t\tnewState = {\r\n\t\t\t\t\t...newState,\r\n\t\t\t\t\tcurrentPageOrder: {\r\n\t\t\t\t\t\t...state.currentPageOrder,\r\n\t\t\t\t\t\tstatus: PageDataStatus.DataInvalidated,\r\n\t\t\t\t\t},\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\tif (state.currentPageDelivery) {\r\n\t\t\t\tnewState = {\r\n\t\t\t\t\t...newState,\r\n\t\t\t\t\tcurrentPageDelivery: {\r\n\t\t\t\t\t\t...state.currentPageDelivery,\r\n\t\t\t\t\t\tstatus: PageDataStatus.DataInvalidated,\r\n\t\t\t\t\t},\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\tif (state.currentPagePayment) {\r\n\t\t\t\tnewState = {\r\n\t\t\t\t\t...newState,\r\n\t\t\t\t\tcurrentPagePayment: {\r\n\t\t\t\t\t\t...state.currentPagePayment,\r\n\t\t\t\t\t\tstatus: PageDataStatus.DataInvalidated,\r\n\t\t\t\t\t},\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\treturn newState;\r\n\t\t},\r\n\r\n\t\tsetFetchState: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tfetchState: action.payload,\r\n\t\t}),\r\n\t\tsetCancelTradingDataFetchState: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tcancelFetchState: action.payload,\r\n\t\t}),\r\n\t\tresetData: state => ({\r\n\t\t\t...state,\r\n\t\t\tdownloadReportFetchState: initialState.downloadReportFetchState,\r\n\t\t\tfetchState: initialState.fetchState,\r\n\t\t}),\r\n\t},\r\n});\r\n\r\nexport const {\r\n\tsetCOPaymentsData,\r\n\tsetCODeliveriesData,\r\n\tsetCOOrdersData,\r\n\tsetCOTradesData,\r\n\tinvalidateData,\r\n\tsetFetchState,\r\n\tsetCancelTradingDataFetchState,\r\n\tresetData,\r\n} = clientOverviewSlice.actions;\r\n\r\nexport default clientOverviewSlice.reducer;\r\n","import { combineReducers } from \"@reduxjs/toolkit\";\r\nimport memberContracts from \"./memberContracts/memberContractsDataSlice\";\r\nimport tradeReview from \"./tradeReview/tradeReviewDataSlice\";\r\nimport tradeByProducts from \"./tradeByProducts/tradeByProductsDataSlice\";\r\nimport tradeByClients from \"./tradeByClients/tradeByClientsDataSlice\";\r\nimport tradeByBrokers from \"./tradeByBrokers/tradeByBrokersDataSlice\";\r\nimport weightedPrice from \"./weightedPrices/weightedPriceDataSlice\";\r\nimport businessActivities from \"./businessActivities/businessActivitiesDataSlice\";\r\nimport commReview from \"./commReview/commReviewDataSlice\";\r\nimport clientOverview from \"./clientOverview/clientOverviewDataSlice\";\r\n\r\nconst exchBusinessDataReducer = combineReducers({\r\n memberContracts,\r\n tradeReview,\r\n tradeByProducts,\r\n tradeByClients,\r\n tradeByBrokers,\r\n weightedPrice,\r\n businessActivities,\r\n commReview,\r\n clientOverview,\r\n});\r\n\r\nexport default exchBusinessDataReducer;\r\n","import { NewsData } from \"./types\";\r\nimport { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { PageData, PageDataStatus, FetchStateType, getFetchStateChange } from \"../../models\";\r\n\r\n\r\ntype INewsData = {\r\n\tall?: NewsData[];\r\n\tdisplayData?: NewsData[];\r\n\tcurrentPage?: PageData;\r\n\tdisplayedNews?: NewsData;\r\n\tfetchState: FetchStateType;\r\n\tcancelFetchState: FetchStateType;\r\n\tdownloadNewsFetchState: FetchStateType;\r\n};\r\n\r\nconst initialState: INewsData = {\r\n\tcancelFetchState: { type: \"not-started\" },\r\n\tfetchState: { type: \"not-started\" },\r\n\tdownloadNewsFetchState: { type: \"not-started\" },\r\n};\r\n\r\n\r\nconst name = \"news\";\r\n\r\nconst newsSlice = createSlice({\r\n\tname,\r\n\tinitialState,\r\n\treducers: {\r\n\t\tsetNews: (state, action: PayloadAction>) => ({\r\n\t\t\t...state,\r\n\t\t\tcurrentPage: action.payload,\r\n\t\t}),\r\n\r\n\t\tsetDisplayed: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdisplayedNews: action.payload,\r\n\t\t}),\r\n\r\n\t\tinvalidateNews: state => {\r\n\t\t\tif (!state.currentPage) return state;\r\n\r\n\t\t\treturn {\r\n\t\t\t\t...state,\r\n\t\t\t\tcurrentPage: {\r\n\t\t\t\t\t...state.currentPage,\r\n\t\t\t\t\tstatus: PageDataStatus.DataInvalidated,\r\n\t\t\t\t},\r\n\t\t\t};\r\n\t\t},\r\n\t\tsetFetchState: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdisplayedNews: action.payload.type === \"successful\" ? undefined : state.displayedNews,\r\n\t\t\tall: action.payload.type === \"successful\" ? undefined : state.all,\r\n\t\t\tdisplayData: action.payload.type === \"successful\" ? undefined : state.displayData,\r\n\t\t\tfetchState: getFetchStateChange(state.fetchState, action.payload),\r\n\t\t}),\r\n\t\tsetCancelNewsFetchState: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tcancelFetchState: action.payload,\r\n\t\t}),\r\n\t\tsetDownloadNewsFetchState: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdownloadNewsFetchState: action.payload,\r\n\t\t}),\r\n\t},\r\n});\r\n\r\nexport const {\r\n\tsetNews,\r\n\tsetDisplayed,\r\n\tinvalidateNews,\r\n\tsetFetchState,\r\n\tsetCancelNewsFetchState,\r\n\tsetDownloadNewsFetchState,\r\n} = newsSlice.actions;\r\n\r\nexport default newsSlice.reducer;\r\n\r\n\r\n\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { FetchStateType } from \"../../models\";\r\nimport { PushNotification } from \"./types\";\r\n\r\ntype NotificationReportData = {\r\n data?: PushNotification[];\r\n downloadReportFetchState: FetchStateType;\r\n};\r\n\r\nconst initialState: NotificationReportData = {\r\n downloadReportFetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"pushnotifications\";\r\n\r\nconst pushnotificationsSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setData: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n data: action.payload,\r\n }),\r\n setFetchState: (state, action: PayloadAction) => ({\r\n ...state,\r\n downloadReportFetchState: action.payload,\r\n }),\r\n },\r\n});\r\n\r\nexport const { setData, setFetchState } = pushnotificationsSlice.actions;\r\n\r\nexport default pushnotificationsSlice.reducer;\r\n","import { combineReducers, AnyAction } from \"@reduxjs/toolkit\";\r\nimport ordersReport from \"./ordersReport/ordersReportDataSlice\";\r\nimport tradesReport from \"./tradesReport/tradesReportDataSlice\";\r\nimport tradesReportAll from \"./tradesReportClientAll/tradesReportDataSliceAll\";\r\nimport dailyTrade from \"./dailyTrade/dailyTradeDataSlice\";\r\nimport weeklyTrade from \"./weeklyTrade/weeklyTradeDataSlice\";\r\nimport monthlyTrade from \"./monthlyTrade/monthlyTradeDataSlice\";\r\nimport annualTrade from \"./annualTrade/annualTradeDataSlice\";\r\nimport securityCommission from \"./securityCommission/securityCommissionReportDataReducer\";\r\nimport antiLaundering from \"./amlaundering/amlaunderingDataSlice\";\r\nimport exchangeMember from \"./exmember/exchangeMemberDataSlice\";\r\nimport exchbusiness from \"./exchbusiness/exchBusinessDataReducer\";\r\nimport news from \"./news/newsDataReducer\";\r\nimport pushnotifications from \"./notifications/notificationDataSlice\";\r\nimport { resetLoginState } from \"../auth/authDataSlice\";\r\n\r\nconst dataReportsReducer = combineReducers({\r\n\tordersReport,\r\n\ttradesReport,\r\n\ttradesReportAll,\r\n\tdailyTrade,\r\n\tweeklyTrade,\r\n\tmonthlyTrade,\r\n\tannualTrade,\r\n\tsecurityCommission,\r\n\tantiLaundering,\r\n\texchangeMember,\r\n\texchbusiness,\r\n\tnews,\r\n\tpushnotifications,\r\n});\r\n\r\nexport default (state: any, action: AnyAction) => {\r\n\tif (action.type === resetLoginState.type) {\r\n\t\treturn dataReportsReducer(undefined, action);\r\n\t} else {\r\n\t\treturn dataReportsReducer(state, action);\r\n\t}\r\n};\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { FetchStateType } from \"../../models\";\r\nimport { CreateInvoicesTranData } from \"./types\";\r\n\r\ntype CreateInvoicesTranReportData = {\r\n data?: CreateInvoicesTranData[];\r\n downloadReportFetchState: FetchStateType;\r\n};\r\n\r\nconst initialState: CreateInvoicesTranReportData = {\r\n downloadReportFetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"createInvoices\";\r\n\r\nconst createInvoicesSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setData: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n data: action.payload,\r\n }),\r\n invalidateCreateInvoice: (state) => {\r\n return {\r\n ...state,\r\n data: undefined,\r\n };\r\n },\r\n setFetchState: (state, action: PayloadAction) => ({\r\n ...state,\r\n downloadReportFetchState: action.payload,\r\n }),\r\n resteData: (state) => ({\r\n ...state,\r\n data: initialState.data,\r\n downloadReportFetchState: initialState.downloadReportFetchState,\r\n }),\r\n },\r\n});\r\n\r\nexport const {\r\n setData,\r\n invalidateCreateInvoice,\r\n setFetchState,\r\n resteData,\r\n} = createInvoicesSlice.actions;\r\n\r\nexport default createInvoicesSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { PageData, PageDataStatus, FetchStateType, getFetchStateChange } from \"../../models\";\r\nimport { InvoiceData, InvoiceListData } from \"./types\";\r\nimport { setFetchState as createInvoiceFetchState } from \"../createInvoices/createInvoicesDataSlice\";\r\n\r\ntype InvoicesData = {\r\n\tall?: InvoiceData[];\r\n\tdisplayData?: InvoiceData[];\r\n\tcurrentPage?: PageData;\r\n\tdisplayedInvoice?: InvoiceData;\r\n\tfetchState: FetchStateType;\r\n\tcancelFetchState: FetchStateType;\r\n\tprintInvoiceFetchState: FetchStateType;\r\n\txmlInvoiceFetchState: FetchStateType;\r\n};\r\n\r\nconst initialState: InvoicesData = {\r\n\tcancelFetchState: { type: \"not-started\" },\r\n\tfetchState: { type: \"not-started\" },\r\n\tprintInvoiceFetchState: { type: \"not-started\" },\r\n\txmlInvoiceFetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"invoices\";\r\n\r\nconst invoicesSlice = createSlice({\r\n\tname,\r\n\tinitialState,\r\n\treducers: {\r\n\t\tsetInvoices: (state, action: PayloadAction>) => ({\r\n\t\t\t...state,\r\n\t\t\tcurrentPage: action.payload,\r\n\t\t}),\r\n\r\n\t\tsetDisplayed: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdisplayedInvoice: action.payload,\r\n\t\t}),\r\n\r\n\t\tinvalidateInvoices: state => {\r\n\t\t\tif (!state.currentPage) return state;\r\n\r\n\t\t\treturn {\r\n\t\t\t\t...state,\r\n\t\t\t\tcurrentPage: {\r\n\t\t\t\t\t...state.currentPage,\r\n\t\t\t\t\tstatus: PageDataStatus.DataInvalidated,\r\n\t\t\t\t},\r\n\t\t\t};\r\n\t\t},\r\n\t\tsetFetchState: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tdisplayedInvoice: action.payload.type === \"successful\" ? undefined : state.displayedInvoice,\r\n\t\t\tall: action.payload.type === \"successful\" ? undefined : state.all,\r\n\t\t\tdisplayData: action.payload.type === \"successful\" ? undefined : state.displayData,\r\n\t\t\tfetchState: getFetchStateChange(state.fetchState, action.payload),\r\n\t\t}),\r\n\t\tsetCancelInvoiceFetchState: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tcancelFetchState: action.payload,\r\n\t\t}),\r\n\t\tsetPrintInvoiceFetchState: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tprintOrderFetchState: action.payload,\r\n\t\t}),\r\n\t\tsetXmlInvoiceFetchState: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\txmlOrderFetchState: action.payload,\r\n\t\t}),\r\n\t},\r\n\textraReducers: builder => {\r\n\t\tbuilder.addCase(createInvoiceFetchState, (state, action) =>\r\n\t\t\taction.payload.type !== \"successful\" || !state.currentPage\r\n\t\t\t\t? state\r\n\t\t\t\t: {\r\n\t\t\t\t\t\t...state,\r\n\t\t\t\t\t\tcurrentPage: {\r\n\t\t\t\t\t\t\t...state.currentPage,\r\n\t\t\t\t\t\t\tstatus: PageDataStatus.DataInvalidated,\r\n\t\t\t\t\t\t},\r\n\t\t\t\t }\r\n\t\t);\r\n\t},\r\n});\r\n\r\nexport const {\r\n\tsetInvoices,\r\n\tsetDisplayed,\r\n\tinvalidateInvoices,\r\n\tsetFetchState,\r\n\tsetCancelInvoiceFetchState,\r\n\tsetPrintInvoiceFetchState,\r\n\tsetXmlInvoiceFetchState,\r\n} = invoicesSlice.actions;\r\n\r\nexport default invoicesSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { FetchStateType } from \"../../models\";\r\nimport { InvoiceListData } from \"./types\";\r\n\r\ntype AccountingOrderData = {\r\n data?: InvoiceListData[];\r\n downloadReportFetchState: FetchStateType;\r\n};\r\n\r\nconst initialState: AccountingOrderData = {\r\n downloadReportFetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"accountingOrder\";\r\n\r\nconst accountingOrderSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setData: (state, action: PayloadAction) => ({\r\n ...state,\r\n data: action.payload,\r\n }),\r\n invalidateAccOrder: (state) => {\r\n return {\r\n ...state,\r\n data: undefined,\r\n };\r\n },\r\n setFetchState: (state, action: PayloadAction) => ({\r\n ...state,\r\n downloadReportFetchState: action.payload,\r\n }),\r\n resteData: (state) => ({\r\n ...state,\r\n data: initialState.data,\r\n downloadReportFetchState: initialState.downloadReportFetchState,\r\n }),\r\n },\r\n});\r\n\r\nexport const {\r\n setData,\r\n invalidateAccOrder,\r\n setFetchState,\r\n resteData,\r\n} = accountingOrderSlice.actions;\r\n\r\nexport default accountingOrderSlice.reducer;\r\n","import { combineReducers, AnyAction } from \"@reduxjs/toolkit\";\r\nimport createInvoices from \"./createInvoices/createInvoicesDataSlice\";\r\nimport invoices from \"./invoices/invoicesDataSlice\";\r\nimport { resetLoginState } from \"../auth/authDataSlice\";\r\nimport accountingOrder from \"./accountingOrder/accountingOrderDataSlice\";\r\n\r\nconst dataAccountingReducer = combineReducers({\r\n\tcreateInvoices,\r\n\tinvoices,\r\n\taccountingOrder,\r\n});\r\n\r\nexport default (state: any, action: AnyAction) => {\r\n\tif (action.type === resetLoginState.type) {\r\n\t\treturn dataAccountingReducer(undefined, action);\r\n\t} else {\r\n\t\treturn dataAccountingReducer(state, action);\r\n\t}\r\n};\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport {\r\n PageData,\r\n PageDataStatus,\r\n FetchStateType,\r\n getFetchStateChange,\r\n} from \"../../models\";\r\nimport { AlarmData } from \"./types\";\r\n\r\ntype AlarmsData = {\r\n all?: AlarmData[];\r\n displayData?: AlarmData[];\r\n currentPage?: PageData;\r\n displayedAlarm?: AlarmData;\r\n fetchState: FetchStateType;\r\n cancelFetchState: FetchStateType;\r\n};\r\n\r\nconst initialState: AlarmsData = {\r\n cancelFetchState: { type: \"not-started\" },\r\n fetchState: { type: \"not-started\" },\r\n};\r\n\r\nconst name = \"alarms\";\r\n\r\nconst alarmsSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setAlarm: (\r\n state,\r\n action: PayloadAction>\r\n ) => ({\r\n ...state,\r\n currentPage: action.payload,\r\n }),\r\n\r\n setDisplayed: (state, action: PayloadAction) => ({\r\n ...state,\r\n displayedAlarm: action.payload,\r\n }),\r\n\r\n invalidateAlarm: (state) => {\r\n if (!state.currentPage) return state;\r\n\r\n return {\r\n ...state,\r\n currentPage: {\r\n ...state.currentPage,\r\n status: PageDataStatus.DataInvalidated,\r\n },\r\n };\r\n },\r\n\r\n setFetchState: (state, action: PayloadAction) => ({\r\n ...state,\r\n displayedAlarm:\r\n action.payload.type === \"successful\"\r\n ? undefined\r\n : state.displayedAlarm,\r\n all: action.payload.type === \"successful\" ? undefined : state.all,\r\n displayData:\r\n action.payload.type === \"successful\" ? undefined : state.displayData,\r\n fetchState: getFetchStateChange(state.fetchState, action.payload),\r\n }),\r\n setCancelAlarmFetchState: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n cancelFetchState: action.payload,\r\n }),\r\n },\r\n});\r\n\r\nexport const {\r\n setAlarm,\r\n setDisplayed,\r\n invalidateAlarm,\r\n setFetchState,\r\n setCancelAlarmFetchState,\r\n} = alarmsSlice.actions;\r\n\r\nexport default alarmsSlice.reducer;\r\n","import { combineReducers, AnyAction } from \"@reduxjs/toolkit\";\r\nimport alarms from \"./alarmParameters/alarmDataSlice\";\r\nimport { resetLoginState } from \"../auth/authDataSlice\";\r\n\r\nconst surveillanceDataReducer = combineReducers({\r\n\talarms,\r\n});\r\n\r\nexport default (state: any, action: AnyAction) => {\r\n\tif (action.type === resetLoginState.type) {\r\n\t\treturn surveillanceDataReducer(undefined, action);\r\n\t} else {\r\n\t\treturn surveillanceDataReducer(state, action);\r\n\t}\r\n};\r\n","import { combineReducers } from \"@reduxjs/toolkit\";\r\nimport { persistReducer } from \"redux-persist\";\r\nimport storage from \"redux-persist/lib/storage/session\";\r\nimport snackbar from \"./snackbar/snackbarDataSlice\";\r\nimport auth from \"./auth/authDataSlice\";\r\nimport initialData from \"./initialData/initialDataReducer\";\r\nimport listing from \"./listing/listingDataReducer\";\r\nimport trading from \"./trading/tradingDataReducer\"\r\nimport clearing from \"./clearing/clearingDataReducer\"\r\nimport reports from \"./reports/reportsDataRecucer\";\r\nimport accounting from \"./accounting/accountingDataReducer\";\r\nimport surveillance from \"./surveillance/surveillanceDataReducer\";\r\n\r\nconst dataPersistConfig = {\r\n key: \"auth\",\r\n storage: storage,\r\n whitelist: [\"auth\", \"initialData\"],\r\n};\r\n\r\nconst dataComReducer = combineReducers({\r\n snackbar,\r\n auth,\r\n initialData,\r\n listing,\r\n trading,\r\n clearing,\r\n reports,\r\n accounting,\r\n surveillance\r\n});\r\n\r\nexport default persistReducer(dataPersistConfig, dataComReducer);\r\n\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { LoginResponse } from \"../models\";\r\nimport { successfulLogin } from \"./authDataSlice\";\r\n\r\ninterface IAuthUXState {\r\n\tusers: {\r\n\t\t[username: string]: string | undefined;\r\n\t};\r\n\tlastLoginUsername?: string;\r\n}\r\n\r\nconst initialState: IAuthUXState = {\r\n\tusers: {},\r\n};\r\n\r\nconst name = \"auth\";\r\n\r\nconst reportsSlice = createSlice({\r\n\tname,\r\n\tinitialState,\r\n\treducers: {\r\n\t\tdeleteUserToken: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tusers: {\r\n\t\t\t\t...state.users,\r\n\t\t\t\t[action.payload]: undefined\r\n\t\t\t}\r\n\t\t})\r\n\t},\r\n\textraReducers: {\r\n\t\t[successfulLogin.type]: (state, action: PayloadAction) => {\r\n\t\t\tconst loginUser = action.payload.uData;\r\n\t\t\tconst newusersDictionary = !loginUser.token\r\n\t\t\t\t? state.users\r\n\t\t\t\t: {\r\n\t\t\t\t\t\t...state.users,\r\n\t\t\t\t\t\t[loginUser.userName.toLowerCase()]: loginUser.token,\r\n\t\t\t\t };\r\n\r\n\t\t\treturn {\r\n\t\t\t\t...state,\r\n\t\t\t\tusers: newusersDictionary,\r\n\t\t\t\tlastLoginUsername: loginUser.userName\r\n\t\t\t};\r\n\t\t},\r\n\t},\r\n});\r\n\r\nexport const { deleteUserToken } = reportsSlice.actions;\r\n\r\nexport default reportsSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { LocalizationLanguage } from \"../../core/localization/types\";\r\n\r\ninterface ILocalizationState {\r\n\tlanguage: LocalizationLanguage;\r\n}\r\n\r\nconst initialState: ILocalizationState = {\r\n\tlanguage: LocalizationLanguage.SR,\r\n};\r\n\r\nconst name = \"localization\";\r\n\r\nconst reportsSlice = createSlice({\r\n\tname,\r\n\tinitialState,\r\n\treducers: {\r\n\t\tsetLocalization: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tlanguage: action.payload,\r\n\t\t}),\r\n\t},\r\n});\r\n\r\nexport const {\r\n\tsetLocalization,\r\n} = reportsSlice.actions;\r\n\r\nexport default reportsSlice.reducer;\r\n","import { ClientListData } from \"../../../../data/listing/clients/types\";\r\nimport { OrderStatus, TradeStatus } from \"../../../models\";\r\n\r\nexport interface GetClientOverviewParams {\r\n\tuserid: string;\r\n\tcliid?: string;\r\n\tdatefrom?: string;\r\n\tdateto?: string;\r\n\tfromrow: number;\r\n\tnumofrows: number;\r\n\tstatus?: number;\r\n\ttranid?: string;\r\n}\r\n\r\nexport interface ClientOverviewFilter {\r\n\tdatefrom?: string;\r\n\tdateto?: string;\r\n\tclient?: Partial;\r\n\torderStatus?: OrderStatus;\r\n\ttradeStatus?: TradeStatus;\r\n\ttranId?: string;\r\n\ttranDesc?: string;\r\n }\r\n\r\nexport enum TableType {\r\n\tOrders = \"orders\",\r\n\tTrades = \"trades\",\r\n\tPayments = \"pamens\",\r\n\tDeliveries = \"deliveries\",\r\n}\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { PageIndex, OrderFilter, OrderSide } from \"../../models\";\r\nimport { successfulLogin } from \"../../auth/authDataSlice\";\r\nimport { OrderSideDictionary, OrderSideArgs } from \"../orders/types\";\r\n\r\ntype OrderPageState = {\r\n\tindex: OrderSideDictionary;\r\n\tfilter: OrderFilter;\r\n};\r\n\r\nexport const initialState: OrderPageState = {\r\n\tindex: {\r\n\t\t[OrderSide.Buy]: {\r\n\t\t\titemsPerPage: 10,\r\n\t\t\tpageNumber: 0,\r\n\t\t},\r\n\t\t[OrderSide.Sell]: {\r\n\t\t\titemsPerPage: 10,\r\n\t\t\tpageNumber: 0,\r\n\t\t},\r\n\t},\r\n\tfilter: {\r\n\t\torderStatus: {\r\n\t\t\tftValue: -1,\r\n\t\t\tftDescr: \"\",\r\n\t\t}\r\n\t},\r\n};\r\n\r\nconst name = \"orders\";\r\n\r\nconst ordersSlice = createSlice({\r\n\tname,\r\n\tinitialState,\r\n\treducers: {\r\n\t\tsetOrdersIndex: (state, action: PayloadAction>) => ({\r\n\t\t\t...state,\r\n\t\t\tindex: {\r\n\t\t\t\t...state.index,\r\n\t\t\t\t[action.payload.side]: action.payload.value,\r\n\t\t\t},\r\n\t\t}),\r\n\t\tresetOrderIdices: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tindex: {\r\n\t\t\t\t...state.index,\r\n\t\t\t\t[action.payload]: {\r\n\t\t\t\t\titemsPerPage: state.index[action.payload].itemsPerPage,\r\n\t\t\t\t\tpageNumber: initialState.index[action.payload].pageNumber,\r\n\t\t\t\t},\r\n\t\t\t},\r\n\t\t}),\r\n\t\tsetFilter: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tfilter: action.payload,\r\n\t\t}),\r\n\t\tremoveFilter: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tfilter: {\r\n\t\t\t\t...state.filter,\r\n\t\t\t\t[action.payload]: undefined,\r\n\t\t\t},\r\n\t\t}),\r\n\t},\r\n\textraReducers: builder => {\r\n\t\tbuilder.addCase(successfulLogin, state => ({\r\n\t\t\t...state,\r\n\t\t\tindex: {\r\n\t\t\t\t[OrderSide.Buy]: {\r\n\t\t\t\t\titemsPerPage: state.index[OrderSide.Buy].itemsPerPage,\r\n\t\t\t\t\tpageNumber: initialState.index[OrderSide.Buy].pageNumber,\r\n\t\t\t\t},\r\n\t\t\t\t[OrderSide.Sell]: {\r\n\t\t\t\t\titemsPerPage: state.index[OrderSide.Sell].itemsPerPage,\r\n\t\t\t\t\tpageNumber: initialState.index[OrderSide.Sell].pageNumber,\r\n\t\t\t\t},\r\n\t\t\t},\r\n\t\t}));\r\n\t},\r\n});\r\n\r\nexport const { setOrdersIndex, resetOrderIdices, setFilter, removeFilter } = ordersSlice.actions;\r\n\r\nexport default ordersSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { PageIndex } from \"../../models\";\r\nimport { successfulLogin } from \"../../auth/authDataSlice\";\r\nimport { TradeFilter } from \"./types\";\r\n\r\ntype TradePageState = {\r\n\tindex: PageIndex;\r\n\tfilter: TradeFilter;\r\n};\r\n\r\nexport const initialState: TradePageState = {\r\n\tindex: {\r\n\t\titemsPerPage: 20,\r\n\t\tpageNumber: 0,\r\n\t},\r\n\tfilter: {},\r\n};\r\n\r\nconst name = \"trades\";\r\n\r\nconst tradesSlice = createSlice({\r\n\tname,\r\n\tinitialState,\r\n\treducers: {\r\n\t\tsetTradesIndex: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tindex: action.payload,\r\n\t\t}),\r\n\t\tresetTradeIdices: state => ({\r\n\t\t\t...state,\r\n\t\t\tindex: {\r\n\t\t\t\titemsPerPage: state.index.itemsPerPage,\r\n\t\t\t\tpageNumber: initialState.index.pageNumber,\r\n\t\t\t},\r\n\t\t}),\r\n\t\tsetFilter: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tfilter: action.payload,\r\n\t\t}),\r\n\t\tremoveFilter: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tfilter: {\r\n\t\t\t\t...state.filter,\r\n\t\t\t\t[action.payload]: undefined,\r\n\t\t\t},\r\n\t\t}),\r\n\t},\r\n\textraReducers: builder => {\r\n\t\tbuilder.addCase(successfulLogin, state => ({\r\n\t\t\t...state,\r\n\t\t\tindex: {\r\n\t\t\t\titemsPerPage: state.index.itemsPerPage,\r\n\t\t\t\tpageNumber: initialState.index.pageNumber,\r\n\t\t\t},\r\n\t\t}));\r\n\t},\r\n});\r\n\r\nexport const { setTradesIndex, resetTradeIdices, setFilter, removeFilter } = tradesSlice.actions;\r\n\r\nexport default tradesSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { PageIndex, OrderFilter } from \"../../models\";\r\nimport { successfulLogin } from \"../../auth/authDataSlice\";\r\n\r\ntype OrderPageState = {\r\n\tindex: PageIndex;\r\n\tfilter: OrderFilter;\r\n};\r\n\r\nexport const initialState: OrderPageState = {\r\n\tindex: {\r\n\t\titemsPerPage: 20,\r\n\t\tpageNumber: 0,\r\n\t},\r\n\tfilter: {},\r\n};\r\n\r\nconst name = \"orderBook\";\r\n\r\nconst orderBookSlice = createSlice({\r\n\tname,\r\n\tinitialState,\r\n\treducers: {\r\n\t\tsetOrdersIndex: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tindex: action.payload,\r\n\t\t}),\r\n\t\tresetOrderIdices: state => ({\r\n\t\t\t...state,\r\n\t\t\tindex: {\r\n\t\t\t\titemsPerPage: state.index.itemsPerPage,\r\n\t\t\t\tpageNumber: initialState.index.pageNumber,\r\n\t\t\t},\r\n\t\t}),\r\n\t\tsetFilter: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tfilter: action.payload,\r\n\t\t}),\r\n\t\tremoveFilter: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tfilter: {\r\n\t\t\t\t...state.filter,\r\n\t\t\t\t[action.payload]: undefined,\r\n\t\t\t},\r\n\t\t}),\r\n\t\tresetFilter: state => ({\r\n\t\t\t...state,\r\n\t\t\tfilter: {\r\n\t\t\t\t...initialState.filter,\r\n\t\t\t},\r\n\t\t}),\r\n\t},\r\n\textraReducers: builder => {\r\n\t\tbuilder.addCase(successfulLogin, state => ({\r\n\t\t\t...state,\r\n\t\t\tindex: {\r\n\t\t\t\titemsPerPage: state.index.itemsPerPage,\r\n\t\t\t\tpageNumber: initialState.index.pageNumber,\r\n\t\t\t},\r\n\t\t}));\r\n\t},\r\n});\r\n\r\nexport const { setOrdersIndex, resetOrderIdices, setFilter, removeFilter, resetFilter } = orderBookSlice.actions;\r\n\r\nexport default orderBookSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\n\r\ntype TickerPRoductState = {\r\n\tgraphProductId: {\r\n\t\t[k: string]: string | undefined;\r\n\t};\r\n};\r\n\r\nexport type TickerArg = {\r\n\tgraphId: string;\r\n\tdata: T;\r\n};\r\n\r\nexport const initialState: TickerPRoductState = {\r\n//\tgraphProductId: {\"0001\":\"00000054\", \"0002\":\"00000048\", \"0003\":\"00000055\"},\r\n\tgraphProductId: {\"0001\":\"00000070\", \"0002\":\"0000006C\", \"0003\":\"00000073\"},\r\n};\r\n\r\nconst name = \"ticker\";\r\n\r\nconst tickerSlice = createSlice({\r\n\tname,\r\n\tinitialState,\r\n\treducers: {\r\n\t\tsetGraphProductId: (state, action: PayloadAction>) => ({\r\n\t\t\t...state,\r\n\t\t\tgraphProductId: {\r\n\t\t\t\t...state.graphProductId,\r\n\t\t\t\t[action.payload.graphId]: action.payload.data,\r\n\t\t\t},\r\n\t\t}),\r\n\t},\r\n});\r\n\r\nexport const { setGraphProductId } = tickerSlice.actions;\r\n\r\nexport default tickerSlice.reducer;\r\n","import { combineReducers, } from \"@reduxjs/toolkit\";\r\nimport mainBoard from \"./mainBoard/ordersUXSlice\";\r\nimport trades from \"./trades/tradesUXSlice\";\r\nimport orderBook from \"./orderBook/orderBookUXSlice\";\r\nimport ticker from \"./ticker/tickerUXSlice\";\r\n\r\nconst uxTradingReducer = combineReducers({\r\n mainBoard,\r\n trades,\r\n orderBook,\r\n ticker,\r\n});\r\n\r\nexport default uxTradingReducer","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { PageIndex } from \"../../models\";\r\nimport { successfulLogin } from \"../../auth/authDataSlice\";\r\nimport { PaymentFilter } from \"./types\";\r\n\r\ntype PaymentPageState = {\r\n index: PageIndex;\r\n filter: PaymentFilter;\r\n};\r\n\r\nexport const initialState: PaymentPageState = {\r\n index: {\r\n itemsPerPage: 20,\r\n pageNumber: 0,\r\n },\r\n filter: {\r\n status: {\r\n ftValue: -1,\r\n ftDescr: \"\",\r\n },\r\n },\r\n};\r\n\r\nconst name = \"payments\";\r\n\r\nconst paymentsSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setPaymentIndex: (state, action: PayloadAction) => ({\r\n ...state,\r\n index: action.payload,\r\n }),\r\n resetPaymentIdices: (state) => ({\r\n ...state,\r\n index: {\r\n itemsPerPage: state.index.itemsPerPage,\r\n pageNumber: initialState.index.pageNumber,\r\n },\r\n }),\r\n setFilter: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: action.payload,\r\n }),\r\n removeFilter: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: {\r\n ...state.filter,\r\n [action.payload]: undefined,\r\n },\r\n }),\r\n },\r\n extraReducers: (builder) => {\r\n builder.addCase(successfulLogin, (state) => ({\r\n ...state,\r\n index: {\r\n itemsPerPage: state.index.itemsPerPage,\r\n pageNumber: initialState.index.pageNumber,\r\n },\r\n }));\r\n },\r\n});\r\n\r\nexport const {\r\n setPaymentIndex,\r\n resetPaymentIdices,\r\n setFilter,\r\n removeFilter,\r\n} = paymentsSlice.actions;\r\n\r\nexport default paymentsSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { PageIndex } from \"../../models\";\r\nimport { successfulLogin } from \"../../auth/authDataSlice\";\r\nimport { CtrlGoodsFilter } from \"./types\";\r\n\r\ntype CtrlGoodsPageState = {\r\n index: PageIndex;\r\n filter: CtrlGoodsFilter;\r\n};\r\n\r\nexport const initialState: CtrlGoodsPageState = {\r\n index: {\r\n itemsPerPage: 20,\r\n pageNumber: 0,\r\n },\r\n filter: {},\r\n};\r\n\r\nconst name = \"controls\";\r\n\r\nconst controlsSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setControlIndex: (state, action: PayloadAction) => ({\r\n ...state,\r\n index: action.payload,\r\n }),\r\n resetControlIdices: (state) => ({\r\n ...state,\r\n index: {\r\n itemsPerPage: state.index.itemsPerPage,\r\n pageNumber: initialState.index.pageNumber,\r\n },\r\n }),\r\n setFilter: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: action.payload,\r\n }),\r\n removeFilter: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: {\r\n ...state.filter,\r\n [action.payload]: undefined,\r\n },\r\n }),\r\n\r\n },\r\n extraReducers: (builder) => {\r\n builder.addCase(successfulLogin, (state) => ({\r\n ...state,\r\n index: {\r\n itemsPerPage: state.index.itemsPerPage,\r\n pageNumber: initialState.index.pageNumber,\r\n },\r\n }));\r\n },\r\n});\r\n\r\nexport const {\r\n setControlIndex,\r\n resetControlIdices,\r\n setFilter,\r\n removeFilter,\r\n} = controlsSlice.actions;\r\n\r\nexport default controlsSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { PageIndex } from \"../../models\";\r\nimport { successfulLogin } from \"../../auth/authDataSlice\";\r\nimport { DeliveryFilter } from \"./types\";\r\n\r\ntype DeliveryPageState = {\r\n index: PageIndex;\r\n filter: DeliveryFilter;\r\n};\r\n\r\nexport const initialState: DeliveryPageState = {\r\n index: {\r\n itemsPerPage: 20,\r\n pageNumber: 0,\r\n },\r\n filter: {},\r\n};\r\n\r\nconst name = \"deliveries\";\r\n\r\nconst deliveriesSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setDeliveryIndex: (state, action: PayloadAction) => ({\r\n ...state,\r\n index: action.payload,\r\n }),\r\n resetDeliveryIdices: (state) => ({\r\n ...state,\r\n index: {\r\n itemsPerPage: state.index.itemsPerPage,\r\n pageNumber: initialState.index.pageNumber,\r\n },\r\n }),\r\n setFilter: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: action.payload,\r\n }),\r\n removeFilter: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: {\r\n ...state.filter,\r\n [action.payload]: undefined,\r\n },\r\n }),\r\n\r\n },\r\n extraReducers: (builder) => {\r\n builder.addCase(successfulLogin, (state) => ({\r\n ...state,\r\n index: {\r\n itemsPerPage: state.index.itemsPerPage,\r\n pageNumber: initialState.index.pageNumber,\r\n },\r\n }));\r\n },\r\n});\r\n\r\nexport const {\r\n setDeliveryIndex,\r\n resetDeliveryIdices,\r\n setFilter,\r\n removeFilter,\r\n} = deliveriesSlice.actions;\r\n\r\nexport default deliveriesSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { PageIndex } from \"../../models\";\r\nimport { successfulLogin } from \"../../auth/authDataSlice\";\r\nimport { DisputeFilter } from \"./types\";\r\n\r\ntype DisputePageState = {\r\n index: PageIndex;\r\n filter: DisputeFilter;\r\n};\r\n\r\nexport const initialState: DisputePageState = {\r\n index: {\r\n itemsPerPage: 20,\r\n pageNumber: 0,\r\n },\r\n filter: {},\r\n};\r\n\r\nconst name = \"disputes\";\r\n\r\nconst disputesSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setDisputeIndex: (state, action: PayloadAction) => ({\r\n ...state,\r\n index: action.payload,\r\n }),\r\n resetDisputeIdices: (state) => ({\r\n ...state,\r\n index: {\r\n itemsPerPage: state.index.itemsPerPage,\r\n pageNumber: initialState.index.pageNumber,\r\n },\r\n }),\r\n setFilter: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: action.payload,\r\n }),\r\n removeFilter: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: {\r\n ...state.filter,\r\n [action.payload]: undefined,\r\n },\r\n }),\r\n\r\n },\r\n extraReducers: (builder) => {\r\n builder.addCase(successfulLogin, (state) => ({\r\n ...state,\r\n index: {\r\n itemsPerPage: state.index.itemsPerPage,\r\n pageNumber: initialState.index.pageNumber,\r\n },\r\n }));\r\n },\r\n});\r\n\r\nexport const {\r\n setDisputeIndex,\r\n resetDisputeIdices,\r\n setFilter,\r\n removeFilter,\r\n} = disputesSlice.actions;\r\n\r\nexport default disputesSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { PageIndex } from \"../../models\";\r\nimport { successfulLogin } from \"../../auth/authDataSlice\";\r\nimport { GuaranteeFilter } from \"./types\";\r\n\r\ntype GuaranteePageState = {\r\n index: PageIndex;\r\n filter: GuaranteeFilter;\r\n};\r\n\r\nexport const initialState: GuaranteePageState = {\r\n index: {\r\n itemsPerPage: 20,\r\n pageNumber: 0,\r\n },\r\n filter: {\r\n status: {\r\n ftValue: -1,\r\n ftDescr: \"\",\r\n },\r\n },\r\n};\r\n\r\nconst name = \"guarantees\";\r\n\r\nconst guaranteesSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setGuaranteeIndex: (state, action: PayloadAction) => ({\r\n ...state,\r\n index: action.payload,\r\n }),\r\n resetGuaranteeIdices: (state) => ({\r\n ...state,\r\n index: {\r\n itemsPerPage: state.index.itemsPerPage,\r\n pageNumber: initialState.index.pageNumber,\r\n },\r\n }),\r\n setFilter: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: action.payload,\r\n }),\r\n removeFilter: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: {\r\n ...state.filter,\r\n [action.payload]: undefined,\r\n },\r\n }),\r\n },\r\n extraReducers: (builder) => {\r\n builder.addCase(successfulLogin, (state) => ({\r\n ...state,\r\n index: {\r\n itemsPerPage: state.index.itemsPerPage,\r\n pageNumber: initialState.index.pageNumber,\r\n },\r\n }));\r\n },\r\n});\r\n\r\nexport const {\r\n setGuaranteeIndex,\r\n resetGuaranteeIdices,\r\n setFilter,\r\n removeFilter,\r\n} = guaranteesSlice.actions;\r\n\r\nexport default guaranteesSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { PageIndex } from \"../../models\";\r\nimport { successfulLogin } from \"../../auth/authDataSlice\";\r\nimport { TradeFilter } from \"../../trading/trades/types\";\r\n\r\ntype TradePageState = {\r\n\tindex: PageIndex;\r\n\tfilter: TradeFilter;\r\n};\r\n\r\nexport const initialState: TradePageState = {\r\n\tindex: {\r\n\t\titemsPerPage: 20,\r\n\t\tpageNumber: 0,\r\n\t},\r\n\tfilter: {},\r\n};\r\n\r\nconst name = \"TAStrades\";\r\n\r\nconst tasTradesSlice = createSlice({\r\n\tname,\r\n\tinitialState,\r\n\treducers: {\r\n\t\tsetTradesIndex: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tindex: action.payload,\r\n\t\t}),\r\n\t\tresetTradeIdices: state => ({\r\n\t\t\t...state,\r\n\t\t\tindex: {\r\n\t\t\t\titemsPerPage: state.index.itemsPerPage,\r\n\t\t\t\tpageNumber: initialState.index.pageNumber,\r\n\t\t\t},\r\n\t\t}),\r\n\t\tsetFilter: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tfilter: action.payload,\r\n\t\t}),\r\n\t\tremoveFilter: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tfilter: {\r\n\t\t\t\t...state.filter,\r\n\t\t\t\t[action.payload]: undefined,\r\n\t\t\t},\r\n\t\t}),\r\n\t},\r\n\textraReducers: builder => {\r\n\t\tbuilder.addCase(successfulLogin, (state, action) => ({\r\n\t\t\t...state,\r\n\t\t\tindex: {\r\n\t\t\t\titemsPerPage: state.index.itemsPerPage,\r\n\t\t\t\tpageNumber: initialState.index.pageNumber,\r\n\t\t\t},\r\n\t\t\tfilter: {\r\n\t\t\t\t...state.filter,\r\n\t\t\t\ttradeStatus: action.payload.tradeStatuses.find(s => s.ftValue === 1)\r\n\t\t\t}\r\n\t\t}));\r\n\t},\r\n});\r\n\r\nexport const { setTradesIndex, resetTradeIdices, setFilter, removeFilter } = tasTradesSlice.actions;\r\n\r\nexport default tasTradesSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { PageIndex } from \"../../models\";\r\nimport { successfulLogin } from \"../../auth/authDataSlice\";\r\nimport { TradingDataFilter } from \"./types\";\r\n\r\ntype TradingDataPageState = {\r\n index: PageIndex;\r\n filter: TradingDataFilter;\r\n};\r\n\r\nexport const initialState: TradingDataPageState = {\r\n index: {\r\n itemsPerPage: 20,\r\n pageNumber: 0,\r\n },\r\n filter: {\r\n datefrom: new Date().toISOString(),\r\n dateto: new Date().toISOString(),\r\n reportDate: new Date().toISOString(),\r\n },\r\n};\r\n\r\nconst name = \"tradingData\";\r\n\r\nconst tradingDataSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setTradingDateIndex: (state, action: PayloadAction) => ({\r\n ...state,\r\n index: action.payload,\r\n }),\r\n resetTradingDateIdices: (state) => ({\r\n ...state,\r\n index: {\r\n itemsPerPage: state.index.itemsPerPage,\r\n pageNumber: initialState.index.pageNumber,\r\n },\r\n }),\r\n setFilter: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: action.payload,\r\n }),\r\n removeFilter: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: {\r\n ...state.filter,\r\n [action.payload]: undefined,\r\n },\r\n }),\r\n setReportData: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: {...state.filter,\r\n reportDate: action.payload,\r\n datefrom: action.payload,\r\n dateto: action.payload,\r\n },\r\n }),\r\n\r\n },\r\n \r\n extraReducers: (builder) => {\r\n builder.addCase(successfulLogin, (state) => ({\r\n ...state,\r\n index: {\r\n itemsPerPage: state.index.itemsPerPage,\r\n pageNumber: initialState.index.pageNumber,\r\n },\r\n }));\r\n },\r\n});\r\n\r\nexport const {\r\n setTradingDateIndex,\r\n resetTradingDateIdices,\r\n setFilter,\r\n removeFilter,\r\n setReportData,\r\n} = tradingDataSlice.actions;\r\n\r\nexport default tradingDataSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { PageIndex } from \"../../models\";\r\nimport { successfulLogin } from \"../../auth/authDataSlice\";\r\nimport { MarginsDataFilter } from \"./types\";\r\n\r\ntype MarginsDataPageState = {\r\n index: PageIndex;\r\n filter: MarginsDataFilter;\r\n};\r\n\r\nexport const initialState: MarginsDataPageState = {\r\n index: {\r\n itemsPerPage: 20,\r\n pageNumber: 0,\r\n },\r\n filter: {\r\n datefrom: new Date().toISOString(),\r\n dateto: new Date().toISOString(),\r\n reportDate: new Date().toISOString(),\r\n },\r\n};\r\n\r\nconst name = \"marginsData\";\r\n\r\nconst marginsDataSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setMarginsDateIndex: (state, action: PayloadAction) => ({\r\n ...state,\r\n index: action.payload,\r\n }),\r\n resetMarginsDateIdices: (state) => ({\r\n ...state,\r\n index: {\r\n itemsPerPage: state.index.itemsPerPage,\r\n pageNumber: initialState.index.pageNumber,\r\n },\r\n }),\r\n setFilter: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: action.payload,\r\n }),\r\n removeFilter: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: {\r\n ...state.filter,\r\n [action.payload]: undefined,\r\n },\r\n }),\r\n setReportData: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: {...state.filter,\r\n reportDate: action.payload,\r\n datefrom: action.payload,\r\n dateto: action.payload,\r\n },\r\n }),\r\n\r\n },\r\n extraReducers: (builder) => {\r\n builder.addCase(successfulLogin, (state) => ({\r\n ...state,\r\n index: {\r\n itemsPerPage: state.index.itemsPerPage,\r\n pageNumber: initialState.index.pageNumber,\r\n },\r\n }));\r\n },\r\n});\r\n\r\nexport const {\r\n setMarginsDateIndex,\r\n resetMarginsDateIdices,\r\n setFilter,\r\n removeFilter,\r\n setReportData,\r\n} = marginsDataSlice.actions;\r\n\r\nexport default marginsDataSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { PageIndex } from \"../../models\";\r\nimport { successfulLogin } from \"../../auth/authDataSlice\";\r\nimport { BankGuaranteeFilter } from \"./types\";\r\n\r\ntype BankGuaranteePageState = {\r\n index: PageIndex;\r\n filter: BankGuaranteeFilter;\r\n};\r\n\r\nexport const initialState: BankGuaranteePageState = {\r\n index: {\r\n itemsPerPage: 20,\r\n pageNumber: 0,\r\n },\r\n filter: {\r\n status: {\r\n ftValue: -1,\r\n ftDescr: \"\",\r\n },\r\n },\r\n};\r\n\r\nconst name = \"bankguarantees\";\r\n\r\nconst bankguaranteesSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setBankGuaranteeIndex: (state, action: PayloadAction) => ({\r\n ...state,\r\n index: action.payload,\r\n }),\r\n resetBankGuaranteeIdices: (state) => ({\r\n ...state,\r\n index: {\r\n itemsPerPage: state.index.itemsPerPage,\r\n pageNumber: initialState.index.pageNumber,\r\n },\r\n }),\r\n setFilter: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: action.payload,\r\n }),\r\n removeFilter: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: {\r\n ...state.filter,\r\n [action.payload]: undefined,\r\n },\r\n }),\r\n },\r\n extraReducers: (builder) => {\r\n builder.addCase(successfulLogin, (state) => ({\r\n ...state,\r\n index: {\r\n itemsPerPage: state.index.itemsPerPage,\r\n pageNumber: initialState.index.pageNumber,\r\n },\r\n }));\r\n },\r\n});\r\n\r\nexport const {\r\n setBankGuaranteeIndex,\r\n resetBankGuaranteeIdices,\r\n setFilter,\r\n removeFilter,\r\n} = bankguaranteesSlice.actions;\r\n\r\nexport default bankguaranteesSlice.reducer;\r\n","import { combineReducers } from \"@reduxjs/toolkit\";\r\nimport payments from \"./payments/paymentsUXSlice\";\r\nimport controls from \"./ctrlgoods/ctrlGoodsUXSlice\";\r\nimport deliveries from \"./delivery/deliveryUXSlice\";\r\nimport disputes from \"./dispute/disputeUXSlice\";\r\nimport guarantees from \"./guarantees/guaranteesUXSlice\";\r\nimport transportAndStorage from \"./transportAndStorage/TASUXSlice\";\r\nimport tradingData from \"./tradingData/tradingUXSlice\";\r\nimport marginsData from \"./marginsData/marginsUXSlice\";\r\nimport bankguarantees from \"./bankguarantees/bankguaranteesUXSlice\";\r\n\r\nexport default combineReducers({\r\n payments,\r\n controls,\r\n deliveries,\r\n disputes,\r\n guarantees,\r\n transportAndStorage,\r\n tradingData,\r\n marginsData,\r\n bankguarantees,\r\n});","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { PageIndex, OrderFilter } from \"../../models\";\r\nimport { successfulLogin } from \"../../auth/authDataSlice\";\r\n\r\ntype OrderPageState = {\r\n\tindex: PageIndex;\r\n\tfilter: OrderFilter;\r\n};\r\n\r\nexport const initialState: OrderPageState = {\r\n\tindex: {\r\n\t\titemsPerPage: 20,\r\n\t\tpageNumber: 0,\r\n\t},\r\n\tfilter: {\r\n\t\torderStatus: {\r\n\t\t\tftValue: 0,\r\n\t\t\tftDescr: \"\"\r\n\t\t}\r\n\t},\r\n};\r\n\r\nconst name = \"ordersReport\";\r\n\r\nconst ordersSlice = createSlice({\r\n\tname,\r\n\tinitialState,\r\n\treducers: {\r\n\t\tsetOrdersIndex: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tindex: action.payload,\r\n\t\t}),\r\n\t\tresetOrderIdices: state => ({\r\n\t\t\t...state,\r\n\t\t\tindex: {\r\n\t\t\t\titemsPerPage: state.index.itemsPerPage,\r\n\t\t\t\tpageNumber: initialState.index.pageNumber,\r\n\t\t\t},\r\n\t\t}),\r\n\t\tsetFilter: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tfilter: action.payload,\r\n\t\t}),\r\n\t\tremoveFilter: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tfilter: {\r\n\t\t\t\t...state.filter,\r\n\t\t\t\t[action.payload]: undefined,\r\n\t\t\t},\r\n\t\t}),\r\n\t},\r\n\textraReducers: builder => {\r\n\t\tbuilder.addCase(successfulLogin, state => ({\r\n\t\t\t...state,\r\n\t\t\tindex: {\r\n\t\t\t\titemsPerPage: state.index.itemsPerPage,\r\n\t\t\t\tpageNumber: initialState.index.pageNumber,\r\n\t\t\t},\r\n\t\t}));\r\n\t},\r\n});\r\n\r\nexport const { setOrdersIndex, resetOrderIdices, setFilter, removeFilter } = ordersSlice.actions;\r\n\r\nexport default ordersSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { PageIndex } from \"../../models\";\r\nimport { successfulLogin } from \"../../auth/authDataSlice\";\r\nimport { TradeFilter } from \"../../trading/trades/types\";\r\n\r\ntype TradesReportState = {\r\n\tindex: PageIndex;\r\n\tfilter: TradeFilter;\r\n};\r\n\r\nexport const initialState: TradesReportState = {\r\n\tindex: {\r\n\t\titemsPerPage: 20,\r\n\t\tpageNumber: 0,\r\n\t},\r\n\tfilter: {},\r\n};\r\n\r\nconst name = \"tradesReport\";\r\n\r\nconst tradesSlice = createSlice({\r\n\tname,\r\n\tinitialState,\r\n\treducers: {\r\n\t\tsetIndex: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tindex: action.payload,\r\n\t\t}),\r\n\t\tresetIndex: state => ({\r\n\t\t\t...state,\r\n\t\t\tindex: {\r\n\t\t\t\titemsPerPage: state.index.itemsPerPage,\r\n\t\t\t\tpageNumber: initialState.index.pageNumber,\r\n\t\t\t},\r\n\t\t}),\r\n\t\tsetFilter: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tfilter: action.payload,\r\n\t\t}),\r\n\t\tremoveFilter: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tfilter: {\r\n\t\t\t\t...state.filter,\r\n\t\t\t\t[action.payload]: undefined,\r\n\t\t\t},\r\n\t\t}),\r\n\t},\r\n\textraReducers: builder => {\r\n\t\tbuilder.addCase(successfulLogin, state => ({\r\n\t\t\t...state,\r\n\t\t\tindex: {\r\n\t\t\t\titemsPerPage: state.index.itemsPerPage,\r\n\t\t\t\tpageNumber: initialState.index.pageNumber,\r\n\t\t\t},\r\n\t\t}));\r\n\t},\r\n});\r\n\r\nexport const { setIndex, resetIndex, setFilter, removeFilter } = tradesSlice.actions;\r\n\r\nexport default tradesSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { PageIndex } from \"../../models\";\r\nimport { successfulLogin } from \"../../auth/authDataSlice\";\r\nimport { TradeFilter } from \"../../trading/trades/types\";\r\n\r\ntype TradesReportState = {\r\n\tindex: PageIndex;\r\n\tfilter: TradeFilter;\r\n};\r\n\r\nexport const initialState: TradesReportState = {\r\n\tindex: {\r\n\t\titemsPerPage: 20,\r\n\t\tpageNumber: 0,\r\n\t},\r\n\tfilter: {},\r\n};\r\n\r\nconst name = \"tradesReportAll\";\r\n\r\nconst tradesSliceAll = createSlice({\r\n\tname,\r\n\tinitialState,\r\n\treducers: {\r\n\t\tsetIndex: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tindex: action.payload,\r\n\t\t}),\r\n\t\tresetIndex: state => ({\r\n\t\t\t...state,\r\n\t\t\tindex: {\r\n\t\t\t\titemsPerPage: state.index.itemsPerPage,\r\n\t\t\t\tpageNumber: initialState.index.pageNumber,\r\n\t\t\t},\r\n\t\t}),\r\n\t\tsetFilter: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tfilter: action.payload,\r\n\t\t}),\r\n\t\tremoveFilter: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tfilter: {\r\n\t\t\t\t...state.filter,\r\n\t\t\t\t[action.payload]: undefined,\r\n\t\t\t},\r\n\t\t}),\r\n\t},\r\n\textraReducers: builder => {\r\n\t\tbuilder.addCase(successfulLogin, state => ({\r\n\t\t\t...state,\r\n\t\t\tindex: {\r\n\t\t\t\titemsPerPage: state.index.itemsPerPage,\r\n\t\t\t\tpageNumber: initialState.index.pageNumber,\r\n\t\t\t},\r\n\t\t}));\r\n\t},\r\n});\r\n\r\nexport const { setIndex, resetIndex, setFilter, removeFilter } = tradesSliceAll.actions;\r\n\r\nexport default tradesSliceAll.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { TradeFilter } from \"../../trading/trades/types\";\r\nimport { DailyTradingReportFilter } from \"./types\";\r\nimport { PageIndex } from \"../../models\";\r\n\r\ntype TradesReportState = {\r\n filter: DailyTradingReportFilter;\r\n index: PageIndex;\r\n};\r\n\r\nexport const initialState: TradesReportState = {\r\n filter: {\r\n reportDate: new Date().toISOString(),\r\n },\r\n index: {\r\n itemsPerPage: 20,\r\n pageNumber: 0,\r\n },\r\n};\r\n\r\nconst name = \"dailyTrade\";\r\n\r\nconst dailyTrade = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setIndex: (state, action: PayloadAction) => ({\r\n ...state,\r\n index: action.payload,\r\n }),\r\n setReportData: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: {\r\n reportDate: action.payload,\r\n },\r\n }),\r\n removeFilter: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: {\r\n ...state.filter,\r\n [action.payload]: undefined,\r\n },\r\n }),\r\n },\r\n});\r\n\r\nexport const { setReportData, removeFilter, setIndex } = dailyTrade.actions;\r\n\r\nexport default dailyTrade.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { TradeFilter } from \"../../trading/trades/types\";\r\nimport { WeeklyTradingReportFilter } from \"./types\";\r\nimport { PageIndex } from \"../../models\";\r\n\r\ntype TradesReportState = {\r\n filter: WeeklyTradingReportFilter;\r\n index: PageIndex;\r\n};\r\n\r\nexport const initialState: TradesReportState = {\r\n filter: {\r\n numofweeks: 8,\r\n },\r\n index: {\r\n itemsPerPage: 20,\r\n pageNumber: 0,\r\n },\r\n};\r\n\r\nconst name = \"weeklyTrade\";\r\n\r\nconst weeklyTrade = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setIndex: (state, action: PayloadAction) => ({\r\n ...state,\r\n index: action.payload,\r\n }),\r\n setReportData: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: {\r\n numofweeks: action.payload,\r\n },\r\n }),\r\n setReportWeek: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: {\r\n ...state.filter,\r\n yearPart: action.payload,\r\n },\r\n }),\r\n setReportYear: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: {\r\n ...state.filter,\r\n year: action.payload,\r\n },\r\n }),\r\n setFilter: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: {\r\n ...state.filter,\r\n numofweeks: action.payload,\r\n },\r\n }),\r\n removeFilter: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: {\r\n ...state.filter,\r\n [action.payload]: undefined,\r\n },\r\n }),\r\n },\r\n});\r\n\r\nexport const {\r\n setReportData,\r\n setReportWeek,\r\n setReportYear,\r\n setFilter,\r\n removeFilter,\r\n setIndex,\r\n} = weeklyTrade.actions;\r\n\r\nexport default weeklyTrade.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { TradeFilter } from \"../../trading/trades/types\";\r\nimport { MonthlyTradingReportFilter } from \"./types\";\r\nimport { PageIndex } from \"../../models\";\r\n\r\ntype TradesReportState = {\r\n filter: MonthlyTradingReportFilter;\r\n index: PageIndex;\r\n};\r\n\r\nexport const initialState: TradesReportState = {\r\n filter: {\r\n numofmonths: 12,\r\n },\r\n index: {\r\n itemsPerPage: 20,\r\n pageNumber: 0,\r\n },\r\n};\r\n\r\nconst name = \"monthlyTrade\";\r\n\r\nconst monthlyTrade = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setIndex: (state, action: PayloadAction) => ({\r\n ...state,\r\n index: action.payload,\r\n }),\r\n setReportData: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: {\r\n numofmonths: action.payload,\r\n },\r\n }),\r\n setReportMonth: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: {\r\n ...state.filter,\r\n month: action.payload,\r\n },\r\n }),\r\n setReportYear: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: {\r\n ...state.filter,\r\n year: action.payload,\r\n },\r\n }),\r\n setFilter: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: {\r\n ...state.filter,\r\n numofmonths: action.payload,\r\n },\r\n }),\r\n removeFilter: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: {\r\n ...state.filter,\r\n [action.payload]: undefined,\r\n },\r\n }),\r\n },\r\n});\r\n\r\nexport const {\r\n setReportData,\r\n setReportMonth,\r\n setReportYear,\r\n setFilter,\r\n removeFilter,\r\n setIndex,\r\n} = monthlyTrade.actions;\r\n\r\nexport default monthlyTrade.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { TradeFilter } from \"../../trading/trades/types\";\r\nimport { AnnualTradingReportFilter } from \"./types\";\r\nimport { PageIndex } from \"../../models\";\r\n\r\ntype TradesReportState = {\r\n filter: AnnualTradingReportFilter;\r\n index: PageIndex;\r\n};\r\n\r\nexport const initialState: TradesReportState = {\r\n filter: {\r\n numofyears: 10,\r\n },\r\n index: {\r\n itemsPerPage: 20,\r\n pageNumber: 0,\r\n }\r\n};\r\n\r\nconst name = \"annualTrade\";\r\n\r\nconst annualTrade = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setIndex: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tindex: action.payload,\r\n\t\t}),\r\n setReportData: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: {\r\n numofyears: action.payload,\r\n },\r\n }),\r\n setReportYear: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: {\r\n ...state.filter,\r\n year: action.payload,\r\n },\r\n }),\r\n setFilter: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: {\r\n ...state.filter,\r\n numofyears: action.payload,\r\n },\r\n }),\r\n removeFilter: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: {\r\n ...state.filter,\r\n [action.payload]: undefined,\r\n },\r\n }),\r\n },\r\n});\r\n\r\nexport const {\r\n setReportData,\r\n setReportYear,\r\n setFilter,\r\n removeFilter,\r\n setIndex,\r\n} = annualTrade.actions;\r\n\r\nexport default annualTrade.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { MonthlyTradingReportFilter } from \"./types\";\r\nimport { PageIndex } from \"../../../models\";\r\n\r\ntype TradesReportState = {\r\n filter: MonthlyTradingReportFilter;\r\n index: PageIndex;\r\n};\r\n\r\nconst now = new Date();\r\nexport const initialState: TradesReportState = {\r\n filter: {\r\n month: now.getMonth() + 1,\r\n year: now.getFullYear(),\r\n },\r\n index: {\r\n itemsPerPage: 20,\r\n pageNumber: 0,\r\n },\r\n};\r\n\r\nconst name = \"SECMonthlyTradeUX\";\r\n\r\nconst monthlyTrade = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setIndex: (state, action: PayloadAction) => ({\r\n ...state,\r\n index: action.payload,\r\n }),\r\n setReportMonth: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: {\r\n ...state.filter,\r\n month: action.payload,\r\n },\r\n }),\r\n setReportYear: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: {\r\n ...state.filter,\r\n year: action.payload,\r\n },\r\n }),\r\n },\r\n});\r\n\r\nexport const { setReportMonth, setReportYear, setIndex } = monthlyTrade.actions;\r\n\r\nexport default monthlyTrade.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { TradeFilter } from \"../../../trading/trades/types\";\r\nimport { DailySecurityReportFilter } from \"./types\";\r\nimport { PageIndex } from \"../../../models\";\r\n\r\ntype TradesReportState = {\r\n filter: DailySecurityReportFilter;\r\n index: PageIndex;\r\n};\r\n\r\nexport const initialState: TradesReportState = {\r\n filter: {\r\n reportDate: new Date().toISOString(),\r\n },\r\n index: {\r\n itemsPerPage: 20,\r\n pageNumber: 0,\r\n },\r\n};\r\n\r\nconst name = \"dailySecurity\";\r\n\r\nconst dailySecuritySlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setIndex: (state, action: PayloadAction) => ({\r\n ...state,\r\n index: action.payload,\r\n }),\r\n setReportData: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: {\r\n reportDate: action.payload,\r\n },\r\n }),\r\n removeFilter: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: {\r\n ...state.filter,\r\n [action.payload]: undefined,\r\n },\r\n }),\r\n },\r\n});\r\n\r\nexport const {\r\n setReportData,\r\n removeFilter,\r\n setIndex,\r\n} = dailySecuritySlice.actions;\r\n\r\nexport default dailySecuritySlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { AnnualSecurityReportFilter } from \"./types\";\r\nimport { PageIndex } from \"../../../models\";\r\n\r\ntype TradesReportState = {\r\n filter: AnnualSecurityReportFilter;\r\n index: PageIndex;\r\n};\r\n\r\nconst now = new Date();\r\nexport const initialState: TradesReportState = {\r\n filter: {\r\n year: now.getFullYear(),\r\n },\r\n index: {\r\n itemsPerPage: 20,\r\n pageNumber: 0,\r\n },\r\n};\r\n\r\nconst name = \"annualSecurity\";\r\n\r\nconst annualSecuritySlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setIndex: (state, action: PayloadAction) => ({\r\n ...state,\r\n index: action.payload,\r\n }),\r\n setReportYear: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: {\r\n ...state.filter,\r\n year: action.payload,\r\n },\r\n }),\r\n },\r\n});\r\n\r\nexport const { setReportYear, setIndex } = annualSecuritySlice.actions;\r\n\r\nexport default annualSecuritySlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { QuarterlySecurityReportFilter } from \"./types\";\r\nimport { PageIndex } from \"../../../models\";\r\n\r\ntype TradesReportState = {\r\n filter: QuarterlySecurityReportFilter;\r\n index: PageIndex;\r\n};\r\n\r\nconst now = new Date();\r\nexport const initialState: TradesReportState = {\r\n filter: {\r\n year: now.getFullYear(),\r\n // qtnumber: Math.floor((now.getMonth() + 1) / 3) + 1,\r\n qtnumber: Math.floor((now.getMonth() -1) / 3) + 1,\r\n },\r\n index: {\r\n itemsPerPage: 20,\r\n pageNumber: 0,\r\n },\r\n};\r\n\r\nconst name = \"quarterlySecurity\";\r\n\r\nconst quarterlySecuritySlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setIndex: (state, action: PayloadAction) => ({\r\n ...state,\r\n index: action.payload,\r\n }),\r\n setReportYear: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: {\r\n ...state.filter,\r\n year: action.payload,\r\n },\r\n }),\r\n\r\n setReportQuarter: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: {\r\n ...state.filter,\r\n qtnumber: action.payload,\r\n },\r\n }),\r\n },\r\n});\r\n\r\nexport const {\r\n setReportYear,\r\n setReportQuarter,\r\n setIndex,\r\n} = quarterlySecuritySlice.actions;\r\n\r\nexport default quarterlySecuritySlice.reducer;\r\n","import { combineReducers } from \"@reduxjs/toolkit\";\r\nimport monthlyTrade from \"./monthlyTrade/monthlyTradeUXSlice\";\r\nimport dailySecurity from \"./securityDaily/dailySecurityUXSlice\";\r\nimport annualSecurity from \"./securityAnnual/annualSecurityUXSlice\";\r\nimport quarterlylSecurity from \"./securityQuarterly/quarterlySecurityUXSlice\";\r\n\r\nconst securityCommissionReportUXReduer = combineReducers({\r\n\tmonthlyTrade,\r\n\tdailySecurity,\r\n\tannualSecurity,\r\n\tquarterlylSecurity,\r\n});\r\n\r\nexport default securityCommissionReportUXReduer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { PageIndex } from \"../../models\";\r\nimport { successfulLogin } from \"../../auth/authDataSlice\";\r\nimport { AntiLaunderingReportFilter } from \"./types\";\r\n\r\ntype PaymentPageState = {\r\n index: PageIndex;\r\n filter: AntiLaunderingReportFilter;\r\n};\r\n\r\nconst now = new Date();\r\nexport const initialState: PaymentPageState = {\r\n index: {\r\n itemsPerPage: 20,\r\n pageNumber: 0,\r\n },\r\n filter: {\r\n limit: 15000,\r\n dateto: now.toISOString(),\r\n datefrom: new Date(now.getFullYear(), 0, 1).toISOString(),\r\n },\r\n};\r\n\r\nconst name = \"antiLaundering\";\r\n\r\nconst antiLaunderingSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setIndex: (state, action: PayloadAction) => ({\r\n ...state,\r\n index: action.payload,\r\n }),\r\n resetPaymentIdices: (state) => ({\r\n ...state,\r\n index: {\r\n itemsPerPage: state.index.itemsPerPage,\r\n pageNumber: initialState.index.pageNumber,\r\n },\r\n }),\r\n setFilter: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: action.payload,\r\n }),\r\n removeFilter: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n filter: {\r\n ...state.filter,\r\n [action.payload]: undefined,\r\n },\r\n }),\r\n },\r\n extraReducers: (builder) => {\r\n builder.addCase(successfulLogin, (state) => ({\r\n ...state,\r\n index: {\r\n itemsPerPage: state.index.itemsPerPage,\r\n pageNumber: initialState.index.pageNumber,\r\n },\r\n }));\r\n },\r\n});\r\n\r\nexport const {\r\n setIndex,\r\n resetPaymentIdices,\r\n setFilter,\r\n removeFilter,\r\n} = antiLaunderingSlice.actions;\r\n\r\nexport default antiLaunderingSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { PageIndex } from \"../../../models\";\r\nimport { successfulLogin } from \"../../../auth/authDataSlice\";\r\nimport { TradeReviewReportFilter } from \"./types\";\r\n\r\ntype PaymentPageState = {\r\n index: PageIndex;\r\n filter: TradeReviewReportFilter;\r\n};\r\n\r\nconst now = new Date();\r\nexport const initialState: PaymentPageState = {\r\n index: {\r\n itemsPerPage: 20,\r\n pageNumber: 0,\r\n },\r\n filter: {\r\n dateto: now.toISOString(),\r\n datefrom: new Date(now.getFullYear(), 0, 1).toISOString(),\r\n productid: \"\",\r\n },\r\n};\r\n\r\nconst name = \"tradeReview\";\r\n\r\nconst tradeReviewSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setIndex: (state, action: PayloadAction) => ({\r\n ...state,\r\n index: action.payload,\r\n }),\r\n resetPaymentIdices: (state) => ({\r\n ...state,\r\n index: {\r\n itemsPerPage: state.index.itemsPerPage,\r\n pageNumber: initialState.index.pageNumber,\r\n },\r\n }),\r\n setFilter: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: action.payload,\r\n }),\r\n removeFilter: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n filter: {\r\n ...state.filter,\r\n [action.payload]: undefined,\r\n },\r\n }),\r\n },\r\n extraReducers: (builder) => {\r\n builder.addCase(successfulLogin, (state) => ({\r\n ...state,\r\n index: {\r\n itemsPerPage: state.index.itemsPerPage,\r\n pageNumber: initialState.index.pageNumber,\r\n },\r\n }));\r\n },\r\n});\r\n\r\nexport const {\r\n setIndex,\r\n resetPaymentIdices,\r\n setFilter,\r\n removeFilter,\r\n} = tradeReviewSlice.actions;\r\n\r\nexport default tradeReviewSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { PageIndex } from \"../../../models\";\r\nimport { successfulLogin } from \"../../../auth/authDataSlice\";\r\nimport { TradeByProductsReportFilter } from \"./types\";\r\n\r\ntype PaymentPageState = {\r\n index: PageIndex;\r\n filter: TradeByProductsReportFilter;\r\n};\r\n\r\nconst now = new Date();\r\nexport const initialState: PaymentPageState = {\r\n index: {\r\n itemsPerPage: 20,\r\n pageNumber: 0,\r\n },\r\n filter: {\r\n dateto: now.toISOString(),\r\n datefrom: new Date(now.getFullYear(), 0, 1).toISOString(),\r\n },\r\n};\r\n\r\nconst name = \"tradeByProducts\";\r\n\r\nconst tradeByProductsSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setIndex: (state, action: PayloadAction) => ({\r\n ...state,\r\n index: action.payload,\r\n }),\r\n resetPaymentIdices: (state) => ({\r\n ...state,\r\n index: {\r\n itemsPerPage: state.index.itemsPerPage,\r\n pageNumber: initialState.index.pageNumber,\r\n },\r\n }),\r\n setFilter: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: action.payload,\r\n }),\r\n removeFilter: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n filter: {\r\n ...state.filter,\r\n [action.payload]: undefined,\r\n },\r\n }),\r\n },\r\n extraReducers: (builder) => {\r\n builder.addCase(successfulLogin, (state) => ({\r\n ...state,\r\n index: {\r\n itemsPerPage: state.index.itemsPerPage,\r\n pageNumber: initialState.index.pageNumber,\r\n },\r\n }));\r\n },\r\n});\r\n\r\nexport const {\r\n setIndex,\r\n resetPaymentIdices,\r\n setFilter,\r\n removeFilter,\r\n} = tradeByProductsSlice.actions;\r\n\r\nexport default tradeByProductsSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { PageIndex } from \"../../../models\";\r\nimport { successfulLogin } from \"../../../auth/authDataSlice\";\r\nimport { TradeByClientsReportFilter } from \"./types\";\r\n\r\ntype PaymentPageState = {\r\n index: PageIndex;\r\n filter: TradeByClientsReportFilter;\r\n};\r\n\r\nconst now = new Date();\r\nexport const initialState: PaymentPageState = {\r\n index: {\r\n itemsPerPage: 20,\r\n pageNumber: 0,\r\n },\r\n filter: {\r\n dateto: now.toISOString(),\r\n datefrom: new Date(now.getFullYear(), 0, 1).toISOString(),\r\n clientId: \"\",\r\n },\r\n};\r\n\r\nconst name = \"tradeByClients\";\r\n\r\nconst tradeByClientsSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setIndex: (state, action: PayloadAction) => ({\r\n ...state,\r\n index: action.payload,\r\n }),\r\n resetPaymentIdices: (state) => ({\r\n ...state,\r\n index: {\r\n itemsPerPage: state.index.itemsPerPage,\r\n pageNumber: initialState.index.pageNumber,\r\n },\r\n }),\r\n setFilter: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: action.payload,\r\n }),\r\n removeFilter: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n filter: {\r\n ...state.filter,\r\n [action.payload]: undefined,\r\n },\r\n }),\r\n },\r\n extraReducers: (builder) => {\r\n builder.addCase(successfulLogin, (state) => ({\r\n ...state,\r\n index: {\r\n itemsPerPage: state.index.itemsPerPage,\r\n pageNumber: initialState.index.pageNumber,\r\n },\r\n }));\r\n },\r\n});\r\n\r\nexport const {\r\n setIndex,\r\n resetPaymentIdices,\r\n setFilter,\r\n removeFilter,\r\n} = tradeByClientsSlice.actions;\r\n\r\nexport default tradeByClientsSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { PageIndex } from \"../../../models\";\r\nimport { successfulLogin } from \"../../../auth/authDataSlice\";\r\nimport { TurnoverByBrokersReportFilter } from \"./types\";\r\n\r\ntype PaymentPageState = {\r\n index: PageIndex;\r\n filter: TurnoverByBrokersReportFilter;\r\n};\r\n\r\nconst now = new Date();\r\nexport const initialState: PaymentPageState = {\r\n index: {\r\n itemsPerPage: 20,\r\n pageNumber: 0,\r\n },\r\n filter: {\r\n dateto: now.toISOString(),\r\n datefrom: new Date(now.getFullYear(), 0, 1).toISOString(),\r\n brokerId: \"\",\r\n },\r\n};\r\n\r\nconst name = \"tradeByBrokers\";\r\n\r\nconst tradeByBrokersSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setIndex: (state, action: PayloadAction) => ({\r\n ...state,\r\n index: action.payload,\r\n }),\r\n resetPaymentIdices: (state) => ({\r\n ...state,\r\n index: {\r\n itemsPerPage: state.index.itemsPerPage,\r\n pageNumber: initialState.index.pageNumber,\r\n },\r\n }),\r\n setFilter: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n filter: action.payload,\r\n }),\r\n removeFilter: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n filter: {\r\n ...state.filter,\r\n [action.payload]: undefined,\r\n },\r\n }),\r\n },\r\n extraReducers: (builder) => {\r\n builder.addCase(successfulLogin, (state) => ({\r\n ...state,\r\n index: {\r\n itemsPerPage: state.index.itemsPerPage,\r\n pageNumber: initialState.index.pageNumber,\r\n },\r\n }));\r\n },\r\n});\r\n\r\nexport const {\r\n setIndex,\r\n resetPaymentIdices,\r\n setFilter,\r\n removeFilter,\r\n} = tradeByBrokersSlice.actions;\r\n\r\nexport default tradeByBrokersSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { PageIndex } from \"../../../models\";\r\nimport { successfulLogin } from \"../../../auth/authDataSlice\";\r\nimport { WeightedPricesReportFilter } from \"./types\";\r\n\r\ntype PaymentPageState = {\r\n index: PageIndex;\r\n filter: WeightedPricesReportFilter;\r\n};\r\n\r\nconst now = new Date();\r\nexport const initialState: PaymentPageState = {\r\n index: {\r\n itemsPerPage: 20,\r\n pageNumber: 0,\r\n },\r\n filter: {\r\n dateto: now.toISOString(),\r\n datefrom: new Date(now.getFullYear(), 0, 1).toISOString(),\r\n productid: \"\",\r\n },\r\n};\r\n\r\nconst name = \"weightedPrices\";\r\n\r\nconst weightedPricesSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setIndex: (state, action: PayloadAction) => ({\r\n ...state,\r\n index: action.payload,\r\n }),\r\n resetPaymentIdices: (state) => ({\r\n ...state,\r\n index: {\r\n itemsPerPage: state.index.itemsPerPage,\r\n pageNumber: initialState.index.pageNumber,\r\n },\r\n }),\r\n setFilter: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: action.payload,\r\n }),\r\n removeFilter: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n filter: {\r\n ...state.filter,\r\n [action.payload]: undefined,\r\n },\r\n }),\r\n },\r\n extraReducers: (builder) => {\r\n builder.addCase(successfulLogin, (state) => ({\r\n ...state,\r\n index: {\r\n itemsPerPage: state.index.itemsPerPage,\r\n pageNumber: initialState.index.pageNumber,\r\n },\r\n }));\r\n },\r\n});\r\n\r\nexport const {\r\n setIndex,\r\n resetPaymentIdices,\r\n setFilter,\r\n removeFilter,\r\n} = weightedPricesSlice.actions;\r\n\r\nexport default weightedPricesSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { PageIndex } from \"../../../models\";\r\nimport { successfulLogin } from \"../../../auth/authDataSlice\";\r\nimport { BusinessActivitiesReportFilter } from \"./types\";\r\n\r\ntype PaymentPageState = {\r\n index: PageIndex;\r\n filter: BusinessActivitiesReportFilter;\r\n};\r\n\r\nconst now = new Date();\r\nexport const initialState: PaymentPageState = {\r\n index: {\r\n itemsPerPage: 20,\r\n pageNumber: 0,\r\n },\r\n filter: {\r\n dateto: now.toISOString(),\r\n datefrom: new Date(now.getFullYear(), 0, 1).toISOString(),\r\n },\r\n};\r\n\r\nconst name = \"businessActivities\";\r\n\r\nconst businessActivitiesSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setIndex: (state, action: PayloadAction) => ({\r\n ...state,\r\n index: action.payload,\r\n }),\r\n resetPaymentIdices: (state) => ({\r\n ...state,\r\n index: {\r\n itemsPerPage: state.index.itemsPerPage,\r\n pageNumber: initialState.index.pageNumber,\r\n },\r\n }),\r\n setFilter: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n filter: action.payload,\r\n }),\r\n removeFilter: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n filter: {\r\n ...state.filter,\r\n [action.payload]: undefined,\r\n },\r\n }),\r\n },\r\n extraReducers: (builder) => {\r\n builder.addCase(successfulLogin, (state) => ({\r\n ...state,\r\n index: {\r\n itemsPerPage: state.index.itemsPerPage,\r\n pageNumber: initialState.index.pageNumber,\r\n },\r\n }));\r\n },\r\n});\r\n\r\nexport const {\r\n setIndex,\r\n resetPaymentIdices,\r\n setFilter,\r\n removeFilter,\r\n} = businessActivitiesSlice.actions;\r\n\r\nexport default businessActivitiesSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { PageIndex } from \"../../../models\";\r\nimport { successfulLogin } from \"../../../auth/authDataSlice\";\r\nimport { ComReviewReportFilter } from \"./types\";\r\n\r\ntype PaymentPageState = {\r\n index: PageIndex;\r\n filter: ComReviewReportFilter;\r\n};\r\n\r\nconst now = new Date();\r\nexport const initialState: PaymentPageState = {\r\n index: {\r\n itemsPerPage: 20,\r\n pageNumber: 0,\r\n },\r\n filter: {\r\n dateto: now.toISOString(),\r\n datefrom: new Date(now.getFullYear(), 0, 1).toISOString(),\r\n },\r\n};\r\n\r\nconst name = \"commReview\";\r\n\r\nconst commReviewSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setIndex: (state, action: PayloadAction) => ({\r\n ...state,\r\n index: action.payload,\r\n }),\r\n resetPaymentIdices: (state) => ({\r\n ...state,\r\n index: {\r\n itemsPerPage: state.index.itemsPerPage,\r\n pageNumber: initialState.index.pageNumber,\r\n },\r\n }),\r\n setFilter: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: action.payload,\r\n }),\r\n removeFilter: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n filter: {\r\n ...state.filter,\r\n [action.payload]: undefined,\r\n },\r\n }),\r\n },\r\n extraReducers: (builder) => {\r\n builder.addCase(successfulLogin, (state) => ({\r\n ...state,\r\n index: {\r\n itemsPerPage: state.index.itemsPerPage,\r\n pageNumber: initialState.index.pageNumber,\r\n },\r\n }));\r\n },\r\n});\r\n\r\nexport const {\r\n setIndex,\r\n resetPaymentIdices,\r\n setFilter,\r\n removeFilter,\r\n} = commReviewSlice.actions;\r\n\r\nexport default commReviewSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { PageIndex } from \"../../../models\";\r\nimport { successfulLogin } from \"../../../auth/authDataSlice\";\r\n//import { BusinessActivitiesReportFilter } from \"./types\";\r\n\r\ntype PaymentPageState = {\r\n index: PageIndex;\r\n // filter: BusinessActivitiesReportFilter;\r\n};\r\n\r\nconst now = new Date();\r\nexport const initialState: PaymentPageState = {\r\n index: {\r\n itemsPerPage: 20,\r\n pageNumber: 0,\r\n },\r\n /* filter: {\r\n dateto: now.toISOString(),\r\n datefrom: new Date(now.getFullYear(), 0, 1).toISOString(),\r\n }, */\r\n};\r\n\r\nconst name = \"memberContracts\";\r\n\r\nconst memberContractsSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setIndex: (state, action: PayloadAction) => ({\r\n ...state,\r\n index: action.payload,\r\n }),\r\n resetPaymentIdices: (state) => ({\r\n ...state,\r\n index: {\r\n itemsPerPage: state.index.itemsPerPage,\r\n pageNumber: initialState.index.pageNumber,\r\n },\r\n }),\r\n /* setFilter: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n filter: action.payload,\r\n }),\r\n removeFilter: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n filter: {\r\n ...state.filter,\r\n [action.payload]: undefined,\r\n },\r\n }), */\r\n },\r\n extraReducers: (builder) => {\r\n builder.addCase(successfulLogin, (state) => ({\r\n ...state,\r\n index: {\r\n itemsPerPage: state.index.itemsPerPage,\r\n pageNumber: initialState.index.pageNumber,\r\n },\r\n }));\r\n },\r\n});\r\n\r\nexport const { setIndex, resetPaymentIdices } = memberContractsSlice.actions;\r\n\r\nexport default memberContractsSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { PageIndex } from \"../../../models\";\r\nimport { successfulLogin } from \"../../../auth/authDataSlice\";\r\nimport { ClientOverviewFilter, TableType } from \"./types\";\r\n\r\ntype ClientOverviewPageState = {\r\n\tindex: {\r\n\t\t[k in TableType]: PageIndex;\r\n\t};\r\n\tfilter: ClientOverviewFilter;\r\n};\r\n\r\nexport interface IndexArgument {\r\n\ttype: TableType;\r\n\tindex: PageIndex;\r\n}\r\n\r\nexport const initialState: ClientOverviewPageState = {\r\n\tindex: {\r\n\t\t[TableType.Orders]: {\r\n\t\t\titemsPerPage: 20,\r\n\t\t\tpageNumber: 0,\r\n\t\t},\r\n\t\t[TableType.Trades]: {\r\n\t\t\titemsPerPage: 20,\r\n\t\t\tpageNumber: 0,\r\n\t\t},\r\n\t\t[TableType.Deliveries]: {\r\n\t\t\titemsPerPage: 20,\r\n\t\t\tpageNumber: 0,\r\n\t\t},\r\n\t\t[TableType.Payments]: {\r\n\t\t\titemsPerPage: 20,\r\n\t\t\tpageNumber: 0,\r\n\t\t},\r\n\t},\r\n\tfilter: {\r\n\t},\r\n};\r\n\r\nconst name = \"clientOverview\";\r\n\r\nconst clientOverviewSlice = createSlice({\r\n\tname,\r\n\tinitialState,\r\n\treducers: {\r\n\t\tsetClientOverviewIndex: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tindex: {\r\n\t\t\t\t...state.index,\r\n\t\t\t\t[action.payload.type]: action.payload.index,\r\n\t\t\t},\r\n\t\t}),\r\n\t\tresetClientOverviewIdices: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tindex: {\r\n\t\t\t\t...state.index,\r\n\t\t\t\t[action.payload]: {\r\n\t\t\t\t\titemsPerPage: state.index[action.payload].itemsPerPage,\r\n\t\t\t\t\tpageNumber: initialState.index[action.payload].pageNumber,\r\n\t\t\t\t},\r\n\t\t\t},\r\n\t\t}),\r\n\t\tsetFilter: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tfilter: action.payload,\r\n\t\t}),\r\n\t\tremoveFilter: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tfilter: {\r\n\t\t\t\t...state.filter,\r\n\t\t\t\t[action.payload]: undefined,\r\n\t\t\t},\r\n\t\t}),\r\n\t},\r\n\r\n\textraReducers: builder => {\r\n\t\tbuilder.addCase(successfulLogin, state => ({\r\n\t\t\t...state,\r\n\t\t\tindex: initialState.index,\r\n\t\t}));\r\n\t},\r\n});\r\n\r\nexport const {\r\n\tsetClientOverviewIndex,\r\n\tresetClientOverviewIdices,\r\n\tsetFilter,\r\n\tremoveFilter,\r\n} = clientOverviewSlice.actions;\r\n\r\nexport default clientOverviewSlice.reducer;\r\n","import { combineReducers } from \"@reduxjs/toolkit\";\r\nimport tradeReview from \"./tradeReview/tradeReviewUXSlice\";\r\nimport tradeByProducts from \"./tradeByProducts/tradeByProductsUXSlice\";\r\nimport tradeByClients from \"./tradeByClients/tradeByClientsUXSlice\";\r\nimport tradeByBrokers from \"./tradeByBrokers/tradeByBrokersUXSlice\";\r\nimport weightedPrice from \"./weightedPrices/weightedPriceUXSlice\";\r\nimport businessActivities from \"./businessActivities/businessActivitiesUXSlice\";\r\nimport commReview from \"./commReview/commReviewUXSlice\";\r\nimport memberContracts from \"./memberContracts/memberContractsUXSlice\";\r\nimport clientOverview from \"./clientOverview/clientOverviewUXSlice\";\r\n\r\n\r\nconst exchBusinessUXReducer = combineReducers({\r\n tradeReview,\r\n tradeByProducts,\r\n tradeByClients,\r\n tradeByBrokers,\r\n weightedPrice,\r\n businessActivities,\r\n commReview,\r\n memberContracts,\r\n clientOverview,\r\n});\r\n\r\nexport default exchBusinessUXReducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { PageIndex } from \"../../models\";\r\nimport { ExchangeMemebersFilter } from \"./types\";\r\n\r\ntype TradesReportState = {\r\n\tindex: PageIndex;\r\n\tfilter: ExchangeMemebersFilter;\r\n};\r\n\r\nexport const initialState: TradesReportState = {\r\n\tindex: {\r\n\t\titemsPerPage: 20,\r\n\t\tpageNumber: 0,\r\n\t},\r\n\tfilter: {\r\n\t\tbrokerId: \"\",\r\n\t },\r\n};\r\n\r\nconst name = \"exchangeMembers\";\r\n\r\nconst annualTrade = createSlice({\r\n\tname,\r\n\tinitialState,\r\n\treducers: {\r\n\t\tsetIndex: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tindex: action.payload,\r\n\t\t}),\r\n\t\tsetFilter: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tfilter: action.payload,\r\n\t\t }),\r\n\t\t removeFilter: (\r\n\t\t\tstate,\r\n\t\t\taction: PayloadAction\r\n\t\t ) => ({\r\n\t\t\t...state,\r\n\t\t\tfilter: {\r\n\t\t\t ...state.filter,\r\n\t\t\t [action.payload]: undefined,\r\n\t\t\t},\r\n\t\t }),\r\n \r\n\t},\r\n});\r\n\r\n\r\nexport const {\r\n\tsetIndex,\r\n\tsetFilter,\r\n\tremoveFilter,\r\n } = annualTrade.actions;\r\n \r\n\r\nexport default annualTrade.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { PageIndex } from \"../../models\";\r\n\r\ntype NotificationReportState = {\r\n\tindex: PageIndex;\r\n};\r\n\r\nexport const initialState: NotificationReportState = {\r\n\tindex: {\r\n\t\titemsPerPage: 20,\r\n\t\tpageNumber: 0,\r\n\t},\r\n};\r\n\r\nconst name = \"pushnotifications\";\r\n\r\nconst pushnotificationsList = createSlice({\r\n\tname,\r\n\tinitialState,\r\n\treducers: {\r\n\t\tsetIndex: (state, action: PayloadAction) => ({\r\n\t\t\t...state,\r\n\t\t\tindex: action.payload,\r\n\t\t}),\r\n\t},\r\n});\r\n\r\nexport const { setIndex } = pushnotificationsList.actions;\r\n\r\nexport default pushnotificationsList.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { PageIndex } from \"../../models\";\r\nimport { successfulLogin } from \"../../auth/authDataSlice\";\r\nimport { NewsDataFilter } from \"./types\";\r\n\r\ntype NewsPageState = {\r\n index: PageIndex;\r\n filter: NewsDataFilter;\r\n};\r\n\r\nconst now = new Date();\r\nexport const initialState: NewsPageState = {\r\n index: {\r\n itemsPerPage: 20,\r\n pageNumber: 0,\r\n },\r\n filter: {},\r\n};\r\n\r\nconst name = \"news\";\r\n\r\nconst newsSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setIndex: (state, action: PayloadAction) => ({\r\n ...state,\r\n index: action.payload,\r\n }),\r\n resetNewsIdices: (state) => ({\r\n ...state,\r\n index: {\r\n itemsPerPage: state.index.itemsPerPage,\r\n pageNumber: initialState.index.pageNumber,\r\n },\r\n }),\r\n setFilter: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: action.payload,\r\n }),\r\n removeFilter: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n filter: {\r\n ...state.filter,\r\n [action.payload]: undefined,\r\n },\r\n }),\r\n },\r\n extraReducers: (builder) => {\r\n builder.addCase(successfulLogin, (state) => ({\r\n ...state,\r\n index: {\r\n itemsPerPage: state.index.itemsPerPage,\r\n pageNumber: initialState.index.pageNumber,\r\n },\r\n }));\r\n },\r\n});\r\n\r\nexport const {\r\n setIndex,\r\n resetNewsIdices,\r\n setFilter,\r\n removeFilter,\r\n} = newsSlice.actions;\r\n\r\nexport default newsSlice.reducer;\r\n","import { combineReducers } from \"@reduxjs/toolkit\";\r\nimport ordersReport from \"./ordersReport/ordersReportUXSlice\";\r\nimport tradesReport from \"./tradesReport/tradesReportUXSlice\";\r\nimport tradesReportAll from \"./tradesReportClientAll/tradesReportUXSliceAll\";\r\nimport dailyTrade from \"./dailyTrade/dailyTradeUXSlice\";\r\nimport weeklyTrade from \"./weeklyTrade/weeklyTradeUXSlice\";\r\nimport monthlyTrade from \"./monthlyTrade/monthlyTradeUXSlice\";\r\nimport annualTrade from \"./annualTrade/annualTradeUXSlice\";\r\nimport securityCommission from \"./securityCommission/securityCommissionReportUXReducer\";\r\nimport antiLaundering from \"./amlaundering/amlaunderingUXSlice\";\r\nimport exchbusiness from \"./exchbusiness/exchBusinessUXReducer\";\r\nimport exchmembers from \"./exmember/exchangeMemberUXSlice\";\r\nimport pushnotifications from \"./notifications/notificationUXSlice\";\r\nimport news from \"./news/newsUXSlice\";\r\n\r\nconst uxReportsReducer = combineReducers({\r\n\tordersReport,\r\n\ttradesReport,\r\n\ttradesReportAll,\r\n\tdailyTrade,\r\n\tweeklyTrade,\r\n\tmonthlyTrade,\r\n\tannualTrade,\r\n\tsecurityCommission,\r\n\tantiLaundering,\r\n\texchbusiness,\r\n\texchmembers,\r\n\tnews,\r\n\tpushnotifications,\r\n});\r\n\r\nexport default uxReportsReducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { PageIndex } from \"../../models\";\r\nimport { successfulLogin } from \"../../auth/authDataSlice\";\r\nimport { CreateInvoicesTranFilter } from \"./types\";\r\n\r\ntype CreateInvoicesPageState = {\r\n index: PageIndex;\r\n filter: CreateInvoicesTranFilter;\r\n};\r\n\r\nconst now = new Date();\r\nexport const initialState: CreateInvoicesPageState = {\r\n index: {\r\n itemsPerPage: 20,\r\n pageNumber: 0,\r\n },\r\n filter: {\r\n dateto: now.toISOString(),\r\n datefrom: now.toISOString(),\r\n },\r\n};\r\n\r\nconst name = \"createInvoices\";\r\n\r\nconst createInvoicesSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setIndex: (state, action: PayloadAction) => ({\r\n ...state,\r\n index: action.payload,\r\n }),\r\n resetCreateInvoicesIdices: (state) => ({\r\n ...state,\r\n index: {\r\n itemsPerPage: state.index.itemsPerPage,\r\n pageNumber: initialState.index.pageNumber,\r\n },\r\n }),\r\n setFilter: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: action.payload,\r\n }),\r\n removeFilter: (\r\n state,\r\n action: PayloadAction\r\n ) => ({\r\n ...state,\r\n filter: {\r\n ...state.filter,\r\n [action.payload]: undefined,\r\n },\r\n }),\r\n },\r\n extraReducers: (builder) => {\r\n builder.addCase(successfulLogin, (state) => ({\r\n ...state,\r\n index: {\r\n itemsPerPage: state.index.itemsPerPage,\r\n pageNumber: initialState.index.pageNumber,\r\n },\r\n }));\r\n },\r\n});\r\n\r\nexport const {\r\n setIndex,\r\n resetCreateInvoicesIdices,\r\n setFilter,\r\n removeFilter,\r\n} = createInvoicesSlice.actions;\r\n\r\nexport default createInvoicesSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { PageIndex } from \"../../models\";\r\nimport { successfulLogin } from \"../../auth/authDataSlice\";\r\nimport { InvoiceFilter } from \"./types\";\r\n\r\ntype InvoicePageState = {\r\n index: PageIndex;\r\n filter: InvoiceFilter;\r\n};\r\n\r\nexport const initialState: InvoicePageState = {\r\n index: {\r\n itemsPerPage: 20,\r\n pageNumber: 0,\r\n },\r\n filter: {},\r\n};\r\n\r\nconst name = \"invoices\";\r\n\r\nconst invoicesSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setInvoiceIndex: (state, action: PayloadAction) => ({\r\n ...state,\r\n index: action.payload,\r\n }),\r\n resetInvoiceIdices: (state) => ({\r\n ...state,\r\n index: {\r\n itemsPerPage: state.index.itemsPerPage,\r\n pageNumber: initialState.index.pageNumber,\r\n },\r\n }),\r\n setFilter: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: action.payload,\r\n }),\r\n removeFilter: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: {\r\n ...state.filter,\r\n [action.payload]: undefined,\r\n },\r\n }),\r\n },\r\n extraReducers: (builder) => {\r\n builder.addCase(successfulLogin, (state) => ({\r\n ...state,\r\n index: {\r\n itemsPerPage: state.index.itemsPerPage,\r\n pageNumber: initialState.index.pageNumber,\r\n },\r\n }));\r\n },\r\n});\r\n\r\nexport const {\r\n setInvoiceIndex,\r\n resetInvoiceIdices,\r\n setFilter,\r\n removeFilter,\r\n} = invoicesSlice.actions;\r\n\r\nexport default invoicesSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { PageIndex } from \"../../models\";\r\nimport { successfulLogin } from \"../../auth/authDataSlice\";\r\nimport { InvoiceFilter } from \"./types\";\r\n\r\ntype AccountingOrderPageState = {\r\n index: PageIndex;\r\n filter: InvoiceFilter;\r\n};\r\n\r\nconst now = new Date();\r\nexport const initialState: AccountingOrderPageState = {\r\n index: {\r\n itemsPerPage: 20,\r\n pageNumber: 0,\r\n },\r\n filter: {\r\n dateto: now.toISOString(),\r\n datefrom: now.toISOString(),\r\n },\r\n};\r\n\r\nconst name = \"accountingOrder\";\r\n\r\nconst accountingOrderSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setIndex: (state, action: PayloadAction) => ({\r\n ...state,\r\n index: action.payload,\r\n }),\r\n resetIdices: (state) => ({\r\n ...state,\r\n index: {\r\n itemsPerPage: state.index.itemsPerPage,\r\n pageNumber: initialState.index.pageNumber,\r\n },\r\n }),\r\n setFilter: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: action.payload,\r\n }),\r\n removeFilter: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: {\r\n ...state.filter,\r\n [action.payload]: undefined,\r\n },\r\n }),\r\n },\r\n extraReducers: (builder) => {\r\n builder.addCase(successfulLogin, (state) => ({\r\n ...state,\r\n index: {\r\n itemsPerPage: state.index.itemsPerPage,\r\n pageNumber: initialState.index.pageNumber,\r\n },\r\n }));\r\n },\r\n});\r\n\r\nexport const {\r\n setIndex,\r\n resetIdices,\r\n setFilter,\r\n removeFilter,\r\n} = accountingOrderSlice.actions;\r\n\r\nexport default accountingOrderSlice.reducer;\r\n","import { combineReducers } from \"@reduxjs/toolkit\";\r\nimport createInvoices from \"./createInvoices/createInvoicesUXSlice\";\r\nimport invoices from \"./invoices/invoicesUXSlice\";\r\nimport accountingOrder from \"./accountingOrder/accountingOrderUXSlice\";\r\n\r\nconst uxAccountingReducer = combineReducers({\r\n\tcreateInvoices,\r\n\tinvoices,\r\n\taccountingOrder,\r\n});\r\n\r\nexport default uxAccountingReducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { PageIndex } from \"../../models\";\r\nimport { successfulLogin } from \"../../auth/authDataSlice\";\r\nimport { AlarmFilter } from \"./types\";\r\n\r\ntype AlarmPageState = {\r\n index: PageIndex;\r\n filter: AlarmFilter;\r\n};\r\n\r\nexport const initialState: AlarmPageState = {\r\n index: {\r\n itemsPerPage: 20,\r\n pageNumber: 0,\r\n },\r\n filter: {},\r\n};\r\n\r\nconst name = \"alarms\";\r\n\r\nconst alarmsSlice = createSlice({\r\n name,\r\n initialState,\r\n reducers: {\r\n setAlarmIndex: (state, action: PayloadAction) => ({\r\n ...state,\r\n index: action.payload,\r\n }),\r\n resetAlarmIdices: (state) => ({\r\n ...state,\r\n index: {\r\n itemsPerPage: state.index.itemsPerPage,\r\n pageNumber: initialState.index.pageNumber,\r\n },\r\n }),\r\n\r\n setFilter: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: action.payload,\r\n }),\r\n\r\n removeFilter: (state, action: PayloadAction) => ({\r\n ...state,\r\n filter: {\r\n ...state.filter,\r\n [action.payload]: undefined,\r\n },\r\n }),\r\n\r\n },\r\n extraReducers: (builder) => {\r\n builder.addCase(successfulLogin, (state) => ({\r\n ...state,\r\n index: {\r\n itemsPerPage: state.index.itemsPerPage,\r\n pageNumber: initialState.index.pageNumber,\r\n },\r\n }));\r\n },\r\n});\r\n\r\nexport const {\r\n setAlarmIndex,\r\n resetAlarmIdices,\r\n setFilter,\r\n removeFilter,\r\n} = alarmsSlice.actions;\r\n\r\nexport default alarmsSlice.reducer;\r\n","import { combineReducers } from \"@reduxjs/toolkit\";\r\nimport alarms from \"./alarmParameters/alarmUXSlice\";\r\n\r\nexport default combineReducers({\r\n alarms,\r\n});","import { combineReducers } from \"@reduxjs/toolkit\";\r\nimport auth from \"./auth/authUXSlice\";\r\nimport localization from \"./localization/localizationUXSlice\";\r\nimport trading from \"./trading/tradingUXReducer\"\r\nimport clearing from \"./clearing/clearingUXReducer\"\r\nimport reports from \"./reports/reportsUXRecucer\"\r\nimport accounting from \"./accounting/accountingUXReducer\";\r\nimport surveillance from \"./surveillance/surveillanceUXReducer\";\r\n\r\nexport default combineReducers({\r\n auth,\r\n localization,\r\n trading,\r\n clearing,\r\n reports,\r\n accounting,\r\n surveillance\r\n});\r\n","import { combineReducers } from \"redux\";\r\nimport dataReducer from \"../../data/dataReducer\";\r\nimport uxReducer from \"../../data/uxReducer\";\r\nimport { ThunkAction, Action } from \"@reduxjs/toolkit\";\r\n\r\nconst rootReducer = combineReducers({\r\n\tdata: dataReducer,\r\n\tux: uxReducer,\r\n});\r\n\r\nexport type StoreType = ReturnType;\r\nexport type ThunkType = ThunkAction>;\r\n\r\nexport default rootReducer;\r\n","import { AxiosRequestConfig } from \"axios\";\r\n\r\nexport interface GeneralConfig {\r\n\ttitleSufix: string;\r\n\tdeploymentDir?: string;\r\n\tuseLogger?: boolean\r\n}\r\n\r\nexport interface NotificationsConfig {\r\n\turi: string\r\n}\r\n\r\nexport interface ConfigType {\r\n\thttp: AxiosRequestConfig;\r\n\tgeneral: GeneralConfig;\r\n\tnotifications: NotificationsConfig;\r\n}\r\n\r\nconst windowENV: any = (window as any).ENV;\r\n\r\nexport const appConfig: ConfigType = {\r\n\thttp: {\r\n\t\t// baseURL: \"http://195.178.54.171/prodberzaws/api\",\r\n\t\t// baseURL: \"http://195.178.54.171/commexchws/api\",\r\n\t\tbaseURL: windowENV.API_BASE,\r\n\t\t// baseURL: \"/commexchwsdevcli/api\",\r\n\t},\r\n\tgeneral: {\r\n\t\ttitleSufix: windowENV.TITLE_SUFIX,\r\n\t\tdeploymentDir: windowENV.DEPLOYMENT_DIR !== \"\" ? windowENV.DEPLOYMENT_DIR : undefined,\r\n\t},\r\n\tnotifications: {\r\n\t\turi: windowENV.NOTIFICATION_BASE_URI,\r\n\t}\r\n};\r\n","import { configureStore, getDefaultMiddleware } from \"@reduxjs/toolkit\";\r\nimport logger from \"redux-logger\";\r\nimport reducer from \"./reducers\";\r\nimport { persistStore, persistReducer } from 'redux-persist'\r\nimport { appConfig } from \"../config/config\"\r\n// import storage from 'redux-persist/lib/storage'\r\n\r\n// const persistConfig = {\r\n// key: 'root',\r\n// storage,\r\n// whitelist: ['ux']\r\n// }\r\n\r\n// const persistedReducer = persistReducer(persistConfig, reducer)\r\n\r\nconst defaultMiddlware = getDefaultMiddleware({\r\n\timmutableCheck: false,\r\n\tserializableCheck: false,\r\n\tthunk: true,\r\n});\r\n\r\nconst middlware = appConfig.general.useLogger ? [...defaultMiddlware, logger] : defaultMiddlware\r\n\r\nconst store = configureStore({\r\n\treducer,\r\n\tmiddleware: middlware as any,\r\n});\r\nexport const persistor = persistStore(store)\r\nexport default { store, persistor };\r\n","import React from \"react\";\r\nimport { Provider } from \"react-redux\";\r\nimport { PersistGate } from \"redux-persist/integration/react\";\r\nimport appStore from \"./store\";\r\n\r\nconst StoreProvider: React.FunctionComponent = props => (\r\n\t\r\n\t\t\r\n\t\t\t{props.children}\r\n\t\t\r\n\t\r\n);\r\n\r\nexport default StoreProvider;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { StoreType } from \"../../core/store/reducers\";\r\nimport { useCallback } from \"react\";\r\nimport { setLocalization } from \"./localizationUXSlice\";\r\nimport { LocalizationLanguage } from \"../../core/localization/types\";\r\n\r\nexport const useLocalizationStore = () => {\r\n\tconst dispatch = useDispatch();\r\n\tconst localization = useSelector(store => store.ux.localization.language);\r\n\r\n\tconst setLocalizationCallback = useCallback(language => dispatch(setLocalization(language)), [dispatch]);\r\n\r\n\treturn [localization, setLocalizationCallback] as [typeof localization, typeof setLocalizationCallback];\r\n};\r\n","import { LocalizationLanguage } from \"./types\";\r\n\r\nexport const srTranslation = {\r\n\tlanguage: LocalizationLanguage.SR as LocalizationLanguage,\r\n\tdecimalSeparator: \",\",\r\n\tmomentLocale: \"sr\",\r\n\tmainTitle: \"NSCOMEX\",\r\n\ttableNextPage: \"Sledeća strana\",\r\n\ttablePreviousPage: \"Predhodna strana\",\r\n\ttableFirsPage: \"Prva strana\",\r\n\ttableLastPage: \"Poslednja strana\",\r\n\ttableDisplayedRows: \"{from}-{to} od {count}\",\r\n\ttabledDisplayedPerPage: \"redova\",\r\n\torderActView: \"Pogledaj nalog\",\r\n\torderActReply: \"Odgovori na nalog\",\r\n\torderWaitingProducts: \"Molimo Vas sačekajte...\",\r\n\torderSideBuy: \"KUPI\",\r\n\torderSideSell: \"PRODAJ\",\r\n\tlistingOrdersTitle: \"Nalozi\",\r\n\tuserOrdersTitle: \"Moji nalozi\",\r\n\tarchiveOrdersTitle: \"Arhiva\",\r\n\tsearch: \"Pretraga\",\r\n\tcompanyClmName: \"Naziv\",\r\n\tcompanyClmHeadquorters: \"Sedište\",\r\n\tcompanyClmMemberFrom: \"Član od\",\r\n\tcompanyClmProvision: \"Provizija\",\r\n\treporClmtName: \"Naziv\",\r\n\treporTitle: \"Izveštaji\",\r\n\treporDownloadTtl: \"Skini\",\r\n\tusername: \"Korisničko ime\",\r\n\tpassword: \"Lozinka\",\r\n\tlogin: \"Prijava\",\r\n\tlogout: \"Odjava\",\r\n\torderChooseProduct: \"Izaberite proizvod\",\r\n\tnoDataText: \"Nema podataka\",\r\n\torderClmOrdNo: \"Broj\",\r\n\torderTimeReceived: \"Datum naloga\",\r\n\torderOrdType: \"Tip\",\r\n\torderRefOrd: \"Ref nalog\",\r\n\torderClientIdNo: \"MB klijenta\",\r\n\torderClientName: \"Naziv klijenta\",\r\n\torderProduct: \"Proizvod\",\r\n\torderYear: \"Rod\",\r\n\torderTradingPlace: \"Mesto isporuke\",\r\n\torderFranco: \"Pravila transporta\",\r\n\torderQty: \"Količina\",\r\n\torderAllOrNothing: \"Sve ili ništa\",\r\n\torderPrice: \"Cena\",\r\n\torderPriceEur: \"Cena (EUR)\",\r\n\torderPriceWithoutVat: \"Cena bez PDV-a\",\r\n\torderPriceWithVat: \"Cena (PDV)\",\r\n\torderPayType: \"Način plaćanja\",\r\n\torderPayDays: \"Dani plaćanja\",\r\n\torderFreeStorage: \"Besplatno skladištenje\",\r\n\torderFreeStorageByDelivery: \"Do isporuke\",\r\n\torderFreeStorageByDate: \"Do datuma:\",\r\n\torderCheckPoint: \"Kontrola kvaliteta\",\r\n\torderCheckPays: \"Plaća kontrolnu kuću\",\r\n\torderExpiryDate: \"Datum isteka naloga\",\r\n\torderStatus: \"Status\",\r\n\torderQuality: \"Kvalitet\",\r\n\tnumberOfDays: \"Broj dana\",\r\n\tnavListing: \"Listing\",\r\n\tnavMyOrders: \"Moji nalozi\",\r\n\tnavArchive: \"Arhiva\",\r\n\tnavCompanies: \"Kompanije\",\r\n\tnavMembers: \"Članovi\",\r\n\tnavProducts: \"Proizvodi\",\r\n\tnavBrokers: \"Brokeri\",\r\n\tnavEmployees: \"Zaposleni\",\r\n\tnavUsers: \"Korisnici\",\r\n\tnavRoles: \"Uloge\",\r\n\tnavCodebook: \"Šifarnik\",\r\n\tnavCountries: \"Države\",\r\n\tnavTopRegion: \"Region\",\r\n\tnavRegion: \"Okrug\",\r\n\tnavSubRegion: \"Podregion\",\r\n\tnavCities: \"Gradovi\",\r\n\tnavCurrencies: \"Valute\",\r\n\tnavWarehouses: \"Skladišta\",\r\n\tnavTrading: \"Trgovanje\",\r\n\tnavMainTable: \"Glavna tabla\",\r\n\tnavOrders: \"Nalozi\",\r\n\tnavTransactions: \"Zaključnice\",\r\n\tnavMarketDepth: \"Dubina tržišta\",\r\n\tnavCliring: \"Kliring\",\r\n\tnavDeposits: \"Depoziti\",\r\n\tnavMarginCalculations: \"Obračun marže\",\r\n\tnavSurveillance: \"Nadzor\",\r\n\tnavAlarmSetup: \"Postavljanje alarma\",\r\n\tnavProductReport: \"Izveštaji o proizvodima\",\r\n\tnavMemberReport: \"Izveštaji o članovima\",\r\n\tnavReports: \"Izvestaji\",\r\n\tnavDailyReports: \"Dnevni izvestaji\",\r\n\tnavWeeklyReports: \"Nedeljni izvestaji\",\r\n\tnavMonthlyReports: \"Mesečni izvestaji\",\r\n\tnavQuaterlyReports: \"Kvartalni izvestaji\",\r\n\tnavAnnualReports: \"Godišnji izvestaji\",\r\n\tnavSECReports: \"SEC izvestaji\",\r\n\tnavMembersReports: \"Izvestaji o članovima\",\r\n\tnavOrdersReports: \"Nalozi i zaključnice\",\r\n\tnavAccounting: \"Knjiženje\",\r\n\tnavTaxes: \"Porez i provizija\",\r\n\tnavInvoice: \"Kreiranje faktura\",\r\n\tnavAccountingExport: \"Eksport za knjiženje\",\r\n\tnavMembersDeposit: \"Depoziti članova\",\r\n\tempFirstName: \"Ime\",\r\n\tempLastName: \"Prezime\",\r\n\tempIdNumber: \"JMBG\",\r\n\tempOfficePhone: \"Broj poslovnog telefon\",\r\n\tempEmail: \"Email\",\r\n\tempStatus: \"Status\",\r\n\tempMidName: \"Srednje ime\",\r\n\tempGender: \"Rod\",\r\n\tempAddress: \"Adresa\",\r\n\tempZipCode: \"Poštanski broj\",\r\n\tempCity: \"Grad\",\r\n\tempPhone: \"Broj telefona\",\r\n\tempDateOfBirth: \"Datum rođenja\",\r\n\tempPosition: \"Pozicija\",\r\n\tempBranch: \"Grana\",\r\n\tempFax: \"Faks\",\r\n\tempShowTooltip: \"Prikaži brokera\",\r\n\tgenderMale: \"Muški\",\r\n\tgenderFemale: \"Ženski\",\r\n\tstatusActive: \"Aktivan\",\r\n\tstatusInactive: \"Neaktivan\",\r\n\tempEdit: \"Ažuriraj\",\r\n\tempDelete: \"Obriši\",\r\n\tempEditTitle: \"Izmena\",\r\n\tempCreateTitle: \"Kreiranje brokera\",\r\n\tcliName: \"Skraćen naziv\",\r\n\tcliIdNo: \"Matični broj\",\r\n\tcliTaxCode: \"PIB broj\",\r\n\tclijbkjs: \"JBKJS\",\r\n\tcliType: \"Tip\",\r\n\tcliForeign: \"Strani\",\r\n\tcliCity: \"Grad\",\r\n\tcliPhone: \"Telefon\",\r\n\tcliBroker: \"Broker\",\r\n\tcliActive: \"Članarina\",\r\n\tcliStatus: \"Status\",\r\n\tclilFullName: \"Naziv\",\r\n\tcliAddress: \"Adresa\",\r\n\tcliMailCity: \"Grad za poštu\",\r\n\tcliMailAddress: \"Adresa za poštu\",\r\n\tcliMobile: \"Mobilni telefon\",\r\n\tcliFax: \"Faks\",\r\n\tcliEmail: \"Email\",\r\n\tcliHasContract: \"Ima ugovor\",\r\n\tcliActiveFrom: \"Aktivan od\",\r\n\tcliActiveTo: \"Aktivan do\",\r\n\tcliCommission: \"Provizija\",\r\n\tcliCurrentTurnover: \"Promet\",\r\n\tcliComment: \"Komentar\",\r\n\tcilEditTitle: \"Ažuriraj člana\",\r\n\tcilCreateTitle: \"Kreiraj člana\",\r\n\tcilTitle: \"Članovi\",\r\n\ttableConfirmationDelete: \"Da li ste sigurni?\",\r\n\ttableDelete: \"Obriši\",\r\n\ttableAdd: \"Dodaj\",\r\n\ttableEdit: \"Ažuriraj\",\r\n\ttableCancel: \"Otkaži\",\r\n\ttableSave: \"Saćuvaj\",\r\n\troleCode: \"Šifra\",\r\n\troleName: \"Naziv SR\",\r\n\troleNameEn: \"Naziv EN\",\r\n\ttableShow: \"Prikaži\",\r\n\troleEdit: \"Ažuriraj ulogu\",\r\n\troleCreate: \"Kreiraj ulogu\",\r\n\troleNameColumn: \"Naziv\",\r\n\troleIsEmployee: \"Zaposlen\",\r\n\tuserUserName: \"Ime\",\r\n\tuserLoginUser: \"Korisničko ime\",\r\n\tuserLoginPass: \"Lozinka\",\r\n\tuserChangePass: \"Promena lozinke\",\r\n\tuserRoleId: \"Uloga\",\r\n\tuserIsEmployee: \"Zaposlen\",\r\n\tuserEmpId: \"Zaposleni\",\r\n\tuserClientId: \"Klijent\",\r\n\tuserCliPrsId: \"Osoba klijenta\",\r\n\tuserSubscribedUntil: \"Pristup do\",\r\n\tuserSubscrUnlimited: \"Neograničen pristup\",\r\n\tuserIsActive: \"Aktivan\",\r\n\tuserEditTitle: \"Ažuriraj korisnika\",\r\n\tuserCreateTitle: \"Kreiraj korisnika\",\r\n\ttableBasciInfo: \"Osnovni podaci\",\r\n\tclientPersonTitle: \"Lica\",\r\n\tclientPersonName: \"Ime\",\r\n\tclientPersonIDNumber: \"JMBG\",\r\n\tclientPersonStatus: \"Status\",\r\n\tclientPersonEmpty: \"Nema lica\",\r\n\tclientBrokerTitle: \"Brokeri\",\r\n\tclientBrokerName: \"Ime\",\r\n\tclientBrokerIDNumber: \"JMBG\",\r\n\tclientBrokerStatus: \"Status\",\r\n\tclientBrokerEmpty: \"Nema brokera\",\r\n\tcontractTitle: \"Ugovori\",\r\n\tcontractNumber: \"Broj\",\r\n\tcontractDate: \"Datum\",\r\n\tcontractStatus: \"Status\",\r\n\tcontractEmpty: \"Nema ugovora\",\r\n\tcontractLincedContrNo: \"Povezani ugovori\",\r\n\tcontractTypeDescription: \"Vrsta\",\r\n\tcontractDescription: \"Opis\",\r\n\tcontractPhoneOrder: \"Broj telefona\",\r\n\tcontractWebUser: \"Web korisnik\",\r\n\tcontractWebUserBlocked: \"Web korisnik blokiran\",\r\n\tcontractTitleEdit: \"Ažuriraj ugovor\",\r\n\tcontractTitleCreate: \"Kreiraj ugovor\",\r\n\taccountTitle: \"Novčani računi\",\r\n\taccountTitleEdit: \"Ažuriraj novčani račun\",\r\n\taccountTitleCreate: \"Kreiraj novčani račun\",\r\n\taccountNumber: \"Broj računa\",\r\n\taccountBank: \"Banka\",\r\n\taccountDefault: \"Podrazumevani račun\",\r\n\taccountClientBankCode: \"Šifra banke klijenta\",\r\n\taccountCurrency: \"Valuta\",\r\n\taccountForBuySell: \"Kupovina/Prodaja\",\r\n\taccountStatus: \"Status\",\r\n\taccountSideBuy: \"Kupovna\",\r\n\taccountSideSell: \"Prodajna\",\r\n\taccountSideBoth: \"Obe\",\r\n\taccountEmpty: \"Nema novčanih računa\",\r\n\tinvalidDateMessage: \"Datum nije validan\",\r\n\tmaxDateMessage: \"Datum je isuviše veliki\",\r\n\tminDateMessage: \"Datum je isuviše mali\",\r\n\tclientPersonEditTitle: \"Ažuriraj osobu\",\r\n\tclientPersonCreateTitle: \"Kreiraj osobu\",\r\n\tclientBrokerEditTitle: \"Ažuriraj brokera\",\r\n\tclientBrokerCreateTitle: \"Kreiraj brokera\",\r\n\tleavePageTitle: \"Napuštate stranicu?\",\r\n\tleavePageMessage: \"Ako napustite ovu stranicu sve promene će biti izgubljene.\",\r\n\tleavePageConfirm: \"Napusti stranicu\",\r\n\tleavePageCancel: \"Ostani\",\r\n\tcalendarOK: \"OK\",\r\n\tcalendarCancel: \"Otkaži\",\r\n\tcalendarClear: \"Obriši\",\r\n\tproductName: \"Naziv\",\r\n\tproductNameEN: \"Naziv (EN)\",\r\n\tproductGroupName: \"Naziv grupe\",\r\n\tproductUnit: \"Jedinica\",\r\n\tproductVat: \"PDV\",\r\n\tproductHasYieldYear: \"Godina roda\",\r\n\tproductStatus: \"Status\",\r\n\tproductTitle: \"Proizvodi\",\r\n\tproductEditTitle: \"Ažuriraj proizvod\",\r\n\tproductCreateTitle: \"Kreiraj proizvod\",\r\n\tproductAttributeTitle: \"Produktni atributi\",\r\n\tproductAttributeEditTitle: \"Ažuriraj produktni atribut\",\r\n\tproductAttributeCreateTitle: \"Kreiraj produktni atribut\",\r\n\tproductAttributeName: \"Naziv\",\r\n\tproductAttributeType: \"Tip\",\r\n\tproductAttributeManditory: \"Obavezan\",\r\n\tproductAttributeComparator: \"Komparator\",\r\n\tproductAttributeStatus: \"Status\",\r\n\tproductAttributeEmpty: \"Nema atributa\",\r\n\tproductGroupNameSR: \"Naziv (SR)\",\r\n\tproductGroupNameEN: \"Naziv (EN)\",\r\n\tproductGroupStatus: \"Status\",\r\n\tproductGroupTitle: \"Produktne grupe\",\r\n\tproductGroupEditTitle: \"Ažuriraj produktnu grupu\",\r\n\tproductGroupCreateTitle: \"Kreiraj produktnu grupu\",\r\n\tbankName: \"Naziv Banke\",\r\n\tbankCode: \"Šifra\",\r\n\tbankIdNumber: \"Matični broj\",\r\n\tnavBanks: \"Banke\",\r\n\tbankEdit: \"Ažuriraj banku\",\r\n\tbankCreate: \"Kreiraj banku\",\r\n\tbankRegNumber: \"Registarski broj\",\r\n\r\n\twhsName: \"Naziv magacina\",\r\n\twhsCode: \"Šifra\",\r\n\tnavWhs: \"Magacini\",\r\n\twhsEdit: \"Ažuriraj magacin\",\r\n\twhsCreate: \"Kreiraj magacin\",\r\n\twhsPort: \"Najbliža luka\",\r\n\twhsDistanceToPort: \"Udaljenost do luke (km)\",\r\n\r\n\tcommission: \"Provizija\",\r\n\trequiredMessage: \"Polje je obavezno\",\r\n\tmessageWeakPassword: \"Lozinka nije dovoljno jaka\",\r\n\tattributesTitle: \"Atributi\",\r\n\tattributesCreateTitle: \"Kreiraj atribut\",\r\n\tattributesEditTitle: \"Ažuriraj atribut\",\r\n\tattributeName: \"Naziv\",\r\n\tattributeNameEN: \"Naziv (EN)\",\r\n\tattributeOrder: \"Redosled prikaza\",\r\n\tattributeUnit: \"Jedinica\",\r\n\tattributeValuesTitle: \"Vrednosti atributa\",\r\n\tattributeValuesCreateTitle: \"Kreiraj vrednost atributa\",\r\n\tattributeValuesEditTitle: \"Ažuriraj vrednost atributa\",\r\n\tattributeValuesEmpty: \"Nema vrednosti atributa\",\r\n\tattributeValueName: \"Naziv\",\r\n\tattributeValueNameEN: \"Naziv (EN)\",\r\n\tattributeValueValue: \"Vrednost\",\r\n\tattributeValueValueEN: \"Vrednost (EN)\",\r\n\tattributeValueOrder: \"Redosled prikaza\",\r\n\tattributeValueStatus: \"Status\",\r\n\tcurrenciesTitle: \"Valute\",\r\n\tcurrenciesCreateTitle: \"Kreiraj valutu\",\r\n\tcurrenciesEditTitle: \"Ažuriraj valutu\",\r\n\tcurrenciesName: \"Naziv\",\r\n\tcurrenciesCode: \"Oznaka\",\r\n\tcurrenciesNumericCode: \"Šifra\",\r\n\tregName: \"Region\",\r\n\tregNameDistrict: \"Okrug\",\r\n\tparentRegName: \"Region\",\r\n\tcountryReg: \"Država\",\r\n\tregEdit: \"Ažuriraj region\",\r\n\tregEditDistrict: \"Ažuriraj okrug\",\r\n\tregCreate: \"Kreiraj region\",\r\n\tregCreateDistrict: \"Kreiraj okrug\",\r\n\tcurRateDate: \"Datum kursa\",\r\n\tcurRateBuy: \"Kupovni kurs\",\r\n\tcurRateSell: \"Prodajni kurs\",\r\n\tcurRateMid: \"Srednji kurs\",\r\n\tcurRateCurrency: \"Valuta\",\r\n\tcurRateTitle: \"Kursna lista\",\r\n\tcurRateEditTitle: \"Ažuriraj kurs\",\r\n\tcurRateCreateTitle: \"Kreiraj kurs\",\r\n\tcountryEdit: \"Ažuriraj državu\",\r\n\tcountryCreate: \"Kreiraj državu\",\r\n\tcountryCode: \"Oznaka\",\r\n\tcountryName: \"Naziv\",\r\n\tcountryNameEN: \"Naziv (EN)\",\r\n\tcityEdit: \"Ažuriraj grad\",\r\n\tcityCreate: \"Kreiraj grad\",\r\n\tcityName: \"Naziv\",\r\n\tcityZipCode: \"Poštanski broj\",\r\n\tcityRegion: \"Okrug\",\r\n\tcitySubRegion: \"Podregion\",\r\n\tcityIsPort: \"Luka\",\r\n\r\n\tcommissionTitle: \"Provizije\",\r\n\tcommissionCreateTitle: \"Kreiraj proviziju\",\r\n\tcommissionEditTitle: \"Ažuriraj proviziju\",\r\n\tcommissionCode: \"Šifra\",\r\n\tcommissionName: \"Naziv\",\r\n\tcommissionNameEN: \"Naziv (EN)\",\r\n\tcommissionType: \"Tip\",\r\n\tcommissionStandard: \"Standardna\",\r\n\tcommDetailsTitle: \"Detalji provizije\",\r\n\tcommDetailsCreateTitle: \"Kreiraj detalj provizije\",\r\n\tcommDetailsEditTitle: \"Ažuriraj detalj provizije\",\r\n\tcommDetailsDate: \"Datum od\",\r\n\tcommDetailsProductGroup: \"Grupa proizvoda\",\r\n\tcommDetailsProduct: \"Proizvod\",\r\n\tcommDetailsCurrency: \"Valuta\",\r\n\tcommDetailsAmtCurrency: \"Valuta iznosa\",\r\n\tcommDetailsAmtTypePercent: \"Procenat\",\r\n\tcommDetailsAmtTypeAmount: \"Iznos\",\r\n\tcommDetailsBuyAmtType: \"Kupovni tip iznosa\",\r\n\tcommDetailsBuyPerc: \"Kupovni procenat\",\r\n\tcommDetailsBuyMin: \"Kupovna minimalna količina\",\r\n\tcommDetailsBuyMax: \"Kupovna maksimalna količina\",\r\n\tcommDetailsSellAmtType: \"Prodajni tip iznosa\",\r\n\tcommDetailsSellPerc: \"Prodajni procenat\",\r\n\tcommDetailsSellMin: \"Prodajni minimalna količina\",\r\n\tcommDetailsSellMax: \"Prodajni maksimalna količina\",\r\n\tproductCode: \"Šifra\",\r\n\tclientPersonRole: \"Uloga\",\r\n\tclientPersonDateCertified: \"Datum sertifikata\",\r\n\tclientPersonPhone: \"Telefon\",\r\n\tclientPersonEmail: \"Mail\",\r\n\torderRecieveMethod: \"Način prijema\",\r\n\torderEditTitle: \"Ažuriraj nalog\",\r\n\torderCreateTitle: \"Kreiraj nalog\",\r\n\torderGoodsReadyFrom: \"Roba spremna od\",\r\n\torderGoodsReadyTo: \"Roba spremna do\",\r\n\torderAttrName: \"Naziv\",\r\n\torderAttrValue: \"Vrednost\",\r\n\torderAttrTitle: \"Parametri kvaliteta\",\r\n\torderAttrCreateTitle: \"Kreiraj atribut\",\r\n\torderAttrEditAttribute: \"Ažuriraj atribut\",\r\n\torderReceiveMethod: \"Nalog primljen\",\r\n\torderbrokName: \"Broker\",\r\n\torderUserName: \"Korisnik\",\r\n\torderCliPrsName: \"Klijent-osoba\",\r\n\torderProdCode: \"Šifra proizvoda\",\r\n\torderUnit: \"Jedinica\",\r\n\torderQtyLeft: \"Preostala količina\",\r\n\torderPriceVat: \"Pdv\",\r\n\torderMinQty: \"Minimalna količina\",\r\n\torderComment: \"Napomena\",\r\n\torderCommission: \"Provizija\",\r\n\tordergoodsRedyFrom: \"Proizvod spreman od\",\r\n\tordergoodsRedyTo: \"Proizvod spreman do\",\r\n\torderStatusDescr: \"Status\",\r\n\torderCancelReplTime: \"Vreme opoziva/modifikacije\",\r\n\torderPayData: \"Datum plaćanja\",\r\n\torderSide: \"Strana\",\r\n\torderCurrCode: \"Valuta\",\r\n\torderexportReady: \"Spremno za izvoz\",\r\n\torderBankGuarantee: \"Garancija\",\r\n\torderActive: \"Klijent nema aktivnu pretplatu\",\r\n\r\n\ttradeTitle: \"Zaključnice\",\r\n\ttradeNo: \"Broj\",\r\n\ttradeTime: \"Datum prometa\",\r\n\ttranNoSell: \"br. transakc. prodaje\",\r\n\torderNoSell: \"br. naloga prodaje\",\r\n\tclientNameSell: \"Naziv prodavca\",\r\n\ttranNoBuy: \"br. transakc. kupovine\",\r\n\torderNoBuy: \"br. naloga kupovine\",\r\n\tclientNameBuy: \"Naziv kupca\",\r\n\ttradeProdCode: \"Šifra proizvoda\",\r\n\ttradeProdName: \"Proizvod\",\r\n\ttradeQty: \"Količina\",\r\n\ttradeStatusDescr: \"Status\",\r\n\ttradeDeliveryDescr: \"Status isporuke\",\r\n\ttradePrice: \"Cena\",\r\n\tlistingOrdersBookTitle: \"Knjiga naloga\",\r\n\torderCancel: \"Povuci nalog\",\r\n\torderCancelQuestion: \"Povuci nalog?\",\r\n\torderConfirmQuestion: \"Potvrdi nalog?\",\r\n\torderCancelQuestionYes: \"Da\",\r\n\torderCancelQuestionNo: \"Ne\",\r\n\torderModify: \"Modifikuj nalog\",\r\n\torderVerify: \"Verifikuj nalog\",\r\n\torderConfirm: \"Potvrdi nalog\",\r\n\torderReplay: \"Kontra nalog\",\r\n\torderDelete: \"Obriši nalog\",\r\n\ttradeVatPerc: \"Pdv %\",\r\n\ttradePriceWithVat: \"Cena sa pdv\",\r\n\ttradeAmt: \"Iznos\",\r\n\ttradeAmtWithVat: \"Iznos sa pdv\",\r\n\ttradeTransCostSell: \"Trosak transporta prodavca\",\r\n\ttradeStorCostSell: \"Trosak skladistenja prodavca\",\r\n\ttradeTransCostBuy: \"Trosak transporta kupca\",\r\n\ttradeStorCostBuy: \"Trosak skladistenja kupca\",\r\n\ttradeCommPercSell: \"Provizija prodavca %\",\r\n\ttradeCommAmtSell: \"Provizija prodavca \",\r\n\ttradeCommPercBuy: \"Provizija kupca %\", \r\n\ttradeCommAmtBuy: \"Provizija kupca\", \r\n\ttradeDeliveryWhsName: \"Skladište\",\r\n\ttradePayTypeDescr: \"Način plaćanja\",\r\n\r\n\t\r\n\torderFilterConfirm: \"Filtriraj\",\r\n\torderFilterCancel: \"Otkaži\",\r\n\torderFilterFrom: \"Nalog od\",\r\n\torderFilterTo: \"Nalog do\",\r\n\ttradeFilterFrom: \"Zaključnica od\",\r\n\ttradeFilterTo: \"Zaključnica do\",\r\n\ttradeViewAction: \"Prikaži zaključnicu\",\r\n\ttradeCancelAction: \"Poništi zaključnicu\",\r\n\torderTradeQuestion: \"Poništi zaključnicu?\",\r\n\tfilterFrom: \"od\",\r\n\tfilterTo: \"do\",\r\n\tpaymentTitle: \"Plaćanja\",\r\n\tpaymentDataTime: \"Datum\",\r\n\tpaymentClientCode: \"Matbr klijenta\",\r\n\tpaymentClientName: \"Naziv klijenta\",\r\n\tpaymentPayType: \"Vrsta promene\",\r\n\tpaymentClmOrdNo: \"Broj naloga\",\r\n\tpaymentTranNo: \"Broj transakcije\",\r\n\tpaymentAmount: \"Iznos\",\r\n\tpaymentAmountIn: \"Ulaz\",\r\n\tpaymentAmountOut: \"Izlaz\",\r\n\tpaymentCurrCode: \"Valuta\",\r\n\tpaymentStatus: \"Status\",\r\n\tdatefrom: \"Od datuma\",\r\n\tdateto: \"Do datuma\",\r\n\tpaymentEdit: \"Ažuriraj plaćanje\",\r\n\tpaymentCreate: \"Kreiraj plaćanje\",\r\n\tpaymentSideIn: \"Ulaz\",\r\n\tpaymentSideOut: \"Izlaz\",\r\n\tpaymentSide: \"Ulaz/Izlaz\",\r\n\tpaymentSideNonDedicated: \"Bez namene\",\r\n\tpaymentSideDedicated: \"Sa namenom\",\r\n\tpaymentSideDedication: \"Namena\",\r\n\tpaymentBankGuarantee: \"Bankarska garancija\",\r\n paymentMatchingQty: \"Odgovarajuća količina\",\r\n\r\n\tctrlGoodsTitle: \"Kontrola\",\r\n\tctrlcontrolDate: \"Datum\",\r\n\tctrltradeNo: \"Broj zaključnice\",\r\n\tctrlsellerCode: \"Matični br. prodavca\",\r\n\tctrlsellerName: \"Prodavac\",\r\n\tctrlbuyerCode: \"Matični br. kupca\",\r\n\tctrlbuyerName: \"Kupac\",\r\n\tctrlproductCode: \"Šifra proizvoda\",\r\n\tctrlproductName: \"Proizvod\",\r\n\tctrlcheckPointDescr: \"Mesto provere\",\r\n\tctrlcheckDoneByDescr: \"Proveru izvršio\",\r\n\tctrlcheckPaysDescr: \"Provera plaćanja\",\r\n\tctrlcontrolHouse: \"Kontrolna kuća\",\r\n\tctrlcontrolReport: \"Izveštaj\",\r\n\tctrlcontrolReportText: \"Text Izveštaja\",\r\n\tctrlcontrolReportFile: \"Fajl izveštaja\",\r\n\tctrlstatus: \"Status\",\r\n\tcrtlGoodsEdit: \"Ažuriraj kontrolu\",\r\n\tctrlGoodsCreate: \"Kreiraj kontrolu\",\r\n\tctrlFilterFrom: \"Od datuma\",\r\n\tctrlFilterTo: \"Do datuma\",\r\n\r\n\tdlvrDiliveryTitle: \"Isporuke\",\r\n\tdlvrDeliveryDate: \"Datum\",\r\n\tdlvrTradeNo: \"Broj zaključnice\",\r\n\tdlvrsellerCode: \"Matični br. prodavca\",\r\n\tdlvrsellerName: \"Prodavac\",\r\n\tdlvrbuyerCode: \"Matični br. kupca\",\r\n\tdlvrbuyerName: \"Kupac\",\r\n\tdlvrproductCode: \"Šifra proizvoda\",\r\n\tdlvrproductName: \"Proizvod\",\r\n\tdlvrDeliverQty: \"Isporučena količina\",\r\n\tdlvrLeftQty: \"Preostala količina\",\r\n\tdlvrTradeQty: \"Ukupna količina\",\r\n\tdlvrUnit: \"Jedinica\",\r\n\tdlvrCityCode: \"PTT broj\",\r\n\tdlvrCityName: \"Grad\",\r\n\tdlvrWarehouseCode: \"Šifra skladišta\",\r\n\tdlvrWarehouseName: \"Skladište\",\r\n\tdlvrstatus: \"Status\",\r\n\tdlvrEdit: \"Ažuriraj isporuku\",\r\n\tdlvrCreate: \"Kreiraj isporuku\",\r\n\tdlvrFilterFrom: \"Od datuma\",\r\n\tdlvrFilterTo: \"Do datuma\",\r\n\tdlvrValue: \"Vrednost isporučene količine sa PDV\",\r\n\r\n\tdlsDisputeTitle: \"Sporna situacija\",\r\n\tdisDispSitDate: \"Datum\",\r\n\tdisTradeNo: \"Broj zaključnice\",\r\n\tdissellerCode: \"Matični br. prodavca\",\r\n\tdissellerName: \"Prodavac\",\r\n\tdisbuyerCode: \"Matični br. kupca\",\r\n\tdisbuyerName: \"Kupac\",\r\n\tdisproductCode: \"Šifra proizvoda\",\r\n\tdisproductName: \"Proizvod\",\r\n\tdisDisputeDescr: \"Opis sporne situacije\",\r\n\tdisstatus: \"Status\",\r\n\tdisEdit: \"Ažuriraj situaciju\",\r\n\tdisCreate: \"Kreiraj situaciju\",\r\n\tdisFilterFrom: \"Od datuma\",\r\n\tdisFilterTo: \"Do datuma\",\r\n\tpaymentClientOrders: \"Nalozi klijenta\",\r\n\tpaymentClientTransactions: \"Transakcije klijenta\",\r\n\r\n\tguarGuaranteeTitle: \"Garancije\",\r\n\tguarEdit: \"Ažuriraj garanciju\",\r\n\tguarCreate: \"Kreiraj garanciju\",\r\n\r\n\torderDeliveryLocation: \"Mesto isporuke\",\r\n\tfilterReset: \"Resetuj\",\r\n\torderMarket: \"Market\",\r\n\torderMarketSpot: \"Spot\",\r\n\torderMarketForward: \"Forward\",\r\n\torderLocCountry: \"Država\",\r\n\torderLocRegion: \"Region\",\r\n\torderLocDistrict: \"Oblast\",\r\n\torderLocCity: \"Grad\",\r\n\torderLocWhs: \"Skladište\",\r\n\ttradeFulfillmentDate: \"Kraj isporuke\",\r\n\tstartDeliveryDate: \"Početak isporuke\",\r\n\tnavOrdersReport: \"Knjiga naloga\",\r\n\r\n\tstockFeeTitle: \"Skladišne tarife\",\r\n\tstockFeeEdit: \"Ažuriraj skladišnu tarifu\",\r\n\tstockFeeCreate: \"Kreiraj skladišnu tarifu\",\r\n\tstockFeeStartDate: \"Datum početka\",\r\n\tstockFeeStockFee: \"Provizija\",\r\n\tstockFeeStatus: \"Status\",\r\n\r\n\ttransFeeTitle: \"Transport cene\",\r\n\ttransFeeEdit: \"Ažuriraj cenu transporta\",\r\n\ttransFeeCreate: \"Kreiraj cenu transporta\",\r\n\ttransFeeStartDate: \"Datum početka\",\r\n\ttransFeePice: \"Cena\",\r\n\ttransFeeDistance: \"Razdaljina\",\r\n\ttransFeeStatus: \"Status\",\r\n\r\n\tnavTradesReport: \"Knjiga zaključnica\",\r\n\tnavTradesReportAll: \"Knjiga zaključnica - sve\",\r\n\r\n\tdailyTradeReportTitle: \"Dnevni izveštaj\",\r\n\tdailyTradeReportProduct: \"Proizvod\",\r\n\tdailyTradeReportTurnoverRSD: \"Promet RSD\",\r\n\tdailyTradeReportTurnoverEUR: \"Promet EUR\",\r\n\tdailyTradeReportCountTransaction: \"Broj transakcija\",\r\n\tdailyTradeReportReportDate: \"Datum izveštaja\",\r\n\tdailyTradeReportReportWeightedRSD: \"Prosečna cena RSD\",\r\n\tdailyTradeReportReportWeightedEUR: \"Prosečna cena EUR\",\r\n\tdailyTradeReportQuantity: \"Količina\",\r\n\r\n\tmonthlyTradeReportReportTitle: \"KHOV Mesečni izveštaj\",\r\n\tmonthlyTradeReportReportMonth: \"Mesec\",\r\n\tmonthlyTradeReportReportYear: \"Godina\",\r\n\tmonthlyTradeReportReportDate: \"Datum\",\r\n\tmonthlyTradeReportReportQty: \"Količina\",\r\n\tmonthlyTradeReportReportWeightedRSD: \"Prosečna cena RSD\",\r\n\tmonthlyTradeReportReportWeightedEUR: \"Prosečna cena EUR\",\r\n\r\n\tfilterTooltip: \"Filter\",\r\n\texportPDFTooltip: \"Eksportuj PDF\",\r\n\texportXLSXTooltip: \"Eksportuj Excel\",\r\n\texportXMLTooltip: \"Eksportuj XML\",\r\n\tprintTooltip: \"Štampaj\",\r\n\r\n\tweeklyTradeReportTitle: \"Nedeljni izveštaj\",\r\n\twTReportProductTitle: \"Nedeljni izveštaj - Proizvodi\",\r\n\twTReportClientTitle: \"Nedeljni izveštaj - Klijenti\",\r\n\twTReportDateTitle: \"Nedeljni izveštaj - Datum\",\r\n\tweeklyTradeWeek: \"Nedelja\",\r\n\tweeklyTradeReportProduct: \"Proizvod\",\r\n\tweeklyTradeReportClient: \"Klijent\",\r\n\tweeklyTradeReportDate: \"Datum\",\r\n\tweeklyTradeReportTurnoverRSD: \"Promet RSD\",\r\n\tweeklyTradeReportTurnoverEUR: \"Promet EUR\",\r\n\tweeklyTradeReportCountTransaction: \"Broj transakcija\",\r\n\tweeklyTradeReportQty: \"Količina\",\r\n\twTReportWeightedPrice: \"Prosečna cena RSD\",\r\n\twTReportWeightedPriceeur: \"Prosečna cena EUR\",\r\n\twTableProduct: \"Proizvod\",\r\n\twTableClient: \"Klijent\",\r\n\twTableDate: \"Datum\",\r\n\r\n\tmonthlyTradeReportTitle: \"Mesečni izveštaj\",\r\n\tmTReportProductTitle: \"Mesečni izveštaj - Proizvodi\",\r\n\tmTReportClientTitle: \"Mesečni izveštaj - Klijenti\",\r\n\tmTReportDateTitle: \"Mesečni izveštaj - Datum\",\r\n\tmonthlyTradeMonth: \"Mesec\",\r\n\tmonthlyTradeReportProduct: \"Proizvod\",\r\n\tmonthlyTradeReportClient: \"Klijent\",\r\n\tmonthlyTradeReportDate: \"Datum\",\r\n\tmonthlyTradeReportTurnoverRSD: \"Promet RSD\",\r\n\tmonthlyTradeReportTurnoverEUR: \"Promet EUR\",\r\n\tmonthlyTradeReportCountTransaction: \"Broj transakcija\",\r\n\tmonthlyTradeReportQty: \"Količina\",\r\n\tmTReportWeightedPrice: \"Prosečna cena RSD\",\r\n\tmTReportWeightedPriceeur: \"Prosečna cena EUR\",\r\n\tmTableProduct: \"Proizvod\",\r\n\tmTableClient: \"Klijent\",\r\n\tmTableDate: \"Datum\",\r\n\r\n\tannualTradeReportTitle: \"Godišnji izveštaj\",\r\n\taTReportProductTitle: \"Godišnji izveštaj - Proizvodi\",\r\n\taTReportClientTitle: \"Godišnji izveštaj - Klijenti\",\r\n\taTReportDateTitle: \"Godišnji izveštaj - Datum\",\r\n\tannualTradeYear: \"Godina\",\r\n\tannualTradeReportProduct: \"Proizvod\",\r\n\tannualTradeReportClient: \"Klijent\",\r\n\tannualTradeReportDate: \"Datum\",\r\n\tannualTradeReportTurnoverRSD: \"Promet RSD\",\r\n\tannualTradeReportTurnoverEUR: \"Promet EUR\",\r\n\tannualTradeReportCountTransaction: \"Broj transakcija\",\r\n\tannualTradeReportQty: \"Količina\",\r\n\taTReportWeightedPrice: \"Prosečna cena RSD\",\r\n\taTReportWeightedPriceeur: \"Prosečna cena EUR\",\r\n\taTableProduct: \"Proizvod\",\r\n\taTableClient: \"Klijent\",\r\n\taTableDate: \"Datum\",\r\n\r\n\torderFundCheckButton: \"U redu\",\r\n\torderFundCheckTitle: \"Provere sredstava\",\r\n\r\n\tweeklyNumofWeeks: \"Broj nedelja\",\r\n\tmonthlyNumofmonths: \"Broj meseci\",\r\n\r\n\tTASTitle: \"Transport i skladištenje\",\r\n\tTASCalcStorage: \"Obračunava se skladištenje\",\r\n\tTASCalTransport: \"Obračunava se transport\",\r\n\tTASCaclulate: \"Izračunaj\",\r\n\tTASConfirm: \"Potvrdi\",\r\n\tTASDistance: \"Dužina vozne rute\",\r\n\tTASStorageCosts: \"Troškovi skladištenja\",\r\n\tTASTransportCosts: \"Troškovi transporta\",\r\n\tTASTooltip: \"Obrada troškova transporta i skladištenja\",\r\n\tTASCancel: \"Otkaži\",\r\n\tTASWarning: \"Troškovi su beć obračunati! Ponovnim obračunom će prethodni biti poništen!\",\r\n\r\n\tsecCommDailyTradeReportTitle: \"KHOV Dnevni izveštaj\",\r\n\tsecCommQuarterlyTradeReportTitle: \"KHOV Kvartalni izveštaj\",\r\n\tsecCommAnnualyTradeReportTitle: \"KHOV Godišnji izveštaj\",\r\n\tsecCommProduct: \"Proizvod\",\r\n\tsecCommTurnoverRSD: \"Promet RSD\",\r\n\tsecCommTurnoverEUR: \"Promet EUR\",\r\n\tsecCommCountTransaction: \"Broj transakcija\",\r\n\tsecCommReportDate: \"Datum izveštaja\",\r\n\tsecCommReportWeightedRSD: \"Prosečna cena RSD\",\r\n\tsecCommReportWeightedEUR: \"Prosečna cena EUR\",\r\n\tsecCommReportQty: \"Količina\",\r\n\tsecCommReportQuarter: \"Kvartal\",\r\n\r\n\tamtimnylndcommTradeNumber: \"Broj transakcije\",\r\n\tamtimnylndcommTradeDate: \"Broj transakcije\",\r\n\tamtimnylndcommProduct: \"Proizvod\",\r\n\tamtimnylndcommQuantity: \"Količina\",\r\n\tamtimnylndcommPrice: \"Cena\",\r\n\tamtimnylndcommAmount: \"Vrednost\",\r\n\tamtimnylndcommBuyer: \"Kupac\",\r\n\tamtimnylndcommSeller: \"Prodavac\",\r\n\tamtimnylndcommReportTitle: \"Pranje novca\",\r\n\tamtimnylndcommLimit: \"Limit\",\r\n\r\n\texmemTitle: \"Članovi berze\",\r\n\texmemMemberName: \"Naziv Člana\",\r\n\texmemMemberId: \"Matični broj\",\r\n\texmemTaxCode: \"Pib\",\r\n\texmemAdress: \"Adresa\",\r\n\texmemPhone: \"Telefon\",\r\n\texmemManager: \"Direktor\",\r\n\texmemTrader: \"Trgovac\",\r\n\texmemContactPerson: \"Kontakt osoba\",\r\n\r\n\tmemcontTitle: \"Ugovori članova berze\",\r\n\tmemcontMember: \"Član\",\r\n\tmemcontContractDate: \"Datum ugovora\",\r\n\tmemcontExpireDate: \"Datum isteka ugovora\",\r\n\tmemcontStatus: \"Status\",\r\n\r\n\texchDateFrom: \"Datum od\",\r\n\texchDateTo: \"Datum do\",\r\n\texchTradeReview: \"Pregled trgovanja\",\r\n\texchCommissionReview: \"Pregled provizija\",\r\n\texchTradeByProduct: \"Pregled trgovanja po proizvodu\",\r\n\texchBusinessActivities: \"Poslovanje u periodu\",\r\n\texchTurnoverByClient: \"Promet po klijentima\",\r\n\texchTurnoverByBrokers: \"Promet po brokerima\",\r\n\texchWeightedPrice: \"Ponderisane cene\",\r\n\texchDate: \"Datum\",\r\n\texchTradeNumber: \"Broj transakcije\",\r\n\texchTradeDate: \"Datum transakcije\",\r\n\texchProduct: \"Proizvod\",\r\n\texchPrice: \"Cena\",\r\n\texchQuantity: \"Količina\",\r\n\texchAmount: \"Iznos\",\r\n\texchClient: \"Klijent\",\r\n\texchTransactionDate: \"Datum transakcije\",\r\n\texchTransactionNumber: \"Broj transakcije\",\r\n\texchOrderNumber: \"Broj naloga\",\r\n\texchSide: \"Strana\",\r\n\texchCommission: \"Provizija\",\r\n\texchTurnoverValue: \"Promet\",\r\n\texchBuyersCommission: \"Provizija kupca\",\r\n\texchSellersCommission: \"Provizija prodavca\",\r\n\texchBuyerBroker: \"Broker kupca\",\r\n\texchSellerBroker: \"Broker prodavca\",\r\n\texchCommissionValue: \"Iznos Provizije\",\r\n\texchTurnoverParticipation: \"Učešće u prometu\",\r\n\texchCommissionParticipation: \"Učešće u proviziji\",\r\n\texchBuyer: \"Kupac\",\r\n\texchSeller: \"Prodavac\",\r\n\texchTurnoverRsd: \"Promet Rsd\",\r\n\texchTurnoverEur: \"Promet EUR\",\r\n\texchWeightedPriceRsd: \"Ponderisana cena Rsd\",\r\n\texchWeightedPriceEur: \"Ponderisana cena Eur\",\r\n\r\n\tannualNumofyears: \"Broj godina\",\r\n\r\n\tpleaseWait: \"Molimo sačekajte...\",\r\n\r\n\tcreateInvoiceTitle: \"Automatsko kreiranje faktura\",\r\n\tinvoiceCreate: \"Kreiraj fakturu\",\r\n\tinvoiceEdit: \"Ažuriraj fakturu\",\r\n\tinvoiceTitle: \"Fakture\",\r\n\tinvoiceInvNo: \"Broj Fakture\",\r\n\tinvoiceInvDate: \"Datum Fakture\",\r\n\tinvoiceInvTypeDescr: \"Tip Fakture\",\r\n\tinvoiceTranDate: \"Datum prometa\",\r\n\tinvoiceDueDate: \"Datum valute\",\r\n\tinvoiceDescr: \"Opis fakture\",\r\n\tinvoiceTranNo: \"Broj transakcije\",\r\n\tinvoiceClientIdNo: \"MB klijenta\",\r\n\tinvoiceClientName: \"Klijent\",\r\n\tinvoiceTradeAmt: \"Iznos trgovanja\",\r\n\tinvoiceTradeAmtWithVat: \"Osnovica za obračun provizije\",\r\n\tinvoiceCommPerc: \"% provizije\",\r\n\tinvoiceAmt: \"Iznos provizije\",\r\n\tinvoiceVatPerc: \"% pdv\",\r\n\tinvoiceVatAmt: \"Iznos pdv\",\r\n\tinvoiceInvAmt: \"Iznos za plaćanje\",\r\n\tinvoiceCurrCode: \"Valuta\",\r\n\tinvoiceBookDate: \"Datum knjiženja\",\r\n\tinvoiceCmpAccount: \"Račun\",\r\n\tinvoiceModel: \"Model\",\r\n\tinvoiceReffNo: \"Poziv na broj\",\r\n\tinvoiceStatus: \"Status\",\r\n\tinvoiceQuantity: \"Količina\",\r\n\tinvoicePrice: \"Cena\",\r\n\tinvoiceOrderNo: \"Br.Naloga\",\r\n\tinvoiceProductName: \"Proizvod\",\r\n\r\n\tiInvoiceTooltip: \"Kreiraj fakture\",\r\n\r\n\tinvoicingMessage: \"Fakturisanje uspešno završeno.\",\r\n\tinvoicingMessageTitle: \"Fakturisanje\",\r\n\tinvoicingMessageConfim: \"OK\",\r\n\r\n\taccountingOrderTooltip: \"Kreiraj nalog\",\r\n\taccountingOrderTitle: \"Nalog za knjiženje\",\r\n\taccountingOrderMessage: \"Formiranje naloga završeno.\",\r\n\taccountingOrderMessageTitle: \"Formiranje naloga\",\r\n\taccountingOrderConfim: \"OK\",\r\n\r\n\ttradingDataRefPriceTooltip: \"Obracunaj referentne cene\",\r\n\ttradingDataTitle: \"Podaci o trgovanju\",\r\n\ttradingDataDataTime: \"Datum\",\r\n\ttradingDataProductCode: \"Oznaka proizvoda\",\r\n\ttradingDataProductName: \"Naziv proizvoda\",\r\n\ttradingDataRefPrice: \"Referentna cena\",\r\n\ttradingDataBestBid: \"Najbolja ponuda\",\r\n\ttradingDataBestBidQty: \"Najbolja ponuda kolicina\",\r\n\ttradingDataBestAsk: \"Najbolja traznja\",\r\n\ttradingDataBestAskQty: \"Najbolja tražnja količina\",\r\n\ttradingDataOpenPrice: \"Cena na otvaranju\",\r\n\ttradingDataHighPrice: \"Najviša cena\",\r\n\ttradingDataLowPrice: \"Najniža cena\",\r\n\ttradingDataClosePrice: \"Cena na zatvaranju\",\r\n\ttradingDataVolume: \"Količina\",\r\n\ttradingDataAmount: \"Iznos\",\r\n\ttradingDataWeightedPrice: \"Prosečna cena\",\r\n\ttradingDataMidPrice: \"Srednja cena\",\r\n\ttradingDatadatefrom: \"Od datuma\",\r\n\ttradingDatadateto: \"Do datuma\",\r\n\ttradingDataEdit: \"Ažuriraj referentnu cenu\",\r\n\r\n\tmarginsDataCalculationTooltip: \"Obracunaj margine\",\r\n\tmarginsDataTitle: \"Podaci o marginama\",\r\n\tmarginsDataCalcDate: \"Datum\",\r\n\tmarginsDataTradeNo: \"Broj zaključnice\",\r\n\tmarginsDataTradeDate: \"Datum zaključnice\",\r\n\tmarginsDataSide: \"Strana\",\r\n\tmarginsDataClientIdNo: \"Matični broj\",\r\n\tmarginsDataClientName: \"Klijent\",\r\n\tmarginsDataProductCode: \"Oznaka proizvoda\",\r\n\tmarginsDataProductName: \"Naziv proizvoda\",\r\n\tmarginsDataContrPrice: \"Cena robe\",\r\n\tmarginsDataContrValue: \"Iznos zaključnice\",\r\n\tmarginsDataGainLoss: \"Dobitak/Gubitak\",\r\n\tmarginsDataMarginReq: \"Zahtevana margina\",\r\n\tmarginsDataMarginCall: \"Tražena doplata margine\",\r\n\tmarginsDataMarginBal: \"Balans margine\",\r\n\tmarginsDataBalPlusGL: \"Balans sa G/L\",\r\n\tmarginsDataCoverPerc: \"Procenat pokrivenosti\",\r\n\tmarginsDataMaintTriggered: \"Aktivacija održavanja margine\",\r\n\tmarginsDatadatefrom: \"Od datuma\",\r\n\tmarginsDatadateto: \"Do datuma\",\r\n\r\n\tnoFutureDate: \"Datum ne sme biti veći od današnjeg.\",\r\n\r\n\torderQtyMatched: \"Uparena količina\",\r\n\talarmTime: \"Vreme alarma\",\r\n\talarmCrossName: \"Cross alarm\",\r\n\talarmProductName: \"Alarm za proizvod\",\r\n\talarmClientName: \"Alarm za člana\",\r\n\tnotificationNewOrder: \"Novi nalog\",\r\n\tnotificationNewTrade: \"Nova transakcija\",\r\n\r\n\ttradingDataMessage: \"Obračun cena završen.\",\r\n\ttradingDataMessageTitle: \"Obračun cena\",\r\n\ttradingDataConfim: \"OK\",\r\n\ttradingDataReportDate: \"Datum obračuna cena\",\r\n\r\n\tmarginsDataMessage: \"Obračun margina završen.\",\r\n\tmarginsDataMessageNoData: \"Nema aktivnih terminskih ugovora za datum.\",\r\n\tmarginsDataMessageTitle: \"Obračun margina\",\r\n\tmarginsDataConfim: \"OK\",\r\n\tmarginsDataReportDate: \"Datum obračuna margine\",\r\n\r\n\talarmAlmType: \"Tip alarma\",\r\n\talarmUserName: \"Korisnik\",\r\n\talarmClient: \"Klijent\",\r\n\talarmProductCode: \"Oznaka proizvoda\",\r\n\talarmProduct: \"Proizvod\",\r\n\talarmActive: \"Status\",\r\n\talarmEdit: \"Ažuriraj alarm\",\r\n\talarmCreate: \"Kreiraj alarm\",\r\n\talarmTitle: \"Alarmi\",\r\n\talarmTypeCros: \"Cross nalog\",\r\n\talarmTypeProduct: \"Proizvod\",\r\n\talarmTypeUser: \"Klijent\",\r\n\talarmUniqueMessage: \"Alarm je vec postavljen\",\r\n\talarmTypeUserProduct: \"Klijent i proizvod\",\r\n\r\n\talarmProductClientName: \"Alram za klijent i proizvod\",\r\n\talarmBuyOrderNumber: \"Broj kupovnog naloga\",\r\n\talarmSellOrderNumber: \"Broj prodajnog naloga\",\r\n\tallowSystemNotifications: \"Ukljuci sistemske notifikacije\",\r\n\r\n\tattrCompTypeLessThan: \"<=\",\r\n\tattrCompTypeEqual: \"=\",\r\n\tattrCompTypeMoreThan: \">=\",\r\n\tattrCompType: \"Komparator\",\r\n\tproductAttributeHasStandard: \"Ima standardnu vrednost\",\r\n\tproductAttributeStandardValue: \"Standardna vrednost\",\r\n\r\n\torderParameters: \"Parametri naloga\",\r\n\ttradeParameters: \"Parametri transakcije\",\r\n\torderDepositeAmount: \"Potreban iznos \",\r\n\torderDepositeAmountPayed: \"Plaćen iznos \",\r\n\tpaymentAmtBal: \"Ukupna sredstava\",\r\n\tpaymentAmtBalNonAlloc: \"Nealocirana sredstava\",\r\n\r\n\tattributeSRPS: \"Prema PSTM\", \r\n\t// \"SRPS kvalitet\",\r\n\r\n\tpaymentAmtOrdersBal: \"Stanje na nalozima\",\r\n\tpaymentAmtTradesBal: \"Stanje na transakicjama\",\r\n\r\n\tdeliveryTradeQty: \"Ugovorena količina\",\r\n\tdeliveryLeftQty: \"Preostalo za isporuku\",\r\n\r\n\tclientCardTitle: \"Kartica klijenta\",\r\n\r\n\tgrntTitle: \"Bankarske garancije\",\r\n\tgrntNo: \"Broj garancije\",\r\n\tgrntDate: \"Datum\",\r\n\tgrntClientCode: \"Matbr klijenta\",\r\n\tgrntClientName: \"Naziv klijenta\",\r\n\tgrntBankCode: \"Šifra banke\",\r\n\tgrntBankName: \"Naziv banke\",\r\n\tgrntExpiryDate: \"Datum isteka\",\r\n\tgrntAmount: \"Iznos\",\r\n\tgrntCurrCode: \"Valuta\",\r\n\tgrntStatus: \"Status\",\r\n\tgrntEdit: \"Ažuriraj garanciju\",\r\n\tgrntCreate: \"Kreiraj garanciju\",\r\n\tgrntActView: \"Prikaz\",\r\n\r\n\tmainTableBid: \"Kupovina\",\r\n\tmainTableAsk: \"Prodaja\",\r\n\r\n\ttradesReportMessage: \"Koju potvrdu preuzimate?\",\r\n\ttradesReportTitle: \"Preuzimanje\",\r\n\ttradesReportMessageConfim: \"Kupovina\",\r\n\r\n\terrorTitle: \"Greška\",\r\n\terrorConfirm: \"OK\",\r\n\terrorProductDelete: \"Proizvod koji je bio u nekom nalogu ne može da se briše.\",\r\n\terrorProductAttributeDelete: \"Atribut proizvoda koji je bio u nekom nalogu ne može da se briše.\",\r\n\terrorClientDelete: \"Brisanje se ne može izvršiti zbog konflikta reference podataka.\",\r\n\r\n\torderLogDataChangeTime: \"Vreme promene\",\r\n\torderLogDataUserName: \"Korisnik\",\r\n\torderLogDataActivity: \"Akcija\",\r\n\torderLogDataStatus: \"Status\",\r\n\torderLogDataRefOrder: \"Veza nalog\",\r\n\torderLogDataTable: \"Istorijat\",\r\n\torderLogDataEmpty: \"Nema istorijata\",\r\n\r\n\tnewsTime: \"Datum\",\r\n\tnewsTitle: \"Naslov \",\r\n\tnewsTitleen: \"Naslov engleski\",\r\n\tnewsLokacija: \"Naziv fajla\",\r\n\tnewsTitleTitle: \"Vesti\",\r\n\tnewsEditTitle: \"Ažuriraj vest\",\r\n\tnewsCreateTitle: \"Kreiraj vest\",\r\n\tnewsShow: \"Prikaži vest\",\r\n\r\n\tpayTypeDesc: \"Način plaćanja (SR) \",\r\n\tpayTypeDescEn: \"Način plaćanja (EN)\",\r\n\tpayTypeTitle: \"Način plaćanja\",\r\n\tpayTypeEditTitle: \"ažuriraj način plaćanja\",\r\n\tpayTypeCreateTitle: \"Kreiraj način plaćanja\",\r\n\tpayTypeStatus: \"Status\",\r\n\tpayTypePonder: \"Ponder\",\r\n\r\n\thistoryProd1: \"Kukuruz\",\r\n\thistoryProd2: \"Pšenica\",\r\n\thistoryProd3: \"Soja nije GMO\",\r\n\r\n\tAttrPsmtTitle: \"Parametri kvaliteta prema PSTM\",\r\n\r\n\tloginRemember: \"Zapamti me\",\r\n\tloginForget: \"Zaboravi me\",\r\n\r\n\tpushNotifications: \"Notifikacije\",\r\n\tpushNotification: \"Notifikacija\",\r\n\r\n\tnotifPacking: \"Pakovanje\",\r\n\tnotifOrigin: \"Poreklo\",\r\n\tnotifDirectorate: \"Direkcija\",\r\n\r\n};\r\n","export const srErrors = {\r\n\t\"http-login-error\": \"Greška u komunikaciji sa serverom\",\r\n\t\"E-4\": \"Niste ovlašćeni za rad u aplikaciji\",\r\n};\r\n","import { LocalizationLanguage } from \"./types\";\r\n\r\nexport const enTranslations = {\r\n\tlanguage: LocalizationLanguage.EN as LocalizationLanguage,\r\n\tdecimalSeparator: \".\",\r\n\tmomentLocale: \"en\",\r\n\tmainTitle: \"NSCOMEX\",\r\n\ttableNextPage: \"Next page\",\r\n\ttablePreviousPage: \"Previous page\",\r\n\ttableFirsPage: \"First page\",\r\n\ttableLastPage: \"Last page\",\r\n\ttableDisplayedRows: \"{from}-{to} from {count}\",\r\n\ttabledDisplayedPerPage: \"rows\",\r\n\torderActView: \"Show order\",\r\n\torderActReply: \"Reply to order\",\r\n\torderWaitingProducts: \"Please wait...\",\r\n\torderSideBuy: \"BUY\",\r\n\torderSideSell: \"SELL\",\r\n\tlistingOrdersTitle: \"Orders\",\r\n\tuserOrdersTitle: \"My orders\",\r\n\tarchiveOrdersTitle: \"Archive\",\r\n\tsearch: \"Search\",\r\n\tcompanyClmName: \"Name\",\r\n\tcompanyClmHeadquorters: \"Headquaters\",\r\n\tcompanyClmMemberFrom: \"Member from\",\r\n\tcompanyClmProvision: \"Commission \",\r\n\treporClmtName: \"Name\",\r\n\treporTitle: \"Reports\",\r\n\treporDownloadTtl: \"Download\",\r\n\tusername: \"Username\",\r\n\tpassword: \"Password\",\r\n\tlogin: \"Login\",\r\n\tlogout: \"Logout\",\r\n\torderChooseProduct: \"Choose product\",\r\n\tnoDataText: \"No data\",\r\n\torderClmOrdNo: \"Number\",\r\n\torderTimeReceived: \"Time Recieved\",\r\n\torderOrdType: \"Type\",\r\n\torderRefOrd: \"Ref order\",\r\n\torderClientIdNo: \"Client number\",\r\n\torderClientName: \"Client name\",\r\n\torderProduct: \"Product\",\r\n\torderYear: \"Year\",\r\n\torderTradingPlace: \"Trading place\",\r\n\torderFranco: \"Franco\",\r\n\torderQty: \"Quantity\",\r\n\torderAllOrNothing: \"All or nothing\",\r\n\torderPrice: \"Price\",\r\n\torderPriceEur: \"Price (EUR)\",\r\n\torderPriceWithoutVat: \"Price without VAT\",\r\n\torderPriceWithVat: \"Price (VAT)\",\r\n\torderPayType: \"Pay type\",\r\n\torderPayDays: \"Payment days\",\r\n\torderFreeStorage: \"Free storage\",\r\n\torderFreeStorageByDelivery: \"By delivery\",\r\n\torderFreeStorageByDate: \"By date:\",\r\n\torderCheckPoint: \"Check point\",\r\n\torderCheckPays: \"Pays check point\",\r\n\torderExpiryDate: \"Expiry date\",\r\n\torderStatus: \"Status\",\r\n\torderQuality: \"Quality\",\r\n\tnumberOfDays: \"Number of days\",\r\n\tnavListing: \"Listing\",\r\n\tnavMyOrders: \"My orders\",\r\n\tnavArchive: \"Archive\",\r\n\tnavCompanies: \"Companies\",\r\n\tnavMembers: \"Members\",\r\n\tnavProducts: \"Products\",\r\n\tnavBrokers: \"Brokers\",\r\n\tnavEmployees: \"Employees\",\r\n\tnavUsers: \"Users\",\r\n\tnavRoles: \"Roles\",\r\n\tnavCodebook: \"Codebook\",\r\n\tnavCountries: \"Countries\",\r\n\tnavTopRegion: \"Region\",\r\n\tnavRegion: \"District\",\r\n\tnavSubRegion: \"SubRegion\",\r\n\tnavCities: \"Cities\",\r\n\tnavCurrencies: \"Currencies\",\r\n\tnavWarehouses: \"Warehouses\",\r\n\tnavTrading: \"Trading\",\r\n\tnavMainTable: \"Main table\",\r\n\tnavOrders: \"Orders\",\r\n\tnavTransactions: \"Transactions\",\r\n\tnavMarketDepth: \"Market Depth\",\r\n\tnavCliring: \"Cliring\",\r\n\tnavDeposits: \"Deposits\",\r\n\tnavMarginCalculations: \"Margin calculations\",\r\n\tnavSurveillance: \"Surveillance\",\r\n\tnavAlarmSetup: \"Alarm setup\",\r\n\tnavProductReport: \"Product report\",\r\n\tnavMemberReport: \"Member report\",\r\n\tnavReports: \"Reports\",\r\n\tnavDailyReports: \"Daily reports\",\r\n\tnavWeeklyReports: \"Weekly reports\",\r\n\tnavMonthlyReports: \"Monthly reports\",\r\n\tnavQuaterlyReports: \"Quaterly reports\",\r\n\tnavAnnualReports: \"Annual reports\",\r\n\tnavSECReports: \"SEC reports\",\r\n\tnavMembersReports: \"Members reports\",\r\n\tnavOrdersReports: \"Orders and trades\",\r\n\tnavAccounting: \"Accounting\",\r\n\tnavTaxes: \"Taxes and commissions\",\r\n\tnavInvoice: \"Invoice generation\",\r\n\tnavAccountingExport: \"Export for accounting\",\r\n\tnavMembersDeposit: \"Members deposit\",\r\n\tempFirstName: \"First name\",\r\n\tempLastName: \"Last name\",\r\n\tempIdNumber: \"ID number\",\r\n\tempOfficePhone: \"Office phone\",\r\n\tempEmail: \"Email\",\r\n\tempStatus: \"Status\",\r\n\tempMidName: \"Middle name\",\r\n\tempGender: \"Gender\",\r\n\tempAddress: \"Address\",\r\n\tempZipCode: \"ZipCode\",\r\n\tempCity: \"City\",\r\n\tempPhone: \"Phone\",\r\n\tempDateOfBirth: \"Date of Birth\",\r\n\tempPosition: \"Position\",\r\n\tempBranch: \"Branch\",\r\n\tempFax: \"Fax\",\r\n\tempShowTooltip: \"Show\",\r\n\tgenderMale: \"Male\",\r\n\tgenderFemale: \"Female\",\r\n\tstatusActive: \"Active\",\r\n\tstatusInactive: \"Inactive\",\r\n\tempEdit: \"Edit\",\r\n\tempDelete: \"Delete\",\r\n\tempEditTitle: \"Edit broker\",\r\n\tempCreateTitle: \"Create broker\",\r\n\tcliName: \"Short name\", //\tnaziv klijenta\r\n\tcliIdNo: \"ID number\", //\tmaticni broj klijenta\r\n\tcliTaxCode: \"Tax code\", //\tPIB broj\r\n\tclijbkjs: \"JBKJS\",\r\n\tcliType: \"Type\",\r\n\tcliForeign: \"Foreign\",\r\n\tcliCity: \"City\",\r\n\tcliPhone: \"Phone\",\r\n\tcliBroker: \"Broker\",\r\n\tcliActive: \"Membership\",\r\n\tcliStatus: \"Status\",\r\n\tclilFullName: \"Name\",\r\n\tcliAddress: \"Adress\",\r\n\tcliMailCity: \"Mail city\",\r\n\tcliMailAddress: \"Mail address\",\r\n\tcliMobile: \"Moblie phone\",\r\n\tcliFax: \"Fax\",\r\n\tcliEmail: \"Email\",\r\n\tcliHasContract: \"Has contract\",\r\n\tcliActiveFrom: \"Active from\",\r\n\tcliActiveTo: \"Acrive to\",\r\n\tcliCommission: \"Commission\",\r\n\tcliCurrentTurnover: \"Turnover\",\r\n\tcliComment: \"Comment\",\r\n\tcilEditTitle: \"Edit client\",\r\n\tcilCreateTitle: \"Create client\",\r\n\tcilTitle: \"Clients\",\r\n\ttableConfirmationDelete: \"Are you sure?\",\r\n\ttableDelete: \"Delete\",\r\n\ttableAdd: \"Add\",\r\n\ttableEdit: \"Edit\",\r\n\ttableCancel: \"Cancel\",\r\n\ttableSave: \"Save\",\r\n\troleCode: \"Code\",\r\n\troleName: \"Name SR\",\r\n\troleNameEn: \"Name EN\",\r\n\ttableShow: \"Show\",\r\n\troleEdit: \"Edit role\",\r\n\troleCreate: \"Create role\",\r\n\troleNameColumn: \"Name\",\r\n\troleIsEmployee: \"Employee\",\r\n\tuserUserName: \"User name\",\r\n\tuserLoginUser: \"Login user\",\r\n\tuserLoginPass: \"Password\",\r\n\tuserChangePass: \"Change password\",\r\n\tuserRoleId: \"Role\",\r\n\tuserIsEmployee: \"Is employee\",\r\n\tuserEmpId: \"Employee\",\r\n\tuserClientId: \"Client\",\r\n\tuserCliPrsId: \"Client person\",\r\n\tuserSubscribedUntil: \"Subscribed until\",\r\n\tuserSubscrUnlimited: \"Unlimited Subscription\",\r\n\tuserIsActive: \"Active\",\r\n\tuserEditTitle: \"Edit user\",\r\n\tuserCreateTitle: \"Create user\",\r\n\ttableBasciInfo: \"Basic info\",\r\n\tclientPersonTitle: \"Persons\",\r\n\tclientPersonName: \"Name\",\r\n\tclientPersonIDNumber: \"ID Number\",\r\n\tclientPersonStatus: \"Status\",\r\n\tclientPersonEmpty: \"There are no persons\",\r\n\tclientBrokerTitle: \"Brokers\",\r\n\tclientBrokerName: \"Name\",\r\n\tclientBrokerIDNumber: \"ID Number\",\r\n\tclientBrokerStatus: \"Status\",\r\n\tclientBrokerEmpty: \"There are no brokers\",\r\n\tcontractTitle: \"Contracts\",\r\n\tcontractNumber: \"Number\",\r\n\tcontractDate: \"Date\",\r\n\tcontractStatus: \"Status\",\r\n\tcontractEmpty: \"There are no contracts\",\r\n\tcontractLincedContrNo: \"Linked contract\",\r\n\tcontractTypeDescription: \"Type\",\r\n\tcontractDescription: \"Description\",\r\n\tcontractPhoneOrder: \"Phone number\",\r\n\tcontractWebUser: \"Web user\",\r\n\tcontractWebUserBlocked: \"Web user blocked\",\r\n\tcontractTitleEdit: \"Edit Contract\",\r\n\tcontractTitleCreate: \"Create Contract\",\r\n\taccountTitle: \"Accounts\",\r\n\taccountTitleEdit: \"Edit Accounts\",\r\n\taccountTitleCreate: \"Create Accounts\",\r\n\taccountNumber: \"Account number\",\r\n\taccountBank: \"Bank\",\r\n\taccountDefault: \"Default account\",\r\n\taccountClientBankCode: \"Client bank code\",\r\n\taccountCurrency: \"Currency\",\r\n\taccountForBuySell: \"Buy/Sell\",\r\n\taccountStatus: \"Status\",\r\n\taccountSideBuy: \"Buy\",\r\n\taccountSideSell: \"Sell\",\r\n\taccountSideBoth: \"Both\",\r\n\taccountEmpty: \"There are no accounts\",\r\n\tinvalidDateMessage: \"Invalid Date Format\",\r\n\tmaxDateMessage: \"Date should not be after maximal date\",\r\n\tminDateMessage: \"Date should not be before minimal date\",\r\n\tclientPersonEditTitle: \"Edit Person\",\r\n\tclientPersonCreateTitle: \"Create Person\",\r\n\tclientBrokerEditTitle: \"Edit Broker\",\r\n\tclientBrokerCreateTitle: \"Create Broker\",\r\n\tleavePageTitle: \"Leave this page?\",\r\n\tleavePageMessage: \"If you leave this page all changes will be discarded.\",\r\n\tleavePageConfirm: \"Leave page\",\r\n\tleavePageCancel: \"Stay\",\r\n\tcalendarOK: \"OK\",\r\n\tcalendarCancel: \"Cancel\",\r\n\tcalendarClear: \"Clear\",\r\n\tproductName: \"Name\",\r\n\tproductNameEN: \"Name (EN)\",\r\n\tproductGroupName: \"Group Name\",\r\n\tproductUnit: \"Unit\",\r\n\tproductVat: \"VAT\",\r\n\tproductHasYieldYear: \"Yield year\",\r\n\tproductStatus: \"Status\",\r\n\tproductTitle: \"Products\",\r\n\tproductEditTitle: \"Edit Product\",\r\n\tproductCreateTitle: \"Create Product\",\r\n\tproductAttributeTitle: \"Product Attributes\",\r\n\tproductAttributeEditTitle: \"Edit Product Attribute\",\r\n\tproductAttributeCreateTitle: \"Create Product Attribute\",\r\n\tproductAttributeName: \"Name\",\r\n\tproductAttributeType: \"Type\",\r\n\tproductAttributeManditory: \"Manditory\",\r\n\tproductAttributeComparator: \"Comparator\",\r\n\tproductAttributeStatus: \"Status\",\r\n\tproductAttributeEmpty: \"There are no attributes\",\r\n\tproductGroupNameSR: \"Name (SR)\",\r\n\tproductGroupNameEN: \"Name (EN)\",\r\n\tproductGroupStatus: \"Status\",\r\n\tproductGroupTitle: \"Product Groups\",\r\n\tproductGroupEditTitle: \"Edit Product Group\",\r\n\tproductGroupCreateTitle: \"Create Product Group\",\r\n\tbankName: \"Bank Name\",\r\n\tbankCode: \"Bank Code\",\r\n\tbankIdNumber: \"Bank Id\",\r\n\tnavBanks: \"Banks\",\r\n\tbankEdit: \"Edit Bank\",\r\n\tbankCreate: \"Create Bank\",\r\n\tbankRegNumber: \"Register number\",\r\n\r\n\twhsName: \"Warehouse name\",\r\n\twhsCode: \"Warehouse code\",\r\n\tnavWhs: \"Warehouses\",\r\n\twhsEdit: \"Edit Warehouse\",\r\n\twhsCreate: \"Create Warehouse\",\r\n\twhsPort: \"Port\",\r\n\twhsDistanceToPort: \"Distance to Port (km)\",\r\n\r\n\tcommission: \"Commission\",\r\n\trequiredMessage: \"Field is required\",\r\n\tmessageWeakPassword: \"Password isn't strong enough\",\r\n\tattributesTitle: \"Attributes\",\r\n\tattributesCreateTitle: \"Create Attribute\",\r\n\tattributesEditTitle: \"Edit Attribute\",\r\n\tattributeName: \"Name\",\r\n\tattributeNameEN: \"Name (EN)\",\r\n\tattributeOrder: \"Display order\",\r\n\tattributeUnit: \"Unit\",\r\n\tattributeValuesTitle: \"Attribute Values\",\r\n\tattributeValuesCreateTitle: \"Create Attribute Value\",\r\n\tattributeValuesEditTitle: \"Edit Attribute Value\",\r\n\tattributeValuesEmpty: \"There are no attribute values\",\r\n\tattributeValueName: \"Name\",\r\n\tattributeValueNameEN: \"Name (EN)\",\r\n\tattributeValueValue: \"Value\",\r\n\tattributeValueValueEN: \"Value (EN)\",\r\n\tattributeValueOrder: \"Display order\",\r\n\tattributeValueStatus: \"Status\",\r\n\tcurrenciesTitle: \"Currencies\",\r\n\tcurrenciesCreateTitle: \"Create Currency\",\r\n\tcurrenciesEditTitle: \"Edit Currency\",\r\n\tcurrenciesName: \"Name\",\r\n\tcurrenciesCode: \"Designation\",\r\n\tcurrenciesNumericCode: \"Code\",\r\n\tregName: \"Region\",\r\n\tregNameDistrict: \"District\",\r\n\tparentRegName: \"Region\",\r\n\tcountryReg: \"Country\",\r\n\tregEdit: \"Edit Region\",\r\n\tregEditDistrict: \"Edit District\",\r\n\tregCreate: \"Create Region\",\r\n\tregCreateDistrict: \"Create District\",\r\n\tcurRateDate: \"Currency rate date\",\r\n\tcurRateBuy: \"Buy rate\",\r\n\tcurRateSell: \"Sell rate\",\r\n\tcurRateMid: \"Mid rate\",\r\n\tcurRateCurrency: \"Currency\",\r\n\tcurRateTitle: \"Currency Rates\",\r\n\tcurRateEditTitle: \"Edit Currency Rates\",\r\n\tcurRateCreateTitle: \"Create Currency Rates\",\r\n\tcountryEdit: \"Edit Country\",\r\n\tcountryCreate: \"Create Country\",\r\n\tcountryCode: \"Code\",\r\n\tcountryName: \"Name\",\r\n\tcountryNameEN: \"Name (EN)\",\r\n\tcityEdit: \"Edit City\",\r\n\tcityCreate: \"Create City\",\r\n\tcityName: \"Name\",\r\n\tcityZipCode: \"Zip Code\",\r\n\tcityRegion: \"District\",\r\n\tcitySubRegion: \"Subregion\",\r\n\tcityIsPort: \"Port\",\r\n\r\n\tcommissionTitle: \"Commissions\",\r\n\tcommissionCreateTitle: \"Create Commission\",\r\n\tcommissionEditTitle: \"Edit Commission\",\r\n\tcommissionCode: \"Code\",\r\n\tcommissionName: \"Name\",\r\n\tcommissionNameEN: \"Name (EN)\",\r\n\tcommissionType: \"Type\",\r\n\tcommissionStandard: \"Standard\",\r\n\tcommDetailsTitle: \"Commission Details\",\r\n\tcommDetailsCreateTitle: \"Create Commission Details\",\r\n\tcommDetailsEditTitle: \"Edit Commission Details\",\r\n\tcommDetailsDate: \"Date from\",\r\n\tcommDetailsProductGroup: \"Product Group\",\r\n\tcommDetailsProduct: \"Product\",\r\n\tcommDetailsCurrency: \"Currency\",\r\n\tcommDetailsAmtCurrency: \"Amount Curency\",\r\n\tcommDetailsAmtTypePercent: \"Percent\",\r\n\tcommDetailsAmtTypeAmount: \"Amount\",\r\n\tcommDetailsBuyAmtType: \"Buy Amount Type\",\r\n\tcommDetailsBuyPerc: \"Buy Percent\",\r\n\tcommDetailsBuyMin: \"Buy Min Amount\",\r\n\tcommDetailsBuyMax: \"Buy Max Amount\",\r\n\tcommDetailsSellAmtType: \"Sell Amount Type\",\r\n\tcommDetailsSellPerc: \"Sell Percent\",\r\n\tcommDetailsSellMin: \"Sell Min Amount\",\r\n\tcommDetailsSellMax: \"Sell Max Amount\",\r\n\tproductCode: \"Code\",\r\n\tclientPersonRole: \"Role\",\r\n\tclientPersonDateCertified: \"Date certified\",\r\n\tclientPersonPhone: \"Phone\",\r\n\tclientPersonEmail: \"Email\",\r\n\torderRecieveMethod: \"Recieve Method\",\r\n\torderEditTitle: \"Edit order\",\r\n\torderCreateTitle: \"Create order\",\r\n\torderGoodsReadyFrom: \"Goods ready from\",\r\n\torderGoodsReadyTo: \"Goods ready to\",\r\n\torderAttrName: \"Name\",\r\n\torderAttrValue: \"Value\",\r\n\torderAttrTitle: \"Quality paraneters\",\r\n\torderAttrCreateTitle: \"Crete attribute\",\r\n\torderAttrEditAttribute: \"Edit attribute\",\r\n\torderReceiveMethod: \"Order Receive Method\",\r\n\torderbrokName: \"Broker Name\",\r\n\torderUserName: \"User Name\",\r\n\torderCliPrsName: \"Client Person Name\",\r\n\torderProdCode: \"Product Code\",\r\n\torderUnit: \"Unit\",\r\n\torderQtyLeft: \"Quantity Left\",\r\n\torderPriceVat: \"Vat\",\r\n\torderMinQty: \"Minimum Quantity\",\r\n\torderComment: \"Comment\",\r\n\torderCommission: \"Commission\",\r\n\tordergoodsRedyFrom: \"Goods Ready From\",\r\n\tordergoodsRedyTo: \"Goods Ready To\",\r\n\torderStatusDescr: \"Status\",\r\n\torderCancelReplTime: \"Cancel Replacement Time\",\r\n\torderPayData: \"Pay Data\",\r\n\torderSide: \"Side\",\r\n\torderCurrCode: \"Cuurency\",\r\n\torderexportReady: \"Export Ready\",\r\n\torderBankGuarantee: \"Bank Guarantee\",\r\n\torderActive: \"Membership not paid\",\r\n\r\n\ttradeTitle: \"Trades\",\r\n\ttradeNo: \"Trade Number\",\r\n\ttradeTime: \"Trade Time\",\r\n\ttranNoSell: \"Trade Sell Number\",\r\n\torderNoSell: \"Trade Sell Order\",\r\n\tclientNameSell: \"Seller\",\r\n\ttranNoBuy: \"Trade Buy Number\",\r\n\torderNoBuy: \"Trade Buy Order\",\r\n\tclientNameBuy: \"Buyer\",\r\n\ttradeProdCode: \"Product Code\",\r\n\ttradeProdName: \"Product Name\",\r\n\ttradeQty: \"Quantity\",\r\n\ttradeStatusDescr: \"Status\",\r\n\ttradeDeliveryDescr: \"Delivery Status\",\r\n\ttradePrice: \"Price\",\r\n\tlistingOrdersBookTitle: \"Order Book\",\r\n\torderCancel: \"Cancel order\",\r\n\torderCancelQuestion: \"Cancel order?\",\r\n\torderCancelQuestionYes: \"Yes\",\r\n\torderCancelQuestionNo: \"No\",\r\n\torderConfirmQuestion: \"Confirm order?\",\r\n\torderModify: \"Modify order\",\r\n\torderVerify: \"Verify order\",\r\n\torderConfirm: \"Confirm nalog\",\r\n\torderReplay: \"Reply order\",\r\n\torderDelete: \"Delete order\",\r\n\ttradeVatPerc: \"Vat %\",\r\n\ttradePriceWithVat: \"Price with Vat\",\r\n\ttradeAmt: \"Amount\",\r\n\ttradeAmtWithVat: \"Amount with Vat\",\r\n\ttradeTransCostSell: \"Transport Costs Seller\",\r\n\ttradeStorCostSell: \"Storage Costs Seller\",\r\n\ttradeTransCostBuy: \"Transport Costs Buyer\",\r\n\ttradeStorCostBuy: \"Storage Costs Buyer\",\r\n\ttradeCommPercSell: \"Commission Seller %\",\r\n\ttradeCommAmtSell: \"Commission Seller \",\r\n\ttradeCommPercBuy: \"Commission Buyer %\", \r\n\ttradeCommAmtBuy: \"Commission Buyer\",\r\n\ttradeDeliveryWhsName: \"Warehouse\",\r\n\ttradePayTypeDescr: \"Pay Type\",\r\n\r\n\torderFilterConfirm: \"Filter\",\r\n\torderFilterCancel: \"Cancel\",\r\n\torderFilterFrom: \"Order from\",\r\n\torderFilterTo: \"Order to\",\r\n\ttradeFilterFrom: \"Trade from\",\r\n\ttradeFilterTo: \"Trade to\",\r\n\ttradeViewAction: \"View trade\",\r\n\ttradeCancelAction: \"Cancel trade\",\r\n\torderTradeQuestion: \"Cancel trade?\",\r\n\tfilterFrom: \"from\",\r\n\tfilterTo: \"to\",\r\n\tpaymentTitle: \"Payment\",\r\n\tpaymentDataTime: \"Date\",\r\n\tpaymentClientCode: \"Client Code\",\r\n\tpaymentClientName: \"Client Name\",\r\n\tpaymentPayType: \"Pay Type\",\r\n\tpaymentClmOrdNo: \"Order No.\",\r\n\tpaymentTranNo: \"Transaction No.\",\r\n\tpaymentAmount: \"Amount\",\r\n\tpaymentAmountIn: \"Amount In\",\r\n\tpaymentAmountOut: \"Amount Out\",\r\n\tpaymentCurrCode: \"Currency\",\r\n\tpaymentStatus: \"Status\",\r\n\tdatefrom: \"From date\",\r\n\tdateto: \"To date\",\r\n\tpaymentEdit: \"Edit Payment\",\r\n\tpaymentCreate: \"Create Payment\",\r\n\tpaymentSideIn: \"In\",\r\n\tpaymentSideOut: \"Out\",\r\n\tpaymentSide: \"In/Out\",\r\n\tpaymentSideNonDedicated: \"Non Dedicated\",\r\n\tpaymentSideDedicated: \"Dedicated\",\r\n\tpaymentSideDedication: \"Dedication\",\r\n\tpaymentBankGuarantee: \"Bank Guarantee\",\r\n paymentMatchingQty: \"Matching qty\",\r\n\r\n\tctrlGoodsTitle: \"Control\",\r\n\tctrlcontrolDate: \"Date\",\r\n\tctrltradeNo: \"Trade No.\",\r\n\tctrlsellerCode: \"Seller Code\",\r\n\tctrlsellerName: \"Seller\",\r\n\tctrlbuyerCode: \"Buyer Code\",\r\n\tctrlbuyerName: \"Buyer\",\r\n\tctrlproductCode: \"Product Code\",\r\n\tctrlproductName: \"Product Name\",\r\n\tctrlcheckPointDescr: \"Check Point\",\r\n\tctrlcheckDoneByDescr: \"Check Done By\",\r\n\tctrlcheckPaysDescr: \"Check Pays\",\r\n\tctrlcontrolHouse: \"Control House\",\r\n\tctrlcontrolReport: \"Control Report\",\r\n\tctrlcontrolReportText: \"Control Report Text\",\r\n\tctrlcontrolReportFile: \"Control Report File\",\r\n\tctrlstatus: \"Status\",\r\n\tcrtlGoodsEdit: \"Edit Control\",\r\n\tctrlGoodsCreate: \"Create Control\",\r\n\tctrlFilterFrom: \"From Date\",\r\n\tctrlFilterTo: \"To Date\",\r\n\r\n\tdlvrDiliveryTitle: \"Delivery\",\r\n\tdlvrDeliveryDate: \"Date\",\r\n\tdlvrTradeNo: \"Trade No.\",\r\n\tdlvrsellerCode: \"Seller Code\",\r\n\tdlvrsellerName: \"Seller\",\r\n\tdlvrbuyerCode: \"Buyer Code\",\r\n\tdlvrbuyerName: \"Buyer\",\r\n\tdlvrproductCode: \"Product Code\",\r\n\tdlvrproductName: \"Product\",\r\n\tdlvrDeliverQty: \"Delivery Qty\",\r\n\tdlvrLeftQty: \"Left Qty\",\r\n\tdlvrTradeQty: \"Trade Qty\",\r\n\tdlvrUnit: \"Unit\",\r\n\tdlvrCityCode: \"City Code\",\r\n\tdlvrCityName: \"City\",\r\n\tdlvrWarehouseCode: \"Warehouse Code\",\r\n\tdlvrWarehouseName: \"Warehouse\",\r\n\tdlvrstatus: \"Status\",\r\n\tdlvrEdit: \"Edit Delivery\",\r\n\tdlvrCreate: \"Create Delivery\",\r\n\tdlvrFilterFrom: \"From Date\",\r\n\tdlvrFilterTo: \"To Date\",\r\n\tdlvrValue: \"Value of Delivery Qty\",\r\n\r\n\tdlsDisputeTitle: \"Dispute Situation\",\r\n\tdisDispSitDate: \"Date\",\r\n\tdisTradeNo: \"Trade No.\",\r\n\tdissellerCode: \"Seller Code\",\r\n\tdissellerName: \"Seller\",\r\n\tdisbuyerCode: \"Buyer Code\",\r\n\tdisbuyerName: \"Buyer\",\r\n\tdisproductCode: \"Product Code\",\r\n\tdisproductName: \"Product\",\r\n\tdisDisputeDescr: \"Dispute Description\",\r\n\tdisstatus: \"Status\",\r\n\tdisEdit: \"Edit Dispute\",\r\n\tdisCreate: \"Crate Dispute\",\r\n\tdisFilterFrom: \"From Date\",\r\n\tdisFilterTo: \"To Date\",\r\n\tpaymentClientOrders: \"Client orders\",\r\n\tpaymentClientTransactions: \"Client transactions\",\r\n\tguarGuaranteeTitle: \"Guarantees\",\r\n\tguarEdit: \"Edit Guarantee\",\r\n\tguarCreate: \"Create Guarantee\",\r\n\r\n\torderDeliveryLocation: \"Delivery Location\",\r\n\tfilterReset: \"Clear\",\r\n\torderMarket: \"Market\",\r\n\torderMarketSpot: \"Spot\",\r\n\torderMarketForward: \"Forward\",\r\n\torderLocCountry: \"Country\",\r\n\torderLocRegion: \"Region\",\r\n\torderLocDistrict: \"District\",\r\n\torderLocCity: \"City\",\r\n\torderLocWhs: \"Warehouse\",\r\n\ttradeFulfillmentDate: \"Fulfillment Date\",\r\n\tstartDeliveryDate: \"Start Delivery Date\",\r\n\tnavOrdersReport: \"Order book\",\r\n\r\n\tstockFeeTitle: \"Stock Fees\",\r\n\tstockFeeEdit: \"Edit Stock Fee\",\r\n\tstockFeeCreate: \"Create Stock Fee\",\r\n\tstockFeeStartDate: \"Start Date\",\r\n\tstockFeeStockFee: \"Stock Fee\",\r\n\tstockFeeStatus: \"Status\",\r\n\r\n\ttransFeeTitle: \"Transport Fees\",\r\n\ttransFeeEdit: \"Edit Transport Fee\",\r\n\ttransFeeCreate: \"Create Transport Fee\",\r\n\ttransFeeStartDate: \"Start Date\",\r\n\ttransFeePice: \"Price\",\r\n\ttransFeeDistance: \"Distance\",\r\n\ttransFeeStatus: \"Status\",\r\n\r\n\tnavTradesReport: \"Trade Book\",\r\n\tnavTradesReportAll: \"Trade Book - All\",\r\n\r\n\r\n\tdailyTradeReportTitle: \"Daily Trades\",\r\n\tdailyTradeReportProduct: \"Product\",\r\n\tdailyTradeReportTurnoverRSD: \"Turnover RSD\",\r\n\tdailyTradeReportTurnoverEUR: \"Turnover EUR\",\r\n\tdailyTradeReportCountTransaction: \"Transaction Count\",\r\n\tdailyTradeReportReportDate: \"Report Date\",\r\n\tdailyTradeReportReportWeightedRSD: \"Average Price RSD\",\r\n\tdailyTradeReportReportWeightedEUR: \"Average Price EUR\",\r\n\tdailyTradeReportQuantity: \"Quantity\",\r\n\r\n\tmonthlyTradeReportReportTitle: \"SEC Monthly Trades Report\",\r\n\tmonthlyTradeReportReportMonth: \"Month\",\r\n\tmonthlyTradeReportReportYear: \"Year\",\r\n\tmonthlyTradeReportReportDate: \"Date\",\r\n\tmonthlyTradeReportReportQty: \"Quantity\",\r\n\tmonthlyTradeReportReportWeightedRSD: \"Average Price RSD\",\r\n\tmonthlyTradeReportReportWeightedEUR: \"Average Price EUR\",\r\n\r\n\tfilterTooltip: \"Filter\",\r\n\texportPDFTooltip: \"Download PDF\",\r\n\texportXLSXTooltip: \"Download Excel\",\r\n\texportXMLTooltip: \"Dpwnload XML\",\r\n\tprintTooltip: \"Print\",\r\n\r\n\tweeklyTradeReportTitle: \"Weekly Report\",\r\n\twTReportProductTitle: \"Weekly Report - Product\",\r\n\twTReportClientTitle: \"Weekly Report - Client\",\r\n\twTReportDateTitle: \"Weekly Report - Date\",\r\n\tweeklyTradeWeek: \"Week\",\r\n\tweeklyTradeReportProduct: \"Product\",\r\n\tweeklyTradeReportClient: \"Client\",\r\n\tweeklyTradeReportDate: \"Date\",\r\n\tweeklyTradeReportTurnoverRSD: \"Turnover RSD\",\r\n\tweeklyTradeReportTurnoverEUR: \"Turnover EUR\",\r\n\tweeklyTradeReportCountTransaction: \"Transaction Count\",\r\n\tweeklyTradeReportQty: \"Quantity\",\r\n\twTReportWeightedPrice: \"Average price\",\r\n\twTReportWeightedPriceeur: \"Average price eur\",\r\n\twTableProduct: \"Product\",\r\n\twTableClient: \"Client\",\r\n\twTableDate: \"Date\",\r\n\r\n\tmonthlyTradeReportTitle: \"Monthly Report\",\r\n\tmTReportProductTitle: \"Monthly Report - Product\",\r\n\tmTReportClientTitle: \"Monthly Report - Client\",\r\n\tmTReportDateTitle: \"Monthly Report - Date\",\r\n\tmonthlyTradeMonth: \"Month\",\r\n\tmonthlyTradeReportProduct: \"Product\",\r\n\tmonthlyTradeReportClient: \"Client\",\r\n\tmonthlyTradeReportDate: \"Date\",\r\n\tmonthlyTradeReportTurnoverRSD: \"Turnover RSD\",\r\n\tmonthlyTradeReportTurnoverEUR: \"Turnover EUR\",\r\n\tmonthlyTradeReportCountTransaction: \"Transaction Count\",\r\n\tmonthlyTradeReportQty: \"Quantity\",\r\n\tmTReportWeightedPrice: \"Average price\",\r\n\tmTReportWeightedPriceeur: \"Average price eur\",\r\n\tmTableProduct: \"Product\",\r\n\tmTableClient: \"Client\",\r\n\tmTableDate: \"Date\",\r\n\r\n\tannualTradeReportTitle: \"Annual Report\",\r\n\taTReportProductTitle: \"Annual Report - Product\",\r\n\taTReportClientTitle: \"Annual Report - Client\",\r\n\taTReportDateTitle: \"Annual Report - Date\",\r\n\tannualTradeYear: \"Year\",\r\n\tannualTradeReportProduct: \"Product\",\r\n\tannualTradeReportClient: \"Client\",\r\n\tannualTradeReportDate: \"Date\",\r\n\tannualTradeReportTurnoverRSD: \"Turnover RSD\",\r\n\tannualTradeReportTurnoverEUR: \"Turnover EUR\",\r\n\tannualTradeReportCountTransaction: \"Transaction Count\",\r\n\tannualTradeReportQty: \"Quantity\",\r\n\taTReportWeightedPrice: \"Average price\",\r\n\taTReportWeightedPriceeur: \"Average price eur\",\r\n\taTableProduct: \"Product\",\r\n\taTableClient: \"Client\",\r\n\taTableDate: \"Date\",\r\n\r\n\torderFundCheckButton: \"OK\",\r\n\torderFundCheckTitle: \"Fund Check\",\r\n\r\n\tweeklyNumofWeeks: \"Number of Weeks\",\r\n\tmonthlyNumofmonths: \"Number of Months\",\r\n\r\n\tTASTitle: \"Transport and storage costs\",\r\n\tTASCalcStorage: \"Calculate storage costs\",\r\n\tTASCalTransport: \"Calculate transport costs\",\r\n\tTASCaclulate: \"Calculate\",\r\n\tTASConfirm: \"Confirm\",\r\n\tTASDistance: \"Distance\",\r\n\tTASStorageCosts: \"Storage costs\",\r\n\tTASTransportCosts: \"Transport costs\",\r\n\tTASTooltip: \"Calculate transport and storage costs\",\r\n\tTASCancel: \"Cancel\",\r\n\tTASWarning: \"Costs are already calculated! New calculation will overrun the previous one!\",\r\n\r\n\tsecCommDailyTradeReportTitle: \"SEC Daily Report\",\r\n\tsecCommQuarterlyTradeReportTitle: \"SEC Quarterly Report\",\r\n\tsecCommAnnualyTradeReportTitle: \"SEC Annualy Report\",\r\n\tsecCommProduct: \"Product\",\r\n\tsecCommTurnoverRSD: \"Turnover RSD\",\r\n\tsecCommTurnoverEUR: \"Turnover EUR\",\r\n\tsecCommCountTransaction: \"Transaction number\",\r\n\tsecCommReportDate: \"Report Date\",\r\n\tsecCommReportWeightedRSD: \"Average price RSD\",\r\n\tsecCommReportWeightedEUR: \"Average price EUR\",\r\n\tsecCommReportQty: \"Quantity\",\r\n\tsecCommReportQuarter: \"Quarter\",\r\n\r\n\tamtimnylndcommTradeNumber: \"Trade Number\",\r\n\tamtimnylndcommTradeDate: \"Trade Date\",\r\n\tamtimnylndcommProduct: \"Product\",\r\n\tamtimnylndcommQuantity: \"Quantity\",\r\n\tamtimnylndcommPrice: \"Price\",\r\n\tamtimnylndcommAmount: \"Amount\",\r\n\tamtimnylndcommBuyer: \"Buyer\",\r\n\tamtimnylndcommSeller: \"Seller\",\r\n\tamtimnylndcommReportTitle: \"Money Laundering Report\",\r\n\tamtimnylndcommLimit: \"Limit\",\r\n\r\n\texmemTitle: \"Exchange Members\",\r\n\texmemMemberName: \"Member Name\",\r\n\texmemMemberId: \"Member Id\",\r\n\texmemTaxCode: \"Tax Code\",\r\n\texmemAdress: \"Address\",\r\n\texmemPhone: \"Phone\",\r\n\texmemManager: \"Manager\",\r\n\texmemTrader: \"Trader\",\r\n\texmemContactPerson: \"Contact Person\",\r\n\r\n\tmemcontTitle: \"Member Contracts\",\r\n\tmemcontMember: \"Member\",\r\n\tmemcontContractDate: \"Contract Date\",\r\n\tmemcontExpireDate: \"Expire Date\",\r\n\tmemcontStatus: \"Status\",\r\n\r\n\texchDateFrom: \"Date From\",\r\n\texchDateTo: \"Date To\",\r\n\texchTradeReview: \"Trade Review\",\r\n\texchCommissionReview: \"Commission Review\",\r\n\texchTradeByProduct: \"Trade By Product\",\r\n\texchBusinessActivities: \"Business Activities\",\r\n\texchTurnoverByClient: \"Turnover By Client\",\r\n\texchTurnoverByBrokers: \"Turnover By Brokers\",\r\n\texchWeightedPrice: \"Weighted Prices\",\r\n\texchDate: \"Date\",\r\n\texchTradeNumber: \"Trade Number\",\r\n\texchTradeDate: \"Trade Date\",\r\n\texchProduct: \"Product\",\r\n\texchPrice: \"Price\",\r\n\texchQuantity: \"Quantity\",\r\n\texchAmount: \"Amount\",\r\n\texchClient: \"Client\",\r\n\texchTransactionDate: \"Transaction Date\",\r\n\texchTransactionNumber: \"Transaction Number\",\r\n\texchOrderNumber: \"Order Number\",\r\n\texchSide: \"Side\",\r\n\texchCommission: \"Commission\",\r\n\texchTurnoverValue: \"Turnover Value\",\r\n\texchBuyersCommission: \"Buyers Commission\",\r\n\texchSellersCommission: \"Sellers Commission\",\r\n\texchBuyerBroker: \"Buyers Broker\",\r\n\texchSellerBroker: \"Sellers Broker\",\r\n\texchCommissionValue: \"Commission Value\",\r\n\texchTurnoverParticipation: \"Turnover Participation\",\r\n\texchCommissionParticipation: \"Commission Participation\",\r\n\texchBuyer: \"Buyer\",\r\n\texchSeller: \"Seller\",\r\n\texchTurnoverRsd: \"Turnover RSD\",\r\n\texchTurnoverEur: \"Turnover EUR\",\r\n\texchWeightedPriceRsd: \"Weighted Price RSD\",\r\n\texchWeightedPriceEur: \"Weighted Price EUR\",\r\n\r\n\tannualNumofyears: \"Number of year\",\r\n\r\n\tpleaseWait: \"Please wait...\",\r\n\r\n\tcreateInvoiceTitle: \"Automatic Creating Invoices\",\r\n\tinvoiceCreate: \"Create Invoice\",\r\n\tinvoiceEdit: \"Edit Invoice\",\r\n\tinvoiceTitle: \"Invoices\",\r\n\tinvoiceInvNo: \"Invoice No\",\r\n\tinvoiceInvDate: \"Invoice Date\",\r\n\tinvoiceInvTypeDescr: \"Invoice Type\",\r\n\tinvoiceTranDate: \"Transaction Date\",\r\n\tinvoiceDueDate: \"Due Date\",\r\n\tinvoiceDescr: \"Description\",\r\n\tinvoiceTranNo: \"Transaction No\",\r\n\tinvoiceClientIdNo: \"Client Id\",\r\n\tinvoiceClientName: \"Client Name\",\r\n\tinvoiceTradeAmt: \"Trade Amount\",\r\n\tinvoiceTradeAmtWithVat: \"Commission Basis for calculation\",\r\n\tinvoiceCommPerc: \"% Commission\",\r\n\tinvoiceAmt: \"Commission Amount\",\r\n\tinvoiceVatPerc: \"% VAT\",\r\n\tinvoiceVatAmt: \"VAT Amount\",\r\n\tinvoiceInvAmt: \"Pay Amount\",\r\n\tinvoiceCurrCode: \"Cuurency\",\r\n\tinvoiceBookDate: \"Book Date\",\r\n\tinvoiceCmpAccount: \"Account\",\r\n\tinvoiceModel: \"Model\",\r\n\tinvoiceReffNo: \"Refference No\",\r\n\tinvoiceStatus: \"Status\",\r\n\tinvoiceQuantity: \"Quantity\",\r\n\tinvoicePrice: \"Price\",\r\n\tinvoiceOrderNo: \"Order No.\",\r\n\tinvoiceProductName: \"Product\",\r\n\r\n\tiInvoiceTooltip: \"Create Invoice\",\r\n\r\n\tinvoicingMessage: \"Invoicing successfully finished\",\r\n\tinvoicingMessageTitle: \"Invoicing\",\r\n\tinvoicingMessageConfim: \"OK\",\r\n\r\n\taccountingOrderTooltip: \"Creating Order\",\r\n\taccountingOrderTitle: \"Accounting Order\",\r\n\taccountingOrderMessage: \"Order Creating finished\",\r\n\taccountingOrderMessageTitle: \"Creating Order\",\r\n\taccountingOrderConfim: \"OK\",\r\n\r\n\ttradingDataRefPriceTooltip: \"Calculata Referent Price\",\r\n\ttradingDataTitle: \"Trading Data\",\r\n\ttradingDataDataTime: \"Trading Date\",\r\n\ttradingDataProductCode: \"Product Code\",\r\n\ttradingDataProductName: \"Product Name\",\r\n\ttradingDataRefPrice: \"Referent Price\",\r\n\ttradingDataBestBid: \"Best Bid\",\r\n\ttradingDataBestBidQty: \"Best Bid Quantity\",\r\n\ttradingDataBestAsk: \"Best Ask\",\r\n\ttradingDataBestAskQty: \"Best Ask Quatnity\",\r\n\ttradingDataOpenPrice: \"Open Price\",\r\n\ttradingDataHighPrice: \"High Price\",\r\n\ttradingDataLowPrice: \"Low Price\",\r\n\ttradingDataClosePrice: \"Close Price\",\r\n\ttradingDataVolume: \"Volume\",\r\n\ttradingDataAmount: \"Amount\",\r\n\ttradingDataWeightedPrice: \"Average Price\",\r\n\ttradingDataMidPrice: \"Mid Price\",\r\n\ttradingDatadatefrom: \"From Date\",\r\n\ttradingDatadateto: \"To Date\",\r\n\ttradingDataEdit: \"Edit Referent Price\",\r\n\r\n\tmarginsDataCalculationTooltip: \"Margins Data Calculation\",\r\n\tmarginsDataTitle: \"Margins Data\",\r\n\tmarginsDataCalcDate: \"Date\",\r\n\tmarginsDataTradeNo: \"Trade Number\",\r\n\tmarginsDataTradeDate: \"Trade Date\",\r\n\tmarginsDataSide: \"Side\",\r\n\tmarginsDataClientIdNo: \"Client No\",\r\n\tmarginsDataClientName: \"Client\",\r\n\tmarginsDataProductCode: \"Product Code\",\r\n\tmarginsDataProductName: \"Product Name\",\r\n\tmarginsDataContrPrice: \"Contract Price\",\r\n\tmarginsDataContrValue: \"Contract Value\",\r\n\tmarginsDataGainLoss: \"Gain/Loss\",\r\n\tmarginsDataMarginReq: \"Requested Margin\",\r\n\tmarginsDataMarginCall: \"Margin Call\",\r\n\tmarginsDataMarginBal: \"Margin Balans\",\r\n\tmarginsDataBalPlusGL: \"Balans with G/L\",\r\n\tmarginsDataCoverPerc: \"Cover Percent\",\r\n\tmarginsDataMaintTriggered: \"Maintenance Triggered\",\r\n\tmarginsDatadatefrom: \"From Data\",\r\n\tmarginsDatadateto: \"To Data\",\r\n\r\n\tnoFutureDate: \"Future dates not allowed.\",\r\n\r\n\torderQtyMatched: \"Matched quantity\",\r\n\talarmTime: \"Alarm time\",\r\n\talarmCrossName: \"Cross alarm\",\r\n\talarmProductName: \"Product alarm\",\r\n\talarmClientName: \"Client alarm\",\r\n\tnotificationNewOrder: \"New order\",\r\n\tnotificationNewTrade: \"New trade\",\r\n\r\n\ttradingDataMessage: \"Price Calculation Over\",\r\n\ttradingDataMessageTitle: \"Referent Price Calculation\",\r\n\ttradingDataConfim: \"OK\",\r\n\ttradingDataReportDate: \"Calculation Date\",\r\n\r\n\tmarginsDataMessage: \"Margins Data Calculation Over\",\r\n\tmarginsDataMessageNoData: \"No active forward trades for date.\",\r\n\tmarginsDataMessageTitle: \"Margins Data Calculation\",\r\n\tmarginsDataConfim: \"OK\",\r\n\tmarginsDataReportDate: \"Calculation Date\",\r\n\r\n\talarmAlmType: \"Alarm Type\",\r\n\talarmUserName: \"User Name\",\r\n\talarmClient: \"Client\",\r\n\talarmProductCode: \"Product Code\",\r\n\talarmProduct: \"Product\",\r\n\talarmActive: \"Status\",\r\n\talarmEdit: \"Edit Alarm\",\r\n\talarmCreate: \"Creat Alarm\",\r\n\talarmTitle: \"Alarm\",\r\n\talarmTypeCros: \"Cross order\",\r\n\talarmTypeProduct: \"Product\",\r\n\talarmTypeUser: \"Client\",\r\n\talarmUniqueMessage: \"Alarm is already set\",\r\n\talarmTypeUserProduct: \"Client and product\",\r\n\r\n\talarmProductClientName: \"Alram for client and product\",\r\n\talarmBuyOrderNumber: \"Buy order number\",\r\n\talarmSellOrderNumber: \"Sell order number\",\r\n\tallowSystemNotifications: \"Turn on system notifications\",\r\n\r\n\tattrCompTypeLessThan: \"<=\",\r\n\tattrCompTypeEqual: \"=\",\r\n\tattrCompTypeMoreThan: \">=\",\r\n\tattrCompType: \"Comparator\",\r\n\tproductAttributeHasStandard: \"Has Standard Value\",\r\n\tproductAttributeStandardValue: \"Standard Value\",\r\n\r\n\torderParameters: \"Order parameters\",\r\n\ttradeParameters: \"Trade parameters\",\r\n\torderDepositeAmount: \"Needed amount\",\r\n\torderDepositeAmountPayed: \"Payed amount\",\r\n\tpaymentAmtBal: \"Ammount ballance\",\r\n\tpaymentAmtBalNonAlloc: \"Not allocated ballance\",\r\n\r\n\tattributeSRPS: \"According to PSTM\",\r\n\t// \"SRPS quality\",\r\n\r\n\tpaymentAmtOrdersBal: \"Orders state\",\r\n\tpaymentAmtTradesBal: \"Transactions state\",\r\n\r\n\tdeliveryTradeQty: \"Agreed quantity\",\r\n\tdeliveryLeftQty: \"Left for delivery\",\r\n\t\r\n\tclientCardTitle: \"Client Card\",\r\n\r\n\tgrntTitle: \"Bank Guarantees\",\r\n\tgrntNo: \"Garantee No.\",\r\n\tgrntDate: \"Date\",\r\n\tgrntClientCode: \"Client Code\",\r\n\tgrntClientName: \"Client Name\",\r\n\tgrntBankCode: \"Bank Code\",\r\n\tgrntBankName: \"Bank Name\",\r\n\tgrntExpiryDate: \"Expiry Date\",\r\n\tgrntAmount: \"Amount\",\r\n\tgrntCurrCode: \"Cuurency\",\r\n\tgrntStatus: \"Status\",\r\n\tgrntEdit: \"Edit Guarantee\",\r\n\tgrntCreate: \"Create Guarantee\",\r\n\tgrntActView: \"Show\",\r\n\r\n\tmainTableBid: \"Buy\",\r\n\tmainTableAsk: \"Sell\",\r\n\r\n\ttradesReportMessage: \"Preuzimanje uspešno završeno.\",\r\n\ttradesReportTitle: \"Preuzimanje\",\r\n\ttradesReportMessageConfim: \"Kupovina\",\r\n\r\n\terrorTitle: \"Error\",\r\n\terrorConfirm: \"OK\",\r\n\terrorProductDelete: \"You can't delete product that was in an order.\",\r\n\terrorProductAttributeDelete: \"You can't delete product attribute that was in an order.\",\r\n\terrorClientDelete: \"You can't delete client because of reference data conflict.\",\r\n\r\n\torderLogDataChangeTime: \"Change Time\",\r\n\torderLogDataUserName: \"Username\",\r\n\torderLogDataActivity: \"Activity\",\r\n\torderLogDataStatus: \"Status\",\r\n\torderLogDataRefOrder: \"Ref Order\",\r\n\torderLogDataTable: \"History\",\r\n\torderLogDataEmpty: \"No history for order\",\r\n\r\n\tnewsTime: \"Date\",\r\n\tnewsTitle: \"Title\",\r\n\tnewsTitleen: \"Serbian Title\",\r\n\tnewsLokacija: \"File Name\",\r\n\tnewsTitleTitle: \"News\",\r\n\tnewsEditTitle: \"Edit News\",\r\n\tnewsCreateTitle: \"Create News\",\r\n\tnewsShow: \"Show news\",\r\n\r\n\tpayTypeDesc: \"Pay Type (SR)\",\r\n\tpayTypeDescEn: \"Pay Type (EN)\",\r\n\tpayTypeTitle: \"Pay Type\",\r\n\tpayTypeEditTitle: \"Edit Pay Type\",\r\n\tpayTypeCreateTitle: \"Create Pay Type\",\r\n\tpayTypeStatus: \"Status\",\r\n\tpayTypePonder: \"Weight\",\r\n\r\n\thistoryProd1: \"Corn\",\r\n\thistoryProd2: \"Wheat\",\r\n\thistoryProd3: \"Soybeans not GMO\",\r\n\r\n\tAttrPsmtTitle: \"Quality paraneters according to PSTM\",\r\n\r\n\tloginRemember: \"Remember me\",\r\n\tloginForget: \"Forget me\",\r\n\r\n\tpushNotifications: \"Notifications\",\r\n\tpushNotification: \"Notification\",\r\n\r\n\tnotifPacking: \"Packing\",\r\n\tnotifOrigin: \"Origin\",\r\n\tnotifDirectorate: \"Directorate\",\r\n\r\n};\r\n","export const enErrors = {\r\n\t\"http-login-error\": \"Can't connect to the server\",\r\n\t\"E-4\": \"You are not authorized to use the application\",\r\n};\r\n","import React, { useMemo, useEffect } from \"react\";\r\nimport { useTransalation } from \"./translations\";\r\nimport moment from \"moment\";\r\nimport { LocalizationKey, LocalizationLanguage } from \"./types\";\r\nimport { ErrorData } from \"../http/types\";\r\nimport { Gender } from \"../../data/models\";\r\nimport numeral from \"numeral\";\r\n\r\nnumeral.register(\"locale\", LocalizationLanguage.SR, {\r\n\tdelimiters: {\r\n\t\tdecimal: \",\",\r\n\t\tthousands: \".\",\r\n\t},\r\n\tabbreviations: {\r\n\t\tthousand: \"k\",\r\n\t\tmillion: \"m\",\r\n\t\tbillion: \"b\",\r\n\t\ttrillion: \"t\",\r\n\t},\r\n\tordinal: function (number) {\r\n\t\treturn number === 1 ? \"ac\" : \"ci\";\r\n\t},\r\n\tcurrency: {\r\n\t\tsymbol: \"RSD\",\r\n\t},\r\n});\r\n\r\nexport interface NumberSeparators {\r\n\tdecimal: string;\r\n\tthousands: string;\r\n}\r\n\r\nexport interface Localization {\r\n\tgetString: (key: LocalizationKey) => string;\r\n\tgetDateString: (date?: Date, format?: string) => string;\r\n\tgetDateTimeString: (date?: Date) => string;\r\n\tgetErrorString: (error: ErrorData) => string;\r\n\tgetGender: (error: Gender) => string;\r\n\tlanguage: () => LocalizationLanguage;\r\n\tgetNumberString: (num?: number, format?: string) => string;\r\n\tgetFormatedNumberString: (num?: number, money?: boolean) => string;\r\n\tgetFormatedNumberStringBlanko: (num?: number, money?: boolean) => string;\r\n\tgetFormatedNumberString4: (num?: number, money?: boolean) => string;\r\n\tgetNumber: (value?: string) => number | undefined;\r\n\tgetSeparators: () => NumberSeparators;\r\n}\r\n\r\nexport const LocalizationContext = React.createContext({\r\n\tgetString: key => key,\r\n\tgetDateString: date => date?.toString() || \"\",\r\n\tgetDateTimeString: date => date?.toString() || \"\",\r\n\tgetErrorString: error => error.message,\r\n\tgetGender: gender => gender.toString(),\r\n\tlanguage: () => LocalizationLanguage.SR,\r\n\tgetNumberString: (num?: number, format?: string) => (num ? num.toString() : \"\"),\r\n\tgetFormatedNumberString: (num?: number) => (num ? num.toString() : \"\"),\r\n\tgetFormatedNumberStringBlanko: (num?: number) => (num ? num.toString() : \"\"),\r\n\tgetFormatedNumberString4: (num?: number) => (num ? num.toString() : \"\"),\r\n\tgetNumber: (value?: string) => (value ? parseFloat(value) : undefined),\r\n\tgetSeparators: () => ({ decimal: \"\", thousands: \"\" }),\r\n});\r\n\r\nconst momentDateString = (date: Date | undefined, format: string | undefined): string => {\r\n\tif (!date) return \"\";\r\n\tconst mnt = moment(date);\r\n\tif (!format) format = \"l\";\r\n\treturn mnt.format(format);\r\n};\r\n\r\nexport const LocalizationContextProvider: React.FunctionComponent = props => {\r\n\tconst [translations, errorTranslations] = useTransalation();\r\n\r\n\tuseEffect(() => {\r\n\t\t// moment.locale(translations.momentLocale);\r\n\t\tmoment.locale(\"sr\");\r\n\t\tnumeral.locale(translations.language);\r\n\t}, [translations]);\r\n\r\n\tconst translate: Localization = useMemo(\r\n\t\t() => ({\r\n\t\t\tgetString: key => translations[key] || key,\r\n\t\t\tgetDateString: momentDateString,\r\n\t\t\tgetDateTimeString: date => momentDateString(date, \"DD.MM.YYYY. HH:mm:ss\"),\r\n\t\t\tgetErrorString: error => errorTranslations[error.code] || error.message,\r\n\t\t\tgetGender: gender => (gender === 1 ? translations.genderMale : translations.genderFemale),\r\n\t\t\tlanguage: () => translations.language as LocalizationLanguage,\r\n\t\t\tgetNumberString: (num?: number, format?: string) => (num ? numeral(num).format(format) : \"\"),\r\n\t\t\tgetFormatedNumberString: (num?: number, money?: boolean) => {\r\n\t\t\t\tconst format = money === true ? \"0,0.00\" : \"0,0\";\r\n\t\t\t\treturn num ? numeral(num).format(format) : \"0\";\r\n\t\t\t},\r\n\t\t\tgetFormatedNumberStringBlanko: (num?: number, money?: boolean) => {\r\n\t\t\t\tconst format = money === true ? \"0,0.00\" : \"0,0\";\r\n\t\t\t\treturn num ? numeral(num).format(format) : \" \";\r\n\t\t\t},\r\n\t\t\tgetFormatedNumberString4: (num?: number, money?: boolean) => {\r\n\t\t\t\tconst format = money === true ? \"0,0.0000\" : \"0,0\";\r\n\t\t\t\treturn num ? numeral(num).format(format) : \"0\";\r\n\t\t\t},\r\n\t\t\tgetNumber: (value?: string) => {\r\n\t\t\t\tvar numValue = Number(value);\r\n\t\t\t\treturn isNaN(numValue) || value === \"\" ? undefined : numValue;\r\n\t\t\t},\r\n\t\t\tgetSeparators: () => {\r\n\t\t\t\tconst numeralLocale = numeral.localeData().delimiters;\r\n\t\t\t\treturn { decimal: numeralLocale.decimal, thousands: numeralLocale.thousands };\r\n\t\t\t},\r\n\t\t}),\r\n\t\t[translations, errorTranslations]\r\n\t);\r\n\r\n\treturn {props.children};\r\n};\r\n","import \"moment/locale/sr\";\r\nimport { TranslationsType, LocalizationLanguage } from \"./types\";\r\nimport { useLocalizationStore } from \"../../data/localization/hooks\";\r\nimport { srTranslation } from \"./srTranslation\";\r\nimport { srErrors } from \"./srErrors\";\r\nimport { enTranslations } from \"./enTranslations\";\r\nimport { enErrors } from \"./enErrors\";\r\n\r\nexport const useTransalation = (): TranslationsType => {\r\n\tconst [selected] = useLocalizationStore();\r\n\tif (selected === LocalizationLanguage.SR) {\r\n\t\treturn [srTranslation, srErrors];\r\n\t} else {\r\n\t\treturn [enTranslations, enErrors];\r\n\t}\r\n};\r\n","export const wait = (ms: number) => new Promise(res => setTimeout(res, ms));\r\n\r\nexport const getDateFromSR = (dateString?: string) => {\r\n\tif (!dateString) {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst dateParts = dateString.split(\" \")[0].split(\".\");\r\n\r\n\tif (dateParts.length < 3) {\r\n\t\treturn undefined;\r\n\t}\r\n\tconst day = parseInt(dateParts[0]);\r\n\tconst month = parseInt(dateParts[1]) - 1;\r\n\tconst year = parseInt(dateParts[2]);\r\n\r\n\treturn new Date(year, month, day);\r\n};\r\n\r\nexport const exhaustiveCheck = (param: never): never => {\r\n\tthrow new Error(`should not reach here (${param})`);\r\n};\r\n\r\nexport function normalize(employee?: T): T {\r\n\treturn Object.keys(employee || {}).reduce((normalized, field) => {\r\n\t\tconst value: any = employee ? employee[field as keyof T] : undefined;\r\n\t\treturn {\r\n\t\t\t...normalized,\r\n\t\t\t[field]: value === \"\" || value === null ? undefined : value,\r\n\t\t};\r\n\t}, {} as T);\r\n}\r\n\r\nexport const getEditLocation = (\r\n\tbasePath: string,\r\n\tpart?: string,\r\n\tid?: string,\r\n\tsubItemId?: string,\r\n\taction?: string\r\n) => {\r\n\tlet location = `${basePath}/${action || \"edit\"}`;\r\n\r\n\tif (part !== undefined) {\r\n\t\tlocation = `${location}/${part}`;\r\n\t}\r\n\r\n\tif (id !== undefined) {\r\n\t\tlocation = `${location}/${id}`;\r\n\t}\r\n\r\n\tif (subItemId !== undefined) {\r\n\t\tlocation = `${location}/edit/${subItemId}`;\r\n\t}\r\n\r\n\treturn location;\r\n};\r\n\r\nexport const getParamsDateString = (dateString?: string): string | undefined => {\r\n\tconst date = dateString ? new Date(dateString) : undefined;\r\n\treturn date ? `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}` : undefined;\r\n};\r\n\r\nexport const isValidDate = (date: any): date is Date => date && date instanceof Date && !isNaN(date.getTime())\r\n\r\nexport const countDecimals = (value?: number) => {\r\n if (value && Math.floor(value) !== value)\r\n return value.toString().split(\".\")[1].length || 0;\r\n return 0;\r\n}","import { useState, useCallback, useMemo, useEffect, useRef } from \"react\";\r\nimport { normalize } from \"./functions\";\r\nimport React from \"react\";\r\nimport { ValidationState } from \"./types\";\r\nimport deepEqual from \"deep-equal\";\r\n\r\nexport const useToggleState = (initialState: boolean = false) => {\r\n const [state, setState] = useState(initialState);\r\n\r\n const toggleState = useCallback(\r\n () => setState((currentState) => !currentState),\r\n [setState]\r\n );\r\n\r\n return [state, toggleState, setState] as [\r\n boolean,\r\n () => void,\r\n React.Dispatch>\r\n ];\r\n};\r\n\r\nexport type BooleanDictionary = {\r\n [key: string]: boolean;\r\n};\r\n\r\nexport type BooleanDictionaryTogglers = {\r\n [key: string]: () => void;\r\n};\r\n\r\nexport const useToggleStateDictionary = (\r\n keys: string[],\r\n openKeys?: string[]\r\n) => {\r\n const [dictionary, setDictionary] = useState(() =>\r\n keys.reduce((dict, key) => {\r\n dict[key] = openKeys !== undefined && openKeys.some((ok) => ok === key);\r\n return dict;\r\n }, {} as BooleanDictionary)\r\n );\r\n\r\n const dictionaryTogglers = useMemo(\r\n () =>\r\n keys.reduce((togglers, key) => {\r\n togglers[key] = createToggleDictionaryState(\r\n dictionary,\r\n setDictionary,\r\n keys,\r\n key\r\n );\r\n return togglers;\r\n }, {} as BooleanDictionaryTogglers),\r\n [keys, setDictionary, dictionary]\r\n );\r\n\r\n return [dictionary, dictionaryTogglers] as [\r\n BooleanDictionary,\r\n BooleanDictionaryTogglers\r\n ];\r\n};\r\n\r\nconst createToggleDictionaryState =\r\n (\r\n dictionary: BooleanDictionary,\r\n setDictionary: (dictionary: BooleanDictionary) => void,\r\n keys: string[],\r\n toggleKey: string\r\n ) =>\r\n () => {\r\n const newDictionary: BooleanDictionary = {};\r\n keys.forEach((key) => {\r\n newDictionary[key] = toggleKey === key ? !dictionary[key] : false;\r\n });\r\n setDictionary(newDictionary);\r\n };\r\n\r\nexport type AditionalValidation<\r\n TItem,\r\n TValidationState extends ValidationState\r\n> = (itemState: TItem, validationState: TValidationState) => TValidationState;\r\n\r\nexport const createUseValidator =\r\n <\r\n TItem,\r\n TValidationState extends ValidationState = ValidationState\r\n >(\r\n initialValidatorState: TValidationState,\r\n additionalValidation?: AditionalValidation\r\n ) =>\r\n () => {\r\n const [validationState, setValidationState] = useState(\r\n initialValidatorState\r\n );\r\n\r\n const validate = useCallback(\r\n (item?: TItem) => {\r\n const normalized = normalize(item);\r\n let newState = Object.keys(validationState).reduce(\r\n (validated, field) => {\r\n const validField = normalized[field as keyof TItem] !== undefined;\r\n return {\r\n ...validated,\r\n [field]: validField,\r\n };\r\n },\r\n {} as TValidationState\r\n );\r\n\r\n if (additionalValidation) {\r\n newState = additionalValidation(normalized, newState);\r\n }\r\n\r\n const valid = Object.keys(newState).reduce((validated, field) => {\r\n return (\r\n validated && (newState[field as keyof TValidationState] as boolean)\r\n );\r\n }, true as boolean);\r\n\r\n setValidationState(newState);\r\n return valid ? normalized : undefined;\r\n },\r\n [validationState, setValidationState]\r\n );\r\n\r\n return [validationState, validate] as [\r\n typeof validationState,\r\n typeof validate\r\n ];\r\n };\r\n\r\nexport default function useDebounce(value: T, delay: number = 500) {\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\r\n return () => {\r\n clearTimeout(handler);\r\n };\r\n }, [value, delay]);\r\n\r\n return debouncedValue;\r\n}\r\n\r\nexport function useDebounceState(\r\n initState: T | (() => T),\r\n initDelay: number = 500\r\n): [T, React.Dispatch>] {\r\n const [state, setState] = useState(initState);\r\n const timeout = useRef();\r\n\r\n useEffect(() => () => timeout.current && clearTimeout(timeout.current), []);\r\n\r\n const setNextState = useCallback(\r\n (nextState: React.SetStateAction) => {\r\n if (timeout.current) clearTimeout(timeout.current);\r\n\r\n timeout.current = setTimeout(() => {\r\n setState(nextState);\r\n }, initDelay);\r\n },\r\n [initDelay]\r\n );\r\n\r\n return [state, setNextState];\r\n}\r\n\r\nexport const useCopiedState = (original?: T, followOriginal?: boolean) => {\r\n const [copyState, setCopyState] = React.useState(original);\r\n const [changeCalled, setChangeCalled] = React.useState(false);\r\n\r\n React.useEffect(() => {\r\n setCopyState((e) => ((e || !original) && !followOriginal ? e : original));\r\n }, [original, setCopyState, followOriginal]);\r\n\r\n const editCopyState = React.useCallback(\r\n (field: keyof T, value: any) => {\r\n setCopyState((e) => (e ? { ...e, [field]: value } : e));\r\n setChangeCalled(true);\r\n },\r\n [setCopyState]\r\n );\r\n\r\n const changed = React.useMemo(\r\n () => changeCalled && !deepEqual(original, copyState),\r\n [original, copyState, changeCalled]\r\n );\r\n\r\n return [copyState, editCopyState, changed, setCopyState] as [\r\n typeof copyState,\r\n typeof editCopyState,\r\n boolean,\r\n typeof setCopyState\r\n ];\r\n};\r\n","import { Theme, makeStyles, createStyles } from \"@material-ui/core\";\r\n\r\nexport const useMainBarStyles = makeStyles((theme: Theme) => {\r\n\tconst { permanentBreakpoint, fullWidth } = theme.navDrawer;\r\n\treturn createStyles({\r\n\t\tappBar: {\r\n\t\t\t// [permanentBreakpoint]: {\r\n\t\t\t// \twidth: `calc(100% - ${hiddenWidth}px)`,\r\n\t\t\t// \tmarginLeft: hiddenWidth,\r\n\t\t\t// },\r\n\t\t\t[permanentBreakpoint]: {\r\n\t\t\t\twidth: `calc(100% - ${fullWidth}px)`,\r\n\t\t\t\tmarginLeft: fullWidth,\r\n\t\t\t},\r\n\t\t},\r\n\t\tappBaraContent: {\r\n//\t\t\talignItems: \"baseline\", // Kad sam izbacio ovo poravnao sam logo sa loginom\r\n\t\t\tjustifyContent: \"space-between\",\r\n\t\t},\r\n\t\ttitleArea: {\r\n\t\t\tdisplay: \"flex\",\r\n\t\t\tjustifyContent: \"center\",\r\n//\t\t\talignItems: \"baseline\", // Kad sam izbacio ovo poravnao sam logo sa loginom\r\n\t\t},\r\n\t\tlogo: {\r\n\t\t\twidth: 80,\r\n\t\t\tverticalAlign: \"sub\",\r\n\t\t },\r\n\t\tmenuButton: {\r\n\t\t\t[permanentBreakpoint]: {\r\n\t\t\t\tdisplay: \"none\",\r\n\t\t\t},\r\n\t\t\tmarginRight: theme.spacing(2),\r\n\t\t},\r\n\t\ttitle: {\r\n\t\t\tfontFamily: \"Montserrat\",\r\n\t\t\tfontWeight: 700,\r\n\t\t}\r\n\t});\r\n});\r\n","import axios from \"axios\";\r\nimport { appConfig } from \"../config/config\";\r\n\r\nconst instance = axios.create(appConfig.http);\r\n\r\ninstance.interceptors.request.use(requestConfig => {\r\n\treturn requestConfig;\r\n});\r\n\r\nexport default instance;\r\n","import { ThunkType } from \"../store/reducers\";\r\n\r\nexport interface ErrorData {\r\n\tmessage: string;\r\n\tcode: string;\r\n}\r\n\r\nexport enum ErrorCodes {\r\n\tAuthWrongToken = \"ERROR-4\",\r\n\tHTTPLoginError = \"http-login-error\",\r\n\tOrderNoFunds = \"NOFUNDS\",\r\n\tUniqueConstraint = \"E-91\",\r\n\tOrderNoFile = \"E--1\",\r\n}\r\n\r\nexport type APIResponse =\r\n\t| SucessAPIResponse\r\n\t| ApiErrorResponse;\r\n\r\nexport type SucessAPIResponse = {\r\n\tresCode: \"OK\";\r\n\tresDesc: string;\r\n\tobj: T;\r\n};\r\n\r\nexport type ApiErrorResponse = {\r\n\tresCode: ErrorCodes;\r\n\tresDesc: string;\r\n};\r\n\r\nexport type HTTPWebApiResponse = WebApiResponse>;\r\n\r\nexport type WebApiResponse = ThunkType>;\r\n\r\nexport type WebApiWholeResponse = ThunkType | undefined>>;\r\n","import { AxiosRequestConfig, AxiosResponse } from \"axios\";\r\nimport axiosIntance from \"./axiosInstance\";\r\nimport { ApiErrorResponse, APIResponse, HTTPWebApiResponse, WebApiResponse, WebApiWholeResponse } from \"./types\";\r\nimport { pushError } from \"../../data/snackbar/snackbarDataSlice\";\r\nimport { v4 } from \"uuid\";\r\n\r\nconst getHTTPErrorMessage = (responseCode?: string) => {\r\n\tif (responseCode) {\r\n\t\treturn `HTTP error (${responseCode})`;\r\n\t} else {\r\n\t\treturn `HTTP error`;\r\n\t}\r\n};\r\n\r\nconst dipatchHTTPError = (dispatch: any, message: string, responseCode?: string) =>\r\n\tdipatchError(dispatch, message, getHTTPErrorMessage(responseCode));\r\n\r\nconst dipatchError = (dispatch: any, message: string, title?: string, ) =>\r\n\tdispatch(\r\n\t\tpushError({\r\n\t\t\tid: v4(),\r\n\t\t\tmessage: [message],\r\n\t\t\ttitle: title || \"Error\",\r\n\t\t})\r\n\t);\r\n\r\nexport const httpWebApiRaw = (\r\n\trequest: AxiosRequestConfig,\r\n\tresponseMapper: (res: AxiosResponse>) => APIResponse,\r\n\ttoken?: string,\r\n): HTTPWebApiResponse => async (dispatch, getState) => {\r\n\ttry {\r\n\t\tif (!request.headers) {\r\n\t\t\trequest.headers = {};\r\n\t\t}\r\n\r\n\t\tconst headerToken = token || getState().data.auth.token;\r\n\r\n\t\tif (headerToken) {\r\n\t\t\trequest.headers[\"Authorization\"] = `Bearer ${headerToken}`;\r\n\t\t}\r\n\r\n\t\tconst response = await axiosIntance.request>(request);\r\n\t\tif (response.status === 200) {\r\n\t\t\treturn responseMapper(response);\r\n\t\t}\r\n\t} catch (e) {\r\n\t\tconst error = e as any;\r\n\t\tif (error.response) {\r\n\t\t\tdipatchHTTPError(dispatch, error.data, error.status);\r\n\t\t} else if (error.request) {\r\n\t\t\tdipatchHTTPError(dispatch, \"No response from server!\");\r\n\t\t} else {\r\n\t\t\tdipatchHTTPError(dispatch, error.message);\r\n\t\t}\r\n\t\treturn undefined;\r\n\t}\r\n};\r\nexport const httpWebApi = (\r\n\trequest: AxiosRequestConfig,\r\n\ttoken?: string) => httpWebApiRaw(request, response => response.data, token)\r\n\r\nexport const webApi = (request: AxiosRequestConfig, getErrorMessage?: (error:ApiErrorResponse) => string): WebApiResponse => async (dispatch, getState) => {\r\n\tconst response = await dispatch(webApiWithResponse(request, getErrorMessage));\r\n\treturn response !== undefined && response.resCode === \"OK\" ? response.obj : undefined;\r\n};\r\n\r\nconst globalErrorExceptions = [\"NOFUNDS\", \"E--1\", \"M-15\",\"M-16\",\"M-17\" ] \r\nexport const webApiWithResponse = (request: AxiosRequestConfig, getErrorMessage?: (error:ApiErrorResponse) => string, errorExceptions?: string[]): WebApiWholeResponse => async (\r\n\tdispatch,\r\n\tgetState\r\n) => {\r\n\ttry {\r\n\t\tconst response = await dispatch(httpWebApi(request));\r\n\r\n\t\tif (response === undefined) {\r\n\t\t\treturn response;\r\n\t\t}\r\n\r\n\t\tconst exceptionCodes = errorExceptions ? [...globalErrorExceptions, ...errorExceptions] : globalErrorExceptions;\r\n\r\n\t\tif (response.resCode !== \"OK\" && exceptionCodes.indexOf(response.resCode) === -1) {\r\n\t\t\tconst errorMessage = getErrorMessage ? getErrorMessage(response) : response.resDesc\r\n\t\t\tdipatchError(dispatch, errorMessage);\r\n\t\t}\r\n\r\n\t\treturn response;\r\n\t} catch (e) {\r\n\t\tconst error = e as any;\r\n\t\tdipatchError(dispatch, error.toString());\r\n\t\treturn undefined;\r\n\t}\r\n};\r\n\r\nexport const httpWebApiFile = (\r\n\trequest: AxiosRequestConfig,\r\n\ttoken?: string) => httpWebApiRaw(request, response => {\r\n\t\treturn response.data\r\n\t}, token)\r\n","import { httpWebApi } from \"../../../core/http/httpThunks\";\r\nimport { LoginResponse } from \"../../models\";\r\nimport { LocalizationLanguage } from \"../../../core/localization/types\";\r\n\r\nexport const firstLoginWebApi = (username: string, password: string, lang: LocalizationLanguage, source: string) =>\r\n\thttpWebApi({\r\n\t\tmethod: \"POST\",\r\n\t\turl: \"user/firstuserlogin\",\r\n\t\tdata: {\r\n\t\t\tusername,\r\n\t\t\tpassword,\r\n\t\t\tlang,\r\n\t\t\tsource,\r\n\t\t},\r\n\t});\r\n","import { httpWebApi } from \"../../../core/http/httpThunks\";\r\nimport { LoginResponse } from \"../../models\";\r\nimport { LocalizationLanguage } from \"../../../core/localization/types\";\r\n\r\nexport const loginWebApi = (username: string, password: string, lang: LocalizationLanguage, token: string, source: string) =>\r\n\thttpWebApi({\r\n\t\tmethod: \"POST\",\r\n\t\turl: \"user/checkuserlogin\",\r\n\t\tdata: {\r\n\t\t\tusername,\r\n\t\t\tpassword,\r\n\t\t\tlang,\r\n\t\t\tsource,\r\n\t\t},\r\n\t}, token);\r\n","import { LocalizationLanguage } from \"../../core/localization/types\";\r\nimport { ThunkType } from \"../../core/store/reducers\";\r\nimport { firstLoginWebApi } from \"./api/firstLogin\";\r\nimport { loginWebApi } from \"./api/login\";\r\nimport { successfulLogin, failedLogin, setPendingLoginState, setToken } from \"./authDataSlice\";\r\nimport { deleteUserToken } from \"./authUXSlice\";\r\nimport { ErrorCodes } from \"../../core/http/types\";\r\nimport { LoginResponse } from \"../models\";\r\n\r\nexport const loginUser = (\r\n\tusername: string,\r\n\tpassword: string,\r\n\tlanguage: LocalizationLanguage,\r\n\tsource: string,\r\n): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status === \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\r\n\tconst token = store.ux.auth.users[username.toLowerCase()];\r\n\r\n\tdispatch(setPendingLoginState());\r\n\r\n\tconst loginResponse = !token\r\n\t\t? await dispatch(firstLoginWebApi(username, password, language,source))\r\n\t\t: await dispatch(loginWebApi(username, password, language, token,source));\r\n\r\n\tif (!loginResponse) {\r\n\t\tdispatch(\r\n\t\t\tfailedLogin({\r\n\t\t\t\tcode: ErrorCodes.HTTPLoginError,\r\n\t\t\t\tmessage: \"Greška u komunikaciji sa serverom.\",\r\n\t\t\t})\r\n\t\t);\r\n\t} else if (loginResponse.resCode !== \"OK\") {\r\n\t\tif (loginResponse.resCode === ErrorCodes.AuthWrongToken) {\r\n\t\t\tdispatch(deleteUserToken(username))\r\n\t\t}\r\n\r\n\t\tdispatch(\r\n\t\t\tfailedLogin({\r\n\t\t\t\tcode: loginResponse.resCode,\r\n\t\t\t\tmessage: loginResponse.resDesc,\r\n\t\t\t})\r\n\t\t);\r\n\t} else {\r\n\t\tdispatch(setToken(loginResponse.obj.uData.token || token));\r\n\t\tdispatch(successfulLogin(loginResponse.obj));\r\n\t}\r\n};\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { loginUser } from \"./thunks\";\r\nimport { AuthorizationState } from \"./types\";\r\nimport { StoreType } from \"../../core/store/reducers\";\r\nimport { useCallback } from \"react\";\r\nimport { resetLoginState } from \"./authDataSlice\";\r\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\r\nimport { useTheme } from '@material-ui/core/styles';\r\n\r\nexport const useAuth = () => {\r\n\tconst dispatch = useDispatch();\r\n\tconst authStatus = useSelector(store => store.data.auth.current);\r\n\tconst token = useSelector(store => store.data.auth.token);\r\n\r\n\tconst theme = useTheme();\r\n\tconst source = useMediaQuery(theme.breakpoints.only('xs')) ? \"M\" : \"\";\r\n\r\n\tconst loginCallback = useCallback(\r\n\t\t(username, password, language, source) => dispatch(loginUser(username, password, language, source)),\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\tconst logoutCallback = useCallback(() => dispatch(resetLoginState()), [dispatch]);\r\n\r\n\treturn [authStatus, loginCallback, logoutCallback, token] as [\r\n\t\ttypeof authStatus,\r\n\t\ttypeof loginCallback,\r\n\t\ttypeof logoutCallback,\r\n\t\ttypeof token,\r\n\t];\r\n};\r\n\r\nexport const useLastLoginUsername = () =>\r\n\tuseSelector(store => store.ux.auth.lastLoginUsername || \"\");\r\n","import { Theme, makeStyles, createStyles } from \"@material-ui/core\";\r\n\r\nexport const useUserAvatarStyles = makeStyles((theme: Theme) => {\r\n\tconst { permanentBreakpoint } = theme.navDrawer\r\n\treturn createStyles({\r\n\t\troot: {\r\n\t\t\talignItems: \"baseline\",\r\n\t\t\tdisplay: \"flex\",\r\n\t\t},\r\n\t\tavatar: {},\r\n\t\tname: {\r\n\t\t\tdisplay: \"none\",\r\n\t\t\t[permanentBreakpoint]: {\r\n\t\t\t\tdisplay: \"inline\"\r\n\t\t\t}\r\n\t\t},\r\n\t\tbadgeGreen: {\r\n\t\t\tbackgroundColor: theme.palette.success.main,\r\n\t\t\tcolor: theme.palette.success.main\r\n\t\t},\r\n\t\tbadgeError: {\r\n\t\t\tbackgroundColor: theme.palette.error.main,\r\n\t\t\tcolor: theme.palette.error.main\r\n\t\t},\r\n\t});\r\n});\r\n","import React from \"react\";\r\nimport { App } from \"@capacitor/app\";\r\n\r\nexport const useCapacitorAppState = () => {\r\n\tconst [isVisiable, setIsVisiable] = React.useState(true);\r\n\tReact.useEffect(() => {\r\n\t\tconsole.log(\"registering appstate change\");\r\n\t\tconst listener = App.addListener(\"appStateChange\", (state: any) => {\r\n\t\t\tconsole.log(\"App state changed. Is active?\", state.isActive);\r\n\t\t\tsetIsVisiable(state.isActive);\r\n\t\t});\r\n\t\treturn () => {\r\n\t\t\tlistener.remove();\r\n\t\t};\r\n\t}, [setIsVisiable]);\r\n\r\n\treturn {\r\n\t\tisVisiable,\r\n\t};\r\n};\r\n","import * as signalR from \"@microsoft/signalr\";\r\n\r\nconst reconnectTimeout = 10 * 1000;\r\n\r\nclass RetryPolicy implements signalR.IRetryPolicy {\r\n\tprivate readonly backoff: number[] = [0, 500, 1500, 1500, 3000];\r\n\tprivate shouldReconnect: boolean = true;\r\n\r\n\tpublic nextRetryDelayInMilliseconds(retryContext: signalR.RetryContext) {\r\n\t\tconsole.log(\"SignalR reconnect context\", retryContext);\r\n\t\tif (!this.shouldReconnect) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tconst selected = this.backoff[retryContext.previousRetryCount];\r\n\t\treturn selected !== undefined ? selected : reconnectTimeout;\r\n\t}\r\n\r\n\tpublic stopReconnect = () => {\r\n\t\tthis.shouldReconnect = false;\r\n\t};\r\n}\r\n\r\nexport class ConnextionManager {\r\n\tprivate readonly hubUrl: string;\r\n\tprivate readonly token: string;\r\n\tprivate connection?: signalR.HubConnection;\r\n\tprivate readonly retryPolicy = new RetryPolicy();\r\n\r\n\tconstructor(hubUrl: string, token: string) {\r\n\t\tthis.hubUrl = hubUrl;\r\n\t\tthis.token = token;\r\n\t\tthis.createConnection();\r\n\t}\r\n\r\n\tprivate createConnection = () => {\r\n\t\tthis.connection = new signalR.HubConnectionBuilder()\r\n\t\t\t.withUrl(this.hubUrl, { accessTokenFactory: () => this.token })\r\n\t\t\t.configureLogging(signalR.LogLevel.Information)\r\n\t\t\t.withAutomaticReconnect(this.retryPolicy)\r\n\t\t\t.build();\r\n\r\n\t\tthis.connection.onreconnected((connectionId) => {\r\n\t\t\tconsole.log(\"SignalR reconnected: \", connectionId);\r\n\t\t});\r\n\r\n\t\tthis.connection.onclose(async (error) => {\r\n\t\t\tconsole.log(\"SignalR closed\", error);\r\n\t\t});\r\n\t};\r\n\r\n\tpublic start = async () => {\r\n\t\ttry {\r\n\t\t\tawait this.connection?.start();\r\n\t\t\tconsole.log(\"SignalR connected: \", this.connection?.connectionId);\r\n\t\t} catch (err) {\r\n\t\t\tconsole.log(\"SignalR connection error\", err);\r\n\t\t}\r\n\t};\r\n\r\n\tpublic registerHandler = (type: string, handler: (e: T) => void) => {\r\n\t\tconsole.log(\"Subscribing\", type);\r\n\t\tif (this.connection) {\r\n\t\tthis.connection.on(type, handler);}\r\n\t\treturn () => this.connection?.off(type);\r\n\t};\r\n\r\n\tpublic stop = async () => {\r\n\t\tthis.retryPolicy.stopReconnect();\r\n\t\tconsole.log(\"stopping SignalR: \", this.connection?.connectionId);\r\n\t\tawait this.connection?.stop();\r\n\t};\r\n\r\n\tpublic reconnect = async () => {\r\n\t\tawait this.connection?.stop();\r\n\t\tthis.createConnection();\r\n\t\tawait this.start();\r\n\t};\r\n\r\n\tpublic onStatusChange = (callback: (status: boolean) => void) => {\r\n\t\tif (this.connection) { \r\n\t\tthis.connection.onreconnected(() => callback(true));\r\n\t\tthis.connection.onclose(() => callback(false));\r\n\t\tthis.connection.onreconnecting(() => callback(false)); }\r\n\t};\r\n\r\n\tpublic isActive = () => {\r\n\t\treturn this.connection?.state === signalR.HubConnectionState.Connected;\r\n\t};\r\n}\r\n","import React from \"react\";\r\nimport { useCapacitorAppState } from \"../util/useCapacitorAppState\";\r\nimport { useMobileApp } from \"../util/useMoblieApp\";\r\nimport { ConnextionManager } from \"./ConnectionManager\";\r\n\r\nexport const NotificationContext = React.createContext({} as any);\r\n\r\nexport interface NotificationContextProviderProps {\r\n\thubUrl: string;\r\n\ttoken: string;\r\n\tconnect: boolean;\r\n}\r\n\r\nexport const NotificationContextProvider: React.FunctionComponent = ({\r\n\thubUrl,\r\n\ttoken,\r\n\tchildren,\r\n\tconnect,\r\n}) => {\r\n\tconst [connectionManager, setConnectionManager] = React.useState();\r\n\tconst { isVisiable } = useCapacitorAppState();\r\n\tconst isMobileApp = useMobileApp();\r\n\tconst shouldReconnect = isVisiable || !isMobileApp;\r\n\tReact.useEffect(() => {\r\n\t\tconst manager = shouldReconnect ? new ConnextionManager(hubUrl, token) : undefined;\r\n\t\t(async () => {\r\n\t\t\tif (connect && manager) {\r\n\t\t\t\tawait manager.start();\r\n\t\t\t}\r\n\t\t\tsetConnectionManager(manager);\r\n\t\t})();\r\n\t\treturn () => {\r\n\t\t\tif (manager) {\r\n\t\t\t\tmanager.stop();\r\n\t\t\t}\r\n\t\t};\r\n\t}, [hubUrl, token, connect, shouldReconnect]);\r\n\r\n\treturn connectionManager ? (\r\n\t\t{children}\r\n\t) : null;\r\n};\r\n","import { Capacitor } from \"@capacitor/core\";\r\n\r\nexport const useMobileApp = () => Capacitor.getPlatform() !== 'web'","import React from \"react\";\r\nimport { User } from \"../../data/auth/types\";\r\nimport { useCapacitorAppState } from \"../util/useCapacitorAppState\";\r\nimport { NotificationContext } from \"./NotificationContext\";\r\n\r\nexport const useNotificationHandler = (\r\n\ttype: string,\r\n\thandler: (e: TNotification) => void,\r\n\tdeps: React.DependencyList\r\n) => {\r\n\tconst connectionManager = React.useContext(NotificationContext);\r\n\tconst handlerCallback = React.useCallback(handler, deps);\r\n\tReact.useEffect(\r\n\t\t() => connectionManager.registerHandler(type, handlerCallback),\r\n\t\t[connectionManager, type, handlerCallback]\r\n\t);\r\n};\r\n\r\nexport const useAlarmsChangedHandler = () => {\r\n\tconst connectionManager = React.useContext(NotificationContext);\r\n\tuseNotificationHandler(\"AlarmsModified\", () => connectionManager.reconnect(), [connectionManager]);\r\n};\r\n\r\nexport const canRecieveNotifications = (user: User) =>\r\n\tuser.roleCode === \"BROKER\" || user.roleCode === \"CONTROL\";\r\n\r\nexport const useNotificationStatus = () => {\r\n\tconst connectionManager = React.useContext(NotificationContext);\r\n\tconst { isVisiable } = useCapacitorAppState()\r\n\r\n\tconst [isActive, setIsActive] = React.useState(connectionManager.isActive());\r\n\r\n\tReact.useEffect(() => {\r\n\t\tconnectionManager.onStatusChange(setIsActive);\r\n\t}, [connectionManager, setIsActive]);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (isVisiable) {\r\n\t\t\tsetIsActive(connectionManager.isActive());\r\n\t\t}\r\n\t}, [connectionManager, isVisiable, setIsActive]);\r\n\r\n\treturn isActive;\r\n};\r\n","import { LocalNotifications } from '@capacitor/local-notifications';\nimport { makeAutoIncrement } from '../util/increment';\n\nconst autoIncrement = makeAutoIncrement();\n\n/**\n * Creation of this object is lazy\n * We are missing it when we try to access before its loaded\n * \n * App should work normally\n */\nif (!window.Notification) {\n\t// @ts-ignore\n\twindow.Notification = {\n\t\tpermission: 'default',\n\t};\n}\n\ntype TNotification = {\n\ttitle: string;\n\tbody: string;\n\tid?: number;\n\ticonPath?: string;\n\tstyle?: string;\n summary?: string;\n priority?: string;\n\tactionId?: string;\n\tclick_action?: string;\n}\n\nexport const NotificationManager = {\n\tget permission() {\n\t\treturn Notification.permission;\n\t},\n\tschedule(notification: TNotification | Array) {\n\t\tlet notifications = Array.isArray(notification) ? notification : [notification];\n\n\t\tLocalNotifications.schedule({\n\t\t\tnotifications: notifications.map((n) => {\n\t\t\t\treturn {\n\t\t\t\t\t/**\n\t\t\t\t\t * NOTE:\n\t\t\t\t\t * it would be awesome that we can provide id here instead of making it fake\n\t\t\t\t\t */\n\t\t\t\t\tid: n.id ?? autoIncrement.increment(),\n\t\t\t\t\ttitle: n.title,\n\t\t\t\t\tbody: n.body,\n\t\t\t\t\tstyle: 'BigText',\n\t\t\t\t\tsummary: 'Expanded notification',\n\t\t\t\t\tpriority: 'high',\n\t\t\t\t\tactionId: 'openMainActivity', \n\t\t\t\t\tclick_action: 'window.open(\"wwww.mvi.rs\", \"_blank\")',\n\t\t\t\t};\n\t\t\t}),\n\t\t});\n\t},\n\tasync requestPermission(): Promise {\n\t\treturn LocalNotifications.requestPermissions();\n\t},\n}\n","export function makeAutoIncrement(startPosition = 0) {\n\tlet val = startPosition;\n\treturn {\n\t\tget value() {\n\t\t\treturn val;\n\t\t},\n\t\tincrement() {\n\t\t\treturn ++val;\n\t\t},\n\t};\n}","import React from \"react\";\r\n\r\nexport type LinkMenuItemType = {\r\n\ttype: \"Link\";\r\n\tkey: string;\r\n\ttitle: string;\r\n\tComponent: PageComponent;\r\n\tpath: string;\r\n\ticon?: React.FunctionComponent;\r\n\thidden?: boolean;\r\n\taccessRights: AccessRights;\r\n};\r\n\r\nexport type SubmenuMenuItemType = {\r\n\ttype: \"Menu\";\r\n\tkey: string;\r\n\ttitle: string;\r\n\titems: MenuItemType[];\r\n\ticon?: React.FunctionComponent;\r\n\thidden?: boolean;\r\n};\r\n\r\nexport enum AccessRights {\r\n\tAll = 0,\r\n\tReadOnly = 1,\r\n\tNone = -1,\r\n}\r\n\r\nexport interface PageComponentProps {\r\n\tuserAccessRights: AccessRights;\r\n}\r\n\r\nexport type PageComponent = React.FunctionComponent<\r\n\tTProps\r\n>;\r\n\r\nexport type MenuItemType = LinkMenuItemType | SubmenuMenuItemType;\r\n\r\nexport type NavigationItem = {\r\n\tisMenuItem: boolean;\r\n\tComponent: React.FunctionComponent;\r\n\tpath: string;\r\n\tnotifications?: boolean;\r\n};","import React, { useContext } from \"react\";\r\nimport { useAuth } from \"../data/auth/hooks\";\r\nimport { Avatar, IconButton, Typography, Box, Menu, MenuItem, styled, Badge } from \"@material-ui/core\";\r\nimport { useUserAvatarStyles } from \"./UserAvatarStyle\";\r\nimport { LocalizationContext } from \"../core/localization/Localization\";\r\nimport { canRecieveNotifications, useNotificationStatus } from \"../core/notifications/hooks\";\r\nimport { NotificationManager } from \"../core/notifications/NotificationsManager\";\r\n\r\nconst getInitials = (name: string) => {\r\n\tif (!name) {\r\n\t\treturn \"NN\";\r\n\t}\r\n\r\n\tconst nameWords = name.split(\" \");\r\n\tif (nameWords.length === 1) {\r\n\t\treturn nameWords[0].substring(0, 1).toUpperCase();\r\n\t}\r\n\r\n\treturn nameWords[0].substring(0, 1).toUpperCase() + nameWords[1].substring(0, 1).toUpperCase();\r\n};\r\n\r\nexport const UserAvatar: React.FunctionComponent = porps => {\r\n\tconst styles = useUserAvatarStyles();\r\n\tconst { getString } = useContext(LocalizationContext);\r\n\tconst [authState, , logaout] = useAuth();\r\n\tconst [anchorEl, setAnchorEl] = React.useState(null);\r\n\tconst notificationStatus = useNotificationStatus()\r\n\tconst open = Boolean(anchorEl);\r\n\r\n\tconst handleMenu = (event: React.MouseEvent) => {\r\n\t\tsetAnchorEl(event.currentTarget);\r\n\t};\r\n\r\n\tconst handleClose = () => {\r\n\t\tsetAnchorEl(null);\r\n\t};\r\n\r\n\tif (authState.status !== \"successful\") {\r\n\t\treturn null;\r\n\t}\r\n\r\n\tconst askForPermission = async () => NotificationManager.requestPermission();\r\n\tconst showSystemNotification =\r\n\t\tNotificationManager.permission === \"default\" && canRecieveNotifications(authState.user);\r\n\r\n\tconst name = authState.user.employeeName || authState.user.clientPersonName;\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t{name}\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t{getInitials(name)}\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t{showSystemNotification && (\r\n\t\t\t\t\t{getString(\"allowSystemNotifications\")}\r\n\t\t\t\t)}\r\n\t\t\t\t{getString(\"logout\")}\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n","import React, { useContext } from \"react\";\r\nimport { AppBar, IconButton, Toolbar, Typography, Grid } from \"@material-ui/core\";\r\nimport MenuIcon from \"@material-ui/icons/Menu\";\r\nimport { useMainBarStyles } from \"./MainBarStyles\";\r\nimport { LocalizationContext } from \"../core/localization/Localization\";\r\nimport { UserAvatar } from \"./UserAvatar\";\r\nimport { appConfig } from \"../core/config/config\";\r\n\r\ninterface MainBarProps {\r\n\ttoggleNavMenu: () => void;\r\n}\r\n\r\nexport const MainBar: React.FunctionComponent = props => {\r\n\tconst styles = useMainBarStyles();\r\n\tconst { getString } = useContext(LocalizationContext);\r\n\r\n\tconst nscomexlogo = require(\"'../../../public/NSCOMEX-LOGO.png\");\r\n\r\n\treturn (\r\n\t\t\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\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t \r\n\t\t\t\t\t{/*{`${getString(\"mainTitle\")} ${\r\n\t\t\t\t\t\tappConfig.general.titleSufix}`} */}\r\n\t\t\t\t \r\n \t\t\t \t \r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n","import { makeStyles, Theme, createStyles } from \"@material-ui/core\";\r\n\r\nexport const useMenuItemStyles = (level: number) =>\r\n\tmakeStyles((theme: Theme) => {\r\n\t\treturn createStyles({\r\n\t\t\tmenuItem: {\r\n\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\tpaddingLeft: theme.spacing(2 + level * 2),\r\n\t\t\t},\r\n\t\t});\r\n\t})();\r\n","import { useMemo } from \"react\";\r\nimport { MenuItemType, AccessRights, LinkMenuItemType, SubmenuMenuItemType } from \"./types\";\r\n\r\nexport const useVisiableNavigationItems = (items: MenuItemType[]): MenuItemType[] =>\r\n\tuseMemo(() => items.filter(isItemVisiable), [items]);\r\n\r\nconst isItemVisiable = (item: MenuItemType): boolean => {\r\n\tif (item.type === \"Link\") {\r\n\t\treturn isLinkVisiable(item);\r\n\t} else {\r\n\t\treturn isSubmenuVisiable(item);\r\n\t}\r\n};\r\n\r\nconst isSubmenuVisiable = (item: SubmenuMenuItemType): boolean =>\r\n\titem.hidden !== true &&\r\n\titem.items.length > 0 &&\r\n\titem.items.reduce((visiable, subItem) => visiable || isItemVisiable(subItem), false as boolean);\r\n\r\nconst isLinkVisiable = (item: LinkMenuItemType): boolean =>\r\n\titem.hidden !== true && item.accessRights !== AccessRights.None;\r\n\r\nexport const getAllVisiableLinkItems = (items: MenuItemType[], result: LinkMenuItemType[] = []) => {\r\n\titems.forEach(item => {\r\n\t\tif (item.type === \"Link\") {\r\n\t\t\tif (item.accessRights !== AccessRights.None) result.push(item);\r\n\t\t} else {\r\n\t\t\tgetAllVisiableLinkItems(item.items, result);\r\n\t\t}\r\n\t});\r\n\treturn result;\r\n};\r\n","import React, { useMemo } from \"react\";\r\nimport { MenuItemType, SubmenuMenuItemType, LinkMenuItemType } from \"./types\";\r\nimport {\r\n ListItem,\r\n ListItemIcon,\r\n ListItemText,\r\n Collapse,\r\n List,\r\n} from \"@material-ui/core\";\r\nimport ExpandLess from \"@material-ui/icons/ExpandLess\";\r\nimport ExpandMore from \"@material-ui/icons/ExpandMore\";\r\nimport { useMenuItemStyles } from \"./menuItemsStyles\";\r\nimport { useToggleStateDictionary } from \"../util/hooks\";\r\nimport { Link } from \"react-router-dom\";\r\nimport { useVisiableNavigationItems } from \"./hooks\";\r\n\r\nexport interface SubmenuMenuItemProps {\r\n submenu: SubmenuMenuItemType;\r\n open: boolean;\r\n toggleOpen: () => void;\r\n level: number;\r\n}\r\n\r\nexport const SubmenuMenuItem: React.FunctionComponent = ({\r\n submenu,\r\n open,\r\n toggleOpen,\r\n level,\r\n}) => {\r\n const styles = useMenuItemStyles(level);\r\n const Icon = submenu.icon;\r\n\r\n return (\r\n <>\r\n \r\n {Icon && (\r\n \r\n \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\nexport interface PageMenuItemProps {\r\n page: LinkMenuItemType;\r\n level: number;\r\n}\r\n\r\nexport const LinkMenuItem: React.FunctionComponent = ({\r\n page,\r\n level,\r\n}) => {\r\n const styles = useMenuItemStyles(level);\r\n const Icon = page.icon;\r\n\r\n return (\r\n \r\n {Icon && (\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nexport interface MenuListProps {\r\n level?: number;\r\n menuItems: MenuItemType[];\r\n}\r\n\r\nexport const MenuList: React.FunctionComponent = ({\r\n level,\r\n menuItems,\r\n}) => {\r\n const currentLevel = level || 0;\r\n const visiableItems = useVisiableNavigationItems(menuItems);\r\n const submenuItemKeys = useMemo(\r\n () => visiableItems.filter((i) => i.type === \"Menu\").map((i) => i.key),\r\n [visiableItems]\r\n );\r\n\r\n const [openDictionary, toggleOpenDictionary] =\r\n useToggleStateDictionary(submenuItemKeys);\r\n\r\n const open = (key: string) => {\r\n // navigation.closeDrawer();\r\n return openDictionary[key];\r\n };\r\n\r\n const toogleOpen = (key: string) => {\r\n return toggleOpenDictionary[key];\r\n };\r\n\r\n return (\r\n \r\n {visiableItems.map((item) =>\r\n item.type === \"Link\" ? (\r\n \r\n ) : (\r\n \r\n )\r\n )}\r\n \r\n );\r\n};\r\n","import React, { useMemo, useEffect } from \"react\";\r\nimport MaterialTable, { MaterialTableProps, Options } from \"material-table\";\r\nimport { useMaterialTableLocalization } from \"./useMaterialTableLocalization\";\r\n\r\nexport interface TableDataProps {\r\n\timmutableData?: TData[];\r\n\tgetData?: () => void;\r\n}\r\n\r\nexport type TablePropsType = TableDataProps &\r\n\tOmit, \"data\" | \"isLoading\">;\r\n\r\nexport function Table(props: TablePropsType) {\r\n\tconst { immutableData, getData, options, ...materialTableProps } = props;\r\n\tconst tableData = immutableData || [];\r\n\tconst isLoading = immutableData === undefined;\r\n\tconst tableDataMutable = useMemo(() => tableData.map(d => ({ ...d })), [tableData]);\r\n\r\n\tconst tableOptions: Options = useMemo(() => {\r\n\t\tconst propOptions = options || {};\r\n\t\treturn {\r\n\t\t\tpadding: \"dense\",\r\n\t\t\t...propOptions,\r\n\t\t\theaderStyle: {\r\n\t\t\t\tfontWeight: \"bold\",\r\n\t\t\t\t...propOptions.headerStyle,\r\n\t\t\t},\r\n\t\t};\r\n\t}, [options]);\r\n\r\n\tconst localization = useMaterialTableLocalization();\r\n\r\n\tuseEffect(() => {\r\n\t\tif (!immutableData && getData) getData();\r\n\t}, [immutableData, getData]);\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t{...materialTableProps}\r\n\t\t\ttitle=\"\"\r\n\t\t\tdata={tableDataMutable}\r\n\t\t\tisLoading={isLoading}\r\n\t\t\tlocalization={localization}\r\n\t\t\toptions={tableOptions}\r\n\t\t/>\r\n\t);\r\n}\r\n","import { useContext } from \"react\";\r\nimport { Localization } from \"material-table\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\n\r\nexport const useMaterialTableLocalization = (): Localization => {\r\n\tconst { getString } = useContext(LocalizationContext);\r\n\treturn {\r\n\t\ttoolbar: {\r\n\t\t\tsearchPlaceholder: getString(\"search\"),\r\n\t\t\tsearchTooltip: getString(\"search\"),\r\n\t\t},\r\n\t\theader: {\r\n\t\t\tactions: \"\",\r\n\t\t},\r\n\t\tpagination: {\r\n\t\t\tfirstAriaLabel: getString(\"tableFirsPage\"),\r\n\t\t\tfirstTooltip: getString(\"tableFirsPage\"),\r\n\t\t\tlastAriaLabel: getString(\"tableLastPage\"),\r\n\t\t\tlastTooltip: getString(\"tableLastPage\"),\r\n\t\t\tlabelDisplayedRows: getString(\"tableDisplayedRows\"),\r\n\t\t\tlabelRowsSelect: getString(\"tabledDisplayedPerPage\"),\r\n\t\t\tlabelRowsPerPage: getString(\"tabledDisplayedPerPage\"),\r\n\t\t\tnextAriaLabel: getString(\"tableNextPage\"),\r\n\t\t\tnextTooltip: getString(\"tableNextPage\"),\r\n\t\t\tpreviousAriaLabel: getString(\"tablePreviousPage\"),\r\n\t\t\tpreviousTooltip: getString(\"tablePreviousPage\"),\r\n\t\t},\r\n\t\tbody: {\r\n\t\t\temptyDataSourceMessage: \"\",\r\n\t\t\taddTooltip: getString(\"tableAdd\"),\r\n\t\t\teditTooltip: getString(\"tableEdit\"),\r\n\t\t\tdeleteTooltip: getString(\"tableDelete\"),\r\n\t\t\teditRow: {\r\n\t\t\t\tsaveTooltip: getString(\"tableDelete\"),\r\n\t\t\t\tcancelTooltip: getString(\"tableCancel\"),\r\n\t\t\t\tdeleteText: getString(\"tableConfirmationDelete\"),\r\n\t\t\t},\r\n\t\t},\r\n\t};\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { Attribute } from \"../types\";\r\n\r\nexport const getAllAttributesApi = (userId: string) =>\r\n\twebApi({\r\n\t\tmethod: \"GET\",\r\n\t\turl: \"listing/getattrlist\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t},\r\n\t});\r\n\r\nexport default getAllAttributesApi;\r\n","import { ValidationState } from \"../../../core/util/types\";\r\nimport { Status } from \"../../models\";\r\n\r\nexport interface Attribute {\r\n\tattrId?: string; // \t\tPK\r\n\tattrName: string; // \t\tnaziv\r\n\tattrNameen: string; // \t\tnaziv EN\r\n\tattrType: AttributeType; // \t\ttip (TEXT / SELECT)\r\n\tunit?: number; // \t\t\tjedinica mere\r\n\tunitCode?: string; // \t\toznaka JM\r\n\tmandatory: AttributeManditory; // \t\tobavezan atribut\r\n\tcomparator: AttrCompType; // \t\tkomparator (<=, =, >=)\r\n\torderNo?: number; // \t\tredosled prikaza atributa\r\n\tstatus: Status; // \t\t\tstatus\r\n}\r\n\r\nexport interface AttributeValue {\r\n\tattrValueId?: string; // \t\tPK\r\n\tattributeId: string; // \t\tID atributa\r\n\tname: string; // \t\t\tnaziv attr.\r\n\tnameen: string; // \t\tnaziv attr. EN\r\n\tvalue: string; // \t\t\tvrednost attr.\r\n\tvalueen: string; // \t\tvrednost attr. EN\r\n\torderNo?: number; // \t\tredosled prikaza\r\n\tstatus: Status; // \t\t\tstatus\r\n}\r\n\r\nexport enum AttributeManditory {\r\n\tTrue = 1,\r\n\tFalse = 0,\r\n}\r\n\r\nexport enum AttributeType {\r\n\tText = \"TEXT \",\r\n\tSelect = \"SELECT \",\r\n}\r\n\r\n\r\nexport enum AttrCompType {\r\n\tLessThan = \"<=\",\r\n\tEqual = \"= \",\r\n\tMoreThan = \">=\",\r\n }\r\n \r\nexport type AttributeValidationState = ValidationState;\r\n\r\nexport enum ErrorCodeExceptions {\r\n\tReferenceErrorCode = \"E-903\",\r\n}\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadAllAttributes } from \"../thunks/loadAllAttributes\";\r\nimport { Attribute } from \"../types\";\r\n\r\nexport const useAttributeData = () => {\r\n\tconst data = useSelector(s => s.data.listing.attributes.displayData);\r\n\tconst allData = useSelector(s => s.data.listing.attributes.all);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchLoadAll = React.useCallback(() => dispatch(loadAllAttributes()), [dispatch]);\r\n\r\n\treturn [data, dispatchLoadAll, allData] as [\r\n\t\ttypeof data,\r\n\t\ttypeof dispatchLoadAll,\r\n\t\ttypeof allData\r\n\t];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getAllProductsAPI from \"../api/getAllAttributes\";\r\nimport { setData } from \"../attributeDataReducer\";\r\n\r\nexport const loadAllAttributes = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setData());\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst attributes = await dispatch(getAllProductsAPI(userId));\r\n\r\n\tdispatch(setData(attributes || []));\r\n};\r\n","import React from \"react\";\r\nimport CheckIcon from \"@material-ui/icons/Check\";\r\nimport RemoveIcon from '@material-ui/icons/Remove';\r\n\r\nexport interface DisplayBoolNumberProps {\r\n\tvalue?: number;\r\n thrutyValue: number;\r\n className?: string;\r\n}\r\n\r\nexport const DisplayBoolNumber: React.FunctionComponent = ({ value, thrutyValue, className }) =>\r\n\tvalue === thrutyValue ? : ;\r\n","import React from \"react\";\r\nimport { useDisplayAttribute } from \"../../../data/listing/attributes/hooks/useDisplayAttribute\";\r\nimport { Attribute, AttributeType } from \"../../../data/listing/attributes/types\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { DisplayAttributeBasicInfo } from \"./DisplayAttributeBasicInfo\";\r\nimport { ExpansionPanel, ExpansionPanelSummary, Typography, Grid } from \"@material-ui/core\";\r\nimport ExpandMoreIcon from \"@material-ui/icons/ExpandMore\";\r\nimport { useToggleStateDictionary } from \"../../../core/util/hooks\";\r\nimport { DisplayAttributeValues } from \"./attributeValues/DisplayAttributeValues\";\r\n\r\nenum AccordionNames {\r\n\tBasicInfo = \"basicInfo\",\r\n\tValues = \"values\",\r\n}\r\n\r\nconst accordionNames = Object.values(AccordionNames);\r\n\r\nexport interface DisplayAttributeProps {\r\n\tid?: string;\r\n}\r\n\r\nexport const DisplayAttribute: React.FunctionComponent = ({ id }) => {\r\n\tconst attribute = useDisplayAttribute(id);\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\tconst [open, toggleOpen] = useToggleStateDictionary(accordionNames, [AccordionNames.BasicInfo]);\r\n\r\n\treturn !attribute || !attribute.attrId ? (\r\n\t\t<>{\"loading placeholder\"}\r\n\t) : (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t}>\r\n\t\t\t\t\t{getString(\"tableBasciInfo\")}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t}>\r\n\t\t\t\t\t{getString(\"attributeValuesTitle\")}\r\n\t\t\t\t\r\n\t\t\t\t \r\n\t\t\t \r\n\t\t\r\n\t);\r\n};\r\n\r\nexport const useViewAttribute = () => {\r\n\tconst showWithDrawer = React.useContext(DisplayDrawerContext);\r\n\treturn React.useCallback(\r\n\t\t(attribute: Attribute) => showWithDrawer(),\r\n\t\t[showWithDrawer]\r\n\t);\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { Attribute } from \"../types\";\r\n\r\nexport const getAttributeApi = (userId: string, attrid: string) =>\r\n\twebApi({\r\n\t\tmethod: \"GET\",\r\n\t\turl: \"listing/getattr\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t\tattrid\r\n\t\t},\r\n\t});\r\n\r\nexport default getAttributeApi;\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getAttributeApi from \"../api/getAttribute\";\r\nimport { setDisplayed } from \"../attributeDataReducer\";\r\nimport { Attribute } from \"../types\";\r\n\r\nexport const loadAttribute = (attributeId: string): ThunkType => async (dispatch, getStore) => {\r\n\tdispatch(setDisplayed());\r\n\r\n\tconst role = await dispatch(getAttribute(attributeId));\r\n\r\n\tdispatch(setDisplayed(role));\r\n};\r\n\r\nexport const getAttribute = (attributeId: string): ThunkType> => async (\r\n\tdispatch,\r\n\tgetStore\r\n) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\treturn await dispatch(getAttributeApi(userId, attributeId));\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { Attribute } from \"../types\";\r\nimport { loadAttribute } from \"../thunks/loadAttribute\";\r\n\r\nexport const useDisplayAttribute = (attrId?: string) => {\r\n\tconst storeAttribute = useSelector(\r\n\t\tstore => store.data.listing.attributes.displayed\r\n\t);\r\n\r\n\tconst displayedProduct = storeAttribute && storeAttribute.attrId === attrId ? storeAttribute : undefined;\r\n\r\n\tconst displatch = useDispatch();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (attrId) {\r\n\t\t\tdisplatch(loadAttribute(attrId));\r\n\t\t}\r\n\t}, [displatch, attrId]);\r\n\r\n\treturn displayedProduct;\r\n};\r\n","import React from \"react\"\r\n\r\nexport interface DisplayDrawerContextType {\r\n (content: React.ReactNode): void\r\n}\r\n\r\nexport const DisplayDrawerContext = React.createContext(() => {});","import { Theme, makeStyles, createStyles } from \"@material-ui/core\";\r\n\r\nexport const useDisplaySingleEmementStyles = makeStyles((theme: Theme) => {\r\n\treturn createStyles({\r\n\t\troot: {\r\n\t\t\twidth: \"100%\",\r\n\t\t\t// paddingTop: \"2rem\",\r\n\t\t\tpaddingBottom: \"2rem\",\r\n\t\t\t// height: \"100%\",\r\n\t\t\tdisplay: \"flex\",\r\n\t\t\tflexDirection: \"column\",\r\n\t\t\tjustifyContent: \"center\",\r\n\t\t\talignItems: \"center\",\r\n\t\t},\r\n\t\trow: {\r\n\t\t\tdisplay: \"flex\",\r\n\t\t\tjustifyContent: \"space-between\",\r\n//\t\t\twidth: \"80%\",\r\n\r\n\t\t\twidth: \"70%\",\r\n\t\t\tpadding: \"5px\",\r\n\t\t},\r\n\t\trowBorder: {\r\n\t\t\tborderBottom: `1px ${theme.palette.divider} solid`,\r\n\t\t},\r\n\t\tlabel: {\r\n\t\t\tcolor: theme.palette.action.active,\r\n\t\t},\r\n\t\tvalue: {\r\n\t\t\tmarginLeft: \"10px\",\r\n\t\t},\r\n\t\ticon: {\r\n\t\t\theight: \"1rem\",\r\n\t\t},\r\n\t});\r\n});\r\n","import React from \"react\";\r\nimport { Attribute, AttributeManditory } from \"../../../data/listing/attributes/types\";\r\nimport { useDisplaySingleEmementStyles } from \"../../useDisplaySingleEmementStyles\";\r\nimport { DisplayBoolNumber } from \"../../components/common/DisplayBoolNumber\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Status } from \"../../../data/models\";\r\n\r\nexport interface DisplayAttributeBasicInfoProps {\r\n\tattribute: Attribute;\r\n}\r\n\r\nexport const DisplayAttributeBasicInfo: React.FunctionComponent = ({\r\n\tattribute,\r\n}) => {\r\n\tconst style = useDisplaySingleEmementStyles();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\treturn (\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"attributeName\")}\r\n\t\t\t\t{attribute.attrName}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"attributeNameEN\")}\r\n\t\t\t\t{attribute.attrNameen}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"productAttributeType\")}\r\n\t\t\t\t{attribute.attrType}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"attributeUnit\")}\r\n\t\t\t\t{attribute.unitCode}\r\n\t\t\t
\r\n{/*\t\t\t
\r\n\t\t\t\t{getString(\"productAttributeManditory\")}\r\n\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\t
\r\n\t\t\t\t{getString(\"productAttributeComparator\")}\r\n\t\t\t\t{attribute.comparator}\r\n\t\t\t
\r\n{/*\t\t\t\t
\r\n\t\t\t\t{getString(\"attributeOrder\")}\r\n\t\t\t\t{attribute.orderNo}\r\n\t\t\t
*/}\r\n\t\t\t
\r\n\t\t\t\t{getString(\"cliStatus\")}\r\n\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};\r\n","import { webApi } from \"../../../../../core/http/httpThunks\";\r\nimport { AttributeValue } from \"../../types\";\r\n\r\nexport const getAllAttributesValuesApi = (userId: string, attrid: string) =>\r\n\twebApi({\r\n\t\tmethod: \"GET\",\r\n\t\turl: \"listing/getattrvallist\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t\tattrid\r\n\t\t},\r\n\t});\r\n\r\nexport default getAllAttributesValuesApi;\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport getAllAttributes from \"../../api/attributeValues/getAllAttributeValues\";\r\nimport { AttributeValue } from \"../../types\";\r\n\r\nexport const loadAttributeValues = (attributeId: string): ThunkType> => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\treturn await dispatch(getAllAttributes(userId, attributeId));\r\n}\r\n","import React from \"react\";\r\nimport { useDispatch } from \"react-redux\";\r\nimport { AttributeValue } from \"../../types\";\r\nimport { loadAttributeValues } from \"../../thunks/attributeValues/loadAttributeValues\";\r\n\r\nexport const useAttributeValuesData = (attributeId?: string) => {\r\n\tconst displatch = useDispatch();\r\n\tconst [values, setValues] = React.useState();\r\n\r\n\tconst loadAttributes = React.useCallback(async () => {\r\n\t\tif (attributeId) {\r\n\t\t\tconst loadedValues = (await displatch(loadAttributeValues(attributeId))) as any;\r\n\t\t\tsetValues(loadedValues || []);\r\n\t\t}\r\n\t}, [displatch, attributeId])\r\n\r\n\tReact.useEffect(() => {\r\n\t\tloadAttributes();\r\n\t}, [loadAttributes]);\r\n\r\n\treturn [values, loadAttributes] as [typeof values, typeof loadAttributes]\r\n};\r\n","import React from \"react\";\r\nimport { useDisplaySingleEmementStyles } from \"../../../useDisplaySingleEmementStyles\";\r\nimport { DisplayBoolNumber } from \"../../../components/common/DisplayBoolNumber\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { useAttributeValuesData } from \"../../../../data/listing/attributes/hooks/attributeValues/useAttributeValuesData\";\r\nimport { AttributeValue } from \"../../../../data/listing/attributes/types\";\r\nimport {\r\n\tTableContainer,\r\n\tTable,\r\n\tTableHead,\r\n\tTableCell,\r\n\tTableRow,\r\n\tPaper,\r\n\tTableBody,\r\n\tTypography,\r\n\tGrid,\r\n} from \"@material-ui/core\";\r\nimport { Status } from \"../../../../data/models\";\r\n\r\nexport interface DisplayAttributeValuesProps {\r\n\tattributeId: string;\r\n}\r\n\r\nexport const DisplayAttributeValues: React.FunctionComponent = ({\r\n\tattributeId,\r\n}) => {\r\n\tconst style = useDisplaySingleEmementStyles();\r\n\tconst [values] = useAttributeValuesData(attributeId);\r\n\r\n\treturn (\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t{values ? : \"loading placeholder\"}\r\n\t\t\t
\r\n\t\t
\r\n\t);\r\n};\r\n\r\ninterface AttributesDisplayTableProps {\r\n\tvalues: AttributeValue[];\r\n}\r\n\r\nconst AttributesDisplayTable: React.FunctionComponent = ({ values }) => {\r\n\tconst style = useDisplaySingleEmementStyles();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\tif (values.length === 0) {\r\n\t\treturn (\r\n\t\t\t\r\n\t\t\t\t{getString(\"productAttributeEmpty\")}\r\n\t\t\t\r\n\t\t);\r\n\t}\r\n\r\n\treturn (\r\n\t\t\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\t{getString(\"attributeValueName\")}\r\n\t\t\t\t\t\t{getString(\"attributeValueValue\")}\r\n\t\t\t\t\t\t{getString(\"attributeValueStatus\")}\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t{values.map(value => (\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t{value.name}\r\n\t\t\t\t\t\t\t{value.value}\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\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};\r\n","import { getEditLocation } from \"../../../core/util/functions\";\r\n\r\nexport enum AttributeEditParts {\r\n\tBasicInfo = \"basicinfo\",\r\n\tValues = \"values\",\r\n}\r\n\r\nexport const attributesLocation = \"/listing/codebook/attributes\";\r\n\r\nexport const getAttributeEditLocation = (\r\n\tpart: AttributeEditParts = AttributeEditParts.BasicInfo,\r\n\tattributeId?: string,\r\n\tvalueId?: string\r\n) => getEditLocation(attributesLocation, part, attributeId, valueId);\r\n\r\nexport const basicInfoEdit = getAttributeEditLocation(\":editPart\" as any, \":attributeId?\");\r\nexport const valuesEdit = getAttributeEditLocation(AttributeEditParts.Values, \":attributeId\", \":valueId?\");\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const deleteAttributeApi = (userId: string, attrid: string, errorExceptions: string[]) =>\r\n\twebApiWithResponse({\r\n\t\tmethod: \"DELETE\",\r\n\t\turl: \"listing/delattr\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t\tattrid,\r\n\t\t},\r\n\t}, undefined, errorExceptions);\r\n\r\nexport default deleteAttributeApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { deleteAttribute } from \"../thunks/deleteAttribute\";\r\nimport { setDeleteFetchState } from \"../attributeDataReducer\";\r\n\r\nexport const useAttributeDelete = () => {\r\n\tconst fetchState = useSelector(\r\n\t\tstore => store.data.listing.attributes.deleteFetchState\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchDelete = React.useCallback((id: string) => dispatch(deleteAttribute(id)), [dispatch]);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tdispatch(setDeleteFetchState({ type: \"not-started\" }));\r\n\t}, [dispatch]);\r\n\r\n\tconst resetState = React.useCallback(() => dispatch(setDeleteFetchState({ type: \"not-started\" })), [\r\n\t\tdispatch,\r\n\t]);\r\n\r\n\treturn [fetchState, dispatchDelete, resetState] as [\r\n\t\ttypeof fetchState,\r\n\t\ttypeof dispatchDelete,\r\n\t\ttypeof resetState\r\n\t];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport deleteAttributeApi from \"../api/deleteAttribute\";\r\nimport { setDeleteFetchState } from \"../attributeDataReducer\";\r\nimport { ErrorCodeExceptions } from \"../types\";\r\n\r\nexport const deleteAttribute = (attributeId: string): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setDeleteFetchState({ type: \"started\" }));\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst result = await dispatch(\r\n\t\tdeleteAttributeApi(userId, attributeId, [ErrorCodeExceptions.ReferenceErrorCode])\r\n\t);\r\n\r\n\tdispatch(\r\n\t\tsetDeleteFetchState(\r\n\t\t\tresult !== undefined && result.resCode === \"OK\"\r\n\t\t\t\t? { type: \"successful\" }\r\n\t\t\t\t: { type: \"error\", errorCode: result && result.resCode }\r\n\t\t)\r\n\t);\r\n};\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport ViewIcon from \"@material-ui/icons/InputOutlined\";\r\nimport EditIcon from \"@material-ui/icons/EditOutlined\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Action } from \"material-table\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { useViewAttribute } from \"./DisplayAttribute\";\r\nimport { useAttributeDelete } from \"../../../data/listing/attributes/hooks/useAttributeDelete\";\r\nimport { Attribute } from \"../../../data/listing/attributes/types\";\r\nimport { AttributeEditParts, getAttributeEditLocation } from \"./Locations\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\n\r\nexport const useAttributeActions = (userAccessRights: AccessRights) => {\r\n\tconst { getString } = useContext(LocalizationContext);\r\n\tconst onShowClient = useViewAttribute();\r\n\tconst onEditClient = useEditAttributeAction();\r\n\r\n\treturn useMemo(() => {\r\n\t\tconst result: Action[] = [\r\n\t\t\t{\r\n\t\t\t\ticon: () => ,\r\n\t\t\t\ttooltip: getString(\"tableShow\"),\r\n\t\t\t\tonClick: (event, rowData) => onShowClient(rowData as Attribute),\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ticon: () => ,\r\n\t\t\t\ttooltip: getString(\"tableEdit\"),\r\n\t\t\t\tonClick: (event, rowData) => onEditClient(rowData as Attribute),\r\n\t\t\t\thidden: userAccessRights===AccessRights.ReadOnly\r\n\t\t\t},\r\n\t\t];\r\n\r\n\t\treturn result;\r\n\t}, [onShowClient, getString, onEditClient]);\r\n};\r\n\r\nexport const useDeleteAttributeAction = () => {\r\n\tconst [fetchState, deleteAttribute, reset] = useAttributeDelete();\r\n\tconst action = React.useCallback(\r\n\t\tasync (attr: Attribute) => {\r\n\t\t\tif (attr.attrId) {\r\n\t\t\t\tawait deleteAttribute(attr.attrId);\r\n\t\t\t}\r\n\t\t},\r\n\t\t[deleteAttribute]\r\n\t);\r\n\treturn [fetchState, action, reset] as [typeof fetchState, typeof action, typeof reset];\r\n};\r\n\r\nexport const useEditAttributeAction = () => {\r\n\tconst history = useHistory();\r\n\treturn React.useCallback(\r\n\t\t(atribute: Attribute) =>\r\n\t\t\thistory.push(getAttributeEditLocation(AttributeEditParts.BasicInfo, atribute.attrId)),\r\n\t\t[history]\r\n\t);\r\n};\r\n","import React, { ReactNode } from \"react\";\r\nimport {\r\n\tDialog,\r\n\tDialogTitle,\r\n\tDialogContent,\r\n\tDialogContentText,\r\n\tDialogActions,\r\n\tButton,\r\n} from \"@material-ui/core\";\r\n\r\ninterface LeavePromptProps {\r\n\topen: boolean;\r\n\ttitle: string;\r\n\tmessage: ReactNode;\r\n\tonClose: (confirmed: boolean) => void;\r\n\tconfirmLabel?: string;\r\n\tcloseLabel: string;\r\n\tdisableBackdropClick?: boolean;\r\n}\r\n\r\nexport const CustomDialog: React.FunctionComponent = ({\r\n\topen,\r\n\ttitle,\r\n\tmessage,\r\n\tonClose,\r\n\tcloseLabel,\r\n\tconfirmLabel,\r\n\tdisableBackdropClick,\r\n}) => {\r\n\tconst confirm = React.useCallback(() => {\r\n\t\tonClose(true);\r\n\t}, [onClose]);\r\n\r\n\tconst close = React.useCallback(() => {\r\n\t\tonClose(false);\r\n\t}, [onClose]);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t !disableBackdropClick && close()}>\r\n\t\t\t\t{title}\r\n\t\t\t\t\r\n\t\t\t\t\t{message}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t{confirmLabel && (\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{closeLabel}\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};\r\n","import React from \"react\";\r\nimport { Table, TableDataProps } from \"../../components/common/Table\";\r\nimport { useAttributeData } from \"../../../data/listing/attributes/hooks/useAttributeData\";\r\nimport { Attribute, ErrorCodeExceptions } from \"../../../data/listing/attributes/types\";\r\nimport { useAttributeColumns } from \"./useAttributeColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\nimport { useAttributeActions, useDeleteAttributeAction } from \"./useAttributeActions\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { CustomDialog } from \"../../components/common/CustomDialog\";\r\n\r\nexport interface AttributeTableProps {\r\n\tuserAccessRights: AccessRights;\r\n}\r\n\r\ntype AttributeTablePropsType = AttributeTableProps & TableDataProps;\r\n\r\nexport const AttributeTable: React.FunctionComponent = ({\r\n\tuserAccessRights,\r\n\t...tableProps\r\n}) => {\r\n\tconst [data, loadAll] = useAttributeData();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\tconst columns = useAttributeColumns();\r\n\tconst actions = useAttributeActions(userAccessRights);\r\n\tconst [fetchState, onDelete, resetState] = useDeleteAttributeAction();\r\n\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t\r\n\t\t\t\t{...tableProps}\r\n\t\t\t\tgetData={loadAll}\r\n\t\t\t\timmutableData={data}\r\n\t\t\t\ttitle=\"\"\r\n\t\t\t\tcolumns={columns}\r\n\t\t\t\tactions={actions}\r\n\t\t\t\toptions={{\r\n\t\t\t\t\ttoolbar: false,\r\n\t\t\t\t\tpageSize: 10,\r\n\t\t\t\t\tactionsColumnIndex: -1,\r\n\t\t\t\t}}\r\n\t\t\t\teditable={userAccessRights !== AccessRights.ReadOnly ? {\r\n\t\t\t\t\tonRowDelete: onDelete,\r\n\t\t\t\t} : {}}\r\n\t\t\t/>\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport default AttributeTable;\r\n","import { useContext, useMemo } from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\nimport { Attribute, AttributeManditory } from \"../../../data/listing/attributes/types\";\r\nimport React from \"react\";\r\nimport { DisplayBoolNumber } from \"../../components/common/DisplayBoolNumber\";\r\nimport { Status } from \"../../../data/models\";\r\n\r\nexport function useAttributeColumns() {\r\n\tconst { getString } = useContext(LocalizationContext);\r\n\treturn useMemo(\r\n\t\t() => [\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"attributeName\"),\r\n\t\t\t\tfield: \"attrName\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"productAttributeType\"),\r\n\t\t\t\tfield: \"attrType\",\r\n\t\t\t},\r\n\r\n/*\t\t\t{\r\n\t\t\t\ttitle: getString(\"productAttributeManditory\"),\r\n\t\t\t\trender: product => (\r\n\t\t\t\t\t\r\n\t\t\t\t),\r\n\t\t\t\tcustomSort: (a, b) => a.mandatory - b.mandatory,\r\n\t\t\t\twidth: \"80px\",\r\n\t\t\t}, */\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"productAttributeComparator\"),\r\n\t\t\t\tfield: \"comparator\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"productAttributeStatus\"),\r\n\t\t\t\trender: product => ,\r\n\t\t\t\tcustomSort: (a, b) => a.status - b.status,\r\n\t\t\t\twidth: \"80px\",\r\n\t\t\t},\r\n\t\t],\r\n\t\t[getString]\r\n\t) as Column[];\r\n}\r\n","import { makeStyles, Theme, createStyles } from \"@material-ui/core\";\r\nexport const usePageStyles = makeStyles((theme: Theme) =>\r\n\tcreateStyles({\r\n\t\trootSpacing: {\r\n \t\t\twidth: \"calc(100% + 8px)\",\r\n\t\t\tpadding: \"1rem\",\r\n\t\t},\r\n\t\troot: {\r\n\t\t\tpadding: \"1rem\",\r\n\t\t},\r\n\t\tgridItem: {\r\n\t\t\tmarginBottom: \"2rem\",\r\n\t\t},\r\n\t\tmainFab: {\r\n\t\t\tmargin: 0,\r\n\t\t\ttop: \"auto\",\r\n\t\t\tright: 20,\r\n\t\t\tbottom: 20,\r\n\t\t\tleft: \"auto\",\r\n\t\t\tposition: \"fixed\",\r\n\t\t},\r\n\t\tfabProgress: {\r\n\t\t\tcolor: theme.palette.secondary.dark,\r\n\t\t\tzIndex: 1,\r\n\t\t\tright: 14,\r\n\t\t\tbottom: 14,\r\n\t\t\tposition: \"fixed\",\r\n\t\t},\r\n\t\tfabProgressWrapper: {\r\n\t\t\tmargin: theme.spacing(1),\r\n\t\t\tposition: \"relative\",\r\n\t\t},\r\n\t\tfabSuccess: {\r\n\t\t\tbackgroundColor: theme.palette.success.main,\r\n\t\t\t\"&:hover\": {\r\n\t\t\t\tbackgroundColor: theme.palette.success.dark,\r\n\t\t\t},\r\n\t\t},\r\n\t})\r\n);\r\n","import React, { useContext, useCallback } from \"react\";\r\nimport { TextField, InputAdornment, createStyles, makeStyles, Theme } from \"@material-ui/core\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport SearchIcon from \"@material-ui/icons/SearchOutlined\";\r\n\r\nconst useStyles = makeStyles((theme: Theme) => {\r\n\treturn createStyles({\r\n\t\tsearchButton: {\r\n\t\t\tcolor: theme.palette.secondary.dark,\r\n\t\t\twidth: \"1.2rem\",\r\n\t\t},\r\n\t});\r\n});\r\n\r\nexport interface SearchBoxProps {\r\n\tsearch: string;\r\n\tsetSearch: (search: string) => void;\r\n}\r\n\r\nexport const SearchBox: React.FunctionComponent = ({ search, setSearch }) => {\r\n\tconst { getString } = useContext(LocalizationContext);\r\n\tconst styles = useStyles();\r\n\r\n\tconst onChange = useCallback(\r\n\t\t(e: React.ChangeEvent) => setSearch(e.target.value),\r\n\t\t[setSearch]\r\n\t);\r\n\r\n\treturn (\r\n\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\tInputLabelProps={{\r\n\t\t\t\tshrink: true,\r\n\t\t\t}}\r\n\t\t\ttype=\"search\"\r\n\t\t\tcolor=\"secondary\"\r\n\t\t/>\r\n\t);\r\n};\r\n","import { StoreType } from \"../store/reducers\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport React from \"react\";\r\nimport { useDebounceState } from \"./hooks\";\r\n\r\nexport const useSearch = (\r\n\tsearchSelector: (store: StoreType) => string,\r\n\tsetSearch: (search: string) => void\r\n) => {\r\n const search = useSelector(searchSelector);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst setSearchCallback = React.useCallback((search: string) => dispatch(setSearch(search)), [\r\n\t\tdispatch,\r\n\t\tsetSearch,\r\n ]);\r\n\r\n\tconst [deleyedSearch, setDeleyedSearch] = useDebounceState(search);\r\n const [displaySearch, setDisplaySearch] = React.useState(search);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tsetDeleyedSearch(displaySearch);\r\n }, [displaySearch, setDeleyedSearch]);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tsetSearchCallback(deleyedSearch);\r\n }, [deleyedSearch, setSearchCallback]);\r\n\r\n\treturn [displaySearch, setDisplaySearch] as [string, typeof setDeleyedSearch];\r\n};\r\n","import React from \"react\";\r\nimport { Typography, Grid, IconButton } from \"@material-ui/core\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { LocalizationKey } from \"../../../core/localization/types\";\r\nimport BackIcon from \"@material-ui/icons/ArrowBackOutlined\";\r\nimport { useHistory } from \"react-router-dom\";\r\n\r\nexport interface PageTitleProps {\r\n\ttitle: LocalizationKey;\r\n\tbackLocation?: string;\r\n\tsubtitle?: string;\r\n}\r\n\r\nexport const PageTitle: React.FunctionComponent = ({ title, backLocation, subtitle }) => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst history = useHistory();\r\n\r\n\tconst goBack = React.useCallback(() => {\r\n\t\tif (backLocation) {\r\n\t\t\thistory.push(backLocation);\r\n\t\t}\r\n\t}, [backLocation, history]);\r\n\r\n\tconst mainTitle = getString(title)\r\n\tconst pageTitle = subtitle ? `${mainTitle}: ${subtitle}` : mainTitle\r\n\treturn (\r\n\t\t\r\n\t\t\t{backLocation && (\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\r\n\t\t\t\t\r\n\t\t\t)}\r\n\t\t\t\r\n\t\t\t\t{pageTitle}\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport { Grid, CardContent, CardHeader, Divider, Card, Fab } from \"@material-ui/core\";\r\nimport AttributeTable from \"./AttributeTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { SearchBox } from \"../../components/common/SearchBox\";\r\nimport { PageComponent, AccessRights } from \"../../../core/navigation/types\";\r\nimport AddIcon from \"@material-ui/icons/Add\";\r\nimport { useAttributeSearch } from \"../../../data/listing/attributes/hooks/useAttributeSearch\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { getAttributeEditLocation } from \"./Locations\"\r\n\r\nconst AttributePage: PageComponent = ({ userAccessRights }) => {\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst [search, setSearch] = useAttributeSearch();\r\n\tconst history = useHistory();\r\n\r\n\treturn (\r\n\t\t\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\taction={}\r\n\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\t{userAccessRights === AccessRights.All && (\r\n\t\t\t\t\t history.push(getAttributeEditLocation())}\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};\r\n\r\nexport default AttributePage;\r\n","import { setSearchTerm } from \"../attributeDataReducer\";\r\nimport { useSearch } from \"../../../../core/util/storeHooks\";\r\n\r\nexport const useAttributeSearch = () => useSearch(s => s.data.listing.attributes.searchTerm, setSearchTerm);\r\n","import { Attribute, AttributeType, AttributeValidationState } from \"../types\";\r\nimport { createUseValidator } from \"../../../../core/util/hooks\";\r\n\r\nexport const attributeValidationState: AttributeValidationState = {\r\n\tattrName: true,\r\n\tattrNameen: true,\r\n\tattrType: true,\r\n//\tunit: true,\r\n\tcomparator: true,\r\n};\r\n\r\nexport const useAttributeValidator = createUseValidator(attributeValidationState, (item, validation) => ({\r\n\t...validation,\r\n//\tunit: item.attrType === AttributeType.Text ? validation.unit : true,\r\n\tcomparator: item.attrType === AttributeType.Text ? validation.comparator : true,\r\n}));\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { Attribute } from \"../types\";\r\n\r\nexport const createAttributeApi = (userId: string, attribute: Attribute) =>\r\n\twebApiWithResponse({\r\n\t\tmethod: \"PUT\",\r\n\t\turl: \"listing/newattr\",\r\n\t\tparams: {\r\n\t\t\tuserId\r\n\t\t},\r\n\t\tdata: attribute\r\n\t});\r\n\r\nexport default createAttributeApi;\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { Attribute } from \"../types\";\r\n\r\nexport const updateAttributeApi = (userId: string, product: Attribute) =>\r\n\twebApiWithResponse({\r\n\t\tmethod: \"PUT\",\r\n\t\turl: \"listing/updattr\",\r\n\t\tparams: {\r\n\t\t\tuserId\r\n\t\t},\r\n\t\tdata: product\r\n\t});\r\n\r\nexport default updateAttributeApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { upsertAttribute } from \"../thunks/upsertAttribute\";\r\nimport { setFetchState } from \"../attributeDataReducer\";\r\nimport { Attribute } from \"../types\";\r\n\r\nexport const useAttributeUpsert = () => {\r\n\tconst fetchState = useSelector(\r\n\t\tstore => store.data.listing.attributes.fetchState\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchUpsert = React.useCallback(\r\n\t\t(item: Attribute) => dispatch(upsertAttribute(item)),\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tdispatch(setFetchState({ type: \"not-started\" }))\r\n\t}, [dispatch])\r\n\r\n\treturn [fetchState, dispatchUpsert] as [typeof fetchState, typeof dispatchUpsert]\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport createAttributeApi from \"../api/createAttribute\";\r\nimport updateAttributeApi from \"../api/updateAttribute\";\r\nimport { setFetchState } from \"../attributeDataReducer\";\r\nimport { Attribute } from \"../types\";\r\n\r\nexport const upsertAttribute = (attribute: Attribute): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setFetchState({ type: \"started\" }));\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst result = attribute.attrId\r\n\t\t? await dispatch(updateAttributeApi(userId, attribute))\r\n\t\t: await dispatch(createAttributeApi(userId, attribute));\r\n\r\n\tif (result && result.resCode === \"OK\") {\r\n\t\tdispatch(setFetchState({ type: \"successful\", result: result.resDesc }));\r\n\t\treturn result.resDesc;\r\n\t} else {\r\n\t\tdispatch(setFetchState({ type: \"error\", errorCode: result?.resCode }));\r\n\t}\r\n};\r\n","import React from \"react\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { Fab, CircularProgress } from \"@material-ui/core\";\r\nimport SaveIcon from \"@material-ui/icons/Save\";\r\nimport CheckIcon from \"@material-ui/icons/Check\";\r\nimport { FetchStateType } from \"../../../data/models\";\r\n\r\ninterface FabSaveProps {\r\n\tonClick: () => void;\r\n\tfetchState: FetchStateType;\r\n}\r\n\r\nexport const FabSave: React.FunctionComponent = ({ fetchState, onClick }) => {\r\n\tconst pageStyles = usePageStyles();\r\n\tconst fabClass =\r\n\t\tfetchState.type === \"successful\"\r\n\t\t\t? `${pageStyles.mainFab} ${pageStyles.fabSuccess}`\r\n\t\t\t: pageStyles.mainFab;\r\n\tconst disabled = fetchState.type === \"started\";\r\n\r\n\treturn (\r\n\t\t
\r\n\t\t\t\r\n\t\t\t\t{fetchState.type !== \"successful\" ? : }\r\n\t\t\t\r\n\t\t\t{fetchState.type === \"started\" && }\r\n\t\t
\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport { TextField, TextFieldProps } from \"@material-ui/core\";\r\nimport { ValidationState } from \"../../../core/util/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\n\r\ninterface StringInputProps {\r\n\tproperty: keyof T;\r\n\titem: T;\r\n\tvalidationState?: ValidationState;\r\n\tonChange: (event: React.ChangeEvent) => void;\r\n\terrorMessage?: string;\r\n}\r\n\r\nexport type StringInputPropsType = StringInputProps & TextFieldProps;\r\n\r\nexport function StringInput(props: StringInputPropsType) {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst { property, item, validationState, label, onChange, errorMessage, ...otherProps } = props;\r\n\tconst error = validationState && validationState[property] !== undefined && !validationState[property];\r\n\treturn (\r\n\t\t\r\n\t);\r\n}\r\n","import { useSelector } from \"react-redux\";\r\nimport { StoreType } from \"../../../core/store/reducers\";\r\nimport { Unit } from \"../../models\";\r\nimport React from \"react\";\r\n\r\nconst getUnitLabel = (unit?: Unit) => (unit ? unit.ftDescr : \"\");\r\n\r\nexport const useUnits = () => {\r\n\tconst units = useSelector(store => store.data.initialData.units);\r\n\r\n\treturn [units, getUnitLabel] as [typeof units, typeof getUnitLabel];\r\n};\r\n\r\nexport const useUnit = (id?: number) => {\r\n\tconst units = useSelector(store => store.data.initialData.units);\r\n\r\n\tconst unit = React.useMemo(() => units.find(u => u.ftValue === id), [id, units]);\r\n\r\n\treturn [unit] as [typeof unit];\r\n};\r\n","import React from \"react\";\r\nimport { TextField, TextFieldProps } from \"@material-ui/core\";\r\nimport { Autocomplete, Skeleton } from \"@material-ui/lab\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\n\r\ninterface AutocompleteSelectProps {\r\n\tselected?: T | null;\r\n\tonChangeItem: (newValue: T | null) => void;\r\n\tpredicate?: (value: T) => boolean;\r\n\tdataFilter?: (value: T) => boolean;\r\n\tdata?: T[];\r\n\tgetLabel: (data: T) => string;\r\n\terrorMessage?: string;\r\n}\r\n\r\nexport type AutocompleteSelectType = AutocompleteSelectProps & TextFieldProps;\r\n\r\nexport function AutocompleteSelect({\r\n\tselected,\r\n\tonChangeItem,\r\n\tpredicate,\r\n\tdata,\r\n\tgetLabel,\r\n\terror,\r\n\terrorMessage,\r\n\tdisabled,\r\n\tdataFilter,\r\n\t...otherProps\r\n}: AutocompleteSelectType) {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\tconst handleCityChange = React.useCallback(\r\n\t\t(event: any, newValue: T | null) => {\r\n\t\t\tif (onChangeItem) {\r\n\t\t\t\tonChangeItem(newValue);\r\n\t\t\t}\r\n\t\t},\r\n\t\t[onChangeItem]\r\n\t);\r\n\r\n\tconst helperText = React.useMemo(\r\n\t\t() => (error ? errorMessage || getString(\"requiredMessage\") : undefined),\r\n\t\t[getString, error, errorMessage]\r\n\t);\r\n\r\n\tconst filtredData = React.useMemo(() => {\r\n\t\treturn (dataFilter && data && data.filter(dataFilter)) || data;\r\n\t}, [dataFilter, data]);\r\n\r\n\tconst selectedItem = React.useMemo(() => {\r\n\t\treturn selected || (predicate && filtredData && filtredData.find(predicate)) || null;\r\n\t}, [selected, predicate, filtredData]);\r\n\r\n\r\n\tif (!filtredData) {\r\n\t\treturn ;\r\n\t}\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\toptions={filtredData}\r\n\t\t\tgetOptionLabel={getLabel}\r\n\t\t\tvalue={selectedItem}\r\n\t\t\tonChange={handleCityChange}\r\n\t\t\tdisabled={disabled}\r\n\t\t\trenderInput={params => (\r\n\t\t\t\t\r\n\t\t\t)}\r\n\t\t/>\r\n\t);\r\n}\r\n","import React from \"react\";\r\nimport { useUnits } from \"../../../data/initialData/hooks/useUnits\";\r\nimport { Unit } from \"../../../data/models\";\r\nimport { AutocompleteSelect, AutocompleteSelectType } from \"./AutocompleteSelect\";\r\n\r\ntype UnitSelectPropsType = Omit, \"data\" | \"getLabel\">;\r\n\r\nexport const UnitSelect: React.FunctionComponent = props => {\r\n\tconst [units, renderUnitLabel] = useUnits();\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t{...(props as AutocompleteSelectType)}\r\n\t\t\tdata={units}\r\n\t\t\tgetLabel={renderUnitLabel}\r\n\t\t/>\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport { SwitchProps, FormControlLabel, Switch } from \"@material-ui/core\";\r\n\r\nexport interface BoolInputProps {\r\n\tproperty: keyof T;\r\n\titem: T;\r\n\tlabel: string;\r\n\tthrutyValue: number;\r\n\tfalsyValue: number;\r\n\tonChange: (event: React.ChangeEvent) => void;\r\n}\r\n\r\ntype BoolInputPropsType = BoolInputProps & SwitchProps;\r\n\r\nexport function BoolInput(props: BoolInputPropsType) {\r\n\tconst { property, item, label, onChange, thrutyValue, falsyValue, ...otherProps } = props;\r\n\treturn (\r\n\t\t {\r\n\t\t\t\t\t\tonChange({\r\n\t\t\t\t\t\t\t...e,\r\n\t\t\t\t\t\t\ttarget: {\r\n\t\t\t\t\t\t\t\t...e.target,\r\n\t\t\t\t\t\t\t\tvalue: value ? thrutyValue : falsyValue as any,\r\n\t\t\t\t\t\t\t\tname: property\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\t{...otherProps}\r\n\t\t\t\t/>\r\n\t\t\t}\r\n\t\t\tlabel={label}\r\n\t\t/>\r\n\t);\r\n}\r\n","import React from \"react\";\r\nimport { Location } from \"history\";\r\nimport { useHistory, Prompt } from \"react-router-dom\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { CustomDialog } from \"./CustomDialog\";\r\n\r\ninterface LeavePromptProps {\r\n\tshouldShow: boolean;\r\n\ttitle?: string;\r\n\tmessage?: string;\r\n}\r\n\r\nexport const LeavePrompt: React.FunctionComponent = ({ shouldShow, title, message }) => {\r\n\tconst [dialogOpen, setDialogOpen] = React.useState(false);\r\n\tconst [location, setLocation] = React.useState();\r\n\tconst [confirmed, setConfirmed] = React.useState(false);\r\n\tconst history = useHistory();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\tconst handleRouterPrompt = React.useCallback(\r\n\t\t(location: Location) => {\r\n\t\t\tif (!confirmed) {\r\n\t\t\t\tsetLocation(location);\r\n\t\t\t\tsetDialogOpen(true);\r\n\t\t\t\treturn false;\r\n\t\t\t} else {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t},\r\n\t\t[confirmed, setLocation, setDialogOpen]\r\n\t);\r\n\r\n\tconst dialogClosed = React.useCallback((confirmed: boolean) => {\r\n\t\tsetDialogOpen(false);\r\n\t\tsetConfirmed(confirmed);\r\n\t}, [setDialogOpen, setConfirmed]);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (confirmed && location) {\r\n\t\t\thistory.push(location.pathname);\r\n\t\t}\r\n\t}, [history, confirmed, location]);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { useAttributeTypeOptions } from \"../../../data/listing/attributes/hooks/useAttributeTypeOptions\";\r\nimport { TextField, MenuItem } from \"@material-ui/core\";\r\nimport { AttributeType } from \"../../../data/listing/attributes/types\";\r\n\r\ninterface AccountOrderSideSelectProps {\r\n\ttype: AttributeType;\r\n\thandleChange: (event: React.ChangeEvent) => void;\r\n}\r\n\r\nexport const AttributeTypeSelect: React.FunctionComponent = ({\r\n\ttype,\r\n\thandleChange,\r\n}) => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n const options = useAttributeTypeOptions();\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t{options.map(option => (\r\n\t\t\t\t\r\n\t\t\t\t\t{option.label}\r\n\t\t\t\t\r\n\t\t\t))}\r\n\t\t\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport { AttributeType } from \"../types\";\r\n\r\ninterface AttributeTypeOption {\r\n\tlabel: string;\r\n\tvalue: AttributeType;\r\n}\r\n\r\nexport const useAttributeTypeOptions = (): AttributeTypeOption[] => {\r\n\treturn React.useMemo(\r\n\t\t() => [\r\n\t\t\t{\r\n\t\t\t\tlabel: AttributeType.Text,\r\n\t\t\t\tvalue: AttributeType.Text,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tlabel: AttributeType.Select,\r\n\t\t\t\tvalue: AttributeType.Select,\r\n\t\t\t},\r\n\t\t],\r\n\t\t[]\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { useAttributeComparatorType } from \"../../../data/listing/attributes/hooks/attributes/useAttributeComparator\";\r\nimport { TextField, MenuItem } from \"@material-ui/core\";\r\nimport { AttrCompType } from \"../../../data/listing/attributes/types\";\r\nimport { Status } from \"../../../data/models\";\r\n\r\ninterface AttrCompTypeTypeSelectProps {\r\n\tcomparator: AttrCompType;\r\n\thandleChange: (event: React.ChangeEvent) => void;\r\n\tstatus: boolean;\r\n}\r\n\r\nexport const AttrCompTypeSelect: React.FunctionComponent = ({\r\n\tcomparator,\r\n\thandleChange,\r\n\tstatus,\r\n}) => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst options = useAttributeComparatorType();\r\n\t\r\nconsole.log(options)\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t{options.map((option) => (\r\n\t\t\t\t\r\n\t\t\t\t\t{option.label}\r\n\t\t\t\t\r\n\t\t\t))}\r\n\t\t\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport { AttrCompType } from \"../../types\";\r\n\r\ninterface AttrCompTypeOption {\r\n\tlabel: string;\r\n\tvalue: AttrCompType;\r\n}\r\n\r\n export const useAttributeComparatorType = (): AttrCompTypeOption[] => {\r\n\treturn React.useMemo(\r\n\t\t() => [\r\n\t\t\t{\r\n\t\t\t\tlabel: (AttrCompType.LessThan) as string,\r\n\t\t\t\tvalue: AttrCompType.LessThan,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tlabel: (AttrCompType.Equal) as string,\r\n\t\t\t\tvalue: AttrCompType.Equal,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tlabel: (AttrCompType.MoreThan) as string,\r\n\t\t\t\tvalue: AttrCompType.MoreThan,\r\n\t\t\t},\r\n\t\t],\r\n\t\t[]\r\n\t);\r\n}; \r\n\r\n","import React from \"react\";\r\nimport { useAttributeValidator } from \"../../../data/listing/attributes/hooks/useAttributeValidator\";\r\nimport { useAttributeUpsert } from \"../../../data/listing/attributes/hooks/useAttributeUpsert\";\r\nimport { Attribute, AttributeManditory, AttributeType } from \"../../../data/listing/attributes/types\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Grid } from \"@material-ui/core\";\r\nimport { FabSave } from \"../../components/common/FabSave\";\r\nimport { StringInput } from \"../../components/common/StringInput\";\r\nimport { Status } from \"../../../data/models\";\r\nimport { UnitSelect } from \"../../components/common/UnitSelect\";\r\nimport { BoolInput } from \"../../components/common/BoolInput\";\r\nimport { LeavePrompt } from \"../../components/common/LeavePrompt\";\r\nimport { AttributeTypeSelect } from \"./AttributeTypeSelect\"\r\nimport { attributesLocation } from \"./Locations\";\r\nimport { AttrCompTypeSelect } from \"./AttributeComparatorTypeSelect\"\r\n\r\nexport interface EditAttributeBasicInfoPageProps {\r\n\tattribute: Attribute;\r\n\teditAttribute: (field: keyof Attribute, value: any) => void;\r\n\tchanged: boolean;\r\n}\r\n\r\nexport const EditAttributeBasicInfoPage: React.FunctionComponent = props => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\tconst { attribute, editAttribute, changed } = props;\r\n\tconst [validationState, validate] = useAttributeValidator();\r\n\tconst [fetchState, upsert] = useAttributeUpsert();\r\n\tconst history = useHistory();\r\n\r\n\tconst unsavedChanges = fetchState.type === \"not-started\" && changed;\r\n\r\n\tconsole.log(attribute)\r\n\r\n\r\n\tconst handleChange = React.useCallback(\r\n\t\t(event: React.ChangeEvent) => {\r\n\t\t\teditAttribute(event.target.name as any, event.target.value);\r\n\t\t},\r\n\t\t[editAttribute]\r\n\t);\r\n\r\n\tconst handleChangeType = React.useCallback(\r\n\t\t(event: React.ChangeEvent) => {\r\n\t\t\teditAttribute(\"unit\", undefined);\r\n\t\t\teditAttribute(\"comparator\", undefined);\r\n\t\t\teditAttribute(\"attrType\", event.target.value);\r\n\t\t},\r\n\t\t[editAttribute]\r\n\t);\r\n\r\n\tconst handleChangeNum = React.useCallback(\r\n\t\t(event: React.ChangeEvent) => {\r\n\t\t\teditAttribute(event.target.name as any, parseInt(event.target.value));\r\n\t\t},\r\n\t\t[editAttribute]\r\n\t);\r\n\r\n\tconst save = React.useCallback(() => {\r\n\t\tconst save = async () => {\r\n\t\t\tconst normalized = validate(attribute);\r\n\t\t\tif (normalized) {\r\n\t\t\t\tconst newId = await upsert(normalized);\r\n\t\t\t\tif (newId) {\r\n\t\t\t\t\teditAttribute(\"attrId\", newId);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t\tif (fetchState.type === \"successful\") {\r\n\t\t\thistory.push(attributesLocation);\r\n\t\t} else if (fetchState.type !== \"started\") {\r\n\t\t\tsave();\r\n\t\t}\r\n\t}, [attribute, validate, fetchState, editAttribute, history, upsert]);\r\n\r\n\tif (!attribute) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\treturn (\r\n\t\t<>\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\t\r\n\t\t\t\t\t\t\tproperty=\"attrName\"\r\n\t\t\t\t\t\t\titem={attribute}\r\n\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\tlabel={getString(\"attributeName\")}\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\t\tproperty=\"attrNameen\"\r\n\t\t\t\t\t\t\titem={attribute}\r\n\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\tlabel={getString(\"attributeNameEN\")}\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\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\t\r\n\t\t\t\t\t\t unit.ftValue === attribute.unit}\r\n\t\t\t\t\t\t\tonChangeItem={unit => editAttribute(\"unit\", unit?.ftValue)}\r\n//\t\t\t\t\t\t\trequired={validationState.unit !== undefined}\r\n//\t\t\t\t\t\t\terror={validationState.unit !== undefined && !validationState.unit}\r\n\t\t\t\t\t\t\tdisabled={attribute.attrType === AttributeType.Select}\r\n\t\t\t\t\t\t/>\t\r\n\t\t\t\t\t\r\n\t\t\t\t\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\r\n\t\t\t\t\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\tproperty=\"status\"\r\n\t\t\t\t\t\t\titem={attribute}\r\n\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\tfalsyValue={Status.Inactive}\r\n\t\t\t\t\t\t\tthrutyValue={Status.Active}\r\n\t\t\t\t\t\t\tlabel={getString(\"productAttributeStatus\")}\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\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n","import { webApi } from \"../../../../../core/http/httpThunks\";\r\n\r\nexport const deleteAttributeValueApi = (userId: string, attrvalid: string) =>\r\n\twebApi({\r\n\t\tmethod: \"DELETE\",\r\n\t\turl: \"listing/delattrval\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t\tattrvalid\r\n\t\t},\r\n\t});\r\n\r\nexport default deleteAttributeValueApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\nimport { deleteAttributeValue } from \"../../thunks/attributeValues/deleteAttributeValue\";\r\nimport { setFetchStateValue } from \"../../attributeDataReducer\";\r\n\r\nexport const useAttributeValueDelete = () => {\r\n\tconst fetchState = useSelector(\r\n\t\tstore => store.data.listing.attributes.fetchStateAttribute\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchDelete = React.useCallback(\r\n\t\t(id: string) => dispatch(deleteAttributeValue(id)),\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tdispatch(setFetchStateValue({ type: \"not-started\" }))\r\n\t}, [dispatch])\r\n\r\n\treturn [fetchState, dispatchDelete] as [typeof fetchState, typeof dispatchDelete]\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport deleteAttributeValueApi from \"../../api/attributeValues/deleteAttributeValue\";\r\nimport { setFetchStateValue } from \"../../attributeDataReducer\";\r\n\r\nexport const deleteAttributeValue = (attributeId: string): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setFetchStateValue({ type: \"started\" }));\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst result = await dispatch(deleteAttributeValueApi(userId, attributeId));\r\n\r\n\tdispatch(setFetchStateValue(result !== undefined ? { type: \"successful\" } : { type: \"error\"}));\r\n};\r\n","import React from \"react\";\r\nimport { Table, TableDataProps } from \"../../../components/common/Table\";\r\nimport { useAttributeValuesData } from \"../../../../data/listing/attributes/hooks/attributeValues/useAttributeValuesData\";\r\nimport { useAttributeValueDelete } from \"../../../../data/listing/attributes/hooks/attributeValues/useAttributeValueDelete\";\r\nimport { AttributeValue } from \"../../../../data/listing/attributes/types\";\r\nimport { Column, Action } from \"material-table\";\r\nimport { DisplayBoolNumber } from \"../../../components/common/DisplayBoolNumber\";\r\nimport { useDisplaySingleEmementStyles } from \"../../../useDisplaySingleEmementStyles\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport EditIcon from \"@material-ui/icons/EditOutlined\";\r\nimport { AttributeEditParts, getAttributeEditLocation } from \"../Locations\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { Fab } from \"@material-ui/core\";\r\nimport { usePageStyles } from \"../../../pageStyles\";\r\nimport AddIcon from \"@material-ui/icons/Add\";\r\nimport { Status } from \"../../../../data/models\";\r\n\r\nexport interface AttributeValuesTableProps {\r\n\tattributeId: string;\r\n}\r\n\r\ntype AttributeTablePropsType = AttributeValuesTableProps & TableDataProps;\r\n\r\nexport const AttributeValuesTable: React.FunctionComponent = ({\r\n\tattributeId,\r\n\t...tableProps\r\n}) => {\r\n\tconst pageStyles = usePageStyles();\r\n\tconst history = useHistory();\r\n\r\n\tconst [data, reload] = useAttributeValuesData(attributeId);\r\n\r\n\tconst columns = useAttributeColumns();\r\n\tconst actions = useValueActions();\r\n\tconst onDeleteAttribute = useDeleteValueAction();\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t\r\n\t\t\t\t{...tableProps}\r\n\t\t\t\tgetData={() => {}}\r\n\t\t\t\timmutableData={data}\r\n\t\t\t\ttitle=\"\"\r\n\t\t\t\tcolumns={columns}\r\n\t\t\t\tactions={actions}\r\n\t\t\t\toptions={{\r\n\t\t\t\t\ttoolbar: false,\r\n\t\t\t\t\tpageSize: 5,\r\n\t\t\t\t\tactionsColumnIndex: -1,\r\n\t\t\t\t}}\r\n\t\t\t\teditable={{\r\n\t\t\t\t\tonRowDelete: async broker => {\r\n\t\t\t\t\t\tawait onDeleteAttribute(broker);\r\n\t\t\t\t\t\treload();\r\n\t\t\t\t\t},\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t\t\r\n\t\t\t\t\thistory.push(getAttributeEditLocation(AttributeEditParts.Values, attributeId, \"\"))\r\n\t\t\t\t}\r\n\t\t\t>\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 AttributeValuesTable;\r\n\r\nconst useAttributeColumns = () => {\r\n\tconst style = useDisplaySingleEmementStyles();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\treturn React.useMemo(\r\n\t\t() => [\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"attributeValueName\"),\r\n\t\t\t\tfield: \"name\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"attributeValueValue\"),\r\n\t\t\t\tfield: \"value\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"attributeValueStatus\"),\r\n\t\t\t\trender: value => (\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\t[getString, style.icon]\r\n\t) as Column[];\r\n};\r\n\r\nconst useDeleteValueAction = () => {\r\n\tconst [, deleteValue] = useAttributeValueDelete();\r\n\treturn React.useCallback(\r\n\t\tasync (value: AttributeValue) => {\r\n\t\t\tif (value.attrValueId) {\r\n\t\t\t\tawait deleteValue(value.attrValueId);\r\n\t\t\t}\r\n\t\t},\r\n\t\t[deleteValue]\r\n\t);\r\n};\r\n\r\nexport const useValueActions = () => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst onEditAttribute = useEditValueAction();\r\n\r\n\treturn React.useMemo(() => {\r\n\t\tconst result: Action[] = [\r\n\t\t\t{\r\n\t\t\t\ticon: () => ,\r\n\t\t\t\ttooltip: getString(\"tableEdit\"),\r\n\t\t\t\tonClick: (event, rowData) => onEditAttribute(rowData as AttributeValue),\r\n\t\t\t},\r\n\t\t];\r\n\r\n\t\treturn result;\r\n\t}, [getString, onEditAttribute]);\r\n};\r\n\r\nexport const useEditValueAction = () => {\r\n\tconst history = useHistory();\r\n\treturn React.useCallback(\r\n\t\t(value: AttributeValue) =>\r\n\t\t\thistory.push(\r\n\t\t\t\tgetAttributeEditLocation(AttributeEditParts.Values, value.attributeId, value.attrValueId)\r\n\t\t\t),\r\n\t\t[history]\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport { useDisplayAttribute } from \"./useDisplayAttribute\";\r\nimport { Attribute, AttributeManditory, AttributeType, AttrCompType} from \"../types\";\r\nimport { useCopiedState } from \"../../../../core/util/hooks\";\r\nimport { Status } from \"../../../models\";\r\n\r\nexport const defauiltAttribute: Attribute = {\r\n\tmandatory: AttributeManditory.False,\r\n\tattrName: \"\",\r\n\tattrNameen: \"\",\r\n\tattrType: AttributeType.Text,\r\n\tcomparator: AttrCompType.LessThan,\r\n\tstatus: Status.Active,\r\n};\r\n\r\nexport const useAttributeState = (attributeId?: string) => {\r\n\tconst displayRole = useDisplayAttribute(attributeId);\r\n\r\n\treturn React.useMemo(() => {\r\n\t\tif (attributeId !== undefined && displayRole === undefined) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\tif (attributeId === undefined) {\r\n\t\t\treturn { ...defauiltAttribute };\r\n\t\t}\r\n\r\n\t\treturn displayRole ? { ...displayRole } : undefined;\r\n\t}, [attributeId, displayRole]);\r\n};\r\n\r\nexport const useEditAttributeState = (id?: string) => {\r\n\tconst attribute = useAttributeState(id);\r\n\treturn useCopiedState(attribute);\r\n};\r\n","import { webApi } from \"../../../../../core/http/httpThunks\";\r\nimport { AttributeValue } from \"../../types\";\r\n\r\nexport const getAttributeValueApi = (userId: string, attrvalid: string) =>\r\n\twebApi({\r\n\t\tmethod: \"GET\",\r\n\t\turl: \"listing/getattrval\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t\tattrvalid\r\n\t\t},\r\n\t});\r\n\r\nexport default getAttributeValueApi;\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport getAttributeValueApi from \"../../api/attributeValues/getAttributeValue\";\r\nimport { AttributeValue } from \"../../types\";\r\n\r\nexport const getAttributeValue = (\r\n\tattributeId: string\r\n): ThunkType> => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\treturn await dispatch(getAttributeValueApi(userId, attributeId));\r\n};\r\n","import React from \"react\";\r\nimport { useAttributeValue } from \"./useAttributeValue\";\r\nimport { AttributeValue } from \"../../types\";\r\nimport { Status } from \"../../../../models\";\r\nimport { useCopiedState } from \"../../../../../core/util/hooks\";\r\n\r\nexport const createDefaultAttributeValue = (attributeId: string): AttributeValue => ({\r\n\tattributeId,\r\n\tname: \"\",\r\n\tnameen: \"\",\r\n\tvalue: \"\",\r\n\tvalueen: \"\",\r\n\tstatus: Status.Active,\r\n});\r\n\r\nexport const useEditAttributeValue = (productId: string, attributeId?: string) => {\r\n\tconst [displayAttributeValue] = useAttributeValue(attributeId);\r\n\r\n\treturn React.useMemo(() => {\r\n\t\tif (attributeId !== undefined && displayAttributeValue === undefined) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\tif (attributeId === undefined) {\r\n\t\t\tconst defaultAttribute = createDefaultAttributeValue(productId);\r\n\t\t\treturn { ...defaultAttribute };\r\n\t\t}\r\n\r\n\t\treturn displayAttributeValue ? { ...displayAttributeValue } : undefined;\r\n\t}, [productId, attributeId, displayAttributeValue]);\r\n};\r\n\r\nexport const useEditAttributeValueState = (productId: string, attributeId?: string) => {\r\n\tconst value = useEditAttributeValue(productId, attributeId);\r\n\treturn useCopiedState(value);\r\n};\r\n","import React from \"react\";\r\nimport { useDispatch } from \"react-redux\";\r\nimport { AttributeValue } from \"../../types\";\r\nimport { getAttributeValue } from \"../../thunks/attributeValues/loadAttributeValue\";\r\n\r\nexport const useAttributeValue = (valueId?: string) => {\r\n\tconst displatch = useDispatch();\r\n\tconst [attribute, setAttribute] = React.useState();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tconst loadClient = async () => {\r\n\t\t\tif (valueId) {\r\n\t\t\t\tconst loadedAttribute = (await displatch(getAttributeValue(valueId))) as any;\r\n\t\t\t\tsetAttribute(loadedAttribute);\r\n\t\t\t}\r\n\t\t};\r\n\t\tloadClient();\r\n\t}, [displatch, valueId, setAttribute]);\r\n\r\n\treturn [attribute];\r\n};\r\n","import { AttributeValue } from \"../../types\";\r\nimport { ValidationState } from \"../../../../../core/util/types\";\r\nimport { createUseValidator } from \"../../../../../core/util/hooks\";\r\n\r\nexport const AttributeValueValidation: ValidationState = {\r\n\tname: true,\r\n\tnameen: true,\r\n\tvalue: true,\r\n\tvalueen: true,\r\n};\r\n\r\nexport const useAttributeValueValidator = createUseValidator>(\r\n\tAttributeValueValidation\r\n);\r\n","import { webApiWithResponse } from \"../../../../../core/http/httpThunks\";\r\nimport { AttributeValue } from \"../../types\";\r\n\r\nexport const createAttributeApi = (userId: string, value: AttributeValue) =>\r\n\twebApiWithResponse({\r\n\t\tmethod: \"PUT\",\r\n\t\turl: \"listing/newattrval\",\r\n\t\tparams: {\r\n\t\t\tuserId\r\n\t\t},\r\n\t\tdata: value\r\n\t});\r\n\r\nexport default createAttributeApi;\r\n","import { webApiWithResponse } from \"../../../../../core/http/httpThunks\";\r\nimport { AttributeValue } from \"../../types\";\r\n\r\nexport const updateAttributeApi = (userId: string, value: AttributeValue) =>\r\n\twebApiWithResponse({\r\n\t\tmethod: \"PUT\",\r\n\t\turl: \"listing/updattrval\",\r\n\t\tparams: {\r\n\t\t\tuserId\r\n\t\t},\r\n\t\tdata: value\r\n\t});\r\n\r\nexport default updateAttributeApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\nimport { upsertAttributeValue } from \"../../thunks/attributeValues/upsertAttributeValue\";\r\nimport { setFetchStateValue } from \"../../attributeDataReducer\";\r\nimport { AttributeValue } from \"../../types\";\r\n\r\nexport const useAttributeValueUpsert = () => {\r\n\tconst fetchState = useSelector(\r\n\t\tstore => store.data.listing.attributes.fetchStateAttribute\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchUpsert = React.useCallback(\r\n\t\t(attribute: AttributeValue) => dispatch(upsertAttributeValue(attribute)),\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tdispatch(setFetchStateValue({ type: \"not-started\" }));\r\n\t}, [dispatch]);\r\n\r\n\treturn [fetchState, dispatchUpsert] as [typeof fetchState, typeof dispatchUpsert];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport createAttributeApi from \"../../api/attributeValues/createAttributeValue\";\r\nimport updateAttributeApi from \"../../api/attributeValues/updateAttribute\";\r\nimport { setFetchStateValue } from \"../../attributeDataReducer\";\r\nimport { AttributeValue } from \"../../types\";\r\n\r\nexport const upsertAttributeValue = (value: AttributeValue): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setFetchStateValue({ type: \"started\" }));\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst result = value.attrValueId\r\n\t\t? await dispatch(updateAttributeApi(userId, value))\r\n\t\t: await dispatch(createAttributeApi(userId, value));\r\n\r\n\tif (result && result.resCode === \"OK\") {\r\n\t\tdispatch(setFetchStateValue({ type: \"successful\", result: result.resDesc }));\r\n\t\treturn result.resDesc;\r\n\t} else {\r\n\t\tdispatch(setFetchStateValue({ type: \"error\", errorCode: result?.resCode }));\r\n\t}\r\n};\r\n","import { NavigationItem } from \"../../../core/navigation/types\";\r\nimport AttributePage from \"./AttributePage\";\r\nimport { EditAttributePage } from \"./EditAttributePage\";\r\nimport { EditAttributeValue } from \"./attributeValues/EditAttributeValue\";\r\nimport { attributesLocation, valuesEdit, basicInfoEdit } from \"./Locations\";\r\nexport const attributeComponents: NavigationItem[] = [\r\n\t{\r\n\t\tComponent: AttributePage,\r\n\t\tisMenuItem: true,\r\n\t\tpath: attributesLocation,\r\n\t},\r\n\t{\r\n\t\tComponent: EditAttributeValue,\r\n\t\tisMenuItem: false,\r\n\t\tpath: valuesEdit,\r\n\t},\r\n\t{\r\n\t\tComponent: EditAttributePage,\r\n\t\tisMenuItem: false,\r\n\t\tpath: basicInfoEdit,\r\n\t},\r\n];\r\n","import React from \"react\";\r\nimport { useEditAttributeValueState } from \"../../../../data/listing/attributes/hooks/attributeValues/useEditAttributeValueState\";\r\nimport { useAttributeValueValidator } from \"../../../../data/listing/attributes/hooks/attributeValues/useAttributeValueValidator\";\r\nimport { useAttributeValueUpsert } from \"../../../../data/listing/attributes/hooks/attributeValues/useAttributeValueUpsert\";\r\nimport { AttributeValue } from \"../../../../data/listing/attributes/types\";\r\nimport { RouteComponentProps, useHistory } from \"react-router-dom\";\r\nimport { usePageStyles } from \"../../../pageStyles\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { Card, Grid, CardHeader, Divider, CardContent } from \"@material-ui/core\";\r\nimport { FabSave } from \"../../../components/common/FabSave\";\r\nimport { StringInput } from \"../../../components/common/StringInput\";\r\nimport { getAttributeEditLocation, AttributeEditParts } from \"../Locations\";\r\nimport { BoolInput } from \"../../../components/common/BoolInput\";\r\nimport { Status } from \"../../../../data/models\";\r\nimport { LeavePrompt } from \"../../../components/common/LeavePrompt\";\r\nimport { PageTitle } from \"../../../components/common/PageTitle\";\r\n\r\nexport interface EditAttributeValueInfo {\r\n\tattributeId: string;\r\n\tvalueId?: string;\r\n}\r\n\r\nexport interface EditAttributeValueProps extends RouteComponentProps {}\r\n\r\nexport const EditAttributeValue: React.FunctionComponent = props => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst { valueId, attributeId } = props.match.params;\r\n\tconst [value, editValue, changed] = useEditAttributeValueState(attributeId, valueId);\r\n\tconst [validationState, validate] = useAttributeValueValidator();\r\n\tconst [fetchState, upsert] = useAttributeValueUpsert();\r\n\tconst history = useHistory();\r\n\r\n\tconst unsavedChanges = fetchState.type === \"not-started\" && changed;\r\n\r\n\tconst handleChange = React.useCallback(\r\n\t\t(event: React.ChangeEvent) => {\r\n\t\t\teditValue(event.target.name as any, event.target.value);\r\n\t\t},\r\n\t\t[editValue]\r\n\t);\r\n\r\n\tconst handleChangeNum = React.useCallback(\r\n\t\t(event: React.ChangeEvent) => {\r\n\t\t\teditValue(event.target.name as any, parseInt(event.target.value));\r\n\t\t},\r\n\t\t[editValue]\r\n\t);\r\n\r\n\tconst backLocation = React.useMemo(\r\n\t\t() => getAttributeEditLocation(AttributeEditParts.Values, attributeId),\r\n\t\t[attributeId]\r\n\t);\r\n\r\n\tconst save = React.useCallback(() => {\r\n\t\tif (fetchState.type === \"successful\") {\r\n\t\t\thistory.push(backLocation);\r\n\t\t} else if (fetchState.type !== \"started\") {\r\n\t\t\tconst normalized = validate(value);\r\n\t\t\tif (normalized) {\r\n\t\t\t\tupsert(normalized);\r\n\t\t\t}\r\n\t\t}\r\n\t}, [value, validate, fetchState, history, upsert, backLocation]);\r\n\r\n\tconst pageTitle = value && value.attrValueId ? \"attributeValuesEditTitle\" : \"attributeValuesCreateTitle\";\r\n\r\n\tif (!value) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\treturn (\r\n\t\t\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\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\tproperty=\"name\"\r\n\t\t\t\t\t\t\t\t\titem={value}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"attributeValueName\")}\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\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tproperty=\"nameen\"\r\n\t\t\t\t\t\t\t\t\titem={value}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"attributeValueNameEN\")}\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\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\tproperty=\"value\"\r\n\t\t\t\t\t\t\t\t\titem={value}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"attributeValueValue\")}\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\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tproperty=\"valueen\"\r\n\t\t\t\t\t\t\t\t\titem={value}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"attributeValueValueEN\")}\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\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\tproperty=\"orderNo\"\r\n\t\t\t\t\t\t\t\t\titem={value}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChangeNum}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"attributeValueOrder\")}\r\n\t\t\t\t\t\t\t\t\ttype=\"number\"\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\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tproperty=\"status\"\r\n\t\t\t\t\t\t\t\t\titem={value}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tfalsyValue={Status.Inactive}\r\n\t\t\t\t\t\t\t\t\tthrutyValue={Status.Active}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"attributeValueStatus\")}\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\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};\r\n","import React from \"react\";\r\nimport { RouteComponentProps, useHistory } from \"react-router-dom\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Card, Grid, CardHeader, Divider, CardContent, Tabs, Tab } from \"@material-ui/core\";\r\nimport { EditAttributeBasicInfoPage } from \"./EditAttributeBasicInfoPage\";\r\nimport { AttributeValuesTable } from \"./attributeValues/AttributeValuesTable\";\r\nimport { useEditAttributeState } from \"../../../data/listing/attributes/hooks/useEditAttributeState\";\r\nimport { AttributeType } from \"../../../data/listing/attributes/types\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { attributesLocation, AttributeEditParts, getAttributeEditLocation } from \"./Locations\";\r\nimport { useAttributeUpsert } from \"../../../data/listing/attributes/hooks/useAttributeUpsert\";\r\n\r\nexport interface EditAttributeInfo {\r\n\teditPart?: string;\r\n\tattributeId?: string;\r\n}\r\n\r\nexport interface EditAttributePageProps extends RouteComponentProps { }\r\n\r\nexport const EditAttributePage: React.FunctionComponent = props => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst pageStyles = usePageStyles();\r\n\tconst { editPart, attributeId } = props.match.params;\r\n\r\n\tconst history = useHistory();\r\n\tconst [fetchState] = useAttributeUpsert();\r\n\tconst [attribute, editAttribute, changed] = useEditAttributeState(attributeId);\r\n\r\n\tconst handleSideChange = React.useCallback(\r\n\t\t(event: React.ChangeEvent<{}>, newValue: any) => {\r\n\t\t\thistory.push(getAttributeEditLocation(newValue, attributeId));\r\n\t\t},\r\n\t\t[history, attributeId]\r\n\t);\r\n\r\n\tconst hasSelectValues =\r\n\t\t(!changed || fetchState.type === \"successful\") &&\r\n\t\tattribute &&\r\n\t\tattribute.attrType === AttributeType.Select;\r\n\r\n\tconst pageTitle = attributeId ? \"attributesEditTitle\" : \"attributesCreateTitle\";\r\n\treturn (\r\n\t\t\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\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\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t{editPart === AttributeEditParts.BasicInfo && attribute && (\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\t{editPart === AttributeEditParts.Values && attribute && attribute.attrId && (\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\t);\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { Bank } from \"../types\";\r\n\r\nexport const getAllBanksApi = (userId: string) =>\r\n webApi({\r\n method: \"GET\",\r\n url: \"listing/getbanklist\",\r\n params: {\r\n userId,\r\n },\r\n });\r\n\r\nexport default getAllBanksApi;\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getAllBanksAPI from \"../api/getAllBanks\";\r\nimport { setData } from \"../banksDataReducer\";\r\n\r\nexport const loadAllBanks = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n dispatch(setData());\r\n\r\n const { userId } = store.data.auth.current.user;\r\n const banks = await dispatch(getAllBanksAPI(userId));\r\n\r\n dispatch(setData(banks || []));\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { Bank } from \"../types\";\r\n\r\nexport const getBankApi = (userId: string, bankid: string) =>\r\n webApi({\r\n method: \"GET\",\r\n url: \"listing/getbank\",\r\n params: {\r\n userId,\r\n bankid,\r\n },\r\n });\r\n\r\nexport default getBankApi;\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getBankApi from \"../api/getBank\";\r\nimport { setDisplayed } from \"../banksDataReducer\";\r\nimport { Bank } from \"../types\";\r\n\r\nexport const loadBank = (bankId: string): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n dispatch(setDisplayed());\r\n\r\n const bank = await dispatch(getBank(bankId));\r\n\r\n dispatch(setDisplayed(bank));\r\n};\r\n\r\nexport const getBank = (\r\n bankId: string\r\n): ThunkType> => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { userId } = store.data.auth.current.user;\r\n return await dispatch(getBankApi(userId, bankId));\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { Bank } from \"../types\";\r\nimport { loadBank } from \"../thunks/loadBank\";\r\n\r\nexport const useDisplayBank = (bankId?: string) => {\r\n const storeBank = useSelector(\r\n (store) => store.data.listing.banks.displayedBank\r\n );\r\n\r\n const displayedBank =\r\n storeBank && storeBank.bankId === bankId ? storeBank : undefined;\r\n\r\n const displatch = useDispatch();\r\n\r\n React.useEffect(() => {\r\n if (bankId) {\r\n displatch(loadBank(bankId));\r\n }\r\n }, [displatch, bankId]);\r\n\r\n return displayedBank;\r\n};\r\n","import React from \"react\";\r\nimport { Bank } from \"../../../data/listing/banks/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { useDisplaySingleEmementStyles } from \"../../useDisplaySingleEmementStyles\";\r\nimport { DisplayBoolNumber } from \"../../components/common/DisplayBoolNumber\";\r\nimport { Status } from \"../../../data/models\";\r\n\r\nexport interface DisplayBankMainAttributesProps {\r\n bank: Bank;\r\n}\r\n\r\nexport const DisplayBankMainAttributes: React.FunctionComponent = ({\r\n bank,\r\n}) => {\r\n const style = useDisplaySingleEmementStyles();\r\n const { getString } = React.useContext(LocalizationContext);\r\n\r\n return (\r\n
\r\n
\r\n {getString(\"bankCode\")}\r\n {bank.bankCode}\r\n
\r\n
\r\n {getString(\"bankName\")}\r\n {bank.bankName}\r\n
\r\n
\r\n {getString(\"bankIdNumber\")}\r\n {bank.idNumber}\r\n
\r\n
\r\n {getString(\"bankRegNumber\")}\r\n {bank.regNumber}\r\n
\r\n
\r\n {getString(\"cliCity\")}\r\n {bank.city}\r\n
\r\n
\r\n {getString(\"cliAddress\")}\r\n {bank.address}\r\n
\r\n
\r\n {getString(\"cliEmail\")}\r\n {bank.email}\r\n
\r\n
\r\n {getString(\"accountNumber\")}\r\n {bank.account}\r\n
\r\n
\r\n {getString(\"cliStatus\")}\r\n \r\n \r\n \r\n
\r\n
\r\n );\r\n};\r\n","import React from \"react\";\r\nimport { useDisplayBank } from \"../../../data/listing/banks/hooks/useDisplayBank\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { Bank } from \"../../../data/listing/banks/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { DisplayBankMainAttributes } from \"./DisplayBankMainAttributes\";\r\nimport {\r\n ExpansionPanel,\r\n ExpansionPanelSummary,\r\n Typography,\r\n Grid,\r\n} from \"@material-ui/core\";\r\n\r\nexport interface DisplayBankProps {\r\n id?: string;\r\n}\r\n\r\nexport const DisplayBank: React.FunctionComponent = ({\r\n id,\r\n}) => {\r\n const bank = useDisplayBank(id);\r\n const { getString } = React.useContext(LocalizationContext);\r\n\r\n return !bank ? (\r\n <>{\"loading placeholder\"}\r\n ) : (\r\n \r\n \r\n \r\n {getString(\"tableBasciInfo\")}\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const useViewBank = () => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n return React.useCallback(\r\n (bank: Bank) => showWithDrawer(),\r\n [showWithDrawer]\r\n );\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const deleteBankApi = (userId: string, bankid: string) =>\r\n webApi({\r\n method: \"DELETE\",\r\n url: \"listing/delbank\",\r\n params: {\r\n userId,\r\n bankid,\r\n },\r\n });\r\n\r\nexport default deleteBankApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { deleteBank } from \"../thunks/deleteBank\";\r\nimport { setFetchState } from \"../banksDataReducer\";\r\n\r\nexport const useBankDelete = () => {\r\n const fetchState = useSelector(\r\n (store) => store.data.listing.banks.fetchState\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchDeletebank = React.useCallback(\r\n (id: string) => dispatch(deleteBank(id)),\r\n [dispatch]\r\n );\r\n\r\n React.useEffect(() => {\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n }, [dispatch]);\r\n\r\n return [fetchState, dispatchDeletebank] as [\r\n typeof fetchState,\r\n typeof dispatchDeletebank\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport deleteBankApi from \"../api/deleteBank\";\r\nimport { setFetchState } from \"../banksDataReducer\";\r\n\r\nexport const deleteBank = (bankId: string): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n dispatch(setFetchState({ type: \"started\" }));\r\n\r\n const { userId } = store.data.auth.current.user;\r\n const result = await dispatch(deleteBankApi(userId, bankId));\r\n\r\n dispatch(setFetchState(result !== undefined ? { type: \"successful\" } : { type: \"error\"}));\r\n};\r\n","import { getEditLocation } from \"../../../core/util/functions\";\r\n\r\nexport const banksLocation = \"/listing/codebook/banks\";\r\nexport const getBankEditLocation = (id?: string) => getEditLocation(banksLocation, undefined, id);\r\n\r\nexport const editRouter = getBankEditLocation(\":bankId?\");\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport ViewIcon from \"@material-ui/icons/InputOutlined\";\r\nimport EditIcon from \"@material-ui/icons/EditOutlined\";\r\nimport { Bank } from \"../../../data/listing/banks/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Action } from \"material-table\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { useViewBank } from \"./DisplayBank\";\r\nimport { useBankDelete } from \"../../../data/listing/banks/hooks/useBankDelete\";\r\nimport { getBankEditLocation } from \"./Locations\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\n\r\n\r\nexport const useBankActions = (userAccessRights: AccessRights) => {\r\n const { getString } = useContext(LocalizationContext);\r\n const onShowBank = useViewBank();\r\n const onEditBank = useEditBankAction();\r\n\r\n return useMemo(() => {\r\n const result: Action[] = [\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"tableShow\"),\r\n onClick: (event, rowData) => onShowBank(rowData as Bank),\r\n },\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"tableEdit\"),\r\n onClick: (event, rowData) => onEditBank(rowData as Bank),\r\n hidden: userAccessRights===AccessRights.ReadOnly\r\n },\r\n ];\r\n\r\n return result;\r\n }, [onShowBank, onEditBank, getString]);\r\n};\r\n\r\nexport const useDeleteBankAction = () => {\r\n const [, deleteBank] = useBankDelete();\r\n return React.useCallback(\r\n async (bank: Bank) => {\r\n if (bank.bankId ) {\r\n await deleteBank(bank.bankId);\r\n }\r\n },\r\n [deleteBank]\r\n );\r\n};\r\n\r\nexport const useEditBankAction = () => {\r\n const history = useHistory();\r\n return React.useCallback(\r\n (bank: Bank) => history.push(getBankEditLocation(bank.bankId)),\r\n [history]\r\n );\r\n};\r\n","import React from \"react\";\r\nimport { Table, TableDataProps } from \"../../components/common/Table\";\r\nimport { useBankData } from \"../../../data/listing/banks/hooks/useBankData\";\r\nimport { Bank } from \"../../../data/listing/banks/types\";\r\nimport { useBankColumns } from \"./useBankColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\nimport { useBankActions, useDeleteBankAction } from \"./useBankActions\";\r\n\r\nexport interface BankTableProps {\r\n userAccessRights: AccessRights;\r\n}\r\n\r\ntype BankTablePropsType = BankTableProps & TableDataProps;\r\n\r\nexport const BanksTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n ...tableProps\r\n}) => {\r\n const [data, loadAll] = useBankData();\r\n\r\n const columns = useBankColumns();\r\n const actions = useBankActions(userAccessRights);\r\n const onDeleteBank = useDeleteBankAction();\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={loadAll}\r\n immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n actions={actions}\r\n options={{\r\n toolbar: false,\r\n pageSize: 10,\r\n actionsColumnIndex: -1,\r\n }}\r\n editable={userAccessRights !== AccessRights.ReadOnly ? {\r\n onRowDelete: onDeleteBank,\r\n }: {}}\r\n />\r\n );\r\n};\r\n\r\nexport default BanksTable;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadAllBanks } from \"../thunks/loadAllBanks\";\r\nimport { Bank } from \"../types\";\r\n\r\nexport const useBankData = () => {\r\n const data = useSelector(\r\n (s) => s.data.listing.banks.displayData\r\n );\r\n const allData = useSelector(\r\n (s) => s.data.listing.banks.all\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadAllBanks = React.useCallback(\r\n () => dispatch(loadAllBanks()),\r\n [dispatch]\r\n );\r\n\r\n return [data, dispatchLoadAllBanks, allData] as [\r\n typeof data,\r\n typeof dispatchLoadAllBanks,\r\n typeof allData\r\n ];\r\n};\r\n\r\nexport const useBank = (id?: string) => {\r\n const allData = useSelector(\r\n (s) => s.data.listing.banks.all\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadAllBanks = React.useCallback(\r\n () => dispatch(loadAllBanks()),\r\n [dispatch]\r\n );\r\n\r\n React.useEffect(() => {\r\n if (!allData && id) {\r\n dispatchLoadAllBanks();\r\n }\r\n }, [allData, id, dispatchLoadAllBanks]);\r\n\r\n const bank = React.useMemo(() => {\r\n if (!allData) {\r\n return undefined;\r\n } else {\r\n return allData?.find((e) => e.bankId === id);\r\n }\r\n }, [id, allData]);\r\n\r\n return [bank] as [typeof bank];\r\n};\r\n","import { useContext, useMemo } from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\nimport { Bank } from \"../../../data/listing/banks/types\";\r\n\r\nexport function useBankColumns() {\r\n const { getString } = useContext(LocalizationContext);\r\n return useMemo(\r\n () => [\r\n {\r\n title: getString(\"bankCode\"),\r\n field: \"bankCode\",\r\n },\r\n {\r\n title: getString(\"bankName\"),\r\n field: \"bankName\",\r\n },\r\n {\r\n title: getString(\"bankIdNumber\"),\r\n field: \"idNumber\",\r\n },\r\n ],\r\n [getString]\r\n ) as Column[];\r\n}\r\n","import React from \"react\";\r\nimport { Grid, CardContent, CardHeader, Divider, Card, Fab } from \"@material-ui/core\";\r\nimport BanksTable from \"./BanksTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { SearchBox } from \"../../components/common/SearchBox\";\r\nimport { PageComponent, AccessRights } from \"../../../core/navigation/types\";\r\nimport AddIcon from \"@material-ui/icons/Add\";\r\nimport { useBankSearch } from \"../../../data/listing/banks/hooks/useBankSearch\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { getBankEditLocation } from \"./Locations\";\r\n\r\nconst BanksPage: PageComponent = ({ userAccessRights }) => {\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst [search, setSearch] = useBankSearch();\r\n\tconst history = useHistory();\r\n\r\n\treturn (\r\n\t\t\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\taction={}\r\n\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\t{userAccessRights === AccessRights.All && (\r\n\t\t\t\t\t history.push(getBankEditLocation())}\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};\r\n\r\nexport default BanksPage;\r\n","import { setSearchTerm } from \"../banksDataReducer\";\r\nimport { useSearch } from \"../../../../core/util/storeHooks\";\r\n\r\nexport const useBankSearch = () =>\r\n useSearch((s) => s.data.listing.banks.searchTerm, setSearchTerm);\r\n","import React from \"react\";\r\nimport { useDisplayBank } from \"./useDisplayBank\";\r\nimport { Bank } from \"../types\";\r\nimport { useCopiedState } from \"../../../../core/util/hooks\";\r\nimport { Status } from \"../../../models\";\r\n\r\nexport const defaultBank: Bank = {\r\n bankCode: \"\",\r\n bankName: \"\",\r\n idNumber: \"\",\r\n status: Status.Active,\r\n};\r\n\r\nexport const useEditBank = (bankId?: string) => {\r\n const displayBank = useDisplayBank(bankId);\r\n\r\n return React.useMemo(() => {\r\n if (bankId !== undefined && displayBank === undefined) {\r\n return undefined;\r\n }\r\n\r\n if (bankId === undefined) {\r\n return { ...defaultBank };\r\n }\r\n\r\n return displayBank ? { ...displayBank } : undefined;\r\n }, [bankId, displayBank]);\r\n};\r\n\r\nexport const useEditBankState = (bankId?: string) => {\r\n const bank = useEditBank(bankId);\r\n return useCopiedState(bank);\r\n};\r\n","import { Bank, BankValidationState } from \"../types\";\r\nimport { createUseValidator } from \"../../../../core/util/hooks\";\r\n\r\nexport const bankValidationState: BankValidationState = {\r\n bankCode: true,\r\n bankName: true,\r\n idNumber: true,\r\n cityId: true,\r\n};\r\n\r\nexport const useBankValidator = createUseValidator(\r\n bankValidationState\r\n);\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { Bank } from \"../types\";\r\n\r\nexport const createBankApi = (userId: string, bank: Bank) =>\r\n webApiWithResponse({\r\n method: \"PUT\",\r\n url: \"listing/newbank\",\r\n params: {\r\n userId,\r\n },\r\n data: bank,\r\n });\r\n\r\nexport default createBankApi;\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { Bank } from \"../types\";\r\n\r\nexport const updateBankApi = (userId: string, bank: Bank) =>\r\n webApiWithResponse({\r\n method: \"PUT\",\r\n url: \"listing/updbank\",\r\n params: {\r\n userId,\r\n },\r\n data: bank,\r\n });\r\n\r\nexport default updateBankApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { upsertBank } from \"../thunks/upsertBank\";\r\nimport { setFetchState } from \"../banksDataReducer\";\r\nimport { Bank } from \"../types\";\r\n\r\nexport const useBankUpsert = () => {\r\n const fetchState = useSelector(\r\n (store) => store.data.listing.banks.fetchState\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchUpsertBank = React.useCallback(\r\n (bank: Bank) => dispatch(upsertBank(bank)),\r\n [dispatch]\r\n );\r\n\r\n React.useEffect(() => {\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n }, [dispatch]);\r\n\r\n return [fetchState, dispatchUpsertBank] as [\r\n typeof fetchState,\r\n typeof dispatchUpsertBank\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport createBankApi from \"../api/createBank\";\r\nimport updateBankApi from \"../api/updateBank\";\r\nimport { setFetchState } from \"../banksDataReducer\";\r\nimport { Bank } from \"../types\";\r\n\r\nexport const upsertBank = (bank: Bank): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setFetchState({ type: \"started\" }));\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst result = bank.bankId\r\n\t\t? await dispatch(updateBankApi(userId, bank))\r\n\t\t: await dispatch(createBankApi(userId, bank));\r\n\r\n\tif (result && result.resCode === \"OK\") {\r\n\t\tdispatch(setFetchState({ type: \"successful\", result: result.resDesc }));\r\n\t\treturn result.resDesc;\r\n\t} else {\r\n\t\tdispatch(setFetchState({ type: \"error\", errorCode: result?.resCode }));\r\n\t}\r\n};\r\n","import React from \"react\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { StoreType } from \"../../../core/store/reducers\";\r\nimport { City } from \"../../models\";\r\n\r\nconst getCityLabel = (city?: City) => (city ? `${city.cityName} (${city.zipCode})` : \"\");\r\n\r\nexport const useCities = () => {\r\n\tconst cities = useSelector(store => store.data.initialData.cities);\r\n\r\n\treturn [cities, getCityLabel] as [typeof cities, typeof getCityLabel];\r\n};\r\n\r\nexport const useCity = (cityId?: string) => {\r\n\tconst [cities] = useCities();\r\n\r\n\tconst city = React.useMemo(() => cities.find(c => c.cityId === cityId), [cities, cityId]);\r\n\tconst cityLabel = React.useMemo(() => getCityLabel(city), [city]);\r\n\r\n\treturn [city, cityLabel] as [typeof city, typeof cityLabel];\r\n};\r\n","import React from \"react\";\r\nimport { useCities } from \"../../../data/initialData/hooks/useCities\";\r\nimport { City } from \"../../../data/models\";\r\nimport { AutocompleteSelectType, AutocompleteSelect } from \"./AutocompleteSelect\";\r\n\r\ntype CitySelectPropsType = Omit, \"data\" | \"getLabel\">;\r\n\r\nexport const CitySelect: React.FunctionComponent = props => {\r\n\tconst [cities, renderCityLabel] = useCities();\r\n\r\n\tconst citiesWithoutRegions: City[] = React.useMemo(\r\n\t\t() =>\r\n\t\t\tcities.map(c => ({\r\n\t\t\t\t...c,\r\n\t\t\t\tregion: undefined,\r\n\t\t\t})),\r\n\t\t[cities]\r\n\t);\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\tdata={citiesWithoutRegions}\r\n\t\t\tgetLabel={renderCityLabel}\r\n\t\t\t{...props}\r\n\t\t/>\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { StoreType } from \"../../../core/store/reducers\";\r\nimport { Commissions } from \"../../models\";\r\n\r\nconst getCommissionsLabel = (commissions?: Commissions) =>\r\n commissions ? commissions.commName : \"\";\r\n\r\nexport const useCommissions = () => {\r\n const commissions = useSelector(\r\n (store) => store.data.initialData.commissions\r\n );\r\n\r\n return [commissions, getCommissionsLabel] as [\r\n typeof commissions,\r\n typeof getCommissionsLabel\r\n ];\r\n};\r\n\r\nexport const useCommission = (commId?: string) => {\r\n const [commissions] = useCommissions();\r\n\r\n const commission = React.useMemo(\r\n () => commissions.find((c) => c.commId === commId),\r\n [commissions, commId]\r\n );\r\n const commissionkLabel = React.useMemo(\r\n () => getCommissionsLabel(commission),\r\n [commission]\r\n );\r\n\r\n return [commission, commissionkLabel] as [\r\n typeof commission,\r\n typeof commissionkLabel\r\n ];\r\n};\r\n","import React from \"react\";\r\nimport { useCommissions } from \"../../../data/initialData/hooks/useCommissions\";\r\nimport { Commissions } from \"../../../data/models\";\r\nimport { AutocompleteSelect, AutocompleteSelectType } from \"./AutocompleteSelect\";\r\n\r\ntype CommissionsSelectPropsType = Omit, \"data\" | \"getLabel\">;\r\n\r\nexport const CommissionSelect: React.FunctionComponent = props => {\r\n const [commissions, renderCommissionsLabel] = useCommissions();\r\n\r\n return (\r\n\t\t\r\n\t\t\t{...(props as AutocompleteSelectType)}\r\n\t\t\tdata={commissions.filter((e) => e.commType === 1)}\r\n\t\t\tgetLabel={renderCommissionsLabel}\r\n\t\t/>\r\n\t);\r\n \r\n};\r\n","import { NavigationItem } from \"../../../core/navigation/types\";\r\nimport BankPage from \"./BanksPage\";\r\nimport { EditBankPage } from \"./EditBankPage\";\r\nimport { banksLocation, editRouter } from \"./Locations\";\r\nexport const bankComponents: NavigationItem[] = [\r\n\t{\r\n\t\tComponent: BankPage,\r\n\t\tisMenuItem: true,\r\n\t\tpath: banksLocation,\r\n\t},\r\n\t{\r\n\t\tComponent: EditBankPage,\r\n\t\tisMenuItem: false,\r\n\t\tpath: editRouter,\r\n\t},\r\n];\r\n","import React from \"react\";\r\nimport { useEditBankState } from \"../../../data/listing/banks/hooks/useEditBankState\";\r\nimport { useBankValidator } from \"../../../data/listing/banks/hooks/useBankValidator\";\r\nimport { useBankUpsert } from \"../../../data/listing/banks/hooks/useBankUpsert\";\r\nimport { RouteComponentProps, useHistory } from \"react-router-dom\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Card, Grid, CardHeader, Divider, CardContent } from \"@material-ui/core\";\r\nimport { FabSave } from \"../../components/common/FabSave\";\r\nimport { Bank } from \"../../../data/listing/banks/types\";\r\nimport { StringInput } from \"../../components/common/StringInput\";\r\nimport { LeavePrompt } from \"../../components/common/LeavePrompt\";\r\nimport { CitySelect } from \"../../components/common/CitySelect\";\r\nimport { City, Status, Commissions } from \"../../../data/models\";\r\nimport { BoolInput } from \"../../components/common/BoolInput\";\r\nimport { CommissionSelect } from \"../../components/common/CommissionSelect\";\r\nimport { banksLocation } from \"./Locations\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\n\r\nexport interface EditBankInfo {\r\n\tbankId?: string;\r\n}\r\n\r\nexport interface EditBankProps extends RouteComponentProps {}\r\n\r\nexport const EditBankPage: React.FunctionComponent = props => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst [bank, editBank, changed] = useEditBankState(props.match.params.bankId);\r\n\tconst [validationState, validate] = useBankValidator();\r\n\tconst [fetchState, upsert] = useBankUpsert();\r\n\tconst history = useHistory();\r\n\r\n\tconst unsavedChanges = fetchState.type === \"not-started\" && changed;\r\n\r\n\tconst handleChange = React.useCallback(\r\n\t\t(event: React.ChangeEvent) => {\r\n\t\t\teditBank(event.target.name as any, event.target.value);\r\n\t\t},\r\n\t\t[editBank]\r\n\t);\r\n\r\n\tconst changeCity = React.useCallback(\r\n\t\t(city: City | null) => {\r\n\t\t\teditBank(\"cityId\", city ? city.cityId : \"\");\r\n\t\t},\r\n\t\t[editBank]\r\n\t);\r\n\r\n\tconst changeCommission = React.useCallback(\r\n\t\t(commission: Commissions | null) => {\r\n\t\t\teditBank(\"commId\", commission ? commission.commId : \"\");\r\n\t\t},\r\n\t\t[editBank]\r\n\t);\r\n\r\n\tconst save = React.useCallback(() => {\r\n\t\tif (fetchState.type === \"successful\") {\r\n\t\t\thistory.push(banksLocation);\r\n\t\t} else if (fetchState.type !== \"started\") {\r\n\t\t\tconst normalized = validate(bank);\r\n\t\t\tif (normalized) {\r\n\t\t\t\tupsert(normalized);\r\n\t\t\t}\r\n\t\t}\r\n\t}, [bank, validate, fetchState, history, upsert]);\r\n\r\n\tconst pageTitle = bank && bank.bankId ? \"bankEdit\" : \"bankCreate\";\r\n\r\n\tif (!bank) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\treturn (\r\n\t\t\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\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\tproperty=\"bankCode\"\r\n\t\t\t\t\t\t\t\t\titem={bank}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"bankCode\")}\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\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tproperty=\"bankName\"\r\n\t\t\t\t\t\t\t\t\titem={bank}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"bankName\")}\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\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tproperty=\"idNumber\"\r\n\t\t\t\t\t\t\t\t\titem={bank}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"bankIdNumber\")}\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\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tproperty=\"regNumber\"\r\n\t\t\t\t\t\t\t\t\titem={bank}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"bankRegNumber\")}\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\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t city.cityId === bank.cityId}\r\n\t\t\t\t\t\t\t\t\tonChangeItem={changeCity}\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\r\n\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\tproperty=\"address\"\r\n\t\t\t\t\t\t\t\t\titem={bank}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"cliAddress\")}\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\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tproperty=\"email\"\r\n\t\t\t\t\t\t\t\t\titem={bank}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"cliEmail\")}\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\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\tproperty=\"account\"\r\n\t\t\t\t\t\t\t\t\titem={bank}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"accountNumber\")}\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\t\r\n\t\t\t\t\t\t\t\t commission.commId === bank.commId}\r\n\t\t\t\t\t\t\t\t\tonChangeItem={changeCommission}\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\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tproperty=\"status\"\r\n\t\t\t\t\t\t\t\t\titem={bank}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tfalsyValue={Status.Inactive}\r\n\t\t\t\t\t\t\t\t\tthrutyValue={Status.Active}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"cliStatus\")}\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\r\n\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\t);\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { City } from \"../types\";\r\n\r\nexport const getCityApi = (userId: string, cityId: string) =>\r\n webApi({\r\n method: \"GET\",\r\n url: \"listing/getcity\",\r\n params: {\r\n userId,\r\n cityId,\r\n },\r\n });\r\n\r\nexport default getCityApi;\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getCityApi from \"../api/getCity\";\r\nimport { setDisplayed } from \"../citiesDataReducer\";\r\nimport { City } from \"../types\";\r\n\r\nexport const loadCity = (cityId: string): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n dispatch(setDisplayed());\r\n\r\n const city = await dispatch(getCity(cityId));\r\n\r\n dispatch(setDisplayed(city));\r\n};\r\n\r\nexport const getCity = (\r\n cityId: string\r\n): ThunkType> => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { userId } = store.data.auth.current.user;\r\n\r\n return await dispatch(getCityApi(userId, cityId));\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { City } from \"../types\";\r\nimport { loadCity } from \"../thunks/loadCity\";\r\n\r\nexport const useDisplayCity = (cityId?: string) => {\r\n const storeCity = useSelector(\r\n (store) => store.data.listing.cities.displayedCity\r\n );\r\n\r\n const displayedCity =\r\n storeCity && storeCity.cityId === cityId ? storeCity : undefined;\r\n\r\n const dispatch = useDispatch();\r\n\r\n React.useEffect(() => {\r\n if (cityId) {\r\n dispatch(loadCity(cityId));\r\n }\r\n }, [dispatch, cityId]);\r\n\r\n return displayedCity;\r\n};\r\n","import React from \"react\";\r\nimport { useDisplayCity } from \"./useDisplayCity\";\r\nimport { City } from \"../types\";\r\nimport { useCopiedState } from \"../../../../core/util/hooks\";\r\nimport { Status } from \"../../../models\";\r\n\r\nexport const defaultCity: City = {\r\n\tcityName: \"\",\r\n\tzipCode: \"\",\r\n\tregionId: \"\",\r\n\tisPort: Status.Inactive,\r\n};\r\n\r\nexport const useEditCity = (cityId?: string) => {\r\n\tconst displayCity = useDisplayCity(cityId);\r\n\r\n\treturn React.useMemo(() => {\r\n\t\tif (cityId !== undefined && displayCity === undefined) {\r\n\t\t\treturn undefined;\r\n }\r\n\r\n\t\tif (cityId === undefined) {\r\n\t\t\treturn { ...defaultCity };\r\n }\r\n\r\n\t\treturn displayCity ? { ...displayCity } : undefined;\r\n\t}, [cityId, displayCity]);\r\n};\r\n\r\nexport const useEditCityState = (cityId?: string) => {\r\n\tconst city = useEditCity(cityId);\r\n\treturn useCopiedState(city)\r\n};\r\n","import { City, CityValidationState } from \"../types\";\r\nimport { createUseValidator } from \"../../../../core/util/hooks\";\r\n\r\nexport const cityValidationState: CityValidationState = {\r\n\tcityName: true,\r\n\tzipCode: true,\r\n\tregionId: true,\r\n};\r\n\r\nexport const useCityValidator = createUseValidator(cityValidationState);\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { City } from \"../types\";\r\n\r\nexport const createCityApi = (userId: string, city: City) =>\r\n webApiWithResponse({\r\n method: \"PUT\",\r\n url: \"listing/newcity\",\r\n params: {\r\n userId,\r\n },\r\n data: city,\r\n });\r\n\r\nexport default createCityApi;\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { City } from \"../types\";\r\n\r\nexport const updateCityApi = (userId: string, city: City) =>\r\n webApiWithResponse({\r\n method: \"PUT\",\r\n url: \"listing/updcity\",\r\n params: {\r\n userId,\r\n },\r\n data: city,\r\n });\r\n\r\nexport default updateCityApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { upsertCity } from \"../thunks/upsertCity\";\r\nimport { setFetchState } from \"../citiesDataReducer\";\r\nimport { City } from \"../types\";\r\n\r\nexport const useCityUpsert = () => {\r\n const fetchState = useSelector(\r\n (store) => store.data.listing.cities.fetchState\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchUpsertCity = React.useCallback(\r\n (city: City) => dispatch(upsertCity(city)),\r\n [dispatch]\r\n );\r\n\r\n React.useEffect(() => {\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n }, [dispatch]);\r\n\r\n return [fetchState, dispatchUpsertCity] as [\r\n typeof fetchState,\r\n typeof dispatchUpsertCity\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport createCityApi from \"../api/createCity\";\r\nimport updateCityApi from \"../api/updateCity\";\r\nimport { setFetchState } from \"../citiesDataReducer\";\r\nimport { City } from \"../types\";\r\n\r\nexport const upsertCity = (city: City): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n dispatch(setFetchState({ type: \"started\" }));\r\n\r\n const { userId } = store.data.auth.current.user;\r\n const result = city.cityId\r\n ? await dispatch(updateCityApi(userId, city))\r\n : await dispatch(createCityApi(userId, city));\r\n\r\n if (result && result.resCode === \"OK\") {\r\n dispatch(setFetchState({ type: \"successful\", result: result.resDesc }));\r\n return result.resDesc;\r\n } else {\r\n dispatch(setFetchState({ type: \"error\", errorCode: result?.resCode }));\r\n }\r\n};\r\n","import { getEditLocation } from \"../../../core/util/functions\";\r\n\r\nexport const citiesLocation = \"/listing/codebook/cities\";\r\nexport const getCityEditLocation = (id?: string) => getEditLocation(citiesLocation, undefined, id);\r\n\r\nexport const editRouter = getCityEditLocation(\":cityId?\");\r\n","import React from \"react\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { StoreType } from \"../../../core/store/reducers\";\r\nimport { Region } from \"../../models\";\r\n\r\nconst getRegionLabel = (region?: Region) => (region ? region.regName : \"\");\r\n\r\nexport const useRegions = () => {\r\n const regions = useSelector(\r\n (store) => store.data.initialData.regions\r\n );\r\n\r\n\r\n return [regions, getRegionLabel] as [typeof regions, typeof getRegionLabel];\r\n};\r\n\r\nexport const useRegion = (regId?: string) => {\r\n const [regions] = useRegions();\r\n\r\n const region = React.useMemo(() => regions.find((c) => c.regId === regId), [\r\n regions,\r\n regId,\r\n ]);\r\n\r\n\r\n const regionLabel = React.useMemo(() => getRegionLabel(region), [region]);\r\n\r\n return [region, regionLabel] as [typeof region, typeof regionLabel];\r\n};\r\n","import React from \"react\";\r\nimport { useRegions } from \"../../../data/initialData/hooks/useRegions\";\r\nimport { Region } from \"../../../data/models\";\r\nimport {\r\n AutocompleteSelect,\r\n AutocompleteSelectType,\r\n} from \"./AutocompleteSelect\";\r\n\r\ntype RegionSelectPropsType = Omit<\r\n AutocompleteSelectType,\r\n \"data\" | \"getLabel\"\r\n>;\r\n\r\n\r\nexport const RegionSelect: React.FunctionComponent = (\r\n props\r\n) => {\r\n const [regions, renderRegionLabel] = useRegions();\r\n\r\n return (\r\n\t\t\r\n\t\t\t{...(props as AutocompleteSelectType)}\r\n\t\t\tdata={regions}\r\n\t\t\tgetLabel={renderRegionLabel}\r\n\t\t/>\r\n\t);\r\n\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { City } from \"../types\";\r\n\r\nexport const getAllCityApi = (userId: string) =>\r\n webApi({\r\n method: \"GET\",\r\n url: \"listing/getcitylist\",\r\n params: {\r\n userId,\r\n },\r\n });\r\n\r\nexport default getAllCityApi;\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getAllCitiesAPI from \"../api/getAllCities\";\r\nimport { setData } from \"../citiesDataReducer\";\r\n\r\nexport const loadAllCities = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setData());\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst cities = await dispatch(getAllCitiesAPI(userId));\r\n\r\n\tdispatch(setData(cities || []));\r\n};\r\n","import React from \"react\";\r\nimport { City } from \"../../../data/listing/cities/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { useDisplaySingleEmementStyles } from \"../../useDisplaySingleEmementStyles\";\r\nimport { DisplayBoolNumber } from \"../../components/common/DisplayBoolNumber\";\r\nimport { Status } from \"../../../data/models\";\r\n\r\nexport interface DisplayCityMainAttributesProps {\r\n city: City;\r\n}\r\n\r\nexport const DisplayCityMainAttributes: React.FunctionComponent = ({\r\n city,\r\n}) => {\r\n const style = useDisplaySingleEmementStyles();\r\n const { getString } = React.useContext(LocalizationContext);\r\n\r\n return (\r\n
\r\n
\r\n {getString(\"cityName\")}\r\n {city.cityName}\r\n
\r\n
\r\n {getString(\"cityZipCode\")}\r\n {city.zipCode}\r\n
\r\n
\r\n {getString(\"cityRegion\")}\r\n {city.regionName}\r\n
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"cityIsPort\")}\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t
\r\n
\r\n );\r\n};\r\n","import { ValidationState } from \"../../../core/util/types\";\r\nimport { Status } from \"../../models\";\r\n\r\nexport enum ClientActive {\r\n\tHasAccess = 1,\r\n\tAccessForbiden = 0,\r\n}\r\n\r\nexport enum ClientHeadquaters {\r\n\tDomestic = 0,\r\n\tForeign = 1,\r\n}\r\nexport interface ClientListData {\r\n\tcliId: string; //\t\tPK\r\n\tcliName: string; //\tnaziv klijenta\r\n\tcliIdNo: string; //\tmaticni broj klijenta\r\n\ttaxCode: string; //\tPIB broj\r\n\tcliType: string; //\ttip klijenta\r\n\tforeignCli: ClientHeadquaters; //\t0=domaci klijent (default), 1=strani\r\n\tcity: string; //\r\n\tphone: string; //\r\n\tbroker: string; //\r\n\tactive: ClientActive; //\t\t0=ima pristup app (def), 1=zabranjen pristup\r\n\tstatus: Status; //\t\t0=aktivan (def), 1=pasivan\r\n}\r\n\r\nexport interface Client {\r\n\tcliId?: string;\r\n\tcliName: string;\r\n\tfullName: string;\r\n\tcliIdNo: string;\r\n\ttaxCode: string;\r\n\tcliJBKJS?: string;\r\n\trpgCode: string;\r\n\tcliType: number; //id Client type\r\n\tforeignCli: ClientHeadquaters; // u stvari enum 0/1\r\n\tcityId?: string; // id grada\r\n\tcity?: string;\r\n\taddress: string;\r\n\tmailCityId?: string;\r\n\tmailCity?: string;\r\n\tmailAddress: string;\r\n\tphone: string;\r\n\tmobile: string;\r\n\tfax: string;\r\n\temail: string;\r\n\thasContract?: ClientHasContract; //\tne popunjava se, setovace se unosom ugovora:\r\n\tactive: ClientActive; //\t\t0=ima pristup app (def), 1=zabranjen pristup\r\n\tactiveFrom?: Date; //; placena clanarina od datuma\r\n\tactiveTo?: Date; //;\t placena clanarina do datuma\r\n\tcommId?: string; //\t??\r\n\tfixedComm?: number; //\t??\r\n\tcommission?: number; // ??\r\n\tinitialTurnover?: number; // NE TREBA\r\n\tcurrentTurnover?: number;\r\n\tcomment: string; //\tkomentar\r\n\tstatus: Status; //\t\tstatus klijenta: 0-enabled, 1-disabled\r\n\tcreUser?: string; //\tpopunjava se na serveru\r\n\tcreTime?: Date; //\tisto\r\n}\r\n\r\nexport enum ClientHasContract {\r\n\tTrue = 0,\r\n\tFalse = 1\r\n}\r\n\r\nexport interface ClientPerson {\r\n\tcliPrsId?: string;\r\n\tclientId: string;\r\n\tcliPrsIdNo: string;\r\n\tcliPrsName: string;\r\n\tcliPrsRole?: number; // \t\tuloga lica (iz commondata PersonRoles)\r\n\tcliPrsRoleName?: string; // \tnaziv uloge lica => dodati jos u listu\r\n\tdateCertified?: Date; // \tdatum sticanja sertifikata (za trejdera)\r\n\tphone?: string; // \t\ttelefon lica\r\n\temail?: string; // \t\temail lica\r\n\tstatus: Status;\r\n}\r\n\r\nexport interface ClientBroker {\r\n\tcliBrokId?: string;\r\n\tclientId: string;\r\n\tbrokerId?: string;\r\n\tbrokName: string;\r\n\tbrokIdNo: string;\r\n\tstatus: Status;\r\n}\r\n\r\nexport interface ClientContractList {\r\n\tcliContrId: string;\r\n\tcontrNo: string;\r\n\tcontrDate: Date;\r\n\tlinkedContrNo: string;\r\n\tcontrTypeDescr: string;\r\n\tcontrDescr: string;\r\n\tstatus: Status;\r\n}\r\n\r\nexport interface ClientContract {\r\n\tcliContrId?: string;\r\n\tclientId: string;\r\n\tcontrNo: string;\r\n\tcontrDate?: Date;\r\n\tcontrType: number; // 10\r\n\tcontrTypeDescr: string;\r\n\tlinkedContrId?: string;\r\n\tlinkedContrNo?: string;\r\n\tcontrDescr: string;\r\n\tphoneOrder: string;\r\n\twebUser: ContractWebUser;\r\n\twebUserBlocked: ContractWebUserBlocked;\r\n\tstatus: Status;\r\n}\r\n\r\nexport enum ContractWebUser {\r\n\tTrue = 1,\r\n\tFalse = 0,\r\n}\r\n\r\nexport enum ContractWebUserBlocked {\r\n\tTrue = 1,\r\n\tFalse = 0,\r\n}\r\n\r\nexport interface ClientAccountList {\r\n\tmonAccId?: string; // \t\tPK\r\n\taccount: string; // \t\tbroj racuna\r\n\tbankCode: string; // \t\toznaka banke\r\n\tdefaultAcc: number; // \t\tdefault racun\r\n\tcurrCode: string; // \t\toznaka valuta\r\n\tforBuySell: AccountOrderSide; // \t\tza kupovinu/prodaju (1=za kupovinu, 2=za prodaju, 0=za oba - default)\r\n\tstatus: Status; //\r\n}\r\n\r\nexport interface ClientAccount {\r\n\tmonAccId?: string; // \t\tPK\r\n\tclientId: string; // \t\tID klijenta\r\n\taccount?: string; // \t\tracun\r\n\tbankId?: string; // \t\tID banke\r\n\tbankCode?: string; // \t\toznaka banke\r\n\tdefaultAcc: AccountDefault; // \t\tdefault racun\r\n\tclientBankCode: string; // \tsifra klijenta u banci\r\n\tjointAccId?: string; // \t\tID zbirnog racuna (ovo se moze izostaviti, za sada se ne koristi)\r\n\tcurrId?: string; // \t\tID valute\r\n\tcurrCode?: string; // \t\toznaka valute\r\n\tforBuySell: AccountOrderSide; // \t\tza kupovinu/prodaju\r\n\taccount1?: string; // \t\tvezani racun (i ovo se za sada moze izostaviti)\r\n\tstatus: Status; //\r\n}\r\n\r\nexport enum AccountDefault {\r\n\tTrue = 1,\r\n\tFalse = 0,\r\n}\r\n\r\nexport enum AccountOrderSide {\r\n\tBuy = 1,\r\n\tSell = 2,\r\n\tBoth = 0,\r\n}\r\n\r\nexport type ClientValidationState = ValidationState;\r\n\r\nexport enum ErrorCodeExceptions {\r\n\tReferenceErrorCode = \"E-903\",\r\n}\r\n\r\n","import React from \"react\";\r\nimport { useDisplayCity } from \"../../../data/listing/cities/hooks/useDisplayCity\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { City } from \"../../../data/listing/cities/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { DisplayCityMainAttributes } from \"./DisplayCityMainAttributes\";\r\nimport { ExpansionPanel, ExpansionPanelSummary, Typography, Grid } from \"@material-ui/core\";\r\n\r\nexport interface DisplayCitiesProps {\r\n\tid?: string;\r\n}\r\n\r\nexport const DisplayCity: React.FunctionComponent = ({ id }) => {\r\n\tconst city = useDisplayCity(id);\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\treturn !city ? (\r\n\t\t<>{\"loading placeholder\"}\r\n\t) : (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t{getString(\"tableBasciInfo\")}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport const useViewCity = () => {\r\n\tconst showWithDrawer = React.useContext(DisplayDrawerContext);\r\n\treturn React.useCallback(\r\n\t\t(city: City) => showWithDrawer(),\r\n\t\t[showWithDrawer]\r\n\t);\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const deleteCityApi = (userId: string, cityId: string) =>\r\n webApi({\r\n method: \"DELETE\",\r\n url: \"listing/delcity\",\r\n params: {\r\n userId,\r\n cityId,\r\n },\r\n });\r\n\r\nexport default deleteCityApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { deleteCity } from \"../thunks/deleteCity\";\r\nimport { setFetchState } from \"../citiesDataReducer\";\r\n\r\nexport const useCityDelete = () => {\r\n const fetchState = useSelector(\r\n (store) => store.data.listing.cities.fetchState\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchDeleteCity = React.useCallback(\r\n (id: string) => dispatch(deleteCity(id)),\r\n [dispatch]\r\n );\r\n\r\n React.useEffect(() => {\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n }, [dispatch]);\r\n\r\n return [fetchState, dispatchDeleteCity] as [\r\n typeof fetchState,\r\n typeof dispatchDeleteCity\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport deleteCityApi from \"../api/deleteCity\";\r\nimport { setFetchState } from \"../citiesDataReducer\";\r\n\r\nexport const deleteCity = (cityId: string): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n dispatch(setFetchState({ type: \"started\" }));\r\n\r\n const { userId } = store.data.auth.current.user;\r\n const result = await dispatch(deleteCityApi(userId, cityId));\r\n\r\n dispatch(\r\n setFetchState(\r\n result !== undefined ? { type: \"successful\" } : { type: \"error\" }\r\n )\r\n );\r\n};\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport ViewIcon from \"@material-ui/icons/InputOutlined\";\r\nimport EditIcon from \"@material-ui/icons/EditOutlined\";\r\nimport { City } from \"../../../data/listing/cities/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Action } from \"material-table\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { useViewCity } from \"./DisplayCity\";\r\nimport { useCityDelete } from \"../../../data/listing/cities/hooks/useCityDelete\";\r\nimport { getCityEditLocation } from \"./Locations\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\n\r\nexport const useCityActions = (userAccessRights: AccessRights) => {\r\n const { getString } = useContext(LocalizationContext);\r\n const onShowCity = useViewCity();\r\n const onEditCity = useEditCityAction();\r\n\r\n return useMemo(() => {\r\n const result: Action[] = [\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"tableShow\"),\r\n onClick: (event, rowData) => onShowCity(rowData as City),\r\n },\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"tableEdit\"),\r\n onClick: (event, rowData) => onEditCity(rowData as City),\r\n hidden: userAccessRights===AccessRights.ReadOnly\r\n },\r\n ];\r\n\r\n return result;\r\n }, [onShowCity, onEditCity, getString]);\r\n};\r\n\r\nexport const useDeleteCityAction = () => {\r\n const [, deleteCity] = useCityDelete();\r\n return React.useCallback(\r\n async (city: City) => {\r\n if (city.cityId) {\r\n await deleteCity(city.cityId);\r\n }\r\n },\r\n [deleteCity]\r\n );\r\n};\r\n\r\nexport const useEditCityAction = () => {\r\n const history = useHistory();\r\n return React.useCallback(\r\n (city: City) =>\r\n history.push(getCityEditLocation(city.cityId)),\r\n [history]\r\n );\r\n};\r\n","import React from \"react\";\r\nimport { Table, TableDataProps } from \"../../components/common/Table\";\r\nimport { useCityData } from \"../../../data/listing/cities/hooks/useCityData\";\r\nimport { City } from \"../../../data/listing/cities/types\";\r\nimport { useCityColumns } from \"./useCityColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\nimport { useCityActions, useDeleteCityAction } from \"./useCityActions\";\r\n\r\nexport interface CitiesTableProps {\r\n\tuserAccessRights: AccessRights;\r\n}\r\n\r\ntype CityTablePropsType = CitiesTableProps & TableDataProps;\r\n\r\nexport const CitiesTable: React.FunctionComponent = ({\r\n\tuserAccessRights,\r\n\t...tableProps\r\n}) => {\r\n\tconst [data, loadAll] = useCityData();\r\n\r\n\tconst columns = useCityColumns();\r\n\tconst actions = useCityActions(userAccessRights);\r\n\tconst onDeleteCity = useDeleteCityAction();\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t{...tableProps}\r\n\t\t\tgetData={loadAll}\r\n\t\t\timmutableData={data}\r\n\t\t\ttitle=\"\"\r\n\t\t\tcolumns={columns}\r\n\t\t\tactions={actions}\r\n\t\t\toptions={{\r\n\t\t\t\ttoolbar: false,\r\n\t\t\t\tpageSize: 10,\r\n\t\t\t\tactionsColumnIndex: -1,\r\n\t\t\t}}\r\n\t\t\teditable={userAccessRights !== AccessRights.ReadOnly ? {\r\n\t\t\t\tonRowDelete: onDeleteCity,\r\n\t\t\t}: {}}\r\n\t\t/>\r\n\t);\r\n};\r\n\r\nexport default CitiesTable;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadAllCities } from \"../thunks/loadAllCities\";\r\nimport { City } from \"../types\";\r\n\r\nexport const useCityData = () => {\r\n\tconst data = useSelector(s => s.data.listing.cities.displayData);\r\n\tconst allData = useSelector(s => s.data.listing.cities.all);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchLoadAllCities = React.useCallback(() => dispatch(loadAllCities()), [dispatch]);\r\n\r\n\treturn [data, dispatchLoadAllCities, allData] as [\r\n\t\ttypeof data,\r\n\t\ttypeof dispatchLoadAllCities,\r\n\t\ttypeof allData\r\n\t];\r\n};\r\n\r\nexport const useCity = (id?: string) => {\r\n\tconst allData = useSelector(s => s.data.listing.cities.all);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchLoadAllCities = React.useCallback(() => dispatch(loadAllCities()), [dispatch]);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (!allData && id) {\r\n\t\t\tdispatchLoadAllCities();\r\n\t\t}\r\n\t}, [allData, id, dispatchLoadAllCities]);\r\n\r\n\tconst city = React.useMemo(() => {\r\n\t\tif (!allData) {\r\n\t\t\treturn undefined;\r\n\t\t} else {\r\n\t\t\treturn allData?.find(e => e.cityId === id);\r\n\t\t}\r\n\t}, [id, allData]);\r\n\r\n\treturn [city] as [typeof city];\r\n};\r\n","import { useContext, useMemo } from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\nimport { City } from \"../../../data/listing/cities/types\";\r\nimport React from \"react\";\r\nimport { DisplayBoolNumber } from \"../../components/common/DisplayBoolNumber\";\r\nimport { Status } from \"../../../data/models\";\r\n\r\nexport function useCityColumns() {\r\n const { getString } = useContext(LocalizationContext);\r\n return useMemo(\r\n () => [\r\n {\r\n title: getString(\"cityName\"),\r\n field: \"cityName\",\r\n },\r\n {\r\n title: getString(\"cityZipCode\"),\r\n field: \"zipCode\",\r\n },\r\n {\r\n title: getString(\"cityRegion\"),\r\n field: \"regionName\",\r\n },\r\n {\r\n\t\t\t\ttitle: getString(\"cityIsPort\"),\r\n\t\t\t\trender: city => ,\r\n\t\t\t\tcustomSort: (a, b) => a.isPort - b.isPort,\r\n\t\t\t\twidth: \"80px\",\r\n\t\t\t},\r\n ],\r\n [getString]\r\n ) as Column[];\r\n}\r\n","import { NavigationItem } from \"../../../core/navigation/types\";\r\nimport { EditCityPage } from \"./EditCityPage\";\r\nimport CityPage from \"./CitiesPage\";\r\nimport { citiesLocation, editRouter } from \"./Locations\";\r\nexport const cityComponents: NavigationItem[] = [\r\n\t{\r\n\t\tComponent: CityPage,\r\n\t\tisMenuItem: true,\r\n\t\tpath: citiesLocation,\r\n\t},\r\n\t{\r\n\t\tComponent: EditCityPage,\r\n\t\tisMenuItem: false,\r\n\t\tpath: editRouter,\r\n\t},\r\n];\r\n","import React from \"react\";\r\nimport {\r\n Grid,\r\n CardContent,\r\n CardHeader,\r\n Divider,\r\n Card,\r\n Fab,\r\n} from \"@material-ui/core\";\r\nimport CitiesTable from \"./CitiesTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { SearchBox } from \"../../components/common/SearchBox\";\r\nimport { PageComponent, AccessRights } from \"../../../core/navigation/types\";\r\nimport AddIcon from \"@material-ui/icons/Add\";\r\nimport { useCitySearch } from \"../../../data/listing/cities/hooks/useCitySearch\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { getCityEditLocation } from \"./Locations\";\r\n\r\nconst CitiesPage: PageComponent = ({ userAccessRights }) => {\r\n const pageStyles = usePageStyles();\r\n\r\n const [search, setSearch] = useCitySearch();\r\n const history = useHistory();\r\n\r\n return (\r\n \r\n \r\n \r\n }\r\n action={}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n {userAccessRights === AccessRights.All && (\r\n history.push(getCityEditLocation())}\r\n >\r\n \r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default CitiesPage;\r\n","import { setSearchTerm } from \"../citiesDataReducer\";\r\nimport { useSearch } from \"../../../../core/util/storeHooks\";\r\n\r\nexport const useCitySearch = () => useSearch(s => s.data.listing.cities.searchTerm, setSearchTerm);\r\n","import React from \"react\";\r\nimport { useEditCityState } from \"../../../data/listing/cities/hooks/useEditCityState\";\r\nimport { useCityValidator } from \"../../../data/listing/cities/hooks/useCityValidator\";\r\nimport { useCityUpsert } from \"../../../data/listing/cities/hooks/useCityUpsert\";\r\nimport { RouteComponentProps, useHistory } from \"react-router-dom\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport {\r\n Card,\r\n Grid,\r\n CardHeader,\r\n Divider,\r\n CardContent,\r\n} from \"@material-ui/core\";\r\nimport { FabSave } from \"../../components/common/FabSave\";\r\nimport { City } from \"../../../data/listing/cities/types\";\r\nimport { StringInput } from \"../../components/common/StringInput\";\r\nimport { LeavePrompt } from \"../../components/common/LeavePrompt\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { citiesLocation } from \"./Locations\";\r\nimport { RegionSelect } from \"../../components/common/RegionSelect\";\r\nimport { Region } from \"../../../data/models\";\r\nimport { BoolInput } from \"../../components/common/BoolInput\";\r\nimport { Status } from \"../../../data/models\";\r\n\r\nexport interface EditCityInfo {\r\n cityId?: string;\r\n}\r\n\r\nexport interface EditCityProps extends RouteComponentProps {}\r\n\r\nexport const EditCityPage: React.FunctionComponent = (props) => {\r\n const { getString } = React.useContext(LocalizationContext);\r\n const pageStyles = usePageStyles();\r\n\r\n const [city, editCity, changed] = useEditCityState(props.match.params.cityId);\r\n const [validationState, validate] = useCityValidator();\r\n const [fetchState, upsert] = useCityUpsert();\r\n const history = useHistory();\r\n\r\n const unsavedChanges = fetchState.type === \"not-started\" && changed;\r\n\r\n const handleChange = React.useCallback(\r\n (event: React.ChangeEvent) => {\r\n editCity(event.target.name as any, event.target.value);\r\n },\r\n [editCity]\r\n );\r\n\r\n const changeRegion = React.useCallback(\r\n (region: Region | null) => {\r\n editCity(\"regionId\", region ? region.regId : \"\");\r\n },\r\n [editCity]\r\n );\r\n\r\n const save = React.useCallback(() => {\r\n if (fetchState.type === \"successful\") {\r\n history.push(citiesLocation);\r\n } else if (fetchState.type !== \"started\") {\r\n const normalized = validate(city);\r\n if (normalized) {\r\n upsert(normalized);\r\n }\r\n }\r\n }, [city, validate, fetchState, history, upsert]);\r\n\r\n const pageTitle = city && city.cityId ? \"cityEdit\" : \"cityCreate\";\r\n\r\n if (!city) {\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 property=\"cityName\"\r\n item={city}\r\n validationState={validationState}\r\n onChange={handleChange}\r\n label={getString(\"cityName\")}\r\n />\r\n \r\n \r\n \r\n property=\"zipCode\"\r\n item={city}\r\n validationState={validationState}\r\n onChange={handleChange}\r\n label={getString(\"cityZipCode\")}\r\n />\r\n \r\n \r\n \r\n \r\n region.regId === city.regionId}\r\n onChangeItem={changeRegion}\r\n\t\t\t\t\t\t\t\t\trequired={validationState.regionId !== undefined}\r\n\t\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\t\tvalidationState.regionId !== undefined &&\r\n\t\t\t\t\t\t\t\t\t\t!validationState.regionId\r\n\t\t\t\t\t\t\t\t\t} />\r\n \r\n \r\n \r\n\r\n \r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tproperty=\"isPort\"\r\n\t\t\t\t\t\t\t\t\t\titem={city}\r\n\t\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\t\tfalsyValue={Status.Inactive}\r\n\t\t\t\t\t\t\t\t\t\tthrutyValue={Status.Active}\r\n\t\t\t\t\t\t\t\t\t\tlabel={getString(\"cityIsPort\")}\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 \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { ClientListData } from \"../types\";\r\n\r\nexport const getAllClientsWebApi = (userId: string) =>\r\n\twebApi({\r\n\t\tmethod: \"GET\",\r\n\t\turl: \"listing/getclilist\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t},\r\n\t});\r\n\r\nexport default getAllClientsWebApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadAllClients } from \"../thunks/loadAllClients\";\r\nimport { ClientListData } from \"../types\";\r\n\r\nexport const useClientData = () => {\r\n\tconst data = useSelector(\r\n\t\ts => s.data.listing.clients.displayData\r\n\t);\r\n\tconst allData = useSelector(s => s.data.listing.clients.all);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchLoadAllClients = React.useCallback(() => dispatch(loadAllClients()), [dispatch]);\r\n\r\n\treturn [data, dispatchLoadAllClients, allData] as [\r\n\t\ttypeof data,\r\n\t\ttypeof dispatchLoadAllClients,\r\n\t\ttypeof allData\r\n\t];\r\n};\r\n\r\nexport const useClientSelector = (selector: (client: ClientListData) => boolean) => {\r\n\tconst [, loadAllClients, data] = useClientData()\r\n\r\n\tconst [client, setClient] = React.useState();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (!data) {\r\n\t\t\tloadAllClients()\r\n\t\t}\r\n\t}, [data, loadAllClients])\r\n\r\n\tReact.useEffect(() => {\r\n\t\tsetClient(data?.find(selector))\r\n\t}, [selector, data]);\r\n\r\n\treturn [client];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getAllClientsAPI from \"../api/getAllClients\";\r\nimport { setClients } from \"../clientsDataReducer\";\r\n\r\nexport const loadAllClients = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setClients());\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst clients = await dispatch(getAllClientsAPI(userId));\r\n\r\n\tdispatch(setClients(clients || []));\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { Client } from \"../types\";\r\n\r\nexport const getClientApi = (userId: string, cliid: string) =>\r\n\twebApi({\r\n\t\tmethod: \"GET\",\r\n\t\turl: \"listing/getclient\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t\tcliid\r\n\t\t},\r\n\t});\r\n\r\nexport default getClientApi;\r\n","import React from \"react\";\r\nimport { useDisplayClient } from \"../../../data/listing/clients/hooks/useDisplayClient\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { ClientListData } from \"../../../data/listing/clients/types\";\r\nimport { DisplayClientBasicInfo } from \"./DisplayClientBasicInfo\";\r\nimport { DisplayPersons } from \"./clientPersons/DisplayClientPersons\";\r\nimport { ExpansionPanel, ExpansionPanelSummary, Typography, Grid } from \"@material-ui/core\";\r\nimport ExpandMoreIcon from \"@material-ui/icons/ExpandMore\";\r\nimport { useToggleStateDictionary } from \"../../../core/util/hooks\";\r\nimport { DisplayClientBrokers } from \"./clientBrokers/DisplayClientBrokers\";\r\nimport { DisplayClientContracts } from \"./clientContracts/DisplayClientContracts\";\r\nimport { DisplayClientAccounts } from \"./clientAccounts/DisplayClientAccounts\";\r\n\r\nenum AccordionNames {\r\n\tBasicInfo = \"basicInfo\",\r\n\tPersons = \"persons\",\r\n\tBrokers = \"brokers\",\r\n\tContracts = \"contracts\",\r\n\tAccounts = \"accounts\",\r\n}\r\n\r\nconst accordionNames = Object.values(AccordionNames);\r\n\r\nexport interface DisplayEmployeeProps {\r\n\tid?: string;\r\n}\r\n\r\nexport const DisplayClient: React.FunctionComponent = ({ id }) => {\r\n\tconst client = useDisplayClient(id);\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\tconst [open, toggleOpen] = useToggleStateDictionary(accordionNames, [AccordionNames.BasicInfo]);\r\n\r\n\treturn !client || !client.cliId ? (\r\n\t\t<>{\"loading placeholder\"}\r\n\t) : (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t}>\r\n\t\t\t\t\t{getString(\"tableBasciInfo\")}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t}>\r\n\t\t\t\t\t{getString(\"clientPersonTitle\")}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t}>\r\n\t\t\t\t\t{getString(\"clientBrokerTitle\")}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t}>\r\n\t\t\t\t\t{getString(\"contractTitle\")}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t}>\r\n\t\t\t\t\t{getString(\"accountTitle\")}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport const useViewClient = () => {\r\n\tconst showWithDrawer = React.useContext(DisplayDrawerContext);\r\n\treturn React.useCallback(\r\n\t\t(client: ClientListData) => showWithDrawer(),\r\n\t\t[showWithDrawer]\r\n\t);\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getClientApi from \"../api/getClient\";\r\nimport { setDisplayedClient } from \"../clientsDataReducer\";\r\nimport { Client } from \"../types\"\r\n\r\nexport const loadClient = (clientId: string): ThunkType => async (dispatch, getStore) => {\r\n\tdispatch(setDisplayedClient());\r\n\r\n\tconst client = await dispatch(getClient(clientId));\r\n\r\n\tdispatch(setDisplayedClient(client));\r\n};\r\n\r\nexport const getClient = (clientId: string): ThunkType> => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\treturn await dispatch(getClientApi(userId, clientId));\r\n}\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { Client } from \"../types\";\r\nimport { loadClient } from \"../thunks/loadClient\";\r\n\r\nexport const useDisplayClient = (cliId?: string) => {\r\n\tconst storeClient = useSelector(\r\n\t\tstore => store.data.listing.clients.displayedClient\r\n );\r\n\r\n const displayedEmployee = storeClient && storeClient.cliId === cliId ? storeClient : undefined;\r\n\r\n const displatch = useDispatch();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (cliId) {\r\n\t\t\tdisplatch(loadClient(cliId));\r\n\t\t}\r\n }, [displatch, cliId]);\r\n\r\n\treturn displayedEmployee;\r\n};\r\n","import React from \"react\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { StoreType } from \"../../../core/store/reducers\";\r\nimport { ClientType } from \"../../models\";\r\n\r\nconst getTypeLabel = (type?: ClientType) => (type ? type.ftDescr : \"\");\r\n\r\nexport const useClientTypes = () => {\r\n\tconst cities = useSelector(store => store.data.initialData.clientTypes);\r\n\r\n\treturn [cities, getTypeLabel] as [typeof cities, typeof getTypeLabel];\r\n};\r\n\r\nexport const useClientType = (typeId?: number) => {\r\n\tconst [cities] = useClientTypes();\r\n\r\n\tconst type = React.useMemo(() => cities.find(c => c.ftValue === typeId), [cities, typeId]);\r\n\tconst typeLabel = React.useMemo(() => getTypeLabel(type), [type]);\r\n\r\n\treturn [type, typeLabel] as [typeof type, typeof typeLabel];\r\n};\r\n","import React from \"react\";\r\nimport {\r\n\tClient,\r\n\tClientHeadquaters,\r\n\tClientActive,\r\n\tClientHasContract,\r\n} from \"../../../data/listing/clients/types\";\r\nimport { useDisplaySingleEmementStyles } from \"../../useDisplaySingleEmementStyles\";\r\nimport { DisplayBoolNumber } from \"../../components/common/DisplayBoolNumber\";\r\nimport { useClientType } from \"../../../data/initialData/hooks/useClientTypes\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Status } from \"../../../data/models\";\r\n\r\nexport interface DisplayClientBasicInfoProps {\r\n\tclient: Client;\r\n}\r\n\r\nexport const DisplayClientBasicInfo: React.FunctionComponent = ({ client }) => {\r\n\tconst style = useDisplaySingleEmementStyles();\r\n\tconst { getString, getDateString } = React.useContext(LocalizationContext);\r\n\tconst [, typeLabel] = useClientType(client?.cliType);\r\n\r\n\treturn (\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"cliName\")}\r\n\t\t\t\t{client.cliName}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"clilFullName\")}\r\n\t\t\t\t{client.fullName}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"cliIdNo\")}\r\n\t\t\t\t{client.cliIdNo}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"cliType\")}\r\n\t\t\t\t{typeLabel}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"cliTaxCode\")}\r\n\t\t\t\t{client.taxCode}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"clijbkjs\")}\r\n\t\t\t\t{client.cliJBKJS}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"cliForeign\")}\r\n\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\t
\r\n\t\t\t\t{getString(\"cliCity\")}\r\n\t\t\t\t{client.city}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"cliAddress\")}\r\n\t\t\t\t{client.address}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"cliMailCity\")}\r\n\t\t\t\t{client.mailCity}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"cliMailAddress\")}\r\n\t\t\t\t{client.mailAddress}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"cliPhone\")}\r\n\t\t\t\t{client.phone}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"cliMobile\")}\r\n\t\t\t\t{client.mobile}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"cliFax\")}\r\n\t\t\t\t{client.fax}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"cliEmail\")}\r\n\t\t\t\t{client.email}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"cliHasContract\")}\r\n\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\t
\r\n\t\t\t\t{getString(\"cliStatus\")}\r\n\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\t
\r\n\t\t\t\t{getString(\"cliActive\")}\r\n\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\t
\r\n\t\t\t\t{getString(\"cliActiveFrom\")}\r\n\t\t\t\t{client.activeFrom && getDateString(client.activeFrom)}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"cliActiveTo\")}\r\n\t\t\t\t{client.activeTo && getDateString(client.activeTo)}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"cliComment\")}\r\n\t\t\t\t{client.comment}\r\n\t\t\t
\r\n\t\t
\r\n\t);\r\n};\r\n","import { webApi } from \"../../../../../core/http/httpThunks\";\r\nimport { ClientPerson } from \"../../types\";\r\n\r\nexport const getClientPersonApi = (userId: string, cliid: string) =>\r\n\twebApi({\r\n\t\tmethod: \"GET\",\r\n\t\turl: \"listing/getcliprslist\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t\tcliid\r\n\t\t},\r\n\t});\r\n\r\nexport default getClientPersonApi;\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport getAllClientPersons from \"../../api/clientPerson/getAllClientPersons\";\r\nimport { ClientPerson } from \"../../types\";\r\n\r\nexport const getClientPersons = (clientId: string): ThunkType> => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\treturn await dispatch(getAllClientPersons(userId, clientId));\r\n}\r\n","import React from \"react\";\r\nimport { useDispatch } from \"react-redux\";\r\nimport { ClientPerson } from \"../../types\";\r\nimport { getClientPersons } from \"../../thunks/clientPerson/loadClientPersons\";\r\n\r\nexport const useClientPersons = (clientId?: string) => {\r\n\tconst displatch = useDispatch();\r\n\tconst [clientPersons, setClientPersons] = React.useState();\r\n\r\n\tconst loadClientPersons = React.useCallback(async () => {\r\n\t\tif (clientId) {\r\n\t\t\tconst loadedClientBroker = (await displatch(getClientPersons(clientId))) as any;\r\n\t\t\tsetClientPersons(loadedClientBroker || []);\r\n\t\t}\r\n\t}, [displatch, clientId]);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tloadClientPersons();\r\n\t}, [loadClientPersons]);\r\n\r\n\treturn [clientPersons, loadClientPersons] as [typeof clientPersons, typeof loadClientPersons];\r\n};\r\n","import React from \"react\";\r\nimport { ClientPerson } from \"../../../../data/listing/clients/types\";\r\nimport { useDisplaySingleEmementStyles } from \"../../../useDisplaySingleEmementStyles\";\r\nimport { DisplayBoolNumber } from \"../../../components/common/DisplayBoolNumber\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { useClientPersons } from \"../../../../data/listing/clients/hooks/clientPerson/useClientPersons\";\r\nimport {\r\n\tTableContainer,\r\n\tTable,\r\n\tTableHead,\r\n\tTableCell,\r\n\tTableRow,\r\n\tPaper,\r\n\tTableBody,\r\n\tTypography,\r\n\tGrid,\r\n} from \"@material-ui/core\";\r\nimport { Status } from \"../../../../data/models\";\r\n\r\nexport interface DisplayClientPersonsProps {\r\n\tclientId: string;\r\n}\r\n\r\nexport const DisplayPersons: React.FunctionComponent = ({ clientId }) => {\r\n\tconst style = useDisplaySingleEmementStyles();\r\n\tconst [persons] = useClientPersons(clientId);\r\n\r\n\treturn (\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t{persons ? : \"loading placeholder\"}\r\n\t\t\t
\r\n\t\t
\r\n\t);\r\n};\r\n\r\ninterface ClientPersonDisplayTableProps {\r\n\tpersons: ClientPerson[];\r\n}\r\n\r\nconst ClientPersonDisplayTable: React.FunctionComponent = ({ persons }) => {\r\n\tconst style = useDisplaySingleEmementStyles();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\tif (persons.length === 0) {\r\n\t\treturn (\r\n\t\t\t\r\n\t\t\t\t{getString(\"clientPersonEmpty\")}\r\n\t\t\t\r\n\t\t);\r\n\t}\r\n\r\n\treturn (\r\n\t\t\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\t{getString(\"clientPersonName\")}\r\n{/*\t\t\t\t\t\t{getString(\"clientPersonIDNumber\")} */}\r\n\t\t\t\t\t\t{getString(\"clientPersonRole\")}\r\n\t\t\t\t\t\t{getString(\"clientPersonPhone\")}\r\n{/*\t\t\t\t\t\t{getString(\"clientPersonEmail\")} */}\r\n\t\t\t\t\t\t{getString(\"clientPersonStatus\")}\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t{persons.map(person => (\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t{person.cliPrsName}\r\n{/*\t\t\t\t\t\t\t{person.cliPrsIdNo} */}\r\n\t\t\t\t\t\t\t{person.cliPrsRoleName}\r\n\t\t\t\t\t\t\t{person.phone}\r\n{/*\t\t\t\t\t\t\t{person.email} */}\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\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};\r\n","import { webApi } from \"../../../../../core/http/httpThunks\";\r\nimport { ClientBroker } from \"../../types\";\r\n\r\nexport const getAllClientBrokers = (userId: string, cliid: string) =>\r\n\twebApi({\r\n\t\tmethod: \"GET\",\r\n\t\turl: \"listing/getclibroklist\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t\tcliid\r\n\t\t},\r\n\t});\r\n\r\nexport default getAllClientBrokers;\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport getAllClientBrokers from \"../../api/clientBroker/getAllClientBrokers\";\r\nimport { ClientBroker } from \"../../types\";\r\n\r\nexport const getClientBrokers = (clientId: string): ThunkType> => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\treturn await dispatch(getAllClientBrokers(userId, clientId));\r\n}\r\n","import React from \"react\";\r\nimport { useDispatch } from \"react-redux\";\r\nimport { ClientBroker } from \"../../types\";\r\nimport { getClientBrokers } from \"../../thunks/clientBroker/loadClientBrokers\";\r\n\r\nexport const useClientBrokers = (clientId?: string) => {\r\n\tconst displatch = useDispatch();\r\n\tconst [clientBrokers, setClientBrokers] = React.useState();\r\n\r\n\tconst loadClientBrokers = React.useCallback(async () => {\r\n\t\tif (clientId) {\r\n\t\t\tconst loadedClientBroker = (await displatch(getClientBrokers(clientId))) as any;\r\n\t\t\tsetClientBrokers(loadedClientBroker || []);\r\n\t\t}\r\n\t}, [displatch, clientId])\r\n\r\n\tReact.useEffect(() => {\r\n\t\tloadClientBrokers();\r\n\t}, [loadClientBrokers]);\r\n\r\n\treturn [clientBrokers, loadClientBrokers] as [typeof clientBrokers, typeof loadClientBrokers]\r\n};\r\n","import React from \"react\";\r\nimport { ClientBroker } from \"../../../../data/listing/clients/types\";\r\nimport { useDisplaySingleEmementStyles } from \"../../../useDisplaySingleEmementStyles\";\r\nimport { DisplayBoolNumber } from \"../../../components/common/DisplayBoolNumber\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { useClientBrokers } from \"../../../../data/listing/clients/hooks/clientBroker/useClientBrokers\";\r\nimport {\r\n\tTableContainer,\r\n\tTable,\r\n\tTableHead,\r\n\tTableCell,\r\n\tTableRow,\r\n\tPaper,\r\n\tTableBody,\r\n\tTypography,\r\n\tGrid,\r\n} from \"@material-ui/core\";\r\nimport { Status } from \"../../../../data/models\";\r\n\r\nexport interface DisplayClientBrokersProps {\r\n\tclientId: string;\r\n}\r\n\r\nexport const DisplayClientBrokers: React.FunctionComponent = ({ clientId }) => {\r\n\tconst style = useDisplaySingleEmementStyles();\r\n\tconst [brokers] = useClientBrokers(clientId);\r\n\r\n\treturn (\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t{brokers ? : \"loading placeholder\"}\r\n\t\t\t
\r\n\t\t
\r\n\t);\r\n};\r\n\r\ninterface ClientBrokersDisplayTableProps {\r\n\tbrokers: ClientBroker[];\r\n}\r\n\r\nconst ClientBrokersDisplayTable: React.FunctionComponent = ({ brokers: persons }) => {\r\n\tconst style = useDisplaySingleEmementStyles();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\tif (persons.length === 0) {\r\n\t\treturn (\r\n\t\t\t\r\n\t\t\t\t{getString(\"clientBrokerEmpty\")}\r\n\t\t\t\r\n\t\t);\r\n\t}\r\n\r\n\treturn (\r\n\t\t\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\t{getString(\"clientBrokerName\")}\r\n\t\t\t\t\t\t{getString(\"clientBrokerIDNumber\")}\r\n\t\t\t\t\t\t{getString(\"clientBrokerStatus\")}\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t{persons.map(broker => (\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t{broker.brokName}\r\n\t\t\t\t\t\t\t{broker.brokIdNo}\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\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};\r\n","import { webApi } from \"../../../../../core/http/httpThunks\";\r\nimport { ClientContractList } from \"../../types\";\r\n\r\nexport const getClientContractsApi = (userId: string, cliid: string) =>\r\n\twebApi({\r\n\t\tmethod: \"GET\",\r\n\t\turl: \"listing/getclicontrlist\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t\tcliid\r\n\t\t},\r\n\t});\r\n\r\nexport default getClientContractsApi;\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport getAllClientContracts from \"../../api/clientContract/getAllClientContracts\";\r\nimport { ClientContractList } from \"../../types\";\r\n\r\nexport const getClientContracts = (clientId: string): ThunkType> => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\treturn await dispatch(getAllClientContracts(userId, clientId));\r\n}\r\n","import React from \"react\";\r\nimport { useDispatch } from \"react-redux\";\r\nimport { ClientContractList } from \"../../types\";\r\nimport { getClientContracts } from \"../../thunks/clientContract/loadClientContracts\";\r\n\r\nexport const useClientContracts = (clientId?: string) => {\r\n\tconst displatch = useDispatch();\r\n\tconst [contracts, setContracts] = React.useState();\r\n\r\n\tconst loadClientContracts = React.useCallback(async () => {\r\n\t\tif (clientId) {\r\n\t\t\tconst loadedContracts = (await displatch(getClientContracts(clientId))) as any;\r\n\t\t\tsetContracts(loadedContracts || []);\r\n\t\t}\r\n\t}, [displatch, clientId])\r\n\r\n\tReact.useEffect(() => {\r\n\t\tloadClientContracts();\r\n\t}, [loadClientContracts]);\r\n\r\n\treturn [contracts, loadClientContracts] as [typeof contracts, typeof loadClientContracts]\r\n};\r\n","import React from \"react\";\r\nimport { ClientContractList } from \"../../../../data/listing/clients/types\";\r\nimport { useDisplaySingleEmementStyles } from \"../../../useDisplaySingleEmementStyles\";\r\nimport { DisplayBoolNumber } from \"../../../components/common/DisplayBoolNumber\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { useClientContracts } from \"../../../../data/listing/clients/hooks/clientContract/useClientContracts\";\r\nimport {\r\n\tTableContainer,\r\n\tTable,\r\n\tTableHead,\r\n\tTableCell,\r\n\tTableRow,\r\n\tPaper,\r\n\tTableBody,\r\n\tTypography,\r\n\tGrid,\r\n} from \"@material-ui/core\";\r\nimport { Status } from \"../../../../data/models\";\r\n\r\nexport interface DisplayClientBrokersProps {\r\n\tclientId: string;\r\n}\r\n\r\nexport const DisplayClientContracts: React.FunctionComponent = ({ clientId }) => {\r\n\tconst style = useDisplaySingleEmementStyles();\r\n\tconst [contracts] = useClientContracts(clientId);\r\n\r\n\treturn (\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t{contracts ? : \"loading placeholder\"}\r\n\t\t\t
\r\n\t\t
\r\n\t);\r\n};\r\n\r\ninterface ClientContractsDisplayTableProps {\r\n\tcontracts: ClientContractList[];\r\n}\r\n\r\nconst ClientContractsDisplayTable: React.FunctionComponent = ({ contracts }) => {\r\n\tconst style = useDisplaySingleEmementStyles();\r\n\tconst { getString, getDateString } = React.useContext(LocalizationContext);\r\n\r\n\tif (contracts.length === 0) {\r\n\t\treturn (\r\n\t\t\t\r\n\t\t\t\t{getString(\"contractEmpty\")}\r\n\t\t\t\r\n\t\t);\r\n\t}\r\n\r\n\treturn (\r\n\t\t\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\t{getString(\"contractNumber\")}\r\n\t\t\t\t\t\t{getString(\"contractDate\")}\r\n\t\t\t\t\t\t{getString(\"contractStatus\")}\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t{contracts.map(contract => (\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t{contract.contrNo}\r\n\t\t\t\t\t\t\t{getDateString(contract.contrDate)}\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\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};\r\n","import { webApi } from \"../../../../../core/http/httpThunks\";\r\nimport { ClientAccountList } from \"../../types\";\r\n\r\nexport const getClientAccountsApi = (userId: string, cliid: string) =>\r\n\twebApi({\r\n\t\tmethod: \"GET\",\r\n\t\turl: \"listing/getclimonacclist\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t\tcliid\r\n\t\t},\r\n\t});\r\n\r\nexport default getClientAccountsApi;\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport getAllClientAccounts from \"../../api/clientAccount/getAllClientAccounts\";\r\nimport { ClientAccountList } from \"../../types\";\r\n\r\nexport const getClientAccounts = (clientId: string): ThunkType> => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\treturn await dispatch(getAllClientAccounts(userId, clientId));\r\n}\r\n","import React from \"react\";\r\nimport { useDispatch } from \"react-redux\";\r\nimport { ClientAccountList } from \"../../types\";\r\nimport { getClientAccounts } from \"../../thunks/clientAccount/loadClientAccounts\";\r\n\r\nexport const useClientAccounts = (clientId?: string) => {\r\n\tconst displatch = useDispatch();\r\n\tconst [accounts, setAccounts] = React.useState();\r\n\r\n\tconst loadClientAccounts = React.useCallback(async () => {\r\n\t\tif (clientId) {\r\n\t\t\tconst loadedAccounts = (await displatch(getClientAccounts(clientId))) as any;\r\n\t\t\tsetAccounts(loadedAccounts || []);\r\n\t\t}\r\n\t}, [displatch, clientId])\r\n\r\n\tReact.useEffect(() => {\r\n\t\tloadClientAccounts();\r\n\t}, [loadClientAccounts]);\r\n\r\n\treturn [accounts, loadClientAccounts] as [typeof accounts, typeof loadClientAccounts]\r\n};\r\n","import React from \"react\";\r\nimport { AccountOrderSide } from \"../../types\";\r\nimport { LocalizationContext } from \"../../../../../core/localization/Localization\";\r\nimport { exhaustiveCheck } from \"../../../../../core/util/functions\";\r\n\r\nexport const useClientAccountSideTranslator = () => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\treturn React.useCallback(\r\n\t\t(side: AccountOrderSide) => {\r\n\t\t\tswitch (side) {\r\n\t\t\t\tcase AccountOrderSide.Both:\r\n\t\t\t\t\treturn getString(\"accountSideBoth\");\r\n\t\t\t\tcase AccountOrderSide.Buy:\r\n\t\t\t\t\treturn getString(\"accountSideBuy\");\r\n\t\t\t\tcase AccountOrderSide.Sell:\r\n\t\t\t\t\treturn getString(\"accountSideSell\");\r\n\t\t\t\tdefault:\r\n\t\t\t\t\texhaustiveCheck(side);\r\n\t\t\t}\r\n\t\t},\r\n\t\t[getString]\r\n\t);\r\n};\r\n\r\ninterface AccountOrderSideOption {\r\n\tlabel: string;\r\n\tvalue: AccountOrderSide;\r\n}\r\n\r\nexport const useClientAccountSideOptions = (): AccountOrderSideOption[] => {\r\n\tconst translator = useClientAccountSideTranslator();\r\n\treturn React.useMemo(\r\n\t\t() => [\r\n\t\t\t{\r\n\t\t\t\tlabel: translator(AccountOrderSide.Both) as string,\r\n\t\t\t\tvalue: AccountOrderSide.Both,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tlabel: translator(AccountOrderSide.Buy) as string,\r\n\t\t\t\tvalue: AccountOrderSide.Buy,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tlabel: translator(AccountOrderSide.Sell) as string,\r\n\t\t\t\tvalue: AccountOrderSide.Sell,\r\n\t\t\t},\r\n\t\t],\r\n\t\t[translator]\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport { ClientAccountList } from \"../../../../data/listing/clients/types\";\r\nimport { useDisplaySingleEmementStyles } from \"../../../useDisplaySingleEmementStyles\";\r\nimport { DisplayBoolNumber } from \"../../../components/common/DisplayBoolNumber\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { useClientAccounts } from \"../../../../data/listing/clients/hooks/clientAccount/useClientAccounts\";\r\nimport { useClientAccountSideTranslator } from \"../../../../data/listing/clients/hooks/clientAccount/useClientAccountSide\";\r\nimport {\r\n\tTableContainer,\r\n\tTable,\r\n\tTableHead,\r\n\tTableCell,\r\n\tTableRow,\r\n\tPaper,\r\n\tTableBody,\r\n\tTypography,\r\n\tGrid,\r\n} from \"@material-ui/core\";\r\nimport { Status } from \"../../../../data/models\";\r\n\r\nexport interface DisplayClientBrokersProps {\r\n\tclientId: string;\r\n}\r\n\r\nexport const DisplayClientAccounts: React.FunctionComponent = ({ clientId }) => {\r\n\tconst style = useDisplaySingleEmementStyles();\r\n\tconst [accounts] = useClientAccounts(clientId);\r\n\r\n\treturn (\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t{accounts ? : \"loading placeholder\"}\r\n\t\t\t
\r\n\t\t
\r\n\t);\r\n};\r\n\r\ninterface ClientAccountsDisplayTableProps {\r\n\taccounts: ClientAccountList[];\r\n}\r\n\r\nconst ClientAccountsDisplayTable: React.FunctionComponent = ({\r\n\taccounts,\r\n}) => {\r\n\tconst style = useDisplaySingleEmementStyles();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst sideTranslator = useClientAccountSideTranslator();\r\n\r\n\tif (accounts.length === 0) {\r\n\t\treturn (\r\n\t\t\t\r\n\t\t\t\t{getString(\"accountEmpty\")}\r\n\t\t\t\r\n\t\t);\r\n\t}\r\n\r\n\treturn (\r\n\t\t\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\t{getString(\"accountNumber\")}\r\n\t\t\t\t\t\t{getString(\"accountCurrency\")}\r\n\t\t\t\t\t\t{getString(\"accountForBuySell\")}\r\n\t\t\t\t\t\t{getString(\"accountStatus\")}\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t{accounts.map(account => (\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t{account.account}\r\n\t\t\t\t\t\t\t{account.currCode}\r\n\t\t\t\t\t\t\t{sideTranslator(account.forBuySell)}\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\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};\r\n","import { getEditLocation } from \"../../../core/util/functions\";\r\n\r\nexport enum ClientEditParts {\r\n\tBasicInfo = \"basicinfo\",\r\n\tPersons = \"persons\",\r\n\tBrokers = \"brokers\",\r\n\tContracts = \"contracts\",\r\n\tAccounts = \"accounts\",\r\n}\r\n\r\nexport const clientsLocation = \"/listing/members\";\r\n\r\nexport const getClientsEditLocation = (\r\n\tpart: ClientEditParts = ClientEditParts.BasicInfo,\r\n\tproductId?: string,\r\n\tattributeId?: string\r\n) => getEditLocation(clientsLocation, part, productId, attributeId);\r\n\r\nexport const basicInfoEdit = getClientsEditLocation(\":editPart\" as any, \":clientId?\");\r\nexport const personsEdit = getClientsEditLocation(ClientEditParts.Persons, \":clientId\", \":personId?\");\r\nexport const brokersEdit = getClientsEditLocation(ClientEditParts.Brokers, \":clientId\", \":brokerId?\");\r\nexport const contractsEdit = getClientsEditLocation(ClientEditParts.Contracts, \":clientId\", \":contactId?\");\r\nexport const accountEdit = getClientsEditLocation(ClientEditParts.Accounts, \":clientId\", \":accountId?\");\r\n","//import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const deleteClientApi = (userId: string, cliid: string, errorExceptions: string[]) =>\r\n\twebApiWithResponse({\r\n\t\tmethod: \"DELETE\",\r\n\t\turl: \"listing/delclient\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t\tcliid\r\n\t\t},\r\n\t}, undefined, errorExceptions);\r\n\r\n\r\nexport default deleteClientApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { deleteClient } from \"../thunks/deleteClient\";\r\nimport { setFetchStateClient } from \"../clientsDataReducer\";\r\nimport { setDeleteFetchState } from \"../clientsDataReducer\";\r\n\r\nexport const useClientDelete = () => {\r\n\tconst fetchState = useSelector(\r\n\t\tstore => store.data.listing.clients.deleteFetchState\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchDeleteEmployee = React.useCallback(\r\n\t\t(id: string) => dispatch(deleteClient(id)),\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tdispatch(setDeleteFetchState({ type: \"not-started\" }))\r\n\t}, [dispatch])\r\n\r\n\tconst resetState = React.useCallback(() => dispatch(setDeleteFetchState({ type: \"not-started\" })), [\r\n\t\tdispatch,\r\n\t]);\r\n\r\n\t\r\n\treturn [fetchState, dispatchDeleteEmployee, resetState] as [typeof fetchState, typeof dispatchDeleteEmployee, typeof resetState]\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport deleteClientApi from \"../api/deleteClient\";\r\nimport { setFetchStateClient, setDeleteFetchState } from \"../clientsDataReducer\";\r\nimport { ErrorCodeExceptions } from \"../types\";\r\n\r\nexport const deleteClient = (empId: string): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n//\tdispatch(setFetchStateClient({ type: \"started\" }));\r\n\tdispatch(setDeleteFetchState({ type: \"started\" }));\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst result = await dispatch(deleteClientApi(userId, empId,[ErrorCodeExceptions.ReferenceErrorCode]));\r\n\r\n//\tdispatch(setFetchStateClient(result !== undefined ? { type: \"successful\" } : { type: \"error\"}));\r\n\r\n\tdispatch(\r\n\t\tsetDeleteFetchState(\r\n\t\t\tresult !== undefined && result.resCode === \"OK\"\r\n\t\t\t\t? { type: \"successful\" }\r\n\t\t\t\t: { type: \"error\", errorCode: result && result.resCode }\r\n\t\t)\r\n\t);\r\n\r\n\r\n};\r\n","import { ValidationState } from \"../../../core/util/types\";\r\n\r\nexport interface Commission {\r\n\tcommId?: string; // \t\tPK\r\n\tcommCode: string; // \t\tsifra klase provizije\r\n\tcommName: string; // \t\tnaziv klase\r\n\tcommNameEn?: string; // \t\tnaziv EN\r\n\tcommType?: number; // \t\ttip provizije (def 0 = berza)\r\n\tcommTypeName?: string; // \tnaziv tipa\r\n\tisStandard: CommissionStandard; //\r\n}\r\n\r\nexport enum CommissionStandard {\r\n\tTrue = 1,\r\n\tFalse = 0,\r\n}\r\n\r\nexport interface CommissionDetail {\r\n\tcommDetId?: string; // \t\tPK\r\n\tcommId: string; // \t\tID klase provizije\r\n\tfromDate?: Date; // \t\tvazi od datuma\r\n\tjobType: 0; // \t\tvrsta posla (FFU - za sada samo 0)\r\n\tclientType: 0; // \t\ttip klijenta (FFU - 0)\r\n\tclientId: undefined; // \t\tID klijenta (FFU - null)\r\n\tprodGroupId?: string; // \t\tID grupe proizvoda za koju vazi provizija\r\n\tprodGroupName?: string; // \tnaziv grupe\r\n\tprodId?: string; // \t\tID proizvoda za koji vazi provizija\r\n\tprodName?: string; // \t\tnaziv proizvoda\r\n\t// - grupa i proizvod se unose jedan ili nijedan\r\n\tcurrId?: string; // \tID valute za koju vazi provizija i u kojoj se iskazuje\r\n\tcurrCode?: string; // \t\tsifra valute\r\n\tamtCurrId?: string; // \t\tID valute iznosa\r\n\tpercAmtBuy: CommissionAmountType; // \t\tprovizija kupovina %/iznos (0/1 def 0)\r\n\tpercBuy?: number; // \t\t% provizije za kupovinu\r\n\tminAmtBuy?: number; // \t\tmin iznos provizije za kupovinu ili iznos provizije ako je PercAmtBuy=1. Iznos je u valuti AmtCurrId\r\n\tmaxAmtBuy?: number; // \t\tmax iznos provizije\r\n\tpercAmtSell: CommissionAmountType; // \t\tisto sve, samo za prodaju\r\n\tpercSell?: number; // \t\t-\r\n\tminAmtSell?: number; // \t\t-\r\n\tmaxAmtSell?: number; // \t\t-\r\n}\r\n\r\nexport enum CommissionAmountType {\r\n\tPercent = 0,\r\n\tAmount = 1,\r\n}\r\n\r\nexport type ProductValidationState = ValidationState;\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport ViewIcon from \"@material-ui/icons/InputOutlined\";\r\nimport EditIcon from \"@material-ui/icons/EditOutlined\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Action } from \"material-table\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { useViewClient } from \"./DisplayClient\";\r\nimport { useClientDelete } from \"../../../data/listing/clients/hooks/useClientDelete\";\r\nimport { ClientListData } from \"../../../data/listing/clients/types\";\r\nimport { ClientEditParts, getClientsEditLocation } from \"./Locations\"\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\n\r\nexport const useClientActions = (userAccessRights: AccessRights) => {\r\n\tconst { getString } = useContext(LocalizationContext);\r\n\tconst onShowClient = useViewClient();\r\n\tconst onEditClient = useEditClientAction();\r\n\r\n\treturn useMemo(() => {\r\n\t\tconst result: Action[] = [\r\n\t\t\t{\r\n\t\t\t\ticon: () => ,\r\n\t\t\t\ttooltip: getString(\"tableShow\"),\r\n\t\t\t\tonClick: (event, rowData) => onShowClient(rowData as ClientListData),\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ticon: () => ,\r\n\t\t\t\ttooltip: getString(\"tableEdit\"),\r\n\t\t\t\tonClick: (event, rowData) => onEditClient(rowData as ClientListData),\r\n//\t\t\t\thidden: userAccessRights===AccessRights.ReadOnly\r\n\t\t\t},\r\n\t\t];\r\n\r\n\t\treturn result;\r\n\t}, [onShowClient, getString, onEditClient]);\r\n};\r\n\r\nexport const useDeleteClientAction = () => {\r\n\tconst [fetchState, deleteClient, reset] = useClientDelete();\r\n\tconst action = React.useCallback(\r\n\t\tasync (client: ClientListData) => {\r\n\t\t\tif (client.cliId) {\r\n\t\t\t\tawait deleteClient(client.cliId);\r\n\t\t\t}\r\n\t\t},\r\n\t\t[deleteClient]\r\n\t);\r\n\treturn [fetchState, action, reset] as [typeof fetchState, typeof action, typeof reset];\r\n};\r\n\r\n\r\nexport const useEditClientAction = () => {\r\n\tconst history = useHistory();\r\n\treturn React.useCallback(\r\n\t\t(employee: ClientListData) => history.push(getClientsEditLocation(ClientEditParts.BasicInfo, employee.cliId)),\r\n\t\t[history]\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport { Table, TableDataProps } from \"../../components/common/Table\";\r\nimport { useClientData } from \"../../../data/listing/clients/hooks/useClientData\";\r\nimport { useClientColumns } from \"./useClientColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\nimport { useClientActions, useDeleteClientAction } from \"./useClientActions\";\r\nimport { ClientListData, ErrorCodeExceptions } from \"../../../data/listing/clients/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { CustomDialog } from \"../../components/common/CustomDialog\";\r\n\r\nexport interface ClientTableProps {\r\n\tuserAccessRights: AccessRights;\r\n}\r\n\r\ntype ClientTablePropsType = ClientTableProps & TableDataProps;\r\n\r\nexport const ClientTable: React.FunctionComponent = ({\r\n\tuserAccessRights,\r\n\t...tableProps\r\n}) => {\r\n\tconst [data, loadAll] = useClientData();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\tconst columns = useClientColumns();\r\n\tconst actions = useClientActions(userAccessRights);\r\n\tconst [fetchState, onDelete, resetState] = useDeleteClientAction();\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\r\n\t\t\t{...tableProps}\r\n\t\t\tgetData={loadAll}\r\n\t\t\timmutableData={data}\r\n\t\t\ttitle=\"\"\r\n\t\t\tcolumns={columns}\r\n\t\t\tactions={actions}\r\n\t\t\toptions={{\r\n\t\t\t\ttoolbar: false,\r\n\t\t\t\tpageSize: 20,\r\n\t\t\t\tactionsColumnIndex: -1,\r\n\t\t\t}}\r\n\t\t\teditable={userAccessRights !== AccessRights.ReadOnly ? {\r\n\t\t\t\tonRowDelete: onDelete,\r\n\t\t\t }: {}}\r\n\t\t/>\r\n\t\t\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport default ClientTable;\r\n","import { useContext, useMemo } from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\nimport { ClientListData } from \"../../../data/listing/clients/types\";\r\nimport React from \"react\";\r\nimport { DisplayBoolNumber } from \"../../components/common/DisplayBoolNumber\";\r\nimport { Status } from \"../../../data/models\";\r\nimport { ClientActive, ClientHeadquaters } from \"../../../data/listing/clients/types\";\r\n\r\nexport function useClientColumns() {\r\n\tconst { getString } = useContext(LocalizationContext);\r\n\treturn useMemo(\r\n\t\t() => [\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"cliName\"),\r\n\t\t\t\tfield: \"cliName\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"cliIdNo\"),\r\n\t\t\t\tfield: \"cliIdNo\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"cliCity\"),\r\n\t\t\t\tfield: \"city\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"cliPhone\"),\r\n\t\t\t\tfield: \"phone\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"cliActive\"),\r\n\t\t\t\trender: client => ,\r\n\t\t\t\tcustomSort: (a, b) => a.active - b.active,\r\n\t\t\t\twidth: \"80px\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"cliStatus\"),\r\n\t\t\t\trender: client => ,\r\n\t\t\t\tcustomSort: (a, b) => a.status - b.status,\r\n\t\t\t\twidth: \"80px\",\r\n\t\t\t},\r\n\t\t],\r\n\t\t[getString]\r\n\t) as Column[];\r\n}\r\n","import React from \"react\";\r\nimport { Grid, CardContent, CardHeader, Divider, Card, Fab } from \"@material-ui/core\";\r\nimport ClientTable from \"./ClientTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { SearchBox } from \"../../components/common/SearchBox\";\r\nimport { PageComponent, AccessRights } from \"../../../core/navigation/types\";\r\nimport AddIcon from \"@material-ui/icons/Add\";\r\nimport { useClientSearch } from \"../../../data/listing/clients/hooks/useClientSearch\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { getClientsEditLocation } from \"./Locations\";\r\nimport { useAuth } from \"../../../data/auth/hooks\";\r\n\r\nconst ClientPage: PageComponent = ({ userAccessRights }) => {\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst [search, setSearch] = useClientSearch();\r\n\r\n\tconst history = useHistory();\r\n\tconst [auth] = useAuth();\r\n\r\n\treturn (\r\n\t\t\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\taction={}\r\n\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\t{userAccessRights === AccessRights.All && (\r\n\t\t\t\t\t history.push(getClientsEditLocation())}\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};\r\n\r\nexport default ClientPage;\r\n","import { setSearchTerm } from \"../clientsDataReducer\";\r\nimport { useSearch } from \"../../../../core/util/storeHooks\";\r\n\r\nexport const useClientSearch = () => useSearch(s => s.data.listing.clients.searchTerm, setSearchTerm);","import { Client, ClientValidationState } from \"../types\";\r\nimport { createUseValidator } from \"../../../../core/util/hooks\";\r\n\r\nexport const clientValidation: ClientValidationState = {\r\n\tcliName: true,\r\n\tfullName: true,\r\n\tcliIdNo: true,\r\n\ttaxCode: true,\r\n\tcliType: true,\r\n}\r\n\r\nexport const useClientValidator = createUseValidator(clientValidation);\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { Client } from \"../types\";\r\n\r\nexport const createClient = (userId: string, client: Client) =>\r\n\twebApiWithResponse({\r\n\t\tmethod: \"PUT\",\r\n\t\turl: \"listing/newclient\",\r\n\t\tparams: {\r\n\t\t\tuserId\r\n\t\t},\r\n\t\tdata: client\r\n\t});\r\n\r\nexport default createClient;\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { Client } from \"../types\";\r\n\r\nexport const updateClientApi = (userId: string, client: Client) =>\r\n\twebApiWithResponse({\r\n\t\tmethod: \"PUT\",\r\n\t\turl: \"listing/updclient\",\r\n\t\tparams: {\r\n\t\t\tuserId\r\n\t\t},\r\n\t\tdata: client\r\n\t});\r\n\r\nexport default updateClientApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { upsertClient } from \"../thunks/upsertClient\";\r\nimport { setFetchStateClient } from \"../clientsDataReducer\";\r\nimport { Client } from \"../types\";\r\n\r\nexport const useClientUpsert = () => {\r\n\tconst fetchState = useSelector(\r\n\t\tstore => store.data.listing.clients.fetchState\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchUpsertEmployee = React.useCallback(\r\n\t\t(client: Client) => dispatch(upsertClient(client)),\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tdispatch(setFetchStateClient({ type: \"not-started\" }))\r\n\t}, [dispatch])\r\n\r\n\treturn [fetchState, dispatchUpsertEmployee] as [typeof fetchState, typeof dispatchUpsertEmployee]\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport createClient from \"../api/createClient\";\r\nimport updateClientApi from \"../api/updateClient\";\r\nimport { setFetchStateClient } from \"../clientsDataReducer\";\r\nimport { Client } from \"../types\";\r\n\r\nexport const upsertClient = (client: Client): ThunkType> => async (\r\n\tdispatch,\r\n\tgetStore\r\n) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setFetchStateClient({ type: \"started\" }));\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst result = client.cliId\r\n\t\t? await dispatch(updateClientApi(userId, client))\r\n\t\t: await dispatch(createClient(userId, client));\r\n\r\n\tif (result && result.resCode === \"OK\") {\r\n\t\tdispatch(setFetchStateClient({ type: \"successful\", result: result.resDesc }));\r\n\t\treturn result.resDesc;\r\n\t} else {\r\n\t\tdispatch(setFetchStateClient({ type: \"error\", errorCode: result?.resCode }));\r\n\t}\r\n};\r\n","import React from \"react\";\r\nimport DateFnsUtils from \"@date-io/date-fns\";\r\nimport srLocale from \"date-fns/locale/sr-Latn\";\r\nimport enLocale from \"date-fns/locale/en-US\";\r\nimport { KeyboardDatePicker, MuiPickersUtilsProvider, KeyboardDatePickerProps } from \"@material-ui/pickers\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { LocalizationLanguage } from \"../../../core/localization/types\";\r\n\r\nexport interface DateInputProps extends KeyboardDatePickerProps {\r\n\tonChange: (newValue: Date | null) => void;\r\n\terrorMessage?: string;\r\n\tclearable?: boolean;\r\n}\r\n\r\nexport const DateInput: React.FunctionComponent = ({\r\n\tonChange,\r\n\terror,\r\n\terrorMessage,\r\n\tclearable,\r\n\t...otherProps\r\n}) => {\r\n\tconst { getString, language } = React.useContext(LocalizationContext);\r\n\tconst locale = React.useMemo(() => (language() === LocalizationLanguage.SR ? srLocale : enLocale), [\r\n\t\tlanguage,\r\n\t]);\r\n\tconst helperText = React.useMemo(\r\n\t\t() => (error ? errorMessage || getString(\"requiredMessage\") : undefined),\r\n\t\t[getString, error, errorMessage]\r\n\t);\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { useClientTypes } from \"../../../data/initialData/hooks/useClientTypes\";\r\nimport { TextField, MenuItem } from \"@material-ui/core\";\r\n\r\ninterface CLientTypeSelectProps {\r\n\ttypeValue: number;\r\n handleChange: (event: React.ChangeEvent) => void;\r\n}\r\n\r\nexport const ClientTypeSelect: React.FunctionComponent = ({\r\n\ttypeValue,\r\n\thandleChange,\r\n}) => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst [types] = useClientTypes();\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t{types.map(option => (\r\n\t\t\t\t\r\n\t\t\t\t\t{option.ftDescr}\r\n\t\t\t\t\r\n\t\t\t))}\r\n\t\t\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport { useClientValidator } from \"../../../data/listing/clients/hooks/useClientValidator\";\r\nimport { useClientUpsert } from \"../../../data/listing/clients/hooks/useClientUpsert\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Grid } from \"@material-ui/core\";\r\nimport { FabSave } from \"../../components/common/FabSave\";\r\nimport { DateInput } from \"../../components/common/DateInput\";\r\nimport { StringInput } from \"../../components/common/StringInput\";\r\nimport { City, Status } from \"../../../data/models\";\r\nimport { Client, ClientHeadquaters, ClientActive } from \"../../../data/listing/clients/types\";\r\nimport { ClientTypeSelect } from \"./ClientTypeSelect\";\r\nimport { CitySelect } from \"../../components/common/CitySelect\";\r\nimport { BoolInput } from \"../../components/common/BoolInput\";\r\nimport { LeavePrompt } from \"../../components/common/LeavePrompt\";\r\nimport { clientsLocation } from \"./Locations\";\r\nimport { useAuth } from \"../../../data/auth/hooks\";\r\n\r\nexport interface EditClientBasicProps {\r\n\tclient: Client;\r\n\teditClient: (field: keyof Client, value: any) => void;\r\n\tchanged: boolean;\r\n}\r\n\r\nexport const EditClientBasicInfo: React.FunctionComponent = props => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\tconst { client, editClient, changed } = props;\r\n\tconst [validationState, validate] = useClientValidator();\r\n\tconst [fetchState, upsert] = useClientUpsert();\r\n\tconst history = useHistory();\r\n\r\n\tconst [auth] = useAuth();\r\n\r\n\tconst unsavedChanges = fetchState.type === \"not-started\" && changed;\r\n\r\n\tconst handleChange = React.useCallback(\r\n\t\t(event: React.ChangeEvent) => {\r\n\t\t\teditClient(event.target.name as any, event.target.value);\r\n\t\t},\r\n\t\t[editClient]\r\n\t);\r\n\r\n\tconst handleActiveFromChange = React.useCallback(\r\n\t\t(date: Date | null) => {\r\n\t\t\teditClient(\"activeFrom\", date);\r\n\t\t},\r\n\t\t[editClient]\r\n\t);\r\n\r\n\tconst handleActiveToChange = React.useCallback(\r\n\t\t(date: Date | null) => {\r\n\t\t\teditClient(\"activeTo\", date);\r\n\t\t},\r\n\t\t[editClient]\r\n\t);\r\n\r\n\tconst changeCity = React.useCallback(\r\n\t\t(city: City | null) => {\r\n\t\t\teditClient(\"cityId\", city ? city.cityId : \"\");\r\n\t\t},\r\n\t\t[editClient]\r\n\t);\r\n\r\n\tconst changeMailCity = React.useCallback(\r\n\t\t(city: City | null) => {\r\n\t\t\teditClient(\"mailCityId\", city ? city.cityId : \"\");\r\n\t\t},\r\n\t\t[editClient]\r\n\t);\r\n\r\n\tconst save = React.useCallback(() => {\r\n\t\tconst save = async () => {\r\n\t\t\tconst normalized = validate(client);\r\n\t\t\tif (normalized) {\r\n\t\t\t\tconst newId = await upsert(normalized);\r\n\t\t\t\tif (newId) {\r\n\t\t\t\t\teditClient(\"cliId\", newId);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tif (fetchState.type === \"successful\") {\r\n\t\t\thistory.push(clientsLocation);\r\n\t\t} else if (fetchState.type !== \"started\") {\r\n\t\t\tsave();\r\n\t\t}\r\n\t}, [client, validate, fetchState, editClient, history, upsert]);\r\n\r\n\tif (!client) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\treturn (\r\n\t\t<>\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\t\r\n\t\t\t\t\t\t\tproperty=\"fullName\"\r\n\t\t\t\t\t\t\titem={client}\r\n\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\tlabel={getString(\"clilFullName\")}\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\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tproperty=\"cliName\"\r\n\t\t\t\t\t\t\titem={client}\r\n\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\tlabel={getString(\"cliName\")}\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\t\tproperty=\"cliIdNo\"\r\n\t\t\t\t\t\t\titem={client}\r\n\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\tlabel={getString(\"cliIdNo\")}\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\t\tproperty=\"taxCode\"\r\n\t\t\t\t\t\t\titem={client}\r\n\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\tlabel={getString(\"cliTaxCode\")}\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\t\tproperty=\"cliJBKJS\"\r\n\t\t\t\t\t\t\titem={client}\r\n\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\tlabel={getString(\"clijbkjs\")}\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\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tproperty=\"foreignCli\"\r\n\t\t\t\t\t\t\titem={client}\r\n\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\tfalsyValue={ClientHeadquaters.Domestic}\r\n\t\t\t\t\t\t\tthrutyValue={ClientHeadquaters.Foreign}\r\n\t\t\t\t\t\t\tlabel={getString(\"cliForeign\")}\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\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tproperty=\"address\"\r\n\t\t\t\t\t\t\titem={client}\r\n\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\tlabel={getString(\"cliAddress\")}\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 city.cityId === client.cityId}\r\n\t\t\t\t\t\t\tonChangeItem={changeCity}\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\t\tproperty=\"mailAddress\"\r\n\t\t\t\t\t\t\titem={client}\r\n\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\tlabel={getString(\"cliMailAddress\")}\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 city.cityId === client.mailCityId}\r\n\t\t\t\t\t\t\tonChangeItem={changeMailCity}\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\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tproperty=\"phone\"\r\n\t\t\t\t\t\t\titem={client}\r\n\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\tlabel={getString(\"cliPhone\")}\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\t\tproperty=\"mobile\"\r\n\t\t\t\t\t\t\titem={client}\r\n\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\tlabel={getString(\"cliMobile\")}\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\t\tproperty=\"fax\"\r\n\t\t\t\t\t\t\titem={client}\r\n\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\tlabel={getString(\"cliFax\")}\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\t\tproperty=\"email\"\r\n\t\t\t\t\t\t\titem={client}\r\n\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\tlabel={getString(\"cliEmail\")}\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\t\r\n{/*\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tproperty=\"active\"\r\n\t\t\t\t\t\t\titem={client}\r\n\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\tfalsyValue={ClientActive.AccessForbiden}\r\n\t\t\t\t\t\t\tthrutyValue={ClientActive.HasAccess}\r\n\t\t\t\t\t\t\tlabel={getString(\"cliActive\")}\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\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\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tproperty=\"comment\"\r\n\t\t\t\t\t\t\titem={client}\r\n\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\tlabel={getString(\"cliComment\")}\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\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tproperty=\"status\"\r\n\t\t\t\t\t\t\titem={client}\r\n\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\tfalsyValue={Status.Inactive}\r\n\t\t\t\t\t\t\tthrutyValue={Status.Active}\r\n\t\t\t\t\t\t\tlabel={getString(\"cliStatus\")}\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\t{auth.status === \"successful\" && auth.user.roleCode === \"ADMIN\" && ()}\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n","import { webApi } from \"../../../../../core/http/httpThunks\";\r\n\r\nexport const deleteClientPersonApi = (userId: string, cliprsid: string) =>\r\n\twebApi({\r\n\t\tmethod: \"DELETE\",\r\n\t\turl: \"listing/delcliprs\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t\tcliprsid\r\n\t\t},\r\n\t});\r\n\r\nexport default deleteClientPersonApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\nimport { deleteClientPerson } from \"../../thunks/clientPerson/deleteClientPerson\";\r\nimport { setFetchStatePerson } from \"../../clientsDataReducer\";\r\n\r\nexport const useClientPersonDelete = () => {\r\n\tconst fetchState = useSelector(\r\n\t\tstore => store.data.listing.clients.fetchStatePerson\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchDeleteEmployee = React.useCallback(\r\n\t\t(id: string) => dispatch(deleteClientPerson(id)),\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tdispatch(setFetchStatePerson({ type: \"not-started\" }))\r\n\t}, [dispatch])\r\n\r\n\treturn [fetchState, dispatchDeleteEmployee] as [typeof fetchState, typeof dispatchDeleteEmployee]\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport deleteClientPersonApi from \"../../api/clientPerson/deleteClientPerson\";\r\nimport { setFetchStatePerson } from \"../../clientsDataReducer\";\r\n\r\nexport const deleteClientPerson = (personId: string): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setFetchStatePerson({ type: \"started\" }));\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst result = await dispatch(deleteClientPersonApi(userId, personId));\r\n\r\n\tdispatch(setFetchStatePerson(result !== undefined ? { type: \"successful\" } : { type: \"error\"}));\r\n};\r\n","import React from \"react\";\r\nimport { Table, TableDataProps } from \"../../../components/common/Table\";\r\nimport { useClientPersons } from \"../../../../data/listing/clients/hooks/clientPerson/useClientPersons\";\r\nimport { ClientPerson } from \"../../../../data/listing/clients/types\";\r\nimport { Column, Action } from \"material-table\";\r\nimport { DisplayBoolNumber } from \"../../../components/common/DisplayBoolNumber\";\r\nimport { useDisplaySingleEmementStyles } from \"../../../useDisplaySingleEmementStyles\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { useClientPersonDelete } from \"../../../../data/listing/clients/hooks/clientPerson/useClientPersonDelete\";\r\nimport EditIcon from \"@material-ui/icons/EditOutlined\";\r\nimport { ClientEditParts, getClientsEditLocation } from \"../Locations\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { Fab } from \"@material-ui/core\";\r\nimport { usePageStyles } from \"../../../pageStyles\";\r\nimport AddIcon from \"@material-ui/icons/Add\";\r\nimport { Status } from \"../../../../data/models\";\r\nimport { useAuth } from \"../../../../data/auth/hooks\";\r\n\r\nexport interface ClientPersonTableProps {\r\n\tclientId: string;\r\n}\r\n\r\ntype ClientPersonTablePropsType = ClientPersonTableProps & TableDataProps;\r\n\r\nexport const ClientPersonsTable: React.FunctionComponent = ({\r\n\tclientId,\r\n\t...tableProps\r\n}) => {\r\n\tconst pageStyles = usePageStyles();\r\n\tconst history = useHistory();\r\n\r\n\tconst [auth] = useAuth();\r\n\r\n\tconst [data, reload] = useClientPersons(clientId);\r\n\r\n\tconst columns = useClientPersonColumns();\r\n\tconst actions = useClientActions();\r\n\tconst onDeleteClient = useDeleteClientPersonAction();\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t\r\n\t\t\t\t{...tableProps}\r\n\t\t\t\tgetData={() => {}}\r\n\t\t\t\timmutableData={data}\r\n\t\t\t\ttitle=\"\"\r\n\t\t\t\tcolumns={columns}\r\n\t\t\t\tactions={actions}\r\n\t\t\t\toptions={{\r\n\t\t\t\t\ttoolbar: false,\r\n\t\t\t\t\tpageSize: 5,\r\n\t\t\t\t\tactionsColumnIndex: -1,\r\n\t\t\t\t}}\r\n\t\r\n\t\t\t\teditable={ auth.status === \"successful\" && auth.user.roleCode === \"ADMIN\" ? {\r\n\t\t\t\t\tonRowDelete: async person => {\r\n\t\t\t\t\t\tawait onDeleteClient(person);\r\n\t\t\t\t\t\treload();\r\n\t\t\t\t\t},\r\n\t\t\t\t} : {} }\r\n\t\t\t/>\r\n\t\t\t{auth.status === \"successful\" && auth.user.roleCode === \"ADMIN\" && (\r\n\t\t\t\t history.push(getClientsEditLocation(ClientEditParts.Persons, clientId, \"\"))}\r\n\t\t\t>\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 ClientPersonsTable;\r\n\r\nconst useClientPersonColumns = () => {\r\n\tconst style = useDisplaySingleEmementStyles();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\treturn React.useMemo(\r\n\t\t() => [\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"clientPersonName\"),\r\n\t\t\t\tfield: \"cliPrsName\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"clientPersonIDNumber\"),\r\n\t\t\t\tfield: \"cliPrsIdNo\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"clientPersonRole\"),\r\n\t\t\t\tfield: \"cliPrsRoleName\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"clientPersonStatus\"),\r\n\t\t\t\trender: person => (\r\n\t\t\t\t\t\r\n\t\t\t\t),\r\n\t\t\t\tcustomSort: (a, b) => a.status - b.status,\r\n\t\t\t},\r\n\t\t],\r\n\t\t[getString, style.icon]\r\n\t) as Column[];\r\n};\r\n\r\nconst useDeleteClientPersonAction = () => {\r\n\tconst [, deleteClient] = useClientPersonDelete();\r\n\treturn React.useCallback(\r\n\t\tasync (client: ClientPerson) => {\r\n\t\t\tif (client.cliPrsId) {\r\n\t\t\t\tawait deleteClient(client.cliPrsId);\r\n\t\t\t}\r\n\t\t},\r\n\t\t[deleteClient]\r\n\t);\r\n};\r\n\r\nexport const useClientActions = () => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst onEditClient = useEditClientAction();\r\n\r\n\tconst [auth] = useAuth();\r\n\r\n\treturn React.useMemo(() => {\r\n\t\tconst result: Action[] = [\r\n\t\t\t{\r\n\t\t\t\ticon: () => ,\r\n\t\t\t\ttooltip: getString(\"tableEdit\"),\r\n\t\t\t\tonClick: (event, rowData) => onEditClient(rowData as ClientPerson),\r\n\t\t\t\thidden: auth.status === \"successful\" && auth.user.roleCode !== \"ADMIN\",\r\n\t\t\t},\r\n\t\t];\r\n\r\n\t\treturn result;\r\n\t}, [getString, onEditClient]);\r\n};\r\n\r\nexport const useEditClientAction = () => {\r\n\tconst history = useHistory();\r\n\treturn React.useCallback(\r\n\t\t(person: ClientPerson) =>\r\n\t\t\thistory.push(getClientsEditLocation(ClientEditParts.Persons, person.clientId, person.cliPrsId)),\r\n\t\t[history]\r\n\t);\r\n};\r\n","import { webApi } from \"../../../../../core/http/httpThunks\";\r\n\r\nexport const deleteClientBrokerApi = (userId: string, clibrokid: string) =>\r\n\twebApi({\r\n\t\tmethod: \"DELETE\",\r\n\t\turl: \"listing/delclibrok\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t\tclibrokid\r\n\t\t},\r\n\t});\r\n\r\nexport default deleteClientBrokerApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\nimport { deleteClientBroker } from \"../../thunks/clientBroker/deleteClientBroker\";\r\nimport { setFetchStateBroker } from \"../../clientsDataReducer\";\r\n\r\nexport const useClientBrokerDelete = () => {\r\n\tconst fetchState = useSelector(\r\n\t\tstore => store.data.listing.clients.fetchStateBroker\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchDeleteBroker = React.useCallback(\r\n\t\t(id: string) => dispatch(deleteClientBroker(id)),\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tdispatch(setFetchStateBroker({ type: \"not-started\" }))\r\n\t}, [dispatch])\r\n\r\n\treturn [fetchState, dispatchDeleteBroker] as [typeof fetchState, typeof dispatchDeleteBroker]\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport deleteClientBrokerApi from \"../../api/clientBroker/deleteClientBroker\";\r\nimport { setFetchStateBroker } from \"../../clientsDataReducer\";\r\n\r\nexport const deleteClientBroker = (brokerId: string): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setFetchStateBroker({ type: \"started\" }));\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst result = await dispatch(deleteClientBrokerApi(userId, brokerId));\r\n\r\n\tdispatch(setFetchStateBroker(result !== undefined ? { type: \"successful\" } : { type: \"error\"}));\r\n};\r\n","import React from \"react\";\r\nimport { Table, TableDataProps } from \"../../../components/common/Table\";\r\nimport { useClientBrokers } from \"../../../../data/listing/clients/hooks/clientBroker/useClientBrokers\";\r\nimport { ClientBroker } from \"../../../../data/listing/clients/types\";\r\nimport { Column, Action } from \"material-table\";\r\nimport { DisplayBoolNumber } from \"../../../components/common/DisplayBoolNumber\";\r\nimport { useDisplaySingleEmementStyles } from \"../../../useDisplaySingleEmementStyles\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { useClientBrokerDelete } from \"../../../../data/listing/clients/hooks/clientBroker/useClientBrokerDelete\";\r\nimport EditIcon from \"@material-ui/icons/EditOutlined\";\r\nimport { ClientEditParts, getClientsEditLocation } from \"../Locations\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { Fab } from \"@material-ui/core\";\r\nimport { usePageStyles } from \"../../../pageStyles\";\r\nimport AddIcon from \"@material-ui/icons/Add\";\r\nimport { Status } from \"../../../../data/models\";\r\nimport { useAuth } from \"../../../../data/auth/hooks\";\r\n\r\nexport interface ClientBrokerTableProps {\r\n\tclientId: string;\r\n}\r\n\r\ntype ClientBrokerTablePropsType = ClientBrokerTableProps & TableDataProps;\r\n\r\nexport const ClientBrokerTable: React.FunctionComponent = ({\r\n\tclientId,\r\n\t...tableProps\r\n}) => {\r\n\tconst pageStyles = usePageStyles();\r\n\tconst history = useHistory();\r\n\r\n\tconst [auth] = useAuth();\r\n\r\n\tconst [data, reload] = useClientBrokers(clientId);\r\n\r\n\tconst columns = useClientBrokerColumns();\r\n\tconst actions = useClientBrokerActions();\r\n\tconst onDeleteBroker = useDeleteClientBrokerAction();\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t\r\n\t\t\t\t{...tableProps}\r\n\t\t\t\tgetData={() => {}}\r\n\t\t\t\timmutableData={data}\r\n\t\t\t\ttitle=\"\"\r\n\t\t\t\tcolumns={columns}\r\n\t\t\t\tactions={actions}\r\n\t\t\t\toptions={{\r\n\t\t\t\t\ttoolbar: false,\r\n\t\t\t\t\tpageSize: 5,\r\n\t\t\t\t\tactionsColumnIndex: -1,\r\n\t\t\t\t}}\r\n\t\t\t\teditable={ auth.status === \"successful\" && auth.user.roleCode === \"ADMIN\" ? {\r\n\t\t\t\t\tonRowDelete: async broker => {\r\n\t\t\t\t\t\tawait onDeleteBroker(broker);\r\n\t\t\t\t\t\treload();\r\n\t\t\t\t\t},\r\n\t\t\t\t} : {} }\r\n\t\t\t/>\r\n\t\t\t{auth.status === \"successful\" && auth.user.roleCode === \"ADMIN\" && (\r\n\t\t\t history.push(getClientsEditLocation(ClientEditParts.Brokers, clientId, \"\"))}\r\n\t\t\t>\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 ClientBrokerTable;\r\n\r\nconst useClientBrokerColumns = () => {\r\n\tconst style = useDisplaySingleEmementStyles();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\treturn React.useMemo(\r\n\t\t() => [\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"clientBrokerName\"),\r\n\t\t\t\tfield: \"brokName\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"clientBrokerIDNumber\"),\r\n\t\t\t\tfield: \"brokIdNo\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"clientPersonStatus\"),\r\n\t\t\t\trender: person => (\r\n\t\t\t\t\t\r\n\t\t\t\t),\r\n\t\t\t\tcustomSort: (a, b) => a.status - b.status,\r\n\t\t\t},\r\n\t\t],\r\n\t\t[getString, style.icon]\r\n\t) as Column[];\r\n};\r\n\r\nconst useDeleteClientBrokerAction = () => {\r\n\tconst [, deleteBroker] = useClientBrokerDelete();\r\n\treturn React.useCallback(\r\n\t\tasync (client: ClientBroker) => {\r\n\t\t\tif (client.cliBrokId) {\r\n\t\t\t\tawait deleteBroker(client.cliBrokId);\r\n\t\t\t}\r\n\t\t},\r\n\t\t[deleteBroker]\r\n\t);\r\n};\r\n\r\nexport const useClientBrokerActions = () => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst onEditBroker = useEditClientBrokerAction();\r\n\r\n\tconst [auth] = useAuth();\r\n\r\n\treturn React.useMemo(() => {\r\n\t\tconst result: Action[] = [\r\n\t\t\t{\r\n\t\t\t\ticon: () => ,\r\n\t\t\t\ttooltip: getString(\"tableEdit\"),\r\n\t\t\t\tonClick: (event, rowData) => onEditBroker(rowData as ClientBroker),\r\n\t\t\t\thidden: auth.status === \"successful\" && auth.user.roleCode !== \"ADMIN\",\r\n\t\t\t},\r\n\t\t];\r\n\r\n\t\treturn result;\r\n\t}, [getString, onEditBroker]);\r\n};\r\n\r\nexport const useEditClientBrokerAction = () => {\r\n\tconst history = useHistory();\r\n\treturn React.useCallback(\r\n\t\t(broker: ClientBroker) =>\r\n\t\t\thistory.push(getClientsEditLocation(ClientEditParts.Brokers, broker.clientId, broker.cliBrokId)),\r\n\t\t[history]\r\n\t);\r\n};\r\n","import { webApi } from \"../../../../../core/http/httpThunks\";\r\n\r\nexport const deleteClientContractApi = (userId: string, clicontrid: string) =>\r\n\twebApi({\r\n\t\tmethod: \"DELETE\",\r\n\t\turl: \"listing/delclicontr\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t\tclicontrid\r\n\t\t},\r\n\t});\r\n\r\nexport default deleteClientContractApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\nimport { deleteClientContract } from \"../../thunks/clientContract/deleteClientContract\";\r\nimport { setFetchStateContract } from \"../../clientsDataReducer\";\r\n\r\nexport const useClientContractDelete = () => {\r\n\tconst fetchState = useSelector(\r\n\t\tstore => store.data.listing.clients.fetchStateContract\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchDeleteBroker = React.useCallback(\r\n\t\t(id: string) => dispatch(deleteClientContract(id)),\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tdispatch(setFetchStateContract({ type: \"not-started\" }))\r\n\t}, [dispatch])\r\n\r\n\treturn [fetchState, dispatchDeleteBroker] as [typeof fetchState, typeof dispatchDeleteBroker]\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport deleteClientContractApi from \"../../api/clientContract/deleteClientContract\";\r\nimport { setFetchStateContract } from \"../../clientsDataReducer\";\r\n\r\nexport const deleteClientContract = (contractId: string): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setFetchStateContract({ type: \"started\" }));\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst result = await dispatch(deleteClientContractApi(userId, contractId));\r\n\r\n\tdispatch(setFetchStateContract(result !== undefined ? { type: \"successful\" } : { type: \"error\"}));\r\n};\r\n","import { webApi } from \"../../../../../core/http/httpThunks\";\r\nimport { ClientContract } from \"../../types\";\r\n\r\nexport const getClientContractApi = (userId: string, clicontrid: string) =>\r\n\twebApi({\r\n\t\tmethod: \"GET\",\r\n\t\turl: \"listing/getclicontr\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t\tclicontrid\r\n\t\t},\r\n\t});\r\n\r\nexport default getClientContractApi;\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport getClientContractApi from \"../../api/clientContract/getClientContract\";\r\nimport { ClientContract } from \"../../types\";\r\n\r\nexport const getClientContract = (clientBrokerId: string): ThunkType> => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\treturn await dispatch(getClientContractApi(userId, clientBrokerId));\r\n}\r\n","import React from \"react\";\r\nimport { ClientContract } from \"../../../../data/listing/clients/types\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { useDisplaySingleEmementStyles } from \"../../../useDisplaySingleEmementStyles\";\r\n\r\nexport interface DisplayContractMainAttributesProps {\r\n contract: ClientContract;\r\n}\r\n\r\nexport const DisplayContractMainAttributes: React.FunctionComponent = ({\r\n contract,\r\n}) => {\r\n const style = useDisplaySingleEmementStyles();\r\n const { getString, getDateString } = React.useContext(LocalizationContext);\r\n\r\n return (\r\n
\r\n
\r\n {getString(\"contractNumber\")}\r\n {contract.contrNo}\r\n
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"contractDate\")}\r\n\t\t\t\t{getDateString(contract.contrDate)}\r\n\t\t\t
\r\n
\r\n {getString(\"contractDescription\")}\r\n {contract.contrDescr}\r\n
\r\n
\r\n );\r\n};\r\n","import React from \"react\";\r\nimport { Theme, makeStyles, Tooltip, TooltipProps } from \"@material-ui/core\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { LocalizationKey } from \"../../../core/localization/types\";\r\n\r\nexport const useTooltipStyles = makeStyles((theme: Theme) => ({\r\n\tarrow: {\r\n\t\t//color: theme.palette.common.black,\r\n\t\tcolor: theme.palette.common.white,\r\n\t\tfontSize: 14,\r\n\t},\r\n\ttooltip: {\r\n\t\t//backgroundColor: theme.palette.common.black,\r\n\t\tbackgroundColor: theme.palette.common.white,\r\n\t\tcolor: theme.palette.common.black,\r\n\t\tboxShadow: theme.shadows[2],\r\n\t\tfontSize: 15,\r\n\t},\r\n}));\r\n\r\nexport type CustomTooltipProps = Omit & {\r\n\ttitleKeyword?: LocalizationKey;\r\n\ttitle?: React.ReactNode;\r\n};\r\n\r\nexport const CustomTooltip: React.FunctionComponent = ({\r\n\tchildren,\r\n\ttitleKeyword,\r\n\t...otherProps\r\n}) => {\r\n\tconst tooltipStyles = useTooltipStyles();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\treturn (\r\n\t\t\r\n\t\t\t{children}\r\n\t\t\r\n\t);\r\n};\r\n","import { User } from \"../../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../../core/http/httpThunks\";\r\n\r\nexport const printClientContract = (user: User, cliContrId: string) => {\r\n\treturn httpWebApi({\r\n\t\tmethod: \"GET\",\r\n\t\tresponseType: \"blob\",\r\n\t\ttimeout: 60 * 4 * 1000,\r\n\t\turl: \"reporting/getcontractreport\",\r\n\t\tparams: {\r\n\t\t\tuserid: user.userId,\r\n\t\t\tcliContrId,\r\n\t\t},\r\n\t});\r\n};\r\n\r\nexport default printClientContract;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { printContractThunk } from \"../../thunks/clientContract/printContractThunk\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\nimport { ClientContract } from \"../../types\";\r\nimport { setPrintContractFetchState } from \"../../clientsDataReducer\";\r\n\r\nexport const useContractPrinter = (contract?: ClientContract) => {\r\n\tconst fetchState = useSelector(\r\n\t\ts => s.data.listing.clients.downloadContractFetchState\r\n\t);\r\n\tconst dispatch = useDispatch();\r\n\r\n\tconst download = React.useCallback(() => {\r\n\t\t\tdispatch(printContractThunk(contract));\r\n\t}, [dispatch,contract]);\r\n\r\n\tconst dispatchSetFetch = React.useCallback(() => { // Ovo da prvo izađe customDialog box\r\n\t\tdispatch(setPrintContractFetchState({ type: \"started\" }))\r\n\t},\t[dispatch] );\r\n\t\r\n\treturn [download, fetchState, dispatchSetFetch] as [typeof download, typeof fetchState, typeof dispatchSetFetch];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { printClientContract } from \"../../api/clientContract/printClientContract\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setPrintContractFetchState } from \"../../clientsDataReducer\";\r\nimport { ClientContract } from \"../../types\";\r\n\r\nexport const printContractThunk = (contract?: ClientContract): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\" || !contract || !contract.cliContrId) {\r\n\t\treturn undefined;\r\n\t}\r\n\tconst lan = store.ux.localization.language\r\n\tconst filename = `Contract_${contract.cliContrId}.pdf`\r\n\tconst user = store.data.auth.current.user;\r\n\tdispatch(setPrintContractFetchState({ type: \"started\" }));\r\n\tconst contractReport = await dispatch(printClientContract(user, contract.cliContrId));\r\n\tif (contractReport) {\r\n\t\tfileDownload(new Blob([contractReport as any], { type: \"application/pdf\" }), filename);\r\n\t}\r\n\tdispatch(setPrintContractFetchState({ type: \"not-started\" }));\r\n};\r\n","import React from \"react\";\r\nimport { useDisplayContract } from \"../../../../data/listing/clients/hooks/clientContract/useDisplayContract\";\r\nimport { useClientContract } from \"../../../../data/listing/clients/hooks/clientContract/useClientContract\";\r\nimport { DisplayDrawerContext } from \"../../../../layout/DisplayDrawerContext\";\r\nimport { ClientContract, ClientContractList } from \"../../../../data/listing/clients/types\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { DisplayContractMainAttributes } from \"./DisplayContractMainAttributes\";\r\nimport {\r\n ExpansionPanel,\r\n ExpansionPanelSummary,\r\n Typography,\r\n Grid,IconButton,\r\n} from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../../components/common/CustomTooltip\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport { useContractPrinter } from \"../../../../data/listing/clients/hooks/clientContract/useContractPrinter\";\r\n\r\nexport interface DisplayContractProps {\r\n id?: string;\r\n}\r\n\r\nexport const DisplayContract: React.FunctionComponent = ({\r\n id,\r\n}) => {\r\n\r\n const contract = useDisplayContract(id);\r\n const { getString } = React.useContext(LocalizationContext);\r\n\tconst [download, fetchState, setfetch] = useContractPrinter(contract);\r\n\r\n return !contract ? (\r\n <>{\"loading placeholder\"}\r\n ) : (\r\n \r\n \r\n \r\n \r\n \r\n {getString(\"tableBasciInfo\")}\r\n \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\r\n\t\t\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\r\n { fetchState.type !== \"not-started\" ? getString(\"pleaseWait\") : null }\r\n\t\t\t\t\t\t\t\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const useViewContract = () => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n return React.useCallback(\r\n (contract: ClientContractList) => showWithDrawer(),\r\n [showWithDrawer]\r\n );\r\n};\r\n","import React from \"react\";\r\nimport { useDispatch } from \"react-redux\";\r\nimport { ClientContract } from \"../../types\";\r\nimport { getClientContract } from \"../../thunks/clientContract/loadClientContract\";\r\n\r\nexport const useDisplayContract = (clientContractId?: string) => {\r\n\tconst displatch = useDispatch();\r\n\tconst [contract, setContract] = React.useState();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tconst loadClient = async () => {\r\n\t\t\tif (clientContractId) {\r\n\t\t\t\tconst loadedBroker = (await displatch(getClientContract(clientContractId))) as any;\r\n\t\t\t\tsetContract(loadedBroker);\r\n\t\t\t}\r\n\t\t};\r\n\t\tloadClient();\r\n\t}, [displatch, clientContractId, setContract]);\r\n\r\n\treturn contract;\r\n};\r\n","import React from \"react\";\r\nimport { Table, TableDataProps } from \"../../../components/common/Table\";\r\nimport { useClientContracts } from \"../../../../data/listing/clients/hooks/clientContract/useClientContracts\";\r\nimport { useClientContractDelete } from \"../../../../data/listing/clients/hooks/clientContract/useClientContractDelete\";\r\nimport { ClientContractList } from \"../../../../data/listing/clients/types\";\r\nimport { Column, Action } from \"material-table\";\r\nimport { DisplayBoolNumber } from \"../../../components/common/DisplayBoolNumber\";\r\nimport { useDisplaySingleEmementStyles } from \"../../../useDisplaySingleEmementStyles\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport EditIcon from \"@material-ui/icons/EditOutlined\";\r\nimport { ClientEditParts, getClientsEditLocation } from \"../Locations\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { Fab } from \"@material-ui/core\";\r\nimport { usePageStyles } from \"../../../pageStyles\";\r\nimport AddIcon from \"@material-ui/icons/Add\";\r\nimport ViewIcon from \"@material-ui/icons/InputOutlined\";\r\nimport { Status } from \"../../../../data/models\";\r\nimport { useViewContract } from \"./DisplayContract\";\r\nimport { useAuth } from \"../../../../data/auth/hooks\";\r\n\r\nexport interface ClientContractTableProps {\r\n\tclientId: string;\r\n}\r\n\r\ntype ClientContractTablePropsType = ClientContractTableProps & TableDataProps;\r\n\r\nexport const ClientContractTable: React.FunctionComponent = ({\r\n\tclientId,\r\n\t...tableProps\r\n}) => {\r\n\tconst pageStyles = usePageStyles();\r\n\tconst history = useHistory();\r\n\r\n\tconst [auth] = useAuth();\r\n\r\n\tconst [data, reload] = useClientContracts(clientId);\r\n\r\n\tconst columns = useClientContractColumns();\r\n\tconst actions = useClientContractActions(clientId);\r\n\tconst onDeleteContract = useDeleteClientContractAction();\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t\r\n\t\t\t\t{...tableProps}\r\n\t\t\t\tgetData={() => {}}\r\n\t\t\t\timmutableData={data}\r\n\t\t\t\ttitle=\"\"\r\n\t\t\t\tcolumns={columns}\r\n\t\t\t\tactions={actions}\r\n\t\t\t\toptions={{\r\n\t\t\t\t\ttoolbar: false,\r\n\t\t\t\t\tpageSize: 5,\r\n\t\t\t\t\tactionsColumnIndex: -1,\r\n\t\t\t\t}}\r\n\t\t\t\teditable={ auth.status === \"successful\" && auth.user.roleCode === \"ADMIN\" ? {\r\n\t\t\t\t\tonRowDelete: async contract => {\r\n\t\t\t\t\t\tawait onDeleteContract(contract);\r\n\t\t\t\t\t\treload();\r\n\t\t\t\t\t},\r\n\t\t\t\t} : {} }\r\n\t\t\t/>\r\n\t\t\t{auth.status === \"successful\" && auth.user.roleCode === \"ADMIN\" && (\r\n\t\t\t history.push(getClientsEditLocation(ClientEditParts.Contracts, clientId, \"\"))}\r\n\t\t\t>\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 ClientContractTable;\r\n\r\nconst useClientContractColumns = () => {\r\n\tconst style = useDisplaySingleEmementStyles();\r\n\tconst { getString, getDateString } = React.useContext(LocalizationContext);\r\n\treturn React.useMemo(\r\n\t\t() => [\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"contractNumber\"),\r\n\t\t\t\tfield: \"contrNo\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"contractDate\"),\r\n\t\t\t\trender: contract => getDateString(contract.contrDate),\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"contractLincedContrNo\"),\r\n\t\t\t\tfield: \"linkedContrNo\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"contractTypeDescription\"),\r\n\t\t\t\tfield: \"contrTypeDescr\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"contractDescription\"),\r\n\t\t\t\tfield: \"contrDescr\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"contractStatus\"),\r\n\t\t\t\trender: contract => (\r\n\t\t\t\t\t\r\n\t\t\t\t),\r\n\t\t\t\tcustomSort: (a, b) => a.status - b.status,\r\n\t\t\t},\r\n\t\t],\r\n\t\t[getString, style.icon, getDateString]\r\n\t) as Column[];\r\n};\r\n\r\nconst useDeleteClientContractAction = () => {\r\n\tconst [, deleteContract] = useClientContractDelete();\r\n\treturn React.useCallback(\r\n\t\tasync (contract: ClientContractList) => {\r\n\t\t\tif (contract.cliContrId) {\r\n\t\t\t\tawait deleteContract(contract.cliContrId);\r\n\t\t\t}\r\n\t\t},\r\n\t\t[deleteContract]\r\n\t);\r\n};\r\n\r\nexport const useClientContractActions = (clientId: string) => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst onEditContract = useEditClientContractAction(clientId);\r\n\tconst onShowContract = useViewContract();\r\n\r\n\tconst [auth] = useAuth();\r\n\r\n\treturn React.useMemo(() => {\r\n\t\tconst result: Action[] = [\r\n\t\t\t{\r\n\t\t\t\ticon: () => ,\r\n\t\t\t\ttooltip: getString(\"tableShow\"),\r\n\t\t\t\tonClick: (event, rowData) => onShowContract(rowData as ClientContractList),\r\n\t\t\t },\r\n\t\t\t\t\t{\r\n\t\t\t\ticon: () => ,\r\n\t\t\t\ttooltip: getString(\"tableEdit\"),\r\n\t\t\t\tonClick: (event, rowData) => onEditContract(rowData as ClientContractList),\r\n\t\t\t\thidden: auth.status === \"successful\" && auth.user.roleCode !== \"ADMIN\",\r\n\t\t\t},\r\n\t\t];\r\n\r\n\t\treturn result;\r\n\t}, [getString, onEditContract]);\r\n};\r\n\r\nexport const useEditClientContractAction = (clientId: string) => {\r\n\tconst history = useHistory();\r\n\treturn React.useCallback(\r\n\t\t(contract: ClientContractList) =>\r\n\t\t\thistory.push(getClientsEditLocation(ClientEditParts.Contracts, clientId, contract.cliContrId)),\r\n\t\t[history, clientId]\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport { useDisplayClient } from \"./useDisplayClient\";\r\nimport { Client, ClientActive, ClientHeadquaters } from \"../types\";\r\nimport { Status } from \"../../../../data/models\";\r\nimport { useCopiedState } from \"../../../../core/util/hooks\";\r\n\r\nexport const defaultClient: Client = {\r\n\tactive: ClientActive.HasAccess,\r\n\taddress: \"\",\r\n\tcliIdNo: \"\",\r\n\tcliName: \"\",\r\n\tcliType: 10,\r\n\tcomment: \"\",\r\n\temail: \"\",\r\n\tfax: \"\",\r\n\tforeignCli: ClientHeadquaters.Domestic,\r\n\tfullName: \"\",\r\n\tmailAddress: \"\",\r\n\tmobile: \"\",\r\n\tphone: \"\",\r\n\trpgCode: \"\",\r\n\tstatus: Status.Active,\r\n\ttaxCode: \"\",\r\n\tcommission: 0,\r\n};\r\n\r\nexport const useEditClient = (cilId?: string) => {\r\n\tconst displayClient = useDisplayClient(cilId);\r\n\r\n\treturn React.useMemo(() => {\r\n\t\tif (cilId !== undefined && displayClient === undefined) {\r\n\t\t\treturn undefined;\r\n }\r\n\r\n\t\tif (cilId === undefined) {\r\n\t\t\treturn { ...defaultClient };\r\n }\r\n\r\n\t\treturn displayClient ? { ...displayClient } : undefined;\r\n\t}, [cilId, displayClient]);\r\n};\r\n\r\nexport const useEditClientState = (empId?: string) => {\r\n\tconst client = useEditClient(empId);\r\n\treturn useCopiedState(client)\r\n};\r\n","import { webApi } from \"../../../../../core/http/httpThunks\";\r\n\r\nexport const deleteClientAccountApi = (userId: string, climonaccid: string) =>\r\n\twebApi({\r\n\t\tmethod: \"DELETE\",\r\n\t\turl: \"listing/delclimonacc\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t\tclimonaccid\r\n\t\t},\r\n\t});\r\n\r\nexport default deleteClientAccountApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\nimport { deleteClientAccount } from \"../../thunks/clientAccount/deleteClientAccount\";\r\nimport { setFetchStateAccount } from \"../../clientsDataReducer\";\r\n\r\nexport const useClientAccountDelete = () => {\r\n\tconst fetchState = useSelector(\r\n\t\tstore => store.data.listing.clients.fetchStateAccount\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchDeleteAccount = React.useCallback(\r\n\t\t(id: string) => dispatch(deleteClientAccount(id)),\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tdispatch(setFetchStateAccount({ type: \"not-started\" }))\r\n\t}, [dispatch])\r\n\r\n\treturn [fetchState, dispatchDeleteAccount] as [typeof fetchState, typeof dispatchDeleteAccount]\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport deleteClientAcountApi from \"../../api/clientAccount/deleteClientAccount\";\r\nimport { setFetchStateAccount } from \"../../clientsDataReducer\";\r\n\r\nexport const deleteClientAccount = (contractId: string): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setFetchStateAccount({ type: \"started\" }));\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst result = await dispatch(deleteClientAcountApi(userId, contractId));\r\n\r\n\tdispatch(setFetchStateAccount(result !== undefined ? { type: \"successful\" } : { type: \"error\"}));\r\n};\r\n","import React from \"react\";\r\nimport { Table, TableDataProps } from \"../../../components/common/Table\";\r\nimport { useClientAccounts } from \"../../../../data/listing/clients/hooks/clientAccount/useClientAccounts\";\r\nimport { useClientAccountDelete } from \"../../../../data/listing/clients/hooks/clientAccount/useClientAccountDelete\";\r\nimport { ClientAccountList } from \"../../../../data/listing/clients/types\";\r\nimport { Column, Action } from \"material-table\";\r\nimport { DisplayBoolNumber } from \"../../../components/common/DisplayBoolNumber\";\r\nimport { useDisplaySingleEmementStyles } from \"../../../useDisplaySingleEmementStyles\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport EditIcon from \"@material-ui/icons/EditOutlined\";\r\nimport { ClientEditParts, getClientsEditLocation } from \"../Locations\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { Fab } from \"@material-ui/core\";\r\nimport { usePageStyles } from \"../../../pageStyles\";\r\nimport AddIcon from \"@material-ui/icons/Add\";\r\nimport { Status } from \"../../../../data/models\";\r\nimport { useAuth } from \"../../../../data/auth/hooks\";\r\n\r\nexport interface ClientAccountTableProps {\r\n\tclientId: string;\r\n}\r\n\r\ntype ClientAccountTablePropsType = ClientAccountTableProps & TableDataProps;\r\n\r\nexport const ClientAccountTable: React.FunctionComponent = ({\r\n\tclientId,\r\n\t...tableProps\r\n}) => {\r\n\tconst pageStyles = usePageStyles();\r\n\tconst history = useHistory();\r\n\r\n\tconst [auth] = useAuth();\r\n\r\n\tconst [data, reload] = useClientAccounts(clientId);\r\n\r\n\tconst columns = useClientAccountColumns();\r\n\tconst actions = useClientAccountActions(clientId);\r\n\tconst onDeleteAccount = useDeleteClientAccountAction();\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t\r\n\t\t\t\t{...tableProps}\r\n\t\t\t\tgetData={() => {}}\r\n\t\t\t\timmutableData={data}\r\n\t\t\t\ttitle=\"\"\r\n\t\t\t\tcolumns={columns}\r\n\t\t\t\tactions={actions}\r\n\t\t\t\toptions={{\r\n\t\t\t\t\ttoolbar: false,\r\n\t\t\t\t\tpageSize: 5,\r\n\t\t\t\t\tactionsColumnIndex: -1,\r\n\t\t\t\t}}\r\n\t\t\t\teditable={ auth.status === \"successful\" && auth.user.roleCode === \"ADMIN\" ? {\r\n\t\t\t\t\tonRowDelete: async account => {\r\n\t\t\t\t\t\tawait onDeleteAccount(account);\r\n\t\t\t\t\t\treload();\r\n\t\t\t\t\t},\r\n\t\t\t\t} : {} }\r\n\t\t\t/>\r\n\t\t\t{auth.status === \"successful\" && auth.user.roleCode === \"ADMIN\" && (\r\n\t\t\t history.push(getClientsEditLocation(ClientEditParts.Accounts, clientId, \"\"))}\r\n\t\t\t>\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 ClientAccountTable;\r\n\r\nconst useClientAccountColumns = () => {\r\n\tconst style = useDisplaySingleEmementStyles();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\treturn React.useMemo(\r\n\t\t() => [\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"accountNumber\"),\r\n\t\t\t\tfield: \"account\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"accountBank\"),\r\n\t\t\t\tfield: \"bankCode\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"accountDefault\"),\r\n\t\t\t\trender: account => (\r\n\t\t\t\t\t\r\n\t\t\t\t),\r\n\t\t\t\tcustomSort: (a, b) => a.defaultAcc - b.defaultAcc,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"accountCurrency\"),\r\n\t\t\t\tfield: \"currCode\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"clientPersonStatus\"),\r\n\t\t\t\trender: person => (\r\n\t\t\t\t\t\r\n\t\t\t\t),\r\n\t\t\t\tcustomSort: (a, b) => a.status - b.status,\r\n\t\t\t},\r\n\t\t],\r\n\t\t[getString, style.icon]\r\n\t) as Column[];\r\n};\r\n\r\nconst useDeleteClientAccountAction = () => {\r\n\tconst [, deleteAccount] = useClientAccountDelete();\r\n\treturn React.useCallback(\r\n\t\tasync (account: ClientAccountList) => {\r\n\t\t\tif (account.monAccId) {\r\n\t\t\t\tawait deleteAccount(account.monAccId);\r\n\t\t\t}\r\n\t\t},\r\n\t\t[deleteAccount]\r\n\t);\r\n};\r\n\r\nexport const useClientAccountActions = (clientId: string) => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst onEditAccount = useEditClientAccountAction(clientId);\r\n\r\n\tconst [auth] = useAuth();\r\n\r\n\treturn React.useMemo(() => {\r\n\t\tconst result: Action[] = [\r\n\t\t\t{\r\n\t\t\t\ticon: () => ,\r\n\t\t\t\ttooltip: getString(\"tableEdit\"),\r\n\t\t\t\tonClick: (event, rowData) => onEditAccount(rowData as ClientAccountList),\r\n\t\t\t\thidden: auth.status === \"successful\" && auth.user.roleCode !== \"ADMIN\",\r\n\t\t\t},\r\n\t\t];\r\n\r\n\t\treturn result;\r\n\t}, [getString, onEditAccount]);\r\n};\r\n\r\nexport const useEditClientAccountAction = (clientId: string) => {\r\n\tconst history = useHistory();\r\n\treturn React.useCallback(\r\n\t\t(account: ClientAccountList) => {\r\n\t\t\thistory.push(getClientsEditLocation(ClientEditParts.Accounts, clientId, account.monAccId));\r\n\t\t},\r\n\t\t[history, clientId]\r\n\t);\r\n};\r\n","import { webApi } from \"../../../../../core/http/httpThunks\";\r\nimport { ClientAccount } from \"../../types\";\r\n\r\nexport const getClientAccountApi = (userId: string, climonaccid: string) =>\r\n\twebApi({\r\n\t\tmethod: \"GET\",\r\n\t\turl: \"listing/getclimonacc\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t\tclimonaccid\r\n\t\t},\r\n\t});\r\n\r\nexport default getClientAccountApi;\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport getClientAccountApi from \"../../api/clientAccount/getClientAccount\";\r\nimport { ClientAccount } from \"../../types\";\r\n\r\nexport const getClientAccount = (\r\n\tclientAccountId: string\r\n): ThunkType> => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\treturn await dispatch(getClientAccountApi(userId, clientAccountId));\r\n};\r\n","import React from \"react\";\r\nimport { useClientAccount } from \"./useClientAccount\";\r\nimport { ClientAccount, AccountOrderSide, AccountDefault } from \"../../types\";\r\nimport { Status } from \"../../../../../data/models\";\r\nimport { useCopiedState } from \"../../../../../core/util/hooks\";\r\n\r\nexport const createDefaultAccount = (clientId: string): ClientAccount => ({\r\n\taccount: \"\",\r\n\tclientBankCode: \"\",\r\n\tdefaultAcc: AccountDefault.False,\r\n\tforBuySell: AccountOrderSide.Both,\r\n\tclientId: clientId,\r\n\tstatus: Status.Active\r\n});\r\n\r\nexport const useEditClientAccount = (clientId: string, accountId?: string) => {\r\n\tconst [displayAccount] = useClientAccount(accountId);\r\n\r\n\treturn React.useMemo(() => {\r\n\t\tif (accountId !== undefined && displayAccount === undefined) {\r\n\t\t\treturn undefined;\r\n }\r\n\r\n\t\tif (accountId === undefined) {\r\n\t\t\tconst defaultPerson = createDefaultAccount(clientId);\r\n\t\t\treturn { ...defaultPerson };\r\n }\r\n\r\n\t\treturn displayAccount ? { ...displayAccount } : undefined;\r\n\t}, [clientId, accountId, displayAccount]);\r\n};\r\n\r\nexport const useEditClientAccountState = (clientId: string, clientPersonId?: string) => {\r\n\tconst account = useEditClientAccount(clientId, clientPersonId);\r\n\treturn useCopiedState(account)\r\n};\r\n","import React from \"react\";\r\nimport { useDispatch } from \"react-redux\";\r\nimport { ClientAccount } from \"../../types\";\r\nimport { getClientAccount } from \"../../thunks/clientAccount/loadClientAccount\";\r\n\r\nexport const useClientAccount = (accountId?: string) => {\r\n\tconst displatch = useDispatch();\r\n\tconst [account, setAccount] = React.useState();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tconst loadClient = async () => {\r\n\t\t\tif (accountId) {\r\n\t\t\t\tconst loadedAccount = (await displatch(getClientAccount(accountId))) as any;\r\n\t\t\t\tsetAccount(loadedAccount);\r\n\t\t\t}\r\n\t\t};\r\n\t\tloadClient();\r\n\t}, [displatch, accountId, setAccount]);\r\n\r\n\treturn [account];\r\n};\r\n","import { ClientAccount } from \"../../types\";\r\nimport { ValidationState } from \"../../../../../core/util/types\";\r\nimport { createUseValidator } from \"../../../../../core/util/hooks\";\r\n\r\nexport const AccountValidation: ValidationState = {\r\n\tclientId: true,\r\n\taccount: true,\r\n\tbankId: true,\r\n\tcurrId: true,\r\n};\r\n\r\nexport const useClientAccountValidator = createUseValidator>(\r\n\tAccountValidation\r\n);\r\n","import { webApiWithResponse } from \"../../../../../core/http/httpThunks\";\r\nimport { ClientAccount } from \"../../types\";\r\n\r\nexport const createClientAccountApi = (userId: string, account: ClientAccount) =>\r\n\twebApiWithResponse({\r\n\t\tmethod: \"PUT\",\r\n\t\turl: \"listing/newclimonacc\",\r\n\t\tparams: {\r\n\t\t\tuserId\r\n\t\t},\r\n\t\tdata: account\r\n\t});\r\n\r\nexport default createClientAccountApi;\r\n","import { webApiWithResponse } from \"../../../../../core/http/httpThunks\";\r\nimport { ClientAccount } from \"../../types\";\r\n\r\nexport const updateClientAccountApi = (userId: string, account: ClientAccount) =>\r\n\twebApiWithResponse({\r\n\t\tmethod: \"PUT\",\r\n\t\turl: \"listing/updclimonacc\",\r\n\t\tparams: {\r\n\t\t\tuserId\r\n\t\t},\r\n\t\tdata: account\r\n\t});\r\n\r\nexport default updateClientAccountApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\nimport { upsertClientAccount } from \"../../thunks/clientAccount/upsertClientAccount\";\r\nimport { setFetchStateAccount } from \"../../clientsDataReducer\";\r\nimport { ClientAccount } from \"../../types\";\r\n\r\nexport const useClientAccountUpsert = () => {\r\n\tconst fetchState = useSelector(\r\n\t\tstore => store.data.listing.clients.fetchStateAccount\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchUpsertContract = React.useCallback(\r\n\t\t(account: ClientAccount) => dispatch(upsertClientAccount(account)),\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tdispatch(setFetchStateAccount({ type: \"not-started\" }))\r\n\t}, [dispatch])\r\n\r\n\treturn [fetchState, dispatchUpsertContract] as [typeof fetchState, typeof dispatchUpsertContract]\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport createClientAccountApi from \"../../api/clientAccount/createClientAccount\";\r\nimport updateClientAccounttApi from \"../../api/clientAccount/updateClientAccount\";\r\nimport { setFetchStateAccount } from \"../../clientsDataReducer\";\r\nimport { ClientAccount } from \"../../types\";\r\n\r\nexport const upsertClientAccount = (account: ClientAccount): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setFetchStateAccount({ type: \"started\" }));\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst result = account.monAccId\r\n\t\t? await dispatch(updateClientAccounttApi(userId, account))\r\n\t\t: await dispatch(createClientAccountApi(userId, account));\r\n\r\n\tif (result && result.resCode === \"OK\") {\r\n\t\tdispatch(setFetchStateAccount({ type: \"successful\", result: result.resDesc }));\r\n\t\treturn result.resDesc;\r\n\t} else {\r\n\t\tdispatch(setFetchStateAccount({ type: \"error\", errorCode: result?.resCode }));\r\n\t}\r\n};\r\n","import React from \"react\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { StoreType } from \"../../../core/store/reducers\";\r\nimport { Bank } from \"../../models\";\r\n\r\nconst getBankLabel = (bank?: Bank) => (bank ? bank.bankName : \"\");\r\n\r\nexport const useBanks = () => {\r\n\tconst banks = useSelector(store => store.data.initialData.banks);\r\n\r\n\treturn [banks, getBankLabel] as [typeof banks, typeof getBankLabel];\r\n};\r\n\r\nexport const useBank = (bankId?: string) => {\r\n\tconst [banks] = useBanks();\r\n\r\n\tconst bank = React.useMemo(() => banks.find(c => c.bankId === bankId), [banks, bankId]);\r\n\tconst bankLabel = React.useMemo(() => getBankLabel(bank), [bank]);\r\n\r\n\treturn [bank, bankLabel] as [typeof bank, typeof bankLabel];\r\n};\r\n","import React from \"react\";\r\nimport { useBanks } from \"../../../data/initialData/hooks/useBanks\";\r\nimport { Bank } from \"../../../data/models\";\r\nimport { AutocompleteSelect, AutocompleteSelectType } from \"./AutocompleteSelect\";\r\n\r\ntype BankSelectPropsType = Omit, \"data\" | \"getLabel\">;\r\n\r\nexport const BankSelect: React.FunctionComponent = props => {\r\n\tconst [banks, renderBankLabel] = useBanks();\r\n\r\n\treturn data={banks} getLabel={renderBankLabel} {...props as any} />;\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { Currency } from \"../types\";\r\n\r\nexport const getAllCurrenciesApi = (userId: string) =>\r\n\twebApi({\r\n\t\tmethod: \"GET\",\r\n\t\turl: \"listing/getcurrlist\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t},\r\n\t});\r\n\r\nexport default getAllCurrenciesApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadAllCurrencies } from \"../thunks/loadAllCurrencies\";\r\nimport { Currency } from \"../types\";\r\n\r\nexport const useCurrencyData = () => {\r\n\tconst data = useSelector(s => s.data.listing.currencies.displayData);\r\n\tconst allData = useSelector(s => s.data.listing.currencies.all);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchLoadAll = React.useCallback(() => dispatch(loadAllCurrencies()), [dispatch]);\r\n\r\n\treturn [data, dispatchLoadAll, allData] as [\r\n\t\ttypeof data,\r\n\t\ttypeof dispatchLoadAll,\r\n\t\ttypeof allData\r\n\t];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getAllRolesAPI from \"../api/getAllCurrencies\";\r\nimport { setData } from \"../currenciesDataReducer\";\r\n\r\nexport const loadAllCurrencies = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setData());\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst curerencies = await dispatch(getAllRolesAPI(userId));\r\n\r\n\tdispatch(setData(curerencies || []));\r\n};\r\n","import React from \"react\";\r\nimport { useCurrencyData } from \"../../../data/listing/currencies/hooks/useCurrencyData\";\r\nimport { Currency } from \"../../../data/listing/currencies/types\";\r\nimport { AutocompleteSelectType, AutocompleteSelect } from \"./AutocompleteSelect\";\r\n\r\ntype CurrencySelectPropsType = Omit, \"data\" | \"getLabel\">;\r\n\r\nexport const CurrencySelect: React.FunctionComponent = props => {\r\n\tconst [, loadCurencies, curencies] = useCurrencyData();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (!curencies) {\r\n\t\t\tloadCurencies();\r\n\t\t}\r\n\t}, [curencies, loadCurencies]);\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t{...(props as AutocompleteSelectType)}\r\n\t\t\tdata={curencies}\r\n\t\t\tgetLabel={getCurrencyLabel}\r\n\t\t/>\r\n\t);\r\n};\r\n\r\nexport const getCurrencyLabel = (currency: Currency) =>\r\n\tcurrency ? `${currency.currName} (${currency.currCode})` : \"\";\r\n","import React from \"react\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { useClientAccountSideOptions } from \"../../../../data/listing/clients/hooks/clientAccount/useClientAccountSide\";\r\nimport { TextField, MenuItem } from \"@material-ui/core\";\r\nimport { AccountOrderSide } from \"../../../../data/listing/clients/types\";\r\n\r\ninterface AccountOrderSideSelectProps {\r\n\tside: AccountOrderSide;\r\n\thandleChange: (event: React.ChangeEvent) => void;\r\n}\r\n\r\nexport const AccountOrderSideSelect: React.FunctionComponent = ({\r\n\tside,\r\n\thandleChange,\r\n}) => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n const options = useClientAccountSideOptions();\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t{options.map(option => (\r\n\t\t\t\t\r\n\t\t\t\t\t{option.label}\r\n\t\t\t\t\r\n\t\t\t))}\r\n\t\t\r\n\t);\r\n};\r\n","import { webApi } from \"../../../../../core/http/httpThunks\";\r\nimport { ClientBroker } from \"../../types\";\r\n\r\nexport const getClientBrokerApi = (userId: string, clibrokid: string) =>\r\n\twebApi({\r\n\t\tmethod: \"GET\",\r\n\t\turl: \"listing/getclibrok\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t\tclibrokid\r\n\t\t},\r\n\t});\r\n\r\nexport default getClientBrokerApi;\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport getClientBrokerApi from \"../../api/clientBroker/getClientBroker\";\r\nimport { ClientBroker } from \"../../types\";\r\n\r\nexport const getClientBroker = (clientBrokerId: string): ThunkType> => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\treturn await dispatch(getClientBrokerApi(userId, clientBrokerId));\r\n}\r\n","import React from \"react\";\r\nimport { useClientBroker } from \"./useClientBroker\";\r\nimport { ClientBroker } from \"../../types\";\r\nimport { Status } from \"../../../../../data/models\";\r\nimport { useCopiedState } from \"../../../../../core/util/hooks\";\r\n\r\nexport const createDefaultBroker = (clientId: string): ClientBroker => ({\r\n\tbrokIdNo: \"\",\r\n\tbrokName: \"\",\r\n\tclientId: clientId,\r\n\tstatus: Status.Active,\r\n});\r\n\r\nexport const useEditClientBroker = (clientId: string, clientPersonId?: string) => {\r\n\tconst [displayClient] = useClientBroker(clientPersonId);\r\n\r\n\treturn React.useMemo(() => {\r\n\t\tif (clientPersonId !== undefined && displayClient === undefined) {\r\n\t\t\treturn undefined;\r\n }\r\n\r\n\t\tif (clientPersonId === undefined) {\r\n\t\t\tconst defaultPerson = createDefaultBroker(clientId);\r\n\t\t\treturn { ...defaultPerson };\r\n }\r\n\r\n\t\treturn displayClient ? { ...displayClient } : undefined;\r\n\t}, [clientId, clientPersonId, displayClient]);\r\n};\r\n\r\nexport const useEditClientBrokerState = (clientId: string, clientPersonId?: string) => {\r\n\tconst broker = useEditClientBroker(clientId, clientPersonId);\r\n\treturn useCopiedState(broker)\r\n};\r\n","import React from \"react\";\r\nimport { useDispatch } from \"react-redux\";\r\nimport { ClientBroker } from \"../../types\";\r\nimport { getClientBroker } from \"../../thunks/clientBroker/loadClientBroker\";\r\n\r\nexport const useClientBroker = (clientBrokerId?: string) => {\r\n\tconst displatch = useDispatch();\r\n\tconst [broker, setBroker] = React.useState();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tconst loadClient = async () => {\r\n\t\t\tif (clientBrokerId) {\r\n\t\t\t\tconst loadedBroker = (await displatch(getClientBroker(clientBrokerId))) as any;\r\n\t\t\t\tsetBroker(loadedBroker);\r\n\t\t\t}\r\n\t\t};\r\n\t\tloadClient();\r\n\t}, [displatch, clientBrokerId, setBroker]);\r\n\r\n\treturn [broker];\r\n};\r\n","import { ClientBroker } from \"../../types\";\r\nimport { ValidationState } from \"../../../../../core/util/types\";\r\nimport { createUseValidator } from \"../../../../../core/util/hooks\";\r\n\r\nexport const BrokerValidation: ValidationState = {\r\n\tbrokerId: true,\r\n};\r\n\r\nexport const useClientBrokerValidator = createUseValidator>(\r\n\tBrokerValidation\r\n);\r\n","import { webApiWithResponse } from \"../../../../../core/http/httpThunks\";\r\nimport { ClientBroker } from \"../../types\";\r\n\r\nexport const createClientBrokerApi = (userId: string, broker: ClientBroker) =>\r\n\twebApiWithResponse({\r\n\t\tmethod: \"PUT\",\r\n\t\turl: \"listing/newclibrok\",\r\n\t\tparams: {\r\n\t\t\tuserId\r\n\t\t},\r\n\t\tdata: broker\r\n\t});\r\n\r\nexport default createClientBrokerApi;\r\n","import { webApiWithResponse } from \"../../../../../core/http/httpThunks\";\r\nimport { ClientBroker } from \"../../types\";\r\n\r\nexport const updateClientBrokerApi = (userId: string, person: ClientBroker) =>\r\n\twebApiWithResponse({\r\n\t\tmethod: \"PUT\",\r\n\t\turl: \"listing/updclibrok\",\r\n\t\tparams: {\r\n\t\t\tuserId\r\n\t\t},\r\n\t\tdata: person\r\n\t});\r\n\r\nexport default updateClientBrokerApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\nimport { upsertClientBroker } from \"../../thunks/clientBroker/upsertClientBroker\";\r\nimport { setFetchStateBroker } from \"../../clientsDataReducer\";\r\nimport { ClientBroker } from \"../../types\";\r\n\r\nexport const useClientBrokerUpsert = () => {\r\n\tconst fetchState = useSelector(\r\n\t\tstore => store.data.listing.clients.fetchStateBroker\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchUpsertBroker = React.useCallback(\r\n\t\t(client: ClientBroker) => dispatch(upsertClientBroker(client)),\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tdispatch(setFetchStateBroker({ type: \"not-started\" }))\r\n\t}, [dispatch])\r\n\r\n\treturn [fetchState, dispatchUpsertBroker] as [typeof fetchState, typeof dispatchUpsertBroker]\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport createClientBrokerApi from \"../../api/clientBroker/createClientBroker\";\r\nimport updateClientBrokerApi from \"../../api/clientBroker/updateClientBroker\";\r\nimport { setFetchStateBroker } from \"../../clientsDataReducer\";\r\nimport { ClientBroker } from \"../../types\";\r\n\r\nexport const upsertClientBroker = (broker: ClientBroker): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setFetchStateBroker({ type: \"started\" }));\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst result = broker.cliBrokId\r\n\t\t? await dispatch(updateClientBrokerApi(userId, broker))\r\n\t\t: await dispatch(createClientBrokerApi(userId, broker));\r\n\r\n\tif (result && result.resCode === \"OK\") {\r\n\t\tdispatch(setFetchStateBroker({ type: \"successful\", result: result.resDesc }));\r\n\t\treturn result.resDesc;\r\n\t} else {\r\n\t\tdispatch(setFetchStateBroker({ type: \"error\", errorCode: result?.resCode }));\r\n\t}\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { Employee } from \"../types\";\r\n\r\nexport const getAllEmployeesWebApi = (userId: string) =>\r\n\twebApi({\r\n\t\tmethod: \"GET\",\r\n\t\turl: \"listing/getemplist\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t},\r\n\t});\r\n\r\nexport default getAllEmployeesWebApi;\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getAllEmployeesAPI from \"../api/getAllEmployees\";\r\nimport { setEmployees } from \"../employeesDataReducer\";\r\n\r\nexport const loadAllEmployees = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setEmployees());\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst employees = await dispatch(getAllEmployeesAPI(userId));\r\n\r\n\tdispatch(setEmployees(employees || []));\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadAllEmployees } from \"../thunks/loadAllEmployees\";\r\nimport { Employee } from \"../types\";\r\n\r\nexport const useEmployeeData = () => {\r\n\tconst data = useSelector(s => s.data.listing.employees.displayData);\r\n\tconst allData = useSelector(s => s.data.listing.employees.all);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchLoadAllEmployees = React.useCallback(() => dispatch(loadAllEmployees()), [dispatch]);\r\n\r\n\treturn [data, dispatchLoadAllEmployees, allData] as [\r\n\t\ttypeof data,\r\n\t\ttypeof dispatchLoadAllEmployees,\r\n\t\ttypeof allData\r\n\t];\r\n};\r\n\r\nexport const useEmployee = (id?: string) => {\r\n\tconst allData = useSelector(s => s.data.listing.employees.all);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchLoadAllEmployees = React.useCallback(() => dispatch(loadAllEmployees()), [dispatch]);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (!allData && id) {\r\n\t\t\tdispatchLoadAllEmployees();\r\n\t\t}\r\n\t}, [allData, id, dispatchLoadAllEmployees]);\r\n\r\n\tconst employee = React.useMemo(() => {\r\n\t\tif (!allData) {\r\n\t\t\treturn undefined;\r\n\t\t} else {\r\n\t\t\treturn allData?.find(e => e.empId === id);\r\n\t\t}\r\n\t}, [id, allData]);\r\n\r\n\treturn [employee] as [typeof employee];\r\n};\r\n","import React from \"react\";\r\nimport { useEmployeeData } from \"../../../data/listing/employees/hooks/useEmployeeData\";\r\nimport { Employee } from \"../../../data/listing/employees/types\";\r\nimport { AutocompleteSelectType, AutocompleteSelect } from \"../common/AutocompleteSelect\";\r\n\r\nexport type EmployeeSelectPropsType = Omit<\r\n\tAutocompleteSelectType,\r\n\t\"data\" | \"getLabel\"\r\n>\r\n\r\nexport const EmployeeSelect: React.FunctionComponent = props => {\r\n\tconst [, loadAllEmployees, employees] = useEmployeeData();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (!employees) {\r\n\t\t\tloadAllEmployees();\r\n\t\t}\r\n\t}, [employees, loadAllEmployees]);\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\tdata={employees}\r\n\t\t\tgetLabel={renderEmployeeLabel}\r\n\t\t\t{...props}\r\n\t\t/>\r\n\t);\r\n};\r\n\r\nconst renderEmployeeLabel = (employee: Employee | null) =>\r\n\temployee ? `${employee.lastName} ${employee.firstName} ${renderIdNumber(employee.empIdNumber)}` : \"\";\r\n\r\nconst renderIdNumber = (id?: string) => (id ? `(${id})` : \"\");\r\n","import React from \"react\";\r\nimport { useClientContract } from \"./useClientContract\";\r\nimport { ClientContract, ContractWebUser, ContractWebUserBlocked } from \"../../types\";\r\nimport { Status } from \"../../../../../data/models\";\r\nimport { useCopiedState } from \"../../../../../core/util/hooks\";\r\n\r\nexport const createDefaultBroker = (clientId: string): ClientContract => ({\r\n\tcontrDescr: \"\",\r\n\tcontrNo: \"\",\r\n\tcontrType: 10,\r\n\tcontrTypeDescr: \"\",\r\n\tclientId: clientId,\r\n\tphoneOrder: \"\",\r\n\twebUser: ContractWebUser.False,\r\n\twebUserBlocked: ContractWebUserBlocked.False,\r\n\tstatus: Status.Active\r\n});\r\n\r\nexport const useEditClientContract = (clientId: string, contractId?: string) => {\r\n\tconst [displayContract] = useClientContract(contractId);\r\n\r\n\treturn React.useMemo(() => {\r\n\t\tif (contractId !== undefined && displayContract === undefined) {\r\n\t\t\treturn undefined;\r\n }\r\n\r\n\t\tif (contractId === undefined) {\r\n\t\t\tconst defaultPerson = createDefaultBroker(clientId);\r\n\t\t\treturn { ...defaultPerson };\r\n }\r\n\r\n\t\treturn displayContract ? { ...displayContract } : undefined;\r\n\t}, [contractId, clientId, displayContract]);\r\n};\r\n\r\nexport const useEditClientContractState = (clientId: string, clientPersonId?: string) => {\r\n\tconst contract = useEditClientContract(clientId, clientPersonId);\r\n\treturn useCopiedState(contract)\r\n};\r\n","import React from \"react\";\r\nimport { useDispatch } from \"react-redux\";\r\nimport { ClientContract } from \"../../types\";\r\nimport { getClientContract } from \"../../thunks/clientContract/loadClientContract\";\r\n\r\nexport const useClientContract = (clientContractId?: string) => {\r\n\tconst displatch = useDispatch();\r\n\tconst [contract, setContract] = React.useState();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tconst loadClient = async () => {\r\n\t\t\tif (clientContractId) {\r\n\t\t\t\tconst loadedBroker = (await displatch(getClientContract(clientContractId))) as any;\r\n\t\t\t\tsetContract(loadedBroker);\r\n\t\t\t}\r\n\t\t};\r\n\t\tloadClient();\r\n\t}, [displatch, clientContractId, setContract]);\r\n\r\n\treturn [contract];\r\n};\r\n","import { ClientContract } from \"../../types\";\r\nimport { ValidationState } from \"../../../../../core/util/types\";\r\nimport { createUseValidator } from \"../../../../../core/util/hooks\";\r\n\r\nexport const ContractValidation: ValidationState = {\r\n\tcontrNo: true,\r\n\tcontrDate: true,\r\n\tcontrType: true,\r\n};\r\n\r\n/*export const useClientContractValidator = createUseValidator>(\r\n\tContractValidation\r\n); */\r\n\r\n\r\nexport const useClientContractValidator = createUseValidator>(\r\n\tContractValidation,\r\n\t(item, validation) => ({\r\n\t\t...validation,\r\n\t\tlinkedContrNo:\t item.contrType!==15 || (item.contrType===15 && item.linkedContrId !== undefined && item.linkedContrId !== \"\"),\r\n\t})\r\n); \r\n","import { webApiWithResponse } from \"../../../../../core/http/httpThunks\";\r\nimport { ClientContract } from \"../../types\";\r\n\r\nexport const createClientContractApi = (userId: string, contract: ClientContract) =>\r\n\twebApiWithResponse({\r\n\t\tmethod: \"PUT\",\r\n\t\turl: \"listing/newclicontr\",\r\n\t\tparams: {\r\n\t\t\tuserId\r\n\t\t},\r\n\t\tdata: contract\r\n\t});\r\n\r\nexport default createClientContractApi;\r\n","import { webApiWithResponse } from \"../../../../../core/http/httpThunks\";\r\nimport { ClientContract } from \"../../types\";\r\n\r\nexport const updateClientContractApi = (userId: string, contract: ClientContract) =>\r\n\twebApiWithResponse({\r\n\t\tmethod: \"PUT\",\r\n\t\turl: \"listing/updclicontr\",\r\n\t\tparams: {\r\n\t\t\tuserId\r\n\t\t},\r\n\t\tdata: contract\r\n\t});\r\n\r\nexport default updateClientContractApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\nimport { upsertClientContract } from \"../../thunks/clientContract/upsertClientContract\";\r\nimport { setFetchStateContract } from \"../../clientsDataReducer\";\r\nimport { ClientContract } from \"../../types\";\r\n\r\nexport const useClientContractUpsert = () => {\r\n\tconst fetchState = useSelector(\r\n\t\tstore => store.data.listing.clients.fetchStateContract\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchUpsertContract = React.useCallback(\r\n\t\t(contract: ClientContract) => dispatch(upsertClientContract(contract)),\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tdispatch(setFetchStateContract({ type: \"not-started\" }))\r\n\t}, [dispatch])\r\n\r\n\treturn [fetchState, dispatchUpsertContract] as [typeof fetchState, typeof dispatchUpsertContract]\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport createClientContractApi from \"../../api/clientContract/createClientContract\";\r\nimport updateClientContractApi from \"../../api/clientContract/updateClientContract\";\r\nimport { setFetchStateContract } from \"../../clientsDataReducer\";\r\nimport { ClientContract } from \"../../types\";\r\n\r\nexport const upsertClientContract = (contract: ClientContract): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setFetchStateContract({ type: \"started\" }));\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst result = contract.cliContrId\r\n\t\t? await dispatch(updateClientContractApi(userId, contract))\r\n\t\t: await dispatch(createClientContractApi(userId, contract));\r\n\r\n\tif (result && result.resCode === \"OK\") {\r\n\t\tdispatch(setFetchStateContract({ type: \"successful\", result: result.resDesc }));\r\n\t\treturn result.resDesc;\r\n\t} else {\r\n\t\tdispatch(setFetchStateContract({ type: \"error\", errorCode: result?.resCode }));\r\n\t}\r\n};\r\n","import React from \"react\";\r\nimport { useClientContracts } from \"../../../data/listing/clients/hooks/clientContract/useClientContracts\";\r\nimport { ClientContractList } from \"../../../data/listing/clients/types\";\r\nimport { AutocompleteSelectType, AutocompleteSelect } from \"../common/AutocompleteSelect\";\r\n\r\nexport interface ClientContractSelectProps {\r\n\tclientId: string;\r\n}\r\n\r\nexport type ClientContractSelectPropsType = Omit<\r\n\tAutocompleteSelectType,\r\n\t\"data\" | \"getLabel\"\r\n> &\r\n\tClientContractSelectProps;\r\n\r\nexport const ClientContractSelect: React.FunctionComponent = ({\r\n\tclientId,\r\n\t...otherProps\r\n}) => {\r\n\tconst [contracts] = useClientContracts(clientId);\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\tdata={contracts}\r\n\t\t\tgetLabel={renderClientContractLabel}\r\n\t\t\t{...otherProps}\r\n\t\t/>\r\n\t);\r\n};\r\n\r\nconst renderClientContractLabel = (contract: ClientContractList | null) => (contract ? contract.contrNo : \"\");\r\n","import { useSelector } from \"react-redux\";\r\nimport { StoreType } from \"../../../core/store/reducers\";\r\nimport { ContractType } from \"../../models\";\r\n\r\nconst getGroupLabel = (attribute?: ContractType) => (attribute ? attribute.ftDescr : \"\");\r\n\r\nexport const useContractTypes = () => {\r\n\tconst groups = useSelector(store => store.data.initialData.contractTypes);\r\n\r\n\treturn [groups, getGroupLabel] as [typeof groups, typeof getGroupLabel];\r\n};\r\n","import React from \"react\";\r\nimport { useContractTypes } from \"../../../data/initialData/hooks/useContractTypes\";\r\nimport { ContractType } from \"../../../data/models\";\r\nimport { AutocompleteSelectType, AutocompleteSelect } from \"./AutocompleteSelect\";\r\n\r\n\r\ntype ContractTypeeSelectPropsType = Omit, \"data\" | \"getLabel\">;\r\n\r\nexport const ContractTypeSelect: React.FunctionComponent = props => {\r\n\tconst [contractType, renderLabel] = useContractTypes();\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\tdata={contractType}\r\n\t\t\tgetLabel={renderLabel}\r\n\t\t\t{...(props as any)}\r\n\t\t/>\r\n\t);\r\n};\r\n\r\n","import { webApi } from \"../../../../../core/http/httpThunks\";\r\nimport { ClientPerson } from \"../../types\";\r\n\r\nexport const getClientPersonApi = (userId: string, cliprsid: string) =>\r\n\twebApi({\r\n\t\tmethod: \"GET\",\r\n\t\turl: \"listing/getcliprs\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t\tcliprsid\r\n\t\t},\r\n\t});\r\n\r\nexport default getClientPersonApi;\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport getClientPersonApi from \"../../api/clientPerson/getClientPerson\";\r\nimport { ClientPerson } from \"../../types\";\r\n\r\nexport const getClientPerson = (clientPersonId: string): ThunkType> => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\treturn await dispatch(getClientPersonApi(userId, clientPersonId));\r\n}\r\n","import React from \"react\";\r\nimport { useDispatch } from \"react-redux\";\r\nimport { ClientPerson } from \"../../types\";\r\nimport { getClientPerson } from \"../../thunks/clientPerson/loadClientPerson\";\r\n\r\nexport const useClientPerson = (clientPerosnId?: string) => {\r\n\tconst displatch = useDispatch();\r\n\tconst [client, setClient] = React.useState();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tconst loadClient = async () => {\r\n\t\t\tif (clientPerosnId) {\r\n\t\t\t\tconst loadedClient = (await displatch(getClientPerson(clientPerosnId))) as any;\r\n\t\t\t\tsetClient(loadedClient);\r\n\t\t\t}\r\n\t\t};\r\n\t\tloadClient();\r\n\t}, [displatch, clientPerosnId, setClient]);\r\n\r\n\treturn [client];\r\n};\r\n","import React from \"react\";\r\nimport { useClientPerson } from \"./useClientPerson\";\r\nimport { ClientPerson } from \"../../types\";\r\nimport { Status } from \"../../../../../data/models\";\r\nimport { useCopiedState } from \"../../../../../core/util/hooks\";\r\n\r\nexport const createDefaultPerson = (clientId: string): ClientPerson => ({\r\n\tcliPrsIdNo: \"\",\r\n\tcliPrsName: \"\",\r\n\tclientId: clientId,\r\n\tstatus: Status.Active,\r\n});\r\n\r\nexport const useEditClientPerson = (clientId: string, clientPersonId?: string) => {\r\n\tconst [displayClient] = useClientPerson(clientPersonId);\r\n\r\n\treturn React.useMemo(() => {\r\n\t\tif (clientPersonId !== undefined && displayClient === undefined) {\r\n\t\t\treturn undefined;\r\n }\r\n\r\n\t\tif (clientPersonId === undefined) {\r\n\t\t\tconst defaultPerson = createDefaultPerson(clientId);\r\n\t\t\treturn { ...defaultPerson };\r\n }\r\n\r\n\t\treturn displayClient ? { ...displayClient } : undefined;\r\n\t}, [clientId, clientPersonId, displayClient]);\r\n};\r\n\r\nexport const useEditClientPersonState = (clientId: string, clientPersonId?: string) => {\r\n\tconst person = useEditClientPerson(clientId, clientPersonId);\r\n\treturn useCopiedState(person)\r\n};\r\n","import { ClientPerson } from \"../../types\";\r\nimport { ValidationState } from \"../../../../../core/util/types\";\r\nimport { createUseValidator } from \"../../../../../core/util/hooks\";\r\n\r\nexport const personValidation: ValidationState = {\r\n\tcliPrsName: true,\r\n\tcliPrsIdNo: true,\r\n\tcliPrsRole: true,\r\n}\r\n\r\nexport const useClientValidator = createUseValidator>(personValidation);\r\n","import { webApiWithResponse } from \"../../../../../core/http/httpThunks\";\r\nimport { ClientPerson } from \"../../types\";\r\n\r\nexport const createClientPersonApi = (userId: string, person: ClientPerson) =>\r\n\twebApiWithResponse({\r\n\t\tmethod: \"PUT\",\r\n\t\turl: \"listing/newcliprs\",\r\n\t\tparams: {\r\n\t\t\tuserId\r\n\t\t},\r\n\t\tdata: person\r\n\t});\r\n\r\nexport default createClientPersonApi;\r\n","import { webApiWithResponse } from \"../../../../../core/http/httpThunks\";\r\nimport { ClientPerson } from \"../../types\";\r\n\r\nexport const updateClientPersonApi = (userId: string, person: ClientPerson) =>\r\n\twebApiWithResponse({\r\n\t\tmethod: \"PUT\",\r\n\t\turl: \"listing/updcliprs\",\r\n\t\tparams: {\r\n\t\t\tuserId\r\n\t\t},\r\n\t\tdata: person\r\n\t});\r\n\r\nexport default updateClientPersonApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\nimport { upsertClientPerson } from \"../../thunks/clientPerson/upsertClientPerson\";\r\nimport { setFetchStateClient } from \"../../clientsDataReducer\";\r\nimport { ClientPerson } from \"../../types\";\r\n\r\nexport const useClientPersonUpsert = () => {\r\n\tconst fetchState = useSelector(\r\n\t\tstore => store.data.listing.clients.fetchStatePerson\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchUpsertPerson = React.useCallback(\r\n\t\t(client: ClientPerson) => dispatch(upsertClientPerson(client)),\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tdispatch(setFetchStateClient({ type: \"not-started\" }))\r\n\t}, [dispatch])\r\n\r\n\treturn [fetchState, dispatchUpsertPerson] as [typeof fetchState, typeof dispatchUpsertPerson]\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport createClientPersonApi from \"../../api/clientPerson/createClientPerson\";\r\nimport updateClientPersonApi from \"../../api/clientPerson/updateClientPerson\";\r\nimport { setFetchStatePerson } from \"../../clientsDataReducer\";\r\nimport { ClientPerson } from \"../../types\";\r\n\r\nexport const upsertClientPerson = (client: ClientPerson): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setFetchStatePerson({ type: \"started\" }));\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst result = client.cliPrsId\r\n\t\t? await dispatch(updateClientPersonApi(userId, client))\r\n\t\t: await dispatch(createClientPersonApi(userId, client));\r\n\r\n\tif (result && result.resCode === \"OK\") {\r\n\t\tdispatch(setFetchStatePerson({ type: \"successful\", result: result.resDesc }));\r\n\t\treturn result.resDesc;\r\n\t} else {\r\n\t\tdispatch(setFetchStatePerson({ type: \"error\", errorCode: result?.resCode }));\r\n\t}\r\n};\r\n","import { useSelector } from \"react-redux\";\r\nimport { StoreType } from \"../../../core/store/reducers\";\r\nimport { PersonRole } from \"../../models\";\r\n\r\nconst getRoleLabel = (role?: PersonRole) => (role ? role.ftDescr : \"\");\r\n\r\nexport const usePersonRoles = () => {\r\n\tconst attributes = useSelector(\r\n\t\tstore => store.data.initialData.personRoles\r\n\t);\r\n\r\n\treturn [attributes, getRoleLabel] as [typeof attributes, typeof getRoleLabel];\r\n};\r\n","import React from \"react\";\r\nimport { usePersonRoles } from \"../../../data/initialData/hooks/usePersonRoles\";\r\nimport { PersonRole } from \"../../../data/models\";\r\nimport { AutocompleteSelect, AutocompleteSelectType } from \"./AutocompleteSelect\";\r\n\r\ntype ClientPersonRoleSelectProps = Omit, \"data\" | \"getLabel\">;\r\n\r\nexport const ClientPersonRoleSelect: React.FunctionComponent = props => {\r\n\tconst [roles, renderRoleLabel] = usePersonRoles();\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t{...(props as AutocompleteSelectType)}\r\n\t\t\tdata={roles}\r\n\t\t\tgetLabel={renderRoleLabel}\r\n\t\t/>\r\n\t);\r\n};\r\n","import ClientsPage from \"./ClientPage\";\r\nimport { EditClientPage } from \"./EditClientPage\";\r\nimport { EditAccount } from \"./clientAccounts/EditAccounts\";\r\nimport { EditBroker } from \"./clientBrokers/EditBroker\";\r\nimport { EditContract } from \"./clientContracts/EditContract\";\r\nimport { EditPerson } from \"./clientPersons/EditPerson\";\r\nimport { NavigationItem } from \"../../../core/navigation/types\";\r\nimport { clientsLocation, personsEdit, brokersEdit, contractsEdit, accountEdit, basicInfoEdit } from \"./Locations\";\r\n\r\nexport const clientsComponents: NavigationItem[] = [\r\n\t{\r\n\t\tComponent: ClientsPage,\r\n\t\tisMenuItem: true,\r\n\t\tpath: clientsLocation,\r\n\t},\r\n\t{\r\n\t\tComponent: EditPerson,\r\n\t\tisMenuItem: false,\r\n\t\tpath: personsEdit,\r\n\t},\r\n\t{\r\n\t\tComponent: EditBroker,\r\n\t\tisMenuItem: false,\r\n\t\tpath: brokersEdit,\r\n\t},\r\n\t{\r\n\t\tComponent: EditContract,\r\n\t\tisMenuItem: false,\r\n\t\tpath: contractsEdit,\r\n\t},\r\n\t{\r\n\t\tComponent: EditAccount,\r\n\t\tisMenuItem: false,\r\n\t\tpath: accountEdit,\r\n\t},\r\n\t{\r\n\t\tComponent: EditClientPage,\r\n\t\tisMenuItem: false,\r\n\t\tpath: basicInfoEdit,\r\n\t},\r\n];\r\n","import React from \"react\";\r\nimport { useEditClientPersonState } from \"../../../../data/listing/clients/hooks/clientPerson/useEditClientPersonState\";\r\nimport { useClientValidator } from \"../../../../data/listing/clients/hooks/clientPerson/useClientPersonValidator\";\r\nimport { useClientPersonUpsert } from \"../../../../data/listing/clients/hooks/clientPerson/useClientPersonUpsert\";\r\nimport { RouteComponentProps, useHistory } from \"react-router-dom\";\r\nimport { usePageStyles } from \"../../../pageStyles\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { Card, Grid, CardHeader, Divider, CardContent } from \"@material-ui/core\";\r\nimport { FabSave } from \"../../../components/common/FabSave\";\r\nimport { ClientPerson } from \"../../../../data/listing/clients/types\";\r\nimport { StringInput } from \"../../../components/common/StringInput\";\r\nimport { ClientEditParts, getClientsEditLocation } from \"../Locations\";\r\nimport { BoolInput } from \"../../../components/common/BoolInput\";\r\nimport { Status } from \"../../../../data/models\";\r\nimport { LeavePrompt } from \"../../../components/common/LeavePrompt\";\r\nimport { PageTitle } from \"../../../components/common/PageTitle\";\r\nimport { ClientPersonRoleSelect } from \"../../../components/common/ClientPersonRoleSelect\";\r\nimport { DateInput } from \"../../../components/common/DateInput\";\r\n\r\nexport interface EditPersonInfo {\r\n\tpersonId?: string;\r\n\tclientId: string;\r\n}\r\n\r\nexport interface EditPersonProps extends RouteComponentProps {}\r\n\r\nexport const EditPerson: React.FunctionComponent = props => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst { clientId, personId } = props.match.params;\r\n\tconst [person, editPerson, changed] = useEditClientPersonState(clientId, personId);\r\n\tconst [validationState, validate] = useClientValidator();\r\n\tconst [fetchState, upsert] = useClientPersonUpsert();\r\n\tconst history = useHistory();\r\n\r\n\tconst unsavedChanges = fetchState.type === \"not-started\" && changed;\r\n\r\n\tconst handleChange = React.useCallback(\r\n\t\t(event: React.ChangeEvent) => {\r\n\t\t\teditPerson(event.target.name as any, event.target.value);\r\n\t\t},\r\n\t\t[editPerson]\r\n\t);\r\n\r\n\tconst backLocation = React.useMemo(() => getClientsEditLocation(ClientEditParts.Persons, clientId), [\r\n\t\tclientId,\r\n\t]);\r\n\r\n\tconst save = React.useCallback(() => {\r\n\t\tif (fetchState.type === \"successful\") {\r\n\t\t\thistory.push(backLocation);\r\n\t\t} else if (fetchState.type !== \"started\") {\r\n\t\t\tconst normalized = validate(person);\r\n\t\t\tif (normalized) {\r\n\t\t\t\tupsert(normalized);\r\n\t\t\t}\r\n\t\t}\r\n\t}, [person, validate, fetchState, history, upsert, backLocation]);\r\n\r\n\tconst pageTitle = person && person.cliPrsId ? \"clientPersonEditTitle\" : \"clientPersonCreateTitle\";\r\n\r\n\tif (!person) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\treturn (\r\n\t\t\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\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 role.ftValue === person.cliPrsRole}\r\n\t\t\t\t\t\t\t\t\tonChangeItem={role => editPerson(\"cliPrsRole\", role?.ftValue)}\r\n\t\t\t\t\t\t\t\t\trequired={validationState.cliPrsRole !== undefined}\r\n\t\t\t\t\t\t\t\t\terror={validationState.cliPrsRole !== undefined && !validationState.cliPrsRole}\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\t\r\n\t\t\t\t\t\t\t\t editPerson(\"dateCertified\", date)}\r\n\t\t\t\t\t\t\t\t\trequired={validationState.dateCertified !== undefined}\r\n\t\t\t\t\t\t\t\t\terror={validationState.dateCertified !== undefined && !validationState.dateCertified}\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\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\tproperty=\"cliPrsName\"\r\n\t\t\t\t\t\t\t\t\titem={person}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"clientPersonName\")}\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\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tproperty=\"cliPrsIdNo\"\r\n\t\t\t\t\t\t\t\t\titem={person}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"clientPersonIDNumber\")}\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\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tproperty=\"phone\"\r\n\t\t\t\t\t\t\t\t\titem={person}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"clientPersonPhone\")}\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\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tproperty=\"email\"\r\n\t\t\t\t\t\t\t\t\titem={person}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"clientPersonEmail\")}\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\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tproperty=\"status\"\r\n\t\t\t\t\t\t\t\t\titem={person}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tfalsyValue={Status.Inactive}\r\n\t\t\t\t\t\t\t\t\tthrutyValue={Status.Active}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"clientPersonStatus\")}\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\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};\r\n","import React from \"react\";\r\nimport { useEditClientBrokerState } from \"../../../../data/listing/clients/hooks/clientBroker/useEditClientBrokerState\";\r\nimport { useClientBrokerValidator } from \"../../../../data/listing/clients/hooks/clientBroker/useClientBrokerValidator\";\r\nimport { useClientBrokerUpsert } from \"../../../../data/listing/clients/hooks/clientBroker/useClientBrokerUpsert\";\r\nimport { RouteComponentProps, useHistory } from \"react-router-dom\";\r\nimport { usePageStyles } from \"../../../pageStyles\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { Card, Grid, CardHeader, Divider, CardContent } from \"@material-ui/core\";\r\nimport { FabSave } from \"../../../components/common/FabSave\";\r\nimport { ClientBroker } from \"../../../../data/listing/clients/types\";\r\nimport { StringInput } from \"../../../components/common/StringInput\";\r\nimport { ClientEditParts, getClientsEditLocation } from \"../Locations\";\r\nimport { EmployeeSelect } from \"../../../components/listing/EmployeeSelect\";\r\nimport { BoolInput } from \"../../../components/common/BoolInput\";\r\nimport { Status } from \"../../../../data/models\";\r\nimport { LeavePrompt } from \"../../../components/common/LeavePrompt\";\r\nimport { PageTitle } from \"../../../components/common/PageTitle\";\r\n\r\nexport interface EditBrokerInfo {\r\n\tbrokerId?: string;\r\n\tclientId: string;\r\n}\r\n\r\nexport interface EditBrokerProps extends RouteComponentProps {}\r\n\r\nexport const EditBroker: React.FunctionComponent = props => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst { clientId, brokerId } = props.match.params;\r\n\tconst [broker, editBroker, changed] = useEditClientBrokerState(clientId, brokerId);\r\n\tconst [validationState, validate] = useClientBrokerValidator();\r\n\tconst [fetchState, upsert] = useClientBrokerUpsert();\r\n\tconst history = useHistory();\r\n\r\n\tconst unsavedChanges = fetchState.type === \"not-started\" && changed;\r\n\r\n\tconst handleChange = React.useCallback(\r\n\t\t(event: React.ChangeEvent) => {\r\n\t\t\teditBroker(event.target.name as any, event.target.value);\r\n\t\t},\r\n\t\t[editBroker]\r\n\t);\r\n\r\n\tconst backLocation = React.useMemo(() => getClientsEditLocation(ClientEditParts.Brokers, clientId), [\r\n\t\tclientId,\r\n\t]);\r\n\r\n\tconst save = React.useCallback(() => {\r\n\t\tif (fetchState.type === \"successful\") {\r\n\t\t\thistory.push(backLocation);\r\n\t\t} else if (fetchState.type !== \"started\") {\r\n\t\t\tconst normalized = validate(broker);\r\n\t\t\tif (normalized) {\r\n\t\t\t\tupsert(normalized);\r\n\t\t\t}\r\n\t\t}\r\n\t}, [broker, validate, fetchState, history, upsert, backLocation]);\r\n\r\n\tconst pageTitle = broker && broker.brokIdNo ? \"clientBrokerEditTitle\" : \"clientBrokerCreateTitle\";\r\n\r\n\tif (!broker) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\treturn (\r\n\t\t\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\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 empl.empId === broker.brokerId}\r\n\t\t\t\t\t\t\t\t\tonChangeItem={empl => {\r\n\t\t\t\t\t\t\t\t\t\teditBroker(\"brokerId\", empl ? empl.empId : undefined);\r\n\t\t\t\t\t\t\t\t\t\teditBroker(\r\n\t\t\t\t\t\t\t\t\t\t\t\"brokName\",\r\n\t\t\t\t\t\t\t\t\t\t\templ ? `${empl.lastName} ${empl.firstName}` : undefined\r\n\t\t\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t\t\t\teditBroker(\"brokIdNo\", empl ? empl.empIdNumber : undefined);\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\r\n\t\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\tproperty=\"brokName\"\r\n\t\t\t\t\t\t\t\t\titem={broker}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"clientBrokerName\")}\r\n\t\t\t\t\t\t\t\t\tdisabled\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\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tproperty=\"brokIdNo\"\r\n\t\t\t\t\t\t\t\t\titem={broker}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"clientBrokerIDNumber\")}\r\n\t\t\t\t\t\t\t\t\tdisabled\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\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tproperty=\"status\"\r\n\t\t\t\t\t\t\t\t\titem={broker}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tfalsyValue={Status.Inactive}\r\n\t\t\t\t\t\t\t\t\tthrutyValue={Status.Active}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"clientBrokerStatus\")}\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\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};\r\n","import React from \"react\";\r\nimport { useEditClientContractState } from \"../../../../data/listing/clients/hooks/clientContract/useEditClientContractState\";\r\nimport { useClientContractValidator } from \"../../../../data/listing/clients/hooks/clientContract/useClientContractValidator\";\r\nimport { useClientContractUpsert } from \"../../../../data/listing/clients/hooks/clientContract/useClientContractUpsert\";\r\nimport { RouteComponentProps, useHistory } from \"react-router-dom\";\r\nimport { usePageStyles } from \"../../../pageStyles\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { Card, Grid, CardHeader, Divider, CardContent } from \"@material-ui/core\";\r\nimport { FabSave } from \"../../../components/common/FabSave\";\r\nimport {\r\n\tClientContract,\r\n\tClientContractList,\r\n\tContractWebUser,\r\n\tContractWebUserBlocked,\r\n} from \"../../../../data/listing/clients/types\";\r\nimport { StringInput } from \"../../../components/common/StringInput\";\r\nimport { BoolInput } from \"../../../components/common/BoolInput\";\r\nimport { ClientEditParts, getClientsEditLocation } from \"../Locations\";\r\nimport { DateInput } from \"../../../components/common/DateInput\";\r\nimport { ClientContractSelect } from \"../../../components/listing/ClientContractSelect\";\r\nimport { Status } from \"../../../../data/models\";\r\nimport { LeavePrompt } from \"../../../components/common/LeavePrompt\";\r\nimport { PageTitle } from \"../../../components/common/PageTitle\";\r\nimport { ContractTypeSelect } from \"../../../components/common/ContractTypeSelect\";\r\n\r\nexport interface EditContractInfo {\r\n\tcontactId?: string;\r\n\tclientId: string;\r\n}\r\n\r\nexport interface EditContractProps extends RouteComponentProps {}\r\n\r\nexport const EditContract: React.FunctionComponent = props => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst { clientId, contactId } = props.match.params;\r\n\tconst [contract, editContract, changed] = useEditClientContractState(clientId, contactId);\r\n\tconst [validationState, validate] = useClientContractValidator();\r\n\tconst [fetchState, upsert] = useClientContractUpsert();\r\n\tconst history = useHistory();\r\n\r\n\tconst unsavedChanges = fetchState.type === \"not-started\" && changed;\r\n\r\n\tconst handleChange = React.useCallback(\r\n\t\t(event: React.ChangeEvent) => {\r\n\t\t\teditContract(event.target.name as any, event.target.value);\r\n\t\t},\r\n\t\t[editContract]\r\n\t);\r\n\r\n\tconst changeLinkedContract = React.useCallback(\r\n\t\t(linkedContract: ClientContractList | null) => {\r\n\t\t\teditContract(\"linkedContrId\", linkedContract ? linkedContract.cliContrId : \"\");\r\n\t\t\teditContract(\"linkedContrNo\", linkedContract ? linkedContract.linkedContrNo : \"\");\r\n\t\t},\r\n\t\t[editContract]\r\n\t);\r\n\r\n\tconst backLocation = React.useMemo(() => getClientsEditLocation(ClientEditParts.Contracts, clientId), [\r\n\t\tclientId,\r\n\t]);\r\n\r\n\tconst save = React.useCallback(() => {\r\n\t\tif (fetchState.type === \"successful\") {\r\n\t\t\thistory.push(backLocation);\r\n\t\t} else if (fetchState.type !== \"started\") {\r\n\t\t\tconst normalized = validate(contract);\r\n\t\t\tif (normalized) {\r\n\t\t\t\tupsert(normalized);\r\n\t\t\t}\r\n\t\t}\r\n\t}, [contract, validate, fetchState, history, upsert, backLocation]);\r\n\r\n\tconst pageTitle = contract && contract.cliContrId ? \"contractTitleEdit\" : \"contractTitleCreate\";\r\n\r\n\tif (!contract) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\treturn (\r\n\t\t\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\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\tproperty=\"contrNo\"\r\n\t\t\t\t\t\t\t\t\titem={contract}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"contractNumber\")}\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\t\r\n\t\t\t\t\t\t\t\t\t contractTypes.ftValue === contract.contrType}\r\n\t\t\t\t\t\t\t\t\t\tonChangeItem={contract =>{\r\n\t\t\t\t\t\t\t\t\t\t\teditContract(\"contrType\", contract ? contract.ftValue : undefined)\r\n\t\t\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\terror={validationState.contrType !== undefined && !validationState.contrType}\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\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tproperty=\"contrDescr\"\r\n\t\t\t\t\t\t\t\t\titem={contract}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"contractDescription\")}\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\t\r\n\t\t\t\t\t\t\t\t editContract(\"contrDate\", date)}\r\n\t\t\t\t\t\t\t\t\trequired={validationState.contrDate !== undefined}\r\n\t\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\t\tvalidationState.contrDate !== undefined && !validationState.contrDate\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\r\n\t\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 linked.cliContrId === contract.linkedContrId}\r\n\t\t\t\t\t\t\t\t\tonChangeItem={changeLinkedContract}\r\n\t\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\t\tvalidationState.linkedContrNo !== undefined && !validationState.linkedContrNo\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tdisabled={contract.contrType === 10}\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\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tproperty=\"phoneOrder\"\r\n\t\t\t\t\t\t\t\t\titem={contract}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"contractPhoneOrder\")}\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\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\tproperty=\"webUser\"\r\n\t\t\t\t\t\t\t\t\titem={contract}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tfalsyValue={ContractWebUser.False}\r\n\t\t\t\t\t\t\t\t\tthrutyValue={ContractWebUser.True}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"contractWebUser\")}\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\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tproperty=\"webUserBlocked\"\r\n\t\t\t\t\t\t\t\t\titem={contract}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tfalsyValue={ContractWebUserBlocked.False}\r\n\t\t\t\t\t\t\t\t\tthrutyValue={ContractWebUserBlocked.True}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"contractWebUserBlocked\")}\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\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tproperty=\"status\"\r\n\t\t\t\t\t\t\t\t\titem={contract}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tfalsyValue={Status.Inactive}\r\n\t\t\t\t\t\t\t\t\tthrutyValue={Status.Active}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"contractStatus\")}\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\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};\r\n","import React from \"react\";\r\nimport { useEditClientAccountState } from \"../../../../data/listing/clients/hooks/clientAccount/useEditClientAccountState\";\r\nimport { useClientAccountValidator } from \"../../../../data/listing/clients/hooks/clientAccount/useClientAccountValidator\";\r\nimport { useClientAccountUpsert } from \"../../../../data/listing/clients/hooks/clientAccount/useClientAccountUpsert\";\r\nimport { RouteComponentProps, useHistory } from \"react-router-dom\";\r\nimport { usePageStyles } from \"../../../pageStyles\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { Card, Grid, CardHeader, Divider, CardContent } from \"@material-ui/core\";\r\nimport { FabSave } from \"../../../components/common/FabSave\";\r\nimport { ClientAccount, AccountDefault } from \"../../../../data/listing/clients/types\";\r\nimport { StringInput } from \"../../../components/common/StringInput\";\r\nimport { BoolInput } from \"../../../components/common/BoolInput\";\r\nimport { ClientEditParts, getClientsEditLocation } from \"../Locations\";\r\nimport { BankSelect } from \"../../../components/common/BankSelect\";\r\nimport { CurrencySelect } from \"../../../components/common/CurrencySelect\";\r\nimport { AccountOrderSideSelect } from \"./AccountOrderSideSelect\";\r\nimport { Bank } from \"../../../../data/models\";\r\nimport { Currency } from \"../../../../data/listing/currencies/types\"\r\nimport { Status } from \"../../../../data/models\";\r\nimport { LeavePrompt } from \"../../../components/common/LeavePrompt\";\r\nimport { PageTitle } from \"../../../components/common/PageTitle\";\r\n\r\nexport interface EditAccountInfo {\r\n\taccountId?: string;\r\n\tclientId: string;\r\n}\r\n\r\nexport interface EditAccountProps extends RouteComponentProps {}\r\n\r\nexport const EditAccount: React.FunctionComponent = props => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst { clientId, accountId } = props.match.params;\r\n\tconst [account, editAccount, changed] = useEditClientAccountState(clientId, accountId);\r\n\tconst [validationState, validate] = useClientAccountValidator();\r\n\tconst [fetchState, upsert] = useClientAccountUpsert();\r\n\tconst history = useHistory();\r\n\r\n\tconst unsavedChanges = fetchState.type === \"not-started\" && changed;\r\n\r\n\tconst handleChange = React.useCallback(\r\n\t\t(event: React.ChangeEvent) => {\r\n\t\t\teditAccount(event.target.name as any, event.target.value);\r\n\t\t},\r\n\t\t[editAccount]\r\n\t);\r\n\r\n\tconst changeBank = React.useCallback(\r\n\t\t(bank: Bank | null) => {\r\n\t\t\teditAccount(\"bankId\", bank ? bank.bankId : \"\");\r\n\t\t\teditAccount(\"bankCode\", bank ? bank.bankCode : \"\");\r\n\t\t},\r\n\t\t[editAccount]\r\n\t);\r\n\r\n\tconst changeCurrency = React.useCallback(\r\n\t\t(currency: Currency | null) => {\r\n\t\t\teditAccount(\"currId\", currency ? currency.currId : \"\");\r\n\t\t\teditAccount(\"currCode\", currency ? currency.currCode : \"\");\r\n\t\t},\r\n\t\t[editAccount]\r\n\t);\r\n\r\n\tconst backLocation = React.useMemo(() => getClientsEditLocation(ClientEditParts.Accounts, clientId), [\r\n\t\tclientId,\r\n\t]);\r\n\r\n\tconst save = React.useCallback(() => {\r\n\t\tif (fetchState.type === \"successful\") {\r\n\t\t\thistory.push(backLocation);\r\n\t\t} else if (fetchState.type !== \"started\") {\r\n\t\t\tconst normalized = validate(account);\r\n\t\t\tif (normalized) {\r\n\t\t\t\tupsert(normalized);\r\n\t\t\t}\r\n\t\t}\r\n\t}, [account, validate, fetchState, history, upsert, backLocation]);\r\n\r\n\tconst pageTitle = account && account.monAccId ? \"accountTitleEdit\" : \"accountTitleCreate\";\r\n\r\n\tif (!account) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\treturn (\r\n\t\t\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\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\tproperty=\"account\"\r\n\t\t\t\t\t\t\t\t\titem={account}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"accountNumber\")}\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\t\r\n\t\t\t\t\t\t\t\t currency.currId === account.currId}\r\n\t\t\t\t\t\t\t\t\tonChangeItem={changeCurrency}\r\n\t\t\t\t\t\t\t\t\trequired={validationState.currId !== undefined}\r\n\t\t\t\t\t\t\t\t\terror={validationState.currId !== undefined && !validationState.currId}\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\t\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\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t bank.bankId === account.bankId}\r\n\t\t\t\t\t\t\t\t\tonChangeItem={changeBank}\r\n\t\t\t\t\t\t\t\t\trequired={validationState.bankId !== undefined}\r\n\t\t\t\t\t\t\t\t\terror={validationState.bankId !== undefined && !validationState.bankId}\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\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tproperty=\"clientBankCode\"\r\n\t\t\t\t\t\t\t\t\titem={account}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"accountClientBankCode\")}\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\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\tproperty=\"defaultAcc\"\r\n\t\t\t\t\t\t\t\t\titem={account}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tfalsyValue={AccountDefault.False}\r\n\t\t\t\t\t\t\t\t\tthrutyValue={AccountDefault.True}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"accountDefault\")}\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\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tproperty=\"status\"\r\n\t\t\t\t\t\t\t\t\titem={account}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tfalsyValue={Status.Inactive}\r\n\t\t\t\t\t\t\t\t\tthrutyValue={Status.Active}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"accountStatus\")}\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\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};\r\n","import React from \"react\";\r\nimport { RouteComponentProps, useHistory } from \"react-router-dom\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Card, Grid, CardHeader, Divider, CardContent, Tabs, Tab } from \"@material-ui/core\";\r\nimport { EditClientBasicInfo } from \"./EditClientBasicInfoPage\";\r\nimport ClientPersonsTable from \"./clientPersons/ClientPersonsTable\";\r\nimport { ClientBrokerTable } from \"./clientBrokers/ClientBrokerTable\";\r\nimport { ClientContractTable } from \"./clientContracts/ClientContractTable\";\r\nimport { useEditClientState } from \"../../../data/listing/clients/hooks/useEditClientState\";\r\nimport { ClientAccountTable } from \"./clientAccounts/ClientAccountTable\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { clientsLocation, ClientEditParts, getClientsEditLocation } from \"./Locations\";\r\n\r\nexport interface EditClientInfo {\r\n\teditPart?: string;\r\n\tclientId?: string;\r\n}\r\n\r\nexport interface EditClientProps extends RouteComponentProps {}\r\n\r\nexport const EditClientPage: React.FunctionComponent = props => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst pageStyles = usePageStyles();\r\n\tconst { editPart, clientId } = props.match.params;\r\n\r\n\tconst history = useHistory();\r\n\tconst [client, editClient, changed] = useEditClientState(clientId);\r\n\r\n\tconst handleSideChange = React.useCallback(\r\n\t\t(event: React.ChangeEvent<{}>, newValue: any) => {\r\n\t\t\thistory.push(getClientsEditLocation(newValue, clientId));\r\n\t\t},\r\n\t\t[history, clientId]\r\n\t);\r\n\r\n\tconst pageTitle = clientId ? \"cilEditTitle\" : \"cilCreateTitle\";\r\n\treturn (\r\n\t\t\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\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\r\n\t\t\t\t\t\t\t\r\n\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\t
\r\n\t\t\t\t\t\t\t{editPart === ClientEditParts.BasicInfo && client && (\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\t{editPart === ClientEditParts.Persons && client && client.cliId && (\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\t{editPart === ClientEditParts.Brokers && client && client.cliId && (\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\t{editPart === ClientEditParts.Contracts && client && client.cliId && (\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\t{editPart === ClientEditParts.Accounts && client && client.cliId && (\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\t);\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { Commission } from \"../types\";\r\n\r\nexport const getAllCommisionsApi = (userId: string) =>\r\n\twebApi({\r\n\t\tmethod: \"GET\",\r\n\t\turl: \"listing/getcommlist\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t},\r\n\t});\r\n\r\nexport default getAllCommisionsApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadAllCommissions } from \"../thunks/loadAllCommissions\";\r\nimport { Commission } from \"../types\";\r\n\r\nexport const useCommissionData = () => {\r\n\tconst data = useSelector(s => s.data.listing.commissions.displayData);\r\n\tconst allData = useSelector(s => s.data.listing.commissions.all);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchLoadAllProducts = React.useCallback(() => dispatch(loadAllCommissions()), [dispatch]);\r\n\r\n\treturn [data, dispatchLoadAllProducts, allData] as [\r\n\t\ttypeof data,\r\n\t\ttypeof dispatchLoadAllProducts,\r\n\t\ttypeof allData\r\n\t];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getAllCommissionsAPI from \"../api/getAllCommisions\";\r\nimport { setData } from \"../commissionsDataReducer\";\r\n\r\nexport const loadAllCommissions = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setData());\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst commissions = await dispatch(getAllCommissionsAPI(userId));\r\n\r\n\tdispatch(setData(commissions || []));\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { Commission } from \"../types\";\r\n\r\nexport const getCommisionApi = (userId: string, commid: string) =>\r\n\twebApi({\r\n\t\tmethod: \"GET\",\r\n\t\turl: \"listing/getcomm\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t\tcommid\r\n\t\t},\r\n\t});\r\n\r\nexport default getCommisionApi;\r\n","import React from \"react\";\r\nimport { useDisplayCommission } from \"../../../data/listing/commissions/hooks/useDisplayCommission\";\r\nimport { Commission } from \"../../../data/listing/commissions/types\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { DisplayProductBasicInfo } from \"./DisplayCommissionBasicInfo\";\r\nimport { ExpansionPanel, ExpansionPanelSummary, Typography, Grid } from \"@material-ui/core\";\r\nimport ExpandMoreIcon from \"@material-ui/icons/ExpandMore\";\r\nimport { useToggleStateDictionary } from \"../../../core/util/hooks\";\r\nimport { DisplayCommissionDetailes } from \"./details/DisplayCommissionDetailes\";\r\n\r\nenum AccordionNames {\r\n\tBasicInfo = \"basicInfo\",\r\n\tDetailes = \"detailes\",\r\n}\r\n\r\nconst accordionNames = Object.values(AccordionNames);\r\n\r\nexport interface DisplayEmployeeProps {\r\n\tid?: string;\r\n}\r\n\r\nexport const DisplayCommission: React.FunctionComponent = ({ id }) => {\r\n\tconst commission = useDisplayCommission(id);\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\tconst [open, toggleOpen] = useToggleStateDictionary(accordionNames, [AccordionNames.BasicInfo]);\r\n\r\n\treturn !commission || !commission.commId ? (\r\n\t\t<>{\"loading placeholder\"}\r\n\t) : (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t}>\r\n\t\t\t\t\t{getString(\"tableBasciInfo\")}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t}>\r\n\t\t\t\t\t{getString(\"commDetailsTitle\")}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport const useViewCommission = () => {\r\n\tconst showWithDrawer = React.useContext(DisplayDrawerContext);\r\n\treturn React.useCallback(\r\n\t\t(commission: Commission) => showWithDrawer(),\r\n\t\t[showWithDrawer]\r\n\t);\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getCommisionApi from \"../api/getCommision\";\r\nimport { setDisplayed } from \"../commissionsDataReducer\";\r\nimport { Commission } from \"../types\";\r\n\r\nexport const loadCommission = (commId: string): ThunkType => async (dispatch, getStore) => {\r\n\tdispatch(setDisplayed());\r\n\r\n\tconst role = await dispatch(getCommission(commId));\r\n\r\n\tdispatch(setDisplayed(role));\r\n};\r\n\r\nexport const getCommission = (proiductId: string): ThunkType> => async (\r\n\tdispatch,\r\n\tgetStore\r\n) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\treturn await dispatch(getCommisionApi(userId, proiductId));\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { Commission } from \"../types\";\r\nimport { loadCommission } from \"../thunks/loadCommission\";\r\n\r\nexport const useDisplayCommission = (commId?: string) => {\r\n\tconst storeCommission = useSelector(\r\n\t\tstore => store.data.listing.commissions.displayed\r\n );\r\n\r\n const displayedCommission = storeCommission && storeCommission.commId === commId ? storeCommission : undefined;\r\n\r\n const displatch = useDispatch();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (commId) {\r\n\t\t\tdisplatch(loadCommission(commId));\r\n\t\t}\r\n }, [displatch, commId]);\r\n\r\n\treturn displayedCommission;\r\n};\r\n","import React from \"react\";\r\nimport {Commission, CommissionStandard } from \"../../../data/listing/commissions/types\";\r\nimport { useDisplaySingleEmementStyles } from \"../../useDisplaySingleEmementStyles\";\r\nimport { DisplayBoolNumber } from \"../../components/common/DisplayBoolNumber\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\n\r\nexport interface DisplayProductBasicInfoProps {\r\n\tcommission: Commission;\r\n}\r\n\r\nexport const DisplayProductBasicInfo: React.FunctionComponent = ({\r\n\tcommission,\r\n}) => {\r\n\tconst style = useDisplaySingleEmementStyles();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\treturn (\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"commissionName\")}\r\n\t\t\t\t{commission.commName}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"commissionNameEN\")}\r\n\t\t\t\t{commission.commNameEn}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"commissionCode\")}\r\n\t\t\t\t{commission.commCode}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"commissionType\")}\r\n\t\t\t\t{commission.commTypeName}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"commissionStandard\")}\r\n\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};\r\n","import { webApi } from \"../../../../../core/http/httpThunks\";\r\nimport { CommissionDetail } from \"../../types\";\r\n\r\nexport const getAllCommissionDetailsApi = (userId: string, commid: string) =>\r\n\twebApi({\r\n\t\tmethod: \"GET\",\r\n\t\turl: \"listing/getcommdetlist\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t\tcommid\r\n\t\t},\r\n\t});\r\n\r\nexport default getAllCommissionDetailsApi;\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport getAllCommissionDetailsApi from \"../../api/commissionDetails/getAllCommissionDetails\";\r\nimport { CommissionDetail } from \"../../types\";\r\n\r\nexport const loadCommissionDetails = (commissionId: string): ThunkType> => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\treturn await dispatch(getAllCommissionDetailsApi(userId, commissionId));\r\n}\r\n","import React from \"react\";\r\nimport { useDispatch } from \"react-redux\";\r\nimport { CommissionDetail } from \"../../types\";\r\nimport { loadCommissionDetails } from \"../../thunks/detailes/loadCommissionDetails\";\r\n\r\nexport const useDetails = (commissionId?: string) => {\r\n\tconst displatch = useDispatch();\r\n\tconst [details, setDetails] = React.useState();\r\n\r\n\tconst loadDetails = React.useCallback(async () => {\r\n\t\tif (commissionId) {\r\n\t\t\tconst loaded = (await displatch(loadCommissionDetails(commissionId))) as any;\r\n\t\t\tsetDetails(loaded || []);\r\n\t\t}\r\n\t}, [displatch, commissionId])\r\n\r\n\tReact.useEffect(() => {\r\n\t\tloadDetails();\r\n\t}, [loadDetails]);\r\n\r\n\treturn [details, loadDetails] as [typeof details, typeof loadDetails]\r\n};\r\n","import React from \"react\";\r\nimport { useDisplaySingleEmementStyles } from \"../../../useDisplaySingleEmementStyles\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { useDetails } from \"../../../../data/listing/commissions/hooks/detailes/useDetails\";\r\nimport { CommissionDetail } from \"../../../../data/listing/commissions/types\";\r\nimport {\r\n\tTableContainer,\r\n\tTable,\r\n\tTableHead,\r\n\tTableCell,\r\n\tTableRow,\r\n\tPaper,\r\n\tTableBody,\r\n\tTypography,\r\n\tGrid,\r\n} from \"@material-ui/core\";\r\n\r\nexport interface DisplayCommissionDetaileProps {\r\n\tcommissionId: string;\r\n}\r\n\r\nexport const DisplayCommissionDetailes: React.FunctionComponent = ({ commissionId }) => {\r\n\tconst style = useDisplaySingleEmementStyles();\r\n\tconst [detailes] = useDetails(commissionId);\r\n\r\n\treturn (\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t{detailes ? : \"loading placeholder\"}\r\n\t\t\t
\r\n\t\t
\r\n\t);\r\n};\r\n\r\ninterface DisplayCommissionDetaileTableProps {\r\n\tdetailes: CommissionDetail[];\r\n}\r\n\r\nconst DisplayCommissionDetaileTable: React.FunctionComponent = ({ detailes }) => {\r\n\tconst { getString, getDateString } = React.useContext(LocalizationContext);\r\n\r\n\tif (detailes.length === 0) {\r\n\t\treturn (\r\n\t\t\t\r\n\t\t\t\t{getString(\"productAttributeEmpty\")}\r\n\t\t\t\r\n\t\t);\r\n\t}\r\n\r\n\treturn (\r\n\t\t\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\t{getString(\"commDetailsDate\")}\r\n\t\t\t\t\t\t{getString(\"commDetailsProductGroup\")}\r\n\t\t\t\t\t\t{getString(\"commDetailsProduct\")}\r\n\t\t\t\t\t\t{getString(\"commDetailsCurrency\")}\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t{detailes.map(attribute => (\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t{getDateString(attribute.fromDate, \"DD.MM.YYYY. HH:mm\")}\r\n\t\t\t\t\t\t\t{attribute.prodGroupName}\r\n\t\t\t\t\t\t\t{attribute.prodName}\r\n\t\t\t\t\t\t\t{attribute.currCode}\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};\r\n","import { getEditLocation } from \"../../../core/util/functions\";\r\n\r\nexport enum CommissionEditParts {\r\n\tBasicInfo = \"basicinfo\",\r\n\tDetails = \"details\",\r\n}\r\n\r\nexport const commissionLocation = \"/listing/codebook/commissions\";\r\n\r\nexport const getCommissionEditLocation = (\r\n\tpart: CommissionEditParts = CommissionEditParts.BasicInfo,\r\n\tcommissionId?: string,\r\n\tdetailId?: string\r\n) => getEditLocation(commissionLocation, part, commissionId, detailId);\r\n\r\nexport const basicInfoEdit = getCommissionEditLocation(\":editPart\" as any, \":commissionId?\");\r\nexport const detailEdit = getCommissionEditLocation(\r\n\tCommissionEditParts.Details,\r\n\t\":commissionId\",\r\n\t\":detaileId?\"\r\n);\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const deleteCommisionApi = (userId: string, commid: string) =>\r\n\twebApi({\r\n\t\tmethod: \"DELETE\",\r\n\t\turl: \"listing/delcomm\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t\tcommid,\r\n\t\t},\r\n\t});\r\n\r\nexport default deleteCommisionApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { deleteCommission } from \"../thunks/deleteCommission\";\r\nimport { setFetchState } from \"../commissionsDataReducer\";\r\n\r\nexport const useCommissionDelete = () => {\r\n\tconst fetchState = useSelector(\r\n\t\tstore => store.data.listing.products.fetchState\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchDeleteProduct = React.useCallback((id: string) => dispatch(deleteCommission(id)), [dispatch]);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tdispatch(setFetchState({ type: \"not-started\" }));\r\n\t}, [dispatch]);\r\n\r\n\treturn [fetchState, dispatchDeleteProduct] as [typeof fetchState, typeof dispatchDeleteProduct];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport deleteCommisionApi from \"../api/deleteCommision\";\r\nimport { setFetchState } from \"../commissionsDataReducer\";\r\n\r\nexport const deleteCommission = (commId: string): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setFetchState({ type: \"started\" }));\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst result = await dispatch(deleteCommisionApi(userId, commId));\r\n\r\n\tdispatch(setFetchState(result !== undefined ? { type: \"successful\" } : { type: \"error\"}));\r\n};\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport ViewIcon from \"@material-ui/icons/InputOutlined\";\r\nimport EditIcon from \"@material-ui/icons/EditOutlined\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Action } from \"material-table\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { useViewCommission } from \"./DisplayCommission\";\r\nimport { useCommissionDelete } from \"../../../data/listing/commissions/hooks/useCommissionDelete\";\r\nimport { Commission } from \"../../../data/listing/commissions/types\";\r\nimport { CommissionEditParts, getCommissionEditLocation } from \"./Locations\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\n\r\nexport const useCommissionActions = (userAccessRights: AccessRights) => {\r\n\tconst { getString } = useContext(LocalizationContext);\r\n\tconst onShowClient = useViewCommission();\r\n\tconst onEditClient = useEditCommissionAction();\r\n\r\n\treturn useMemo(() => {\r\n\t\tconst result: Action[] = [\r\n\t\t\t{\r\n\t\t\t\ticon: () => ,\r\n\t\t\t\ttooltip: getString(\"tableShow\"),\r\n\t\t\t\tonClick: (event, rowData) => onShowClient(rowData as Commission),\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ticon: () => ,\r\n\t\t\t\ttooltip: getString(\"tableEdit\"),\r\n\t\t\t\tonClick: (event, rowData) => onEditClient(rowData as Commission),\r\n\t\t\t\thidden: userAccessRights===AccessRights.ReadOnly\r\n\t\t\t},\r\n\t\t];\r\n\r\n\t\treturn result;\r\n\t}, [onShowClient, getString, onEditClient]);\r\n};\r\n\r\nexport const useDeleteCommissionAction = () => {\r\n\tconst [, deleteCommission] = useCommissionDelete();\r\n\treturn React.useCallback(\r\n\t\tasync (commission: Commission) => {\r\n\t\t\tif (commission.commId) {\r\n\t\t\t\tawait deleteCommission(commission.commId);\r\n\t\t\t}\r\n\t\t},\r\n\t\t[deleteCommission]\r\n\t);\r\n};\r\n\r\nexport const useEditCommissionAction = () => {\r\n\tconst history = useHistory();\r\n\treturn React.useCallback(\r\n\t\t(comm: Commission) =>\r\n\t\t\thistory.push(getCommissionEditLocation(CommissionEditParts.BasicInfo, comm.commId)),\r\n\t\t[history]\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport { Table, TableDataProps } from \"../../components/common/Table\";\r\nimport { useCommissionData } from \"../../../data/listing/commissions/hooks/useCommissionData\";\r\nimport { Commission } from \"../../../data/listing/commissions/types\";\r\nimport { useProductColumns } from \"./useCommissionColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\nimport { useCommissionActions, useDeleteCommissionAction } from \"./useCommissionActions\";\r\n\r\nexport interface CommissionTableProps {\r\n\tuserAccessRights: AccessRights;\r\n}\r\n\r\ntype CommissionTablePropsType = CommissionTableProps & TableDataProps;\r\n\r\nexport const CommissionTable: React.FunctionComponent = ({\r\n\tuserAccessRights,\r\n\t...tableProps\r\n}) => {\r\n\tconst [data, loadAll] = useCommissionData();\r\n\r\n\tconst columns = useProductColumns();\r\n\tconst actions = useCommissionActions(userAccessRights);\r\n\tconst onDeleteClient = useDeleteCommissionAction();\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t{...tableProps}\r\n\t\t\tgetData={loadAll}\r\n\t\t\timmutableData={data}\r\n\t\t\ttitle=\"\"\r\n\t\t\tcolumns={columns}\r\n\t\t\tactions={actions}\r\n\t\t\toptions={{\r\n\t\t\t\ttoolbar: false,\r\n\t\t\t\tpageSize: 10,\r\n\t\t\t\tactionsColumnIndex: -1,\r\n\t\t\t}}\r\n\t\t\teditable={userAccessRights !== AccessRights.ReadOnly ? {\r\n\t\t\t\tonRowDelete: onDeleteClient,\r\n\t\t\t} : {}}\r\n\t\t/>\r\n\t);\r\n};\r\n\r\nexport default CommissionTable;\r\n","import { useContext, useMemo } from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\nimport { Commission, CommissionStandard } from \"../../../data/listing/commissions/types\";\r\nimport React from \"react\";\r\nimport { DisplayBoolNumber } from \"../../components/common/DisplayBoolNumber\";\r\n\r\nexport function useProductColumns() {\r\n\tconst { getString } = useContext(LocalizationContext);\r\n\treturn useMemo(\r\n\t\t() => [\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"commissionName\"),\r\n\t\t\t\tfield: \"commName\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"commissionCode\"),\r\n\t\t\t\tfield: \"commCode\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"commissionType\"),\r\n\t\t\t\tfield: \"commTypeName\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"commissionStandard\"),\r\n\t\t\t\trender: commission => ,\r\n\t\t\t\tcustomSort: (a, b) => a.isStandard - b.isStandard,\r\n\t\t\t\twidth: \"80px\",\r\n\t\t\t},\r\n\t\t],\r\n\t\t[getString]\r\n\t) as Column[];\r\n}\r\n","import React from \"react\";\r\nimport { Grid, CardContent, CardHeader, Divider, Card, Fab } from \"@material-ui/core\";\r\nimport CommissionTable from \"./CommissionTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { SearchBox } from \"../../components/common/SearchBox\";\r\nimport { PageComponent, AccessRights } from \"../../../core/navigation/types\";\r\nimport AddIcon from \"@material-ui/icons/Add\";\r\nimport { useCommissionSearch } from \"../../../data/listing/commissions/hooks/useCommissionSearch\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { getCommissionEditLocation } from \"./Locations\";\r\n\r\nconst CommissionPage: PageComponent = ({ userAccessRights }) => {\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst [search, setSearch] = useCommissionSearch();\r\n\tconst history = useHistory();\r\n\r\n\treturn (\r\n\t\t\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\taction={}\r\n\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\t{userAccessRights === AccessRights.All && (\r\n\t\t\t\t\t history.push(getCommissionEditLocation())}\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};\r\n\r\nexport default CommissionPage;\r\n","import { setSearchTerm } from \"../commissionsDataReducer\";\r\nimport { useSearch } from \"../../../../core/util/storeHooks\";\r\n\r\nexport const useCommissionSearch = () => useSearch(s => s.data.listing.commissions.searchTerm, setSearchTerm);\r\n","import { Commission, ProductValidationState } from \"../types\";\r\nimport { createUseValidator } from \"../../../../core/util/hooks\";\r\n\r\nexport const commissionValidationState: ProductValidationState = {\r\n\tcommCode: true,\r\n\tcommName: true,\r\n};\r\n\r\nexport const useCommissionValidator = createUseValidator(\r\n\tcommissionValidationState\r\n);\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { Commission } from \"../types\";\r\n\r\nexport const createCommisionApi = (userId: string, commision: Commission) =>\r\n\twebApiWithResponse({\r\n\t\tmethod: \"PUT\",\r\n\t\turl: \"listing/newcomm\",\r\n\t\tparams: {\r\n\t\t\tuserId\r\n\t\t},\r\n\t\tdata: commision\r\n\t});\r\n\r\nexport default createCommisionApi;\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { Commission } from \"../types\";\r\n\r\nexport const updateCommisionApi = (userId: string, commission: Commission) =>\r\n\twebApiWithResponse({\r\n\t\tmethod: \"PUT\",\r\n\t\turl: \"listing/updcomm\",\r\n\t\tparams: {\r\n\t\t\tuserId\r\n\t\t},\r\n\t\tdata: commission\r\n\t});\r\n\r\nexport default updateCommisionApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { upsertCommission } from \"../thunks/upsertCommission\";\r\nimport { setFetchState } from \"../commissionsDataReducer\";\r\nimport { Commission } from \"../types\";\r\n\r\nexport const useCommissionUpsert = () => {\r\n\tconst fetchState = useSelector(\r\n\t\tstore => store.data.listing.commissions.fetchState\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchUpsertRole = React.useCallback(\r\n\t\t(commision: Commission) => dispatch(upsertCommission(commision)),\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tdispatch(setFetchState({ type: \"not-started\" }))\r\n\t}, [dispatch])\r\n\r\n\treturn [fetchState, dispatchUpsertRole] as [typeof fetchState, typeof dispatchUpsertRole]\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport createCommisionApi from \"../api/createCommision\";\r\nimport updateCommisionApi from \"../api/updateCommision\";\r\nimport { setFetchState } from \"../commissionsDataReducer\";\r\nimport { Commission } from \"../types\";\r\n\r\nexport const upsertCommission = (commission: Commission): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setFetchState({ type: \"started\" }));\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst result = commission.commId\r\n\t\t? await dispatch(updateCommisionApi(userId, commission))\r\n\t\t: await dispatch(createCommisionApi(userId, commission));\r\n\r\n\tif (result && result.resCode === \"OK\") {\r\n\t\tdispatch(setFetchState({ type: \"successful\", result: result.resDesc }));\r\n\t\treturn result.resDesc;\r\n\t} else {\r\n\t\tdispatch(setFetchState({ type: \"error\", errorCode: result?.resCode }));\r\n\t}\r\n};\r\n","import { useSelector } from \"react-redux\";\r\nimport { StoreType } from \"../../../core/store/reducers\";\r\nimport { CommissionType } from \"../../models\";\r\n\r\nconst getTypeLabel = (type?: CommissionType) => (type ? type.ftDescr : \"\");\r\n\r\nexport const useCommissionTypes = () => {\r\n\tconst types = useSelector(store => store.data.initialData.commisionTypes);\r\n\r\n\treturn [types, getTypeLabel] as [typeof types, typeof getTypeLabel];\r\n};\r\n","import React from \"react\";\r\nimport { useCommissionTypes } from \"../../../data/initialData/hooks/useCommissionTypes\";\r\nimport { CommissionType } from \"../../../data/models\";\r\nimport { AutocompleteSelect, AutocompleteSelectType } from \"./AutocompleteSelect\";\r\n\r\ntype ProductGroupSelectPropsType = Omit, \"data\" | \"getLabel\">;\r\n\r\nexport const CommissionTypeSelect: React.FunctionComponent = props => {\r\n\tconst [types, renderTypeLabel] = useCommissionTypes();\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t{...(props as AutocompleteSelectType)}\r\n\t\t\tdata={types}\r\n\t\t\tgetLabel={renderTypeLabel}\r\n\t\t/>\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport { useCommissionValidator } from \"../../../data/listing/commissions/hooks/useCommissionValidator\";\r\nimport { useCommissionUpsert } from \"../../../data/listing/commissions/hooks/useCommissionUpsert\";\r\nimport { Commission, CommissionStandard } from \"../../../data/listing/commissions/types\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Grid } from \"@material-ui/core\";\r\nimport { FabSave } from \"../../components/common/FabSave\";\r\nimport { StringInput } from \"../../components/common/StringInput\";\r\nimport { CommissionTypeSelect } from \"../../components/common/CommissionTypeSelect\";\r\nimport { BoolInput } from \"../../components/common/BoolInput\";\r\nimport { LeavePrompt } from \"../../components/common/LeavePrompt\";\r\nimport { commissionLocation } from \"./Locations\";\r\n\r\nexport interface EditCommissionBasicInfoProps {\r\n\tcommission: Commission;\r\n\teditCommission: (field: keyof Commission, value: any) => void;\r\n\tchanged: boolean;\r\n}\r\n\r\nexport const EditCommissionBasicInfo: React.FunctionComponent = props => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\tconst { commission, editCommission, changed } = props;\r\n\tconst [validationState, validate] = useCommissionValidator();\r\n\tconst [fetchState, upsert] = useCommissionUpsert();\r\n\tconst history = useHistory();\r\n\r\n\tconst unsavedChanges = fetchState.type === \"not-started\" && changed;\r\n\r\n\tconst handleChange = React.useCallback(\r\n\t\t(event: React.ChangeEvent) => {\r\n\t\t\teditCommission(event.target.name as any, event.target.value);\r\n\t\t},\r\n\t\t[editCommission]\r\n\t);\r\n\r\n\tconst save = React.useCallback(() => {\r\n\t\tconst save = async () => {\r\n\t\t\tconst normalized = validate(commission);\r\n\t\t\tif (normalized) {\r\n\t\t\t\tconst newId = await upsert(normalized);\r\n\t\t\t\tif (newId) {\r\n\t\t\t\t\teditCommission(\"commId\", newId);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t\tif (fetchState.type === \"successful\") {\r\n\t\t\thistory.push(commissionLocation);\r\n\t\t} else if (fetchState.type !== \"started\") {\r\n\t\t\tsave();\r\n\t\t}\r\n\t}, [commission, validate, fetchState, editCommission, history, upsert]);\r\n\r\n\tif (!commission) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\treturn (\r\n\t\t<>\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\t\r\n\t\t\t\t\t\t\tproperty=\"commName\"\r\n\t\t\t\t\t\t\titem={commission}\r\n\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\tlabel={getString(\"commissionName\")}\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\t\tproperty=\"commNameEn\"\r\n\t\t\t\t\t\t\titem={commission}\r\n\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\tlabel={getString(\"commissionNameEN\")}\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\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t type.ftValue === commission.commType}\r\n\t\t\t\t\t\t\tonChangeItem={type => editCommission(\"commType\", type?.ftValue)}\r\n\t\t\t\t\t\t\trequired={validationState.commType !== undefined}\r\n\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\tvalidationState.commType !== undefined &&\r\n\t\t\t\t\t\t\t\t!validationState.commType\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\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tproperty=\"commCode\"\r\n\t\t\t\t\t\t\titem={commission}\r\n\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\tlabel={getString(\"commissionCode\")}\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\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tproperty=\"isStandard\"\r\n\t\t\t\t\t\t\titem={commission}\r\n\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\tfalsyValue={CommissionStandard.False}\r\n\t\t\t\t\t\t\tthrutyValue={CommissionStandard.True}\r\n\t\t\t\t\t\t\tlabel={getString(\"commissionStandard\")}\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\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n","import { webApi } from \"../../../../../core/http/httpThunks\";\r\n\r\nexport const deleteCommissionDetailApi = (userId: string, commdetid: string) =>\r\n\twebApi({\r\n\t\tmethod: \"DELETE\",\r\n\t\turl: \"listing/delcommdet\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t\tcommdetid\r\n\t\t},\r\n\t});\r\n\r\nexport default deleteCommissionDetailApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\nimport { deleteCommissionDetail } from \"../../thunks/detailes/deleteCommissionDetail\";\r\nimport { setFetchStateAttribute } from \"../../commissionsDataReducer\";\r\n\r\nexport const useDetailDelete = () => {\r\n\tconst fetchState = useSelector(\r\n\t\tstore => store.data.listing.commissions.fetchStateDetail\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchDeleteAttribute = React.useCallback((id: string) => dispatch(deleteCommissionDetail(id)), [\r\n\t\tdispatch,\r\n\t]);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tdispatch(setFetchStateAttribute({ type: \"not-started\" }));\r\n\t}, [dispatch]);\r\n\r\n\treturn [fetchState, dispatchDeleteAttribute] as [typeof fetchState, typeof dispatchDeleteAttribute];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport deleteCommissionDetailApi from \"../../api/commissionDetails/deleteCommissionDetail\";\r\nimport { setFetchStateAttribute } from \"../../commissionsDataReducer\";\r\n\r\nexport const deleteCommissionDetail = (detailId: string): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setFetchStateAttribute({ type: \"started\" }));\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst result = await dispatch(deleteCommissionDetailApi(userId, detailId));\r\n\r\n\tdispatch(setFetchStateAttribute(result !== undefined ? { type: \"successful\" } : { type: \"error\" }));\r\n};\r\n","import React from \"react\";\r\nimport { Table, TableDataProps } from \"../../../components/common/Table\";\r\nimport { useDetails } from \"../../../../data/listing/commissions/hooks/detailes/useDetails\";\r\nimport { useDetailDelete } from \"../../../../data/listing/commissions/hooks/detailes/useDetailDelete\";\r\nimport { CommissionDetail } from \"../../../../data/listing/commissions/types\";\r\nimport { Column, Action } from \"material-table\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport EditIcon from \"@material-ui/icons/EditOutlined\";\r\nimport { CommissionEditParts, getCommissionEditLocation } from \"../Locations\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { Fab } from \"@material-ui/core\";\r\nimport { usePageStyles } from \"../../../pageStyles\";\r\nimport AddIcon from \"@material-ui/icons/Add\";\r\nimport moment from \"moment\";\r\n\r\nexport interface CommissionTableProps {\r\n\tcommissionId: string;\r\n}\r\n\r\ntype CommissionTablePropsType = CommissionTableProps & TableDataProps;\r\n\r\nexport const CommissionTable: React.FunctionComponent = ({\r\n\tcommissionId,\r\n\t...tableProps\r\n}) => {\r\n\tconst pageStyles = usePageStyles();\r\n\tconst history = useHistory();\r\n\r\n\tconst [data, reload] = useDetails(commissionId);\r\n\r\n\tconst columns = useCommissionColumns();\r\n\tconst actions = useAttributeActions();\r\n\tconst onDeleteAttribute = useDeleteCommissionAction();\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t\r\n\t\t\t\t{...tableProps}\r\n\t\t\t\tgetData={() => {}}\r\n\t\t\t\timmutableData={data}\r\n\t\t\t\ttitle=\"\"\r\n\t\t\t\tcolumns={columns}\r\n\t\t\t\tactions={actions}\r\n\t\t\t\toptions={{\r\n\t\t\t\t\ttoolbar: false,\r\n\t\t\t\t\tpageSize: 5,\r\n\t\t\t\t\tactionsColumnIndex: -1,\r\n\t\t\t\t}}\r\n\t\t\t\teditable={{\r\n\t\t\t\t\tonRowDelete: async broker => {\r\n\t\t\t\t\t\tawait onDeleteAttribute(broker);\r\n\t\t\t\t\t\treload();\r\n\t\t\t\t\t},\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t\t history.push(getCommissionEditLocation(CommissionEditParts.Details, commissionId, \"\"))}\r\n\t\t\t>\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 CommissionTable;\r\n\r\nconst useCommissionColumns = () => {\r\n\tconst { getString, getDateString, getFormatedNumberString } = React.useContext(LocalizationContext);\r\n\treturn React.useMemo(\r\n\t\t() => [\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"commDetailsDate\"),\r\n\t\t\t\trender: detail => getDateString(detail.fromDate),\r\n\t\t\t\tcustomSort: (a, b) => moment(a.fromDate).diff(b.fromDate),\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"commDetailsProductGroup\"),\r\n\t\t\t\tfield: \"prodGroupName\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"commDetailsProduct\"),\r\n\t\t\t\tfield: \"prodName\",\r\n\t\t\t},\r\n/*\t\t\t{\r\n\t\t\t\ttitle: getString(\"commDetailsCurrency\"),\r\n\t\t\t\tfield: \"currCode\",\r\n\t\t\t}, */\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"commDetailsSellPerc\"),\r\n\t\t\t\trender: detail => getFormatedNumberString(detail.percSell, true),\r\n\t\t\t\tcustomSort: (a, b) => a.percSell && b.percSell ? a.percSell - b.percSell : 0,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"commDetailsBuyPerc\"),\r\n\t\t\t\trender: detail => getFormatedNumberString(detail.percBuy, true),\r\n\t\t\t\tcustomSort: (a, b) => a.percBuy && b.percBuy ? a.percBuy - b.percBuy : 0,\r\n\t\t\t},\r\n\t\t],\r\n\t\t[getString, getDateString, getFormatedNumberString]\r\n\t) as Column[];\r\n};\r\n\r\nconst useDeleteCommissionAction = () => {\r\n\tconst [, deleteDetail] = useDetailDelete();\r\n\treturn React.useCallback(\r\n\t\tasync (attribute: CommissionDetail) => {\r\n\t\t\tif (attribute.commDetId) {\r\n\t\t\t\tawait deleteDetail(attribute.commDetId);\r\n\t\t\t}\r\n\t\t},\r\n\t\t[deleteDetail]\r\n\t);\r\n};\r\n\r\nexport const useAttributeActions = () => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst onEditAttribute = useEditDetailAction();\r\n\r\n\treturn React.useMemo(() => {\r\n\t\tconst result: Action[] = [\r\n\t\t\t{\r\n\t\t\t\ticon: () => ,\r\n\t\t\t\ttooltip: getString(\"tableEdit\"),\r\n\t\t\t\tonClick: (event, rowData) => onEditAttribute(rowData as CommissionDetail),\r\n\t\t\t},\r\n\t\t];\r\n\r\n\t\treturn result;\r\n\t}, [getString, onEditAttribute]);\r\n};\r\n\r\nexport const useEditDetailAction = () => {\r\n\tconst history = useHistory();\r\n\treturn React.useCallback(\r\n\t\t(detail: CommissionDetail) =>\r\n\t\t\thistory.push(\r\n\t\t\t\tgetCommissionEditLocation(CommissionEditParts.Details, detail.commId, detail.commDetId)\r\n\t\t\t),\r\n\t\t[history]\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport { useDisplayCommission } from \"./useDisplayCommission\";\r\nimport { Commission, CommissionStandard } from \"../types\";\r\nimport { useCopiedState } from \"../../../../core/util/hooks\";\r\n\r\nexport const defauiltCommission: Commission = {\r\n\tcommCode: \"\",\r\n\tcommName: \"\",\r\n\tisStandard: CommissionStandard.True,\r\n};\r\n\r\nexport const useEditCommission = (commId?: string) => {\r\n\tconst displayed = useDisplayCommission(commId);\r\n\r\n\treturn React.useMemo(() => {\r\n\t\tif (commId !== undefined && displayed === undefined) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\tif (commId === undefined) {\r\n\t\t\treturn { ...defauiltCommission };\r\n\t\t}\r\n\r\n\t\treturn displayed ? { ...displayed } : undefined;\r\n\t}, [commId, displayed]);\r\n};\r\n\r\nexport const useEditCommissionState = (empId?: string) => {\r\n\tconst role = useEditCommission(empId);\r\n\treturn useCopiedState(role);\r\n};\r\n","import { webApi } from \"../../../../../core/http/httpThunks\";\r\nimport { CommissionDetail } from \"../../types\";\r\n\r\nexport const getCommissionDetailApi = (userId: string, commdetid: string) =>\r\n\twebApi({\r\n\t\tmethod: \"GET\",\r\n\t\turl: \"listing/getcommdet\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t\tcommdetid\r\n\t\t},\r\n\t});\r\n\r\nexport default getCommissionDetailApi;\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport getCommissionDetailApi from \"../../api/commissionDetails/getCommissionDetail\";\r\nimport { CommissionDetail } from \"../../types\";\r\n\r\nexport const loadCommissionDetail = (\r\n\tdetailId: string\r\n): ThunkType> => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\treturn await dispatch(getCommissionDetailApi(userId, detailId));\r\n};\r\n","import React from \"react\";\r\nimport { useDetail } from \"./useDetail\";\r\nimport { CommissionDetail, CommissionAmountType } from \"../../types\";\r\nimport { useCopiedState } from \"../../../../../core/util/hooks\";\r\n\r\nexport const createDefaultAttribute = (commissionId: string): CommissionDetail => ({\r\n\tcommId: commissionId,\r\n\tjobType: 0,\r\n\tclientType: 0,\r\n\tclientId: undefined,\r\n\tpercAmtBuy: CommissionAmountType.Percent,\r\n\tpercAmtSell: CommissionAmountType.Percent,\r\n});\r\n\r\nexport const useEditDetailS = (commissionId: string, detailId?: string) => {\r\n\tconst [displayDetail] = useDetail(detailId);\r\n\r\n\treturn React.useMemo(() => {\r\n\t\tif (detailId !== undefined && displayDetail === undefined) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\tif (detailId === undefined) {\r\n\t\t\tconst defaultDetail = createDefaultAttribute(commissionId);\r\n\t\t\treturn { ...defaultDetail };\r\n\t\t}\r\n\r\n\t\treturn displayDetail ? { ...displayDetail } : undefined;\r\n\t}, [commissionId, detailId, displayDetail]);\r\n};\r\n\r\nexport const useEditDetailState = (productId: string, attributeId?: string) => {\r\n\tconst detail = useEditDetailS(productId, attributeId);\r\n\treturn useCopiedState(detail);\r\n};\r\n","import React from \"react\";\r\nimport { useDispatch } from \"react-redux\";\r\nimport { CommissionDetail } from \"../../types\";\r\nimport { loadCommissionDetail } from \"../../thunks/detailes/loadCommissionDetail\";\r\n\r\nexport const useDetail = (detailId?: string) => {\r\n\tconst displatch = useDispatch();\r\n\tconst [detail, setDetail] = React.useState();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tconst load = async () => {\r\n\t\t\tif (detailId) {\r\n\t\t\t\tconst loaded = (await displatch(loadCommissionDetail(detailId))) as any;\r\n\t\t\t\tsetDetail(loaded);\r\n\t\t\t}\r\n\t\t};\r\n\t\tload();\r\n\t}, [displatch, detailId, setDetail]);\r\n\r\n\treturn [detail];\r\n};\r\n","import { CommissionDetail } from \"../../types\";\r\nimport { ValidationState } from \"../../../../../core/util/types\";\r\nimport { createUseValidator } from \"../../../../../core/util/hooks\";\r\n\r\nexport const detailValidation: ValidationState = {\r\n\tfromDate: true,\r\n\tcommId: true,\r\n};\r\n\r\nexport const useDetailValidator = createUseValidator>(\r\n\tdetailValidation,\r\n\t(item, validation) => ({\r\n\t\t...validation,\r\n\t\tpercBuy: !item.percBuy || item.percBuy < 100,\r\n\t\tpercSell: !item.percSell || item.percSell < 100\r\n\t})\r\n);\r\n","import { webApiWithResponse } from \"../../../../../core/http/httpThunks\";\r\nimport { CommissionDetail } from \"../../types\";\r\n\r\nexport const createCommissionDetailApi = (userId: string, detail: CommissionDetail) =>\r\n\twebApiWithResponse({\r\n\t\tmethod: \"PUT\",\r\n\t\turl: \"listing/newcommdet\",\r\n\t\tparams: {\r\n\t\t\tuserId\r\n\t\t},\r\n\t\tdata: detail\r\n\t});\r\n\r\nexport default createCommissionDetailApi;\r\n","import { webApiWithResponse } from \"../../../../../core/http/httpThunks\";\r\nimport { CommissionDetail } from \"../../types\";\r\n\r\nexport const updateCommissionDetailApi = (userId: string, attribute: CommissionDetail) =>\r\n\twebApiWithResponse({\r\n\t\tmethod: \"PUT\",\r\n\t\turl: \"listing/updcommdet\",\r\n\t\tparams: {\r\n\t\t\tuserId\r\n\t\t},\r\n\t\tdata: attribute\r\n\t});\r\n\r\nexport default updateCommissionDetailApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\nimport { upsertCommissionDetail } from \"../../thunks/detailes/upsertCommissionDetail\";\r\nimport { setFetchStateAttribute } from \"../../commissionsDataReducer\";\r\nimport { CommissionDetail } from \"../../types\";\r\n\r\nexport const useDetailUpsert = () => {\r\n\tconst fetchState = useSelector(\r\n\t\tstore => store.data.listing.commissions.fetchStateDetail\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchUpsertDetail = React.useCallback(\r\n\t\t(detail: CommissionDetail) => dispatch(upsertCommissionDetail(detail)),\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tdispatch(setFetchStateAttribute({ type: \"not-started\" }));\r\n\t}, [dispatch]);\r\n\r\n\treturn [fetchState, dispatchUpsertDetail] as [typeof fetchState, typeof dispatchUpsertDetail];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport createCommissionDetailApi from \"../../api/commissionDetails/createCommissionDetail\";\r\nimport updateCommissionDetailApi from \"../../api/commissionDetails/updateCommissionDetail\";\r\nimport { setFetchStateAttribute } from \"../../commissionsDataReducer\";\r\nimport { CommissionDetail } from \"../../types\";\r\n\r\nexport const upsertCommissionDetail = (detail: CommissionDetail): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setFetchStateAttribute({ type: \"started\" }));\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst result = detail.commDetId\r\n\t\t? await dispatch(updateCommissionDetailApi(userId, detail))\r\n\t\t: await dispatch(createCommissionDetailApi(userId, detail));\r\n\r\n\tif (result && result.resCode === \"OK\") {\r\n\t\tdispatch(setFetchStateAttribute({ type: \"successful\", result: result.resDesc }));\r\n\t\treturn result.resDesc;\r\n\t} else {\r\n\t\tdispatch(setFetchStateAttribute({ type: \"error\", errorCode: result?.resCode }));\r\n\t}\r\n};\r\n","import { useSelector } from \"react-redux\";\r\nimport { StoreType } from \"../../../core/store/reducers\";\r\nimport { ProductGroup } from \"../../models\";\r\n\r\nconst getGroupLabel = (attribute?: ProductGroup) => (attribute ? attribute.prodGroupName : \"\");\r\n\r\nexport const useInitProductGroups = () => {\r\n\tconst groups = useSelector(store => store.data.initialData.productGroups);\r\n\r\n\treturn [groups, getGroupLabel] as [typeof groups, typeof getGroupLabel];\r\n};\r\n","import React from \"react\";\r\nimport { useInitProductGroups } from \"../../../data/initialData/hooks/useInitProductGroups\";\r\nimport { ProductGroup } from \"../../../data/models\";\r\nimport { AutocompleteSelect, AutocompleteSelectType } from \"./AutocompleteSelect\";\r\n\r\ntype ProductGroupSelectPropsType = Omit, \"data\" | \"getLabel\">;\r\n\r\nexport const ProductGroupSelect: React.FunctionComponent = props => {\r\n\tconst [groups, renderGroupLabel] = useInitProductGroups();\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t{...(props as AutocompleteSelectType)}\r\n\t\t\tdata={groups}\r\n\t\t\tgetLabel={renderGroupLabel}\r\n\t\t/>\r\n\t);\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { ProductSelectData } from \"../types\";\r\nimport { Status } from \"../../../models\";\r\n\r\nexport const getProductsFroSelect = (userId: string, status?:Status ) =>\r\n\twebApi({\r\n\t\tmethod: \"GET\",\r\n\t\turl: \"listing/getprodselect\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t\tstatus,\r\n\t\t},\r\n\t});\r\n\r\nexport default getProductsFroSelect;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { ProductSelectData } from \"../types\";\r\nimport { loadProductsForSelect } from \"../thunks/loadProductsForSelect\";\r\nimport { Status } from \"../../../models\";\r\n\r\nexport const useProductSelectData = (status?: Status) => {\r\n\tconst selectProducts = useSelector(\r\n\t\tstore => store.data.listing.products.productsForSelect\r\n );\r\n\r\n const displatch = useDispatch();\r\n\r\n/*\tReact.useEffect(() => {\r\n\t\tif (!selectProducts) {\r\n\t\t\tdisplatch(loadProductsForSelect(status));\r\n\t\t}\r\n }, [displatch, selectProducts,status]); */\r\n\r\n\tReact.useEffect(() => {\r\n\t\t\tdisplatch(loadProductsForSelect(status));\r\n }, [displatch, status]); \r\n\r\n\r\n\treturn selectProducts !== \"loading\" ? selectProducts : undefined;\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getProductsFroSelectApi from \"../api/getProductsFroSelect\";\r\nimport { setProductsForSelect } from \"../productsDataReducer\";\r\nimport { Status } from \"../../../models\";\r\n\r\nexport const loadProductsForSelect = (status?: Status): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst products = await dispatch(getProductsFroSelectApi(userId, status));\r\n\r\n\tdispatch(setProductsForSelect(products || []));\r\n};\r\n","import React from \"react\";\r\nimport { useProductSelectData } from \"../../../data/listing/products/hooks/useProductSelectData\";\r\nimport { ProductSelectData } from \"../../../data/listing/products/types\";\r\nimport { AutocompleteSelectType, AutocompleteSelect } from \"../common/AutocompleteSelect\";\r\nimport { Status } from \"../../../data/models\";\r\n\r\nexport type ProductSelectPropsType = Omit<\r\n\tAutocompleteSelectType,\r\n\t\"data\" | \"getLabel\">& {\tstatus?: Status;};\r\n\r\nexport const ProductSelect: React.FunctionComponent = ({ status, ...props }) => {\r\n\tconst products = useProductSelectData(status);\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t{...props as AutocompleteSelectType}\r\n\t\t\tdata={products}\r\n\t\t\tgetLabel={renderEmployeeLabel}\r\n\t\t/>\r\n\t);\r\n};\r\n\r\nconst renderEmployeeLabel = (product: ProductSelectData | null) =>\r\n\tproduct ? `${product.prodName} ${renderCode(product.prodCode)}` : \"\";\r\n\r\nconst renderCode = (id?: string) => (id ? `(${id})` : \"\");\r\n","import React from \"react\";\r\nimport { StringInput, StringInputPropsType } from \"./StringInput\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport NumberFormat from \"react-number-format\";\r\n\r\nexport type NumberInputProps = StringInputPropsType & {\r\n\tmoney?: boolean;\r\n\tdecimalCount?: number;\r\n};\r\n\r\ninterface NumberFormatCustomProps {\r\n\tinputRef: (instance: NumberFormat | null) => void;\r\n\tonChange: (event: { target: { name: string; value: string } }) => void;\r\n\tname: string;\r\n}\r\n\r\nconst createNumberFormatCustom = (money?: boolean, decimalCount?: number) => (props: NumberFormatCustomProps) => {\r\n\tconst { inputRef, onChange, ...other } = props;\r\n\tconst { getSeparators } = React.useContext(LocalizationContext);\r\n\tconst separators = getSeparators()\r\n\tconst decimalScale = money ? 2 : decimalCount;\r\n\treturn (\r\n\t\t {\r\n\t\t\t\tonChange({\r\n\t\t\t\t\ttarget: {\r\n\t\t\t\t\t\tname: props.name,\r\n\t\t\t\t\t\tvalue: values.value,\r\n\t\t\t\t\t},\r\n\t\t\t\t});\r\n\t\t\t}}\r\n\t\t\tthousandSeparator={separators.thousands}\r\n\t\t\tdecimalSeparator={separators.decimal}\r\n\t\t\tisNumericString\r\n\t\t\tdecimalScale={decimalScale}\r\n\t\t\tfixedDecimalScale={decimalScale !== undefined}\r\n\t\t/>\r\n\t);\r\n}\r\n\r\ninterface IDisplayValue {\r\n\tvalue: any,\r\n\tdisplayValue: string\r\n}\r\n\r\nconst getDisplayValue = (value: any): IDisplayValue => ({\r\n\tvalue,\r\n\tdisplayValue: value ? value.toString() : \"\"\r\n})\r\n\r\nexport function NumberInput(props: NumberInputProps) {\r\n\tconst { onChange, item, property, InputProps, money, decimalCount, ...otherProps } = props;\r\n\tconst itemValue: any = item && item[property];\r\n\r\n\tconst { getNumber } = React.useContext(LocalizationContext);\r\n\r\n\tconst [displayValuePair, setDisplayPair] = React.useState(getDisplayValue(itemValue));\r\n\tconst [errorMessage, setErrorMessage] = React.useState();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (itemValue !== displayValuePair.value) {\r\n\t\t\tsetDisplayPair(getDisplayValue(itemValue))\r\n\t\t}\r\n\t}, [itemValue, displayValuePair])\r\n\r\n\tconst onNumberChange = React.useCallback(\r\n\t\t(e: React.ChangeEvent) => {\r\n\t\t\tconst displayValue = e.target.value;\r\n\t\t\tconst numberValue = getNumber(displayValue);\r\n\t\t\tconst newErrorMessage = !numberValue && displayValue !== \"\" && numberValue !== 0 ? \"Not a number!\" : undefined;\r\n\t\t\tonChange({\r\n\t\t\t\t...e,\r\n\t\t\t\ttarget: {\r\n\t\t\t\t\t...e.target,\r\n\t\t\t\t\tvalue: numberValue as any,\r\n\t\t\t\t\tname: property,\r\n\t\t\t\t},\r\n\t\t\t});\r\n\t\t\tsetErrorMessage(newErrorMessage);\r\n\t\t\tsetDisplayPair({ \r\n\t\t\t\tvalue: numberValue,\r\n\t\t\t\tdisplayValue: displayValue,\r\n\t\t\t});\r\n\t\t},\r\n\t\t[onChange, setDisplayPair, setErrorMessage, property, getNumber]\r\n\t);\r\n\r\n\tconst NumberFormatCustom = React.useMemo(() => createNumberFormatCustom(money, decimalCount), [money, decimalCount]);\r\n\treturn (\r\n\t\t\r\n\t\t\tvalue={displayValuePair.displayValue}\r\n\t\t\tproperty={property}\r\n\t\t\tonChange={onNumberChange}\r\n\t\t\terrorMessage={errorMessage}\r\n\t\t\titem={item}\r\n\t\t\tInputProps={{\r\n\t\t\t\t...InputProps,\r\n\t\t\t\tinputComponent: NumberFormatCustom as any,\r\n\t\t\t}}\r\n\t\t\t{...otherProps}\r\n\t\t/>\r\n\t);\r\n}\r\n","import React from \"react\";\r\nimport { useEditDetailState } from \"../../../../data/listing/commissions/hooks/detailes/useEditDetailState\";\r\nimport { useDetailValidator } from \"../../../../data/listing/commissions/hooks/detailes/useDetailValidator\";\r\nimport { useDetailUpsert } from \"../../../../data/listing/commissions/hooks/detailes/useDetailUpsert\";\r\nimport { CommissionDetail, CommissionAmountType } from \"../../../../data/listing/commissions/types\";\r\nimport { RouteComponentProps, useHistory } from \"react-router-dom\";\r\nimport { usePageStyles } from \"../../../pageStyles\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { Card, Grid, CardHeader, Divider, CardContent, InputAdornment } from \"@material-ui/core\";\r\nimport { FabSave } from \"../../../components/common/FabSave\";\r\nimport { getCommissionEditLocation, CommissionEditParts } from \"../Locations\";\r\nimport { LeavePrompt } from \"../../../components/common/LeavePrompt\";\r\nimport { PageTitle } from \"../../../components/common/PageTitle\";\r\nimport { DateInput } from \"../../../components/common/DateInput\";\r\nimport { ProductGroupSelect } from \"../../../components/common/ProductGroupSelect\";\r\nimport { ProductSelect } from \"../../../components/listing/ProductSelect\";\r\nimport { CurrencySelect } from \"../../../components/common/CurrencySelect\";\r\nimport { CommissionAmountTypeSelect } from \"./CommissionAmountTypeSelect\";\r\nimport { NumberInput } from \"../../../components/common/NumberInput\";\r\n\r\nexport interface EditCommissionDetailInfo {\r\n\tdetaileId?: string;\r\n\tcommissionId: string;\r\n}\r\n\r\nexport interface EditCommissionDetailProps extends RouteComponentProps {}\r\n\r\nexport const EditCommissionDetail: React.FunctionComponent = props => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst { commissionId, detaileId } = props.match.params;\r\n\tconst [detail, editDetail, changed] = useEditDetailState(commissionId, detaileId);\r\n\tconst [validationState, validate] = useDetailValidator();\r\n\tconst [fetchState, upsert] = useDetailUpsert();\r\n\tconst history = useHistory();\r\n\r\n\tconst unsavedChanges = fetchState.type === \"not-started\" && changed;\r\n\r\n\tconst handleChange = React.useCallback(\r\n\t\t(event: React.ChangeEvent) => {\r\n\t\t\teditDetail(event.target.name as any, event.target.value);\r\n\t\t},\r\n\t\t[editDetail]\r\n\t);\r\n\r\n\tconst backLocation = React.useMemo(\r\n\t\t() => getCommissionEditLocation(CommissionEditParts.Details, commissionId),\r\n\t\t[commissionId]\r\n\t);\r\n\r\n\tconst save = React.useCallback(() => {\r\n\t\tif (fetchState.type === \"successful\") {\r\n\t\t\thistory.push(backLocation);\r\n\t\t} else if (fetchState.type !== \"started\") {\r\n\t\t\tconst normalized = validate(detail);\r\n\t\t\tif (normalized) {\r\n\t\t\t\tupsert(normalized);\r\n\t\t\t}\r\n\t\t}\r\n\t}, [detail, validate, fetchState, history, upsert, backLocation]);\r\n\r\n\tconst pageTitle = detail && detail.commDetId ? \"commDetailsEditTitle\" : \"commDetailsCreateTitle\";\r\n\r\n\tif (!detail) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\treturn (\r\n\t\t\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\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 editDetail(\"fromDate\", date)}\r\n\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\t\tvalidationState.fromDate !== undefined && !validationState.fromDate\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\r\n\t\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 group.prodGroupId === detail.prodGroupId}\r\n\t\t\t\t\t\t\t\t\tonChangeItem={group => {\r\n\t\t\t\t\t\t\t\t\t\teditDetail(\"prodGroupId\", group?.prodGroupId);\r\n\t\t\t\t\t\t\t\t\t\teditDetail(\"prodId\", undefined);\r\n\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\trequired={validationState.prodGroupId !== undefined}\r\n\t\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\t\tvalidationState.prodGroupId !== undefined &&\r\n\t\t\t\t\t\t\t\t\t\t!validationState.prodGroupId\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\r\n\t\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 product.prodId === detail.prodId}\r\n\t\t\t\t\t\t\t\t\tonChangeItem={product => {\r\n\t\t\t\t\t\t\t\t\t\teditDetail(\"prodId\", product?.prodId);\r\n\t\t\t\t\t\t\t\t\t\teditDetail(\"prodGroupId\", undefined);\r\n\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\trequired={validationState.prodId !== undefined}\r\n\t\t\t\t\t\t\t\t\terror={validationState.prodId !== undefined && !validationState.prodId}\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\t\r\n\t\t\t\t\t\t\t{detail.percAmtBuy === CommissionAmountType.Percent && (\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\tproperty=\"percBuy\"\r\n\t\t\t\t\t\t\t\t\t\titem={detail}\r\n\t\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\t\tlabel={getString(\"commDetailsBuyPerc\")}\r\n\t\t\t\t\t\t\t\t\t\tInputProps={{\r\n\t\t\t\t\t\t\t\t\t\t\tendAdornment: %,\r\n\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\tmoney\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)}\r\n\t\t\t\t\t\t\t{detail.percAmtBuy === CommissionAmountType.Amount && (\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\tproperty=\"maxAmtBuy\"\r\n\t\t\t\t\t\t\t\t\t\titem={detail}\r\n\t\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\t\tlabel={getString(\"commDetailsBuyMax\")}\r\n\t\t\t\t\t\t\t\t\t\tmoney\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)}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t{detail.percAmtSell === CommissionAmountType.Percent && (\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\tproperty=\"percSell\"\r\n\t\t\t\t\t\t\t\t\t\titem={detail}\r\n\t\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\t\tlabel={getString(\"commDetailsSellPerc\")}\r\n\t\t\t\t\t\t\t\t\t\tInputProps={{\r\n\t\t\t\t\t\t\t\t\t\t\tendAdornment: %,\r\n\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\tmoney\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)}\r\n\t\t\t\t\t\t\t{detail.percAmtSell === CommissionAmountType.Amount && (\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\tproperty=\"minAmtSell\"\r\n\t\t\t\t\t\t\t\t\t\titem={detail}\r\n\t\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\t\tlabel={getString(\"commDetailsSellMin\")}\r\n\t\t\t\t\t\t\t\t\t\tmoney\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)}\r\n\t\t\t\t\t\t\t{detail.percAmtSell === CommissionAmountType.Amount && (\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\tproperty=\"maxAmtSell\"\r\n\t\t\t\t\t\t\t\t\t\titem={detail}\r\n\t\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\t\tlabel={getString(\"commDetailsSellMax\")}\r\n\t\t\t\t\t\t\t\t\t\tmoney\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)}\r\n\t\t\t\t\t\t\r\n\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\t);\r\n};\r\n","import CommissionPage from \"./CommissionPage\";\r\nimport { EditCommissionPage } from \"./EditCommissionPage\";\r\nimport { EditCommissionDetail } from \"./details/EditCommissionDetail\";\r\nimport { NavigationItem } from \"../../../core/navigation/types\";\r\nimport { commissionLocation, detailEdit, basicInfoEdit } from \"./Locations\";\r\nexport const commisionsComponents: NavigationItem[] = [\r\n\t{\r\n\t\tComponent: CommissionPage,\r\n\t\tisMenuItem: true,\r\n\t\tpath: commissionLocation,\r\n\t},\r\n\t{\r\n\t\tComponent: EditCommissionDetail,\r\n\t\tisMenuItem: false,\r\n\t\tpath: detailEdit,\r\n\t},\r\n\t{\r\n\t\tComponent: EditCommissionPage,\r\n\t\tisMenuItem: false,\r\n\t\tpath: basicInfoEdit,\r\n\t},\r\n];\r\n","import React from \"react\";\r\nimport { RouteComponentProps, useHistory } from \"react-router-dom\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Card, Grid, CardHeader, Divider, CardContent, Tabs, Tab } from \"@material-ui/core\";\r\nimport { EditCommissionBasicInfo } from \"./EditCommissionBasicInfoPage\";\r\nimport { CommissionTable } from \"./details/CommissionTable\";\r\nimport { useEditCommissionState } from \"../../../data/listing/commissions/hooks/useEditCommissionState\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { commissionLocation, CommissionEditParts, getCommissionEditLocation } from \"./Locations\";\r\n\r\nexport interface EditCommissionPageInfo {\r\n\teditPart?: string;\r\n\tcommissionId?: string;\r\n}\r\n\r\nexport interface EditCommissionPageProps extends RouteComponentProps {}\r\n\r\nexport const EditCommissionPage: React.FunctionComponent = props => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst pageStyles = usePageStyles();\r\n\tconst { editPart, commissionId } = props.match.params;\r\n\r\n\tconst history = useHistory();\r\n\tconst [commission, editCommission, changed] = useEditCommissionState(commissionId);\r\n\r\n\tconst handleSideChange = React.useCallback(\r\n\t\t(event: React.ChangeEvent<{}>, newValue: any) => {\r\n\t\t\thistory.push(getCommissionEditLocation(newValue, commissionId));\r\n\t\t},\r\n\t\t[history, commissionId]\r\n\t);\r\n\r\n\tconst pageTitle = commissionId ? \"commissionEditTitle\" : \"commissionCreateTitle\";\r\n\treturn (\r\n\t\t\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\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\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t{editPart === CommissionEditParts.BasicInfo && commission && (\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\t{editPart === CommissionEditParts.Details && commission && commission.commId && (\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\t);\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { Country } from \"../types\";\r\n\r\nexport const getCountryApi = (userId: string, cntid: string) =>\r\n\twebApi({\r\n\t\tmethod: \"GET\",\r\n\t\turl: \"listing/getcnt\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t\tcntid\r\n\t\t},\r\n\t});\r\n\r\nexport default getCountryApi;\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getCountryApi from \"../api/getCountry\";\r\nimport { setDisplayed } from \"../countriesDataReducer\";\r\nimport { Country } from \"../types\";\r\n\r\nexport const loadCountry = (cntId: string): ThunkType => async (dispatch, getStore) => {\r\n\tdispatch(setDisplayed());\r\n\r\n\tconst country = await dispatch(getCountry(cntId));\r\n\r\n\tdispatch(setDisplayed(country));\r\n};\r\n\r\nexport const getCountry = (cntId: string): ThunkType> => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\treturn await dispatch(getCountryApi(userId, cntId));\r\n}\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { Country } from \"../types\";\r\nimport { loadCountry } from \"../thunks/loadCountry\";\r\n\r\nexport const useDisplayCountry = (cntId?: string) => {\r\n\tconst storeCountry = useSelector(\r\n\t\tstore => store.data.listing.countries.displayedCountry\r\n );\r\n\r\n const displayedCountry = storeCountry && storeCountry.cntId === cntId ? storeCountry : undefined;\r\n\r\n const displatch = useDispatch();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (cntId) {\r\n\t\t\tdisplatch(loadCountry(cntId));\r\n\t\t}\r\n }, [displatch, cntId]);\r\n\r\n\treturn displayedCountry;\r\n};\r\n","import React from \"react\";\r\nimport { useDisplayCountry } from \"./useDisplayCountry\";\r\nimport { Country } from \"../types\";\r\nimport { useCopiedState } from \"../../../../core/util/hooks\";\r\n\r\nexport const defaultCountry: Country = {\r\n\tcntName: \"\",\r\n\tcntNameen: \"\",\r\n};\r\n\r\nexport const useEditCountry = (cntId?: string) => {\r\n\tconst displayCountry = useDisplayCountry(cntId);\r\n\r\n\treturn React.useMemo(() => {\r\n\t\tif (cntId !== undefined && displayCountry === undefined) {\r\n\t\t\treturn undefined;\r\n }\r\n\r\n\t\tif (cntId === undefined) {\r\n\t\t\treturn { ...defaultCountry };\r\n }\r\n\r\n\t\treturn displayCountry ? { ...displayCountry } : undefined;\r\n\t}, [cntId, displayCountry]);\r\n};\r\n\r\nexport const useEditCountryState = (cntId?: string) => {\r\n\tconst country = useEditCountry(cntId);\r\n\treturn useCopiedState(country)\r\n};\r\n","import { Country, CountryValidationState } from \"../types\";\r\nimport { createUseValidator } from \"../../../../core/util/hooks\";\r\n\r\nexport const countryValidationState: CountryValidationState = {\r\n\tcntId: true,\r\n\tcntName: true,\r\n\tcntNameen: true,\r\n};\r\n\r\nexport const useCountryValidator = createUseValidator(countryValidationState);\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { Country } from \"../types\";\r\n\r\nexport const createCountryApi = (userId: string, country: Country) =>\r\n webApiWithResponse({\r\n method: \"PUT\",\r\n url: \"listing/newcnt\",\r\n params: {\r\n userId,\r\n },\r\n data: country,\r\n });\r\n\r\nexport default createCountryApi;\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { Country } from \"../types\";\r\n\r\nexport const updateCountryApi = (userId: string, country: Country) =>\r\n webApiWithResponse({\r\n method: \"PUT\",\r\n url: \"listing/updcnt\",\r\n params: {\r\n userId,\r\n },\r\n data: country,\r\n });\r\n\r\nexport default updateCountryApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { upsertCountry } from \"../thunks/upsertCountry\";\r\nimport { setFetchState } from \"../countriesDataReducer\";\r\nimport { Country } from \"../types\";\r\n\r\nexport const useCountryUpsert = () => {\r\n const fetchState = useSelector(\r\n (store) => store.data.listing.countries.fetchState\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchUpsertCountry = React.useCallback(\r\n (country: Country) => dispatch(upsertCountry(country)),\r\n [dispatch]\r\n );\r\n\r\n React.useEffect(() => {\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n }, [dispatch]);\r\n\r\n return [fetchState, dispatchUpsertCountry] as [\r\n typeof fetchState,\r\n typeof dispatchUpsertCountry\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport createCountryApi from \"../api/createCountry\";\r\nimport updateCountryApi from \"../api/updateCountry\";\r\nimport { setFetchState } from \"../countriesDataReducer\";\r\nimport { Country } from \"../types\";\r\n\r\nexport const upsertCountry = (country: Country): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n dispatch(setFetchState({ type: \"started\" }));\r\n\r\n const { userId } = store.data.auth.current.user;\r\n// const result = country.cntId\r\n const result = country.cntCode\r\n ? await dispatch(updateCountryApi(userId, country))\r\n : await dispatch(createCountryApi(userId, country));\r\n\r\n if (result && result.resCode === \"OK\") {\r\n dispatch(setFetchState({ type: \"successful\", result: result.resDesc }));\r\n return result.resDesc;\r\n } else {\r\n dispatch(setFetchState({ type: \"error\", errorCode: result?.resCode }));\r\n }\r\n};\r\n","import { getEditLocation } from \"../../../core/util/functions\";\r\n\r\nexport const countriesLocation = \"/listing/codebook/countries\";\r\nexport const getCountryEditLocation = (id?: string) => getEditLocation(countriesLocation, undefined, id);\r\nexport const editRouter = getCountryEditLocation(\":cntId?\");\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { Country } from \"../types\";\r\n\r\nexport const getAllCountyApi = (userId: string) =>\r\n webApi({\r\n method: \"GET\",\r\n url: \"listing/getcntlist\",\r\n params: {\r\n userId,\r\n },\r\n });\r\n\r\nexport default getAllCountyApi;\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getAllCountriesAPI from \"../api/getAllCountries\";\r\nimport { setData } from \"../countriesDataReducer\";\r\n\r\nexport const loadAllCountries = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setData());\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst countris = await dispatch(getAllCountriesAPI(userId));\r\n\r\n\tdispatch(setData(countris || []));\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadAllCountries } from \"../thunks/loadAllCountries\";\r\nimport { Country } from \"../types\";\r\n\r\nexport const useCountryData = () => {\r\n\tconst data = useSelector(s => s.data.listing.countries.displayData);\r\n\tconst allData = useSelector(s => s.data.listing.countries.all);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchLoadAllCountries = React.useCallback(() => dispatch(loadAllCountries()), [dispatch]);\r\n\r\n\treturn [data, dispatchLoadAllCountries, allData] as [\r\n\t\ttypeof data,\r\n\t\ttypeof dispatchLoadAllCountries,\r\n\t\ttypeof allData\r\n\t];\r\n};\r\n\r\nexport const useCountry = (id?: string) => {\r\n\tconst [countryGetter] = useCountryGetter();\r\n\treturn countryGetter(id);\r\n};\r\n\r\nexport const useCountryGetter = () => {\r\n\tconst allData = useSelector(s => s.data.listing.countries.all);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchLoadAllCountries = React.useCallback(() => dispatch(loadAllCountries()), [dispatch]);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (!allData) {\r\n\t\t\tdispatchLoadAllCountries();\r\n\t\t}\r\n\t}, [allData, dispatchLoadAllCountries]);\r\n\r\n\tconst getCountry = React.useCallback(\r\n\t\t(id?: string) => {\r\n\t\t\tif (!allData) {\r\n\t\t\t\treturn undefined;\r\n\t\t\t} else {\r\n\t\t\t\treturn allData?.find(e => e.cntId === id);\r\n\t\t\t}\r\n\t\t},\r\n\t\t[allData]\r\n\t);\r\n\r\n\treturn [getCountry] as [typeof getCountry];\r\n};\r\n","import React from \"react\";\r\nimport { Country } from \"../../../data/listing/countries/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { useDisplaySingleEmementStyles } from \"../../useDisplaySingleEmementStyles\";\r\n\r\nexport interface DisplayCountryMainAttributesProps {\r\n country: Country;\r\n}\r\n\r\nexport const DisplayCountryMainAttributes: React.FunctionComponent = ({\r\n country,\r\n}) => {\r\n const style = useDisplaySingleEmementStyles();\r\n const { getString } = React.useContext(LocalizationContext);\r\n\r\n return (\r\n
\r\n
\r\n {getString(\"countryCode\")}\r\n {country.cntId}\r\n
\r\n
\r\n {getString(\"countryName\")}\r\n {country.cntName}\r\n
\r\n
\r\n {getString(\"countryNameEN\")}\r\n {country.cntNameen}\r\n
\r\n
\r\n );\r\n};\r\n","import React from \"react\";\r\nimport { useDisplayCountry } from \"../../../data/listing/countries/hooks/useDisplayCountry\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { Country } from \"../../../data/listing/countries/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { DisplayCountryMainAttributes } from \"./DisplayCountryMainAttributes\";\r\nimport { ExpansionPanel, ExpansionPanelSummary, Typography, Grid } from \"@material-ui/core\";\r\n\r\nexport interface DisplayCountriesProps {\r\n\tid?: string;\r\n}\r\n\r\nexport const DisplayCountry: React.FunctionComponent = ({ id }) => {\r\n\tconst country = useDisplayCountry(id);\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\treturn !country ? (\r\n\t\t<>{\"loading placeholder\"}\r\n\t) : (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t{getString(\"tableBasciInfo\")}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport const useViewCountry = () => {\r\n\tconst showWithDrawer = React.useContext(DisplayDrawerContext);\r\n\treturn React.useCallback(\r\n\t\t(country: Country) => showWithDrawer(),\r\n\t\t[showWithDrawer]\r\n\t);\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const deleteCountryApi = (userId: string, cntid: string) =>\r\n\twebApi({\r\n\t\tmethod: \"DELETE\",\r\n\t\turl: \"listing/delcnt\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t\tcntid\r\n\t\t},\r\n\t});\r\n\r\nexport default deleteCountryApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { deleteCountry } from \"../thunks/deleteCountry\";\r\nimport { setFetchState } from \"../countriesDataReducer\";\r\n\r\nexport const useCountryDelete = () => {\r\n const fetchState = useSelector(\r\n (store) => store.data.listing.countries.fetchState\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchDeleteCountry = React.useCallback(\r\n (id: string) => dispatch(deleteCountry(id)),\r\n [dispatch]\r\n );\r\n\r\n React.useEffect(() => {\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n }, [dispatch]);\r\n\r\n return [fetchState, dispatchDeleteCountry] as [\r\n typeof fetchState,\r\n typeof dispatchDeleteCountry\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport deleteCountryApi from \"../api/deleteCountry\";\r\nimport { setFetchState } from \"../countriesDataReducer\";\r\n\r\nexport const deleteCountry = (cntId: string): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n dispatch(setFetchState({ type: \"started\" }));\r\n\r\n const { userId } = store.data.auth.current.user;\r\n const result = await dispatch(deleteCountryApi(userId, cntId));\r\n\r\n dispatch(\r\n setFetchState(\r\n result !== undefined ? { type: \"successful\" } : { type: \"error\" }\r\n )\r\n );\r\n};\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport ViewIcon from \"@material-ui/icons/InputOutlined\";\r\nimport EditIcon from \"@material-ui/icons/EditOutlined\";\r\nimport { Country } from \"../../../data/listing/countries/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Action } from \"material-table\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { useViewCountry } from \"./DisplayCountry\";\r\nimport { useCountryDelete } from \"../../../data/listing/countries/hooks/useCountryDelete\";\r\nimport { getCountryEditLocation } from \"./Locations\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\n\r\nexport const useCountryActions = (userAccessRights: AccessRights) => {\r\n const { getString } = useContext(LocalizationContext);\r\n const onShowCountry = useViewCountry();\r\n const onEditCountry = useEditCountryAction();\r\n\r\n return useMemo(() => {\r\n const result: Action[] = [\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"tableShow\"),\r\n onClick: (event, rowData) => onShowCountry(rowData as Country),\r\n },\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"tableEdit\"),\r\n onClick: (event, rowData) => onEditCountry(rowData as Country),\r\n hidden: userAccessRights===AccessRights.ReadOnly\r\n },\r\n ];\r\n\r\n return result;\r\n }, [onShowCountry, onEditCountry, getString]);\r\n};\r\n\r\nexport const useDeleteCountryAction = () => {\r\n const [, deleteCountry] = useCountryDelete();\r\n return React.useCallback(\r\n async (country: Country) => {\r\n if (country.cntId) {\r\n await deleteCountry(country.cntId);\r\n }\r\n },\r\n [deleteCountry]\r\n );\r\n};\r\n\r\nexport const useEditCountryAction = () => {\r\n const history = useHistory();\r\n return React.useCallback(\r\n (country: Country) =>\r\n history.push(getCountryEditLocation(country.cntId)),\r\n [history]\r\n );\r\n};\r\n","import React from \"react\";\r\nimport { Table, TableDataProps } from \"../../components/common/Table\";\r\nimport { useCountryData } from \"../../../data/listing/countries/hooks/useCountryData\";\r\nimport { Country } from \"../../../data/listing/countries/types\";\r\nimport { useCountryColumns } from \"./useCountryColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\nimport { useCountryActions, useDeleteCountryAction } from \"./useCountryActions\";\r\n\r\nexport interface CountriesTableProps {\r\n\tuserAccessRights: AccessRights;\r\n}\r\n\r\ntype CountryTablePropsType = CountriesTableProps & TableDataProps;\r\n\r\nexport const CountriesTable: React.FunctionComponent = ({\r\n\tuserAccessRights,\r\n\t...tableProps\r\n}) => {\r\n\tconst [data, loadAll] = useCountryData();\r\n\r\n\tconst columns = useCountryColumns();\r\n\tconst actions = useCountryActions(userAccessRights);\r\n\tconst onDeleteCountry = useDeleteCountryAction();\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t{...tableProps}\r\n\t\t\tgetData={loadAll}\r\n\t\t\timmutableData={data}\r\n\t\t\ttitle=\"\"\r\n\t\t\tcolumns={columns}\r\n\t\t\tactions={actions}\r\n\t\t\toptions={{\r\n\t\t\t\ttoolbar: false,\r\n\t\t\t\tpageSize: 10,\r\n\t\t\t\tactionsColumnIndex: -1,\r\n\t\t\t}}\r\n\t\t\teditable={userAccessRights !== AccessRights.ReadOnly ?{\r\n\t\t\t\tonRowDelete: onDeleteCountry,\r\n\t\t\t}: {}}\r\n\t\t/>\r\n\t);\r\n};\r\n\r\nexport default CountriesTable;\r\n","import { useContext, useMemo } from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\nimport { Country } from \"../../../data/listing/countries/types\";\r\n\r\nexport function useCountryColumns() {\r\n const { getString } = useContext(LocalizationContext);\r\n return useMemo(\r\n () => [\r\n {\r\n title: getString(\"countryName\"),\r\n field: \"cntName\",\r\n },\r\n ],\r\n [getString]\r\n ) as Column[];\r\n}\r\n","import { NavigationItem } from \"../../../core/navigation/types\";\r\nimport { EditCountryPage } from \"./EditCountryPage\";\r\nimport CountriesPage from \"./CountriesPage\";\r\nimport { countriesLocation, editRouter } from \"./Locations\";\r\nexport const countriesComponents: NavigationItem[] = [\r\n\t{\r\n\t\tComponent: CountriesPage,\r\n\t\tisMenuItem: true,\r\n\t\tpath: countriesLocation,\r\n\t},\r\n\t{\r\n\t\tComponent: EditCountryPage,\r\n\t\tisMenuItem: false,\r\n\t\tpath: editRouter,\r\n\t},\r\n];\r\n","import React from \"react\";\r\nimport {\r\n Grid,\r\n CardContent,\r\n CardHeader,\r\n Divider,\r\n Card,\r\n Fab,\r\n} from \"@material-ui/core\";\r\nimport CountriesTable from \"./CountriesTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { SearchBox } from \"../../components/common/SearchBox\";\r\nimport { PageComponent, AccessRights } from \"../../../core/navigation/types\";\r\nimport AddIcon from \"@material-ui/icons/Add\";\r\nimport { useCountrySearch } from \"../../../data/listing/countries/hooks/useCountrySearch\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { getCountryEditLocation } from \"./Locations\";\r\n\r\nconst CountriesPage: PageComponent = ({ userAccessRights }) => {\r\n const pageStyles = usePageStyles();\r\n\r\n const [search, setSearch] = useCountrySearch();\r\n const history = useHistory();\r\n\r\n return (\r\n \r\n \r\n \r\n }\r\n action={}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n {userAccessRights === AccessRights.All && (\r\n history.push(getCountryEditLocation())}\r\n >\r\n \r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default CountriesPage;\r\n","import { setSearchTerm } from \"../countriesDataReducer\";\r\nimport { useSearch } from \"../../../../core/util/storeHooks\";\r\n\r\nexport const useCountrySearch = () => useSearch(s => s.data.listing.countries.searchTerm, setSearchTerm);\r\n","import React from \"react\";\r\nimport { useEditCountryState } from \"../../../data/listing/countries/hooks/useEditCountryState\";\r\nimport { useCountryValidator } from \"../../../data/listing/countries/hooks/useCountryValidator\";\r\nimport { useCountryUpsert } from \"../../../data/listing/countries/hooks/useCountryUpsert\";\r\nimport { RouteComponentProps, useHistory } from \"react-router-dom\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport {\r\n Card,\r\n Grid,\r\n CardHeader,\r\n Divider,\r\n CardContent,\r\n} from \"@material-ui/core\";\r\nimport { FabSave } from \"../../components/common/FabSave\";\r\nimport { Country } from \"../../../data/listing/countries/types\";\r\nimport { StringInput } from \"../../components/common/StringInput\";\r\nimport { LeavePrompt } from \"../../components/common/LeavePrompt\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { countriesLocation } from \"./Locations\";\r\n\r\nexport interface EditCountryInfo {\r\n cntId?: string;\r\n}\r\n\r\nexport interface EditCountryProps\r\n extends RouteComponentProps {}\r\n\r\nexport const EditCountryPage: React.FunctionComponent = (\r\n props\r\n) => {\r\n const { getString } = React.useContext(LocalizationContext);\r\n const pageStyles = usePageStyles();\r\n\r\n const [country, editCountry, changed] = useEditCountryState(\r\n props.match.params.cntId\r\n );\r\n const [validationState, validate] = useCountryValidator();\r\n const [fetchState, upsert] = useCountryUpsert();\r\n const history = useHistory();\r\n\r\n const unsavedChanges = fetchState.type === \"not-started\" && changed;\r\n\r\n const handleChange = React.useCallback(\r\n (event: React.ChangeEvent) => {\r\n editCountry(event.target.name as any, event.target.value);\r\n },\r\n [editCountry]\r\n );\r\n\r\n const save = React.useCallback(() => {\r\n if (fetchState.type === \"successful\") {\r\n history.push(countriesLocation);\r\n } else if (fetchState.type !== \"started\") {\r\n const normalized = validate(country);\r\n if (normalized) {\r\n upsert(normalized);\r\n }\r\n }\r\n }, [country, validate, fetchState, history, upsert]);\r\n\r\n const pageTitle = country && country.cntId ? \"countryEdit\" : \"countryCreate\";\r\n\r\n if (!country) {\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 property=\"cntId\"\r\n item={country}\r\n validationState={validationState}\r\n onChange={handleChange}\r\n label={getString(\"countryCode\")}\r\n />\r\n \r\n\r\n \r\n \r\n property=\"cntName\"\r\n item={country}\r\n validationState={validationState}\r\n onChange={handleChange}\r\n label={getString(\"countryName\")}\r\n />\r\n \r\n\r\n \r\n \r\n property=\"cntNameen\"\r\n item={country}\r\n validationState={validationState}\r\n onChange={handleChange}\r\n label={getString(\"countryNameEN\")}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { Currency } from \"../types\";\r\n\r\nexport const getCurrencyApi = (userId: string, currid: string) =>\r\n\twebApi({\r\n\t\tmethod: \"GET\",\r\n\t\turl: \"listing/getcurr\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t\tcurrid\r\n\t\t},\r\n\t});\r\n\r\nexport default getCurrencyApi;\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getCurrencyApi from \"../api/getCurrency\";\r\nimport { setDisplayed } from \"../currenciesDataReducer\";\r\nimport { Currency } from \"../types\";\r\n\r\nexport const loadCurrency = (roleId: string): ThunkType => async (dispatch, getStore) => {\r\n\tdispatch(setDisplayed());\r\n\r\n\tconst role = await dispatch(getCurrency(roleId));\r\n\r\n\tdispatch(setDisplayed(role));\r\n};\r\n\r\nexport const getCurrency = (roleId: string): ThunkType> => async (\r\n\tdispatch,\r\n\tgetStore\r\n) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\treturn await dispatch(getCurrencyApi(userId, roleId));\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { Currency } from \"../types\";\r\nimport { loadCurrency } from \"../thunks/loadCurrency\";\r\n\r\nexport const useDisplayCurrency = (currId?: string) => {\r\n\tconst storeCurrency = useSelector(\r\n\t\tstore => store.data.listing.currencies.displayed\r\n );\r\n\r\n const displayedCurrency = storeCurrency && storeCurrency.currId === currId ? storeCurrency : undefined;\r\n\r\n const displatch = useDispatch();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (currId) {\r\n\t\t\tdisplatch(loadCurrency(currId));\r\n\t\t}\r\n }, [displatch, currId]);\r\n\r\n\treturn displayedCurrency;\r\n};\r\n","import React from \"react\";\r\nimport { useDisplayCurrency } from \"./useDisplayCurrency\";\r\nimport { Currency } from \"../types\";\r\nimport { useCopiedState } from \"../../../../core/util/hooks\";\r\n\r\nexport const defauiltCurrency: Currency = {\r\n\tcurrCode: \"\",\r\n\tcurrName: \"\",\r\n\tnumCode: \"\",\r\n};\r\n\r\nexport const useEditCurrency = (currencyId?: string) => {\r\n\tconst displayCurrency = useDisplayCurrency(currencyId);\r\n\r\n\treturn React.useMemo(() => {\r\n\t\tif (currencyId !== undefined && displayCurrency === undefined) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\tif (currencyId === undefined) {\r\n\t\t\treturn { ...defauiltCurrency };\r\n\t\t}\r\n\r\n\t\treturn displayCurrency ? { ...displayCurrency } : undefined;\r\n\t}, [currencyId, displayCurrency]);\r\n};\r\n\r\nexport const useEditCurrencyState = (empId?: string) => {\r\n\tconst currency = useEditCurrency(empId);\r\n\treturn useCopiedState(currency);\r\n};\r\n","import { Currency, CurrencyValidationState } from \"../types\";\r\nimport { createUseValidator } from \"../../../../core/util/hooks\";\r\n\r\nexport const currencyValidationState: CurrencyValidationState = {\r\n\tcurrCode: true,\r\n\tcurrName: true,\r\n\tnumCode: true,\r\n};\r\n\r\nexport const useCurrencyValidator = createUseValidator(\r\n\tcurrencyValidationState\r\n);\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { Currency } from \"../types\";\r\n\r\nexport const createCurrencyApi = (userId: string, currency: Currency) =>\r\n\twebApiWithResponse({\r\n\t\tmethod: \"PUT\",\r\n\t\turl: \"listing/newcurr\",\r\n\t\tparams: {\r\n\t\t\tuserId\r\n\t\t},\r\n\t\tdata: currency\r\n\t});\r\n\r\nexport default createCurrencyApi;\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { Currency } from \"../types\";\r\n\r\nexport const updateCurrencyApi = (userId: string, currency: Currency) =>\r\n\twebApiWithResponse({\r\n\t\tmethod: \"PUT\",\r\n\t\turl: \"listing/updcurr\",\r\n\t\tparams: {\r\n\t\t\tuserId\r\n\t\t},\r\n\t\tdata: currency\r\n\t});\r\n\r\nexport default updateCurrencyApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { upsertCurrency } from \"../thunks/upsertCurrency\";\r\nimport { setFetchState } from \"../currenciesDataReducer\";\r\nimport { Currency } from \"../types\";\r\n\r\nexport const useCurrencyUpsert = () => {\r\n\tconst fetchState = useSelector(\r\n\t\tstore => store.data.listing.currencies.fetchState\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchUpsert = React.useCallback(\r\n\t\t(product: Currency) => dispatch(upsertCurrency(product)),\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tdispatch(setFetchState({ type: \"not-started\" }))\r\n\t}, [dispatch])\r\n\r\n\treturn [fetchState, dispatchUpsert] as [typeof fetchState, typeof dispatchUpsert]\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport createCurrencyApi from \"../api/createCurrency\";\r\nimport updateCurrencyApi from \"../api/updateCurrency\";\r\nimport { setFetchState } from \"../currenciesDataReducer\";\r\nimport { Currency } from \"../types\";\r\n\r\nexport const upsertCurrency = (currency: Currency): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setFetchState({ type: \"started\" }));\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst result = currency.currId\r\n\t\t? await dispatch(updateCurrencyApi(userId, currency))\r\n\t\t: await dispatch(createCurrencyApi(userId, currency));\r\n\r\n\tif (result && result.resCode === \"OK\") {\r\n\t\tdispatch(setFetchState({ type: \"successful\", result: result.resDesc }));\r\n\t\treturn result.resDesc;\r\n\t} else {\r\n\t\tdispatch(setFetchState({ type: \"error\", errorCode: result?.resCode }));\r\n\t}\r\n};\r\n","import { getEditLocation } from \"../../../core/util/functions\";\r\n\r\nexport const currencyLocation = \"/listing/codebook/currencies\";\r\nexport const getCurrencyEditLocation = (id?: string) => getEditLocation(currencyLocation, undefined, id);\r\n\r\nexport const editRouter = getCurrencyEditLocation(\":currencyId?\");\r\n","import React from \"react\";\r\nimport { Currency } from \"../../../data/listing/currencies/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { useDisplaySingleEmementStyles } from \"../../useDisplaySingleEmementStyles\";\r\n\r\nexport interface DisplayCurrencyBasicInfoProps {\r\n\tcurrency: Currency;\r\n}\r\n\r\nexport const DisplayCurrencyBasicInfo: React.FunctionComponent = ({\r\n\tcurrency,\r\n}) => {\r\n\tconst style = useDisplaySingleEmementStyles();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\treturn (\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"currenciesName\")}\r\n\t\t\t\t{currency.currName}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"currenciesCode\")}\r\n\t\t\t\t{currency.currCode}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"currenciesNumericCode\")}\r\n\t\t\t\t{currency.numCode}\r\n\t\t\t
\r\n\t\t
\r\n\t);\r\n};\r\n","import { ValidationState } from \"../../../core/util/types\";\r\n\r\nexport interface CurrencyRate {\r\n\tcurrRateId?: number;\r\n\tcurrId?: string; // ID valute\r\n\tdate: Date; // datum kursa\r\n\tbuyRate?: number; // kupovni\r\n\tsellRate?: number; // prodajni\r\n\tmidRate?: number; // srednji\r\n\trateFor: CurrencyRateFor; //\r\n}\r\n\r\nexport enum CurrencyRateFor {\r\n\tTrue = 1,\r\n\tFalse = 0,\r\n}\r\n\r\nexport type CurrencyRateValidationState = ValidationState;\r\n","import React from \"react\";\r\nimport { useDisplayCurrency } from \"../../../data/listing/currencies/hooks/useDisplayCurrency\";\r\nimport { Currency } from \"../../../data/listing/currencies/types\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { DisplayCurrencyBasicInfo } from \"./DisplayCurrencyBasicInfo\";\r\nimport { ExpansionPanel, ExpansionPanelSummary, Typography, Grid } from \"@material-ui/core\";\r\n\r\nexport interface DisplayCurrencyProps {\r\n\tid?: string;\r\n}\r\n\r\nexport const DisplayCurrency: React.FunctionComponent = ({ id }) => {\r\n\tconst currency = useDisplayCurrency(id);\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\treturn !currency ? (\r\n\t\t<>{\"loading placeholder\"}\r\n\t) : (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t{getString(\"tableBasciInfo\")}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport const useViewCurrency = () => {\r\n\tconst showWithDrawer = React.useContext(DisplayDrawerContext);\r\n\treturn React.useCallback(\r\n\t\t(currency: Currency) => showWithDrawer(),\r\n\t\t[showWithDrawer]\r\n\t);\r\n};\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport ViewIcon from \"@material-ui/icons/InputOutlined\";\r\nimport EditIcon from \"@material-ui/icons/EditOutlined\";\r\nimport { Currency } from \"../../../data/listing/currencies/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Action } from \"material-table\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { useViewCurrency } from \"./DisplayCurrency\";\r\nimport { getCurrencyEditLocation } from \"./Locations\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\n\r\nexport const useCurrenciesActions = (userAccessRights: AccessRights) => {\r\n\tconst { getString } = useContext(LocalizationContext);\r\n\tconst onShowRole = useViewCurrency();\r\n\tconst onEditRole = useEditCurrencyAction();\r\n\r\n\treturn useMemo(() => {\r\n\t\tconst result: Action[] = [\r\n\t\t\t{\r\n\t\t\t\ticon: () => ,\r\n\t\t\t\ttooltip: getString(\"tableShow\"),\r\n\t\t\t\tonClick: (event, rowData) => onShowRole(rowData as Currency),\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ticon: () => ,\r\n\t\t\t\ttooltip: getString(\"tableEdit\"),\r\n\t\t\t\tonClick: (event, rowData) => onEditRole(rowData as Currency),\r\n\t\t\t\thidden: userAccessRights===AccessRights.ReadOnly\r\n\t\t\t},\r\n\t\t];\r\n\r\n\t\treturn result;\r\n\t}, [onShowRole, onEditRole, getString]);\r\n};\r\n\r\nexport const useEditCurrencyAction = () => {\r\n\tconst history = useHistory();\r\n\treturn React.useCallback((currency: Currency) => history.push(getCurrencyEditLocation(currency.currId)), [\r\n\t\thistory,\r\n\t]);\r\n};\r\n","import React from \"react\";\r\nimport { Table, TableDataProps } from \"../../components/common/Table\";\r\nimport { useCurrencyData } from \"../../../data/listing/currencies/hooks/useCurrencyData\";\r\nimport { Currency } from \"../../../data/listing/currencies/types\";\r\nimport { useCurrenciesColumns } from \"./useCurrenciesColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\nimport { useCurrenciesActions } from \"./useCurrenciesActions\";\r\n\r\nexport interface CompaniesTableProps {\r\n\tuserAccessRights: AccessRights;\r\n}\r\n\r\ntype RolesTablePropsType = CompaniesTableProps & TableDataProps;\r\n\r\nexport const RolesTable: React.FunctionComponent = ({\r\n\tuserAccessRights,\r\n\t...tableProps\r\n}) => {\r\n\tconst [data, loadAll] = useCurrencyData();\r\n\r\n\tconst columns = useCurrenciesColumns();\r\n\tconst actions = useCurrenciesActions(userAccessRights);\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t{...tableProps}\r\n\t\t\tgetData={loadAll}\r\n\t\t\timmutableData={data}\r\n\t\t\ttitle=\"\"\r\n\t\t\tcolumns={columns}\r\n\t\t\tactions={actions}\r\n\t\t\toptions={{\r\n\t\t\t\ttoolbar: false,\r\n\t\t\t\tpageSize: 10,\r\n\t\t\t\tactionsColumnIndex: -1,\r\n\t\t\t}}\r\n\t\t/>\r\n\t);\r\n};\r\n\r\nexport default RolesTable;\r\n","import { useContext, useMemo } from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\nimport { Currency } from \"../../../data/listing/currencies/types\";\r\n\r\nexport function useCurrenciesColumns() {\r\n\tconst { getString } = useContext(LocalizationContext);\r\n\treturn useMemo(\r\n\t\t() => [\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"currenciesName\"),\r\n\t\t\t\tfield: \"currName\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"currenciesCode\"),\r\n\t\t\t\tfield: \"currCode\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"currenciesNumericCode\"),\r\n\t\t\t\tfield: \"numCode\",\r\n\t\t\t},\r\n\t\t],\r\n\t\t[getString]\r\n\t) as Column[];\r\n}\r\n","import { NavigationItem } from \"../../../core/navigation/types\";\r\nimport { EditCurrencyPage } from \"./EditCurrencyPage\";\r\nimport CurrencyPage from \"./CurrencyPage\";\r\nimport { currencyLocation, editRouter } from \"./Locations\";\r\nexport const currencyComponents: NavigationItem[] = [\r\n\t{\r\n\t\tComponent: CurrencyPage,\r\n\t\tisMenuItem: true,\r\n\t\tpath: currencyLocation,\r\n\t},\r\n\t{\r\n\t\tComponent: EditCurrencyPage,\r\n\t\tisMenuItem: false,\r\n\t\tpath: editRouter,\r\n\t},\r\n];\r\n","import React from \"react\";\r\nimport { Grid, CardContent, CardHeader, Divider, Card, Fab } from \"@material-ui/core\";\r\nimport CurrencyTable from \"./CurrenciesTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { SearchBox } from \"../../components/common/SearchBox\";\r\nimport { PageComponent, AccessRights } from \"../../../core/navigation/types\";\r\nimport AddIcon from \"@material-ui/icons/Add\";\r\nimport { useCurrencySearch } from \"../../../data/listing/currencies/hooks/useCurrencySearch\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { getCurrencyEditLocation } from \"./Locations\";\r\n\r\nconst CurrencyPage: PageComponent = ({ userAccessRights }) => {\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst [search, setSearch] = useCurrencySearch();\r\n\tconst history = useHistory();\r\n\r\n\treturn (\r\n\t\t\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\taction={}\r\n\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\t{userAccessRights === AccessRights.All && (\r\n\t\t\t\t\t history.push(getCurrencyEditLocation())}\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};\r\n\r\nexport default CurrencyPage;\r\n","import { setSearchTerm } from \"../currenciesDataReducer\";\r\nimport { useSearch } from \"../../../../core/util/storeHooks\";\r\n\r\nexport const useCurrencySearch = () => useSearch(s => s.data.listing.currencies.searchTerm, setSearchTerm);\r\n","import React from \"react\";\r\nimport { useEditCurrencyState } from \"../../../data/listing/currencies/hooks/useEditCurrencyState\";\r\nimport { useCurrencyValidator } from \"../../../data/listing/currencies/hooks/useCurrencyValidator\";\r\nimport { useCurrencyUpsert } from \"../../../data/listing/currencies/hooks/useCurrencyUpsert\";\r\nimport { Currency } from \"../../../data/listing/currencies/types\";\r\nimport { RouteComponentProps, useHistory } from \"react-router-dom\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Card, Grid, CardHeader, Divider, CardContent } from \"@material-ui/core\";\r\nimport { FabSave } from \"../../components/common/FabSave\";\r\nimport { StringInput } from \"../../components/common/StringInput\";\r\nimport { LeavePrompt } from \"../../components/common/LeavePrompt\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { currencyLocation } from \"./Locations\";\r\n\r\nexport interface EditCurrencyPageInfo {\r\n\tcurrencyId?: string;\r\n}\r\n\r\nexport interface EditCurrencyProps extends RouteComponentProps {}\r\n\r\nexport const EditCurrencyPage: React.FunctionComponent = props => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst [currency, editCurrency, changed] = useEditCurrencyState(props.match.params.currencyId);\r\n\tconst [validationState, validate] = useCurrencyValidator();\r\n\tconst [fetchState, upsert] = useCurrencyUpsert();\r\n\tconst history = useHistory();\r\n\r\n\tconst unsavedChanges = fetchState.type === \"not-started\" && changed;\r\n\r\n\tconst handleChange = React.useCallback(\r\n\t\t(event: React.ChangeEvent) => {\r\n\t\t\teditCurrency(event.target.name as any, event.target.value);\r\n\t\t},\r\n\t\t[editCurrency]\r\n\t);\r\n\r\n\tconst save = React.useCallback(() => {\r\n\t\tif (fetchState.type === \"successful\") {\r\n\t\t\thistory.push(currencyLocation);\r\n\t\t} else if (fetchState.type !== \"started\") {\r\n\t\t\tconst normalized = validate(currency);\r\n\t\t\tif (normalized) {\r\n\t\t\t\tupsert(normalized);\r\n\t\t\t}\r\n\t\t}\r\n\t}, [currency, validate, fetchState, history, upsert]);\r\n\r\n\tconst pageTitle = currency && currency.currId ? \"currenciesEditTitle\" : \"currenciesCreateTitle\";\r\n\r\n\tif (!currency) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\treturn (\r\n\t\t\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\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\tproperty=\"currName\"\r\n\t\t\t\t\t\t\t\t\titem={currency}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"currenciesName\")}\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\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tproperty=\"currCode\"\r\n\t\t\t\t\t\t\t\t\titem={currency}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"currenciesCode\")}\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\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tproperty=\"numCode\"\r\n\t\t\t\t\t\t\t\t\titem={currency}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"currenciesNumericCode\")}\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\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};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { CurrencyRate } from \"../types\";\r\n\r\nexport const getCurrencyRateApi = (userId: string, currrateid: number) =>\r\n\twebApi({\r\n\t\tmethod: \"GET\",\r\n\t\turl: \"listing/getcurrrate\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t\tcurrrateid\r\n\t\t},\r\n\t});\r\n\r\nexport default getCurrencyRateApi;\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getCurrencyRateApi from \"../api/getCurrencyRate\";\r\nimport { setDisplayed } from \"../currencyRatesDataReducer\";\r\nimport { CurrencyRate } from \"../types\";\r\n\r\nexport const loadCurrencyRate = (currencyId: number): ThunkType => async (dispatch, getStore) => {\r\n\tdispatch(setDisplayed());\r\n\r\n\tconst currency = await dispatch(getCurrencyRate(currencyId));\r\n\r\n\tdispatch(setDisplayed(currency));\r\n};\r\n\r\nexport const getCurrencyRate = (currencyId: number): ThunkType> => async (\r\n\tdispatch,\r\n\tgetStore\r\n) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\treturn await dispatch(getCurrencyRateApi(userId, currencyId));\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { CurrencyRate } from \"../types\";\r\nimport { loadCurrencyRate } from \"../thunks/loadCurrencyRate\";\r\n\r\nexport const useDisplayCurrencyRate = (currRateId?: number) => {\r\n\tconst storeCurrencyRate = useSelector(\r\n\t\tstore => store.data.listing.currencyRates.displayed\r\n );\r\n\r\n const displayedCurrencyRate = storeCurrencyRate && storeCurrencyRate.currRateId === currRateId ? storeCurrencyRate : undefined;\r\n\r\n const displatch = useDispatch();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (currRateId) {\r\n\t\t\tdisplatch(loadCurrencyRate(currRateId));\r\n\t\t}\r\n }, [displatch, currRateId]);\r\n\r\n\treturn displayedCurrencyRate;\r\n};\r\n","import React from \"react\";\r\nimport { useDisplayCurrencyRate } from \"./useDisplayCurrencyRate\";\r\nimport { CurrencyRate, CurrencyRateFor } from \"../types\";\r\nimport { useCopiedState } from \"../../../../core/util/hooks\";\r\n\r\nexport const defauiltCurrency: CurrencyRate = {\r\n\tdate: new Date(),\r\n\trateFor: CurrencyRateFor.True,\r\n};\r\n\r\nexport const useEditCurrency = (currencyId?: number) => {\r\n\tconst displayCurrency = useDisplayCurrencyRate(currencyId);\r\n\treturn React.useMemo(() => {\r\n\t\tif (currencyId !== undefined && displayCurrency === undefined) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\tif (currencyId === undefined) {\r\n\t\t\treturn { ...defauiltCurrency };\r\n\t\t}\r\n\r\n\t\treturn displayCurrency ? { ...displayCurrency } : undefined;\r\n\t}, [currencyId, displayCurrency]);\r\n};\r\n\r\nexport const useEditCurrencyState = (rateId?: number) => {\r\n\tconst currency = useEditCurrency(rateId);\r\n\treturn useCopiedState(currency);\r\n};\r\n","import { CurrencyRate, CurrencyRateValidationState } from \"../types\";\r\nimport { createUseValidator } from \"../../../../core/util/hooks\";\r\n\r\nexport const currencyRateValidationState: CurrencyRateValidationState = {\r\n\tcurrId: true,\r\n\tmidRate: true,\r\n\tdate: true,\r\n};\r\n\r\nexport const useCurrencyRateValidator = createUseValidator(\r\n\tcurrencyRateValidationState\r\n);\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { CurrencyRate } from \"../types\";\r\n\r\nexport const createCurrencyRateApi = (userId: string, rate: CurrencyRate) =>\r\n\twebApiWithResponse({\r\n\t\tmethod: \"PUT\",\r\n\t\turl: \"listing/newcurrrate\",\r\n\t\tparams: {\r\n\t\t\tuserId\r\n\t\t},\r\n\t\tdata: rate\r\n\t});\r\n\r\nexport default createCurrencyRateApi;\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { CurrencyRate } from \"../types\";\r\n\r\nexport const updateCurrencyRateApi = (userId: string, rate: CurrencyRate) =>\r\n\twebApiWithResponse({\r\n\t\tmethod: \"PUT\",\r\n\t\turl: \"listing/updcurrrate\",\r\n\t\tparams: {\r\n\t\t\tuserId\r\n\t\t},\r\n\t\tdata: rate\r\n\t});\r\n\r\nexport default updateCurrencyRateApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { upsertCurrencyRate } from \"../thunks/upsertCurrencyRate\";\r\nimport { setFetchState } from \"../currencyRatesDataReducer\";\r\nimport { CurrencyRate } from \"../types\";\r\n\r\nexport const useCurrencyRateUpsert = () => {\r\n\tconst fetchState = useSelector(\r\n\t\tstore => store.data.listing.currencyRates.fetchState\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchUpsert = React.useCallback(\r\n\t\t(product: CurrencyRate) => dispatch(upsertCurrencyRate(product)),\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tdispatch(setFetchState({ type: \"not-started\" }))\r\n\t}, [dispatch])\r\n\r\n\treturn [fetchState, dispatchUpsert] as [typeof fetchState, typeof dispatchUpsert]\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport createCurrencyRateApi from \"../api/createCurrencyRate\";\r\nimport updateCurrencyRateApi from \"../api/updateCurrencyRate\";\r\nimport { setFetchState } from \"../currencyRatesDataReducer\";\r\nimport { CurrencyRate } from \"../types\";\r\n\r\nexport const upsertCurrencyRate = (currency: CurrencyRate): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setFetchState({ type: \"started\" }));\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst result = currency.currRateId\r\n\t\t? await dispatch(updateCurrencyRateApi(userId, currency))\r\n\t\t: await dispatch(createCurrencyRateApi(userId, currency));\r\n\r\n\tif (result && result.resCode === \"OK\") {\r\n\t\tdispatch(setFetchState({ type: \"successful\", result: result.resDesc }));\r\n\t\treturn result.resDesc;\r\n\t} else {\r\n\t\tdispatch(setFetchState({ type: \"error\", errorCode: result?.resCode }));\r\n\t}\r\n};\r\n","import { getEditLocation } from \"../../../core/util/functions\";\r\n\r\nexport const currencyRateLocation = \"/listing/codebook/currencyrates\";\r\nexport const getCurrencyRateEditLocation = (id?: number | string) =>\r\n\tgetEditLocation(currencyRateLocation, undefined, id?.toString());\r\n\r\nexport const editRouter = getCurrencyRateEditLocation(\":rateId?\");\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { CurrencyRate } from \"../types\";\r\n\r\nexport const getAllCurrencyRatesApi = (userId: string, currid?: string) =>\r\n\twebApi({\r\n\t\tmethod: \"GET\",\r\n\t\turl: \"listing/getcurrratelist\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t\tcurrid\r\n\t\t},\r\n\t});\r\n\r\nexport default getAllCurrencyRatesApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadAllCurrencyRates } from \"../thunks/loadAllCurrencyRates\";\r\nimport { CurrencyRate } from \"../types\";\r\n\r\nexport const useCurrencyRateData = () => {\r\n\tconst data = useSelector(s => s.data.listing.currencyRates.displayData);\r\n\tconst allData = useSelector(s => s.data.listing.currencyRates.all);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchLoadAll = React.useCallback(() => dispatch(loadAllCurrencyRates()), [dispatch]);\r\n\r\n\treturn [data, dispatchLoadAll, allData] as [\r\n\t\ttypeof data,\r\n\t\ttypeof dispatchLoadAll,\r\n\t\ttypeof allData\r\n\t];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getAllRatesAPI from \"../api/getAllCurrencyRates\";\r\nimport { setData } from \"../currencyRatesDataReducer\";\r\n\r\nexport const loadAllCurrencyRates = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setData());\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst { displayCurrencyId } = store.data.listing.currencyRates;\r\n\tconst rates = displayCurrencyId ? await dispatch(getAllRatesAPI(userId, displayCurrencyId)) : [];\r\n\r\n\tdispatch(setData(rates || []));\r\n};\r\n","import React from \"react\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { StoreType } from \"../../../core/store/reducers\";\r\nimport { Currency } from \"../../models\";\r\n\r\nexport const getCurrencyLabel = (currency?: Currency) =>\r\n\tcurrency ? `${currency.currName} (${currency.currCode})` : \"\";\r\n\r\nexport const useCurrencies = () => {\r\n\tconst currencies = useSelector(store => store.data.initialData.currencies);\r\n\r\n\treturn [currencies, getCurrencyLabel] as [typeof currencies, typeof getCurrencyLabel];\r\n};\r\n\r\nexport const useCurrency = (currId?: string) => {\r\n\tconst [currencies] = useCurrencies();\r\n\r\n\tconst currency = React.useMemo(() => currencies.find(c => c.currId === currId), [currencies, currId]);\r\n\tconst currencyLabel = React.useMemo(() => getCurrencyLabel(currency), [currency]);\r\n\r\n\treturn [currency, currencyLabel] as [typeof currency, typeof currencyLabel];\r\n};\r\n","import React from \"react\";\r\nimport { CurrencyRate } from \"../../../data/listing/curencyRates/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { useDisplaySingleEmementStyles } from \"../../useDisplaySingleEmementStyles\";\r\nimport { useCurrency } from \"../../../data/initialData/hooks/useCurrencies\";\r\n\r\nexport interface DisplayCurrencyBasicInfoProps {\r\n\trate: CurrencyRate;\r\n}\r\n\r\nexport const DisplayCurrencyBasicInfo: React.FunctionComponent = ({\r\n\trate,\r\n}) => {\r\n\tconst style = useDisplaySingleEmementStyles();\r\n\tconst { getString, getDateString, getFormatedNumberString } = React.useContext(LocalizationContext);\r\n\tconst [currency] = useCurrency(rate.currId)\r\n\treturn (\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"curRateCurrency\")}\r\n\t\t\t\t{currency?.currName}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"curRateDate\")}\r\n\t\t\t\t{getDateString(rate.date)}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"curRateMid\")}\r\n\t\t\t\t{getFormatedNumberString(rate.midRate, true)}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"curRateBuy\")}\r\n\t\t\t\t{getFormatedNumberString(rate.buyRate, true)}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"curRateSell\")}\r\n\t\t\t\t{getFormatedNumberString(rate.sellRate, true)}\r\n\t\t\t
\r\n\t\t
\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport { useDisplayCurrencyRate } from \"../../../data/listing/curencyRates/hooks/useDisplayCurrencyRate\";\r\nimport { CurrencyRate } from \"../../../data/listing/curencyRates/types\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { DisplayCurrencyBasicInfo } from \"./DisplayCurrencyRateBasicInfo\";\r\nimport { ExpansionPanel, ExpansionPanelSummary, Typography, Grid } from \"@material-ui/core\";\r\n\r\nexport interface DisplayCurrencyProps {\r\n\tid?: number;\r\n}\r\n\r\nexport const DisplayCurrency: React.FunctionComponent = ({ id }) => {\r\n\tconst rate = useDisplayCurrencyRate(id);\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\treturn !rate ? (\r\n\t\t<>{\"loading placeholder\"}\r\n\t) : (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t{getString(\"tableBasciInfo\")}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport const useViewCurrency = () => {\r\n\tconst showWithDrawer = React.useContext(DisplayDrawerContext);\r\n\treturn React.useCallback(\r\n\t\t(rate: CurrencyRate) => showWithDrawer(),\r\n\t\t[showWithDrawer]\r\n\t);\r\n};\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport ViewIcon from \"@material-ui/icons/InputOutlined\";\r\nimport EditIcon from \"@material-ui/icons/EditOutlined\";\r\nimport { CurrencyRate } from \"../../../data/listing/curencyRates/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Action } from \"material-table\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { useViewCurrency } from \"./DisplayCurrencyRate\";\r\nimport { getCurrencyRateEditLocation } from \"./Locations\";\r\n\r\nexport const useCurrenciesActions = () => {\r\n\tconst { getString } = useContext(LocalizationContext);\r\n\tconst onShowRole = useViewCurrency();\r\n\tconst onEditRole = useEditCurrencyAction();\r\n\r\n\treturn useMemo(() => {\r\n\t\tconst result: Action[] = [\r\n\t\t\t{\r\n\t\t\t\ticon: () => ,\r\n\t\t\t\ttooltip: getString(\"tableShow\"),\r\n\t\t\t\tonClick: (event, rowData) => onShowRole(rowData as CurrencyRate),\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ticon: () => ,\r\n\t\t\t\ttooltip: getString(\"tableEdit\"),\r\n\t\t\t\tonClick: (event, rowData) => onEditRole(rowData as CurrencyRate),\r\n\t\t\t},\r\n\t\t];\r\n\r\n\t\treturn result;\r\n\t}, [onShowRole, onEditRole, getString]);\r\n};\r\n\r\nexport const useEditCurrencyAction = () => {\r\n\tconst history = useHistory();\r\n\treturn React.useCallback((rate: CurrencyRate) => history.push(getCurrencyRateEditLocation(rate.currRateId)), [\r\n\t\thistory,\r\n\t]);\r\n};\r\n","import React from \"react\";\r\nimport { Table, TableDataProps } from \"../../components/common/Table\";\r\nimport { useCurrencyRateData } from \"../../../data/listing/curencyRates/hooks/useCurrencyRateData\";\r\nimport { CurrencyRate } from \"../../../data/listing/curencyRates/types\";\r\nimport { useCurrencyRatesColumns } from \"./useCurrencyRatesColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\nimport { useCurrenciesActions } from \"./useCurrencyRatesActions\";\r\n\r\nexport interface CurrencyRateTableProps {\r\n\tuserAccessRights: AccessRights;\r\n}\r\n\r\ntype CurrencyRateTablePropsType = CurrencyRateTableProps & TableDataProps;\r\n\r\nexport const CurrencyRateTable: React.FunctionComponent = ({\r\n\tuserAccessRights,\r\n\t...tableProps\r\n}) => {\r\n\tconst [data, loadAll] = useCurrencyRateData();\r\n\r\n\tconst columns = useCurrencyRatesColumns();\r\n\tconst actions = useCurrenciesActions();\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t{...tableProps}\r\n\t\t\tgetData={loadAll}\r\n\t\t\timmutableData={data}\r\n\t\t\ttitle=\"\"\r\n\t\t\tcolumns={columns}\r\n\t\t\tactions={actions}\r\n\t\t\toptions={{\r\n\t\t\t\ttoolbar: false,\r\n\t\t\t\tpageSize: 10,\r\n\t\t\t\tactionsColumnIndex: -1,\r\n\t\t\t}}\r\n\t\t/>\r\n\t);\r\n};\r\n\r\nexport default CurrencyRateTable;\r\n","import { useContext, useMemo } from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\nimport { CurrencyRate } from \"../../../data/listing/curencyRates/types\"\r\nimport moment from \"moment\";\r\n\r\nexport function useCurrencyRatesColumns() {\r\n\tconst { getString, getDateString, getFormatedNumberString } = useContext(LocalizationContext);\r\n\treturn useMemo(\r\n\t\t() => [\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"curRateDate\"),\r\n\t\t\t\tfield: \"Date\",\r\n\t\t\t\trender: rate => getDateString(rate.date),\r\n\t\t\t\tcustomSort: (a, b) => moment(a.date).diff(b.date),\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"curRateMid\"),\r\n\t\t\t\trender: rate => getFormatedNumberString(rate.midRate, true),\r\n\t\t\t\tcustomSort: (a, b) => (a.midRate || 0) - (b.midRate || 0),\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"curRateBuy\"),\r\n\t\t\t\trender: rate => getFormatedNumberString(rate.buyRate, true),\r\n\t\t\t\tcustomSort: (a, b) => (a.buyRate || 0) - (b.buyRate || 0),\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"curRateSell\"),\r\n\t\t\t\trender: rate => getFormatedNumberString(rate.sellRate, true),\r\n\t\t\t\tcustomSort: (a, b) => (a.sellRate || 0) - (b.sellRate || 0),\r\n\t\t\t},\r\n\t\t],\r\n\t\t[getString, getDateString, getFormatedNumberString]\r\n\t) as Column[];\r\n}\r\n","import React from \"react\";\r\nimport {\r\n\tGrid,\r\n\tCardContent,\r\n\tCardHeader,\r\n\tDivider,\r\n\tCard,\r\n\tFab,\r\n\tmakeStyles,\r\n\tTheme,\r\n\tcreateStyles,\r\n} from \"@material-ui/core\";\r\nimport CurrencyTable from \"./CurrencyRateTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { PageComponent, AccessRights } from \"../../../core/navigation/types\";\r\nimport AddIcon from \"@material-ui/icons/Add\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { getCurrencyRateEditLocation } from \"./Locations\";\r\nimport { useCurrencyRateFilter } from \"../../../data/listing/curencyRates/hooks/useCurrencyRateFilter\";\r\nimport { CurrencySelect } from \"../../components/common/CurrencySelect\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\n\r\nconst useCurrencyStyles = makeStyles((theme: Theme) => {\r\n\treturn createStyles({\r\n\t\tcurrencySelect: {\r\n\t\t\twidth: \"250px\",\r\n\t\t},\r\n\t});\r\n});\r\n\r\nconst CurrencyRatePage: PageComponent = ({ userAccessRights }) => {\r\n\tconst pageStyles = usePageStyles();\r\n\tconst styles = useCurrencyStyles();\r\n\tconst [currencyId, setCurrencyId] = useCurrencyRateFilter();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\tconst history = useHistory();\r\n\r\n\treturn (\r\n\t\t\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\taction={\r\n\t\t\t\t\t\t\t setCurrencyId(currency?.currId)}\r\n\t\t\t\t\t\t\t\tpredicate={currency => currency.currId === currencyId}\r\n\t\t\t\t\t\t\t\tclassName={styles.currencySelect}\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\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\t{userAccessRights === AccessRights.All && (\r\n\t\t\t\t\t history.push(getCurrencyRateEditLocation())}\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};\r\n\r\nexport default CurrencyRatePage;\r\n","import { EditCurrencyRatePage } from \"./EditCurrencyRatePage\";\r\nimport CurrencyRatePage from \"./CurrencyRatePage\";\r\nimport { NavigationItem } from \"../../../core/navigation/types\";\r\nimport { currencyRateLocation, editRouter } from \"./Locations\";\r\nexport const ratesComponents: NavigationItem[] = [\r\n\t{\r\n\t\tComponent: CurrencyRatePage,\r\n\t\tisMenuItem: true,\r\n\t\tpath: currencyRateLocation,\r\n\t},\r\n\t{\r\n\t\tComponent: EditCurrencyRatePage,\r\n\t\tisMenuItem: false,\r\n\t\tpath: editRouter,\r\n\t},\r\n];\r\n","import React from \"react\";\r\nimport { setDisplayCurrencyId } from \"../currencyRatesDataReducer\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\n\r\nexport const useCurrencyRateFilter = () => {\r\n\tconst currencyId = useSelector(\r\n\t\tstore => store.data.listing.currencyRates.displayCurrencyId\r\n\t);\r\n\tconst dispatch = useDispatch();\r\n\tconst setDisplayCurrency = React.useCallback(\r\n\t\t(currencyId?: string) => {\r\n\t\t\tdispatch(setDisplayCurrencyId(currencyId));\r\n\t\t},\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\treturn [currencyId, setDisplayCurrency] as [typeof currencyId, typeof setDisplayCurrency];\r\n};\r\n","import React from \"react\";\r\nimport { useEditCurrencyState } from \"../../../data/listing/curencyRates/hooks/useEditCurrencyRateState\";\r\nimport { useCurrencyRateValidator } from \"../../../data/listing/curencyRates/hooks/useCurrencyRateValidator\";\r\nimport { useCurrencyRateUpsert } from \"../../../data/listing/curencyRates/hooks/useCurrencyRateUpsert\";\r\nimport { CurrencyRate } from \"../../../data/listing/curencyRates/types\";\r\nimport { RouteComponentProps, useHistory } from \"react-router-dom\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Card, Grid, CardHeader, Divider, CardContent } from \"@material-ui/core\";\r\nimport { FabSave } from \"../../components/common/FabSave\";\r\nimport { LeavePrompt } from \"../../components/common/LeavePrompt\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { currencyRateLocation } from \"./Locations\";\r\nimport { CurrencySelect } from \"../../components/common/CurrencySelect\";\r\nimport { NumberInput } from \"../../components/common/NumberInput\";\r\nimport { DateInput } from \"../../components/common/DateInput\";\r\n\r\nexport interface EditCurrencyPageInfo {\r\n\trateId?: string;\r\n}\r\n\r\nexport interface EditCurrencyProps extends RouteComponentProps {}\r\n\r\nexport const EditCurrencyRatePage: React.FunctionComponent = props => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst rateId = props.match.params.rateId ? parseInt(props.match.params.rateId) : undefined;\r\n\tconst [rate, editRate, changed] = useEditCurrencyState(rateId);\r\n\tconst [validationState, validate] = useCurrencyRateValidator();\r\n\tconst [fetchState, upsert] = useCurrencyRateUpsert();\r\n\tconst history = useHistory();\r\n\r\n\tconst unsavedChanges = fetchState.type === \"not-started\" && changed;\r\n\r\n\tconst handleChange = React.useCallback(\r\n\t\t(event: React.ChangeEvent) => {\r\n\t\t\teditRate(event.target.name as any, event.target.value);\r\n\t\t},\r\n\t\t[editRate]\r\n\t);\r\n\r\n\tconst save = React.useCallback(() => {\r\n\t\tif (fetchState.type === \"successful\") {\r\n\t\t\thistory.push(currencyRateLocation);\r\n\t\t} else if (fetchState.type !== \"started\") {\r\n\t\t\tconst normalized = validate(rate);\r\n\t\t\tif (normalized) {\r\n\t\t\t\tupsert(normalized);\r\n\t\t\t}\r\n\t\t}\r\n\t}, [rate, validate, fetchState, history, upsert]);\r\n\r\n\tconst pageTitle = rate && rate.currId ? \"curRateEditTitle\" : \"curRateCreateTitle\";\r\n\r\n\tif (!rate) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\treturn (\r\n\t\t\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\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 currency.currId === rate.currId}\r\n\t\t\t\t\t\t\t\t\tonChangeItem={currency => editRate(\"currId\", currency?.currId)}\r\n\t\t\t\t\t\t\t\t\trequired={validationState.currId !== undefined}\r\n\t\t\t\t\t\t\t\t\terror={validationState.currId !== undefined && !validationState.currId}\r\n\t\t\t\t\t\t\t\t\tfullWidth\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\t\r\n\t\t\t\t\t\t\t\t editRate(\"date\", date)}\r\n\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\terror={validationState.date !== undefined && !validationState.date}\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\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\tproperty=\"midRate\"\r\n\t\t\t\t\t\t\t\t\titem={rate}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"curRateMid\")}\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\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tproperty=\"buyRate\"\r\n\t\t\t\t\t\t\t\t\titem={rate}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"curRateBuy\")}\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\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tproperty=\"sellRate\"\r\n\t\t\t\t\t\t\t\t\titem={rate}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"curRateSell\")}\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\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};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { Employee } from \"../types\";\r\n\r\nexport const getEmployee = (userId: string, empid: string) =>\r\n\twebApi({\r\n\t\tmethod: \"GET\",\r\n\t\turl: \"listing/getemployee\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t\tempid\r\n\t\t},\r\n\t});\r\n\r\nexport default getEmployee;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { Employee } from \"../types\";\r\nimport { loadEmployee } from \"../thunks/loadEmployee\";\r\n\r\nexport const useDisplayEmployee = (empId?: string) => {\r\n\tconst storeEmploye = useSelector(\r\n\t\tstore => store.data.listing.employees.displayedEmployee\r\n );\r\n\r\n const displayedEmployee = storeEmploye && storeEmploye.empId === empId ? storeEmploye : undefined;\r\n\r\n const displatch = useDispatch();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (empId) {\r\n\t\t\tdisplatch(loadEmployee(empId));\r\n\t\t}\r\n }, [displatch, empId]);\r\n\r\n\treturn displayedEmployee;\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getEmployee from \"../api/getEmployee\";\r\nimport { setDisplayedEmployee } from \"../employeesDataReducer\";\r\n\r\nexport const loadEmployee = (employeeId: string): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setDisplayedEmployee());\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst employee = await dispatch(getEmployee(userId, employeeId));\r\n\r\n\tdispatch(setDisplayedEmployee(employee));\r\n};\r\n","import React from \"react\";\r\nimport { useDisplayEmployee } from \"./useDisplayEmployee\";\r\nimport { Employee } from \"../types\";\r\nimport { Gender } from \"../../../models\";\r\nimport { Status } from \"../../../../data/models\";\r\nimport { useCopiedState } from \"../../../../core/util/hooks\";\r\n\r\nexport const defauiltEmployee: Employee = {\r\n\taddress: \"\",\r\n\tbranch: \"\",\r\n\tcity: \"\",\r\n\temail: \"\",\r\n\tempIdNumber: \"\",\r\n\tfax: \"\",\r\n\tfirstName: \"\",\r\n\tmidName: \"\",\r\n\tlastName: \"\",\r\n\tgender: Gender.Male,\r\n\tphone: \"\",\r\n\tphoneOffice: \"\",\r\n\tposition: \"\",\r\n\tzipCode: \"\",\r\n\tstatus: Status.Active,\r\n};\r\n\r\nexport const useEditEmployee = (empId?: string) => {\r\n\tconst displayEmployee = useDisplayEmployee(empId);\r\n\r\n\treturn React.useMemo(() => {\r\n\t\tif (empId !== undefined && displayEmployee === undefined) {\r\n\t\t\treturn undefined;\r\n }\r\n\r\n\t\tif (empId === undefined) {\r\n\t\t\treturn { ...defauiltEmployee };\r\n }\r\n\r\n\t\treturn displayEmployee ? { ...displayEmployee } : undefined;\r\n\t}, [empId, displayEmployee]);\r\n};\r\n\r\nexport const useEditEmployeeState = (empId?: string) => {\r\n\tconst employee = useEditEmployee(empId);\r\n\treturn useCopiedState(employee)\r\n};\r\n","import { Employee, EmployeeValidationState } from \"../types\";\r\nimport { createUseValidator } from \"../../../../core/util/hooks\";\r\n\r\nexport const employeeValidation: EmployeeValidationState = {\r\n\temail: true,\r\n\tempIdNumber: true,\r\n\tfirstName: true,\r\n\tgender: true,\r\n\tlastName: true,\r\n}\r\n\r\nexport const useEmployeeValidator = createUseValidator(employeeValidation);\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { Employee } from \"../types\";\r\n\r\nexport const createEmployee = (userId: string, employee: Employee) =>\r\n\twebApiWithResponse({\r\n\t\tmethod: \"PUT\",\r\n\t\turl: \"listing/newemployee\",\r\n\t\tparams: {\r\n\t\t\tuserId\r\n\t\t},\r\n\t\tdata: employee\r\n\t});\r\n\r\nexport default createEmployee;\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { Employee } from \"../types\";\r\n\r\nexport const updateEmployee = (userId: string, employee: Employee) =>\r\n\twebApiWithResponse({\r\n\t\tmethod: \"PUT\",\r\n\t\turl: \"listing/updemployee\",\r\n\t\tparams: {\r\n\t\t\tuserId\r\n\t\t},\r\n\t\tdata: employee\r\n\t});\r\n\r\nexport default updateEmployee;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { upsertEmployee } from \"../thunks/upsertEmployee\";\r\nimport { setFetchStateEmployee } from \"../employeesDataReducer\";\r\nimport { Employee } from \"../types\";\r\n\r\nexport const useEmployeeUpsert = () => {\r\n\tconst fetchState = useSelector(\r\n\t\tstore => store.data.listing.employees.fetchState\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchUpsertEmployee = React.useCallback(\r\n\t\t(employee: Employee) => dispatch(upsertEmployee(employee)),\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tdispatch(setFetchStateEmployee({ type: \"not-started\" }))\r\n\t}, [dispatch])\r\n\r\n\treturn [fetchState, dispatchUpsertEmployee] as [typeof fetchState, typeof dispatchUpsertEmployee]\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport createEmployee from \"../api/createEmployee\";\r\nimport updateEmployee from \"../api/updateEmployee\";\r\nimport { setFetchStateEmployee } from \"../employeesDataReducer\";\r\nimport { Employee } from \"../types\";\r\n\r\nexport const upsertEmployee = (employee: Employee): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setFetchStateEmployee({ type: \"started\" }));\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst result = employee.empId\r\n\t\t? await dispatch(updateEmployee(userId, employee))\r\n\t\t: await dispatch(createEmployee(userId, employee));\r\n\r\n\tif (result && result.resCode === \"OK\") {\r\n\t\tdispatch(setFetchStateEmployee({ type: \"successful\", result: result.resDesc }));\r\n\t\treturn result.resDesc;\r\n\t} else {\r\n\t\tdispatch(setFetchStateEmployee({ type: \"error\", errorCode: result?.resCode }));\r\n\t}\r\n};\r\n","import React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { MenuItem } from \"@material-ui/core\";\r\n\r\nexport const useGenderValues = () => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\treturn React.useMemo(() => {\r\n\t\treturn [\r\n\t\t\t{\r\n\t\t\t\tlabel: getString(\"genderMale\"),\r\n\t\t\t\tvalue: 1,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tlabel: getString(\"genderFemale\"),\r\n\t\t\t\tvalue: 2,\r\n\t\t\t},\r\n\t\t];\r\n\t}, [getString]);\r\n};\r\n\r\nexport const GenderOptions: React.FunctionComponent = props => {\r\n\tconst genderValues = useGenderValues();\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{genderValues.map(option => (\r\n\t\t\t\t\r\n\t\t\t\t\t{option.label}\r\n\t\t\t\t\r\n\t\t\t))}\r\n\t\t\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { useGenderValues } from \"../../components/common/GenderOptions\";\r\nimport { TextField, MenuItem } from \"@material-ui/core\";\r\nimport { Gender } from \"../../../data/models\";\r\n\r\ninterface EmployeeGenderSelectProps {\r\n\tgender: Gender;\r\n\thandleChange: (event: React.ChangeEvent) => void;\r\n\terror: boolean;\r\n}\r\n\r\nexport const EmployeeGenderSelect: React.FunctionComponent = ({\r\n\tgender,\r\n\thandleChange,\r\n\terror,\r\n}) => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n const genderValues = useGenderValues();\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t{genderValues.map(option => (\r\n\t\t\t\t\r\n\t\t\t\t\t{option.label}\r\n\t\t\t\t\r\n\t\t\t))}\r\n\t\t\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport { Employee } from \"../../../data/listing/employees/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { City } from \"../../../data/models\";\r\nimport { CitySelect } from \"../../components/common/CitySelect\";\r\n\r\ninterface EmployeeCitySelectProps {\r\n\temployee: Employee;\r\n\tchangeCity: (city: string, zipCode: string) => void;\r\n}\r\n\r\nexport const EmployeeCitySelect: React.FunctionComponent = ({\r\n\temployee,\r\n\tchangeCity,\r\n}) => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\tconst findEmployeeCity = React.useCallback(\r\n\t\t(c: City) => c.cityName === employee.city || c.zipCode === employee.zipCode,\r\n\t\t[employee]\r\n\t);\r\n\r\n\tconst handleCityChange = React.useCallback(\r\n\t\t(newValue: City | null) => {\r\n\t\t\tchangeCity(newValue ? newValue.cityName : \"\", newValue ? newValue.zipCode : \"\");\r\n\t\t},\r\n\t\t[changeCity]\r\n\t);\r\n\r\n\treturn ;\r\n};\r\n","import { getEditLocation } from \"../../../core/util/functions\";\r\n\r\nexport const employeeLocation = \"/listing/brokers\";\r\nexport const getEmployeeEditLocation = (id?: string) => getEditLocation(employeeLocation, undefined, id);\r\n\r\nexport const editRouter = getEmployeeEditLocation(\":employeeId?\");\r\n","import React from \"react\";\r\nimport { Employee } from \"../../../data/listing/employees/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { DisplayBoolNumber } from \"../../components/common/DisplayBoolNumber\";\r\nimport { useDisplaySingleEmementStyles } from \"../../useDisplaySingleEmementStyles\";\r\nimport { Status } from \"../../../data/models\";\r\n\r\nexport interface DisplayEmployeeMainAttributesProps {\r\n\temployee: Employee;\r\n}\r\n\r\nexport const DisplayEmployeeMainAttributes: React.FunctionComponent = ({\r\n\temployee,\r\n}) => {\r\n\tconst style = useDisplaySingleEmementStyles();\r\n\tconst { getString, getGender, getDateString } = React.useContext(LocalizationContext);\r\n\r\n\treturn (\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"empFirstName\")}\r\n\t\t\t\t{employee.firstName}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"empMidName\")}\r\n\t\t\t\t{employee.midName}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"empLastName\")}\r\n\t\t\t\t{employee.lastName}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"empIdNumber\")}\r\n\t\t\t\t{employee.empIdNumber}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"empGender\")}\r\n\t\t\t\t{getGender(employee.gender)}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"empAddress\")}\r\n\t\t\t\t{employee.address}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"empZipCode\")}\r\n\t\t\t\t{employee.zipCode}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"empCity\")}\r\n\t\t\t\t{employee.city}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"empEmail\")}\r\n\t\t\t\t{employee.email}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"empPhone\")}\r\n\t\t\t\t{employee.phone}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"empOfficePhone\")}\r\n\t\t\t\t{employee.phoneOffice}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"empFax\")}\r\n\t\t\t\t{employee.fax}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"empDateOfBirth\")}\r\n\t\t\t\t\r\n\t\t\t\t\t{employee.dateOfBirth && getDateString(employee.dateOfBirth)}\r\n\t\t\t\t\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"empPosition\")}\r\n\t\t\t\t{employee.position}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"empBranch\")}\r\n\t\t\t\t{employee.branch}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"empStatus\")}\r\n\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};\r\n","import React from \"react\";\r\nimport { useDisplayEmployee } from \"../../../data/listing/employees/hooks/useDisplayEmployee\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { Employee } from \"../../../data/listing/employees/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { DisplayEmployeeMainAttributes } from \"./DisplayEmployeeMainAttributes\";\r\nimport { ExpansionPanel, ExpansionPanelSummary, Typography, Grid } from \"@material-ui/core\";\r\n\r\nexport interface DisplayEmployeeProps {\r\n\tid?: string;\r\n}\r\n\r\nexport const DisplayEmployee: React.FunctionComponent = ({ id }) => {\r\n\tconst employee = useDisplayEmployee(id);\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\treturn !employee ? (\r\n\t\t<>{\"loading placeholder\"}\r\n\t) : (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t{getString(\"tableBasciInfo\")}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport const useViewEmployee = () => {\r\n\tconst showWithDrawer = React.useContext(DisplayDrawerContext);\r\n\treturn React.useCallback(\r\n\t\t(employee: Employee) => showWithDrawer(),\r\n\t\t[showWithDrawer]\r\n\t);\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const deleteEmployeeApi = (userId: string, empid: string) =>\r\n\twebApi({\r\n\t\tmethod: \"DELETE\",\r\n\t\turl: \"listing/delemployee\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t\tempid\r\n\t\t},\r\n\t});\r\n\r\nexport default deleteEmployeeApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { deleteEmployee } from \"../thunks/deleteEmployee\";\r\nimport { setFetchStateEmployee } from \"../employeesDataReducer\";\r\n\r\nexport const useEmployeeDelete = () => {\r\n\tconst fetchState = useSelector(\r\n\t\tstore => store.data.listing.employees.fetchState\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchDeleteEmployee = React.useCallback(\r\n\t\t(id: string) => dispatch(deleteEmployee(id)),\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tdispatch(setFetchStateEmployee({ type: \"not-started\" }))\r\n\t}, [dispatch])\r\n\r\n\treturn [fetchState, dispatchDeleteEmployee] as [typeof fetchState, typeof dispatchDeleteEmployee]\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport deleteEmployeeApi from \"../api/deleteEmployee\";\r\nimport { setFetchStateEmployee } from \"../employeesDataReducer\";\r\n\r\nexport const deleteEmployee = (empId: string): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setFetchStateEmployee({ type: \"started\" }));\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst result = await dispatch(deleteEmployeeApi(userId, empId));\r\n\r\n\tdispatch(setFetchStateEmployee(result !== undefined ? { type: \"successful\" } : { type: \"error\"}));\r\n};\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport ViewIcon from \"@material-ui/icons/InputOutlined\";\r\nimport EditIcon from \"@material-ui/icons/EditOutlined\";\r\nimport { Employee } from \"../../../data/listing/employees/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Action } from \"material-table\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { useViewEmployee } from \"./DisplayEmployee\";\r\nimport { useEmployeeDelete } from \"../../../data/listing/employees/hooks/useEmployeeDelete\";\r\nimport { getEmployeeEditLocation } from \"./Locations\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\n\r\nexport const useEmployeeActions = (userAccessRights: AccessRights) => {\r\n\tconst { getString } = useContext(LocalizationContext);\r\n\tconst onShowEmployee = useViewEmployee();\r\n\tconst onEditEmployee = useEditEmployeeAction();\r\n\r\n\treturn useMemo(() => {\r\n\t\tconst result: Action[] = [\r\n\t\t\t{\r\n\t\t\t\ticon: () => ,\r\n\t\t\t\ttooltip: getString(\"tableShow\"),\r\n\t\t\t\tonClick: (event, rowData) => onShowEmployee(rowData as Employee),\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ticon: () => ,\r\n\t\t\t\ttooltip: getString(\"tableEdit\"),\r\n\t\t\t\tonClick: (event, rowData) => onEditEmployee(rowData as Employee),\r\n\t\t\t\thidden: userAccessRights===AccessRights.ReadOnly\r\n\t\t\t},\r\n\t\t];\r\n\r\n\t\treturn result;\r\n\t}, [onShowEmployee, onEditEmployee, getString]);\r\n};\r\n\r\nexport const useDeleteEmployeeAction = () => {\r\n\tconst [, deleteEmployee] = useEmployeeDelete();\r\n\treturn React.useCallback(\r\n\t\tasync (employee: Employee) => {\r\n\t\t\tif (employee.empId) {\r\n\t\t\t\tawait deleteEmployee(employee.empId);\r\n\t\t\t}\r\n\t\t},\r\n\t\t[deleteEmployee]\r\n\t);\r\n};\r\n\r\nexport const useEditEmployeeAction = () => {\r\n\tconst history = useHistory();\r\n\treturn React.useCallback(\r\n\t\t(employee: Employee) => history.push(getEmployeeEditLocation(employee.empId)),\r\n\t\t[history]\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport { Table, TableDataProps } from \"../../components/common/Table\";\r\nimport { useEmployeeData } from \"../../../data/listing/employees/hooks/useEmployeeData\";\r\nimport { Employee } from \"../../../data/listing/employees/types\";\r\nimport { useEmployeeColumns } from \"./useEmployeeColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\nimport { useEmployeeActions, useDeleteEmployeeAction } from \"./useEmployeeActions\";\r\n\r\nexport interface CompaniesTableProps {\r\n\tuserAccessRights: AccessRights;\r\n}\r\n\r\ntype EmployeesTablePropsType = CompaniesTableProps & TableDataProps;\r\n\r\nexport const EmployeesTable: React.FunctionComponent = ({\r\n\tuserAccessRights,\r\n\t...tableProps\r\n}) => {\r\n\tconst [data, loadAllEmployees] = useEmployeeData();\r\n\r\n\tconst columns = useEmployeeColumns();\r\n\tconst actions = useEmployeeActions(userAccessRights);\r\n\tconst onDeleteEmployee = useDeleteEmployeeAction();\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t{...tableProps}\r\n\t\t\tgetData={loadAllEmployees}\r\n\t\t\timmutableData={data}\r\n\t\t\ttitle=\"\"\r\n\t\t\tcolumns={columns}\r\n\t\t\tactions={actions}\r\n\t\t\toptions={{\r\n\t\t\t\ttoolbar: false,\r\n\t\t\t\tpageSize: 10,\r\n\t\t\t\tactionsColumnIndex: -1,\r\n\t\t\t}}\r\n\t\t\teditable={userAccessRights !== AccessRights.ReadOnly ? {\r\n\t\t\t\tonRowDelete: onDeleteEmployee,\r\n\t\t\t }: {}}\r\n\t\t/>\r\n\t);\r\n};\r\n\r\nexport default EmployeesTable;\r\n","import { useContext, useMemo } from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\nimport { Employee } from \"../../../data/listing/employees/types\";\r\nimport React from \"react\";\r\nimport { Status } from \"../../../data/models\";\r\nimport { DisplayBoolNumber } from \"../../components/common/DisplayBoolNumber\";\r\n\r\nexport function useEmployeeColumns() {\r\n\tconst { getString } = useContext(LocalizationContext);\r\n\treturn useMemo(\r\n\t\t() => [\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"empFirstName\"),\r\n\t\t\t\tfield: \"firstName\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"empLastName\"),\r\n\t\t\t\tfield: \"lastName\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"empIdNumber\"),\r\n\t\t\t\tfield: \"empIdNumber\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"empOfficePhone\"),\r\n\t\t\t\tfield: \"phoneOffice\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"empEmail\"),\r\n\t\t\t\tfield: \"email\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"empStatus\"),\r\n\t\t\t\trender: employee => ,\r\n\t\t\t\tcustomSort: (a, b) => a.status - b.status,\r\n\t\t\t},\r\n\t\t],\r\n\t\t[getString]\r\n\t) as Column[];\r\n}\r\n","import { NavigationItem } from \"../../../core/navigation/types\";\r\nimport { EditEmployeePage } from \"./EditEmployeePage\";\r\nimport EmployeePage from \"./EmployeesPage\";\r\nimport { employeeLocation, editRouter } from \"./Locations\";\r\nexport const employeeComponents: NavigationItem[] = [\r\n\t{\r\n\t\tComponent: EmployeePage,\r\n\t\tisMenuItem: true,\r\n\t\tpath: employeeLocation,\r\n\t},\r\n\t{\r\n\t\tComponent: EditEmployeePage,\r\n\t\tisMenuItem: false,\r\n\t\tpath: editRouter,\r\n\t},\r\n];\r\n","import React from \"react\";\r\nimport { Grid, CardContent, CardHeader, Divider, Card, Fab } from \"@material-ui/core\";\r\nimport EmployeesTable from \"./EmployeesTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { SearchBox } from \"../../components/common/SearchBox\";\r\nimport { PageComponent, AccessRights } from \"../../../core/navigation/types\";\r\nimport AddIcon from \"@material-ui/icons/Add\";\r\nimport { useEmployeeSearch } from \"../../../data/listing/employees/hooks/useEmployeeSearch\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { getEmployeeEditLocation } from \"./Locations\";\r\n\r\nconst EmployeesPage: PageComponent = ({ userAccessRights }) => {\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst [search, setSearch] = useEmployeeSearch();\r\n\tconst history = useHistory();\r\n\r\n\treturn (\r\n\t\t\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\taction={}\r\n\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\t{userAccessRights === AccessRights.All && (\r\n\t\t\t\t\t history.push(getEmployeeEditLocation())}\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};\r\n\r\nexport default EmployeesPage;\r\n","import { setSearchTerm } from \"../employeesDataReducer\";\r\nimport { useSearch } from \"../../../../core/util/storeHooks\";\r\n\r\nexport const useEmployeeSearch = () => useSearch(s => s.data.listing.employees.searchTerm, setSearchTerm);\r\n","import React from \"react\";\r\nimport { useEditEmployeeState } from \"../../../data/listing/employees/hooks/useEditEmployeeState\";\r\nimport { useEmployeeValidator } from \"../../../data/listing/employees/hooks/useEmployeeValidator\";\r\nimport { useEmployeeUpsert } from \"../../../data/listing/employees/hooks/useEmployeeUpsert\";\r\nimport { RouteComponentProps, useHistory } from \"react-router-dom\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Card, Grid, CardHeader, Divider, CardContent } from \"@material-ui/core\";\r\nimport { EmployeeGenderSelect } from \"./EmployeeGenderSelect\";\r\nimport { EmployeeCitySelect } from \"./EmployeeCitySelect\";\r\nimport { FabSave } from \"../../components/common/FabSave\";\r\nimport { Employee } from \"../../../data/listing/employees/types\";\r\nimport { DateInput } from \"../../components/common/DateInput\";\r\nimport { StringInput } from \"../../components/common/StringInput\";\r\nimport { BoolInput } from \"../../components/common/BoolInput\";\r\nimport { Status } from \"../../../data/models\";\r\nimport { LeavePrompt } from \"../../components/common/LeavePrompt\";\r\nimport { employeeLocation } from \"./Locations\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\n\r\nexport interface EditEmployeeInfo {\r\n\temployeeId?: string;\r\n}\r\n\r\nexport interface EditEmployeeProps extends RouteComponentProps {}\r\n\r\nexport const EditEmployeePage: React.FunctionComponent = props => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst [employee, editEmployee, changed] = useEditEmployeeState(props.match.params.employeeId);\r\n\tconst [validationState, validate] = useEmployeeValidator();\r\n\tconst [fetchState, upsert] = useEmployeeUpsert();\r\n\tconst history = useHistory();\r\n\r\n\tconst unsavedChanges = fetchState.type === \"not-started\" && changed;\r\n\r\n\tconst handleChange = React.useCallback(\r\n\t\t(event: React.ChangeEvent) => {\r\n\t\t\teditEmployee(event.target.name as any, event.target.value);\r\n\t\t},\r\n\t\t[editEmployee]\r\n\t);\r\n\r\n\tconst handleDateChange = React.useCallback(\r\n\t\t(date: Date | null) => {\r\n\t\t\teditEmployee(\"dateOfBirth\", date);\r\n\t\t},\r\n\t\t[editEmployee]\r\n\t);\r\n\r\n\tconst changeCity = React.useCallback(\r\n\t\t(city: string, zipCode: string) => {\r\n\t\t\teditEmployee(\"city\", city);\r\n\t\t\teditEmployee(\"zipCode\", zipCode);\r\n\t\t},\r\n\t\t[editEmployee]\r\n\t);\r\n\r\n\tconst save = React.useCallback(() => {\r\n\t\tif (fetchState.type === \"successful\") {\r\n\t\t\thistory.push(employeeLocation);\r\n\t\t} else if (fetchState.type !== \"started\") {\r\n\t\t\tconst normalized = validate(employee);\r\n\t\t\tif (normalized) {\r\n\t\t\t\tupsert(normalized);\r\n\t\t\t}\r\n\t\t}\r\n\t}, [employee, validate, fetchState, history, upsert]);\r\n\r\n\tconst pageTitle = employee && employee.empId ? \"empEditTitle\" : \"empCreateTitle\";\r\n\r\n\tif (!employee) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\treturn (\r\n\t\t\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\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\r\n\t\t\t\t\t\t\t\t\t\tproperty=\"firstName\"\r\n\t\t\t\t\t\t\t\t\t\titem={employee}\r\n\t\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\t\tlabel={getString(\"empFirstName\")}\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\tproperty=\"midName\"\r\n\t\t\t\t\t\t\t\t\t\titem={employee}\r\n\t\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\t\tlabel={getString(\"empMidName\")}\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\tproperty=\"lastName\"\r\n\t\t\t\t\t\t\t\t\t\titem={employee}\r\n\t\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\t\tlabel={getString(\"empLastName\")}\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\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\r\n\t\t\t\t\t\t\t\t\t\tproperty=\"empIdNumber\"\r\n\t\t\t\t\t\t\t\t\t\titem={employee}\r\n\t\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\t\tlabel={getString(\"empIdNumber\")}\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\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\tproperty=\"email\"\r\n\t\t\t\t\t\t\t\t\t\titem={employee}\r\n\t\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\t\tlabel={getString(\"empEmail\")}\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\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\r\n\t\t\t\t\t\t\t\t\t\tproperty=\"address\"\r\n\t\t\t\t\t\t\t\t\t\titem={employee}\r\n\t\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\t\tlabel={getString(\"empAddress\")}\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\r\n\t\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\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\tproperty=\"position\"\r\n\t\t\t\t\t\t\t\t\t\titem={employee}\r\n\t\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\t\tlabel={getString(\"empPosition\")}\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\tproperty=\"branch\"\r\n\t\t\t\t\t\t\t\t\t\titem={employee}\r\n\t\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\t\tlabel={getString(\"empBranch\")}\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\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\r\n\t\t\t\t\t\t\t\t\t\tproperty=\"phone\"\r\n\t\t\t\t\t\t\t\t\t\titem={employee}\r\n\t\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\t\tlabel={getString(\"empPhone\")}\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\tproperty=\"fax\"\r\n\t\t\t\t\t\t\t\t\t\titem={employee}\r\n\t\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\t\tlabel={getString(\"empFax\")}\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\tproperty=\"phoneOffice\"\r\n\t\t\t\t\t\t\t\t\t\titem={employee}\r\n\t\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\t\tlabel={getString(\"empOfficePhone\")}\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\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\r\n\t\t\t\t\t\t\t\t\t\tproperty=\"status\"\r\n\t\t\t\t\t\t\t\t\t\titem={employee}\r\n\t\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\t\tfalsyValue={Status.Inactive}\r\n\t\t\t\t\t\t\t\t\t\tthrutyValue={Status.Active}\r\n\t\t\t\t\t\t\t\t\t\tlabel={getString(\"empStatus\")}\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\r\n\t\t\t\t\t\t\r\n\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\t);\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { ProductGroupData } from \"../types\";\r\n\r\nexport const getAllProductGroupsApi = (userId: string) =>\r\n\twebApi({\r\n\t\tmethod: \"GET\",\r\n\t\turl: \"listing/getprodgrouplist\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t},\r\n\t});\r\n\r\nexport default getAllProductGroupsApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadAllProductGroups } from \"../thunks/loadAllProductGroups\";\r\nimport { ProductGroupData } from \"../types\";\r\n\r\nexport const useProductGroupData = () => {\r\n\tconst data = useSelector(\r\n\t\ts => s.data.listing.productGroups.displayData\r\n\t);\r\n\tconst allData = useSelector(\r\n\t\ts => s.data.listing.productGroups.all\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchLoadAllGroups = React.useCallback(() => dispatch(loadAllProductGroups()), [dispatch]);\r\n\r\n\treturn [data, dispatchLoadAllGroups, allData] as [\r\n\t\ttypeof data,\r\n\t\ttypeof dispatchLoadAllGroups,\r\n\t\ttypeof allData\r\n\t];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getAllProductGroupsAPI from \"../api/getAllProductGroups\";\r\nimport { setData } from \"../productGroupDataReducer\";\r\n\r\nexport const loadAllProductGroups = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setData());\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst groups = await dispatch(getAllProductGroupsAPI(userId));\r\n\r\n\tdispatch(setData(groups || []));\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { ProductGroupData } from \"../types\";\r\n\r\nexport const getProductGroupApi = (userId: string, prodgroupid: string) =>\r\n\twebApi({\r\n\t\tmethod: \"GET\",\r\n\t\turl: \"listing/getprodgroup\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t\tprodgroupid\r\n\t\t},\r\n\t});\r\n\r\nexport default getProductGroupApi;\r\n","import { ValidationState } from \"../../../core/util/types\";\r\nimport { Status } from \"../../models\";\r\nimport { AttributeManditory, AttributeType } from \"../attributes/types\";\r\n\r\nexport interface ProductList {\r\n\tprodId: string;\r\n\tprodName: string;\r\n\tprodCode?: string; // \t\tsifra proizvoda\r\n\tprodGroupName: string;\r\n\tunit: string;\r\n\tvat: string;\r\n\tstatus: Status;\r\n}\r\n\r\nexport interface Product {\r\n\tprodId?: string; // \t\tPK\r\n\tprodName: string; // \t\tnaziv\r\n\tprodNameen: string; // \t\tnaziv EN\r\n\tprodCode?: string; // \t\tsifra proizvoda\r\n\tproductGroupId?: string; // \tID grupe proizvoda\r\n\tproductGroupName?: string; // \tnaziv grupe (za prikaz)\r\n\tunit?: number; // \t\t\tjedinica mere\r\n\tunitCode?: string; // \t\tnaziv JM (za prikaz)\r\n\tvat?: number; // \t\t\tPDV grupa (vatrate iz commondata)\r\n\tvatRate?: string; // \t\t% pdv (za prikaz)\r\n\tstatus: Status; // \t\t\tstatus\r\n}\r\n\r\nexport interface ProductAttribute {\r\n\tprodAttrId?: string;\r\n\tproductId: string;\r\n\tattributeId?: string;\r\n\tprodAttrName: string;\r\n\ttype: string;\r\n\thasStandard: ProducAttributeHasStandard;\r\n\tstandardValue?: number;\r\n\tmandatory: ProducAttributeManditory;\r\n\tcomparator: string;\r\n\torderNo?: number;\r\n\tstatus: Status;\r\n}\r\n\r\nexport enum ProducAttributeManditory {\r\n\tTrue = 1,\r\n\tFalse = 0,\r\n}\r\n\r\nexport enum ProducAttributeHasStandard {\r\n\tTrue = 1,\r\n\tFalse = 0,\r\n}\r\n\r\nexport interface ProductSelectData {\r\n\tprodId: string;\r\n\tprodName: string;\r\n\tprodCode: string;\r\n\tunit?: string;\r\n\tvatRate?: number;\r\n\tstatus: Status; // \t\t\tstatus\r\n\tprodAttrList: ProductSelectAttribute[];\r\n}\r\n\r\n\r\nexport interface ProductSelectAttribute {\r\n\tattrId: string; \r\n\tattrName: string; \r\n\ttype: AttributeType; \r\n\tmandatory: AttributeManditory; \r\n\tcomparator: string; \r\n\thasStandard: ProducAttributeHasStandard;\r\n\tstandardValue?: number;\r\n\tstatus: Status;\r\n}\r\n\r\nexport type ProductValidationState = ValidationState;\r\n\r\nexport enum ErrorCodeExceptions {\r\n\tReferenceErrorCode = \"E-903\",\r\n}\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getProductGroupApi from \"../api/getProductGroup\";\r\nimport { setDisplayed } from \"../productGroupDataReducer\";\r\nimport { ProductGroupData } from \"../types\";\r\n\r\nexport const loadProductGroup = (groupId: string): ThunkType => async (dispatch, getStore) => {\r\n\tdispatch(setDisplayed());\r\n\r\n\tconst role = await dispatch(getProductGroup(groupId));\r\n\r\n\tdispatch(setDisplayed(role));\r\n};\r\n\r\nexport const getProductGroup = (groupId: string): ThunkType> => async (\r\n\tdispatch,\r\n\tgetStore\r\n) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\treturn await dispatch(getProductGroupApi(userId, groupId));\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { ProductGroupData } from \"../types\";\r\nimport { loadProductGroup } from \"../thunks/loadProductGroup\";\r\n\r\nexport const useDisplayProductGroup = (groupId?: string) => {\r\n\tconst storeGroup = useSelector(\r\n\t\tstore => store.data.listing.productGroups.displayed\r\n\t);\r\n\r\n\tconst displayedGroup = storeGroup && storeGroup.prodGroupID === groupId ? storeGroup : undefined;\r\n\r\n\tconst displatch = useDispatch();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (groupId) {\r\n\t\t\tdisplatch(loadProductGroup(groupId));\r\n\t\t}\r\n\t}, [displatch, groupId]);\r\n\r\n\treturn displayedGroup;\r\n};\r\n","import React from \"react\";\r\nimport { ProductGroupData } from \"../../../data/listing/productGroups/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { useDisplaySingleEmementStyles } from \"../../useDisplaySingleEmementStyles\";\r\nimport { DisplayBoolNumber } from \"../../components/common/DisplayBoolNumber\";\r\nimport { Status } from \"../../../data/models\";\r\n\r\nexport interface DisplayProductGroupBasicInfoProps {\r\n\tgroup: ProductGroupData;\r\n}\r\n\r\nexport const DisplayProductGroupBasicInfo: React.FunctionComponent = ({\r\n\tgroup,\r\n}) => {\r\n\tconst style = useDisplaySingleEmementStyles();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\treturn (\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"productGroupNameSR\")}\r\n\t\t\t\t{group.prodGroupName}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"productGroupNameEN\")}\r\n\t\t\t\t{group.prodGroupNameEn}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"productGroupStatus\")}\r\n\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};\r\n","import React from \"react\";\r\nimport { useDisplayProductGroup } from \"../../../data/listing/productGroups/hooks/useDisplayProductGroup\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { ProductGroupData } from \"../../../data/listing/productGroups/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { DisplayProductGroupBasicInfo } from \"./DisplayProductGroupBasicInfo\";\r\nimport { ExpansionPanel, ExpansionPanelSummary, Typography, Grid } from \"@material-ui/core\";\r\n\r\nexport interface DisplayEmployeeProps {\r\n\tid?: string;\r\n}\r\n\r\nexport const DisplayEmployee: React.FunctionComponent = ({ id }) => {\r\n\tconst group = useDisplayProductGroup(id);\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\treturn !group ? (\r\n\t\t<>{\"loading placeholder\"}\r\n\t) : (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t{getString(\"tableBasciInfo\")}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport const useViewProductGroup = () => {\r\n\tconst showWithDrawer = React.useContext(DisplayDrawerContext);\r\n\treturn React.useCallback(\r\n\t\t(group: ProductGroupData) => showWithDrawer(),\r\n\t\t[showWithDrawer]\r\n\t);\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const deleteProductGroupApi = (userId: string, prodgroupid: string) =>\r\n\twebApi({\r\n\t\tmethod: \"DELETE\",\r\n\t\turl: \"listing/delprodgroup\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t\tprodgroupid\r\n\t\t},\r\n\t});\r\n\r\nexport default deleteProductGroupApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { deleteProductGroup } from \"../thunks/deleteProductGroup\";\r\nimport { setFetchState } from \"../productGroupDataReducer\";\r\n\r\nexport const useProductGroupDelete = () => {\r\n\tconst fetchState = useSelector(\r\n\t\tstore => store.data.listing.productGroups.fetchState\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchDeleteRole = React.useCallback(\r\n\t\t(id: string) => dispatch(deleteProductGroup(id)),\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tdispatch(setFetchState({ type: \"not-started\" }))\r\n\t}, [dispatch])\r\n\r\n\treturn [fetchState, dispatchDeleteRole] as [typeof fetchState, typeof dispatchDeleteRole]\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport deleteProductGroupApi from \"../api/deleteProductGroup\";\r\nimport { setFetchState } from \"../productGroupDataReducer\";\r\n\r\nexport const deleteProductGroup = (groupId: string): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setFetchState({ type: \"started\" }));\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst result = await dispatch(deleteProductGroupApi(userId, groupId));\r\n\r\n\tdispatch(setFetchState(result !== undefined ? { type: \"successful\" } : { type: \"error\"}));\r\n};\r\n","import { getEditLocation } from \"../../../core/util/functions\";\r\n\r\nexport const productGroupsLocation = \"/listing/codebook/productgroups\";\r\nexport const getProductGroupEditLocation = (id?: string) =>\r\n\tgetEditLocation(productGroupsLocation, undefined, id);\r\n\r\nexport const editRouter = getProductGroupEditLocation(\":groupId?\");\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport ViewIcon from \"@material-ui/icons/InputOutlined\";\r\nimport EditIcon from \"@material-ui/icons/EditOutlined\";\r\nimport { ProductGroupData } from \"../../../data/listing/productGroups/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Action } from \"material-table\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { useViewProductGroup } from \"./DisplayProductGroup\";\r\nimport { useProductGroupDelete } from \"../../../data/listing/productGroups/hooks/useProductGroupDelete\";\r\nimport { getProductGroupEditLocation } from \"./Locations\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\n\r\nexport const useProductGroupActions = (userAccessRights: AccessRights) => {\r\n\tconst { getString } = useContext(LocalizationContext);\r\n\tconst onShowRole = useViewProductGroup();\r\n\tconst onEditRole = useEditRoleAction();\r\n\r\n\treturn useMemo(() => {\r\n\t\tconst result: Action[] = [\r\n\t\t\t{\r\n\t\t\t\ticon: () => ,\r\n\t\t\t\ttooltip: getString(\"tableShow\"),\r\n\t\t\t\tonClick: (event, rowData) => onShowRole(rowData as ProductGroupData),\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ticon: () => ,\r\n\t\t\t\ttooltip: getString(\"tableEdit\"),\r\n\t\t\t\tonClick: (event, rowData) => onEditRole(rowData as ProductGroupData),\r\n\t\t\t\thidden: userAccessRights===AccessRights.ReadOnly\r\n\t\t\t},\r\n\t\t];\r\n\r\n\t\treturn result;\r\n\t}, [onShowRole, onEditRole, getString]);\r\n};\r\n\r\nexport const useDeleteRoleAction = () => {\r\n\tconst [, deleteGroup] = useProductGroupDelete();\r\n\treturn React.useCallback(\r\n\t\tasync (group: ProductGroupData) => {\r\n\t\t\tif (group.prodGroupID) {\r\n\t\t\t\tawait deleteGroup(group.prodGroupID);\r\n\t\t\t}\r\n\t\t},\r\n\t\t[deleteGroup]\r\n\t);\r\n};\r\n\r\nexport const useEditRoleAction = () => {\r\n\tconst history = useHistory();\r\n\treturn React.useCallback(\r\n\t\t(group: ProductGroupData) => history.push(getProductGroupEditLocation(group.prodGroupID)),\r\n\t\t[history]\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport { Table, TableDataProps } from \"../../components/common/Table\";\r\nimport { useProductGroupData } from \"../../../data/listing/productGroups/hooks/useProductGroupData\";\r\nimport { ProductGroupData } from \"../../../data/listing/productGroups/types\";\r\nimport { useProductGroupColumns } from \"./useProductGroupColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\nimport { useProductGroupActions, useDeleteRoleAction } from \"./useProductGroupActions\";\r\n\r\nexport interface ProductGroupsTableProps {\r\n\tuserAccessRights: AccessRights;\r\n}\r\n\r\ntype ProductGroupsTableTablePropsType = ProductGroupsTableProps & TableDataProps;\r\n\r\nexport const ProductGroupsTable: React.FunctionComponent = ({\r\n\tuserAccessRights,\r\n\t...tableProps\r\n}) => {\r\n\tconst [data, loadAll] = useProductGroupData();\r\n\r\n\tconst columns = useProductGroupColumns();\r\n\tconst actions = useProductGroupActions(userAccessRights);\r\n\tconst onDeleteGroup = useDeleteRoleAction();\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t{...tableProps}\r\n\t\t\tgetData={loadAll}\r\n\t\t\timmutableData={data}\r\n\t\t\ttitle=\"\"\r\n\t\t\tcolumns={columns}\r\n\t\t\tactions={actions}\r\n\t\t\toptions={{\r\n\t\t\t\ttoolbar: false,\r\n\t\t\t\tpageSize: 10,\r\n\t\t\t\tactionsColumnIndex: -1,\r\n\t\t\t}}\r\n\t\t\teditable={userAccessRights !== AccessRights.ReadOnly ? {\r\n\t\t\t\tonRowDelete: onDeleteGroup,\r\n\t\t\t} : {}}\r\n\t\t/>\r\n\t);\r\n};\r\n\r\nexport default ProductGroupsTable;\r\n","import React from \"react\";\r\nimport { useContext, useMemo } from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\nimport { ProductGroupData } from \"../../../data/listing/productGroups/types\";\r\nimport { DisplayBoolNumber } from \"../../components/common/DisplayBoolNumber\";\r\nimport { Status } from \"../../../data/models\";\r\n\r\nexport function useProductGroupColumns() {\r\n\tconst { getString } = useContext(LocalizationContext);\r\n\treturn useMemo(\r\n\t\t() => [\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"productGroupName\"),\r\n\t\t\t\tfield: \"prodGroupName\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"productGroupStatus\"),\r\n\t\t\t\trender: group => ,\r\n\t\t\t\tcustomSort: (a, b) => a.status - b.status,\r\n\t\t\t},\r\n\t\t],\r\n\t\t[getString]\r\n\t) as Column[];\r\n}\r\n","import { setSearchTerm } from \"../rolesDataReducer\";\r\nimport { useSearch } from \"../../../../core/util/storeHooks\";\r\n\r\nexport const useRoleSearch = () => useSearch(s => s.data.listing.roles.searchTerm, setSearchTerm);\r\n","import React from \"react\";\r\nimport { Grid, CardContent, CardHeader, Divider, Card, Fab } from \"@material-ui/core\";\r\nimport ProductGroupsTable from \"./ProductGroupsTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { SearchBox } from \"../../components/common/SearchBox\";\r\nimport { PageComponent, AccessRights } from \"../../../core/navigation/types\";\r\nimport AddIcon from \"@material-ui/icons/Add\";\r\nimport { useRoleSearch } from \"../../../data/listing/roles/hooks/useRoleSearch\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { getProductGroupEditLocation } from \"./Locations\";\r\n\r\nconst ProductGroupPage: PageComponent = ({ userAccessRights }) => {\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst [search, setSearch] = useRoleSearch();\r\n\tconst history = useHistory();\r\n\r\n\treturn (\r\n\t\t\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\taction={}\r\n\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\t{userAccessRights === AccessRights.All && (\r\n\t\t\t\t\t history.push(getProductGroupEditLocation())}\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};\r\n\r\nexport default ProductGroupPage;\r\n","import React from \"react\";\r\nimport { useDisplayProductGroup } from \"./useDisplayProductGroup\";\r\nimport { ProductGroupData } from \"../types\";\r\nimport { useCopiedState } from \"../../../../core/util/hooks\";\r\nimport { Status } from \"../../../models\";\r\n\r\nexport const defauiltGroup: ProductGroupData = {\r\n\tprodGroupName: \"\",\r\n\tprodGroupNameEn: \"\",\r\n\tstatus: Status.Active,\r\n};\r\n\r\nexport const useEditProductGroup = (roleId?: string) => {\r\n\tconst displayGroup = useDisplayProductGroup(roleId);\r\n\r\n\treturn React.useMemo(() => {\r\n\t\tif (roleId !== undefined && displayGroup === undefined) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\tif (roleId === undefined) {\r\n\t\t\treturn { ...defauiltGroup };\r\n\t\t}\r\n\r\n\t\treturn displayGroup ? { ...displayGroup } : undefined;\r\n\t}, [roleId, displayGroup]);\r\n};\r\n\r\nexport const useEditProductGroupState = (empId?: string) => {\r\n\tconst group = useEditProductGroup(empId);\r\n\treturn useCopiedState(group);\r\n};\r\n","import { ProductGroupData, ProductGroupValidationState } from \"../types\";\r\nimport { createUseValidator } from \"../../../../core/util/hooks\";\r\n\r\nexport const roleValidationState: ProductGroupValidationState = {\r\n\tprodGroupName: true,\r\n\tprodGroupNameEn: true,\r\n};\r\n\r\nexport const useProductGroupValidator = createUseValidator(\r\n\troleValidationState\r\n);\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { ProductGroupData } from \"../types\";\r\n\r\nexport const createProductGroupApi = (userId: string, group: ProductGroupData) =>\r\n\twebApiWithResponse({\r\n\t\tmethod: \"PUT\",\r\n\t\turl: \"listing/newprodgroup\",\r\n\t\tparams: {\r\n\t\t\tuserId\r\n\t\t},\r\n\t\tdata: group\r\n\t});\r\n\r\nexport default createProductGroupApi;\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { ProductGroupData } from \"../types\";\r\n\r\nexport const updateProductGroupApi = (userId: string, group: ProductGroupData) =>\r\n\twebApiWithResponse({\r\n\t\tmethod: \"PUT\",\r\n\t\turl: \"listing/updprodgroup\",\r\n\t\tparams: {\r\n\t\t\tuserId\r\n\t\t},\r\n\t\tdata: group\r\n\t});\r\n\r\nexport default updateProductGroupApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { upsertProductGroup } from \"../thunks/upsertProductGroup\";\r\nimport { setFetchState } from \"../productGroupDataReducer\";\r\nimport { ProductGroupData } from \"../types\";\r\n\r\nexport const useProductGroupUpsert = () => {\r\n\tconst fetchState = useSelector(\r\n\t\tstore => store.data.listing.productGroups.fetchState\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchUpserGroup = React.useCallback(\r\n\t\t(group: ProductGroupData) => dispatch(upsertProductGroup(group)),\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tdispatch(setFetchState({ type: \"not-started\" }))\r\n\t}, [dispatch])\r\n\r\n\treturn [fetchState, dispatchUpserGroup] as [typeof fetchState, typeof dispatchUpserGroup]\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport createProductGroupApi from \"../api/createProductGroup\";\r\nimport updateProductGroupApi from \"../api/updateProductGroup\";\r\nimport { setFetchState } from \"../productGroupDataReducer\";\r\nimport { ProductGroupData } from \"../types\";\r\n\r\nexport const upsertProductGroup = (group: ProductGroupData): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setFetchState({ type: \"started\" }));\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst result = group.prodGroupID\r\n\t\t? await dispatch(updateProductGroupApi(userId, group))\r\n\t\t: await dispatch(createProductGroupApi(userId, group));\r\n\r\n\tif (result && result.resCode === \"OK\") {\r\n\t\tdispatch(setFetchState({ type: \"successful\", result: result.resDesc }));\r\n\t\treturn result.resDesc;\r\n\t} else {\r\n\t\tdispatch(setFetchState({ type: \"error\", errorCode: result?.resCode }));\r\n\t}\r\n};\r\n","import { NavigationItem } from \"../../../core/navigation/types\";\r\nimport ProductGroupPage from \"./ProductGroupPage\";\r\nimport { EditProductGroupPage } from \"./EditProductGroupPage\";\r\nimport { productGroupsLocation, editRouter } from \"./Locations\";\r\nexport const productGroupComponents: NavigationItem[] = [\r\n\t{\r\n\t\tComponent: ProductGroupPage,\r\n\t\tisMenuItem: true,\r\n\t\tpath: productGroupsLocation,\r\n\t},\r\n\t{\r\n\t\tComponent: EditProductGroupPage,\r\n\t\tisMenuItem: false,\r\n\t\tpath: editRouter,\r\n\t},\r\n];\r\n","import React from \"react\";\r\nimport { useEditProductGroupState } from \"../../../data/listing/productGroups/hooks/useEditProductGroupState\";\r\nimport { useProductGroupValidator } from \"../../../data/listing/productGroups/hooks/useProductGroupValidator\";\r\nimport { useProductGroupUpsert } from \"../../../data/listing/productGroups/hooks/useProductGroupUpsert\";\r\nimport { RouteComponentProps, useHistory } from \"react-router-dom\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Card, Grid, CardHeader, Divider, CardContent } from \"@material-ui/core\";\r\nimport { FabSave } from \"../../components/common/FabSave\";\r\nimport { ProductGroupData } from \"../../../data/listing/productGroups/types\";\r\nimport { StringInput } from \"../../components/common/StringInput\";\r\nimport { LeavePrompt } from \"../../components/common/LeavePrompt\";\r\nimport { BoolInput } from \"../../components/common/BoolInput\";\r\nimport { Status } from \"../../../data/models\";\r\nimport { productGroupsLocation } from \"./Locations\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\n\r\nexport interface EditProductGroupInfo {\r\n\tgroupId?: string;\r\n}\r\n\r\nexport interface EditProductGrouProps extends RouteComponentProps {}\r\n\r\nexport const EditProductGroupPage: React.FunctionComponent = props => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst [group, editGroup, changed] = useEditProductGroupState(props.match.params.groupId);\r\n\tconst [validationState, validate] = useProductGroupValidator();\r\n\tconst [fetchState, upsert] = useProductGroupUpsert();\r\n\tconst history = useHistory();\r\n\r\n\tconst unsavedChanges = fetchState.type === \"not-started\" && changed;\r\n\r\n\tconst handleChange = React.useCallback(\r\n\t\t(event: React.ChangeEvent) => {\r\n\t\t\teditGroup(event.target.name as any, event.target.value);\r\n\t\t},\r\n\t\t[editGroup]\r\n\t);\r\n\r\n\tconst save = React.useCallback(() => {\r\n\t\tif (fetchState.type === \"successful\") {\r\n\t\t\thistory.push(productGroupsLocation);\r\n\t\t} else if (fetchState.type !== \"started\") {\r\n\t\t\tconst normalized = validate(group);\r\n\t\t\tif (normalized) {\r\n\t\t\t\tupsert(normalized);\r\n\t\t\t}\r\n\t\t}\r\n\t}, [group, validate, fetchState, history, upsert]);\r\n\r\n\tconst pageTitle = group && group.prodGroupID ? \"productGroupEditTitle\" : \"productGroupCreateTitle\";\r\n\r\n\tif (!group) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\treturn (\r\n\t\t\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/>\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\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tproperty=\"prodGroupName\"\r\n\t\t\t\t\t\t\t\t\titem={group}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"productGroupNameSR\")}\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\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tproperty=\"prodGroupNameEn\"\r\n\t\t\t\t\t\t\t\t\titem={group}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"productGroupNameEN\")}\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\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tproperty=\"status\"\r\n\t\t\t\t\t\t\t\t\titem={group}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tfalsyValue={Status.Inactive}\r\n\t\t\t\t\t\t\t\t\tthrutyValue={Status.Active}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"productGroupStatus\")}\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\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};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { ProductList } from \"../types\";\r\n\r\nexport const getAllProductsApi = (userId: string) =>\r\n\twebApi({\r\n\t\tmethod: \"GET\",\r\n\t\turl: \"listing/getprodlist\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t},\r\n\t});\r\n\r\nexport default getAllProductsApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadAllProducts } from \"../thunks/loadAllProducts\";\r\nimport { ProductList } from \"../types\";\r\n\r\nexport const useProductData = () => {\r\n\tconst data = useSelector(s => s.data.listing.products.displayData);\r\n\tconst allData = useSelector(s => s.data.listing.products.all);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchLoadAllProducts = React.useCallback(() => dispatch(loadAllProducts()), [dispatch]);\r\n\r\n\treturn [data, dispatchLoadAllProducts, allData] as [\r\n\t\ttypeof data,\r\n\t\ttypeof dispatchLoadAllProducts,\r\n\t\ttypeof allData\r\n\t];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getAllProductsAPI from \"../api/getAllProducts\";\r\nimport { setData } from \"../productsDataReducer\";\r\n\r\nexport const loadAllProducts = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setData());\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst products = await dispatch(getAllProductsAPI(userId));\r\n\r\n\tdispatch(setData(products || []));\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { Product } from \"../types\";\r\n\r\nexport const getProductApi = (userId: string, prodid: string) =>\r\n\twebApi({\r\n\t\tmethod: \"GET\",\r\n\t\turl: \"listing/getprod\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t\tprodid\r\n\t\t},\r\n\t});\r\n\r\nexport default getProductApi;\r\n","import React from \"react\";\r\nimport { useDisplayProduct } from \"../../../data/listing/products/hooks/useDisplayProduct\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { ProductList } from \"../../../data/listing/products/types\";\r\nimport { DisplayProductBasicInfo } from \"./DisplayProductBasicInfo\";\r\nimport { ExpansionPanel, ExpansionPanelSummary, Typography, Grid } from \"@material-ui/core\";\r\nimport ExpandMoreIcon from \"@material-ui/icons/ExpandMore\";\r\nimport { useToggleStateDictionary } from \"../../../core/util/hooks\";\r\nimport { DisplayAttributes } from \"./attributes/DisplayAttributes\";\r\n\r\nenum AccordionNames {\r\n\tBasicInfo = \"basicInfo\",\r\n\tAttributes = \"attributes\",\r\n}\r\n\r\nconst accordionNames = Object.values(AccordionNames);\r\n\r\nexport interface DisplayEmployeeProps {\r\n\tid?: string;\r\n}\r\n\r\nexport const DisplayProduct: React.FunctionComponent = ({ id }) => {\r\n\tconst product = useDisplayProduct(id);\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\tconst [open, toggleOpen] = useToggleStateDictionary(accordionNames, [AccordionNames.BasicInfo]);\r\n\r\n\treturn !product || !product.prodId ? (\r\n\t\t<>{\"loading placeholder\"}\r\n\t) : (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t}>\r\n\t\t\t\t\t{getString(\"tableBasciInfo\")}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t}>\r\n\t\t\t\t\t{getString(\"productAttributeTitle\")}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport const useViewProduct = () => {\r\n\tconst showWithDrawer = React.useContext(DisplayDrawerContext);\r\n\treturn React.useCallback(\r\n\t\t(product: ProductList) => showWithDrawer(),\r\n\t\t[showWithDrawer]\r\n\t);\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getProductApi from \"../api/getProduct\";\r\nimport { setDisplayed } from \"../productsDataReducer\";\r\nimport { Product } from \"../types\";\r\n\r\nexport const loadProduct = (productId: string): ThunkType => async (dispatch, getStore) => {\r\n\tdispatch(setDisplayed());\r\n\r\n\tconst role = await dispatch(getProduct(productId));\r\n\r\n\tdispatch(setDisplayed(role));\r\n};\r\n\r\nexport const getProduct = (proiductId: string): ThunkType> => async (\r\n\tdispatch,\r\n\tgetStore\r\n) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\treturn await dispatch(getProductApi(userId, proiductId));\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { Product } from \"../types\";\r\nimport { loadProduct } from \"../thunks/loadProduct\";\r\n\r\nexport const useDisplayProduct = (productId?: string) => {\r\n\tconst storeProduct = useSelector(\r\n\t\tstore => store.data.listing.products.displayed\r\n );\r\n\r\n const displayedProduct = storeProduct && storeProduct.prodId === productId ? storeProduct : undefined;\r\n\r\n const displatch = useDispatch();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (productId) {\r\n\t\t\tdisplatch(loadProduct(productId));\r\n\t\t}\r\n }, [displatch, productId]);\r\n\r\n\treturn displayedProduct;\r\n};\r\n","import React from \"react\";\r\nimport { Product } from \"../../../data/listing/products/types\";\r\nimport { useDisplaySingleEmementStyles } from \"../../useDisplaySingleEmementStyles\";\r\nimport { DisplayBoolNumber } from \"../../components/common/DisplayBoolNumber\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Status } from \"../../../data/models\";\r\n\r\nexport interface DisplayProductBasicInfoProps {\r\n\tproduct: Product;\r\n}\r\n\r\nexport const DisplayProductBasicInfo: React.FunctionComponent = ({\r\n\tproduct,\r\n}) => {\r\n\tconst style = useDisplaySingleEmementStyles();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\treturn (\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"productName\")}\r\n\t\t\t\t{product.prodName}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"productNameEN\")}\r\n\t\t\t\t{product.prodNameen}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"productCode\")}\r\n\t\t\t\t{product.prodCode}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"productGroupName\")}\r\n\t\t\t\t{product.productGroupName}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"productUnit\")}\r\n\t\t\t\t{product.unitCode}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"productVat\")}\r\n\t\t\t\t{product.vatRate}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"cliStatus\")}\r\n\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};\r\n","import { webApi } from \"../../../../../core/http/httpThunks\";\r\nimport { ProductAttribute } from \"../../types\";\r\n\r\nexport const getAllAttributesApi = (userId: string, prodid: string) =>\r\n\twebApi({\r\n\t\tmethod: \"GET\",\r\n\t\turl: \"listing/getprodattrlist\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t\tprodid\r\n\t\t},\r\n\t});\r\n\r\nexport default getAllAttributesApi;\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport getAllAttributes from \"../../api/attributes/getAllAttributes\";\r\nimport { ProductAttribute } from \"../../types\";\r\n\r\nexport const getAttributes = (productId: string): ThunkType> => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\treturn await dispatch(getAllAttributes(userId, productId));\r\n}\r\n","import React from \"react\";\r\nimport { useDispatch } from \"react-redux\";\r\nimport { ProductAttribute } from \"../../types\";\r\nimport { getAttributes } from \"../../thunks/attributes/loadAttributes\";\r\n\r\nexport const useAttributes = (attributeId?: string) => {\r\n\tconst displatch = useDispatch();\r\n\tconst [attributes, setAttributes] = React.useState();\r\n\r\n\tconst loadAttributes = React.useCallback(async () => {\r\n\t\tif (attributeId) {\r\n\t\t\tconst loadedAttributes = (await displatch(getAttributes(attributeId))) as any;\r\n\t\t\tsetAttributes(loadedAttributes || []);\r\n\t\t}\r\n\t}, [displatch, attributeId])\r\n\r\n\tReact.useEffect(() => {\r\n\t\tloadAttributes();\r\n\t}, [loadAttributes]);\r\n\r\n\treturn [attributes, loadAttributes] as [typeof attributes, typeof loadAttributes]\r\n};\r\n","import React from \"react\";\r\nimport { useDisplaySingleEmementStyles } from \"../../../useDisplaySingleEmementStyles\";\r\nimport { DisplayBoolNumber } from \"../../../components/common/DisplayBoolNumber\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { useAttributes } from \"../../../../data/listing/products/hooks/attributes/useAttributes\";\r\nimport { ProductAttribute } from \"../../../../data/listing/products/types\";\r\nimport {\r\n\tTableContainer,\r\n\tTable,\r\n\tTableHead,\r\n\tTableCell,\r\n\tTableRow,\r\n\tPaper,\r\n\tTableBody,\r\n\tTypography,\r\n\tGrid,\r\n} from \"@material-ui/core\";\r\nimport { Status } from \"../../../../data/models\";\r\n\r\nexport interface DisplayAttributesProps {\r\n\tproductId: string;\r\n}\r\n\r\nexport const DisplayAttributes: React.FunctionComponent = ({ productId }) => {\r\n\tconst style = useDisplaySingleEmementStyles();\r\n\tconst [attributes] = useAttributes(productId);\r\n\r\n\treturn (\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t{attributes ? : \"loading placeholder\"}\r\n\t\t\t
\r\n\t\t
\r\n\t);\r\n};\r\n\r\ninterface AttributesDisplayTableProps {\r\n\tattributes: ProductAttribute[];\r\n}\r\n\r\nconst AttributesDisplayTable: React.FunctionComponent = ({ attributes }) => {\r\n\tconst style = useDisplaySingleEmementStyles();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\tif (attributes.length === 0) {\r\n\t\treturn (\r\n\t\t\t\r\n\t\t\t\t{getString(\"productAttributeEmpty\")}\r\n\t\t\t\r\n\t\t);\r\n\t}\r\n\r\n\treturn (\r\n\t\t\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\t{getString(\"productAttributeName\")}\r\n\t\t\t\t\t\t{getString(\"productAttributeType\")}\r\n\t\t\t\t\t\t{getString(\"productAttributeComparator\")}\r\n\t\t\t\t\t\t{getString(\"productAttributeStatus\")}\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t{attributes.map(attribute => (\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t{attribute.prodAttrName}\r\n\t\t\t\t\t\t\t{attribute.type}\r\n\t\t\t\t\t\t\t{attribute.comparator}\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\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};\r\n","import { getEditLocation } from \"../../../core/util/functions\";\r\n\r\nexport enum ProductEditParts {\r\n\tBasicInfo = \"basicinfo\",\r\n\tAttributes = \"attributes\",\r\n}\r\n\r\nexport const productsLocation = \"/listing/products\";\r\n\r\nexport const getProductEditLocation = (\r\n\tpart: ProductEditParts = ProductEditParts.BasicInfo,\r\n\tproductId?: string,\r\n\tattributeId?: string\r\n) => getEditLocation(productsLocation, part, productId, attributeId);\r\n\r\nexport const baseEdit = getProductEditLocation(\":editPart\" as any, \":productId?\");\r\nexport const atributesEdit = getProductEditLocation(\r\n\tProductEditParts.Attributes,\r\n\t\":productId?\",\r\n\t\":attributeId?\"\r\n);\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const deleteProductApi = (userId: string, prodid: string, errorExceptions: string[]) =>\r\n\twebApiWithResponse({\r\n\t\tmethod: \"DELETE\",\r\n\t\turl: \"listing/delprod\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t\tprodid,\r\n\t\t},\r\n\t}, undefined, errorExceptions);\r\n\r\nexport default deleteProductApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { deleteProduct } from \"../thunks/deleteProduct\";\r\nimport { setDeleteFetchState } from \"../productsDataReducer\";\r\n\r\nexport const useProductDelete = () => {\r\n\tconst fetchState = useSelector(\r\n\t\tstore => store.data.listing.products.deleteFetchState\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchDeleteProduct = React.useCallback((id: string) => dispatch(deleteProduct(id)), [dispatch]);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tdispatch(setDeleteFetchState({ type: \"not-started\" }));\r\n\t}, [dispatch]);\r\n\r\n\tconst resetState = React.useCallback(() => dispatch(setDeleteFetchState({ type: \"not-started\" })), [\r\n\t\tdispatch,\r\n\t]);\r\n\r\n\treturn [fetchState, dispatchDeleteProduct, resetState] as [\r\n\t\ttypeof fetchState,\r\n\t\ttypeof dispatchDeleteProduct,\r\n\t\ttypeof resetState\r\n\t];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport deleteProductApi from \"../api/deleteProduct\";\r\nimport { setDeleteFetchState } from \"../productsDataReducer\";\r\nimport { ErrorCodeExceptions } from \"../types\";\r\n\r\nexport const deleteProduct = (roleId: string): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setDeleteFetchState({ type: \"started\" }));\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst result = await dispatch(deleteProductApi(userId, roleId, [ErrorCodeExceptions.ReferenceErrorCode]));\r\n\r\n\tdispatch(\r\n\t\tsetDeleteFetchState(\r\n\t\t\tresult !== undefined && result.resCode === \"OK\"\r\n\t\t\t\t? { type: \"successful\" }\r\n\t\t\t\t: { type: \"error\", errorCode: result && result.resCode }\r\n\t\t)\r\n\t);\r\n};\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport ViewIcon from \"@material-ui/icons/InputOutlined\";\r\nimport EditIcon from \"@material-ui/icons/EditOutlined\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Action } from \"material-table\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { useViewProduct } from \"./DisplayProduct\";\r\nimport { useProductDelete } from \"../../../data/listing/products/hooks/useProductDelete\";\r\nimport { ProductList } from \"../../../data/listing/products/types\";\r\nimport { ProductEditParts, getProductEditLocation } from \"./Locations\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\n\r\nexport const useProductActions = (userAccessRights: AccessRights) => {\r\n\tconst { getString } = useContext(LocalizationContext);\r\n\tconst onShowClient = useViewProduct();\r\n\tconst onEditClient = useEditClientAction();\r\n\r\n\treturn useMemo(() => {\r\n\t\tconst result: Action[] = [\r\n\t\t\t{\r\n\t\t\t\ticon: () => ,\r\n\t\t\t\ttooltip: getString(\"tableShow\"),\r\n\t\t\t\tonClick: (event, rowData) => onShowClient(rowData as ProductList),\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ticon: () => ,\r\n\t\t\t\ttooltip: getString(\"tableEdit\"),\r\n\t\t\t\tonClick: (event, rowData) => onEditClient(rowData as ProductList),\r\n\t\t\t\thidden: userAccessRights===AccessRights.ReadOnly\r\n\t\t\t},\r\n\t\t];\r\n\r\n\t\treturn result;\r\n\t}, [onShowClient, getString, onEditClient]);\r\n};\r\n\r\nexport const useDeleteClientAction = () => {\r\n\tconst [fetchState, deleteProduct, reset] = useProductDelete();\r\n\tconst action = React.useCallback(\r\n\t\tasync (product: ProductList) => {\r\n\t\t\tif (product.prodId) {\r\n\t\t\t\tawait deleteProduct(product.prodId);\r\n\t\t\t}\r\n\t\t},\r\n\t\t[deleteProduct]\r\n\t);\r\n\treturn [fetchState, action, reset] as [typeof fetchState, typeof action, typeof reset];\r\n};\r\n\r\nexport const useEditClientAction = () => {\r\n\tconst history = useHistory();\r\n\treturn React.useCallback(\r\n\t\t(product: ProductList) =>\r\n\t\t\thistory.push(getProductEditLocation(ProductEditParts.BasicInfo, product.prodId)),\r\n\t\t[history]\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport { Table, TableDataProps } from \"../../components/common/Table\";\r\nimport { useProductData } from \"../../../data/listing/products/hooks/useProductData\";\r\nimport { ErrorCodeExceptions, ProductList } from \"../../../data/listing/products/types\";\r\nimport { useProductColumns } from \"./useProductColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\nimport { useProductActions, useDeleteClientAction } from \"./useProductActions\";\r\nimport { CustomDialog } from \"../../components/common/CustomDialog\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\n\r\nexport interface ProductTableProps {\r\n\tuserAccessRights: AccessRights;\r\n}\r\n\r\ntype ProductTablePropsType = ProductTableProps & TableDataProps;\r\n\r\nexport const ProductTable: React.FunctionComponent = ({\r\n\tuserAccessRights,\r\n\t...tableProps\r\n}) => {\r\n\tconst [data, loadAll] = useProductData();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\tconst columns = useProductColumns();\r\n\tconst actions = useProductActions(userAccessRights);\r\n\tconst [fetchState, onDeleteClient, resetState] = useDeleteClientAction();\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t\r\n\t\t\t\t{...tableProps}\r\n\t\t\t\tgetData={loadAll}\r\n\t\t\t\timmutableData={data}\r\n\t\t\t\ttitle=\"\"\r\n\t\t\t\tcolumns={columns}\r\n\t\t\t\tactions={actions}\r\n\t\t\t\toptions={{\r\n\t\t\t\t\ttoolbar: false,\r\n\t\t\t\t\tpageSize: 10,\r\n\t\t\t\t\tactionsColumnIndex: -1,\r\n\t\t\t\t}}\r\n\t\t\t\teditable={userAccessRights !== AccessRights.ReadOnly ? {\r\n\t\t\t\t\tonRowDelete: onDeleteClient,\r\n\t\t\t\t }: {}}\r\n\t\t\t/>\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport default ProductTable;\r\n","import { useContext, useMemo } from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\nimport { ProductList } from \"../../../data/listing/products/types\";\r\nimport React from \"react\";\r\nimport { DisplayBoolNumber } from \"../../components/common/DisplayBoolNumber\";\r\nimport { Status } from \"../../../data/models\";\r\n\r\nexport function useProductColumns() {\r\n\tconst { getString } = useContext(LocalizationContext);\r\n\treturn useMemo(\r\n\t\t() => [\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"productName\"),\r\n\t\t\t\tfield: \"prodName\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"productCode\"),\r\n\t\t\t\tfield: \"prodCode\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"productGroupName\"),\r\n\t\t\t\tfield: \"prodGroupName\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"productUnit\"),\r\n\t\t\t\tfield: \"unit\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"productVat\"),\r\n\t\t\t\tfield: \"vat\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"productStatus\"),\r\n\t\t\t\trender: product => ,\r\n\t\t\t\tcustomSort: (a, b) => a.status - b.status,\r\n\t\t\t\twidth: \"80px\",\r\n\t\t\t},\r\n\t\t],\r\n\t\t[getString]\r\n\t) as Column[];\r\n}\r\n","import React from \"react\";\r\nimport { Grid, CardContent, CardHeader, Divider, Card, Fab } from \"@material-ui/core\";\r\nimport ProductTable from \"./ProductTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { SearchBox } from \"../../components/common/SearchBox\";\r\nimport { PageComponent, AccessRights } from \"../../../core/navigation/types\";\r\nimport AddIcon from \"@material-ui/icons/Add\";\r\nimport { useProductSearch } from \"../../../data/listing/products/hooks/useProductSearch\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { getProductEditLocation } from \"./Locations\"\r\n\r\nconst ProductPage: PageComponent = ({ userAccessRights }) => {\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst [search, setSearch] = useProductSearch();\r\n\tconst history = useHistory();\r\n\r\n\treturn (\r\n\t\t\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\taction={}\r\n\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\t{userAccessRights === AccessRights.All && (\r\n\t\t\t\t\t history.push(getProductEditLocation())}\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};\r\n\r\nexport default ProductPage;\r\n","import { setSearchTerm } from \"../productsDataReducer\";\r\nimport { useSearch } from \"../../../../core/util/storeHooks\";\r\n\r\nexport const useProductSearch = () => useSearch(s => s.data.listing.products.searchTerm, setSearchTerm);\r\n","import { webApi } from \"../../../../../core/http/httpThunks\";\r\nimport { ProductAttribute } from \"../../types\";\r\n\r\nexport const getAttributeApi = (userId: string, prodattrid: string) =>\r\n\twebApi({\r\n\t\tmethod: \"GET\",\r\n\t\turl: \"listing/getprodattr\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t\tprodattrid\r\n\t\t},\r\n\t});\r\n\r\nexport default getAttributeApi;\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport getAttributeApi from \"../../api/attributes/getAttribute\";\r\nimport { ProductAttribute } from \"../../types\";\r\n\r\nexport const getAttribute = (\r\n\tattributeId: string\r\n): ThunkType> => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\treturn await dispatch(getAttributeApi(userId, attributeId));\r\n};\r\n","import React from \"react\";\r\nimport { useAttribute } from \"./useAttribute\";\r\nimport { ProductAttribute, ProducAttributeManditory, ProducAttributeHasStandard } from \"../../types\";\r\nimport { Status } from \"../../../../models\";\r\nimport { useCopiedState } from \"../../../../../core/util/hooks\";\r\n\r\nexport const createDefaultAttribute = (productId: string): ProductAttribute => ({\r\n\tproductId: productId,\r\n\tcomparator: \"\",\r\n\tmandatory: ProducAttributeManditory.True,\r\n\thasStandard: ProducAttributeHasStandard.True,\r\n\tprodAttrName: \"\",\r\n\ttype: \"\",\r\n\tstatus: Status.Active,\r\n});\r\n\r\nexport const useEditAttribute = (productId: string, attributeId?: string) => {\r\n\tconst [displayAttribute] = useAttribute(attributeId);\r\n\r\n\treturn React.useMemo(() => {\r\n\t\tif (attributeId !== undefined && displayAttribute === undefined) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\tif (attributeId === undefined) {\r\n\t\t\tconst defaultAttribute = createDefaultAttribute(productId);\r\n\t\t\treturn { ...defaultAttribute };\r\n\t\t}\r\n\r\n\t\treturn displayAttribute ? { ...displayAttribute } : undefined;\r\n\t}, [productId, attributeId, displayAttribute]);\r\n};\r\n\r\nexport const useEditAttributeState = (productId: string, attributeId?: string) => {\r\n\tconst attribute = useEditAttribute(productId, attributeId);\r\n\treturn useCopiedState(attribute);\r\n};\r\n","import React from \"react\";\r\nimport { useDispatch } from \"react-redux\";\r\nimport { ProductAttribute } from \"../../types\";\r\nimport { getAttribute } from \"../../thunks/attributes/loadAttribute\";\r\n\r\nexport const useAttribute = (attributeId?: string) => {\r\n\tconst displatch = useDispatch();\r\n\tconst [attribute, setAttribute] = React.useState();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tconst loadClient = async () => {\r\n\t\t\tif (attributeId) {\r\n\t\t\t\tconst loadedAttribute = (await displatch(getAttribute(attributeId))) as any;\r\n\t\t\t\tsetAttribute(loadedAttribute);\r\n\t\t\t}\r\n\t\t};\r\n\t\tloadClient();\r\n\t}, [displatch, attributeId, setAttribute]);\r\n\r\n\treturn [attribute];\r\n};\r\n","import { ProductAttribute } from \"../../types\";\r\nimport { ValidationState } from \"../../../../../core/util/types\";\r\nimport { createUseValidator } from \"../../../../../core/util/hooks\";\r\n\r\nexport const AttributeValidation: ValidationState = {\r\n\tattributeId: true,\r\n};\r\n\r\nexport const useAttributeValidator = () => {\r\n\treturn createUseValidator>(\r\n\t\tAttributeValidation,\r\n\t\t(item, validation) => ({\r\n\t\t\t...validation,\r\n\t\t\thasStandard: (item.hasStandard === 0 && (item.standardValue===0 || item.standardValue===undefined)) || (item.hasStandard === 1 && item.standardValue!==0 && item.standardValue !== undefined ),\r\n\t\t})\r\n\t)();\r\n};\r\n\r\n\r\n","import { webApiWithResponse } from \"../../../../../core/http/httpThunks\";\r\nimport { ProductAttribute } from \"../../types\";\r\n\r\nexport const createAttributeApi = (userId: string, attribute: ProductAttribute) =>\r\n\twebApiWithResponse({\r\n\t\tmethod: \"PUT\",\r\n\t\turl: \"listing/newprodattr\",\r\n\t\tparams: {\r\n\t\t\tuserId\r\n\t\t},\r\n\t\tdata: attribute\r\n\t});\r\n\r\nexport default createAttributeApi;\r\n","import { webApiWithResponse } from \"../../../../../core/http/httpThunks\";\r\nimport { ProductAttribute } from \"../../types\";\r\n\r\nexport const updateClientBrokerApi = (userId: string, attribute: ProductAttribute) =>\r\n\twebApiWithResponse({\r\n\t\tmethod: \"PUT\",\r\n\t\turl: \"listing/updprodattr\",\r\n\t\tparams: {\r\n\t\t\tuserId\r\n\t\t},\r\n\t\tdata: attribute\r\n\t});\r\n\r\nexport default updateClientBrokerApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\nimport { upsertAttribute } from \"../../thunks/attributes/upsertAttribute\";\r\nimport { setFetchStateAttribute } from \"../../productsDataReducer\";\r\nimport { ProductAttribute } from \"../../types\";\r\n\r\nexport const useAttributeUpsert = () => {\r\n\tconst fetchState = useSelector(\r\n\t\tstore => store.data.listing.products.fetchStateAttribute\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchUpsertAttribute = React.useCallback(\r\n\t\t(attribute: ProductAttribute) => dispatch(upsertAttribute(attribute)),\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tdispatch(setFetchStateAttribute({ type: \"not-started\" }));\r\n\t}, [dispatch]);\r\n\r\n\treturn [fetchState, dispatchUpsertAttribute] as [typeof fetchState, typeof dispatchUpsertAttribute];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport createAttributeApi from \"../../api/attributes/createAttribute\";\r\nimport updateAttributeApi from \"../../api/attributes/updateAttribute\";\r\nimport { setFetchStateAttribute } from \"../../productsDataReducer\";\r\nimport { ProductAttribute } from \"../../types\";\r\n\r\nexport const upsertAttribute = (attribute: ProductAttribute): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setFetchStateAttribute({ type: \"started\" }));\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst result = attribute.prodAttrId\r\n\t\t? await dispatch(updateAttributeApi(userId, attribute))\r\n\t\t: await dispatch(createAttributeApi(userId, attribute));\r\n\r\n\tif (result && result.resCode === \"OK\") {\r\n\t\tdispatch(setFetchStateAttribute({ type: \"successful\", result: result.resDesc }));\r\n\t\treturn result.resDesc;\r\n\t} else {\r\n\t\tdispatch(setFetchStateAttribute({ type: \"error\", errorCode: result?.resCode }));\r\n\t}\r\n};\r\n","import { useSelector } from \"react-redux\";\r\nimport { StoreType } from \"../../../core/store/reducers\";\r\nimport { ProductAttribute } from \"../../models\";\r\n\r\nconst getAttributeLabel = (attribute?: ProductAttribute) => (attribute ? attribute.attrName : \"\");\r\n\r\nexport const useProductAttributes = () => {\r\n\tconst attributes = useSelector(\r\n\t\tstore => store.data.initialData.productAttributes\r\n\t);\r\n\r\n\treturn [attributes, getAttributeLabel] as [typeof attributes, typeof getAttributeLabel];\r\n};\r\n","import React from \"react\";\r\nimport { useProductAttributes } from \"../../../data/initialData/hooks/useProductAttributes\";\r\nimport { ProductAttribute } from \"../../../data/models\";\r\nimport { AutocompleteSelect, AutocompleteSelectType } from \"./AutocompleteSelect\";\r\n\r\ntype ProductAttributeSelectPropsType = Omit, \"data\" | \"getLabel\">;\r\n\r\nexport const ProductAttributeSelect: React.FunctionComponent = props => {\r\n\tconst [attributes, renderAttributeLabel] = useProductAttributes();\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t{...(props as AutocompleteSelectType)}\r\n\t\t\tdata={attributes}\r\n\t\t\tgetLabel={renderAttributeLabel}\r\n\t\t/>\r\n\t);\r\n};\r\n","import { Product, ProductValidationState } from \"../types\";\r\nimport { createUseValidator } from \"../../../../core/util/hooks\";\r\n\r\nexport const roleValidationState: ProductValidationState = {\r\n\tprodName: true,\r\n\tprodNameen: true,\r\n\tproductGroupId: true,\r\n\tprodCode: true,\r\n\tunit: true,\r\n\tvat: true,\r\n};\r\n\r\nexport const useProductValidator = createUseValidator(roleValidationState);\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { Product } from \"../types\";\r\n\r\nexport const createProductApi = (userId: string, product: Product) =>\r\n\twebApiWithResponse({\r\n\t\tmethod: \"PUT\",\r\n\t\turl: \"listing/newprod\",\r\n\t\tparams: {\r\n\t\t\tuserId\r\n\t\t},\r\n\t\tdata: product\r\n\t});\r\n\r\nexport default createProductApi;\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { Product } from \"../types\";\r\n\r\nexport const updateProductApi = (userId: string, product: Product) =>\r\n\twebApiWithResponse({\r\n\t\tmethod: \"PUT\",\r\n\t\turl: \"listing/updprod\",\r\n\t\tparams: {\r\n\t\t\tuserId\r\n\t\t},\r\n\t\tdata: product\r\n\t});\r\n\r\nexport default updateProductApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { upsertProduct } from \"../thunks/upsertProduct\";\r\nimport { setFetchState } from \"../productsDataReducer\";\r\nimport { Product } from \"../types\";\r\n\r\nexport const useProductUpsert = () => {\r\n\tconst fetchState = useSelector(\r\n\t\tstore => store.data.listing.products.fetchState\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchUpsertRole = React.useCallback(\r\n\t\t(product: Product) => dispatch(upsertProduct(product)),\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tdispatch(setFetchState({ type: \"not-started\" }))\r\n\t}, [dispatch])\r\n\r\n\treturn [fetchState, dispatchUpsertRole] as [typeof fetchState, typeof dispatchUpsertRole]\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport createProductApi from \"../api/createProduct\";\r\nimport updateProductApi from \"../api/updateProduct\";\r\nimport { setFetchState } from \"../productsDataReducer\";\r\nimport { Product } from \"../types\";\r\n\r\nexport const upsertProduct = (product: Product): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setFetchState({ type: \"started\" }));\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst result = product.prodId\r\n\t\t? await dispatch(updateProductApi(userId, product))\r\n\t\t: await dispatch(createProductApi(userId, product));\r\n\r\n\tif (result && result.resCode === \"OK\") {\r\n\t\tdispatch(setFetchState({ type: \"successful\", result: result.resDesc }));\r\n\t\treturn result.resDesc;\r\n\t} else {\r\n\t\tdispatch(setFetchState({ type: \"error\", errorCode: result?.resCode }));\r\n\t}\r\n};\r\n","import { useSelector } from \"react-redux\";\r\nimport { StoreType } from \"../../../core/store/reducers\";\r\nimport { VatRate } from \"../../models\";\r\n\r\nconst getUnitLabel = (vat?: VatRate) => (vat ? vat.ftDescr : \"\");\r\n\r\nexport const useVatRates = () => {\r\n\tconst vatRates = useSelector(store => store.data.initialData.vatRates);\r\n\r\n\treturn [vatRates, getUnitLabel] as [typeof vatRates, typeof getUnitLabel];\r\n};\r\n","import React from \"react\";\r\nimport { useVatRates } from \"../../../data/initialData/hooks/useVatRates\";\r\nimport { VatRate } from \"../../../data/models\";\r\nimport { AutocompleteSelect, AutocompleteSelectType } from \"./AutocompleteSelect\";\r\n\r\ntype VatRatePropsType = Omit, \"data\" | \"getLabel\">;\r\n\r\nexport const VatRateSelect: React.FunctionComponent = props => {\r\n\tconst [units, renderUnitLabel] = useVatRates();\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t{...(props as AutocompleteSelectType)}\r\n\t\t\tdata={units}\r\n\t\t\tgetLabel={renderUnitLabel}\r\n\t\t/>\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport { useProductValidator } from \"../../../data/listing/products/hooks/useProductValidator\";\r\nimport { useProductUpsert } from \"../../../data/listing/products/hooks/useProductUpsert\";\r\nimport { Product } from \"../../../data/listing/products/types\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Grid } from \"@material-ui/core\";\r\nimport { FabSave } from \"../../components/common/FabSave\";\r\nimport { StringInput } from \"../../components/common/StringInput\";\r\nimport { Status } from \"../../../data/models\";\r\nimport { UnitSelect } from \"../../components/common/UnitSelect\";\r\nimport { VatRateSelect } from \"../../components/common/VatRateSelect\";\r\nimport { ProductGroupSelect } from \"../../components/common/ProductGroupSelect\";\r\nimport { BoolInput } from \"../../components/common/BoolInput\";\r\nimport { LeavePrompt } from \"../../components/common/LeavePrompt\";\r\nimport { productsLocation } from \"./Locations\";\r\n\r\nexport interface EditProductBasicProps {\r\n\tproduct: Product;\r\n\teditProduct: (field: keyof Product, value: any) => void;\r\n\tchanged: boolean;\r\n}\r\n\r\nexport const EditProductBasicInfo: React.FunctionComponent = props => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\tconst { product, editProduct, changed } = props;\r\n\tconst [validationState, validate] = useProductValidator();\r\n\tconst [fetchState, upsert] = useProductUpsert();\r\n\tconst history = useHistory();\r\n\r\n\tconst unsavedChanges = fetchState.type === \"not-started\" && changed;\r\n\r\n\tconst handleChange = React.useCallback(\r\n\t\t(event: React.ChangeEvent) => {\r\n\t\t\teditProduct(event.target.name as any, event.target.value);\r\n\t\t},\r\n\t\t[editProduct]\r\n\t);\r\n\r\n\tconst save = React.useCallback(() => {\r\n\t\tconst save = async () => {\r\n\t\t\tconst normalized = validate(product);\r\n\t\t\tif (normalized) {\r\n\t\t\t\tconst newId = await upsert(normalized);\r\n\t\t\t\tif (newId) {\r\n\t\t\t\t\teditProduct(\"prodId\", newId);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t\tif (fetchState.type === \"successful\") {\r\n\t\t\thistory.push(productsLocation);\r\n\t\t} else if (fetchState.type !== \"started\") {\r\n\t\t\tsave();\r\n\t\t}\r\n\r\n\t}, [product, validate, fetchState, editProduct, history, upsert]);\r\n\r\n\tif (!product) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\treturn (\r\n\t\t<>\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\t\r\n\t\t\t\t\t\t\tproperty=\"prodName\"\r\n\t\t\t\t\t\t\titem={product}\r\n\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\tlabel={getString(\"productName\")}\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\t\tproperty=\"prodNameen\"\r\n\t\t\t\t\t\t\titem={product}\r\n\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\tlabel={getString(\"productNameEN\")}\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\t\tproperty=\"prodCode\"\r\n\t\t\t\t\t\t\titem={product}\r\n\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\tlabel={getString(\"productCode\")}\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\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t group.prodGroupId === product.productGroupId}\r\n\t\t\t\t\t\t\tonChangeItem={group => editProduct(\"productGroupId\", group?.prodGroupId)}\r\n\t\t\t\t\t\t\trequired={validationState.productGroupId !== undefined}\r\n\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\tvalidationState.productGroupId !== undefined &&\r\n\t\t\t\t\t\t\t\t!validationState.productGroupId\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\t\r\n\t\t\t\t\t\t vat.ftValue === product.vat}\r\n\t\t\t\t\t\t\tonChangeItem={vat => editProduct(\"vat\", vat?.ftValue)}\r\n\t\t\t\t\t\t\trequired={validationState.vat !== undefined}\r\n\t\t\t\t\t\t\terror={validationState.vat !== undefined && !validationState.vat}\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\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t unit.ftValue === product.unit}\r\n\t\t\t\t\t\t\tonChangeItem={unit => editProduct(\"unit\", unit?.ftValue)}\r\n\t\t\t\t\t\t\trequired={validationState.unit !== undefined}\r\n\t\t\t\t\t\t\terror={validationState.unit !== undefined && !validationState.unit}\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\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tproperty=\"status\"\r\n\t\t\t\t\t\t\titem={product}\r\n\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\tfalsyValue={Status.Inactive}\r\n\t\t\t\t\t\t\tthrutyValue={Status.Active}\r\n\t\t\t\t\t\t\tlabel={getString(\"cliStatus\")}\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\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n","import { webApi } from \"../../../../../core/http/httpThunks\";\r\n\r\nexport const deleteAttributeApi = (userId: string, prodattrid: string) =>\r\n\twebApi({\r\n\t\tmethod: \"DELETE\",\r\n\t\turl: \"listing/delprodattr\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t\tprodattrid\r\n\t\t},\r\n\t});\r\n\r\nexport default deleteAttributeApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\nimport { deleteAttribute } from \"../../thunks/attributes/deleteAttribute\";\r\nimport { setFetchStateAttribute } from \"../../productsDataReducer\";\r\n\r\nexport const useAttributeDelete = () => {\r\n\tconst fetchState = useSelector(\r\n\t\tstore => store.data.listing.products.fetchStateAttribute\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchDeleteAttribute = React.useCallback(\r\n\t\t(id: string) => dispatch(deleteAttribute(id)),\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tdispatch(setFetchStateAttribute({ type: \"not-started\" }))\r\n\t}, [dispatch])\r\n\r\n\treturn [fetchState, dispatchDeleteAttribute] as [typeof fetchState, typeof dispatchDeleteAttribute]\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport deleteAttributeApi from \"../../api/attributes/deleteAttribute\";\r\nimport { setFetchStateAttribute } from \"../../productsDataReducer\";\r\n\r\nexport const deleteAttribute = (attributeId: string): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setFetchStateAttribute({ type: \"started\" }));\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst result = await dispatch(deleteAttributeApi(userId, attributeId));\r\n\r\n\tdispatch(setFetchStateAttribute(result !== undefined ? { type: \"successful\" } : { type: \"error\"}));\r\n};\r\n","import React from \"react\";\r\nimport { Table, TableDataProps } from \"../../../components/common/Table\";\r\nimport { useAttributes } from \"../../../../data/listing/products/hooks/attributes/useAttributes\";\r\nimport { useAttributeDelete } from \"../../../../data/listing/products/hooks/attributes/useAttributeDelete\";\r\nimport { ProductAttribute, ProducAttributeManditory } from \"../../../../data/listing/products/types\";\r\nimport { Column, Action } from \"material-table\";\r\nimport { DisplayBoolNumber } from \"../../../components/common/DisplayBoolNumber\";\r\nimport { useDisplaySingleEmementStyles } from \"../../../useDisplaySingleEmementStyles\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport EditIcon from \"@material-ui/icons/EditOutlined\";\r\nimport { ProductEditParts, getProductEditLocation } from \"../Locations\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { Fab } from \"@material-ui/core\";\r\nimport { usePageStyles } from \"../../../pageStyles\";\r\nimport AddIcon from \"@material-ui/icons/Add\";\r\nimport { Status } from \"../../../../data/models\";\r\n\r\nexport interface AttributeTableProps {\r\n\tproductId: string;\r\n}\r\n\r\ntype AttributeTablePropsType = AttributeTableProps & TableDataProps;\r\n\r\nexport const AttributeTable: React.FunctionComponent = ({\r\n\tproductId,\r\n\t...tableProps\r\n}) => {\r\n\tconst pageStyles = usePageStyles();\r\n\tconst history = useHistory();\r\n\r\n\tconst [data, reload] = useAttributes(productId);\r\n\r\n\tconst columns = useAttributeColumns();\r\n\tconst actions = useAttributeActions();\r\n\tconst onDeleteAttribute = useDeleteAttributeAction();\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t\r\n\t\t\t\t{...tableProps}\r\n\t\t\t\tgetData={() => {}}\r\n\t\t\t\timmutableData={data}\r\n\t\t\t\ttitle=\"\"\r\n\t\t\t\tcolumns={columns}\r\n\t\t\t\tactions={actions}\r\n\t\t\t\toptions={{\r\n\t\t\t\t\ttoolbar: false,\r\n\t\t\t\t\tpageSize: 5,\r\n\t\t\t\t\tactionsColumnIndex: -1,\r\n\t\t\t\t}}\r\n\t\t\t\teditable={{\r\n\t\t\t\t\tonRowDelete: async broker => {\r\n\t\t\t\t\t\tawait onDeleteAttribute(broker);\r\n\t\t\t\t\t\treload();\r\n\t\t\t\t\t},\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t\t history.push(getProductEditLocation(ProductEditParts.Attributes, productId, \"\"))}\r\n\t\t\t>\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 AttributeTable;\r\n\r\nconst useAttributeColumns = () => {\r\n\tconst style = useDisplaySingleEmementStyles();\r\n\tconst { getString, getFormatedNumberString, getFormatedNumberStringBlanko } = React.useContext(LocalizationContext);\r\n\treturn React.useMemo(\r\n\t\t() => [\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"productAttributeName\"),\r\n\t\t\t\tfield: \"prodAttrName\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"productAttributeType\"),\r\n\t\t\t\tfield: \"type\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"productAttributeComparator\"),\r\n\t\t\t\tfield: \"comparator\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"productAttributeStandardValue\"),\r\n\t\t\t\trender: (attribute) => getFormatedNumberStringBlanko(attribute.standardValue, true),\r\n\t\t\t\tsorting: false,\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t whiteSpace: \"nowrap\",\r\n\t\t\t\t textAlign: \"end\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t textAlign: \"end\",\r\n\t\t\t\t},\r\n\t\t\t },\r\n\t\t\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"attributeOrder\"),\r\n\t\t\t\trender: (attribute) => getFormatedNumberString(attribute.orderNo),\r\n\t\t\t\tsorting: false,\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t whiteSpace: \"nowrap\",\r\n\t\t\t\t textAlign: \"end\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t textAlign: \"end\",\r\n\t\t\t\t},\r\n\t\t\t },\r\n\r\n\t\t\t {\r\n\t\t\t\ttitle: getString(\"productAttributeStatus\"),\r\n\t\t\t\trender: attribute => (\r\n\t\t\t\t\t\r\n\t\t\t\t),\r\n\t\t\t\tcustomSort: (a, b) => a.status - b.status,\r\n\t\t\t},\r\n\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"productAttributeManditory\"),\r\n\t\t\t\trender: attribute => (\r\n\t\t\t\t\t\r\n\t\t\t\t),\r\n\t\t\t\tcustomSort: (a, b) => a.mandatory - b.mandatory,\r\n\t\t\t},\r\n\t\t],\r\n\t\t[getString, style.icon]\r\n\t) as Column[];\r\n};\r\n\r\nconst useDeleteAttributeAction = () => {\r\n\tconst [, deleteAttribute] = useAttributeDelete();\r\n\treturn React.useCallback(\r\n\t\tasync (attribute: ProductAttribute) => {\r\n\t\t\tif (attribute.prodAttrId) {\r\n\t\t\t\tawait deleteAttribute(attribute.prodAttrId);\r\n\t\t\t}\r\n\t\t},\r\n\t\t[deleteAttribute]\r\n\t);\r\n};\r\n\r\nexport const useAttributeActions = () => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst onEditAttribute = useEditAttributeAction();\r\n\r\n\treturn React.useMemo(() => {\r\n\t\tconst result: Action[] = [\r\n\t\t\t{\r\n\t\t\t\ticon: () => ,\r\n\t\t\t\ttooltip: getString(\"tableEdit\"),\r\n\t\t\t\tonClick: (event, rowData) => onEditAttribute(rowData as ProductAttribute),\r\n\t\t\t},\r\n\t\t];\r\n\r\n\t\treturn result;\r\n\t}, [getString, onEditAttribute]);\r\n};\r\n\r\nexport const useEditAttributeAction = () => {\r\n\tconst history = useHistory();\r\n\treturn React.useCallback(\r\n\t\t(attribute: ProductAttribute) =>\r\n\t\t\thistory.push(\r\n\t\t\t\tgetProductEditLocation(ProductEditParts.Attributes, attribute.productId, attribute.prodAttrId)\r\n\t\t\t),\r\n\t\t[history]\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport { useDisplayProduct } from \"./useDisplayProduct\";\r\nimport { Product } from \"../types\";\r\nimport { useCopiedState } from \"../../../../core/util/hooks\";\r\nimport { Status } from \"../../../models\";\r\n\r\nexport const defauiltProduct: Product = {\r\n\tprodName: \"\",\r\n\tprodNameen: \"\",\r\n\tstatus: Status.Active,\r\n};\r\n\r\nexport const useEditProduct = (productId?: string) => {\r\n\tconst displayRole = useDisplayProduct(productId);\r\n\r\n\treturn React.useMemo(() => {\r\n\t\tif (productId !== undefined && displayRole === undefined) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\tif (productId === undefined) {\r\n\t\t\treturn { ...defauiltProduct };\r\n\t\t}\r\n\r\n\t\treturn displayRole ? { ...displayRole } : undefined;\r\n\t}, [productId, displayRole]);\r\n};\r\n\r\nexport const useEditProductState = (empId?: string) => {\r\n\tconst role = useEditProduct(empId);\r\n\treturn useCopiedState(role);\r\n};\r\n","import { NavigationItem } from \"../../../core/navigation/types\";\r\nimport ProductPage from \"./ProductPage\";\r\nimport { EditAttribute } from \"./attributes/EditAttribute\";\r\nimport { EditProductPage } from \"./EditProductPage\";\r\nimport { productsLocation, atributesEdit, baseEdit } from \"./Locations\";\r\nexport const productsComponents: NavigationItem[] = [\r\n\t{\r\n\t\tComponent: ProductPage,\r\n\t\tisMenuItem: true,\r\n\t\tpath: productsLocation,\r\n\t},\r\n\t{\r\n\t\tComponent: EditAttribute,\r\n\t\tisMenuItem: false,\r\n\t\tpath: atributesEdit,\r\n\t},\r\n\t{\r\n\t\tComponent: EditProductPage,\r\n\t\tisMenuItem: false,\r\n\t\tpath: baseEdit,\r\n\t},\r\n];\r\n","import React from \"react\";\r\nimport { useEditAttributeState } from \"../../../../data/listing/products/hooks/attributes/useEditAttributeState\";\r\nimport { useAttributeValidator } from \"../../../../data/listing/products/hooks/attributes/useAttributeValidator\";\r\nimport { useAttributeUpsert } from \"../../../../data/listing/products/hooks/attributes/useAttributeUpsert\";\r\nimport { ProductAttribute, ProducAttributeManditory, ProducAttributeHasStandard } from \"../../../../data/listing/products/types\";\r\nimport { RouteComponentProps, useHistory } from \"react-router-dom\";\r\nimport { usePageStyles } from \"../../../pageStyles\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { Card, Grid, CardHeader, Divider, CardContent } from \"@material-ui/core\";\r\nimport { FabSave } from \"../../../components/common/FabSave\";\r\nimport { StringInput } from \"../../../components/common/StringInput\";\r\nimport { getProductEditLocation, ProductEditParts } from \"../Locations\";\r\nimport { ProductAttributeSelect } from \"../../../components/common/ProductAttributeSelect\";\r\nimport { BoolInput } from \"../../../components/common/BoolInput\";\r\nimport { Status } from \"../../../../data/models\";\r\nimport { LeavePrompt } from \"../../../components/common/LeavePrompt\";\r\nimport { PageTitle } from \"../../../components/common/PageTitle\";\r\nimport { NumberInput } from \"../../../components/common/NumberInput\";\r\nimport { AttributeType } from \"../../../../data/listing/attributes/types\";\r\n\r\nexport interface EditAttributeInfo {\r\n\tattributeId?: string;\r\n\tproductId: string;\r\n}\r\n\r\nexport interface EditAttributeProps extends RouteComponentProps {}\r\n\r\nexport const EditAttribute: React.FunctionComponent = props => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst { productId, attributeId } = props.match.params;\r\n\tconst [attribute, editAttribute, changed] = useEditAttributeState(productId, attributeId);\r\n\tconst [validationState, validate] = useAttributeValidator();\r\n\tconst [fetchState, upsert] = useAttributeUpsert();\r\n\tconst history = useHistory();\r\n\r\n\tconst unsavedChanges = fetchState.type === \"not-started\" && changed;\r\n\r\n\tconst handleChange = React.useCallback(\r\n\t\t(event: React.ChangeEvent) => {\r\n\t\t\teditAttribute(event.target.name as any, event.target.value);\r\n\t\t},\r\n\t\t[editAttribute]\r\n\t);\r\n\r\n\tconst handleChangeNum = React.useCallback(\r\n\t\t(event: React.ChangeEvent) => {\r\n\t\t\teditAttribute(event.target.name as any, parseInt(event.target.value));\r\n\t\t},\r\n\t\t[editAttribute]\r\n\t);\r\n\r\n\tconst backLocation = React.useMemo(() => getProductEditLocation(ProductEditParts.Attributes, productId), [productId]);\r\n\r\n\tconst save = React.useCallback(() => {\r\n\t\tif (fetchState.type === \"successful\") {\r\n\t\t\thistory.push(backLocation);\r\n\t\t} else if (fetchState.type !== \"started\") {\r\n\t\t\tconst normalized = validate(attribute);\r\n\t\t\tif (normalized) {\r\n\t\t\t\tupsert(normalized);\r\n\t\t\t}\r\n\t\t}\r\n\t}, [attribute, validate, fetchState, history, upsert, backLocation]);\r\n\r\n\tconst pageTitle =\r\n\t\tattribute && attribute.prodAttrId ? \"productAttributeEditTitle\" : \"productAttributeCreateTitle\";\r\n\r\n\tif (!attribute) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\treturn (\r\n\t\t\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\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 attr.attrId === attribute.attributeId}\r\n\t\t\t\t\t\t\t\t\trequired={validationState.attributeId !== undefined}\r\n\t\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\t\tvalidationState.attributeId !== undefined &&\r\n\t\t\t\t\t\t\t\t\t\t!validationState.attributeId\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tonChangeItem={attr => {\r\n\t\t\t\t\t\t\t\t\t\teditAttribute(\"attributeId\", attr ? attr.attrId : undefined);\r\n\t\t\t\t\t\t\t\t\t\teditAttribute(\"prodAttrName\", attr ? attr.attrName : undefined);\r\n\t\t\t\t\t\t\t\t\t\teditAttribute(\"type\", attr ? attr.attrType : undefined);\r\n\t\t\t\t\t\t\t\t\t\teditAttribute(\"mandatory\", attr ? attr.mandatory : undefined);\r\n\t\t\t\t\t\t\t\t\t\teditAttribute(\"comparator\", attr ? attr.comparator : undefined);\r\n\t\t\t\t\t\t\t\t\t\teditAttribute(\"hasStandard\", attr?.attrType.trimEnd() == AttributeType.Select.trimEnd() ? ProducAttributeHasStandard.False : ProducAttributeHasStandard.True);\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\r\n\t\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\tproperty=\"prodAttrName\"\r\n\t\t\t\t\t\t\t\t\titem={attribute}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"productAttributeName\")}\r\n\t\t\t\t\t\t\t\t\tdisabled\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\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tproperty=\"type\"\r\n\t\t\t\t\t\t\t\t\titem={attribute}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"productAttributeType\")}\r\n\t\t\t\t\t\t\t\t\tdisabled\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\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tproperty=\"orderNo\"\r\n\t\t\t\t\t\t\t\t\titem={attribute}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChangeNum}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"attributeOrder\")}\r\n\t\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\r\n\r\n\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\r\n\t\t\t\t\t\t\t\t\tproperty=\"hasStandard\"\r\n\t\t\t\t\t\t\t\t\titem={attribute}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tfalsyValue={ProducAttributeHasStandard.False}\r\n\t\t\t\t\t\t\t\t\tthrutyValue={ProducAttributeHasStandard.True}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"productAttributeHasStandard\")}\r\n\t\t\t\t\t\t\t\t\tdisabled ={attribute.type.trimEnd() == AttributeType.Select.trimEnd() }\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\tproperty=\"standardValue\"\r\n\t\t\t\t\t\t\t\t\t\titem={attribute}\r\n\t\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\t\tlabel={getString(\"productAttributeStandardValue\")}\r\n\t\t\t\t\t\t\t\t\t\tdisabled ={attribute.type.trimEnd() == AttributeType.Select.trimEnd() || attribute.hasStandard==ProducAttributeHasStandard.False}\r\n\t\t\t\t\t\t\t\t\t\terror={!(validationState.hasStandard === undefined || validationState.hasStandard)}\r\n\t\t\t\t\t\t\t\t\t\tmoney\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\r\n\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\tproperty=\"mandatory\"\r\n\t\t\t\t\t\t\t\t\titem={attribute}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tfalsyValue={ProducAttributeManditory.False}\r\n\t\t\t\t\t\t\t\t\tthrutyValue={ProducAttributeManditory.True}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"productAttributeManditory\")}\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\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\tproperty=\"status\"\r\n\t\t\t\t\t\t\t\t\titem={attribute}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tfalsyValue={Status.Inactive}\r\n\t\t\t\t\t\t\t\t\tthrutyValue={Status.Active}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"productAttributeStatus\")}\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\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};\r\n","import React from \"react\";\r\nimport { RouteComponentProps, useHistory } from \"react-router-dom\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Card, Grid, CardHeader, Divider, CardContent, Tabs, Tab } from \"@material-ui/core\";\r\nimport { EditProductBasicInfo } from \"./EditProductBasicInfoPage\";\r\nimport { AttributeTable } from \"./attributes/AttributeTable\";\r\nimport { useEditProductState } from \"../../../data/listing/products/hooks/useEditPRoductState\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { productsLocation, ProductEditParts, getProductEditLocation } from \"./Locations\";\r\n\r\nexport interface EditProductInfo {\r\n\teditPart?: string;\r\n\tproductId?: string;\r\n}\r\n\r\nexport interface EditProductProps extends RouteComponentProps {}\r\n\r\nexport const EditProductPage: React.FunctionComponent = props => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst pageStyles = usePageStyles();\r\n\tconst { editPart, productId } = props.match.params;\r\n\r\n\tconst history = useHistory();\r\n\tconst [product, editProduct, changed] = useEditProductState(productId);\r\n\r\n\tconst handleSideChange = React.useCallback(\r\n\t\t(event: React.ChangeEvent<{}>, newValue: any) => {\r\n\t\t\thistory.push(getProductEditLocation(newValue, productId));\r\n\t\t},\r\n\t\t[history, productId]\r\n\t);\r\n\r\n\tconst pageTitle = productId ? \"productEditTitle\" : \"productCreateTitle\";\r\n\treturn (\r\n\t\t\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\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\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t{editPart === ProductEditParts.BasicInfo && product && (\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\t{editPart === ProductEditParts.Attributes && product && product.prodId && (\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\t);\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { Region } from \"../types\";\r\n\r\nexport const getAllRegionApi = (userId: string, regtype: number) =>\r\n webApi({\r\n method: \"GET\",\r\n url: \"listing/getreglist\",\r\n params: {\r\n userId,\r\n regtype,\r\n },\r\n });\r\n\r\nexport default getAllRegionApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadAllRegions } from \"../thunks/loadAllRegions\";\r\nimport { Region } from \"../types\";\r\nimport { RegType } from \"../../../models\";\r\n\r\nexport const useRegionData = (regtype?: RegType) => {\r\n\tconst type = regtype || RegType.Region;\r\n\tconst data = useSelector(s => s.data.listing.regions.displayData[type]);\r\n\tconst allData = useSelector(s => s.data.listing.regions.all[type]);\r\n\r\n\tconst dispatch = useDispatch();\r\n\r\n\tconst dispatchLoadAllRegions = React.useCallback(() => {\r\n\t\tif (regtype) {\r\n\t\t\tdispatch(loadAllRegions(regtype));\r\n\t\t}\r\n\t}, [dispatch, regtype]);\r\n\r\n\treturn [data, dispatchLoadAllRegions, allData] as [\r\n\t\ttypeof data,\r\n\t\ttypeof dispatchLoadAllRegions,\r\n\t\ttypeof allData\r\n\t];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getAllRegionApi from \"../api/getAllRegion\";\r\nimport { setData } from \"../regionsDataReducer\";\r\nimport { RegType } from \"../../../models\";\r\n\r\nexport const loadAllRegions = (type: RegType): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(\r\n\t\tsetData({\r\n\t\t\ttype,\r\n\t\t\tdata: undefined,\r\n\t\t})\r\n\t);\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst regions = await dispatch(getAllRegionApi(userId, type));\r\n\r\n\tdispatch(\r\n\t\tsetData({\r\n\t\t\ttype,\r\n\t\t\tdata: regions || [],\r\n\t\t})\r\n\t);\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { Region } from \"../types\";\r\n\r\nexport const getRegApi = (userId: string, regid: string) =>\r\n webApi({\r\n method: \"GET\",\r\n url: \"listing/getreg\",\r\n params: {\r\n userId,\r\n regid,\r\n },\r\n });\r\n\r\nexport default getRegApi;\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getRegApi from \"../api/getRegion\";\r\nimport { setDisplayed } from \"../regionsDataReducer\";\r\nimport { Region } from \"../types\";\r\n\r\nexport const loadRegion = (regId: string): ThunkType => async (dispatch, getStore) => {\r\n\tdispatch(setDisplayed());\r\n\r\n\tconst region = await dispatch(getRegion(regId));\r\n\tdispatch(setDisplayed(region));\r\n};\r\n\r\nexport const getRegion = (regId: string): ThunkType> => async (\r\n\tdispatch,\r\n\tgetStore\r\n) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\treturn await dispatch(getRegApi(userId, regId));\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { Region } from \"../types\";\r\nimport { loadRegion } from \"../thunks/loadRegion\";\r\n\r\nexport const useDisplayRegion = (regId?: string) => {\r\n\tconst storeRegion = useSelector(\r\n\t\tstore => store.data.listing.regions.displayedRegion\r\n\t);\r\n\r\n\tconst displayedRegion = storeRegion && storeRegion.regId === regId ? storeRegion : undefined;\r\n\r\n\tconst displatch = useDispatch();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (regId) {\r\n\t\t\tdisplatch(loadRegion(regId));\r\n\t\t}\r\n\t}, [displatch, regId]);\r\n\r\n\treturn displayedRegion;\r\n};\r\n","import React from \"react\";\r\nimport { Region } from \"../../../data/listing/regions/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { useDisplaySingleEmementStyles } from \"../../useDisplaySingleEmementStyles\";\r\nimport { DisplayBoolNumber } from \"../../components/common/DisplayBoolNumber\";\r\nimport { Status, RegType } from \"../../../data/models\";\r\nimport { useCountryGetter } from \"../../../data/listing/countries/hooks/useCountryData\";\r\n\r\nexport interface DisplayRegionMainAttributesProps {\r\n\tregion: Region;\r\n}\r\n\r\nexport const DisplayRegionMainAttributes: React.FunctionComponent = ({\r\n\tregion,\r\n}) => {\r\n\tconst style = useDisplaySingleEmementStyles();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst [getCountry] = useCountryGetter();\r\n\tconst regionName = region.regType === RegType.TopRegion ? \"regName\" : \"regNameDistrict\"\r\n\r\n\treturn (\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(regionName)}\r\n\t\t\t\t{region.regName}\r\n\t\t\t
\r\n\t\t\t{region.regType !== RegType.TopRegion && (\r\n\t\t\t\t
\r\n\t\t\t\t\t{getString(\"parentRegName\")}\r\n\t\t\t\t\t{region.parentRegName}\r\n\t\t\t\t
\r\n\t\t\t)}\r\n\t\t\t{region.regType === RegType.TopRegion && (\r\n\t\t\t\t
\r\n\t\t\t\t\t{getString(\"countryReg\")}\r\n\t\t\t\t\t{getCountry(region.country)?.cntName}\r\n\t\t\t\t
\r\n\t\t\t)}\r\n\t\t\t
\r\n\t\t\t\t{getString(\"cliStatus\")}\r\n\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};\r\n","import React from \"react\";\r\nimport { useDisplayRegion } from \"../../../data/listing/regions/hooks/useDisplayRegion\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { Region } from \"../../../data/listing/regions/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { DisplayRegionMainAttributes } from \"./DisplayRegionMainAttributes\";\r\nimport {\r\n ExpansionPanel,\r\n ExpansionPanelSummary,\r\n Typography,\r\n Grid,\r\n} from \"@material-ui/core\";\r\n\r\nexport interface DisplayRegionProps {\r\n id?: string;\r\n}\r\n\r\nexport const DisplayRegion: React.FunctionComponent = ({\r\n id,\r\n}) => {\r\n const region = useDisplayRegion(id);\r\n const { getString } = React.useContext(LocalizationContext);\r\n\r\n\r\n return !region ? (\r\n <>{\"loading placeholder\"}\r\n ) : (\r\n \r\n \r\n \r\n {getString(\"tableBasciInfo\")}\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const useViewRegion = () => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n return React.useCallback(\r\n (region: Region) => showWithDrawer(),\r\n [showWithDrawer]\r\n );\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const deleteRegionApi = (userId: string, regid: string) =>\r\n webApi({\r\n method: \"DELETE\",\r\n url: \"listing/delreg\",\r\n params: {\r\n userId,\r\n regid,\r\n },\r\n });\r\n\r\nexport default deleteRegionApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType, RegType } from \"../../../models\";\r\nimport { deleteRegion } from \"../thunks/deleteRegion\";\r\nimport { setFetchState } from \"../regionsDataReducer\";\r\n\r\nexport const useRegionDelete = (type?: RegType) => {\r\n\tconst fetchState = useSelector(\r\n\t\tstore => store.data.listing.regions.fetchState[type || RegType.Region]\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchDeleteRegion = React.useCallback(\r\n\t\t(id: string) => {\r\n\t\t\tif (type) {\r\n\t\t\t\tdispatch(deleteRegion(id, type));\r\n\t\t\t}\r\n\t\t},\r\n\t\t[dispatch, type]\r\n\t);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (type) {\r\n\t\t\tdispatch(setFetchState({ type, data: { type: \"not-started\" } }));\r\n\t\t}\r\n\t}, [dispatch, type]);\r\n\r\n\treturn [fetchState, dispatchDeleteRegion] as [typeof fetchState, typeof dispatchDeleteRegion];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport deleteRegionApi from \"../api/deleteRegion\";\r\nimport { setFetchState } from \"../regionsDataReducer\";\r\nimport { RegType } from \"../../../models\";\r\n\r\nexport const deleteRegion = (regId: string, type: RegType): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(\r\n\t\tsetFetchState({\r\n\t\t\tdata: { type: \"started\" },\r\n\t\t\ttype,\r\n\t\t})\r\n\t);\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tawait dispatch(deleteRegionApi(userId, regId));\r\n\r\n\tdispatch(\r\n\t\tsetFetchState({\r\n\t\t\tdata: { type: \"successful\" },\r\n\t\t\ttype,\r\n\t\t})\r\n\t);\r\n};\r\n","import { getEditLocation } from \"../../../core/util/functions\";\r\nimport { RegType } from \"../../../data/models\";\r\n\r\nexport const regionsLocation = \"/listing/codebook/region\";\r\nexport const topRegionsLocation = \"/listing/codebook/topregion\";\r\nexport const subRegionsLocation = \"/listing/codebook/subregion\";\r\n\r\nexport const getRegionsEditLocation = (id?: string) => getEditLocation(regionsLocation, undefined, id);\r\n\r\nexport const getRegionsLocation = (type?: RegType) => {\r\n\tswitch (type) {\r\n\t\tcase RegType.TopRegion:\r\n\t\t\treturn topRegionsLocation;\r\n\t\tcase RegType.Region:\r\n\t\tdefault:\r\n\t\t\treturn regionsLocation;\r\n\t}\r\n};\r\n\r\nexport const editRouter = getRegionsEditLocation(\":regId?\");\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport ViewIcon from \"@material-ui/icons/InputOutlined\";\r\nimport EditIcon from \"@material-ui/icons/EditOutlined\";\r\nimport { Region } from \"../../../data/listing/regions/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Action } from \"material-table\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { useViewRegion } from \"./DisplayRegion\";\r\nimport { useRegionDelete } from \"../../../data/listing/regions/hooks/useRegionDelete\";\r\nimport { getRegionsEditLocation } from \"./Locations\";\r\nimport { RegType } from \"../../../data/models\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\n\r\nexport const useRegionsActions = (userAccessRights: AccessRights) => {\r\n const { getString } = useContext(LocalizationContext);\r\n const onShowRegion = useViewRegion();\r\n const onEditRegion = useEditRegionsAction();\r\n\r\n return useMemo(() => {\r\n const result: Action[] = [\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"tableShow\"),\r\n onClick: (event, rowData) => onShowRegion(rowData as Region),\r\n },\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"tableEdit\"),\r\n onClick: (event, rowData) => onEditRegion(rowData as Region),\r\n hidden: userAccessRights===AccessRights.ReadOnly\r\n },\r\n ];\r\n\r\n return result;\r\n }, [onShowRegion, onEditRegion, getString]);\r\n};\r\n\r\nexport const useDeleteRegionAction = (type?: RegType) => {\r\n const [, deleteRegion] = useRegionDelete(type);\r\n return React.useCallback(\r\n async (region: Region) => {\r\n if (region.regId) {\r\n await deleteRegion(region.regId);\r\n }\r\n },\r\n [deleteRegion]\r\n );\r\n};\r\n\r\nexport const useEditRegionsAction = () => {\r\n const history = useHistory();\r\n return React.useCallback(\r\n (region: Region) =>\r\n history.push(getRegionsEditLocation(region.regId)),\r\n [history]\r\n );\r\n};\r\n","import React from \"react\";\r\nimport { Table, TableDataProps } from \"../../components/common/Table\";\r\nimport { useRegionData } from \"../../../data/listing/regions/hooks/useRegionData\";\r\nimport { Region } from \"../../../data/listing/regions/types\";\r\nimport { useRegionsColumns } from \"./useRegionsColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\nimport { useRegionsActions, useDeleteRegionAction } from \"./useRegionsActions\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { StoreType } from \"../../../core/store/reducers\";\r\nimport { RegType } from \"../../../data/models\";\r\n\r\nexport interface RegionsTableProps {\r\n userAccessRights: AccessRights;\r\n}\r\n\r\ntype RegionsTablePropsType = RegionsTableProps & TableDataProps;\r\n\r\nexport const RegionsTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n ...tableProps\r\n}) => {\r\n const regtype = useSelector(\r\n (s) => s.data.listing.regions.regType\r\n );\r\n\r\n const [data, loadAll] = useRegionData(regtype);\r\n\r\n const columns = useRegionsColumns(regtype);\r\n const actions = useRegionsActions(userAccessRights);\r\n const onDeleteRegion = useDeleteRegionAction(regtype);\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={loadAll}\r\n immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n actions={actions}\r\n options={{\r\n toolbar: false,\r\n pageSize: 10,\r\n actionsColumnIndex: -1,\r\n }}\r\n editable={userAccessRights !== AccessRights.ReadOnly ?{\r\n onRowDelete: onDeleteRegion,\r\n } : {}}\r\n />\r\n );\r\n};\r\n\r\nexport default RegionsTable;\r\n","import { useContext, useMemo } from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\nimport { Region } from \"../../../data/listing/regions/types\";\r\nimport { RegType } from \"../../../data/models\";\r\nimport { useCountryGetter } from \"../../../data/listing/countries/hooks/useCountryData\";\r\n\r\nexport function useRegionsColumns(type?: RegType) {\r\n\tconst { getString } = useContext(LocalizationContext);\r\n\tconst [getCountry] = useCountryGetter();\r\n\r\n\tconst regionName = type === RegType.TopRegion ? \"regName\" : \"regNameDistrict\"\r\n\r\n\treturn useMemo(() => {\r\n\t\tconst columns = [\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(regionName),\r\n\t\t\t\tfield: \"regName\",\r\n\t\t\t},\r\n\t\t];\r\n\r\n\t\tif (type === RegType.TopRegion) {\r\n\t\t\tcolumns.push({\r\n\t\t\t\ttitle: getString(\"countryReg\"),\r\n\t\t\t\trender: (region: Region) => getCountry(region.country)?.cntName\r\n\t\t\t} as any);\r\n\t\t} else {\r\n\t\t\tcolumns.push({\r\n\t\t\t\ttitle: getString(\"parentRegName\"),\r\n\t\t\t\tfield: \"parentRegName\",\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn columns;\r\n\t}, [getString, type, getCountry]) as Column[];\r\n}\r\n","import { setSearchTerm } from \"../regionsDataReducer\";\r\nimport { useSearch } from \"../../../../core/util/storeHooks\";\r\nimport { RegType } from \"../../../models\";\r\n\r\nexport const useRegionSearch = (type: RegType) =>\r\n\tuseSearch(\r\n\t\ts => s.data.listing.regions.searchTerm[type],\r\n\t\tterm =>\r\n\t\t\tsetSearchTerm({\r\n\t\t\t\ttype,\r\n\t\t\t\tdata: term,\r\n\t\t\t})\r\n\t);\r\n","import React from \"react\";\r\nimport { useDispatch } from \"react-redux\";\r\nimport { setReg } from \"../regionsDataReducer\";\r\nimport { RegType } from \"../../../models\";\r\n\r\nexport const useRegionType = (regtype: RegType) => {\r\n\tconst dispatch = useDispatch();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tdispatch(setReg(regtype));\r\n\t}, [dispatch, regtype]);\r\n\r\n\treturn [regtype] as [typeof regtype];\r\n};\r\n","import React from \"react\";\r\nimport {\r\n Grid,\r\n CardContent,\r\n CardHeader,\r\n Divider,\r\n Card,\r\n Fab,\r\n} from \"@material-ui/core\";\r\nimport RegionsTable from \"./RegionsTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { SearchBox } from \"../../components/common/SearchBox\";\r\nimport { PageComponent, AccessRights } from \"../../../core/navigation/types\";\r\nimport AddIcon from \"@material-ui/icons/Add\";\r\nimport { useRegionSearch } from \"../../../data/listing/regions/hooks/useRegionSearch\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { useRegionType } from \"../../../data/listing/regions/hooks/useRegionType\";\r\nimport { getRegionsEditLocation } from \"./Locations\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { RegType } from \"../../../data/models\";\r\n\r\nconst RegionsPage: PageComponent = ({ userAccessRights }) => {\r\n const pageStyles = usePageStyles();\r\n\r\n useRegionType(RegType.Region);\r\n\r\n const [search, setSearch] = useRegionSearch(RegType.Region);\r\n const history = useHistory();\r\n\r\n return (\r\n \r\n \r\n \r\n }\r\n action={}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n {userAccessRights === AccessRights.All && (\r\n history.push(getRegionsEditLocation())}\r\n >\r\n \r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default RegionsPage;\r\n","import React from \"react\";\r\nimport { Grid, CardContent, CardHeader, Divider, Card, Fab } from \"@material-ui/core\";\r\nimport RegionsTable from \"./RegionsTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { SearchBox } from \"../../components/common/SearchBox\";\r\nimport { PageComponent, AccessRights } from \"../../../core/navigation/types\";\r\nimport AddIcon from \"@material-ui/icons/Add\";\r\nimport { useRegionSearch } from \"../../../data/listing/regions/hooks/useRegionSearch\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { useRegionType } from \"../../../data/listing/regions/hooks/useRegionType\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { getRegionsEditLocation } from \"./Locations\";\r\nimport { RegType } from \"../../../data/models\";\r\n\r\nconst TopRegionsPage: PageComponent = ({ userAccessRights }) => {\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tuseRegionType(RegType.TopRegion);\r\n\r\n\tconst [search, setSearch] = useRegionSearch(RegType.TopRegion);\r\n\tconst history = useHistory();\r\n\r\n\treturn (\r\n\t\t\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\taction={}\r\n\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\t{userAccessRights === AccessRights.All && (\r\n\t\t\t\t\t history.push(getRegionsEditLocation())}\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};\r\n\r\nexport default TopRegionsPage;\r\n","import React from \"react\";\r\nimport { useDisplayRegion } from \"./useDisplayRegion\";\r\nimport { Region } from \"../types\";\r\nimport { useCopiedState } from \"../../../../core/util/hooks\";\r\nimport { Status, RegType } from \"../../../models\";\r\n\r\nexport const createDefaultRegion = (type?: RegType): Region => ({\r\n\tregName: \"\",\r\n\tregType: type || 20,\r\n\tstatus: Status.Active,\r\n});\r\n\r\nexport const useEditRegion = (type?: RegType, regId?: string) => {\r\n\tconst displayRegion = useDisplayRegion(regId);\r\n\r\n\treturn React.useMemo(() => {\r\n\t\tif (regId !== undefined && displayRegion === undefined) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\tif (regId === undefined) {\r\n\t\t\tconst defaultRegion = createDefaultRegion(type);\r\n\t\t\treturn { ...defaultRegion };\r\n\t\t}\r\n\r\n\t\treturn displayRegion ? { ...displayRegion } : undefined;\r\n\t}, [regId, displayRegion, type]);\r\n};\r\n\r\nexport const useEditRegionState = (type?: RegType, regId?: string) => {\r\n\tconst region = useEditRegion(type, regId);\r\n\treturn useCopiedState(region);\r\n};\r\n","import { Region, RegionValidationState } from \"../types\";\r\nimport { createUseValidator } from \"../../../../core/util/hooks\";\r\nimport { RegType } from \"../../../models\";\r\n\r\nexport const regionValidationState: RegionValidationState = {\r\n\tregName: true,\r\n\tregType: true,\r\n\tcountry: true,\r\n\tparentRegId: true,\r\n};\r\n\r\nexport const useRegionValidator = createUseValidator(\r\n\tregionValidationState,\r\n\t(newState, validation) => ({\r\n\t\t...validation,\r\n\t\tparentRegId: validation.parentRegId || newState.regType === RegType.TopRegion,\r\n\t\tcountry: validation.country || newState.regType !== RegType.TopRegion,\r\n\t})\r\n);\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { Region } from \"../types\";\r\n\r\nexport const createRegionApi = (userId: string, region: Region) =>\r\n webApiWithResponse({\r\n method: \"PUT\",\r\n url: \"listing/newreg\",\r\n params: {\r\n userId,\r\n },\r\n data: region,\r\n });\r\n\r\nexport default createRegionApi;\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { Region } from \"../types\";\r\n\r\nexport const updateRegionApi = (userId: string, region: Region) =>\r\n webApiWithResponse({\r\n method: \"PUT\",\r\n url: \"listing/updreg\",\r\n params: {\r\n userId,\r\n },\r\n data: region,\r\n });\r\n\r\nexport default updateRegionApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType, RegType } from \"../../../models\";\r\nimport { upsertRegion } from \"../thunks/upsertRegion\";\r\nimport { setFetchState } from \"../regionsDataReducer\";\r\nimport { Region } from \"../types\";\r\n\r\nexport const useRegionUpsert = (type?: RegType) => {\r\n\tconst fetchState = useSelector(\r\n\t\tstore => store.data.listing.regions.fetchState[type || RegType.Region]\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchUpsertRegion = React.useCallback((region: Region) => dispatch(upsertRegion(region)), [\r\n\t\tdispatch,\r\n\t]);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (type) {\r\n\t\t\tdispatch(setFetchState({ type, data: { type: \"not-started\" } }));\r\n\t\t}\r\n\t}, [dispatch, type]);\r\n\r\n\treturn [fetchState, dispatchUpsertRegion] as [typeof fetchState, typeof dispatchUpsertRegion];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport createRegionApi from \"../api/createRegion\";\r\nimport updateRegionApi from \"../api/updateRegion\";\r\nimport { setFetchState } from \"../regionsDataReducer\";\r\nimport { Region } from \"../types\";\r\n\r\nexport const upsertRegion = (region: Region): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(\r\n\t\tsetFetchState({\r\n\t\t\tdata: { type: \"started\" },\r\n\t\t\ttype: region.regType,\r\n\t\t})\r\n\t);\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst result = region.regId\r\n\t\t? await dispatch(updateRegionApi(userId, region))\r\n\t\t: await dispatch(createRegionApi(userId, region));\r\n\r\n\tif (result && result.resCode === \"OK\") {\r\n\t\tdispatch(\r\n\t\t\tsetFetchState({\r\n\t\t\t\tdata: { type: \"successful\", result: result.resDesc },\r\n\t\t\t\ttype: region.regType,\r\n\t\t\t})\r\n\t\t);\r\n\t\treturn result.resDesc;\r\n\t} else {\r\n\t\tdispatch(\r\n\t\t\tsetFetchState({\r\n\t\t\t\tdata: { type: \"error\", errorCode: result?.resCode },\r\n\t\t\t\ttype: region.regType,\r\n\t\t\t})\r\n\t\t);\r\n\t}\r\n};\r\n","import { useSelector } from \"react-redux\";\r\nimport { StoreType } from \"../../../core/store/reducers\";\r\nimport { Country } from \"../../listing/countries/types\";\r\n\r\nconst getCountryLabel = (country?: Country) => (country ? country.cntName : \"\");\r\n\r\nexport const useCountries = () => {\r\n\tconst topRegions = useSelector(store => store.data.initialData.countries);\r\n\r\n\treturn [topRegions, getCountryLabel] as [typeof topRegions, typeof getCountryLabel];\r\n};\r\n","import React from \"react\";\r\nimport { useCountries } from \"../../../data/initialData/hooks/useCountries\";\r\nimport {\r\n AutocompleteSelect,\r\n AutocompleteSelectType,\r\n} from \"./AutocompleteSelect\";\r\nimport { Country } from \"../../../data/listing/countries/types\";\r\n\r\ntype RegionSelectPropsType = Omit<\r\n AutocompleteSelectType,\r\n \"data\" | \"getLabel\"\r\n>;\r\n\r\nexport const CountriesSelect: React.FunctionComponent = (\r\n props\r\n) => {\r\n const [countries, renderCountryLabel] = useCountries();\r\n\r\n return (\r\n \r\n data={countries}\r\n getLabel={renderCountryLabel}\r\n {...(props as any)}\r\n />\r\n );\r\n};\r\n","import React from \"react\";\r\nimport { useRegionData } from \"../../../data/listing/regions/hooks/useRegionData\";\r\nimport { Region } from \"../../../data/listing/regions/types\";\r\nimport { AutocompleteSelectType, AutocompleteSelect } from \"../common/AutocompleteSelect\";\r\nimport { RegType } from \"../../../data/models\";\r\n\r\nexport type RegionSelectPropsType = Omit, \"data\" | \"getLabel\"> & {\r\n\tregionType: RegType;\r\n};\r\n\r\nexport const RegionSelect: React.FunctionComponent = ({ regionType, ...otherProps }) => {\r\n\tconst [, loadAllRegions, regions] = useRegionData(regionType);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (!regions) {\r\n\t\t\tloadAllRegions();\r\n\t\t}\r\n\t}, [regions, loadAllRegions]);\r\n\r\n\tconst trimedRegions = React.useMemo(\r\n\t\t() =>\r\n\t\t\tregions?.map(\r\n\t\t\t\treg =>\r\n\t\t\t\t\t({\r\n\t\t\t\t\t\tregName: reg.regName,\r\n\t\t\t\t\t\tregType: reg.regType,\r\n\t\t\t\t\t\tregId: reg.regId,\r\n\t\t\t\t\t\tparentRegId: reg.parentRegId,\r\n\t\t\t\t\t} as Region)\r\n\t\t\t),\r\n\t\t[regions]\r\n\t);\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\tdata={trimedRegions}\r\n\t\t\tgetLabel={renderRegionLabel}\r\n\t\t\t{...otherProps}\r\n\t\t/>\r\n\t);\r\n};\r\n\r\nconst renderRegionLabel = (region: Region | null) => (region ? region.regName : \"\");\r\n","import { NavigationItem } from \"../../../core/navigation/types\";\r\nimport RegionsPage from \"./RegionsPage\";\r\nimport TopRegionsPage from \"./TopRegionsPage\";\r\nimport { EditRegionPage } from \"./EditRegionPage\";\r\nimport { regionsLocation, topRegionsLocation, editRouter } from \"./Locations\";\r\nexport const regionsComponents: NavigationItem[] = [\r\n\t{\r\n\t\tComponent: RegionsPage,\r\n\t\tisMenuItem: true,\r\n\t\tpath: regionsLocation,\r\n\t},\r\n\t{\r\n\t\tComponent: TopRegionsPage,\r\n\t\tisMenuItem: true,\r\n\t\tpath: topRegionsLocation,\r\n\t},\r\n\t{\r\n\t\tComponent: EditRegionPage,\r\n\t\tisMenuItem: false,\r\n\t\tpath: editRouter,\r\n\t},\r\n];\r\n","import React from \"react\";\r\nimport { useEditRegionState } from \"../../../data/listing/regions/hooks/useEditRegionState\";\r\nimport { useRegionValidator } from \"../../../data/listing/regions/hooks/useRegionValidator\";\r\nimport { useRegionUpsert } from \"../../../data/listing/regions/hooks/useRegionUpsert\";\r\nimport { RouteComponentProps, useHistory } from \"react-router-dom\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Card, Grid, CardHeader, Divider, CardContent } from \"@material-ui/core\";\r\nimport { FabSave } from \"../../components/common/FabSave\";\r\nimport { Region } from \"../../../data/listing/regions/types\";\r\nimport { StringInput } from \"../../components/common/StringInput\";\r\nimport { LeavePrompt } from \"../../components/common/LeavePrompt\";\r\nimport { Status, RegType } from \"../../../data/models\";\r\nimport { BoolInput } from \"../../components/common/BoolInput\";\r\nimport { getRegionsLocation } from \"./Locations\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { StoreType } from \"../../../core/store/reducers\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { CountriesSelect } from \"../../components/common/CountriesSelect\";\r\nimport { RegionSelect } from \"../../components/listing/RegionSelect\";\r\n\r\nexport interface EditRegionInfo {\r\n\tregId?: string;\r\n}\r\n\r\nexport interface EditRegionProps extends RouteComponentProps {}\r\n\r\nexport const EditRegionPage: React.FunctionComponent = props => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst pageStyles = usePageStyles();\r\n\tconst regtype = useSelector(s => s.data.listing.regions.regType);\r\n\r\n\tconst [region, editRegion, changed] = useEditRegionState(regtype, props.match.params.regId);\r\n\r\n\tconst [validationState, validate] = useRegionValidator();\r\n\tconst [fetchState, upsert] = useRegionUpsert(regtype);\r\n\tconst history = useHistory();\r\n\r\n\tconst unsavedChanges = fetchState.type === \"not-started\" && changed;\r\n\r\n\tconst handleChange = React.useCallback(\r\n\t\t(event: React.ChangeEvent) => {\r\n\t\t\teditRegion(event.target.name as any, event.target.value);\r\n\t\t},\r\n\t\t[editRegion]\r\n\t);\r\n\r\n\tconst backLocation = getRegionsLocation(regtype);\r\n\r\n\tconst save = React.useCallback(() => {\r\n\t\tif (fetchState.type === \"successful\") {\r\n\t\t\thistory.push(backLocation);\r\n\t\t} else if (fetchState.type !== \"started\") {\r\n\t\t\tconst normalized = validate(region);\r\n\t\t\tif (normalized) {\r\n\t\t\t\tupsert(normalized);\r\n\t\t\t}\r\n\t\t}\r\n\t}, [region, validate, fetchState, history, upsert, backLocation]);\r\n\r\n\r\n\tif (!region || !regtype) {\r\n\t\treturn null;\r\n\t}\r\n\tconst editDisplayName = regtype === RegType.TopRegion ? \"regEdit\" : \"regEditDistrict\";\r\n\tconst createDisplayName = regtype === RegType.TopRegion ? \"regCreate\" : \"regCreateDistrict\";\r\n\tconst pageTitle = region.regId ? editDisplayName : createDisplayName;\r\n\r\n\treturn (\r\n\t\t\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\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\tproperty=\"regName\"\r\n\t\t\t\t\t\t\t\t\titem={region}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"regName\")}\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\t\r\n\t\t\t\t\t\t\t{regtype === RegType.Region && (\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t reg.regId === region.parentRegId}\r\n\t\t\t\t\t\t\t\t\t\tonChangeItem={reg => editRegion(\"parentRegId\", reg?.regId || \"\")}\r\n\t\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\t\t\tvalidationState.parentRegId !== undefined &&\r\n\t\t\t\t\t\t\t\t\t\t\t!validationState.parentRegId\r\n\t\t\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\r\n\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t{regtype === RegType.SubRegion && (\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t reg.regId === region.parentRegId}\r\n\t\t\t\t\t\t\t\t\t\tonChangeItem={reg => editRegion(\"parentRegId\", reg?.regId || \"\")}\r\n\t\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\t\t\tvalidationState.parentRegId !== undefined &&\r\n\t\t\t\t\t\t\t\t\t\t\t!validationState.parentRegId\r\n\t\t\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\r\n\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t{regtype === RegType.TopRegion && (\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t country.cntId?.trim() === region.country?.trim()}\r\n\t\t\t\t\t\t\t\t\t\tonChangeItem={country => editRegion(\"country\", country?.cntId || \"\")}\r\n\t\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\t\t\tvalidationState.country !== undefined && !validationState.country\r\n\t\t\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\r\n\t\t\t\t\t\t\t)}\r\n\t\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\tproperty=\"status\"\r\n\t\t\t\t\t\t\t\t\titem={region}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tfalsyValue={Status.Inactive}\r\n\t\t\t\t\t\t\t\t\tthrutyValue={Status.Active}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"cliStatus\")}\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\r\n\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\t);\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { Role } from \"../types\";\r\n\r\nexport const getAllRolesApi = (userId: string) =>\r\n\twebApi({\r\n\t\tmethod: \"GET\",\r\n\t\turl: \"listing/getrolelist\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t},\r\n\t});\r\n\r\nexport default getAllRolesApi;\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getAllRolesAPI from \"../api/getAllRoles\";\r\nimport { setData } from \"../rolesDataReducer\";\r\n\r\nexport const loadAllRoles = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setData());\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst roles = await dispatch(getAllRolesAPI(userId));\r\n\r\n\tdispatch(setData(roles || []));\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadAllRoles } from \"../thunks/loadAllRoles\";\r\nimport { Role } from \"../types\";\r\n\r\nexport const useRoleData = () => {\r\n\tconst data = useSelector(s => s.data.listing.roles.displayData);\r\n\tconst allData = useSelector(s => s.data.listing.roles.all);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchLoadAllRoles = React.useCallback(() => dispatch(loadAllRoles()), [dispatch]);\r\n\r\n\treturn [data, dispatchLoadAllRoles, allData] as [\r\n\t\ttypeof data,\r\n\t\ttypeof dispatchLoadAllRoles,\r\n\t\ttypeof allData\r\n\t];\r\n};\r\n\r\nexport const useRole = (id?: string) => {\r\n\tconst allData = useSelector(s => s.data.listing.roles.all);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchLoadAllRoles = React.useCallback(() => dispatch(loadAllRoles()), [dispatch]);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (!allData && id) {\r\n\t\t\tdispatchLoadAllRoles();\r\n\t\t}\r\n\t}, [allData, id, dispatchLoadAllRoles]);\r\n\r\n\tconst role = React.useMemo(() => {\r\n\t\tif (!allData) {\r\n\t\t\treturn undefined;\r\n\t\t} else {\r\n\t\t\treturn allData?.find(e => e.roleId === id);\r\n\t\t}\r\n\t}, [id, allData]);\r\n\r\n\treturn [role] as [typeof role];\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { Role } from \"../types\";\r\n\r\nexport const getRoleApi = (userId: string, roleid: string) =>\r\n\twebApi({\r\n\t\tmethod: \"GET\",\r\n\t\turl: \"listing/getrole\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t\troleid\r\n\t\t},\r\n\t});\r\n\r\nexport default getRoleApi;\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getRoleApi from \"../api/getRole\";\r\nimport { setDisplayed } from \"../rolesDataReducer\";\r\nimport { Role } from \"../types\";\r\n\r\nexport const loadRole = (roleId: string): ThunkType => async (dispatch, getStore) => {\r\n\tdispatch(setDisplayed());\r\n\r\n\tconst role = await dispatch(getRole(roleId));\r\n\r\n\tdispatch(setDisplayed(role));\r\n};\r\n\r\nexport const getRole = (roleId: string): ThunkType> => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\treturn await dispatch(getRoleApi(userId, roleId));\r\n}\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { Role } from \"../types\";\r\nimport { loadRole } from \"../thunks/loadRole\";\r\n\r\nexport const useDisplayRole = (roleId?: string) => {\r\n\tconst storeRole = useSelector(\r\n\t\tstore => store.data.listing.roles.displayedRole\r\n );\r\n\r\n const displayedRole = storeRole && storeRole.roleId === roleId ? storeRole : undefined;\r\n\r\n const displatch = useDispatch();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (roleId) {\r\n\t\t\tdisplatch(loadRole(roleId));\r\n\t\t}\r\n }, [displatch, roleId]);\r\n\r\n\treturn displayedRole;\r\n};\r\n","import React from \"react\";\r\nimport { Role } from \"../../../data/listing/roles/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { useDisplaySingleEmementStyles } from \"../../useDisplaySingleEmementStyles\";\r\nimport { DisplayBoolNumber } from \"../../components/common/DisplayBoolNumber\";\r\n\r\nexport interface DisplayEmployeeMainAttributesProps {\r\n\trole: Role;\r\n}\r\n\r\nexport const DisplayEmployeeMainAttributes: React.FunctionComponent = ({\r\n\trole,\r\n}) => {\r\n\tconst style = useDisplaySingleEmementStyles();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\treturn (\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"roleCode\")}\r\n\t\t\t\t{role.roleCode}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"roleName\")}\r\n\t\t\t\t{role.roleName}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"roleNameEn\")}\r\n\t\t\t\t{role.roleNameEn}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"roleIsEmployee\")}\r\n\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};\r\n","import React from \"react\";\r\nimport { useDisplayRole } from \"../../../data/listing/roles/hooks/useDisplayRole\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { Role } from \"../../../data/listing/roles/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { DisplayEmployeeMainAttributes } from \"./DisplayRoleMainAttributes\";\r\nimport { ExpansionPanel, ExpansionPanelSummary, Typography, Grid } from \"@material-ui/core\";\r\n\r\nexport interface DisplayEmployeeProps {\r\n\tid?: string;\r\n}\r\n\r\nexport const DisplayEmployee: React.FunctionComponent = ({ id }) => {\r\n\tconst role = useDisplayRole(id);\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\treturn !role ? (\r\n\t\t<>{\"loading placeholder\"}\r\n\t) : (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t{getString(\"tableBasciInfo\")}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport const useViewRole = () => {\r\n\tconst showWithDrawer = React.useContext(DisplayDrawerContext);\r\n\treturn React.useCallback(\r\n\t\t(role: Role) => showWithDrawer(),\r\n\t\t[showWithDrawer]\r\n\t);\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const deleteRoleApi = (userId: string, roleid: string) =>\r\n\twebApi({\r\n\t\tmethod: \"DELETE\",\r\n\t\turl: \"listing/delrole\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t\troleid\r\n\t\t},\r\n\t});\r\n\r\nexport default deleteRoleApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { deleteRole } from \"../thunks/deleteRole\";\r\nimport { setFetchState } from \"../rolesDataReducer\";\r\n\r\nexport const useRoleDelete = () => {\r\n\tconst fetchState = useSelector(\r\n\t\tstore => store.data.listing.roles.fetchState\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchDeleteRole = React.useCallback(\r\n\t\t(id: string) => dispatch(deleteRole(id)),\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tdispatch(setFetchState({ type: \"not-started\" }))\r\n\t}, [dispatch])\r\n\r\n\treturn [fetchState, dispatchDeleteRole] as [typeof fetchState, typeof dispatchDeleteRole]\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport deleteRoleApi from \"../api/deleteRole\";\r\nimport { setFetchState } from \"../rolesDataReducer\";\r\n\r\nexport const deleteRole = (roleId: string): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setFetchState({ type: \"started\" }));\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst result = await dispatch(deleteRoleApi(userId, roleId));\r\n\r\n\tdispatch(setFetchState(result !== undefined ? { type: \"successful\" } : { type: \"error\"}));\r\n};\r\n","import { getEditLocation } from \"../../../core/util/functions\";\r\n\r\nexport const rolesLocation = \"/listing/roles\";\r\nexport const getRoleEditLocation = (id?: string) => getEditLocation(rolesLocation, undefined, id);\r\n\r\nexport const editRouter = getRoleEditLocation(\":roleId?\");\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport ViewIcon from \"@material-ui/icons/InputOutlined\";\r\nimport EditIcon from \"@material-ui/icons/EditOutlined\";\r\nimport { Role } from \"../../../data/listing/roles/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Action } from \"material-table\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { useViewRole } from \"./DisplayRole\";\r\nimport { useRoleDelete } from \"../../../data/listing/roles/hooks/useRoleDelete\";\r\nimport { getRoleEditLocation } from \"./Locations\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\n\r\nexport const useRoleActions = (userAccessRights: AccessRights) => {\r\n\tconst { getString } = useContext(LocalizationContext);\r\n\tconst onShowRole = useViewRole();\r\n\tconst onEditRole = useEditRoleAction();\r\n\r\n\treturn useMemo(() => {\r\n\t\tconst result: Action[] = [\r\n\t\t\t{\r\n\t\t\t\ticon: () => ,\r\n\t\t\t\ttooltip: getString(\"tableShow\"),\r\n\t\t\t\tonClick: (event, rowData) => onShowRole(rowData as Role),\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ticon: () => ,\r\n\t\t\t\ttooltip: getString(\"tableEdit\"),\r\n\t\t\t\tonClick: (event, rowData) => onEditRole(rowData as Role),\r\n\t\t\t\thidden: userAccessRights===AccessRights.ReadOnly\r\n\t\t\t},\r\n\t\t];\r\n\r\n\t\treturn result;\r\n\t}, [onShowRole, onEditRole, getString]);\r\n};\r\n\r\nexport const useDeleteRoleAction = () => {\r\n\tconst [, deleteEmployee] = useRoleDelete();\r\n\treturn React.useCallback(\r\n\t\tasync (role: Role) => {\r\n\t\t\tif (role.roleId) {\r\n\t\t\t\tawait deleteEmployee(role.roleId);\r\n\t\t\t}\r\n\t\t},\r\n\t\t[deleteEmployee]\r\n\t);\r\n};\r\n\r\nexport const useEditRoleAction = () => {\r\n\tconst history = useHistory();\r\n\treturn React.useCallback(\r\n\t\t(role: Role) => history.push(getRoleEditLocation(role.roleId)),\r\n\t\t[history]\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport { Table, TableDataProps } from \"../../components/common/Table\";\r\nimport { useRoleData } from \"../../../data/listing/roles/hooks/useRoleData\";\r\nimport { Role } from \"../../../data/listing/roles/types\";\r\nimport { useRoleColumns } from \"./useRoleColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\nimport { useRoleActions, useDeleteRoleAction } from \"./useRoleActions\";\r\n\r\nexport interface CompaniesTableProps {\r\n\tuserAccessRights: AccessRights;\r\n}\r\n\r\ntype RolesTablePropsType = CompaniesTableProps & TableDataProps;\r\n\r\nexport const RolesTable: React.FunctionComponent = ({\r\n\tuserAccessRights,\r\n\t...tableProps\r\n}) => {\r\n\tconst [data, loadAll] = useRoleData();\r\n\r\n\tconst columns = useRoleColumns();\r\n\tconst actions = useRoleActions(userAccessRights);\r\n\tconst onDeleteEmployee = useDeleteRoleAction();\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t{...tableProps}\r\n\t\t\tgetData={loadAll}\r\n\t\t\timmutableData={data}\r\n\t\t\ttitle=\"\"\r\n\t\t\tcolumns={columns}\r\n\t\t\tactions={actions}\r\n\t\t\toptions={{\r\n\t\t\t\ttoolbar: false,\r\n\t\t\t\tpageSize: 10,\r\n\t\t\t\tactionsColumnIndex: -1,\r\n\t\t\t}}\r\n\t\t\teditable={userAccessRights !== AccessRights.ReadOnly ? {\r\n\t\t\t\tonRowDelete: onDeleteEmployee,\r\n\t\t\t }: {}}\r\n\t\t/>\r\n\t);\r\n};\r\n\r\nexport default RolesTable;\r\n","import { useContext, useMemo } from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\nimport { Role } from \"../../../data/listing/roles/types\";\r\nimport React from \"react\";\r\nimport { DisplayBoolNumber } from \"../../components/common/DisplayBoolNumber\";\r\n\r\nexport function useRoleColumns() {\r\n\tconst { getString } = useContext(LocalizationContext);\r\n\treturn useMemo(\r\n\t\t() => [\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"roleCode\"),\r\n\t\t\t\tfield: \"roleCode\"\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"roleNameColumn\"),\r\n\t\t\t\tfield: \"roleName\"\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"roleIsEmployee\"),\r\n\t\t\t\trender: role => ,\r\n\t\t\t\tcustomSort: (a, b) => a.isEmployee - b.isEmployee,\r\n\t\t\t\twidth: \"80px\",\r\n\t\t\t},\r\n\t\t],\r\n\t\t[getString]\r\n\t) as Column[];\r\n}\r\n","import React from \"react\";\r\nimport { Grid, CardContent, CardHeader, Divider, Card, Fab } from \"@material-ui/core\";\r\nimport RolesTable from \"./RolesTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { SearchBox } from \"../../components/common/SearchBox\";\r\nimport { PageComponent, AccessRights } from \"../../../core/navigation/types\";\r\nimport AddIcon from \"@material-ui/icons/Add\";\r\nimport { useRoleSearch } from \"../../../data/listing/roles/hooks/useRoleSearch\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { getRoleEditLocation } from \"./Locations\";\r\n\r\nconst RolesPage: PageComponent = ({ userAccessRights }) => {\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst [search, setSearch] = useRoleSearch();\r\n\tconst history = useHistory();\r\n\r\n\treturn (\r\n\t\t\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\taction={}\r\n\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\t{userAccessRights === AccessRights.All && (\r\n\t\t\t\t\t history.push(getRoleEditLocation())}\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};\r\n\r\nexport default RolesPage;\r\n","import React from \"react\";\r\nimport { useDisplayRole } from \"./useDisplayRole\";\r\nimport { Role } from \"../types\";\r\nimport { useCopiedState } from \"../../../../core/util/hooks\";\r\n\r\nexport const defauiltRole: Role = {\r\n\troleCode: \"\",\r\n\troleName: \"\",\r\n\troleNameEn: \"\",\r\n\tisEmployee: 0,\r\n};\r\n\r\nexport const useEditRole = (roleId?: string) => {\r\n\tconst displayRole = useDisplayRole(roleId);\r\n\r\n\treturn React.useMemo(() => {\r\n\t\tif (roleId !== undefined && displayRole === undefined) {\r\n\t\t\treturn undefined;\r\n }\r\n\r\n\t\tif (roleId === undefined) {\r\n\t\t\treturn { ...defauiltRole };\r\n }\r\n\r\n\t\treturn displayRole ? { ...displayRole } : undefined;\r\n\t}, [roleId, displayRole]);\r\n};\r\n\r\nexport const useEditRoleState = (empId?: string) => {\r\n\tconst role = useEditRole(empId);\r\n\treturn useCopiedState(role)\r\n};\r\n","import { Role, RoleValidationState } from \"../types\";\r\nimport { createUseValidator } from \"../../../../core/util/hooks\";\r\n\r\nexport const roleValidationState: RoleValidationState = {\r\n\troleCode: true,\r\n\troleName: true,\r\n\troleNameEn: true,\r\n};\r\n\r\nexport const useRoleValidator = createUseValidator(roleValidationState);\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { Role } from \"../types\";\r\n\r\nexport const createRoleApi = (userId: string, role: Role) =>\r\n\twebApiWithResponse({\r\n\t\tmethod: \"PUT\",\r\n\t\turl: \"listing/newrole\",\r\n\t\tparams: {\r\n\t\t\tuserId\r\n\t\t},\r\n\t\tdata: role\r\n\t});\r\n\r\nexport default createRoleApi;\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { Role } from \"../types\";\r\n\r\nexport const updateRoleApi = (userId: string, role: Role) =>\r\n\twebApiWithResponse({\r\n\t\tmethod: \"PUT\",\r\n\t\turl: \"listing/updrole\",\r\n\t\tparams: {\r\n\t\t\tuserId\r\n\t\t},\r\n\t\tdata: role\r\n\t});\r\n\r\nexport default updateRoleApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { upsertRole } from \"../thunks/upsertRole\";\r\nimport { setFetchState } from \"../rolesDataReducer\";\r\nimport { Role } from \"../types\";\r\n\r\nexport const useRoleUpsert = () => {\r\n\tconst fetchState = useSelector(\r\n\t\tstore => store.data.listing.roles.fetchState\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchUpsertRole = React.useCallback(\r\n\t\t(product: Role) => dispatch(upsertRole(product)),\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tdispatch(setFetchState({ type: \"not-started\" }))\r\n\t}, [dispatch])\r\n\r\n\treturn [fetchState, dispatchUpsertRole] as [typeof fetchState, typeof dispatchUpsertRole]\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport createRoleApi from \"../api/createRole\";\r\nimport updateRoleApi from \"../api/updateRole\";\r\nimport { setFetchState } from \"../rolesDataReducer\";\r\nimport { Role } from \"../types\";\r\n\r\nexport const upsertRole = (role: Role): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setFetchState({ type: \"started\" }));\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst result = role.roleId\r\n\t\t? await dispatch(updateRoleApi(userId, role))\r\n\t\t: await dispatch(createRoleApi(userId, role));\r\n\r\n\tif (result && result.resCode === \"OK\") {\r\n\t\tdispatch(setFetchState({ type: \"successful\", result: result.resDesc }));\r\n\t\treturn result.resDesc;\r\n\t} else {\r\n\t\tdispatch(setFetchState({ type: \"error\", errorCode: result?.resCode }));\r\n\t}\r\n};\r\n","import { NavigationItem } from \"../../../core/navigation/types\";\r\nimport RolesPage from \"./RolesPage\";\r\nimport { EditRolePage } from \"./EditRolePage\";\r\nimport { rolesLocation, editRouter } from \"./Locations\";\r\nexport const rolesComponents: NavigationItem[] = [\r\n\t{\r\n\t\tComponent: RolesPage,\r\n\t\tisMenuItem: true,\r\n\t\tpath: rolesLocation,\r\n\t},\r\n\t{\r\n\t\tComponent: EditRolePage,\r\n\t\tisMenuItem: false,\r\n\t\tpath: editRouter,\r\n\t},\r\n];\r\n","import React from \"react\";\r\nimport { useEditRoleState } from \"../../../data/listing/roles/hooks/useEditRoleState\";\r\nimport { useRoleValidator } from \"../../../data/listing/roles/hooks/useRoleValidator\";\r\nimport { useRoleUpsert } from \"../../../data/listing/roles/hooks/useRoleUpsert\";\r\nimport { RouteComponentProps, useHistory } from \"react-router-dom\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Card, Grid, CardHeader, Divider, CardContent } from \"@material-ui/core\";\r\nimport { FabSave } from \"../../components/common/FabSave\";\r\nimport { Role } from \"../../../data/listing/roles/types\";\r\nimport { StringInput } from \"../../components/common/StringInput\";\r\nimport { LeavePrompt } from \"../../components/common/LeavePrompt\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { rolesLocation } from \"./Locations\";\r\nimport { BoolInput } from \"../../components/common/BoolInput\";\r\n\r\nexport interface EditRoleInfo {\r\n\troleId?: string;\r\n}\r\n\r\nexport interface EditRoleProps extends RouteComponentProps {}\r\n\r\nexport const EditRolePage: React.FunctionComponent = props => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst [role, editRole, changed] = useEditRoleState(props.match.params.roleId);\r\n\tconst [validationState, validate] = useRoleValidator();\r\n\tconst [fetchState, upsert] = useRoleUpsert();\r\n\tconst history = useHistory();\r\n\r\n\tconst unsavedChanges = fetchState.type === \"not-started\" && changed;\r\n\r\n\tconst handleChange = React.useCallback(\r\n\t\t(event: React.ChangeEvent) => {\r\n\t\t\teditRole(event.target.name as any, event.target.value);\r\n\t\t},\r\n\t\t[editRole]\r\n\t);\r\n\r\n\tconst save = React.useCallback(() => {\r\n\t\tif (fetchState.type === \"successful\") {\r\n\t\t\thistory.push(rolesLocation);\r\n\t\t} else if (fetchState.type !== \"started\") {\r\n\t\t\tconst normalized = validate(role);\r\n\t\t\tif (normalized) {\r\n\t\t\t\tupsert(normalized);\r\n\t\t\t}\r\n\t\t}\r\n\t}, [role, validate, fetchState, history, upsert]);\r\n\r\n\tconst pageTitle = role && role.roleId ? \"roleEdit\" : \"roleCreate\";\r\n\r\n\tif (!role) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\treturn (\r\n\t\t\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\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\tproperty=\"roleCode\"\r\n\t\t\t\t\t\t\t\t\titem={role}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"roleCode\")}\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\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tproperty=\"roleName\"\r\n\t\t\t\t\t\t\t\t\titem={role}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"roleName\")}\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\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tproperty=\"roleNameEn\"\r\n\t\t\t\t\t\t\t\t\titem={role}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"roleNameEn\")}\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\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tproperty=\"isEmployee\"\r\n\t\t\t\t\t\t\t\t\titem={role}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tfalsyValue={0}\r\n\t\t\t\t\t\t\t\t\tthrutyValue={1}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"roleIsEmployee\")}\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\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};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { UserListData } from \"../types\";\r\n\r\nexport const getAllUsersApi = (userId: string) =>\r\n\twebApi({\r\n\t\tmethod: \"GET\",\r\n\t\turl: \"listing/getuserlist\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t},\r\n\t});\r\n\r\nexport default getAllUsersApi;\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getAllRolesAPI from \"../api/getAllUsers\";\r\nimport { setData } from \"../usersDataReducer\";\r\n\r\nexport const loadAllUsers = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setData());\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst users = await dispatch(getAllRolesAPI(userId));\r\n\r\n\tdispatch(setData(users || []));\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { UserData } from \"../types\";\r\n\r\nexport const getUserApi = (userId: string, usrid: string) =>\r\n\twebApi({\r\n\t\tmethod: \"GET\",\r\n\t\turl: \"listing/getuser\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t\tusrid\r\n\t\t},\r\n\t});\r\n\r\nexport default getUserApi;\r\n","import { ValidationState } from \"../../../core/util/types\";\r\n\r\nexport enum UserEmployee {\r\n\tTrue = 1,\r\n\tFalse = 0\r\n}\r\n\r\nexport enum UserActive {\r\n\tTrue = 1,\r\n\tFalse = 0\r\n}\r\n\r\nexport enum UserSubscribtionUnlimited {\r\n\tTrue = 1,\r\n\tFalse = 0\r\n}\r\n\r\nexport enum UserChangePass {\r\n\tTrue = 1,\r\n\tFalse = 0\r\n}\r\n\r\nexport interface UserData {\r\n\tuserId?: string; //\t\tPK (auto)\r\n\tuserName: string; //\t\time korisnika\r\n\tloginUser: string; //\t\time za logovanje\r\n\tloginPass?: string; //\t\tlozinka koju dodeljuje administrator\r\n\tchangePass: UserChangePass; //\t\tu ovom slucaju 1\r\n\troleId?: string; //\t\tID role korisnika\r\n\tisEmployee: UserEmployee; //\t\t1=korisnik je zaposleni, inace 0\r\n\tempId?: string; //\t\t\tID zaposlenog ako je prethodno polje 1, inace null\r\n\tclientId?: string; //\t\tID klijenta, ako nije zaposleni, inace null\r\n\tcliPrsId?: string; //\t\tID lica klijenta, ako nije zaposleni, inace null\r\n\t\t\t\t\t\t// lice mora da pripada klijentu iz prethodnog polja\r\n\t\t\t\t\t// ako klijent ima samo jedno lice, popuniti odmah\r\n\tsubscribed_Until?: Date; //\tpristup aplikaciji do datuma\r\n\tsubscrUnlimited: number; //\t\tpristup neogranicen\r\n\tisActive: number; //\tkorisnik aktivan (deaktivira se ako 3 puta pogresno unese lozinku)\r\n\tphone?: string;\r\n\temail?: string;\r\n}\r\n\r\nexport interface UserListData {\r\n userId: string; //\tPK\r\n\tuserName: string; //\time korisnika\r\n\tloginUser: string; //\time za logovanje\r\n\trole: string; //\t\trola (opis)\r\n\temp?: string; //\tzaposleni (ime), pojavljuje se alternativno zaposleni ili klijent + lice klijenta\r\n\tclient?: string; //\tklijent (ime)\r\n\tcliPrs?: string; //\tlice klijenta (ime)\r\n}\r\n\r\nexport type UserValidationState = ValidationState;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { UserData } from \"../types\";\r\nimport { loadRole } from \"../thunks/loadUser\";\r\n\r\nexport const useDisplayUser = (userId?: string) => {\r\n\tconst storeUser = useSelector(\r\n\t\tstore => store.data.listing.users.displayedUser\r\n );\r\n\r\n const displayedUser = storeUser && storeUser.userId === userId ? storeUser : undefined;\r\n\r\n const displatch = useDispatch();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (userId) {\r\n\t\t\tdisplatch(loadRole(userId));\r\n\t\t}\r\n }, [displatch, userId]);\r\n\r\n\treturn displayedUser;\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getUserApi from \"../api/getUser\";\r\nimport { setDisplayed } from \"../usersDataReducer\";\r\n\r\nexport const loadRole = (roleId: string): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setDisplayed());\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst user = await dispatch(getUserApi(userId, roleId));\r\n\r\n\tdispatch(setDisplayed(user));\r\n};\r\n","import React from \"react\";\r\nimport { Skeleton } from \"@material-ui/lab\";\r\n\r\nexport interface SkeletorLoaderProps {\r\n\titem?: T;\r\n\trender: (item: T) => React.ReactNode;\r\n\twidth?: string;\r\n}\r\n\r\nexport function SkeletonLoader({ item, render, width }: SkeletorLoaderProps) {\r\n\tconst finalWidth = width || \"100%\";\r\n\treturn <>{item ? render(item) : };\r\n}\r\n","import React from \"react\";\r\nimport {\r\n\tUserData,\r\n\tUserActive,\r\n\tUserEmployee,\r\n\tUserChangePass,\r\n\tUserSubscribtionUnlimited,\r\n} from \"../../../data/listing/users/types\";\r\nimport { useDisplaySingleEmementStyles } from \"../../useDisplaySingleEmementStyles\";\r\nimport { DisplayBoolNumber } from \"../../components/common/DisplayBoolNumber\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { useEmployee } from \"../../../data/listing/employees/hooks/useEmployeeData\";\r\nimport { useClient } from \"../../../data/listing/clients/hooks/useClient\";\r\nimport { useClientPerson } from \"../../../data/listing/clients/hooks/clientPerson/useClientPerson\";\r\nimport { useRole } from \"../../../data/listing/roles/hooks/useRole\";\r\nimport { SkeletonLoader } from \"../../components/common/SkeletonLoader\";\r\nimport { Role } from \"../../../data/listing/roles/types\";\r\nimport { Employee } from \"../../../data/listing/employees/types\";\r\nimport { Client, ClientPerson } from \"../../../data/listing/clients/types\";\r\n\r\nexport interface DisplayUserMainAttributesProps {\r\n\tuser: UserData;\r\n}\r\n\r\nexport const DisplayUserMainAttributes: React.FunctionComponent = ({\r\n\tuser,\r\n}) => {\r\n\tconst style = useDisplaySingleEmementStyles();\r\n\tconst { getString, getDateString } = React.useContext(LocalizationContext);\r\n\tconst [employee] = useEmployee(user.empId);\r\n\tconst [client] = useClient(user.clientId);\r\n\tconst [clientPerson] = useClientPerson(user.cliPrsId);\r\n\tconst [role] = useRole(user.roleId);\r\n\r\n\treturn (\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"userUserName\")}\r\n\t\t\t\t{user.userName}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"userLoginUser\")}\r\n\t\t\t\t{user.loginUser}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"userChangePass\")}\r\n\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\t
\r\n\t\t\t\t{getString(\"userRoleId\")}\r\n\t\t\t\t\r\n\t\t\t\t\t{user.roleId && (\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\titem={role}\r\n\t\t\t\t\t\t\trender={r => r.roleName || r.roleNameEn}\r\n\t\t\t\t\t\t\twidth={\"8rem\"}\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\t
\r\n\t\t\t\t{getString(\"userIsEmployee\")}\r\n\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\t
\r\n\t\t\t\t{getString(\"userEmpId\")}\r\n\t\t\t\t\r\n\t\t\t\t\t{user.empId && (\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\titem={employee}\r\n\t\t\t\t\t\t\trender={e => `${e.lastName} ${e.firstName}`}\r\n\t\t\t\t\t\t\twidth={\"8rem\"}\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\t
\r\n\t\t\t\t{getString(\"userClientId\")}\r\n\t\t\t\t\r\n\t\t\t\t\t{user.clientId && (\r\n\t\t\t\t\t\t item={client} render={e => e.cliName} width={\"8rem\"} />\r\n\t\t\t\t\t)}\r\n\t\t\t\t\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"userCliPrsId\")}\r\n\t\t\t\t\r\n\t\t\t\t\t{user.cliPrsId && (\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\titem={clientPerson}\r\n\t\t\t\t\t\t\trender={e => e.cliPrsName}\r\n\t\t\t\t\t\t\twidth={\"8rem\"}\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\t
\r\n\t\t\t\t{getString(\"userSubscribedUntil\")}\r\n\t\t\t\t\r\n\t\t\t\t\t{user.subscribed_Until && getDateString(user.subscribed_Until)}\r\n\t\t\t\t\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"userSubscrUnlimited\")}\r\n\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\t
\r\n\t\t\t\t{getString(\"cliPhone\")}\r\n\t\t\t\t{user.phone}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"cliEmail\")}\r\n\t\t\t\t{user.email}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"userIsActive\")}\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t
\r\n\r\n\t\t
\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport { useDispatch } from \"react-redux\";\r\nimport { Client } from \"../types\";\r\nimport { getClient } from \"../thunks/loadClient\";\r\n\r\nexport const useClient = (clientId?: string) => {\r\n\tconst displatch = useDispatch();\r\n\tconst [client, setClient] = React.useState();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tconst loadClient = async () => {\r\n\t\t\tif (clientId) {\r\n\t\t\t\tconst loadedClient = (await displatch(getClient(clientId))) as any;\r\n\t\t\t\tsetClient(loadedClient);\r\n\t\t\t}\r\n\t\t};\r\n\t\tloadClient();\r\n\t}, [displatch, clientId, setClient]);\r\n\r\n\treturn [client];\r\n};\r\n","import React from \"react\";\r\nimport { useDispatch } from \"react-redux\";\r\nimport { Role } from \"../types\";\r\nimport { getRole } from \"../thunks/loadRole\";\r\n\r\nexport const useRole = (roleId?: string) => {\r\n\tconst displatch = useDispatch();\r\n\tconst [role, setRole] = React.useState();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tconst loadRole = async () => {\r\n\t\t\tif (roleId) {\r\n const loadedRole = (await displatch(getRole(roleId))) as any;\r\n\t\t\t\tsetRole(loadedRole);\r\n\t\t\t}\r\n\t\t};\r\n\t\tloadRole();\r\n\t}, [displatch, roleId, setRole]);\r\n\r\n\treturn [role];\r\n};\r\n","import React from \"react\";\r\nimport { useDisplayUser } from \"../../../data/listing/users/hooks/useDisplayUser\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { UserListData } from \"../../../data/listing/users/types\";\r\nimport { DisplayUserMainAttributes } from \"./DisplayUserMainAttributes\";\r\nimport { ExpansionPanel, ExpansionPanelSummary, Typography, Grid } from \"@material-ui/core\";\r\nimport ExpandMoreIcon from \"@material-ui/icons/ExpandMore\";\r\n\r\nexport interface DisplayEmployeeProps {\r\n\tid?: string;\r\n}\r\n\r\nexport const DisplayClient: React.FunctionComponent = ({ id }) => {\r\n\tconst user = useDisplayUser(id);\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\treturn !user ? (\r\n\t\t<>{\"loading placeholder\"}\r\n\t) : (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t}>\r\n\t\t\t\t\t{getString(\"tableBasciInfo\")}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport const useViewUser = () => {\r\n\tconst showWithDrawer = React.useContext(DisplayDrawerContext);\r\n\treturn React.useCallback(\r\n\t\t(user: UserListData) => showWithDrawer(),\r\n\t\t[showWithDrawer]\r\n\t);\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const deleteUserApi = (userId: string, usrid: string) =>\r\n\twebApi({\r\n\t\tmethod: \"DELETE\",\r\n\t\turl: \"listing/deluser\",\r\n\t\tparams: {\r\n\t\t\tuserId,\r\n\t\t\tusrid\r\n\t\t},\r\n\t});\r\n\r\nexport default deleteUserApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { deleteUser } from \"../thunks/deleteUser\";\r\nimport { setFetchState } from \"../usersDataReducer\";\r\n\r\nexport const useRoleDelete = () => {\r\n\tconst fetchState = useSelector(\r\n\t\tstore => store.data.listing.users.fetchState\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchDeleteUser = React.useCallback(\r\n\t\t(id: string) => dispatch(deleteUser(id)),\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tdispatch(setFetchState({ type: \"not-started\" }))\r\n\t}, [dispatch])\r\n\r\n\treturn [fetchState, dispatchDeleteUser] as [typeof fetchState, typeof dispatchDeleteUser]\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport deleteUserApi from \"../api/deleteUser\";\r\nimport { setFetchState } from \"../usersDataReducer\";\r\n\r\nexport const deleteUser = (usrid: string): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setFetchState({ type: \"started\" }));\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst result = await dispatch(deleteUserApi(userId, usrid));\r\n\r\n\tdispatch(setFetchState(result !== undefined ? { type: \"successful\" } : { type: \"error\"}));\r\n};\r\n","import { getEditLocation } from \"../../../core/util/functions\";\r\n\r\nexport const usersLocation = \"/listing/users\";\r\nexport const getUserEditLocation = (id?: string) => getEditLocation(usersLocation, undefined, id);\r\n\r\nexport const editRouter = getUserEditLocation(\":userId?\");\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport ViewIcon from \"@material-ui/icons/InputOutlined\";\r\nimport EditIcon from \"@material-ui/icons/EditOutlined\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Action } from \"material-table\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { useViewUser } from \"./DisplayUser\";\r\nimport { useRoleDelete } from \"../../../data/listing/users/hooks/useUserDelete\";\r\nimport { UserListData } from \"../../../data/listing/users/types\";\r\nimport { getUserEditLocation } from \"./Locations\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\n\r\nexport const useUserActions = (userAccessRights: AccessRights) => {\r\n\tconst { getString } = useContext(LocalizationContext);\r\n\tconst onShowUser = useViewUser();\r\n\tconst onEditUser = useEditUserAction();\r\n\r\n\treturn useMemo(() => {\r\n\t\tconst result: Action[] = [\r\n\t\t\t{\r\n\t\t\t\ticon: () => ,\r\n\t\t\t\ttooltip: getString(\"tableShow\"),\r\n\t\t\t\tonClick: (event, rowData) => onShowUser(rowData as UserListData),\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ticon: () => ,\r\n\t\t\t\ttooltip: getString(\"tableEdit\"),\r\n\t\t\t\tonClick: (event, rowData) => onEditUser(rowData as UserListData),\r\n\t\t\t\thidden: userAccessRights===AccessRights.ReadOnly\r\n\t\t\t},\r\n\t\t];\r\n\r\n\t\treturn result;\r\n\t}, [onShowUser, onEditUser, getString]);\r\n};\r\n\r\nexport const useDeleteUserAction = () => {\r\n\tconst [, deleteUser] = useRoleDelete();\r\n\treturn React.useCallback(\r\n\t\tasync (user: UserListData) => {\r\n\t\t\tif (user.userId) {\r\n\t\t\t\tawait deleteUser(user.userId);\r\n\t\t\t}\r\n\t\t},\r\n\t\t[deleteUser]\r\n\t);\r\n};\r\n\r\nexport const useEditUserAction = () => {\r\n\tconst history = useHistory();\r\n\treturn React.useCallback(\r\n\t\t(user: UserListData) => history.push(getUserEditLocation(user.userId)),\r\n\t\t[history]\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport { Table, TableDataProps } from \"../../components/common/Table\";\r\nimport { useUsersData } from \"../../../data/listing/users/hooks/useUserData\";\r\nimport { useUserColumns } from \"./useUserColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\nimport { useUserActions, useDeleteUserAction } from \"./useUserActions\";\r\nimport { UserListData } from \"../../../data/listing/users/types\";\r\n\r\nexport interface UserTableProps {\r\n\tuserAccessRights: AccessRights;\r\n}\r\n\r\ntype UserTablePropsType = UserTableProps & TableDataProps;\r\n\r\nexport const UserTable: React.FunctionComponent = ({\r\n\tuserAccessRights,\r\n\t...tableProps\r\n}) => {\r\n\tconst [data, loadAll] = useUsersData();\r\n\r\n\tconst columns = useUserColumns();\r\n\tconst actions = useUserActions(userAccessRights);\r\n\tconst onDeleteClient = useDeleteUserAction();\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t{...tableProps}\r\n\t\t\tgetData={loadAll}\r\n\t\t\timmutableData={data}\r\n\t\t\ttitle=\"\"\r\n\t\t\tcolumns={columns}\r\n\t\t\tactions={actions}\r\n\t\t\toptions={{\r\n\t\t\t\ttoolbar: false,\r\n\t\t\t\tpageSize: 20,\r\n\t\t\t\tactionsColumnIndex: -1,\r\n\t\t\t}}\r\n\t\t\teditable={userAccessRights !== AccessRights.ReadOnly ? {\r\n\t\t\t\tonRowDelete: onDeleteClient,\r\n\t\t\t }: {}}\r\n\t\t/>\r\n\t);\r\n};\r\n\r\nexport default UserTable;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadAllUsers } from \"../thunks/loadAllUsers\";\r\nimport { UserListData } from \"../types\";\r\n\r\nexport const useUsersData = () => {\r\n\tconst data = useSelector(s => s.data.listing.users.displayData);\r\n\tconst allData = useSelector(s => s.data.listing.users.all);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchLoadAllUsers = React.useCallback(() => dispatch(loadAllUsers()), [dispatch]);\r\n\r\n\treturn [data, dispatchLoadAllUsers, allData] as [\r\n\t\ttypeof data,\r\n\t\ttypeof dispatchLoadAllUsers,\r\n\t\ttypeof allData\r\n\t];\r\n};\r\n\r\nexport const useUser = (id?: string) => {\r\n\tconst allData = useSelector(s => s.data.listing.users.all);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchLoadAllUsers = React.useCallback(() => dispatch(loadAllUsers()), [dispatch]);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (!allData && id) {\r\n\t\t\tdispatchLoadAllUsers();\r\n\t\t}\r\n\t}, [allData, id, dispatchLoadAllUsers]);\r\n\r\n\tconst role = React.useMemo(() => {\r\n\t\tif (!allData) {\r\n\t\t\treturn undefined;\r\n\t\t} else {\r\n\t\t\treturn allData?.find(e => e.userId === id);\r\n\t\t}\r\n\t}, [id, allData]);\r\n\r\n\treturn [role] as [typeof role];\r\n};\r\n","import { useContext, useMemo } from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\nimport { UserListData } from \"../../../data/listing/users/types\";\r\n\r\nexport function useUserColumns() {\r\n\tconst { getString } = useContext(LocalizationContext);\r\n\treturn useMemo(\r\n\t\t() => [\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"userUserName\"),\r\n\t\t\t\tfield: \"userName\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"userLoginUser\"),\r\n\t\t\t\tfield: \"loginUser\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"userRoleId\"),\r\n\t\t\t\tfield: \"role\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"userEmpId\"),\r\n\t\t\t\tfield: \"emp\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"userClientId\"),\r\n\t\t\t\tfield: \"client\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"userCliPrsId\"),\r\n\t\t\t\tfield: \"cliPrs\",\r\n\t\t\t},\r\n\t\t],\r\n\t\t[getString]\r\n\t) as Column[];\r\n}\r\n","import React from \"react\";\r\nimport { Grid, CardContent, CardHeader, Divider, Card, Fab } from \"@material-ui/core\";\r\nimport UserTable from \"./UserTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { SearchBox } from \"../../components/common/SearchBox\";\r\nimport { PageComponent, AccessRights } from \"../../../core/navigation/types\";\r\nimport AddIcon from \"@material-ui/icons/Add\";\r\nimport { useUserSearch } from \"../../../data/listing/users/hooks/useUserSearch\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { getUserEditLocation } from \"./Locations\";\r\n\r\nconst UserPage: PageComponent = ({ userAccessRights }) => {\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst [search, setSearch] = useUserSearch();\r\n\tconst history = useHistory();\r\n\r\n\treturn (\r\n\t\t\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\taction={}\r\n\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\t{userAccessRights === AccessRights.All && (\r\n\t\t\t\t\t history.push(getUserEditLocation())}>\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};\r\n\r\nexport default UserPage;\r\n","import { setSearchTerm } from \"../usersDataReducer\";\r\nimport { useSearch } from \"../../../../core/util/storeHooks\";\r\n\r\nexport const useUserSearch = () => useSearch(s => s.data.listing.users.searchTerm, setSearchTerm);\r\n","import React from \"react\";\r\nimport { useDisplayUser } from \"./useDisplayUser\";\r\nimport { UserData, UserActive, UserChangePass, UserSubscribtionUnlimited, UserEmployee } from \"../types\";\r\nimport { useCopiedState } from \"../../../../core/util/hooks\";\r\n\r\nexport const defauiltRole: UserData = {\r\n\tchangePass: UserChangePass.True,\r\n\tisActive: UserActive.True,\r\n\tisEmployee: UserEmployee.True,\r\n\tloginUser: \"\",\r\n\tuserName: \"\",\r\n\tsubscrUnlimited: UserSubscribtionUnlimited.True,\r\n}\r\n\r\nexport const useEditUser = (userId?: string) => {\r\n\tconst displayUser = useDisplayUser(userId);\r\n\r\n\treturn React.useMemo(() => {\r\n\t\tif (userId !== undefined && displayUser === undefined) {\r\n\t\t\treturn undefined;\r\n }\r\n\r\n\t\tif (userId === undefined) {\r\n\t\t\treturn { ...defauiltRole };\r\n }\r\n\r\n\t\treturn displayUser ? { ...displayUser } : undefined;\r\n\t}, [userId, displayUser]);\r\n};\r\n\r\nexport const useEditUserState = (userID?: string) => {\r\n\tconst user = useEditUser(userID);\r\n\treturn useCopiedState(user)\r\n};\r\n","import { UserData, UserValidationState, UserSubscribtionUnlimited, UserEmployee, UserChangePass } from \"../types\";\r\nimport { createUseValidator } from \"../../../../core/util/hooks\";\r\n\r\nexport const userValidationState: UserValidationState = {\r\n loginUser: true,\r\n loginPass: true,\r\n subscribed_Until: true,\r\n roleId: true,\r\n userName: true,\r\n cliPrsId: true,\r\n clientId: true,\r\n empId: true,\r\n};\r\n\r\nexport const useUserValidator = createUseValidator(userValidationState, (newState, validation) => ({\r\n ...validation,\r\n loginPass: validation.loginPass || newState.changePass === UserChangePass.False,\r\n subscribed_Until: validation.subscribed_Until || newState.subscrUnlimited === UserSubscribtionUnlimited.True,\r\n empId: validation.empId || newState.isEmployee === UserEmployee.False,\r\n clientId: validation.clientId || newState.isEmployee === UserEmployee.True,\r\n cliPrsId: validation.cliPrsId || newState.isEmployee === UserEmployee.True,\r\n}));\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { UserData } from \"../types\";\r\n\r\nexport const createUserApi = (userId: string, user: UserData) =>\r\n\twebApiWithResponse({\r\n\t\tmethod: \"PUT\",\r\n\t\turl: \"listing/newuser\",\r\n\t\tparams: {\r\n\t\t\tuserId\r\n\t\t},\r\n\t\tdata: user\r\n\t});\r\n\r\nexport default createUserApi;\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { UserData } from \"../types\";\r\n\r\nexport const updateUserApi = (userId: string, user: UserData) =>\r\n\twebApiWithResponse({\r\n\t\tmethod: \"PUT\",\r\n\t\turl: \"listing/upduser\",\r\n\t\tparams: {\r\n\t\t\tuserId\r\n\t\t},\r\n\t\tdata: user\r\n\t});\r\n\r\nexport default updateUserApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { upsertRole } from \"../thunks/upsertUser\";\r\nimport { setFetchState } from \"../usersDataReducer\";\r\nimport { UserData } from \"../types\";\r\n\r\nexport const useUserUpsert = () => {\r\n\tconst fetchState = useSelector(\r\n\t\tstore => store.data.listing.users.fetchState\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchUpsertRole = React.useCallback(\r\n\t\t(user: UserData) => dispatch(upsertRole(user)),\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tdispatch(setFetchState({ type: \"not-started\" }))\r\n\t}, [dispatch])\r\n\r\n\treturn [fetchState, dispatchUpsertRole] as [typeof fetchState, typeof dispatchUpsertRole]\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport createUserApi from \"../api/createUser\";\r\nimport updateUserApi from \"../api/updateUser\";\r\nimport { setFetchState } from \"../usersDataReducer\";\r\nimport { UserData } from \"../types\";\r\n\r\nexport const upsertRole = (user: UserData): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setFetchState({ type: \"started\" }));\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\r\n\tconsole.log(user)\r\n\tconst result = user.userId\r\n\t\t? await dispatch(updateUserApi(userId, user))\r\n\t\t: await dispatch(createUserApi(userId, user));\r\n\r\n\tif (result && result.resCode === \"OK\") {\r\n\t\tdispatch(setFetchState({ type: \"successful\", result: result.resDesc }));\r\n\t\treturn result.resDesc;\r\n\t} else {\r\n\t\tdispatch(setFetchState({ type: \"error\", errorCode: result?.resCode }));\r\n\t}\r\n};\r\n","import React from \"react\";\r\nimport { useClientData } from \"../../../data/listing/clients/hooks/useClientData\";\r\nimport { ClientListData } from \"../../../data/listing/clients/types\";\r\nimport { AutocompleteSelectType, AutocompleteSelect } from \"../common/AutocompleteSelect\";\r\n\r\nexport type ClientSelectPropsType = Omit<\r\n\tAutocompleteSelectType,\r\n\t\"data\" | \"getLabel\"\r\n>\r\n\r\nexport const ClientSelect: React.FunctionComponent = props => {\r\n\tconst [, loadAllClients, clients] = useClientData();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (!clients) {\r\n\t\t\tloadAllClients();\r\n\t\t}\r\n\t}, [clients, loadAllClients]);\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\tdata={clients?.filter(cli => cli.status!==0)}\r\n\t\t\tgetLabel={renderEmployeeLabel}\r\n\t\t\t{...props}\r\n\t\t/>\r\n\t);\r\n};\r\n\r\nconst renderEmployeeLabel = (client: ClientListData | null) =>\r\n\tclient ? `${client.cliName} ${renderTaxCode(client.taxCode)}` : \"\";\r\n\r\nconst renderTaxCode = (taxCode?: string) => (taxCode ? `(${taxCode})` : \"\");\r\n","import React from \"react\";\r\nimport { useClientPersons } from \"../../../data/listing/clients/hooks/clientPerson/useClientPersons\";\r\nimport { ClientPerson } from \"../../../data/listing/clients/types\";\r\nimport { AutocompleteSelectType, AutocompleteSelect } from \"../common/AutocompleteSelect\";\r\n\r\nexport interface ClientPersonSelectProps {\r\n\tclientId: string;\r\n}\r\n\r\nexport type ClientPersonSelectPropsType = Omit<\r\n\tAutocompleteSelectType,\r\n\t\"data\" | \"getLabel\" | \"selected\"\r\n> &\r\n\tClientPersonSelectProps;\r\n\r\nexport const ClientPersonSelect: React.FunctionComponent = ({\r\n\tonChangeItem,\r\n\tclientId,\r\n\tpredicate,\r\n\t...otherProps\r\n}) => {\r\n\tconst [persons] = useClientPersons(clientId);\r\n\r\n\tconst selected = React.useMemo(() => predicate && persons && persons.find(predicate), [predicate, persons]);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (!selected && persons && persons.length === 1) {\r\n\t\t\tonChangeItem(persons[0]);\r\n\t\t}\r\n\t}, [selected, persons, onChangeItem]);\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\tdata={persons}\r\n\t\t\tgetLabel={renderClientPersonLabel}\r\n\t\t\tonChangeItem={onChangeItem}\r\n\t\t\tselected={selected}\r\n\t\t\t{...otherProps}\r\n\t\t/>\r\n\t);\r\n};\r\n\r\nconst renderClientPersonLabel = (client: ClientPerson | null) =>\r\n\tclient ? `${client.cliPrsName} ${renderIdNumber(client.cliPrsIdNo)}` : \"\";\r\n\r\nconst renderIdNumber = (id?: string) => (id ? `(${id})` : \"\");\r\n","import React from \"react\";\r\nimport { useRoleData } from \"../../../data/listing/roles/hooks/useRoleData\";\r\nimport { Role } from \"../../../data/listing/roles/types\";\r\nimport { AutocompleteSelectType, AutocompleteSelect } from \"../common/AutocompleteSelect\";\r\n\r\nexport type RoleSelectPropsType = Omit<\r\n\tAutocompleteSelectType,\r\n\t\"data\" | \"getLabel\"\r\n>\r\n\r\nexport const RoleSelect: React.FunctionComponent = props => {\r\n\tconst [, loadAllRoles, roles] = useRoleData();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (!roles) {\r\n\t\t\tloadAllRoles()\r\n\t\t}\r\n\t}, [roles, loadAllRoles])\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\tdata={roles}\r\n\t\t\tgetLabel={renderEmployeeLabel}\r\n\t\t\t{...props}\r\n\t\t/>\r\n\t);\r\n};\r\n\r\nconst renderEmployeeLabel = (role: Role | null) => role ? role.roleName || role.roleNameEn : \"\"\r\n","import { NavigationItem } from \"../../../core/navigation/types\";\r\nimport UserPage from \"./UserPage\";\r\nimport { EditUserPage } from \"./EditUserPage\";\r\nimport { usersLocation, editRouter } from \"./Locations\";\r\nexport const userComponents: NavigationItem[] = [\r\n\t{\r\n\t\tComponent: UserPage,\r\n\t\tisMenuItem: true,\r\n\t\tpath: usersLocation,\r\n\t},\r\n\t{\r\n\t\tComponent: EditUserPage,\r\n\t\tisMenuItem: false,\r\n\t\tpath: editRouter,\r\n\t},\r\n];\r\n","import React from \"react\";\r\nimport { useEditUserState } from \"../../../data/listing/users/hooks/useEditUserState\";\r\nimport { useUserValidator } from \"../../../data/listing/users/hooks/useUserValidator\";\r\nimport { useUserUpsert } from \"../../../data/listing/users/hooks/useUserUpsert\";\r\nimport { RouteComponentProps, useHistory } from \"react-router-dom\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Card, Grid, CardHeader, Divider, CardContent } from \"@material-ui/core\";\r\nimport { FabSave } from \"../../components/common/FabSave\";\r\nimport { DateInput } from \"../../components/common/DateInput\";\r\nimport { StringInput } from \"../../components/common/StringInput\";\r\nimport {\r\n\tUserData,\r\n\tUserEmployee,\r\n\tUserChangePass,\r\n\tUserActive,\r\n\tUserSubscribtionUnlimited,\r\n} from \"../../../data/listing/users/types\";\r\nimport { EmployeeSelect } from \"../../components/listing/EmployeeSelect\";\r\nimport { ClientSelect } from \"../../components/listing/ClientSelect\";\r\nimport { ClientPersonSelect } from \"../../components/listing/ClientPersonSelect\";\r\nimport { RoleSelect } from \"../../components/listing/RoleSelect\";\r\nimport { BoolInput } from \"../../components/common/BoolInput\";\r\nimport { LeavePrompt } from \"../../components/common/LeavePrompt\";\r\nimport { usersLocation } from \"./Locations\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\n\r\nexport interface EditUserInfo {\r\n\tuserId?: string;\r\n}\r\n\r\nexport interface EditUserProps extends RouteComponentProps {}\r\n\r\nexport const EditUserPage: React.FunctionComponent = props => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst [user, editUser, changed] = useEditUserState(props.match.params.userId);\r\n\tconst [validationState, validate] = useUserValidator();\r\n\tconst [fetchState, upsert] = useUserUpsert();\r\n\tconst history = useHistory();\r\n\r\n\tconst unsavedChanges = fetchState.type === \"not-started\" && changed;\r\n\r\n\tconst handleChange = React.useCallback(\r\n\t\t(event: React.ChangeEvent) => {\r\n\t\t\teditUser(event.target.name as any, event.target.value);\r\n\t\t},\r\n\t\t[editUser]\r\n\t);\r\n\r\n\tconst handleSubscriptionFromFromChange = React.useCallback(\r\n\t\t(date: Date | null) => {\r\n\t\t\teditUser(\"subscribed_Until\", date);\r\n\t\t},\r\n\t\t[editUser]\r\n\t);\r\n\r\n\tconst handleSubscriptionUnlimitedChange = React.useCallback(\r\n\t\t(event: React.ChangeEvent) => {\r\n\t\t\tif (event.target.checked) {\r\n\t\t\t\teditUser(\"subscrUnlimited\", UserSubscribtionUnlimited.True);\r\n\t\t\t\teditUser(\"subscribed_Until\", undefined);\r\n\t\t\t} else {\r\n\t\t\t\teditUser(\"subscrUnlimited\", UserSubscribtionUnlimited.False);\r\n\t\t\t}\r\n\t\t},\r\n\t\t[editUser]\r\n\t);\r\n\r\n\tconst weakPasswordMessage = React.useMemo(\r\n\t\t() =>\r\n\t\t\tfetchState.type === \"error\" && fetchState.errorCode && fetchState.errorCode.startsWith(\"BADPASS\")\r\n\t\t\t\t? getString(\"messageWeakPassword\")\r\n\t\t\t\t: undefined,\r\n\t\t[fetchState, getString]\r\n\t);\r\n\r\n\tconst handleIsEmployeeChange = React.useCallback(\r\n\t\t(newValue: number) => {\r\n\t\t\tif (newValue === UserEmployee.True) {\r\n\t\t\t\teditUser(\"isEmployee\", UserEmployee.True);\r\n\t\t\t\teditUser(\"clientId\", undefined);\r\n\t\t\t\teditUser(\"cliPrsId\", undefined);\r\n\t\t\t} else {\r\n\t\t\t\teditUser(\"isEmployee\", UserEmployee.False);\r\n\t\t\t\teditUser(\"empId\", undefined);\r\n\t\t\t}\r\n\t\t},\r\n\t\t[editUser]\r\n\t);\r\n\r\n\tconst save = React.useCallback(() => {\r\n\t\tif (fetchState.type === \"successful\") {\r\n\t\t\thistory.push(usersLocation);\r\n\t\t} else if (fetchState.type !== \"started\") {\r\n\t\t\tconst normalized = validate(user);\r\n\t\t\tif (normalized) {\r\n\t\t\t\tupsert(normalized);\r\n\t\t\t}\r\n\t\t}\r\n\t}, [user, validate, fetchState, upsert, history]);\r\n\r\n\tconst pageTitle = user && user.userId ? \"userEditTitle\" : \"userCreateTitle\";\r\n\r\n\tif (!user) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\treturn (\r\n\t\t\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\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\r\n\t\t\t\t\t\t\t\t\t\tproperty=\"userName\"\r\n\t\t\t\t\t\t\t\t\t\titem={user}\r\n\t\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\t\tlabel={getString(\"userUserName\")}\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\tproperty=\"loginUser\"\r\n\t\t\t\t\t\t\t\t\t\titem={user}\r\n\t\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\t\tlabel={getString(\"userLoginUser\")}\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 role.roleId === user.roleId}\r\n\t\t\t\t\t\t\t\t\t\tonChangeItem={role => {\r\n\t\t\t\t\t\t\t\t\t\t\teditUser(\"roleId\", role ? role.roleId : undefined);\r\n\t\t\t\t\t\t\t\t\t\t\thandleIsEmployeeChange(role && role.isEmployee !== undefined ? role.isEmployee : 0);\r\n\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\trequired={validationState.roleId !== undefined}\r\n\t\t\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\t\t\tvalidationState.roleId !== undefined && !validationState.roleId\r\n\t\t\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\r\n\t\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\r\n\t\t\t\t\t\t\t\t\t\tproperty=\"changePass\"\r\n\t\t\t\t\t\t\t\t\t\titem={user}\r\n\t\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\t\tfalsyValue={UserChangePass.False}\r\n\t\t\t\t\t\t\t\t\t\tthrutyValue={UserChangePass.True}\r\n\t\t\t\t\t\t\t\t\t\tlabel={getString(\"userChangePass\")}\r\n\t\t\t\t\t\t\t\t\t\tdisabled={!user.userId}\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{(!user.userId || user.changePass === UserChangePass.True) && (\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\tproperty=\"loginPass\"\r\n\t\t\t\t\t\t\t\t\t\t\titem={user}\r\n\t\t\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\t\t\tlabel={getString(\"userLoginPass\")}\r\n\t\t\t\t\t\t\t\t\t\t\terrorMessage={weakPasswordMessage}\r\n\t\t\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)}\r\n\t\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\r\n\t\t\t\t\t\t\t\t\t\tproperty=\"isEmployee\"\r\n\t\t\t\t\t\t\t\t\t\titem={user}\r\n\t\t\t\t\t\t\t\t\t\tonChange={console.log}\r\n\t\t\t\t\t\t\t\t\t\tfalsyValue={UserEmployee.False}\r\n\t\t\t\t\t\t\t\t\t\tthrutyValue={UserEmployee.True}\r\n\t\t\t\t\t\t\t\t\t\tlabel={getString(\"userIsEmployee\")}\r\n\t\t\t\t\t\t\t\t\t\tdisabled\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{user.isEmployee === UserEmployee.True && (\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t empl.empId === user.empId}\r\n\t\t\t\t\t\t\t\t\t\t\tonChangeItem={empl =>\r\n\t\t\t\t\t\t\t\t\t\t\t\teditUser(\"empId\", empl ? empl.empId : undefined)\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\trequired={validationState.empId !== undefined}\r\n\t\t\t\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\t\t\t\tvalidationState.empId !== undefined && !validationState.empId\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\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)}\r\n\t\t\t\t\t\t\t\t{user.isEmployee === UserEmployee.False && (\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t client.cliId === user.clientId}\r\n\t\t\t\t\t\t\t\t\t\t\tonChangeItem={client =>\r\n\t\t\t\t\t\t\t\t\t\t\t\teditUser(\"clientId\", client ? client.cliId : undefined)\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\trequired={validationState.clientId !== undefined}\r\n\t\t\t\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\t\t\t\tvalidationState.clientId !== undefined &&\r\n\t\t\t\t\t\t\t\t\t\t\t\t!validationState.clientId\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\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)}\r\n\t\t\t\t\t\t\t\t{user.clientId && user.clientId !== null && (\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t person.cliPrsId === user.cliPrsId}\r\n\t\t\t\t\t\t\t\t\t\t\tonChangeItem={person =>\r\n\t\t\t\t\t\t\t\t\t\t\t\teditUser(\"cliPrsId\", person ? person.cliPrsId : undefined)\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\trequired={validationState.cliPrsId !== undefined}\r\n\t\t\t\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\t\t\t\tvalidationState.cliPrsId !== undefined &&\r\n\t\t\t\t\t\t\t\t\t\t\t\t!validationState.cliPrsId\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\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)}\r\n\t\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\r\n\t\t\t\t\t\t\t\t\t\tproperty=\"subscrUnlimited\"\r\n\t\t\t\t\t\t\t\t\t\titem={user}\r\n\t\t\t\t\t\t\t\t\t\tonChange={handleSubscriptionUnlimitedChange}\r\n\t\t\t\t\t\t\t\t\t\tfalsyValue={UserSubscribtionUnlimited.False}\r\n\t\t\t\t\t\t\t\t\t\tthrutyValue={UserSubscribtionUnlimited.True}\r\n\t\t\t\t\t\t\t\t\t\tlabel={getString(\"userSubscrUnlimited\")}\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\r\n\t\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\r\n\t\t\t\t\t\t\t\t\t\tproperty=\"isActive\"\r\n\t\t\t\t\t\t\t\t\t\titem={user}\r\n\t\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\t\tfalsyValue={UserActive.False}\r\n\t\t\t\t\t\t\t\t\t\tthrutyValue={UserActive.True}\r\n\t\t\t\t\t\t\t\t\t\tlabel={getString(\"userIsActive\")}\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\r\n\t\t\t\t\t\t\r\n\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\t);\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { Warehouse } from \"../types\";\r\n\r\nexport const getAllWhsApi = (userId: string) =>\r\n webApi({\r\n method: \"GET\",\r\n url: \"listing/getwhslist\",\r\n params: {\r\n userId,\r\n },\r\n });\r\n\r\nexport default getAllWhsApi;\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getAllWhsAPI from \"../api/getAllWhs\";\r\nimport { setData } from \"../warehousesDataReducer\";\r\n\r\nexport const loadAllWhs = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n dispatch(setData());\r\n\r\n const { userId } = store.data.auth.current.user;\r\n const whss = await dispatch(getAllWhsAPI(userId));\r\n\r\n dispatch(setData(whss || []));\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadAllWhs } from \"../thunks/loadAllWhs\";\r\nimport { Warehouse } from \"../types\";\r\n\r\nexport const useWhsData = () => {\r\n const data = useSelector(\r\n (s) => s.data.listing.warehouses.displayData\r\n );\r\n const allData = useSelector(\r\n (s) => s.data.listing.warehouses.all\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadAllWhs = React.useCallback(() => dispatch(loadAllWhs()), [\r\n dispatch,\r\n ]);\r\n\r\n return [data, dispatchLoadAllWhs, allData] as [\r\n typeof data,\r\n typeof dispatchLoadAllWhs,\r\n typeof allData\r\n ];\r\n};\r\n\r\nexport const useWhs = (id?: string) => {\r\n const allData = useSelector(\r\n (s) => s.data.listing.warehouses.all\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadAllWhs = React.useCallback(() => dispatch(loadAllWhs()), [\r\n dispatch,\r\n ]);\r\n\r\n React.useEffect(() => {\r\n if (!allData && id) {\r\n dispatchLoadAllWhs();\r\n }\r\n }, [allData, id, dispatchLoadAllWhs]);\r\n\r\n const whs = React.useMemo(() => {\r\n if (!allData) {\r\n return undefined;\r\n } else {\r\n return allData?.find((e) => e.whsId === id);\r\n }\r\n }, [id, allData]);\r\n\r\n return [whs] as [typeof whs];\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { Warehouse } from \"../types\";\r\n\r\nexport const getWhsApi = (userId: string, whsid: string) =>\r\n webApi({\r\n method: \"GET\",\r\n url: \"listing/getwhs\",\r\n params: {\r\n userId,\r\n whsid,\r\n },\r\n });\r\n\r\nexport default getWhsApi;\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getWhsApi from \"../api/getWhs\";\r\nimport { setDisplayed } from \"../warehousesDataReducer\";\r\nimport { Warehouse } from \"../types\";\r\n\r\nexport const loadWhs = (whsId: string): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n dispatch(setDisplayed());\r\n\r\n const whs = await dispatch(getWhs(whsId));\r\n\r\n dispatch(setDisplayed(whs));\r\n};\r\n\r\nexport const getWhs = (\r\n whsId: string\r\n): ThunkType> => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { userId } = store.data.auth.current.user;\r\n return await dispatch(getWhsApi(userId, whsId));\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { Warehouse } from \"../types\";\r\nimport { loadWhs } from \"../thunks/loadWhs\";\r\n\r\nexport const useDisplayWhs = (whsId?: string) => {\r\n const storeWhs = useSelector(\r\n (store) => store.data.listing.warehouses.displayedWarehouse\r\n );\r\n\r\n const displayedWhs =\r\n storeWhs && storeWhs.whsId === whsId ? storeWhs : undefined;\r\n\r\n const displatch = useDispatch();\r\n\r\n React.useEffect(() => {\r\n if (whsId) {\r\n displatch(loadWhs(whsId));\r\n }\r\n }, [displatch, whsId]);\r\n\r\n return displayedWhs;\r\n};\r\n","import React from \"react\";\r\nimport { Warehouse } from \"../../../data/listing/warehouses/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { useDisplaySingleEmementStyles } from \"../../useDisplaySingleEmementStyles\";\r\nimport { DisplayBoolNumber } from \"../../components/common/DisplayBoolNumber\";\r\nimport { Status } from \"../../../data/models\";\r\n\r\nexport interface DisplayWhsMainAttributesProps {\r\n whs: Warehouse;\r\n}\r\n\r\nexport const DisplayWhsMainAttributes: React.FunctionComponent = ({\r\n whs,\r\n}) => {\r\n const style = useDisplaySingleEmementStyles();\r\n const { getString, getFormatedNumberString } = React.useContext(LocalizationContext);\r\n\r\n return (\r\n
\r\n
\r\n {getString(\"whsCode\")}\r\n {whs.whsCode}\r\n
\r\n
\r\n {getString(\"whsName\")}\r\n {whs.whsName}\r\n
\r\n
\r\n {getString(\"cliCity\")}\r\n {whs.city}\r\n
\r\n
\r\n {getString(\"cliAddress\")}\r\n {whs.address}\r\n
\r\n
\r\n {getString(\"whsPort\")}\r\n {whs.portName}\r\n
\r\n
\r\n {getString(\"whsDistanceToPort\")}\r\n \r\n {getFormatedNumberString(whs.distanceToPort, true)}\r\n \r\n
\r\n
\r\n {getString(\"cliStatus\")}\r\n \r\n \r\n \r\n
\r\n
\r\n );\r\n};\r\n","import React from \"react\";\r\nimport { useDisplayWhs } from \"../../../data/listing/warehouses/hooks/useDisplayWhs\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { Warehouse } from \"../../../data/listing/warehouses/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { DisplayWhsMainAttributes } from \"./DisplayWhsMainAttributes\";\r\nimport {\r\n ExpansionPanel,\r\n ExpansionPanelSummary,\r\n Typography,\r\n Grid,\r\n} from \"@material-ui/core\";\r\n\r\nexport interface DisplayWhsProps {\r\n id?: string;\r\n}\r\n\r\nexport const DisplayWhs: React.FunctionComponent = ({\r\n id,\r\n}) => {\r\n const whs = useDisplayWhs(id);\r\n const { getString } = React.useContext(LocalizationContext);\r\n\r\n return !whs ? (\r\n <>{\"loading placeholder\"}\r\n ) : (\r\n \r\n \r\n \r\n {getString(\"tableBasciInfo\")}\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const useViewWhs = () => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n return React.useCallback(\r\n (whs: Warehouse) => showWithDrawer(),\r\n [showWithDrawer]\r\n );\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const deleteWhsApi = (userId: string, whsid: string) =>\r\n webApi({\r\n method: \"DELETE\",\r\n url: \"listing/delwhs\",\r\n params: {\r\n userId,\r\n whsid,\r\n },\r\n });\r\n\r\nexport default deleteWhsApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { deleteWhs } from \"../thunks/deleteWhs\";\r\nimport { setFetchState } from \"../warehousesDataReducer\";\r\n\r\nexport const useWhsDelete = () => {\r\n const fetchState = useSelector(\r\n (store) => store.data.listing.warehouses.fetchState\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchDeleteWhs = React.useCallback(\r\n (id: string) => dispatch(deleteWhs(id)),\r\n [dispatch]\r\n );\r\n\r\n React.useEffect(() => {\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n }, [dispatch]);\r\n\r\n return [fetchState, dispatchDeleteWhs] as [\r\n typeof fetchState,\r\n typeof dispatchDeleteWhs\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport deleteWhsApi from \"../api/deleteWhs\";\r\nimport { setFetchState } from \"../warehousesDataReducer\";\r\n\r\nexport const deleteWhs = (whsId: string): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n dispatch(setFetchState({ type: \"started\" }));\r\n\r\n const { userId } = store.data.auth.current.user;\r\n const result = await dispatch(deleteWhsApi(userId, whsId));\r\n\r\n dispatch(setFetchState(result !== undefined ? { type: \"successful\" } : { type: \"error\"}));\r\n};\r\n","import { getEditLocation } from \"../../../core/util/functions\";\r\n\r\nexport const whsLocation = \"/listing/codebook/warehouses\";\r\nexport const getWhsEditLocation = (id?: string) => getEditLocation(whsLocation, undefined, id);\r\n\r\nexport const editRouter = getWhsEditLocation(\":whsId?\");\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport ViewIcon from \"@material-ui/icons/InputOutlined\";\r\nimport EditIcon from \"@material-ui/icons/EditOutlined\";\r\nimport { Warehouse } from \"../../../data/listing/warehouses/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Action } from \"material-table\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { useViewWhs } from \"./DisplayWhs\";\r\nimport { useWhsDelete } from \"../../../data/listing/warehouses/hooks/useWhsDelete\";\r\nimport { getWhsEditLocation } from \"./Locations\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\n\r\nexport const useWhsActions = (userAccessRights: AccessRights) => {\r\n const { getString } = useContext(LocalizationContext);\r\n const onShowWhs = useViewWhs();\r\n const onEditWhs = useEditWhsAction();\r\n\r\n return useMemo(() => {\r\n const result: Action[] = [\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"tableShow\"),\r\n onClick: (event, rowData) => onShowWhs(rowData as Warehouse),\r\n },\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"tableEdit\"),\r\n onClick: (event, rowData) => onEditWhs(rowData as Warehouse),\r\n hidden: userAccessRights===AccessRights.ReadOnly\r\n },\r\n ];\r\n\r\n return result;\r\n }, [onShowWhs, onEditWhs, getString]);\r\n};\r\n\r\nexport const useDeleteWhsAction = () => {\r\n const [, deleteWhs] = useWhsDelete();\r\n return React.useCallback(\r\n async (whs: Warehouse) => {\r\n if (whs.whsId) {\r\n await deleteWhs(whs.whsId);\r\n }\r\n },\r\n [deleteWhs]\r\n );\r\n};\r\n\r\nexport const useEditWhsAction = () => {\r\n const history = useHistory();\r\n return React.useCallback(\r\n (whs: Warehouse) =>\r\n history.push(getWhsEditLocation(whs.whsId)),\r\n [history]\r\n );\r\n};\r\n","import React from \"react\";\r\nimport { Table, TableDataProps } from \"../../components/common/Table\";\r\nimport { useWhsData } from \"../../../data/listing/warehouses/hooks/useWhsData\";\r\nimport { Warehouse } from \"../../../data/listing/warehouses/types\";\r\nimport { useWhsColumns } from \"./useWhsColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\nimport { useWhsActions, useDeleteWhsAction } from \"./useWhsActions\";\r\n\r\nexport interface WhsTableProps {\r\n userAccessRights: AccessRights;\r\n}\r\n\r\ntype WhsTablePropsType = WhsTableProps & TableDataProps;\r\n\r\nexport const WhsTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n ...tableProps\r\n}) => {\r\n const [data, loadAll] = useWhsData();\r\n\r\n const columns = useWhsColumns();\r\n const actions = useWhsActions(userAccessRights);\r\n const onDeleteWhs = useDeleteWhsAction();\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={loadAll}\r\n immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n actions={actions}\r\n options={{\r\n toolbar: false,\r\n pageSize: 10,\r\n actionsColumnIndex: -1,\r\n }}\r\n editable={userAccessRights !== AccessRights.ReadOnly ?{\r\n onRowDelete: onDeleteWhs,\r\n } : {}}\r\n />\r\n );\r\n};\r\n\r\nexport default WhsTable;\r\n","import { useContext, useMemo } from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\nimport { Warehouse } from \"../../../data/listing/warehouses/types\";\r\n\r\nexport function useWhsColumns() {\r\n const { getString, getFormatedNumberString } = useContext(LocalizationContext);\r\n\r\n return useMemo(\r\n () => [\r\n {\r\n title: getString(\"whsCode\"),\r\n field: \"whsCode\",\r\n },\r\n {\r\n title: getString(\"whsName\"),\r\n field: \"whsName\",\r\n },\r\n {\r\n title: getString(\"cliCity\"),\r\n field: \"city\",\r\n },\r\n {\r\n title: getString(\"whsPort\"),\r\n field: \"portName\",\r\n },\r\n {\r\n title: getString(\"whsDistanceToPort\"),\r\n render: (whs) => getFormatedNumberString(whs.distanceToPort, true),\r\n sorting: false,\r\n\t\t\t\twidth: \"140px\",\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\tmaxWidth: \"140px\",\r\n\t\t\t\t\tminWidth: \"140px\",\r\n\t\t\t\t\twidth: \"140px\",\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\tmaxWidth: \"140px\",\r\n\t\t\t\t\tminWidth: \"140px\",\r\n\t\t\t\t\twidth: \"140px\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n },\r\n ],\r\n [getString]\r\n ) as Column[];\r\n}\r\n","import React from \"react\";\r\nimport { Grid, CardContent, CardHeader, Divider, Card, Fab } from \"@material-ui/core\";\r\nimport WhsTable from \"./WhsTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { SearchBox } from \"../../components/common/SearchBox\";\r\nimport { PageComponent, AccessRights } from \"../../../core/navigation/types\";\r\nimport AddIcon from \"@material-ui/icons/Add\";\r\nimport { useWhsSearch } from \"../../../data/listing/warehouses/hooks/useWhsSearch\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { getWhsEditLocation } from \"./Locations\";\r\n\r\nconst WhsPage: PageComponent = ({ userAccessRights }) => {\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst [search, setSearch] = useWhsSearch();\r\n\tconst history = useHistory();\r\n\r\n\treturn (\r\n\t\t\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\taction={}\r\n\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\t{userAccessRights === AccessRights.All && (\r\n\t\t\t\t\t history.push(getWhsEditLocation())}\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};\r\n\r\nexport default WhsPage;\r\n","import { setSearchTerm } from \"../warehousesDataReducer\";\r\nimport { useSearch } from \"../../../../core/util/storeHooks\";\r\n\r\nexport const useWhsSearch = () =>\r\n useSearch((s) => s.data.listing.warehouses.searchTerm, setSearchTerm);\r\n","import React from \"react\";\r\nimport { useDisplayWhs } from \"./useDisplayWhs\";\r\nimport { Warehouse } from \"../types\";\r\nimport { useCopiedState } from \"../../../../core/util/hooks\";\r\nimport { Status } from \"../../../models\";\r\n\r\nexport const defaultWhs: Warehouse = {\r\n whsCode: \"\",\r\n whsName: \"\",\r\n cityId: \"\",\r\n address: \"\",\r\n status: Status.Active,\r\n};\r\n\r\nexport const useEditWhs = (whsId?: string) => {\r\n const displayWhs = useDisplayWhs(whsId);\r\n\r\n return React.useMemo(() => {\r\n if (whsId !== undefined && displayWhs === undefined) {\r\n return undefined;\r\n }\r\n\r\n if (whsId === undefined) {\r\n return { ...defaultWhs };\r\n }\r\n\r\n return displayWhs ? { ...displayWhs } : undefined;\r\n }, [whsId, displayWhs]);\r\n};\r\n\r\nexport const useEditWhsState = (whsId?: string) => {\r\n const whs = useEditWhs(whsId);\r\n return useCopiedState(whs);\r\n};\r\n","import { Warehouse, WhsValidationState } from \"../types\";\r\nimport { createUseValidator } from \"../../../../core/util/hooks\";\r\nimport { countDecimals } from \"../../../../core/util/functions\";\r\n\r\nexport const whsValidationState: WhsValidationState = {\r\n whsCode: true,\r\n whsName: true,\r\n cityId: true,\r\n address: true, \r\n// distanceToPort: true,\r\n};\r\n\r\n/*export const useWhsValidator = createUseValidator< Warehouse, WhsValidationState>(\r\n whsValidationState,\r\n (item, validation) => ({\r\n ...validation,\r\n price: validation.distanceToPort && !!item.distanceToPort && countDecimals(item.distanceToPort) <= 2 ,\r\n })); */\r\n\r\n\r\n export const useWhsValidator = createUseValidator< Warehouse, WhsValidationState>(\r\n whsValidationState,\r\n (item, validation) => ({\r\n ...validation,\r\n }));\r\n ","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { Warehouse } from \"../types\";\r\n\r\nexport const createWhsApi = (userId: string, whs: Warehouse) =>\r\n webApiWithResponse({\r\n method: \"PUT\",\r\n url: \"listing/newwhs\",\r\n params: {\r\n userId,\r\n },\r\n data: whs,\r\n });\r\n\r\nexport default createWhsApi;\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { Warehouse } from \"../types\";\r\n\r\nexport const updateWhsApi = (userId: string, whs: Warehouse) =>\r\n webApiWithResponse({\r\n method: \"PUT\",\r\n url: \"listing/updwhs\",\r\n params: {\r\n userId,\r\n },\r\n data: whs,\r\n });\r\n\r\nexport default updateWhsApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { upsertWhs } from \"../thunks/upsertWhs\";\r\nimport { setFetchState } from \"../warehousesDataReducer\";\r\nimport { Warehouse } from \"../types\";\r\n\r\nexport const useWhsUpsert = () => {\r\n const fetchState = useSelector(\r\n (store) => store.data.listing.warehouses.fetchState\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchUpsertWhs = React.useCallback(\r\n (whs: Warehouse) => dispatch(upsertWhs(whs)),\r\n [dispatch]\r\n );\r\n\r\n React.useEffect(() => {\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n }, [dispatch]);\r\n\r\n return [fetchState, dispatchUpsertWhs] as [\r\n typeof fetchState,\r\n typeof dispatchUpsertWhs\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport createWhsApi from \"../api/createWhs\";\r\nimport updateWhsApi from \"../api/updateWhs\";\r\nimport { setFetchState } from \"../warehousesDataReducer\";\r\nimport { Warehouse } from \"../types\";\r\n\r\nexport const upsertWhs = (whs: Warehouse): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setFetchState({ type: \"started\" }));\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst result = whs.whsId\r\n\t\t? await dispatch(updateWhsApi(userId, whs))\r\n\t\t: await dispatch(createWhsApi(userId, whs));\r\n\r\n\tif (result && result.resCode === \"OK\") {\r\n\t\tdispatch(setFetchState({ type: \"successful\", result: result.resDesc }));\r\n\t\treturn result.resDesc;\r\n\t} else {\r\n\t\tdispatch(setFetchState({ type: \"error\", errorCode: result?.resCode }));\r\n\t}\r\n};\r\n","import React from \"react\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { StoreType } from \"../../../core/store/reducers\";\r\nimport { Ports } from \"../../models\";\r\n\r\nconst getPortLabel = (port?: Ports) => (port ? `${port.cityName} (${port.zipCode})` : \"\");\r\n\r\nexport const usePorts = () => {\r\n\tconst ports = useSelector(store => store.data.initialData.ports);\r\n\r\n\treturn [ports, getPortLabel] as [typeof ports, typeof getPortLabel];\r\n};\r\n\r\nexport const usePort = (cityId?: string) => {\r\n\tconst [ports] = usePorts();\r\n\r\n\tconst port = React.useMemo(() => ports.find(c => c.cityId === cityId), [ports, cityId]);\r\n\tconst portLabel = React.useMemo(() => getPortLabel(port), [port]);\r\n\r\n\treturn [port, portLabel] as [typeof port, typeof portLabel];\r\n};\r\n","import React from \"react\";\r\nimport { usePorts } from \"../../../data/initialData/hooks/usePorts\";\r\nimport { Ports } from \"../../../data/models\";\r\nimport { AutocompleteSelectType, AutocompleteSelect } from \"./AutocompleteSelect\";\r\n\r\ntype PortSelectPropsType = Omit, \"data\" | \"getLabel\">;\r\n\r\nexport const PortSelect: React.FunctionComponent = props => {\r\n\tconst [ports, renderPortLabel] = usePorts();\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\tdata={ports}\r\n\t\t\tgetLabel={renderPortLabel}\r\n\t\t\t{...props}\r\n\t\t/>\r\n\t);\r\n};\r\n","import { NavigationItem } from \"../../../core/navigation/types\";\r\nimport WhsPage from \"./WhsPage\";\r\nimport { EditWhsPage } from \"./EditWhsPage\";\r\nimport { whsLocation, editRouter } from \"./Locations\";\r\nexport const warehouseComponents: NavigationItem[] = [\r\n\t{\r\n\t\tComponent: WhsPage,\r\n\t\tisMenuItem: true,\r\n\t\tpath: whsLocation,\r\n\t},\r\n\t{\r\n\t\tComponent: EditWhsPage,\r\n\t\tisMenuItem: false,\r\n\t\tpath: editRouter,\r\n\t},\r\n];\r\n","import React from \"react\";\r\nimport { useEditWhsState } from \"../../../data/listing/warehouses/hooks/useEditWhsState\";\r\nimport { useWhsValidator } from \"../../../data/listing/warehouses/hooks/useWhsValidator\";\r\nimport { useWhsUpsert } from \"../../../data/listing/warehouses/hooks/useWhsUpsert\";\r\nimport { RouteComponentProps, useHistory } from \"react-router-dom\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Card, Grid, CardHeader, Divider, CardContent } from \"@material-ui/core\";\r\nimport { FabSave } from \"../../components/common/FabSave\";\r\nimport { Warehouse } from \"../../../data/listing/warehouses/types\";\r\nimport { StringInput } from \"../../components/common/StringInput\";\r\nimport { LeavePrompt } from \"../../components/common/LeavePrompt\";\r\nimport { CitySelect } from \"../../components/common/CitySelect\";\r\nimport { City, Ports, Status } from \"../../../data/models\";\r\nimport { BoolInput } from \"../../components/common/BoolInput\";\r\nimport { whsLocation } from \"./Locations\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { NumberInput } from \"../../components/common/NumberInput\";\r\nimport { PortSelect } from \"../../components/common/PortSelect\";\r\n\r\nexport interface EditWhsInfo {\r\n\twhsId?: string;\r\n}\r\n\r\nexport interface EditWhsProps extends RouteComponentProps {}\r\n\r\nexport const EditWhsPage: React.FunctionComponent = props => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst [whs, editWhs, changed] = useEditWhsState(props.match.params.whsId);\r\n\r\n\tconst [validationState, validate] = useWhsValidator();\r\n\tconst [fetchState, upsert] = useWhsUpsert();\r\n\tconst history = useHistory();\r\n\r\n\tconst unsavedChanges = fetchState.type === \"not-started\" && changed;\r\n\r\n\tconst handleChange = React.useCallback(\r\n\t\t(event: React.ChangeEvent) => {\r\n\t\t\teditWhs(event.target.name as any, event.target.value);\r\n\t\t},\r\n\t\t[editWhs]\r\n\t);\r\n\r\n\tconst changeCity = React.useCallback(\r\n\t\t(city: City | null) => {\r\n\t\t\teditWhs(\"cityId\", city ? city.cityId : \"\");\r\n\t\t},\r\n\t\t[editWhs]\r\n\t);\r\n\r\n\tconst changePort = React.useCallback(\r\n\t\t(port: Ports | null) => {\r\n\t\t\teditWhs(\"portId\", port ? port.cityId : \"\");\r\n\t\t},\r\n\t\t[editWhs]\r\n\t);\r\n\r\n\tconst save = React.useCallback(() => {\r\n\t\tif (fetchState.type === \"successful\") {\r\n\t\t\thistory.push(whsLocation);\r\n\t\t} else if (fetchState.type !== \"started\") {\r\n\t\t\tconst normalized = validate(whs);\r\n\t\t\tif (normalized) {\r\n\t\t\t\tupsert(normalized);\r\n\t\t\t}\r\n\t\t}\r\n\t}, [whs, validate, fetchState, history, upsert]);\r\n\r\n\tconst pageTitle = whs && whs.whsId ? \"whsEdit\" : \"whsCreate\";\r\n\r\n\tif (!whs) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\treturn (\r\n\t\t\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\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\tproperty=\"whsCode\"\r\n\t\t\t\t\t\t\t\t\titem={whs}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"whsCode\")}\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\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tproperty=\"whsName\"\r\n\t\t\t\t\t\t\t\t\titem={whs}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"whsName\")}\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\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t city.cityId === whs.cityId}\r\n\t\t\t\t\t\t\t\t\tonChangeItem={changeCity}\r\n\t\t\t\t\t\t\t\t\trequired={validationState.cityId !== undefined}\r\n\t\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\t\tvalidationState.cityId !== undefined &&\r\n\t\t\t\t\t\t\t\t\t\t!validationState.cityId\r\n\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\r\n\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\tproperty=\"address\"\r\n\t\t\t\t\t\t\t\t\titem={whs}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"cliAddress\")}\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\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t port.cityId === whs.portId}\r\n\t\t\t\t\t\t\t\t\tonChangeItem={changePort}\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\t\r\n\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\tproperty=\"distanceToPort\"\r\n\t\t\t\t\t\t\t\t\t\titem={whs}\r\n//\t\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\t\tlabel={getString(\"whsDistanceToPort\")}\r\n\t\t\t\t\t\t\t\t\t\tmoney\r\n\t\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\t\r\n\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\tproperty=\"status\"\r\n\t\t\t\t\t\t\t\t\titem={whs}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tfalsyValue={Status.Inactive}\r\n\t\t\t\t\t\t\t\t\tthrutyValue={Status.Active}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"cliStatus\")}\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\r\n\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\t);\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { PayType } from \"../types\";\r\n\r\nexport const getAllPayTypeApi = (userId: string) =>\r\n webApi({\r\n method: \"GET\",\r\n url: \"listing/getpaytypelist\",\r\n params: {\r\n userId,\r\n },\r\n });\r\n\r\nexport default getAllPayTypeApi;\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getAllPayTypeAPI from \"../api/getAllPayTypes\";\r\nimport { setData } from \"../payTypesDataReducer\";\r\n\r\nexport const loadAllPayTypes = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n dispatch(setData());\r\n\r\n const { userId } = store.data.auth.current.user;\r\n const payTypes = await dispatch(getAllPayTypeAPI(userId));\r\n\r\n dispatch(setData(payTypes || []));\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { PayType } from \"../types\";\r\n\r\nexport const getPayTypeApi = (userId: string, paytypeid: string) =>\r\n webApi({\r\n method: \"GET\",\r\n url: \"listing/getpaytype\",\r\n params: {\r\n userId,\r\n paytypeid,\r\n },\r\n });\r\n\r\nexport default getPayTypeApi;\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getPayTypeApi from \"../api/getPayType\";\r\nimport { setDisplayed } from \"../payTypesDataReducer\";\r\nimport { PayType } from \"../types\";\r\n\r\nexport const loadPayType = (paytypeId: string): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n dispatch(setDisplayed());\r\n\r\n const payType = await dispatch(getPayType(paytypeId));\r\n\r\n dispatch(setDisplayed(payType));\r\n};\r\n\r\nexport const getPayType = (\r\n paytypeId: string\r\n): ThunkType> => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { userId } = store.data.auth.current.user;\r\n return await dispatch(getPayTypeApi(userId, paytypeId));\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { PayType } from \"../types\";\r\nimport { loadPayType } from \"../thunks/loadPayType\";\r\n\r\nexport const useDisplayPayType = (paytypeId?: string) => {\r\n const storePayType = useSelector(\r\n (store) => store.data.listing.payTypes.displayedPayType\r\n );\r\n\r\n const displayedPayType =\r\n storePayType && storePayType.payTypeId === paytypeId ? storePayType : undefined;\r\n\r\n const displatch = useDispatch();\r\n\r\n React.useEffect(() => {\r\n if (paytypeId) {\r\n displatch(loadPayType(paytypeId));\r\n }\r\n }, [displatch, paytypeId]);\r\n\r\n return displayedPayType;\r\n};\r\n","import React from \"react\";\r\nimport { PayType } from \"../../../data/listing/payTypes/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { useDisplaySingleEmementStyles } from \"../../useDisplaySingleEmementStyles\";\r\nimport { DisplayBoolNumber } from \"../../components/common/DisplayBoolNumber\";\r\nimport { Status } from \"../../../data/models\";\r\n\r\nexport interface DisplayPayTypeMainAttributesProps {\r\n payType: PayType;\r\n}\r\n\r\nexport const DisplayPayTypeMainAttributes: React.FunctionComponent = ({\r\n payType,\r\n}) => {\r\n const style = useDisplaySingleEmementStyles();\r\n const { getString } = React.useContext(LocalizationContext);\r\n\r\n return (\r\n
\r\n
\r\n {getString(\"payTypeDesc\")}\r\n {payType.payTypeDescr}\r\n
\r\n
\r\n {getString(\"payTypeDescEn\")}\r\n {payType.payTypeDescrEn}\r\n
\r\n
\r\n {getString(\"payTypeStatus\")}\r\n \r\n \r\n \r\n
\r\n
\r\n {getString(\"payTypePonder\")}\r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n","import React from \"react\";\r\nimport { useDisplayPayType } from \"../../../data/listing/payTypes/hooks/useDisplayPayType\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { PayType } from \"../../../data/listing/payTypes/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { DisplayPayTypeMainAttributes } from \"./DisplayPayTypeMainAttributes\";\r\nimport {\r\n ExpansionPanel,\r\n ExpansionPanelSummary,\r\n Typography,\r\n Grid,\r\n} from \"@material-ui/core\";\r\n\r\nexport interface DisplayPayTypeProps {\r\n id?: string;\r\n}\r\n\r\nexport const DisplayPayType: React.FunctionComponent = ({\r\n id,\r\n}) => {\r\n const payType = useDisplayPayType(id);\r\n const { getString } = React.useContext(LocalizationContext);\r\n\r\n return !payType ? (\r\n <>{\"loading placeholder\"}\r\n ) : (\r\n \r\n \r\n \r\n {getString(\"tableBasciInfo\")}\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const useViewPayType = () => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n return React.useCallback(\r\n (payType: PayType) => showWithDrawer(),\r\n [showWithDrawer]\r\n );\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const deletePayTypeApi = (userId: string, paytypeid: string) =>\r\n webApi({\r\n method: \"DELETE\",\r\n url: \"listing/delpaytype\",\r\n params: {\r\n userId,\r\n paytypeid,\r\n },\r\n });\r\n\r\nexport default deletePayTypeApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { deletePayType } from \"../thunks/deletePayType\";\r\nimport { setFetchState } from \"../payTypesDataReducer\";\r\n\r\nexport const usePayTypeDelete = () => {\r\n const fetchState = useSelector(\r\n (store) => store.data.listing.payTypes.fetchState\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchDeletePayType = React.useCallback(\r\n (id: string) => dispatch(deletePayType(id)),\r\n [dispatch]\r\n );\r\n\r\n React.useEffect(() => {\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n }, [dispatch]);\r\n\r\n return [fetchState, dispatchDeletePayType] as [\r\n typeof fetchState,\r\n typeof dispatchDeletePayType\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport deletePayTypeApi from \"../api/deletePayType\";\r\nimport { setFetchState } from \"../payTypesDataReducer\";\r\n\r\nexport const deletePayType = (paytypeId: string): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n dispatch(setFetchState({ type: \"started\" }));\r\n\r\n const { userId } = store.data.auth.current.user;\r\n const result = await dispatch(deletePayTypeApi(userId, paytypeId));\r\n\r\n dispatch(setFetchState(result !== undefined ? { type: \"successful\" } : { type: \"error\"}));\r\n};\r\n","import { getEditLocation } from \"../../../core/util/functions\";\r\n\r\nexport const payTypesLocation = \"/listing/codebook/paytypes\";\r\nexport const getPayTypeEditLocation = (id?: string) => getEditLocation(payTypesLocation, undefined, id);\r\n\r\nexport const editRouter = getPayTypeEditLocation(\":paytypeId?\");\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport ViewIcon from \"@material-ui/icons/InputOutlined\";\r\nimport EditIcon from \"@material-ui/icons/EditOutlined\";\r\nimport { PayType } from \"../../../data/listing/payTypes/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Action } from \"material-table\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { useViewPayType } from \"./DisplayPayType\";\r\nimport { usePayTypeDelete } from \"../../../data/listing/payTypes/hooks/usePayTypeDelete\";\r\nimport { getPayTypeEditLocation } from \"./Locations\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\n\r\n\r\nexport const usePayTypeActions = (userAccessRights: AccessRights) => {\r\n const { getString } = useContext(LocalizationContext);\r\n const onShowPayType = useViewPayType();\r\n const onEditPayType = useEditPayTypeAction();\r\n\r\n return useMemo(() => {\r\n const result: Action[] = [\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"tableShow\"),\r\n onClick: (event, rowData) => onShowPayType(rowData as PayType),\r\n },\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"tableEdit\"),\r\n onClick: (event, rowData) => onEditPayType(rowData as PayType),\r\n hidden: userAccessRights===AccessRights.ReadOnly\r\n },\r\n ];\r\n\r\n return result;\r\n }, [onShowPayType, onEditPayType, getString]);\r\n};\r\n\r\nexport const useDeletePayTypeAction = () => {\r\n const [, deletePayType] = usePayTypeDelete();\r\n return React.useCallback(\r\n async (payType: PayType) => {\r\n if (payType.payTypeId ) {\r\n await deletePayType(payType.payTypeId);\r\n }\r\n },\r\n [deletePayType]\r\n );\r\n};\r\n\r\nexport const useEditPayTypeAction = () => {\r\n const history = useHistory();\r\n return React.useCallback(\r\n (payType: PayType) => history.push(getPayTypeEditLocation(payType.payTypeId)),\r\n [history]\r\n );\r\n};\r\n","import React from \"react\";\r\nimport { Table, TableDataProps } from \"../../components/common/Table\";\r\nimport { usePayTypeData } from \"../../../data/listing/payTypes/hooks/usePayTypeData\";\r\nimport { PayType } from \"../../../data/listing/payTypes/types\";\r\nimport { usePayTypeColumns } from \"./usePayTypeColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\nimport { usePayTypeActions, useDeletePayTypeAction } from \"./usePayTypeActions\";\r\n\r\nexport interface PayTypeTableProps {\r\n userAccessRights: AccessRights;\r\n}\r\n\r\ntype PayTypeTablePropsType = PayTypeTableProps & TableDataProps;\r\n\r\nexport const PayTypesTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n ...tableProps\r\n}) => {\r\n const [data, loadAll] = usePayTypeData();\r\n\r\n const columns = usePayTypeColumns();\r\n const actions = usePayTypeActions(userAccessRights);\r\n const onDeletePayType = useDeletePayTypeAction();\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={loadAll}\r\n immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n actions={actions}\r\n options={{\r\n toolbar: false,\r\n pageSize: 10,\r\n actionsColumnIndex: -1,\r\n }}\r\n editable={userAccessRights !== AccessRights.ReadOnly ? {\r\n onRowDelete: onDeletePayType,\r\n }: {}}\r\n />\r\n );\r\n};\r\n\r\nexport default PayTypesTable;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadAllPayTypes } from \"../thunks/loadAllPayTypes\";\r\nimport { PayType } from \"../types\";\r\n\r\nexport const usePayTypeData = () => {\r\n const data = useSelector(\r\n (s) => s.data.listing.payTypes.displayData\r\n );\r\n const allData = useSelector(\r\n (s) => s.data.listing.payTypes.all\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadAllPayTypes = React.useCallback(\r\n () => dispatch(loadAllPayTypes()),\r\n [dispatch]\r\n );\r\n\r\n return [data, dispatchLoadAllPayTypes, allData] as [\r\n typeof data,\r\n typeof dispatchLoadAllPayTypes,\r\n typeof allData\r\n ];\r\n};\r\n\r\nexport const usePayType = (id?: string) => {\r\n const allData = useSelector(\r\n (s) => s.data.listing.payTypes.all\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadAllPayTypes = React.useCallback(\r\n () => dispatch(loadAllPayTypes()),\r\n [dispatch]\r\n );\r\n\r\n React.useEffect(() => {\r\n if (!allData && id) {\r\n dispatchLoadAllPayTypes();\r\n }\r\n }, [allData, id, dispatchLoadAllPayTypes]);\r\n\r\n const payType = React.useMemo(() => {\r\n if (!allData) {\r\n return undefined;\r\n } else {\r\n return allData?.find((e) => e.payTypeId === id);\r\n }\r\n }, [id, allData]);\r\n\r\n return [payType] as [typeof payType];\r\n};\r\n","import React from \"react\";\r\nimport { useContext, useMemo } from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\nimport { PayType } from \"../../../data/listing/payTypes/types\";\r\nimport { Status } from \"../../../data/models\";\r\nimport { DisplayBoolNumber } from \"../../components/common/DisplayBoolNumber\";\r\n\r\nexport function usePayTypeColumns() {\r\n const { getString } = useContext(LocalizationContext);\r\n return useMemo(\r\n () => [\r\n {\r\n title: getString(\"payTypeTitle\"),\r\n field: \"payTypeDescr\",\r\n },\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"payTypePonder\"),\r\n\t\t\t\trender: payType => ,\r\n\t\t\t\tcustomSort: (a, b) => a.status - b.status,\r\n\t\t\t},\t\t\t{\r\n\t\t\t\ttitle: getString(\"payTypeStatus\"),\r\n\t\t\t\trender: payType => ,\r\n\t\t\t\tcustomSort: (a, b) => a.status - b.status,\r\n\t\t\t},\r\n ],\r\n [getString]\r\n ) as Column[];\r\n}\r\n","import React from \"react\";\r\nimport { Grid, CardContent, CardHeader, Divider, Card, Fab } from \"@material-ui/core\";\r\nimport PayTypesTable from \"./PayTypesTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { SearchBox } from \"../../components/common/SearchBox\";\r\nimport { PageComponent, AccessRights } from \"../../../core/navigation/types\";\r\nimport AddIcon from \"@material-ui/icons/Add\";\r\nimport { usePayTypeSearch } from \"../../../data/listing/payTypes/hooks/usePayTypeSearch\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { getPayTypeEditLocation } from \"./Locations\";\r\n\r\nconst PayTypePage: PageComponent = ({ userAccessRights }) => {\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst [search, setSearch] = usePayTypeSearch();\r\n\tconst history = useHistory();\r\n\r\n\treturn (\r\n\t\t\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\taction={}\r\n\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\t{userAccessRights === AccessRights.All && (\r\n\t\t\t\t\t history.push(getPayTypeEditLocation())}\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};\r\n\r\nexport default PayTypePage;\r\n","import { setSearchTerm } from \"../payTypesDataReducer\";\r\nimport { useSearch } from \"../../../../core/util/storeHooks\";\r\n\r\nexport const usePayTypeSearch = () =>\r\n useSearch((s) => s.data.listing.payTypes.searchTerm, setSearchTerm);\r\n","import React from \"react\";\r\nimport { useDisplayPayType } from \"./useDisplayPayType\";\r\nimport { PayType } from \"../types\";\r\nimport { useCopiedState } from \"../../../../core/util/hooks\";\r\nimport { Status } from \"../../../models\";\r\n\r\nexport const defaultPayType: PayType = {\r\n payTypeDescr: \"\",\r\n payTypeDescrEn: \"\",\r\n status: Status.Active,\r\n inPonder: Status.Active,\r\n};\r\n\r\nexport const useEditPayType = (paytypeId?: string) => {\r\n const displayPayType = useDisplayPayType(paytypeId);\r\n\r\n return React.useMemo(() => {\r\n if (paytypeId !== undefined && displayPayType === undefined) {\r\n return undefined;\r\n }\r\n\r\n if (paytypeId === undefined) {\r\n return { ...defaultPayType };\r\n }\r\n\r\n return displayPayType ? { ...displayPayType } : undefined;\r\n }, [paytypeId, displayPayType]);\r\n};\r\n\r\nexport const useEditPayTypeState = (paytypeId?: string) => {\r\n const payType = useEditPayType(paytypeId);\r\n return useCopiedState(payType);\r\n};\r\n","import { PayType, PayTypeValidationState } from \"../types\";\r\nimport { createUseValidator } from \"../../../../core/util/hooks\";\r\n\r\nexport const payTypeValidationState: PayTypeValidationState = {\r\n payTypeDescr: true,\r\n payTypeDescrEn: true,\r\n};\r\n\r\nexport const usePayTypeValidator = createUseValidator(\r\n payTypeValidationState\r\n);\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { PayType } from \"../types\";\r\n\r\nexport const createPayTypeApi = (userId: string, paytype: PayType) =>\r\n webApiWithResponse({\r\n method: \"PUT\",\r\n url: \"listing/newpaytype\",\r\n params: {\r\n userId,\r\n },\r\n data: paytype,\r\n });\r\n\r\nexport default createPayTypeApi;\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { PayType } from \"../types\";\r\n\r\nexport const updatePayTypeApi = (userId: string, payType: PayType) =>\r\n webApiWithResponse({\r\n method: \"PUT\",\r\n url: \"listing/updpaytype\",\r\n params: {\r\n userId,\r\n },\r\n data: payType,\r\n });\r\n\r\nexport default updatePayTypeApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { upsertPayType } from \"../thunks/upsertPayType\";\r\nimport { setFetchState } from \"../payTypesDataReducer\";\r\nimport { PayType } from \"../types\";\r\n\r\nexport const usePayTypeUpsert = () => {\r\n const fetchState = useSelector(\r\n (store) => store.data.listing.payTypes.fetchState\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchUpsertPayType = React.useCallback(\r\n (payType: PayType) => dispatch(upsertPayType(payType)),\r\n [dispatch]\r\n );\r\n\r\n React.useEffect(() => {\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n }, [dispatch]);\r\n\r\n return [fetchState, dispatchUpsertPayType] as [\r\n typeof fetchState,\r\n typeof dispatchUpsertPayType\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport createPayTypeApi from \"../api/createPayType\";\r\nimport updatePayTypeApi from \"../api/updatePayType\";\r\nimport { setFetchState } from \"../payTypesDataReducer\";\r\nimport { PayType } from \"../types\";\r\n\r\nexport const upsertPayType = (paytype: PayType): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setFetchState({ type: \"started\" }));\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst result = paytype.payTypeId\r\n\t\t? await dispatch(updatePayTypeApi(userId, paytype))\r\n\t\t: await dispatch(createPayTypeApi(userId, paytype));\r\n\r\n\tif (result && result.resCode === \"OK\") {\r\n\t\tdispatch(setFetchState({ type: \"successful\", result: result.resDesc }));\r\n\t\treturn result.resDesc;\r\n\t} else {\r\n\t\tdispatch(setFetchState({ type: \"error\", errorCode: result?.resCode }));\r\n\t}\r\n};\r\n","import { NavigationItem } from \"../../../core/navigation/types\";\r\nimport PayTypePage from \"./PayTypePage\";\r\nimport { EditPayTypePage } from \"./EditPayTypePage\";\r\nimport { payTypesLocation, editRouter } from \"./Locations\";\r\nexport const payTypeComponents: NavigationItem[] = [\r\n\t{\r\n\t\tComponent: PayTypePage,\r\n\t\tisMenuItem: true,\r\n\t\tpath: payTypesLocation,\r\n\t},\r\n\t{\r\n\t\tComponent: EditPayTypePage,\r\n\t\tisMenuItem: false,\r\n\t\tpath: editRouter,\r\n\t},\r\n];\r\n","import React from \"react\";\r\nimport { useEditPayTypeState } from \"../../../data/listing/payTypes/hooks/useEditPayTypeState\";\r\nimport { usePayTypeValidator } from \"../../../data/listing/payTypes/hooks/usePayTypeValidator\";\r\nimport { usePayTypeUpsert } from \"../../../data/listing/payTypes/hooks/usePayTypeUpsert\";\r\nimport { RouteComponentProps, useHistory } from \"react-router-dom\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Card, Grid, CardHeader, Divider, CardContent } from \"@material-ui/core\";\r\nimport { FabSave } from \"../../components/common/FabSave\";\r\nimport { PayType } from \"../../../data/listing/payTypes/types\";\r\nimport { StringInput } from \"../../components/common/StringInput\";\r\nimport { LeavePrompt } from \"../../components/common/LeavePrompt\";\r\nimport { Status, } from \"../../../data/models\";\r\nimport { BoolInput } from \"../../components/common/BoolInput\";\r\nimport { payTypesLocation } from \"./Locations\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\n\r\nexport interface EditPayTypeInfo {\r\n\tpaytypeId?: string;\r\n}\r\n\r\nexport interface EditPayTypeProps extends RouteComponentProps {}\r\n\r\nexport const EditPayTypePage: React.FunctionComponent = props => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst [payType, editPayType, changed] = useEditPayTypeState(props.match.params.paytypeId);\r\n\tconst [validationState, validate] = usePayTypeValidator();\r\n\tconst [fetchState, upsert] = usePayTypeUpsert();\r\n\tconst history = useHistory();\r\n\r\n\tconst unsavedChanges = fetchState.type === \"not-started\" && changed;\r\n\r\n\tconst handleChange = React.useCallback(\r\n\t\t(event: React.ChangeEvent) => {\r\n\t\t\teditPayType(event.target.name as any, event.target.value);\r\n\t\t},\r\n\t\t[editPayType]\r\n\t);\r\n\r\n\r\n\tconst save = React.useCallback(() => {\r\n\t\tif (fetchState.type === \"successful\") {\r\n\t\t\thistory.push(payTypesLocation);\r\n\t\t} else if (fetchState.type !== \"started\") {\r\n\t\t\tconst normalized = validate(payType);\r\n\t\t\tif (normalized) {\r\n\t\t\t\tupsert(normalized);\r\n\t\t\t}\r\n\t\t}\r\n\t}, [payType, validate, fetchState, history, upsert]);\r\n\r\n\tconst pageTitle = payType && payType.payTypeId ? \"payTypeEditTitle\" : \"payTypeCreateTitle\";\r\n\r\n\tif (!payType) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\treturn (\r\n\t\t\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\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\tproperty=\"payTypeDescr\"\r\n\t\t\t\t\t\t\t\t\titem={payType}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"payTypeDesc\")}\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\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\tproperty=\"payTypeDescrEn\"\r\n\t\t\t\t\t\t\t\t\titem={payType}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"payTypeDescEn\")}\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\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\tproperty=\"inPonder\"\r\n\t\t\t\t\t\t\t\t\titem={payType}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tfalsyValue={Status.Inactive}\r\n\t\t\t\t\t\t\t\t\tthrutyValue={Status.Active}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"payTypePonder\")}\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\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\tproperty=\"status\"\r\n\t\t\t\t\t\t\t\t\titem={payType}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tfalsyValue={Status.Inactive}\r\n\t\t\t\t\t\t\t\t\tthrutyValue={Status.Active}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"payTypeStatus\")}\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\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};\r\n","import { NavigationItem } from \"../../core/navigation/types\";\r\nimport { attributeComponents } from \"./attributes/navigationComponents\";\r\nimport { bankComponents } from \"./banks/navigationComponents\";\r\nimport { cityComponents } from \"./cities/navigationComponents\";\r\nimport { clientsComponents } from \"./clients/navigationComponents\";\r\nimport { commisionsComponents } from \"./commissions/navigationComponents\";\r\nimport { countriesComponents } from \"./countries/navigationComponents\";\r\nimport { currencyComponents } from \"./currencies/navigationComponents\";\r\nimport { ratesComponents } from \"./currencyRates/navigationComponents\";\r\nimport { employeeComponents } from \"./employees/navigationComponents\";\r\nimport { productGroupComponents } from \"./productGroups/navigationComponents\";\r\nimport { productsComponents } from \"./products/navigationComponents\";\r\nimport { regionsComponents } from \"./regions/navigationComponents\";\r\nimport { rolesComponents } from \"./roles/navigationComponents\";\r\nimport { userComponents } from \"./users/navigationComponents\";\r\nimport { warehouseComponents } from \"./warehouses/navigationComponents\";\r\nimport { payTypeComponents} from \"./payTypes/navigationComponents\";\r\n\r\nexport const listingComponents: NavigationItem[] = [\r\n ...attributeComponents,\r\n ...bankComponents,\r\n ...cityComponents,\r\n ...clientsComponents,\r\n ...commisionsComponents,\r\n ...countriesComponents,\r\n ...currencyComponents,\r\n ...ratesComponents,\r\n ...employeeComponents,\r\n ...productGroupComponents,\r\n ...productsComponents,\r\n ...regionsComponents,\r\n ...rolesComponents,\r\n ...userComponents,\r\n ...warehouseComponents,\r\n ...payTypeComponents,\r\n];","import React, { useMemo } from \"react\";\r\nimport { PageIndex } from \"../../../data/models\";\r\nimport { TablePagination } from \"@material-ui/core\";\r\nimport { Table, TablePropsType } from \"./Table\";\r\nimport { Options } from \"material-table\";\r\n\r\ninterface ControledTableProps {\r\n\tpageIndex: PageIndex;\r\n\tonPageIndexChange: (newState: PageIndex) => void;\r\n\ttotal?: number;\r\n}\r\n\r\nexport type ControledTablePropsType = ControledTableProps & TablePropsType;\r\n\r\nexport function ControledTable(props: ControledTablePropsType) {\r\n\tconst { pageIndex, onPageIndexChange, options, immutableData, total, ...tableProps } = props;\r\n\r\n\tconst tableOptions = useMemo((): Options => {\r\n\t\treturn {\r\n\t\t\t...options,\r\n\t\t\tpageSize: pageIndex.itemsPerPage,\r\n\t\t\tinitialPage: pageIndex.pageNumber,\r\n\t\t};\r\n\t}, [options, pageIndex]);\r\n\r\n\tconst count = total || immutableData?.length || 0;\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\tpage={pageIndex.pageNumber}\r\n\t\t\t{...tableProps}\r\n\t\t\timmutableData={immutableData}\r\n\t\t\tcomponents={{\r\n\t\t\t\tPagination: paginationProps => (\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t\tpaginationProps.onChangePage(evt, pageNumber)\r\n\t\t\t\t\t\t\tonPageIndexChange({\r\n\t\t\t\t\t\t\t\t...pageIndex,\r\n\t\t\t\t\t\t\t\tpageNumber,\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}}\r\n\t\t\t\t\t\tonChangeRowsPerPage={evt => {\r\n\t\t\t\t\t\t\tpaginationProps.onChangeRowsPerPage(evt);\r\n\t\t\t\t\t\t\tonPageIndexChange({\r\n\t\t\t\t\t\t\t\tpageNumber: 0,\r\n\t\t\t\t\t\t\t\titemsPerPage: (evt.target.value as any) as number,\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\toptions={tableOptions}\r\n\t\t/>\r\n\t);\r\n}\r\n","import React, { useMemo } from \"react\";\r\nimport { PageData, PageIndex, PageDataStatus } from \"../../../data/models\";\r\nimport { ControledTable, ControledTablePropsType } from \"./ControledTable\";\r\nimport { Options } from \"material-table\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\n\r\nexport interface PaginationDataProps {\r\n\tpageData?: PageData;\r\n\tpageIndex: PageIndex;\r\n\tuserAccessRights?: AccessRights;\r\n\tonPageIndexChange: (newState: PageIndex) => void;\r\n}\r\n\r\ntype PagginationTableProps = PaginationDataProps &\r\n\tOmit, \"immutableData\" | \"data\" | \"isLoading\">;\r\n\r\nexport function PaginationTable(props: PagginationTableProps) {\r\n\tconst { pageData, options, ...tableProps } = props;\r\n\r\n\tconst tableOptions = useMemo(\r\n\t\t(): Options | undefined =>\r\n\t\t\tpageData?.status === PageDataStatus.DataInvalidated\r\n\t\t\t\t? {\r\n\t\t\t\t\t\t...options,\r\n\t\t\t\t\t\trowStyle: {\r\n\t\t\t\t\t\t\t...options?.rowStyle,\r\n\t\t\t\t\t\t\tcolor: \"grey\",\r\n\t\t\t\t\t\t},\r\n\t\t\t\t }\r\n\t\t\t\t: options,\r\n\t\t[options, pageData]\r\n\t);\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t{...tableProps}\r\n\t\t\timmutableData={pageData?.currentPageData}\r\n\t\t\ttotal={pageData?.totalCount}\r\n\t\t\toptions={tableOptions}\r\n\t\t/>\r\n\t);\r\n}\r\n","import { OrderSide } from \"../../models\";\r\nimport { AttributeManditory, AttributeType } from \"../../listing/attributes/types\";\r\nimport {ProducAttributeHasStandard } from \"../../listing/products/types\";\r\nimport {ClientActive } from \"../../listing/clients/types\";\r\n\r\nexport interface ViewOrder {\r\n\tordId: string;\r\n\ttimeReceived: string;\r\n\tordNo: string;\r\n\tordType: string;\r\n\trefOrd: string;\r\n\tclientName: string;\r\n\tproduct: string;\r\n\tprodCode: string;\r\n\tside: string;\r\n\tqty: number;\r\n\tunit: string;\r\n\tallOrNothing: boolean;\r\n\tprice: number;\r\n\tpriceWithVat: number;\r\n\tcurrCode: string;\r\n\texpiryDate: string;\r\n\texportReady: boolean;\r\n\tstatus: string;\r\n\tstatusN: number;\r\n\tquality: string;\r\n\ttotNoOfRows: number;\r\n\tcanVerify: number; //\t\tindikator da li se u redu pojavljuje ikona za verifikaciju\r\n\tcanCancel: number; //\t\tisto za cancel orde\r\n\tcanReplace: number; //\t\tisto za replace order ili opposite order\r\n\tcanDelete: number; //\t\tbroker ili kontrolor brišu nalog\r\n\tmarket: OrderMarkt;\r\n\tqtyLeft?: number;\r\n\tpriceEur: number; // cena neto u eur\r\n\tsrps?: number,\r\n}\r\n\r\nexport interface GetOrdersParams {\r\n\tuserid: string;\r\n\tside?: OrderSide;\r\n\tempid?: string;\r\n\tcliid?: string;\r\n\tcliprsid?: string;\r\n\tprodid?: string;\r\n\tstatus?: number;\r\n\tdatefrom?: string;\r\n\tdateto?: string;\r\n\tfromrow?: number;\r\n\tnumofrows?: number;\r\n\tmarket?: OrderMarkt;\r\n}\r\n\r\nexport interface GetSimpleOrdersParams {\r\n\tuserid: string;\r\n\tside?: OrderSide;\r\n\tcliid: string;\r\n\tprodid?: string;\r\n\tstatus?: number;\r\n}\r\n\r\nexport type SimpleOrderFilter = Omit;\r\n\r\nexport enum OrderAllOrNothing {\r\n\tTrue = 1,\r\n\tFalse = 0,\r\n}\r\n\r\nexport enum OrderExportReady {\r\n\tTrue = 1,\r\n\tFalse = 0,\r\n}\r\n\r\nexport interface Order {\r\n\tordId: string;\r\n\tordNo: string;\r\n\ttimeReceived: Date;\r\n\treceiveMethod: number;\r\n\treceiveMethodDescr: string;\r\n\tordType: number;\r\n\tordTypeDescr: string;\r\n\trefOrdId: string;\r\n\trefOrdNo: string;\r\n\tbrokId: string;\r\n\tbrokName: string;\r\n\tuserId: string;\r\n\tuserName: string;\r\n\tclientId: string;\r\n\tclientName: string;\r\n\tcliPrsId: string;\r\n\tcliPrsName: string;\r\n\tprodId: string;\r\n\tprodCode: string;\r\n\tprodName: string;\r\n\tside: OrderSide;\r\n\tunit: number;\r\n\tunitDescr: string;\r\n\tfranco: number;\r\n\tfrancoDescr: string;\r\n\tqty: number;\r\n\tqtyLeft: number;\r\n\tprice: number;\r\n\tpercVat: number;\r\n\tpriceWithVat: number;\r\n\tallOrNothing: OrderAllOrNothing;\r\n\tminQty: number;\r\n\texpiryDate: Date;\r\n\tpayTypeId: string;\r\n\tpayTypeDescr: string;\r\n\ttradePlcId: string;\r\n\ttradePlcName: string;\r\n\tcheckPoint: number;\r\n\tcheckPointDescr: string;\r\n\tpaysCheck: number;\r\n\tpaysCheckDescr: string;\r\n\tgoodsReadyFrom: Date;\r\n\tgoodsReadyTo: Date;\r\n\texportReady: OrderExportReady;\r\n\tcomment: string;\r\n\tcommission: number;\r\n\tcancReplTime: Date;\r\n\tcancReplCliPersonId: string;\r\n\tordStatus: string;\r\n\tordStatusDescr: string;\r\n\torderAttrList?: OrderAttribute[];\r\n\tlocCountryId?: string; // \tID drzave (default SR)\r\n\tlocCountryName?: string; //\r\n\tlocRegionId?: string; // \t\tID regiona bivsi nadregion (regtype=10)\r\n\tlocRegionName?: string; //\r\n\tlocDistrictId?: string; // \tID distrikta bivsi region (regtype=20)\r\n\tlocDistrictName?: string; //\r\n\tlocCityId?: string; // \t\tID grada\r\n\tlocCityName?: string; //\r\n\tlocWarehouseId?: string; // \tID skladista\r\n\tlocWarehouseName?: string; //\r\n\tmarket: OrderMarkt;\r\n\tpriceEur: number; // cena neto u eur\r\n\tuserIsEmployee?: number; \r\n\torderLogList?: OrderLogData[];\r\n\tfundsCheckStatus: FundsCheckStatus;\r\n\tbankGuarantee: number,\r\n\tguaranteeDescr?: string,\r\n\tpaymentDays?: number,\r\n\tsrps?: number,\r\n}\r\n\r\nexport interface EditOrder {\r\n\tordId?: string; //\t\t\tA iz internih brojaca\r\n\tordNo?: string; //\t\t\tA isto\r\n\ttimeReceived?: Date; //\tA tekuce vreme\r\n\treceiveMethod?: number; //\tA ako je uneo klijent a broker bira. Default staviti telefonom\r\n\tordType?: OrderType; //\tA 0 za normalni, 1 replace nalog, 2 cancel nalog\r\n\trefOrdId?: string; //\t\tkoristi se kod replace/cancel naloga\r\n\tbrokId?: string; //\t\tA\r\n\tuserId: string; //\t\tkorisnik koji unosi nalog (koji je ulogovan)\r\n\tclientId?: string; //\t\tklijent koji ispostavlja nalog, ako unosi lice klijenta, prosledjuje se na osnovu ulogovanog korisnika, ako unosi broker, bira klijenta\r\n\tcliPrsId?: string; //\t\tlice koje daje nalog. Odredjuje se u backend-u prema ulogovanom korisniku ili kao podrazumevano lice.\r\n\tprodId?: string; //\t\tID proizvoda\r\n\tunit?: number; //\t\t\tpopunjava se iz izabranog produkta\r\n\tside: OrderSide; //\t\t\tBUY ili SELL\r\n\tfranco?: number; //\t\t\tbira se iz liste\r\n\tqty?: number; //\t\tkolicina. Ako je jedinica kg, mora da bude n * 25000\r\n\tqtyLeft?: number; //\t\tA preostala kolicina u nalogu, na osnovu realizacije\r\n\tprice?: number; //\t\tcena\r\n\tpercVat?: number; //\t\tA procenat PDV\r\n\tpriceWithVat?: number; //\tA cena sa pdv\r\n\tallOrNothing?: number; //\t\tsve ili nista – checkbox\r\n\tminQty?: number; //\t\tminimalna kolicina unosi se po potrebi\r\n\texpiryDate?: Date; //;\tdatum do kad vazi nalog (max 30 dana)\r\n\tpayTypeId?: string; //\t\tRSD, valuta ???\r\n\ttradPlcId?: string; //\t\tmesto prometa (paritet), unosi se (PARITET)\r\n\tcheckPoint?: number; //\t\tbira se iz liste\r\n\tpaysCheck?: number; //\t\tisto\r\n\tgoodsReadyFrom?: Date; //;\tunosi se datum od kada je roba spremna za isporuku\r\n\tgoodsReadyTo?: Date; //;\tdo kog datuma je roba spremna\r\n\tcomment?: string; //\t\tkomentar, unosi se opciono\r\n\tcommission?: number; //\t\tA % provizije PB\r\n\tcancReplTime?: Date; //;\tA datum/vreme opoziva/modifikacije naloga\r\n\tcancReplCliPersonId?: string; //\tA lice koje je izvrsilo/zahtevalo opoz/modif\r\n\tordStatus?: number; //\t\tA status naloga\r\n\texportReady: number;\r\n\torderAttrList?: OrderAttribute[];\r\n\tlocCountryId?: string; // \tID drzave (default SR)\r\n\tlocCountryName?: string; //\r\n\tlocRegionId?: string; // \t\tID regiona bivsi nadregion (regtype=10)\r\n\tlocRegionName?: string; //\r\n\tlocDistrictId?: string; // \tID distrikta bivsi region (regtype=20)\r\n\tlocDistrictName?: string; //\r\n\tlocCityId?: string; // \t\tID grada\r\n\tlocCityName?: string; //\r\n\tlocWarehouseId?: string; // \tID skladista\r\n\tlocWarehouseName?: string; //\r\n\tmarket: OrderMarkt;\r\n\tfundsCheckStatus: FundsCheckStatus;\r\n\tbankGuarantee?: number,\r\n\tpaymentDays?: number,\r\n\tsrps?: number,\r\n\tactive?: ClientActive; //\t\t0=ima pristup app (def), 1=zabranjen pristup\r\n}\r\n\r\n\r\nexport interface OrderAttribute {\r\n\tordAttrId?: string; //\tPK\r\n\tordId?: string; //\t\tID naloga\r\n\tattrId?: string; //\tID atributa\r\n\tattrName?: string; //\tnaziv atributa\r\n\tattrValId?: string; //\tID vredosti atributa (popunjeno za atribute tipa SELECT)\r\n\tattrValue?: number; //\tvrednost atributa (popunjeno za atribute tipa TEXT)\r\n\t//jedan i samo jedan od poslednja 2 mora biti popunjen\r\n\tmanditory?: AttributeManditory;\r\n\ttype?: AttributeType;\r\n\tcomparator?: string;\r\n\thasStandard?: ProducAttributeHasStandard;\r\n\tstandardValue?: number;\r\n}\r\n\r\nexport interface OrderLogData {\r\n\tchangeTime?: Date; \r\n\tuserName?: string; \r\n\tactivity?: string; \r\n\tstatus?: string; \r\n\trefOrder?: string; \r\n}\r\n\r\n\r\nexport enum OrderType {\r\n\tNew = 0,\r\n\tReplace = 1,\r\n\tCancel = 2,\r\n}\r\n\r\nexport enum OrdersEditAction {\r\n\tNew = \"new\",\r\n\tReplay = \"replay\",\r\n\tVerify = \"verify\",\r\n\tModify = \"modify\",\r\n}\r\n\r\nexport enum OrderMarkt {\r\n\tSpot = 0,\r\n\tForward = 1,\r\n}\r\n\r\nexport enum FundsCheckStatus {\r\n\tNotChecked = \"NOTCHECKED\",\r\n\tIgnore = \"IGNORE\",\r\n\tConfirmed = \"CONFIRMED\",\r\n}\r\n\r\nexport type OrderUpsertResult =\r\n\t| { status: \"CREATED\"; newId: string }\r\n\t| { status: \"NOFUNDS\"; message: string }\r\n\t| { status: \"ERROR\"; message?: string };\r\n\r\nexport interface OrderSimpleData {\r\n\tordId: string;\r\n\tordData: string;\r\n\tdepAmt: number;\r\n\tdepAmtPayed: number;\r\n\tprice: number;\r\n\tqty: number;\r\n\tside: string;\r\n\tnonAllocAmt: number;\r\n}\r\n\r\nexport type OrderSideDictionary = {\r\n\t[key in OrderSide]: T;\r\n};\r\n\r\nexport type OrderSideArgs = {\r\n\tside: OrderSide;\r\n\tvalue: T;\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { Order } from \"../types\";\r\n\r\nexport const getOrderApi = (userId: string, ordid: string) =>\r\n webApi({\r\n method: \"GET\",\r\n url: \"order/getorder\",\r\n params: {\r\n userId,\r\n ordid,\r\n },\r\n });\r\n\r\nexport default getOrderApi;\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getOrderApi from \"../api/getOrder\";\r\nimport { Order } from \"../types\";\r\n\r\nexport const getOrder = (\r\n ordId: string\r\n): ThunkType> => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { userId } = store.data.auth.current.user;\r\n return await dispatch(getOrderApi(userId, ordId));\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { Order } from \"../../orders/types\";\r\nimport { loadMBOrder } from \"../thunks/loadMainBoardOrder\";\r\n\r\nexport const useDisplayMBOrder = (ordId?: string) => {\r\n const storeMB = useSelector(\r\n (store) => store.data.trading.mainBoard.displayedMBOrder\r\n );\r\n\r\n const displayedMBOrder =\r\n storeMB && storeMB.ordId === ordId ? storeMB : undefined;\r\n\r\n const displatch = useDispatch();\r\n\r\n React.useEffect(() => {\r\n if (ordId) {\r\n displatch(loadMBOrder(ordId));\r\n }\r\n }, [displatch, ordId]);\r\n\r\n return displayedMBOrder;\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { setDisplayed } from \"../ordersDataSlice\";\r\nimport { getOrder } from \"../../orders/thunks/getOrder\";\r\n\r\nexport const loadMBOrder = (ordId: string): ThunkType => async (\r\n dispatch\r\n) => {\r\n dispatch(setDisplayed());\r\n\r\n const mborder = await dispatch(getOrder(ordId));\r\n\r\n dispatch(setDisplayed(mborder));\r\n};\r\n\r\n\r\n","import React from \"react\";\r\nimport { OrderSide } from \"../../../models\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { exhaustiveCheck } from \"../../../../core/util/functions\";\r\n\r\nexport const useOrderSideOptionsTranslator = () => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\treturn React.useCallback(\r\n\t\t(side: OrderSide) => {\r\n\t\t\tswitch (side) {\r\n\t\t\t\tcase OrderSide.Buy:\r\n\t\t\t\t\treturn getString(\"orderSideBuy\");\r\n\t\t\t\tcase OrderSide.Sell:\r\n\t\t\t\t\treturn getString(\"orderSideSell\");\r\n\t\t\t\tdefault:\r\n\t\t\t\t\texhaustiveCheck(side);\r\n\t\t\t}\r\n\t\t},\r\n\t\t[getString]\r\n\t);\r\n};\r\n\r\ninterface AccountOrderSideOption {\r\n\tlabel: string;\r\n\tvalue: OrderSide;\r\n}\r\n\r\nexport const useOrderSideOptions = (): AccountOrderSideOption[] => {\r\n\tconst translator = useOrderSideOptionsTranslator();\r\n\r\n\treturn React.useMemo(\r\n\t\t() => [\r\n\t\t\t{\r\n\t\t\t\tlabel: translator(OrderSide.Buy) as string,\r\n\t\t\t\tvalue: OrderSide.Buy,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tlabel: translator(OrderSide.Sell) as string,\r\n\t\t\t\tvalue: OrderSide.Sell,\r\n\t\t\t},\r\n\t\t],\r\n\t\t[translator]\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport { Order, OrderAllOrNothing } from \"../../../data/trading/orders/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { useDisplaySingleEmementStyles } from \"../../useDisplaySingleEmementStyles\";\r\nimport { DisplayBoolNumber } from \"../../components/common/DisplayBoolNumber\";\r\nimport { useOrderSideOptionsTranslator } from \"../../../data/trading/orders/hooks/useOrderSideOptions\";\r\nimport { useOrderMarketOptionsTranslator } from \"../../../data/trading/orders/hooks/useOrderMarketOptions\";\r\nimport { Status } from \"../../../data/models\";\r\n\r\nexport enum DiplayOrderMod {\r\n\tFull,\r\n\tPublicData,\r\n}\r\n\r\nexport interface DisplayOrderMainAttributesProps {\r\n\torder: Order;\r\n\tmod: DiplayOrderMod;\r\n}\r\n\r\nexport const DisplayOrderMainAttributes: React.FunctionComponent = ({\r\n\torder,\r\n\tmod,\r\n}) => {\r\n\tconst style = useDisplaySingleEmementStyles();\r\n\tconst { getString, getDateString, getDateTimeString, getFormatedNumberString, getFormatedNumberString4 } = React.useContext(\r\n\t\tLocalizationContext\r\n\t);\r\n\r\n\tconst sideTranslator = useOrderSideOptionsTranslator();\r\n\tconst marketTranslator = useOrderMarketOptionsTranslator();\r\n\r\n\treturn (\r\n\t\t
\r\n\t\t\t{mod === DiplayOrderMod.Full && (\r\n\t\t\t\t
\r\n\t\t\t\t\t{getString(\"orderClmOrdNo\")}\r\n\t\t\t\t\t{order.ordNo}\r\n\t\t\t\t
\r\n\t\t\t)}\r\n\t\t\t
\r\n\t\t\t\t{getString(\"orderTimeReceived\")}\r\n\t\t\t\t{getDateTimeString(order.timeReceived)}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"orderSide\")}\r\n\t\t\t\t{sideTranslator(order.side)}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"orderMarket\")}\r\n\t\t\t\t{marketTranslator(order.market)}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"orderOrdType\")}\r\n\t\t\t\t{order.ordTypeDescr}\r\n\t\t\t
\r\n\t\t\t{mod === DiplayOrderMod.Full && (\r\n\t\t\t\t<>\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t{getString(\"orderRefOrd\")}\r\n\t\t\t\t\t\t{order.refOrdNo}\r\n\t\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t{getString(\"orderReceiveMethod\")}\r\n\t\t\t\t\t\t{order.receiveMethodDescr}\r\n\t\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t{getString(\"orderClientName\")}\r\n\t\t\t\t\t\t{order.clientName}\r\n\t\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t{getString(\"orderCliPrsName\")}\r\n\t\t\t\t\t\t{order.cliPrsName}\r\n\t\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t{getString(\"orderbrokName\")}\r\n\t\t\t\t\t\t{order.brokName}\r\n\t\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t{getString(\"orderUserName\")}\r\n\t\t\t\t\t\t{order.userName}\r\n\t\t\t\t\t
\r\n\t\t\t\t\r\n\t\t\t)}\r\n\t\t\t
\r\n\t\t\t\t{getString(\"orderProduct\")}\r\n\t\t\t\t{`${order.prodName} (${order.prodCode})`}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"orderUnit\")}\r\n\t\t\t\t{order.unitDescr}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"orderQty\")}\r\n\t\t\t\t{getFormatedNumberString(order.qty)}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"orderQtyLeft\")}\r\n\t\t\t\t{getFormatedNumberString(order.qtyLeft)}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"orderPrice\")}\r\n\t\t\t\t{getFormatedNumberString(order.price, true)}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"orderPriceEur\")}\r\n\t\t\t\t{getFormatedNumberString4(order.priceEur, true)}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"orderPriceVat\")}\r\n\t\t\t\t{`${order.percVat} %`}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"orderPriceWithVat\")}\r\n\t\t\t\t{getFormatedNumberString(order.priceWithVat, true)}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"orderAllOrNothing\")}\r\n\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\t
\r\n\t\t\t\t{getString(\"orderMinQty\")}\r\n\t\t\t\t{getFormatedNumberString(order.minQty)}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"orderExpiryDate\")}\r\n\t\t\t\t{getDateString(order.expiryDate)}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"orderPayType\")}\r\n\t\t\t\t{order.payTypeDescr}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"orderPayDays\")}\r\n\t\t\t\t{getFormatedNumberString(order.paymentDays)}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"ordergoodsRedyFrom\")}\r\n\t\t\t\t{getDateString(order.goodsReadyFrom)}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"ordergoodsRedyTo\")}\r\n\t\t\t\t{getDateString(order.goodsReadyTo)}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"orderFranco\")}\r\n\t\t\t\t{order.francoDescr}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"orderexportReady\")}\r\n\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\t{mod === DiplayOrderMod.Full && (
\r\n\t\t\t\t{getString(\"orderDeliveryLocation\")}\r\n\t\t\t\t{getDeliveryLocation(order)}\r\n\t\t\t
)}\r\n\t\t\t{mod !== DiplayOrderMod.Full && (
\r\n\t\t\t\t{getString(\"orderDeliveryLocation\")}\r\n\t\t\t\t{getDeliveryLocationShort(order)}\r\n\t\t\t
)}\r\n\t\t\t{/*
\r\n\t\t\t\t{getString(\"orderCheckPoint\")}\r\n\t\t\t\t{order.checkPointDescr}\r\n\t\t\t
*/}\r\n\t\t\t{/*
\r\n\t\t\t\t{getString(\"orderCheckPays\")}\r\n\t\t\t\t{order.paysCheckDescr}\r\n\t\t
*/}\r\n\r\n\t\t\t
\r\n\t\t\t\t{getString(\"orderBankGuarantee\")}\r\n\t\t\t\t{order.guaranteeDescr}\r\n\t\t\t
\r\n\r\n\r\n\t\t\t{/*
\r\n\t\t\t\t{getString(\"orderBankGuarantee\")}\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t
*/}\r\n\r\n\t\t\t
\r\n\t\t\t\t{getString(\"orderComment\")}\r\n\t\t\t\t{order.comment}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"orderCommission\")}\r\n\t\t\t\t{getFormatedNumberString(order.commission, true)}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"orderCancelReplTime\")}\r\n\t\t\t\t{getDateTimeString(order.cancReplTime)}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"orderStatusDescr\")}\r\n\t\t\t\t{order.ordStatusDescr}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"attributeSRPS\")}\r\n\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};\r\n\r\nconst getDeliveryLocation = (order?: Order) => {\r\n\tif (!order || !order.locCountryName) return \"\";\r\n\tlet deliveryLocation = order.locCountryName;\r\n\r\n\tif (!order.locRegionName) return deliveryLocation;\r\n\tdeliveryLocation += ` -> ${order.locRegionName}`;\r\n\r\n\tif (!order.locDistrictName) return deliveryLocation;\r\n\tdeliveryLocation += ` -> ${order.locDistrictName}`;\r\n\r\n\tif (!order.locCityName) return deliveryLocation;\r\n\tdeliveryLocation += ` -> ${order.locCityName}`;\r\n\r\n\tif (!order.locWarehouseName) return deliveryLocation;\r\n\r\n\treturn deliveryLocation + ` -> ${order.locWarehouseName}`;\r\n};\r\n\r\nconst getDeliveryLocationShort = (order?: Order) => {\r\n\tif (!order || !order.locCountryName) return \"\";\r\n\tlet deliveryLocation = order.locCountryName;\r\n\r\n\tif (!order.locRegionName) return deliveryLocation;\r\n\tdeliveryLocation += ` -> ${order.locRegionName}`;\r\n\r\n\tif (!order.locDistrictName) return deliveryLocation;\r\n\tdeliveryLocation += ` -> ${order.locDistrictName}`;\r\n\r\n\treturn deliveryLocation;\r\n};\r\n","import React from \"react\";\r\nimport { OrderMarkt } from \"../types\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { exhaustiveCheck } from \"../../../../core/util/functions\";\r\n\r\nexport const useOrderMarketOptionsTranslator = () => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\treturn React.useCallback(\r\n\t\t(market: OrderMarkt) => {\r\n\t\t\tswitch (market) {\r\n\t\t\t\tcase OrderMarkt.Spot:\r\n\t\t\t\t\treturn getString(\"orderMarketSpot\");\r\n\t\t\t\tcase OrderMarkt.Forward:\r\n\t\t\t\t\treturn getString(\"orderMarketForward\");\r\n\t\t\t\tdefault:\r\n\t\t\t\t\texhaustiveCheck(market);\r\n\t\t\t}\r\n\t\t},\r\n\t\t[getString]\r\n\t);\r\n};\r\n\r\ninterface OrderMarketOption {\r\n\tlabel: string;\r\n\tvalue: OrderMarkt;\r\n}\r\n\r\nexport const useOrderMarketOptions = (): OrderMarketOption[] => {\r\n\tconst translator = useOrderMarketOptionsTranslator();\r\n\treturn React.useMemo(\r\n\t\t() => [\r\n\t\t\t{\r\n\t\t\t\tlabel: translator(OrderMarkt.Spot) as string,\r\n\t\t\t\tvalue: OrderMarkt.Spot,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tlabel: translator(OrderMarkt.Forward) as string,\r\n\t\t\t\tvalue: OrderMarkt.Forward,\r\n\t\t\t},\r\n\t\t],\r\n\t\t[translator]\r\n\t);\r\n};\r\n","import { getEditLocation } from \"../../../core/util/functions\";\r\nimport { OrdersEditAction } from \"../../../data/trading/orders/types\";\r\nexport const mainBoardLocation = \"/trading/mainpanel\"\r\n\r\nexport enum OrdersEditParts {\r\n\tBasicInfo = \"basicinfo\",\r\n\tAttributes = \"attributes\",\r\n}\r\n\r\nexport const getOrderEditLocation = (\r\n\taction: OrdersEditAction = OrdersEditAction.New,\r\n\tpart: OrdersEditParts = OrdersEditParts.BasicInfo,\r\n\tproductId?: string,\r\n\tattributeId?: string\r\n) => getEditLocation(mainBoardLocation, part, productId, attributeId, action);\r\n\r\nexport const baseEdit = getOrderEditLocation(\":action\" as any, \":editPart\" as any, \":orderId?\");\r\nexport const atributesEdit = getOrderEditLocation(\r\n\t\":action\" as any,\r\n\tOrdersEditParts.Attributes,\r\n\t\":orderId?\",\r\n\t\":attributeId?\"\r\n);","import React from \"react\";\r\nimport { useDisplaySingleEmementStyles } from \"../../useDisplaySingleEmementStyles\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport {TableContainer,\tTable,\tTableHead,\tTableCell,\tTableRow,\tPaper,\tTableBody,\tTypography,\tGrid,} from \"@material-ui/core\";\r\nimport { OrderLogData } from \"../../../data/trading/orders/types\";\r\nimport { useAuth } from \"../../../data/auth/hooks\";\r\nimport { DiplayOrderMod } from \"./DisplayOrderMainAttributes\"\r\n\r\nexport interface DisplayOrderLogDataProps {\r\n\torderlog?: OrderLogData[];\r\n\tmod: DiplayOrderMod;\r\n}\r\n\r\nexport const DisplayOrderLogData: React.FunctionComponent = ({ orderlog, mod }) => {\r\n\tconst style = useDisplaySingleEmementStyles();\r\n\t// const [attributes] = useAttributes(orderId);\r\n\r\n\treturn (\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t{ mod === DiplayOrderMod.Full && ( )}\r\n\t\t\t
\r\n\t\t
\r\n\t);\r\n};\r\n\r\ninterface OrderLogDisplayTableProps {\r\n\torderlog?: OrderLogData[];\r\n}\r\n\r\nexport const OrderLogDisplayTable: React.FunctionComponent = ({\r\n\torderlog,\r\n}) => {\r\n\tconst { getString, getNumberString } = React.useContext(LocalizationContext);\r\n//\tconst [values, displayValue] = useAttributeValues();\r\n\r\n\tconst [auth] = useAuth();\r\n\r\n\tif (auth.status !== \"successful\") {\r\n\t\treturn null;\r\n\t}\r\n\r\n\tif (!orderlog || orderlog.length === 0) {\r\n\t\treturn (\r\n\t\t\t\r\n\t\t\t\t\t{ auth.user.roleCode !== \"MEMTRADER\" && auth.user.roleCode !== \"MEMMANAGER\" && auth.user.roleCode !== \"MEMCONTACT\" && ( \r\n\t\t\t\t{getString(\"orderLogDataEmpty\")} )}\r\n\t\t\t\r\n\t\t);\r\n\t}\r\n\r\n\treturn (\r\n\t\t\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\t{getString(\"orderLogDataTable\")} \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t{orderlog &&\r\n\t\t\t\t\t\torderlog.map(orderlog => (\r\n\t\t\t\t\t\t\t\r\n{/*\t\t\t\t\t\t\t\t{attribute.attrName} */}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t{orderlog.changeTime}\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{orderlog.userName}\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{orderlog.activity}\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{orderlog.status}\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{orderlog.refOrder}\r\n */}\r\n\t\t\t\t\t\t\t \r\n\t\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};\r\n","import { useSelector } from \"react-redux\";\r\nimport { StoreType } from \"../../../core/store/reducers\";\r\nimport { AttributesValue } from \"../../models\";\r\n\r\nconst getAttributeLabel = (role?: AttributesValue) => (role ? role.attrValName : \"\");\r\n\r\nexport const useAttributeValues = () => {\r\n\tconst attributes = useSelector(\r\n\t\tstore => store.data.initialData.attributeValues\r\n\t);\r\n\r\n\treturn [attributes, getAttributeLabel] as [typeof attributes, typeof getAttributeLabel];\r\n};\r\n","import React from \"react\";\r\nimport { useDisplaySingleEmementStyles } from \"../../../useDisplaySingleEmementStyles\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { useAttributes } from \"../../../../data/trading/mainBoard/hooks/attributes/useAttributes\";\r\nimport { OrderAttribute } from \"../../../../data/trading/orders/types\";\r\nimport {\r\n\tTableContainer,\r\n\tTable,\r\n\tTableHead,\r\n\tTableCell,\r\n\tTableRow,\r\n\tPaper,\r\n\tTableBody,\r\n\tTypography,\r\n\tGrid,\r\n} from \"@material-ui/core\";\r\nimport { useAttributeValues } from \"../../../../data/initialData/hooks/useAttributeValues\";\r\n\r\nexport interface DisplayAttributesProps {\r\n\tattributes?: OrderAttribute[];\r\n}\r\n\r\nexport const DisplayAttributes: React.FunctionComponent = ({ attributes }) => {\r\n\tconst style = useDisplaySingleEmementStyles();\r\n\t// const [attributes] = useAttributes(orderId);\r\n\r\n\treturn (\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t\r\n\t\t\t
\r\n\t\t
\r\n\t);\r\n};\r\n\r\ninterface AttributesDisplayTableProps {\r\n\tattributes?: OrderAttribute[];\r\n}\r\n\r\nexport const AttributesDisplayTable: React.FunctionComponent = ({\r\n\tattributes,\r\n}) => {\r\n\tconst { getString, getNumberString } = React.useContext(LocalizationContext);\r\n\tconst [values, displayValue] = useAttributeValues();\r\n\r\n\tif (!attributes || attributes.length === 0) {\r\n\t\treturn (\r\n\t\t\t\r\n\t\t\t\t{getString(\"productAttributeEmpty\")}\r\n\t\t\t\r\n\t\t);\r\n\t}\r\n\r\n\treturn (\r\n\t\t\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\t{getString(\"orderAttrName\")}\r\n\t\t\t\t\t\t{getString(\"orderAttrValue\")}\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t{attributes &&\r\n\t\t\t\t\t\tattributes.map(attribute => (\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t{attribute.attrName}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t{attribute.attrValue ? getNumberString(attribute.attrValue, \"0,0.0\") :\r\n\t\t\t\t\t\t\t\t\t\t\tdisplayValue(\r\n\t\t\t\t\t\t\t\t\t\t\t\tvalues && values.find(v => attribute.attrValId === v.attrValId)\r\n\t\t\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\r\n\t\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};\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const printOrder = (user: User, ordid: string) => {\r\n\treturn httpWebApi({\r\n\t\tmethod: \"GET\",\r\n\t\tresponseType: \"blob\",\r\n\t\ttimeout: 60 * 4 * 1000,\r\n\t\turl: \"reporting/getorderreport\",\r\n\t\tparams: {\r\n\t\t\tuserid: user.userId,\r\n\t\t\tordid,\r\n\t\t},\r\n\t});\r\n};\r\n\r\nexport default printOrder;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { printOrderThunk } from \"../thunks/printOrderThunk\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { EditOrder, Order } from \"../../orders/types\";\r\n\r\nexport const useOrderPrinter = (order?: Order) => {\r\n\tconst fetchState = useSelector(\r\n\t\ts => s.data.trading.orderBook.printOrderFetchState\r\n\t);\r\n\tconst dispatch = useDispatch();\r\n\tconst download = React.useCallback(() => {\r\n\t\t\tdispatch(printOrderThunk(order));\r\n\t}, [dispatch, order]);\r\n\r\n\treturn [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { printOrder } from \"../../orders/api/printOrder\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setPrintOrderFetchState } from \"../orderBookDataSlice\";\r\nimport { EditOrder, Order } from \"../../orders/types\";\r\n\r\nexport const printOrderThunk = (order?: Order): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\" || !order || !order.ordId) {\r\n\t\treturn undefined;\r\n\t}\r\n\tconst lan = store.ux.localization.language\r\n\tconst filename = `TradingOrder${order.side.trim().toUpperCase()}_${lan.trim().toUpperCase()}_${order.ordNo}.pdf`\r\n\tconst user = store.data.auth.current.user;\r\n\tdispatch(setPrintOrderFetchState({ type: \"started\" }));\r\n\tconst ordersReport = await dispatch(printOrder(user, order.ordId));\r\n\tif (ordersReport) {\r\n\t\tfileDownload(new Blob([ordersReport as any], { type: \"application/pdf\" }), filename);\r\n\t}\r\n\tdispatch(setPrintOrderFetchState({ type: \"not-started\" }));\r\n};\r\n","import React from \"react\";\r\nimport { useDisplayMBOrder } from \"../../../data/trading/mainBoard/hooks/useDisplayMainBoard\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { ViewOrder } from \"../../../data/trading/orders/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { DisplayOrderMainAttributes, DiplayOrderMod, } from \"./DisplayOrderMainAttributes\";\r\nimport { DisplayOrderLogData } from \"./DisplayOrderLogData\";\r\nimport { ExpansionPanel, ExpansionPanelSummary, Typography, Grid, IconButton } from \"@material-ui/core\";\r\nimport { DisplayAttributes } from \"./attributes/DisplayAttributes\";\r\nimport { useOrderPrinter } from \"../../../data/trading/orderBook/hooks/useOrderPrinter\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\n//import PrintIcon from \"@material-ui/icons/PrintOutlined\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\n//import { useAuth } from \"../../../data/auth/hooks\";\r\n//import { useConfirmOrder } from \"../../../data/trading/orders/hooks/useOrderConfirmation\";\r\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\r\nimport { useTheme } from '@material-ui/core/styles';\r\n\r\nexport interface DisplayMBOrderProps {\r\n\t//\tid: string;\r\n\tid?: string;\r\n\tdisplayMod: DiplayOrderMod;\r\n\tenablePrint?: boolean;\r\n\t//\tcancel?: () => void;\r\n}\r\n\r\n\r\nexport const DisplayOrder: React.FunctionComponent = ({\r\n\tid,\r\n\tdisplayMod,\r\n\tenablePrint,\r\n\t//\tcancel,\r\n}) => {\r\n\tconst order = useDisplayMBOrder(id);\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst [print, fetchState] = useOrderPrinter(order);\r\n\r\n\tconst theme = useTheme();\r\n\tconst screenExtraSmall = useMediaQuery(theme.breakpoints.only('xs'));\r\n\r\n\t//\tconst [state, confirmOrder] = useConfirmOrder();\r\n\t///\tconst [auth] = useAuth();\r\n\r\n\treturn !order ? (\r\n\t\t<>{\"loading placeholder\"}\r\n\t) : (\r\n\r\n\t\t\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{/* auth.status === \"successful\" && auth.user.roleCode === \"MEMTRADER\" && order.ordStatus ==='2' && (\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{getString(\"orderConfirmQuestion\")}\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\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t confirmOrder(id)}\r\n\t\t\t\t\t\t\t\tdisabled={state.type !== \"not-started\"}\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t{getString(\"orderCancelQuestionYes\")}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\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\t{/*\t\t\t\t\t */}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t{/*\t\t\t\t\t */}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t{getString(\"tableBasciInfo\")}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t{enablePrint && (\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\r\n\t\t\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\r\n\t\t\t\t\t\t\t\t{fetchState.type !== \"not-started\" ? getString(\"pleaseWait\") : null}\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\t{/*\t\t\t\t */}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t{/*\t\t\t\t */}\r\n\t\t\t\t{!screenExtraSmall && ()}\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport const useViewOrder = (displayMod: DiplayOrderMod, enablePrint?: boolean) => {\r\n\tconst showWithDrawer = React.useContext(DisplayDrawerContext);\r\n\treturn React.useCallback(\r\n\t\t(order: ViewOrder) => showWithDrawer(),\r\n\t\t[showWithDrawer, displayMod]\r\n\t);\r\n};\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport ViewIcon from \"@material-ui/icons/InputOutlined\";\r\nimport ReplyIcon from \"@material-ui/icons/ReplyOutlined\";\r\nimport { ViewOrder } from \"../../../data/trading/orders/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { MaterialTableProps } from \"material-table\";\r\nimport { useViewOrder } from \"../orders/DisplayOrder\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { getOrderEditLocation, OrdersEditParts } from \"./Locations\";\r\nimport { OrdersEditAction } from \"../../../data/trading/orders/types\";\r\nimport { DiplayOrderMod } from \"../orders/DisplayOrderMainAttributes\";\r\n\r\nexport function useOrderActions() {\r\n\t// onShowOrder?: (order: ViewOrder) => void,\r\n\t// onReplayToOrder?: (order: ViewOrder) => void\r\n\tconst { getString } = useContext(LocalizationContext);\r\n\tconst onShowMBOrder = useViewOrder(DiplayOrderMod.PublicData);\r\n\tconst onReplayToOrder = useReplyMBOrder();\r\n\r\n\treturn useMemo(() => {\r\n\t\tconst result: MaterialTableProps[\"actions\"] = [\r\n\t\t\t{\r\n\t\t\t\ticon: () => ,\r\n\t\t\t\ttooltip: getString(\"orderActView\"),\r\n\t\t\t\tonClick: (event, rowData) => onShowMBOrder(rowData as ViewOrder),\r\n\t\t\t},\r\n\t\t\trow => ({\r\n\t\t\t\ticon: () => ,\r\n\t\t\t\ttooltip: getString(\"orderActReply\"),\r\n\t\t\t\tonClick: (event, rowData) => onReplayToOrder(rowData as ViewOrder),\r\n\t\t\t\thidden: row.canReplace !== 1,\r\n\t\t\t}),\r\n\t\t];\r\n\t\treturn result;\r\n\t}, [onShowMBOrder, onReplayToOrder, getString]);\r\n}\r\n\r\nexport const useReplyMBOrder = () => {\r\n\tconst history = useHistory();\r\n\treturn React.useCallback(\r\n\t\t(order: ViewOrder) =>\r\n\t\t\thistory.push(\r\n\t\t\t\tgetOrderEditLocation(OrdersEditAction.Replay, OrdersEditParts.BasicInfo, order.ordId)\r\n\t\t\t),\r\n\t\t[history]\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport { Grid, Paper, Button } from \"@material-ui/core\";\r\nimport { OrderSideSelect } from \"./OrderSideSelect\";\r\nimport { DateInput } from \"../../components/common/DateInput\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { ProductSelect } from \"../../components/listing/ProductSelect\";\r\nimport { OrderFilter } from \"../../../data/models\";\r\nimport { OrderStatusSelect } from \"../../components/common/OrderStatusSelect\";\r\nimport { ClientSelect } from \"../../components/listing/ClientSelect\";\r\nimport { useAuth } from \"../../../data/auth/hooks\";\r\nimport { isValidDate } from \"../../../core/util/functions\";\r\nimport { OrderFilterChipsComponent } from \"./OrderFilterChips\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { OrderMarketSelect } from \"./OrderMarketSelect\";\r\nimport { EmployeeSelect } from \"../../components/listing/EmployeeSelect\";\r\n\r\nexport enum OrderFilterEditorType {\r\n\tBasic = 0,\r\n\tExtended = 1,\r\n\tFull = 2,\r\n}\r\n\r\ninterface OrderFilterEditorProps {\r\n\tfilter?: OrderFilter;\r\n\teditFilter: (prop: keyof OrderFilter, value: any) => void;\r\n\tsave: () => void;\r\n\ttype: OrderFilterEditorType;\r\n\treset?: () => void;\r\n}\r\n\r\nexport const OrderFilterEditor: React.FunctionComponent = ({\r\n\tfilter,\r\n\teditFilter,\r\n\tsave,\r\n\ttype,\r\n\treset,\r\n}) => {\r\n\tconst showWithDrawer = React.useContext(DisplayDrawerContext);\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst [auth] = useAuth();\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t{type >= OrderFilterEditorType.Extended && (\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t editFilter(\"side\", e.target.value)}\r\n\t\t\t\t\t\t\tside={filter?.side}\r\n\t\t\t\t\t\t\tnullable\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\t\r\n\t\t\t\t\t editFilter(\"market\", e.target.value)}\r\n\t\t\t\t\t\tmarket={filter?.market}\r\n\t\t\t\t\t\tnullable\r\n\t\t\t\t\t/>\r\n\t\t\t\t\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\teditFilter(\"fromDate\", isValidDate(date) ? date.toISOString() : undefined);\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\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\teditFilter(\"toDate\", isValidDate(date) ? date.toISOString() : undefined)\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\t\r\n\t\t\t\t\t prod.prodId === filter?.product?.prodId}\r\n\t\t\t\t\t\tonChangeItem={prod => {\r\n\t\t\t\t\t\t\teditFilter(\"product\", prod);\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\t{type >= OrderFilterEditorType.Extended &&\r\n\t\t\t\t\tauth.status === \"successful\" &&\r\n\t\t\t\t\tauth.user.userIsEmployee === 1 && (\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t client.cliId === filter?.client?.cliId}\r\n\t\t\t\t\t\t\t\tonChangeItem={client => editFilter(\"client\", client)}\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{type >= OrderFilterEditorType.Extended && (\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t status.ftValue === filter?.orderStatus?.ftValue}\r\n\t\t\t\t\t\t\tonChangeItem={status => {\r\n\t\t\t\t\t\t\t\teditFilter(\"orderStatus\", status);\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\t{type >= OrderFilterEditorType.Full && (\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t employee.empId === filter?.employee?.empId}\r\n\t\t\t\t\t\t\tonChangeItem={employee => {\r\n\t\t\t\t\t\t\t\teditFilter(\"employee\", employee);\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\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\tsave();\r\n\t\t\t\t\t\t\t\tshowWithDrawer(undefined);\r\n\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t{getString(\"orderFilterConfirm\")}\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};\r\n\r\nexport const OrderFilterChips = OrderFilterChipsComponent;\r\n","import { Theme, makeStyles, createStyles } from \"@material-ui/core\";\r\n\r\nexport const useOrderTableStyles = makeStyles((theme: Theme) => {\r\n\treturn createStyles({\r\n\t\tcellHasTooltip: {\r\n\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\tdisplay: \"flex\",\r\n\t\t\tjustifyContent: \"space-between\",\r\n\t\t\t\"& > svg\": {\r\n\t\t\t\twidth: \"12px\",\r\n\t\t\t\tmarginLeft: \"5px\",\r\n\t\t\t\tdisplay: \"inline\",\r\n\t\t\t\t// color: theme.palette.info.dark,\r\n\t\t\t},\r\n\t\t},\r\n\t\tlongCell: {\r\n\t\t\twhiteSpace: \"nowrap\",\r\n\t\t},\r\n\t\tvalueLabel: {\r\n\t\t\tdisplay: \"flex\",\r\n\t\t\tjustifyContent: \"space-between\",\r\n\t\t\t\"& > span:not(:first-child)\": {\r\n\t\t\t\tmarginLeft: \"5px\",\r\n\t\t\t},\r\n\t\t},\r\n\t});\r\n});\r\n\r\n\r\n","import React from \"react\";\r\nimport { ViewOrder } from \"../../../data/trading/orders/types\";\r\nimport { Typography } from \"@material-ui/core\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { useOrderTableStyles } from \"./styles\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport InfoOutlinedIcon from \"@material-ui/icons/InfoOutlined\";\r\n\r\nexport interface RenderOrderType {\r\n\t(order: ViewOrder): React.ReactNode;\r\n}\r\n\r\nconst createRenderer = (Component: OrderDisplayComponentType): RenderOrderType => order => (\r\n\t\r\n);\r\n\r\nexport const TooltipColumn: React.FunctionComponent<{\r\n\tdisplayText: React.ReactNode;\r\n\ttooltip?: React.ReactNode;\r\n\ttypography?: boolean;\r\n\thideIcon?: boolean;\r\n}> = ({ displayText, tooltip, typography, hideIcon }) => {\r\n\tconst styles = useOrderTableStyles();\r\n\tconst tooltipElement =\r\n\t\ttypography && tooltip ? {tooltip} : tooltip;\r\n\r\n\treturn tooltip ? (\r\n\t\t\r\n\t\t\t\t{displayText}\r\n\t\t\r\n\t) : (\r\n\t\t<>{displayText}\r\n\t);\r\n};\r\n\r\nexport const TooltipElises: React.FunctionComponent<{ text: string }> = ({ text }) => {\r\n\tconst tooltipElement = {text};\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t{text}\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n\r\ninterface OrderDisplayComponentProps {\r\n\torder: ViewOrder;\r\n}\r\n\r\ntype OrderDisplayComponentType = React.FunctionComponent;\r\n\r\n\r\nexport const OrderPriceDisplay: OrderDisplayComponentType = ({ order }) => {\r\n\tconst { getString, getFormatedNumberString, getFormatedNumberString4 } = React.useContext(LocalizationContext);\r\n\tconst styles = useOrderTableStyles();\r\n\tconst tooltip = (\r\n\t\t<>\r\n\t\t\t
\r\n\t\t\t\t{getString(\"orderPrice\")}\r\n\t\t\t\t{getFormatedNumberString(order.price, true)}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"orderPriceEur\")}\r\n\t\t\t\t{getFormatedNumberString4(order.priceEur, true)}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"orderPriceWithVat\")}\r\n\t\t\t\t{getFormatedNumberString(order.priceWithVat, true)}\r\n\t\t\t
\r\n\t\t\r\n\t);\r\n\treturn (\r\n\t\t\r\n\t);\r\n};\r\n\r\nconst maxQualityDisplay = 3;\r\n\r\nexport const OrderQualityDisplay: OrderDisplayComponentType = ({ order }) => {\r\n\tconst qualityLines = order.quality ? order.quality.split(\"\\r\\n\") : [];\r\n\tconst styles = useOrderTableStyles();\r\n\tconst qualityRender = qualityLines.map(mapQualityLine(styles));\r\n\tif (qualityLines.length <= maxQualityDisplay) {\r\n\t\treturn <>{qualityRender};\r\n\t}\r\n\r\n\tconst firstTwoRows = {qualityLines.splice(0, maxQualityDisplay).map(mapQualityLine(styles))};\r\n\r\n\treturn ;\r\n};\r\n\r\nconst mapQualityLine = (styles: any) => (qualityLine: string, index: number) => (\r\n\t
\r\n\t\t{qualityLine}\r\n\t
\r\n);\r\n\r\nexport const OrderClientDisplay: OrderDisplayComponentType = ({ order }) => (\r\n\t\r\n);\r\n\r\nconst tunrocateString = (text: string, maxChars: number) => {\r\n\tconst turnocate = text.length > maxChars;\r\n\treturn {\r\n\t\tturnocate,\r\n\t\ttext: turnocate ? `${text.substring(0, maxChars - 3)}...` : text,\r\n\t};\r\n};\r\n\r\nexport interface TurnocateTextProps {\r\n\ttext: string;\r\n\tmaxChars: number;\r\n}\r\n\r\nexport const TurnocateText: React.FunctionComponent = ({ text, maxChars }) => {\r\n\tconst turnocatedName = tunrocateString(text, maxChars);\r\n\r\n\treturn turnocatedName.turnocate ? (\r\n\t\t\r\n\t) : (\r\n\t\t<>{text}\r\n\t);\r\n};\r\n\r\nexport const renderOrderPrice = createRenderer(OrderPriceDisplay);\r\nexport const renderQuality = createRenderer(OrderQualityDisplay);\r\nexport const renderClient = createRenderer(OrderClientDisplay);\r\n","import React from \"react\";\r\nimport { ViewOrder } from \"../../../data/trading/orders/types\";\r\nimport { OrderSide } from \"../../../data/models\";\r\nimport { useOrderSideOptionsTranslator } from \"../../../data/trading/orders/hooks/useOrderSideOptions\";\r\nimport { makeStyles, createStyles } from \"@material-ui/core\";\r\n\r\nexport const useOrderRowColor = () => {\r\n const sideTranslator = useOrderSideOptionsTranslator();\r\n return React.useCallback((order: ViewOrder) => ({\r\n backgroundColor: order.side === sideTranslator(OrderSide.Sell) ? getSideColor(OrderSide.Sell) : getSideColor(OrderSide.Buy)\r\n }), [sideTranslator]);\r\n};\r\n\r\nexport const getSideColor = (side: OrderSide) => side === OrderSide.Sell ? \"#ffebee\" : \"#e1f5fe\"\r\n\r\nexport const useOrderSideStyles = makeStyles(() => {\r\n\treturn createStyles({\r\n\t\tsell: {\r\n\t\t\tbackground: getSideColor(OrderSide.Sell),\r\n\t\t},\r\n\t\tbuy: {\r\n\t\t\tbackground: getSideColor(OrderSide.Buy),\r\n\t\t},\r\n\t});\r\n});\r\n\r\n","import React from \"react\";\r\nimport { ViewOrder } from \"../../../data/trading/orders/types\";\r\nimport {\r\n PaginationTable,\r\n PaginationDataProps,\r\n} from \"../../components/common/PagginationTable\";\r\nimport { useOrderActions } from \"./useOrderActions\";\r\nimport { useOrderColumns } from \"./useOrderColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\nimport { useOrderRowColor } from \"../orders/useOrderRowColor\";\r\n\r\nexport interface OrderTableProps {\r\n // onShowOrder?: (order: ViewOrder) => void;\r\n // onReplayToOrder?: (order: ViewOrder) => void;\r\n userAccessRights: AccessRights;\r\n getData: () => void;\r\n}\r\n\r\ntype OrderTablePropsType = OrderTableProps & PaginationDataProps;\r\n\r\nconst OrdersTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n getData,\r\n ...tableProps\r\n}) => {\r\n const actions = useOrderActions();\r\n const columns = useOrderColumns();\r\n const rowStyle = useOrderRowColor()\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={getData}\r\n // immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n actions={actions}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n rowStyle\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default OrdersTable;\r\n","import { ViewOrder } from \"../../../data/trading/orders/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\nimport { renderOrderPrice, TooltipElises } from \"../orders/columRenderers\";\r\nimport { useOrderMarketOptionsTranslator } from \"../../../data/trading/orders/hooks/useOrderMarketOptions\";\r\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\r\nimport { useTheme } from '@material-ui/core/styles';\r\n\r\nexport const useOrderColumns = () => {\r\n\tconst { getString, getFormatedNumberString } = React.useContext(LocalizationContext);\r\n\tconst marketTranslator = useOrderMarketOptionsTranslator();\r\n\r\n\tconst theme = useTheme();\r\n\tconst screenExtraSmall = useMediaQuery(theme.breakpoints.only('xs'));\r\n\r\n\treturn React.useMemo(\r\n\t\t() => [\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"orderTimeReceived\"),\r\n\t\t\t\trender: order => order.timeReceived,\r\n\t\t\t\tsorting: false,\r\n\t\t\t\twidth: \"160px\",\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\tmaxWidth: \"160px\",\r\n\t\t\t\t\tminWidth: \"160px\",\r\n\t\t\t\t\twidth: \"160px\",\r\n\t\t\t\t\tpaddingRight: 0,\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\tmaxWidth: \"160px\",\r\n\t\t\t\t\tminWidth: \"160px\",\r\n\t\t\t\t\twidth: \"160px\",\r\n\t\t\t\t\tpaddingRight: 0,\r\n\t\t\t\t},\r\n\t\t\t\thidden: screenExtraSmall,\r\n\t\t\t\t\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"orderProduct\"),\r\n\t\t\t\trender: order => (\r\n\t\t\t\t\t\r\n\t\t\t\t),\r\n\t\t\t\tsorting: false,\r\n\t\t\t\twidth: \"125px\",\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\tmaxWidth: \"125px\",\r\n\t\t\t\t\tminWidth: \"110px\",\r\n\t\t\t\t\twidth: \"125px\",\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextOverflow: \"ellipsis\",\r\n\t\t\t\t\toverflowX: \"hidden\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\tmaxWidth: \"125px\",\r\n\t\t\t\t\tminWidth: \"110px\",\r\n\t\t\t\t\twidth: \"125px\",\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextOverflow: \"ellipsis\",\r\n\t\t\t\t\toverflowX: \"hidden\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"orderPrice\"),\r\n\t\t\t\trender: renderOrderPrice,\r\n\t\t\t\tsorting: false,\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"orderQty\"),\r\n\t\t\t\trender: order => `${getFormatedNumberString(order.qtyLeft || order.qty)} ${order.unit}`,\r\n\t\t\t\tsorting: false,\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"orderMarket\"),\r\n\t\t\t\trender: order => marketTranslator(order.market),\r\n\t\t\t\tsorting: false,\r\n\t\t\t\twidth: \"80px\",\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\tmaxWidth: \"80px\",\r\n\t\t\t\t\tminWidth: \"80px\",\r\n\t\t\t\t\twidth: \"80px\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\tmaxWidth: \"80px\",\r\n\t\t\t\t\tminWidth: \"80px\",\r\n\t\t\t\t\twidth: \"80px\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t\thidden: screenExtraSmall,\r\n\t\t\t},\r\n\t\t],\r\n\t\t[getString, marketTranslator, getFormatedNumberString, screenExtraSmall]\r\n\t) as Column[];\r\n};\r\n","import { OrderFilter } from \"../../../models\";\r\nimport { ViewOrder, GetOrdersParams } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nconst getOrdersWebApi = (\r\n user: User,\r\n page?: number,\r\n itemsPerPage?: number,\r\n filter?: OrderFilter,\r\n defaultOrderStatus?: number,\r\n) => {\r\n const params: GetOrdersParams = {\r\n userid: user.userId,\r\n side: filter?.side,\r\n prodid: filter?.product?.prodId,\r\n fromrow: page && itemsPerPage ? page * itemsPerPage : 0,\r\n numofrows: itemsPerPage,\r\n cliprsid: undefined,\r\n status: filter?.orderStatus?.ftValue || defaultOrderStatus,\r\n cliid: filter?.client?.cliId,\r\n empid: filter?.employee?.empId,\r\n datefrom: getParamsDateString(filter?.fromDate),\r\n dateto: getParamsDateString(filter?.toDate),\r\n market: filter?.market,\r\n };\r\n\r\n return webApiWithResponse({\r\n method: \"GET\",\r\n url: \"order/getorderlist\",\r\n params,\r\n });\r\n};\r\n\r\nexport default getOrdersWebApi;\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getOrders from \"../api/getOrders\";\r\nimport { PageDataStatus, OrderFilter, PageData } from \"../../../models\";\r\nimport { ViewOrder } from \"../types\";\r\n\r\nexport const getOrdersThunk = (\r\n\tpageNumber?: number,\r\n\titemsPerPage?: number,\r\n\tfilter?: OrderFilter,\r\n\tdefaultStatus?: number\r\n): ThunkType | undefined>> => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst user = store.data.auth.current.user;\r\n\tconst ordersResponse = await dispatch(getOrders(user, pageNumber, itemsPerPage, filter, defaultStatus));\r\n\r\n\tif (!ordersResponse || ordersResponse.resCode !== \"OK\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\treturn {\r\n\t\tcurrentPageData: ordersResponse.obj,\r\n\t\ttotalCount: Number(ordersResponse.resDesc) || 0,\r\n\t\tstatus: PageDataStatus.DataCurrent,\r\n\t};\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadMainBoard } from \"../thunks/loadMainBoard\";\r\nimport { ViewOrder } from \"../../orders/types\";\r\nimport { OrderSide, PageData } from \"../../../../data/models\";\r\nimport { invalidateOrders } from \"../ordersDataSlice\";\r\n\r\nexport const useMainBoardData = (side: OrderSide) => {\r\n\tconst pageData = useSelector | undefined>(\r\n\t\ts => s.data.trading.mainBoard.currentPage[side]\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchLoadAMBPage = React.useCallback(() => dispatch(loadMainBoard(side)), [dispatch, side]);\r\n\r\n\tconst dispatchInvalidateOrders = React.useCallback(() => dispatch(invalidateOrders()), [dispatch]);\r\n\r\n\treturn [pageData, dispatchLoadAMBPage, dispatchInvalidateOrders] as [typeof pageData, typeof dispatchLoadAMBPage, typeof dispatchInvalidateOrders];\r\n};\r\n\r\nexport const useInvalidateMainBoard = () => {\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchInvalidateOrders = React.useCallback(() => dispatch(invalidateOrders()), [dispatch]);\r\n\r\n\treturn [dispatchInvalidateOrders] as [typeof dispatchInvalidateOrders];\r\n}\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { setOrders, invalidateSideOrders } from \"../ordersDataSlice\";\r\nimport { setOrdersIndex } from \"../ordersUXSlice\";\r\nimport { OrderFilter, OrderSide, PageIndex } from \"../../../models\";\r\nimport { getOrdersThunk } from \"../../orders/thunks/getOrdersThunk\";\r\n\r\nexport const loadMainBoard = (side: OrderSide): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tconst { pageNumber, itemsPerPage } = store.ux.trading.mainBoard.index[side];\r\n\tconst { filter } = store.ux.trading.mainBoard;\r\n\r\n\tconst sideFilter: OrderFilter = {\r\n\t\t...filter,\r\n\t\tside\r\n\t}\r\n\tconst pagedOrders = await dispatch(getOrdersThunk(pageNumber, itemsPerPage, sideFilter, -1));\r\n\r\n\tif (pagedOrders) {\r\n\t\tdispatch(setOrders({\r\n\t\t\tside,\r\n\t\t\tvalue: pagedOrders\r\n\t\t}));\r\n\t}\r\n};\r\n\r\nexport const setOrdersIndexThunk = (side: OrderSide, value: PageIndex): ThunkType => dispatch => {\r\n\tdispatch(setOrdersIndex({\r\n\t\tside,\r\n\t\tvalue,\r\n\t}));\r\n\tdispatch(invalidateSideOrders(side));\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { resetOrderIdices } from \"../ordersUXSlice\";\r\nimport { OrderSide, PageIndex } from \"../../../../data/models\";\r\nimport { setOrdersIndexThunk } from \"../thunks/loadMainBoard\";\r\n\r\nexport const useMainBoardIndex = (side: OrderSide) => {\r\n\tconst pageIndex = useSelector(s => s.ux.trading.mainBoard.index[side]);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchSetIndex = React.useCallback(\r\n\t\t(index: PageIndex) => dispatch(setOrdersIndexThunk(side, index)),\r\n\t\t[dispatch, side]\r\n\t);\r\n\tconst dispatchResetIndex = React.useCallback(() => dispatch(resetOrderIdices(side)), [dispatch, side]);\r\n\r\n\treturn [pageIndex, dispatchSetIndex, dispatchResetIndex] as [\r\n\t\ttypeof pageIndex,\r\n\t\ttypeof dispatchSetIndex,\r\n\t\ttypeof dispatchResetIndex\r\n\t];\r\n};\r\n","import { useCopiedState } from \"../../../../core/util/hooks\";\r\nimport { OrderFilter } from \"../../../models\";\r\nimport { setFilter, removeFilter, initialState } from \"../ordersUXSlice\";\r\nimport { invalidateOrders } from \"../ordersDataSlice\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport React from \"react\";\r\n\r\nexport const useMainBoardFilter = () => {\r\n\tconst [storeFilter] = useCurrentMainBoardFilter();\r\n\tconst [filter, editFilter, changeState, setCurrentFilter] = useCopiedState(storeFilter);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchSetFilter = React.useCallback(() => {\r\n\t\tdispatch(setFilter(filter!));\r\n\t\tdispatch(invalidateOrders());\r\n\t}, [dispatch, filter]);\r\n\r\n\tconst dispatchResetFilter = React.useCallback(() => {\r\n\t\tsetCurrentFilter(initialState.filter)\r\n\t}, [setCurrentFilter]);\r\n\r\n\treturn [filter, editFilter, dispatchSetFilter, changeState, dispatchResetFilter] as [\r\n\t\ttypeof filter,\r\n\t\ttypeof editFilter,\r\n\t\ttypeof dispatchSetFilter,\r\n\t\ttypeof changeState,\r\n\t\ttypeof dispatchResetFilter,\r\n\t];\r\n};\r\n\r\nexport const useCurrentMainBoardFilter = () => {\r\n\tconst filter = useSelector(store => store.ux.trading.mainBoard.filter);\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchRemoveFilter = React.useCallback(\r\n\t\t(type: keyof OrderFilter) => {\r\n\t\t\tdispatch(removeFilter(type));\r\n\t\t\tdispatch(invalidateOrders());\r\n\t\t},\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\treturn [filter, dispatchRemoveFilter] as [typeof filter, typeof dispatchRemoveFilter];\r\n};\r\n","import React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { useOrderSideOptions } from \"../../../data/trading/orders/hooks/useOrderSideOptions\";\r\nimport { TextField, MenuItem, TextFieldProps } from \"@material-ui/core\";\r\nimport { OrderSide } from \"../../../data/models\";\r\n\r\ninterface OrderSideSelectProps {\r\n\tside?: OrderSide;\r\n\thandleChange: (event: React.ChangeEvent) => void;\r\n\tdisabled?: boolean;\r\n\tnullable?: boolean;\r\n\tclasses?: TextFieldProps['classes']\r\n}\r\n\r\nexport const OrderSideSelect: React.FunctionComponent = ({\r\n\tside,\r\n\thandleChange,\r\n\tdisabled,\r\n\tnullable,\r\n\tclasses,\r\n}) => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst options = useOrderSideOptions();\r\n\tconst enchanchedOptions = React.useMemo(() => {\r\n\t\treturn !nullable ? options : [\r\n\t\t\t{\r\n\t\t\t\tlabel: \"--\",\r\n\t\t\t\tvalue: \"\",\r\n\t\t\t},\r\n\t\t\t...options\r\n\t\t]\r\n\t}, [nullable, options])\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t{enchanchedOptions.map(option => (\r\n\t\t\t\t\r\n\t\t\t\t\t{option.label}\r\n\t\t\t\t\r\n\t\t\t))}\r\n\t\t\r\n\t);\r\n};\r\n","import { useSelector } from \"react-redux\";\r\nimport { StoreType } from \"../../../core/store/reducers\";\r\nimport { OrderStatus } from \"../../models\";\r\n\r\nconst getStatusLabel = (status?: OrderStatus) => (status ? status.ftDescr : \"\");\r\n\r\nexport const useOrderStatuses = () => {\r\n\tconst statuses = useSelector(store => store.data.initialData.orderStatuses);\r\n\r\n\treturn [statuses, getStatusLabel] as [typeof statuses, typeof getStatusLabel];\r\n};\r\n","import React from \"react\";\r\nimport { useOrderStatuses } from \"../../../data/initialData/hooks/useOrderStatuses\";\r\nimport { OrderStatus } from \"../../../data/models\";\r\nimport {\r\n AutocompleteSelect,\r\n AutocompleteSelectType,\r\n} from \"./AutocompleteSelect\";\r\n\r\ntype RegionSelectPropsType = Omit<\r\n AutocompleteSelectType,\r\n \"data\" | \"getLabel\"\r\n>;\r\n\r\n\r\nexport const OrderStatusSelect: React.FunctionComponent = (\r\n props\r\n) => {\r\n const [statuses, renderStatus] = useOrderStatuses();\r\n\r\n return (\r\n \r\n data={statuses}\r\n getLabel={renderStatus}\r\n {...(props as any)}\r\n />\r\n );\r\n};\r\n","import React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { useOrderMarketOptions } from \"../../../data/trading/orders/hooks/useOrderMarketOptions\";\r\nimport { TextField, MenuItem } from \"@material-ui/core\";\r\nimport { OrderMarkt } from \"../../../data/trading/orders/types\";\r\n\r\ninterface OrderMarketSelectProps {\r\n\tmarket?: OrderMarkt;\r\n\thandleChange: (event: React.ChangeEvent) => void;\r\n\tdisabled?: boolean;\r\n\tnullable?: boolean;\r\n}\r\n\r\nexport const OrderMarketSelect: React.FunctionComponent = ({\r\n\tmarket,\r\n\thandleChange,\r\n\tdisabled,\r\n\tnullable,\r\n}) => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst options = useOrderMarketOptions();\r\n\tconst enchanchedOptions = React.useMemo(() => {\r\n\t\treturn !nullable ? options : [\r\n\t\t\t{\r\n\t\t\t\tlabel: \"--\",\r\n\t\t\t\tvalue: \"\",\r\n\t\t\t},\r\n\t\t\t...options\r\n\t\t]\r\n\t}, [nullable, options])\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t{enchanchedOptions.map(option => (\r\n\t\t\t\t\r\n\t\t\t\t\t{option.label}\r\n\t\t\t\t\r\n\t\t\t))}\r\n\t\t\r\n\t);\r\n};\r\n","export interface TradePricesChartData {\r\n tradeTime: Date,\r\n price: number,\r\n prodName: string,\r\n}\r\n\r\nexport enum ChartPeriod { \r\n Month = 30,\r\n ThreeMonts = 90,\r\n HalfYear = 130,\r\n Year = 365,\r\n FromYearBeggining = -1,\r\n All = -2,\r\n}","import React from \"react\";\r\nimport { Chip, Grid } from \"@material-ui/core\";\r\nimport { OrderFilter } from \"../../../data/models\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { useOrderSideOptionsTranslator } from \"../../../data/trading/orders/hooks/useOrderSideOptions\";\r\nimport { useOrderMarketOptionsTranslator } from \"../../../data/trading/orders/hooks/useOrderMarketOptions\";\r\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\r\nimport { useTheme } from '@material-ui/core/styles';\r\n\r\nexport const OrderFilterChipsComponent: React.FunctionComponent = ({\r\n\tfilter,\r\n\tremnoveFilter,\r\n}) => {\r\n\tconst { getDateString, getString } = React.useContext(LocalizationContext);\r\n\tconst sideTranslator = useOrderSideOptionsTranslator();\r\n\tconst marketTranslator = useOrderMarketOptionsTranslator();\r\n\r\n\tconst theme = useTheme();\r\n\tconst screenExtraSmall = useMediaQuery(theme.breakpoints.only('xs'));\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t{filter.side && !screenExtraSmall && (\r\n\t\t\t\t\r\n\t\t\t\t\t remnoveFilter(\"side\")}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\r\n\t\t\t)}\r\n\t\t\t{ filter.market !== undefined && typeof(filter.market) == 'number' && !screenExtraSmall && (\r\n\t\t\t\t\r\n\t\t\t\t\t remnoveFilter(\"market\")}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\r\n\t\t\t)} \r\n\t\t\t{filter.fromDate && !screenExtraSmall && (\r\n\t\t\t\t\r\n\t\t\t\t\t remnoveFilter(\"fromDate\")}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\r\n\t\t\t)}\r\n\t\t\t{filter.toDate && !screenExtraSmall && (\r\n\t\t\t\t\r\n\t\t\t\t\t remnoveFilter(\"toDate\")}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\r\n\t\t\t)}\r\n\t\t\t{filter.product && !screenExtraSmall && (\r\n\t\t\t\t\r\n\t\t\t\t\t remnoveFilter(\"product\")}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\r\n\t\t\t)}\r\n\t\t\t{filter.client && !screenExtraSmall && (\r\n\t\t\t\t\r\n\t\t\t\t\t remnoveFilter(\"client\")}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\r\n\t\t\t)}\r\n\t\t\t{filter.orderStatus && filter.orderStatus.ftDescr !== \"\" && !screenExtraSmall && (\r\n\t\t\t\t\r\n\t\t\t\t\t remnoveFilter(\"orderStatus\")}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\r\n\t\t\t)}\r\n\t\t\t{filter.employee && !screenExtraSmall && (\r\n\t\t\t\t\r\n\t\t\t\t\t remnoveFilter(\"employee\")}\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};\r\n\r\ninterface OrderFilterChipsProps {\r\n\tfilter: OrderFilter;\r\n\tremnoveFilter: (type: keyof OrderFilter) => void;\r\n}\r\n","import React from \"react\";\r\nimport FilterIcon from \"@material-ui/icons/FilterListOutlined\";\r\nimport { IconButton, Grid } from \"@material-ui/core\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport {\r\n\tuseMainBoardFilter,\r\n\tuseCurrentMainBoardFilter,\r\n} from \"../../../data/trading/mainBoard/hooks/useMainBoardFilter\";\r\nimport { OrderFilterEditor, OrderFilterEditorType, OrderFilterChips } from \"../orders/OrderFilterEditor\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\r\nimport { useTheme } from '@material-ui/core/styles';\r\n\r\nexport const MainBoarFilterButton: React.FunctionComponent = () => {\r\n\tconst showWithDrawer = React.useContext(DisplayDrawerContext);\r\n\tconst showFilter = React.useCallback(() => showWithDrawer(), [showWithDrawer]);\r\n\r\n\tconst theme = useTheme();\r\n\tconst screenExtraSmall = useMediaQuery(theme.breakpoints.only('xs'));\r\n\r\n\tconst [filter, remnoveFilter] = useCurrentMainBoardFilter();\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\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\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};\r\n\r\nconst MainBoarFilterEditor: React.FunctionComponent = () => {\r\n\tconst [filter, editFilter, save, , rest] = useMainBoardFilter();\r\n\treturn (\r\n\t\t\r\n\t);\r\n};\r\n","import { TradePricesChartData, ChartPeriod } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { webApi } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const getChartData = (user: User, prodid: string, numofdays: ChartPeriod) => {\r\n\treturn webApi({\r\n\t\tmethod: \"GET\",\r\n\t\turl: \"reporting/gettradepriceschartdata\",\r\n\t\tparams: {\r\n\t\t\tuserid: user.userId,\r\n\t\t\tprodid,\r\n\t\t\tnumofdays,\r\n\t\t},\r\n\t});\r\n};\r\n","import { getEditLocation } from \"../../../core/util/functions\";\r\nexport const orderBookLocation = \"/trading/orders\"\r\n\r\nexport enum OrdersEditParts {\r\n\tBasicInfo = \"basicinfo\",\r\n\tAttributes = \"attributes\",\r\n}\r\n\r\nexport const getOrderBookEditLocation = (\r\n\tpart: OrdersEditParts = OrdersEditParts.BasicInfo,\r\n\tproductId?: string,\r\n\tattributeId?: string\r\n) => getEditLocation(orderBookLocation, part, productId, attributeId);\r\n\r\nexport const baseEdit = getOrderBookEditLocation(\":editPart\" as any, \":orderId?\");\r\nexport const atributesEdit = getOrderBookEditLocation(\r\n\tOrdersEditParts.Attributes,\r\n\t\":orderId?\",\r\n\t\":attributeId?\"\r\n);","import React from \"react\";\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { ChartPeriod, TradePricesChartData } from \"../types\";\r\nimport { loadGraphData } from \"../thunks/loadGraphData\";\r\n\r\nexport const useGraphData = (graphId: string) => {\r\n\tconst dispatch = useDispatch();\r\n\tconst period = useSelector(s => s.data.trading.ticker.graphPeriod[graphId]);\r\n\tconst prodId = useSelector(s => s.ux.trading.ticker.graphProductId[graphId]);\r\n\tconst data = useSelector(\r\n\t\ts => s.data.trading.ticker.graphData[graphId || \"\"]\r\n\t);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (prodId) {\r\n\t\t\tdispatch(loadGraphData(graphId, prodId, period || ChartPeriod.Month));\r\n\t\t}\r\n\t}, [graphId, period, prodId, dispatch]);\r\n\r\n\treturn [data];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getChartData } from \"../api/getChartData\";\r\nimport { setGraphData } from \"../tickerDataSlice\";\r\nimport { ChartPeriod } from \"../types\";\r\n\r\nexport const loadGraphData = (graphId: string, prodid: string, period: ChartPeriod): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\" || !prodid) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tconst { user } = store.data.auth.current;\r\n\tconst graphData = await dispatch(getChartData(user, prodid, period));\r\n\r\n\tdispatch(\r\n\t\tsetGraphData({\r\n\t\t\tgraphId: graphId,\r\n\t\t\tdata: graphData || [],\r\n\t\t})\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { ChartPeriod } from \"../types\";\r\nimport { setGraphPeriod } from \"../tickerDataSlice\";\r\n\r\nexport const useGraphPeriod = (graphId: string) => {\r\n\tconst dispatch = useDispatch();\r\n\tconst period = useSelector(s => s.data.trading.ticker.graphPeriod[graphId || \"\"]);\r\n\r\n\tconst dispatchSetPeriod = React.useCallback(\r\n\t\t(newPeriod: ChartPeriod) => {\r\n\t\t\tif (graphId) {\r\n\t\t\t\tdispatch(\r\n\t\t\t\t\tsetGraphPeriod({\r\n\t\t\t\t\t\tgraphId,\r\n\t\t\t\t\t\tdata: newPeriod,\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\t[dispatch, graphId]\r\n\t);\r\n\r\n\treturn [period || ChartPeriod.Month, dispatchSetPeriod] as [typeof period, typeof dispatchSetPeriod];\r\n};\r\n","import React from \"react\";\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { setGraphProductId } from \"../tickerUXSlice\";\r\n\r\nexport const useGraphProduct = (graphId: string) => {\r\n\tconst dispatch = useDispatch();\r\n\tconst prodId = useSelector(\r\n\t\ts => s.ux.trading.ticker.graphProductId[graphId]\r\n\t);\r\n\r\n\tconst dispatchSetProduct = React.useCallback(\r\n\t\t(newPeriod?: string) => {\r\n\t\t\tdispatch(\r\n\t\t\t\tsetGraphProductId({\r\n\t\t\t\t\tgraphId,\r\n\t\t\t\t\tdata: newPeriod,\r\n\t\t\t\t})\r\n\t\t\t);\r\n\t\t},\r\n\t\t[dispatch, graphId]\r\n\t);\r\n\r\n\treturn [prodId, dispatchSetProduct] as [typeof prodId, typeof dispatchSetProduct];\r\n};\r\n","import React from \"react\";\r\nimport { CardContent, CardHeader, Card, Divider, Typography, Grid } from \"@material-ui/core\";\r\nimport { useGraphData } from \"../../../data/trading/ticker/hooks/useGraphData\";\r\nimport { useGraphPeriod } from \"../../../data/trading/ticker/hooks/useGraphPeriod\";\r\nimport { ToggleButton, ToggleButtonGroup } from \"@material-ui/lab\";\r\nimport { ChartPeriod } from \"../../../data/trading/ticker/types\";\r\nimport { CartesianGrid, Line, LineChart, XAxis, Tooltip, YAxis, ResponsiveContainer } from \"recharts\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { ProductSelect } from \"../../components/listing/ProductSelect\";\r\nimport { useGraphProduct } from \"../../../data/trading/ticker/hooks/useGraphProduct\";\r\n\r\nexport interface ProductGraphProps {\r\n\tgraphId: string;\r\n}\r\n\r\nexport const ProductGraph: React.FunctionComponent = ({ graphId }) => {\r\n\tconst { getString, getDateString, getDateTimeString, getFormatedNumberString } = React.useContext(\r\n\t\tLocalizationContext\r\n\t);\r\n\r\n\tconst [prodId, setProdId] = useGraphProduct(graphId);\r\n\tconst [data] = useGraphData(graphId);\r\n\tconst [period, setPeriod] = useGraphPeriod(graphId);\r\n\t\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t prod.prodId === prodId}\r\n\t\t\t\t\t\t\t\tonChangeItem={prod => {\r\n\t\t\t\t\t\t\t\t\tsetProdId(prod ? prod.prodId : undefined);\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\t\r\n\t\t\t\t\t\t\t setPeriod(v)}\r\n\t\t\t\t\t\t\t\tsize=\"small\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t1M\r\n\t\t\t\t\t\t\t\t3M\r\n\t\t\t\t\t\t\t\t6M\r\n\t\t\t\t\t\t\t\tYTD\r\n\t\t\t\t\t\t\t\t1Y\r\n\t\t\t\t\t\t\t\tAll\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\t\t\r\n\t\t\t\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\t getDateString(date, \"DD.MM.\")} />\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t [\r\n\t\t\t\t\t\t\t\tgetFormatedNumberString(value as any, true),\r\n\t\t\t\t\t\t\t\tgetString(\"orderPrice\"),\r\n\t\t\t\t\t\t\t]}\r\n//\t\t\t\t\t\t\tlabelFormatter={(date: any) => getDateTimeString(date)}\r\n\t\t\t\t\t\t\tlabelFormatter={(date: any) => getDateString(date)}\r\n\t\t\t\t\t\t/>\r\n\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\t);\r\n};\r\n","import { TradePricesChartData } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { webApi } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const getTickerData = (user: User) => {\r\n\treturn webApi({\r\n\t\tmethod: \"GET\",\r\n\t\turl: \"reporting/gettradepricestickerdata\",\r\n\t\tparams: {\r\n\t\t\tuserid: user.userId,\r\n\t\t},\r\n\t});\r\n};\r\n\r\n","import React from \"react\";\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { TradePricesChartData } from \"../types\";\r\nimport { loadTickerData } from \"../thunks/loadTickerData\";\r\n\r\nconst tickerLoaderInterval = 30000;\r\n\r\nexport const useTickerData = (shouldFetchData: boolean) => {\r\n\tconst dispatch = useDispatch();\r\n\tconst data = useSelector(\r\n\t\ts => s.data.trading.ticker.ticketData\r\n\t);\r\n\r\n\tconst startTickerFetcher = React.useCallback(\r\n\t\tcreateTickerFetcher(() => {\r\n\t\t\tconsole.log(\"Load ticker\");\r\n\t\t\tdispatch(loadTickerData());\r\n\t\t}),\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (shouldFetchData) {\r\n\t\t\treturn startTickerFetcher();\r\n\t\t}\r\n\t}, [startTickerFetcher, shouldFetchData]);\r\n\r\n\treturn [data];\r\n};\r\n\r\nconst createTickerFetcher = (loadTicker: () => void) => () => {\r\n\tloadTicker();\r\n\tconst interval = setInterval(loadTicker, tickerLoaderInterval);\r\n\treturn () => {\r\n\t\tclearInterval(interval);\r\n\t};\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getTickerData } from \"../api/getTickerData\";\r\nimport { setTicketData } from \"../tickerDataSlice\";\r\n\r\nexport const loadTickerData = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tconst { user } = store.data.auth.current;\r\n\tconst graphData = await dispatch(getTickerData(user));\r\n\r\n\tdispatch(setTicketData(graphData || []));\r\n};\r\n","import React from \"react\";\r\nimport { CardContent, Card, Typography } from \"@material-ui/core\";\r\nimport { useTickerData } from \"../../../data/trading/ticker/hooks/useTickerData\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport Ticker from \"react-ticker\";\r\nimport { usePageVisibility } from 'react-page-visibility'\r\n\r\nexport const PriceTicker: React.FunctionComponent = () => {\r\n\tconst { getDateString, getFormatedNumberString } = React.useContext(LocalizationContext);\r\n\tconst isVisiable = usePageVisibility()\r\n\tconst [data] = useTickerData(isVisiable);\r\n\tconst [move, setMove] = React.useState(true);\r\n\tconsole.log(\"Ticker visiable: \", isVisiable)\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{data && data.length > 0 && (\r\n\t\t\t\t\r\n\t\t\t\t\t setMove(false)}\r\n\t\t\t\t\t\tonMouseLeave={() => setMove(true)}\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t{({ index }) => {\r\n\t\t\t\t\t\t\t\tconst priceData = data[index % data.length];\r\n\t\t\t\t\t\t\t\treturn (\r\n\t\t\t\t\t\t\t\t\t<>\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\t{`${priceData.prodName} (${getDateString(priceData.tradeTime, \"DD.MM.\")}): ${getFormatedNumberString(priceData.price, true)}`}\r\n\t\t\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);\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\t);\r\n};\r\n","import React, { useContext } from \"react\";\r\nimport { Grid, CardContent, CardHeader, Card, Divider, Typography } from \"@material-ui/core\";\r\nimport OrdersTable from \"./OrdersTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { PageComponent } from \"../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { useMainBoardData } from \"../../../data/trading/mainBoard/hooks/useMainBoardData\";\r\nimport { useMainBoardIndex } from \"../../../data/trading/mainBoard/hooks/useMainBoardIndex\";\r\nimport { OrderSide, PageDataStatus } from \"../../../data/models\";\r\nimport { MainBoarFilterButton } from \"./MainBoardFilter\";\r\nimport { useNotificationHandler } from \"../../../core/notifications/hooks\";\r\nimport { ProductGraph } from \"./ProductGraph\";\r\nimport { PriceTicker } from \"./Ticker\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\n\r\nconst MainBoard: PageComponent = ({ userAccessRights }) => {\r\n\tconst pageStyles = usePageStyles();\r\n\tconst { getString } = useContext(LocalizationContext);\r\n\r\n\tconst [buyPageData, dispatchLoadBuyOrders, invalidateData] = useMainBoardData(OrderSide.Buy);\r\n\tconst [buyPageIndex, dispatchSetBuyIndex] = useMainBoardIndex(OrderSide.Buy);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (buyPageData && buyPageData.status === PageDataStatus.DataInvalidated) {\r\n\t\t\tdispatchLoadBuyOrders();\r\n\t\t}\r\n\t}, [dispatchLoadBuyOrders, buyPageData]);\r\n\r\n\tconst [sellPageData, dispatchLoadSellOrders] = useMainBoardData(OrderSide.Sell);\r\n\tconst [sellPageIndex, dispatchSetSellIndex] = useMainBoardIndex(OrderSide.Sell);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (sellPageData && sellPageData.status === PageDataStatus.DataInvalidated) {\r\n\t\t\tdispatchLoadSellOrders();\r\n\t\t}\r\n\t}, [dispatchLoadSellOrders, sellPageData]);\r\n\r\n\tReact.useEffect(\r\n\t\t() => () => {\r\n\t\t\tinvalidateData();\r\n\t\t},\r\n\t\t[]\r\n\t);\r\n\r\n\tuseNotificationHandler(\r\n\t\t\"OrderChanged\",\r\n\t\te => {\r\n\t\t\tconsole.log(\"OrderChanged\", e);\r\n\t\t\tinvalidateData();\r\n\t\t},\r\n\t\t[]\r\n\t);\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\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\taction={}\r\n\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\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t{getString(\"mainTableBid\")}\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\r\n\t\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\t{getString(\"mainTableAsk\")}\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\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\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\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 MainBoard;\r\n","import { EditOrder } from \"../types\";\r\nimport { createUseValidator } from \"../../../../core/util/hooks\";\r\nimport { ValidationState } from \"../../../../core/util/types\";\r\nimport moment from \"moment\";\r\nimport { OrderSide, Franco } from \"../../../models\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport React from \"react\";\r\nimport { countDecimals } from \"../../../../core/util/functions\";\r\n\r\nexport const orderValidationState: ValidationState = {\r\n\tuserId: true,\r\n\tclientId: true,\r\n\tprodId: true,\r\n\tside: true,\r\n\tqty: true,\r\n\tprice: true,\r\n\torderAttrList: true,\r\n\texpiryDate: true,\r\n\tgoodsReadyFrom: true,\r\n\tgoodsReadyTo: true,\r\n\tfranco: true,\r\n\tpayTypeId: true,\r\n};\r\n\r\nexport const maxExpiryDate = moment().add(30, \"day\").toDate();\r\n\r\nexport const useOrderValidator = () => {\r\n\r\n\tconst [isWhsRequired] = useOrderWarehouseRequired();\r\n\treturn createUseValidator>(\r\n\t\torderValidationState,\r\n\t\t(item, validation) => ({\r\n\t\t\t...validation,\r\n\t\t\texpiryDate:\r\n\t\t\t\titem.expiryDate !== undefined &&\r\n\t\t\t\t(moment(maxExpiryDate).isAfter(item.expiryDate) &&\r\n\t\t\t\t\tmoment(item.expiryDate).isSameOrAfter(new Date(),'day')),\r\n\t\t\torderAttrList:\r\n\t\t\t\titem.orderAttrList === undefined ||\r\n\t\t\t\titem.orderAttrList.every(\r\n\t\t\t\t\tatt => (att.manditory === 0 ) || att.attrValue !== undefined || att.attrValId !== undefined\r\n\t\t\t\t),\r\n//\t\t\torderAttrList:\r\n//\t\t\t\titem.orderAttrList === undefined ||\r\n//\t\t\t\titem.orderAttrList.every(\r\n//\t\t\t\t\tatt => (att.manditory === 0 && item.side !== OrderSide.Sell) || att.attrValue !== undefined || att.attrValId !== undefined\r\n//\t\t\t\t),\r\n\t\t\tlocCountryId: !!item.locCountryId || !isWhsRequired(item),\r\n\t\t\tlocRegionId: !!item.locRegionId || !isWhsRequired(item),\r\n\t\t\tlocDistrictId: !!item.locDistrictId || !isWhsRequired(item),\r\n\t\t\tlocCityId: !!item.locCityId || !isWhsRequired(item),\r\n\t\t\tlocWarehouseId: !!item.locWarehouseId || !isWhsRequired(item),\r\n\t\t\tprice: validation.price && !!item.price && countDecimals(item.price) <= 2,\r\n\t\t\tqty: validation.qty && !!item.qty && countDecimals(item.qty) === 0,\r\n\t\t\tminQty: !item.minQty ? true : countDecimals(item.minQty) === 0,\r\n\t\t\tgoodsReadyTo: item.goodsReadyTo !== undefined && moment(item.goodsReadyTo).isSameOrAfter(item.goodsReadyFrom,'day'),\r\n\t\t\tpaymentDays: !item.payTypeId || item.payTypeId!==\"00000001\" || (item.payTypeId===\"00000001\" && item.paymentDays!== undefined && !(item.paymentDays && item.paymentDays<0)) ? true : false ,\r\n//\t\t\tactive: item.active === 1,\r\n\t\t})\r\n\t)();\r\n};\r\n\r\n\r\nexport const useOrderWarehouseRequired = () => {\r\n\tconst francoList = useSelector(s => s.data.initialData.francoList);\r\n\r\n\tconst isWhsRequired = React.useCallback(\r\n\t\t(order?: EditOrder) => {\r\n\t\t\tif (!order) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\tconst franco = francoList.find(f => f.ftValue === order?.franco);\r\n\t\t\treturn (\r\n\t\t\t\tfranco &&\r\n\t\t\t\t((franco.ftType === 1 && order.side === OrderSide.Sell) ||\r\n\t\t\t\t\t(franco.ftType === 2 && order.side === OrderSide.Buy) ||\r\n\t\t\t\t\tfranco.ftType === 3)\r\n\t\t\t);\r\n\t\t},\r\n\t\t[francoList]\r\n\t);\r\n\r\n\treturn [isWhsRequired] as [typeof isWhsRequired];\r\n};\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { EditOrder } from \"../types\";\r\n\r\nexport const createOrderApi = (order: EditOrder) =>\r\n webApiWithResponse({\r\n method: \"POST\",\r\n url: \"order/neworder\",\r\n data: order\r\n });\r\n\r\nexport default createOrderApi;\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { EditOrder } from \"../types\";\r\n\r\nexport const updateOrderApi = (order: EditOrder, userid: string) =>\r\n webApiWithResponse({\r\n method: \"PUT\",\r\n url: \"order/updorder\",\r\n data: order,\r\n params: {\r\n userid\r\n }\r\n });\r\n\r\nexport default updateOrderApi;\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { EditOrder } from \"../types\";\r\n\r\nexport const modifyOrderApi = (order: EditOrder, userid: string) =>\r\n webApiWithResponse({\r\n method: \"PUT\",\r\n url: \"order/replaceorder\",\r\n data: order,\r\n params: {\r\n userid,\r\n }\r\n });\r\n\r\nexport default modifyOrderApi;\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { EditOrder } from \"../types\";\r\n\r\nexport const oppositeOrderApi = (order: EditOrder) =>\r\n webApiWithResponse({\r\n method: \"PUT\",\r\n url: \"order/oppositeorder\",\r\n data: order,\r\n params: {\r\n userid: order.userId\r\n }\r\n });\r\n\r\nexport default oppositeOrderApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { upsertOrder } from \"../thunks/upsertOrder\";\r\nimport { setNewOrderFetchState } from \"../../mainBoard/ordersDataSlice\";\r\nimport { EditOrder, OrdersEditAction, OrderUpsertResult } from \"../types\";\r\n\r\nexport const useOrderUpsert = (action: OrdersEditAction) => {\r\n\tconst fetchState = useSelector(\r\n\t\tstore => store.data.trading.mainBoard.newOrderFetchState\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchUpsertOrder: any = React.useCallback(\r\n\t\t(order: EditOrder) => dispatch(upsertOrder(action, order)),\r\n\t\t[dispatch, action]\r\n\t);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tdispatch(setNewOrderFetchState({ type: \"not-started\" }))\r\n\t}, [dispatch])\r\n\r\n\treturn [fetchState, dispatchUpsertOrder] as [typeof fetchState, (order: EditOrder) => Promise]\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { createOrderApi } from \"../api/createOrder\";\r\nimport { updateOrderApi } from \"../api/updateOrder\";\r\nimport { modifyOrderApi } from \"../api/modifyOrder\";\r\nimport { oppositeOrderApi } from \"../api/oppositeOrder\";\r\nimport { setNewOrderFetchState, invalidateOrders } from \"../../mainBoard/ordersDataSlice\";\r\nimport { EditOrder, OrdersEditAction, OrderUpsertResult } from \"../types\";\r\n\r\nexport const upsertOrder = (\r\n\taction: OrdersEditAction,\r\n\torder: EditOrder\r\n): ThunkType> => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn {\r\n\t\t\tstatus: \"ERROR\",\r\n\t\t\tmessage: \"USER NOT LOGED IN!\",\r\n\t\t};\r\n\t}\r\n\r\n\tdispatch(setNewOrderFetchState({ type: \"started\" }));\r\n\r\n\tvar { user } = store.data.auth.current;\r\n\tconst result =\r\n\t\taction === OrdersEditAction.Modify ? await dispatch(modifyOrderApi(order, user.userId))\r\n\t\t\t: action === OrdersEditAction.Verify ? await dispatch(updateOrderApi(order, user.userId))\r\n\t\t\t: action === OrdersEditAction.New ? await dispatch(createOrderApi(order))\r\n\t\t\t: await dispatch(oppositeOrderApi(order));\r\n\r\n\tif (result && result.resCode === \"OK\") {\r\n\t\tdispatch(setNewOrderFetchState({ type: \"successful\", result: result.resDesc }));\r\n\t\tdispatch(invalidateOrders());\r\n\t\treturn {\r\n\t\t\tstatus: \"CREATED\",\r\n\t\t\tnewId: result.resDesc,\r\n\t\t};\r\n\t} else if (result && result.resCode === \"NOFUNDS\") {\r\n\t\tdispatch(setNewOrderFetchState({ type: \"not-started\" }));\r\n\t\treturn {\r\n\t\t\tstatus: \"NOFUNDS\",\r\n\t\t\tmessage: result.resDesc,\r\n\t\t};\r\n\t} else {\r\n\t\tdispatch(setNewOrderFetchState({ type: \"error\", errorCode: result?.resCode }));\r\n\t\treturn {\r\n\t\t\tstatus: \"ERROR\",\r\n\t\t\tmessage: result?.resCode,\r\n\t\t};\r\n\t}\r\n};\r\n","import { useSelector } from \"react-redux\";\r\nimport { StoreType } from \"../../../core/store/reducers\";\r\nimport { OrderRecievedMethod } from \"../../models\";\r\n\r\nconst renderLabel = (item: OrderRecievedMethod) => `${item.ftDescr} (${item.descrAbr})`\r\n\r\nexport const useRecieveMethods = () => {\r\n\tconst orderRecieveMethods = useSelector(store => store.data.initialData.orderRecieveMethods);\r\n\r\n\treturn [orderRecieveMethods, renderLabel] as [typeof orderRecieveMethods, typeof renderLabel];\r\n};\r\n","import React from \"react\";\r\nimport { useRecieveMethods } from \"../../../data/initialData/hooks/useRecieveMethods\";\r\nimport { OrderRecievedMethod } from \"../../../data/models\";\r\nimport {\r\n AutocompleteSelect,\r\n AutocompleteSelectType,\r\n} from \"./AutocompleteSelect\";\r\n\r\ntype RegionSelectPropsType = Omit<\r\n AutocompleteSelectType,\r\n \"data\" | \"getLabel\"\r\n>;\r\n\r\nexport const OrderRecieveMethodSelect: React.FunctionComponent = (\r\n props\r\n) => {\r\n const [recieveMethods, renderLabel] = useRecieveMethods();\r\n\r\n return (\r\n \r\n data={recieveMethods}\r\n getLabel={renderLabel}\r\n {...(props as any)}\r\n />\r\n );\r\n};\r\n","import { useSelector } from \"react-redux\";\r\nimport { StoreType } from \"../../../core/store/reducers\";\r\nimport { Franco } from \"../../models\";\r\n\r\nconst renderLabel = (item: Franco) => `${item.ftDescrLong} (${item.ftDescr})`\r\n\r\nexport const useFrancoList = () => {\r\n\tconst francoList = useSelector(store => store.data.initialData.francoList);\r\n\r\n\treturn [francoList, renderLabel] as [typeof francoList, typeof renderLabel];\r\n};\r\n","import React from \"react\";\r\nimport { useFrancoList } from \"../../../data/initialData/hooks/useFrancoList\";\r\nimport { Franco } from \"../../../data/models\";\r\nimport {\r\n AutocompleteSelect,\r\n AutocompleteSelectType,\r\n} from \"./AutocompleteSelect\";\r\n\r\ntype RegionSelectPropsType = Omit<\r\n AutocompleteSelectType,\r\n \"data\" | \"getLabel\"\r\n>;\r\n\r\nexport const FrancoSelect: React.FunctionComponent = (\r\n props\r\n) => {\r\n const [francoList, renderLabel] = useFrancoList();\r\n\r\n return (\r\n \r\n data={francoList}\r\n getLabel={renderLabel}\r\n {...(props as any)}\r\n />\r\n );\r\n};\r\n","import { useSelector } from \"react-redux\";\r\nimport { StoreType } from \"../../../core/store/reducers\";\r\nimport { Guarantees } from \"../../models\";\r\n\r\nconst renderLabel = (item: Guarantees) => `${item.ftDescr} `;\r\n\r\nexport const useGuaranteesTypes = () => {\r\n const guarantees = useSelector(\r\n (store) => store.data.initialData.guarantees\r\n );\r\n\r\n return [guarantees, renderLabel] as [typeof guarantees, typeof renderLabel];\r\n};\r\n","import React from \"react\";\r\nimport { useGuaranteesTypes } from \"../../../data/initialData/hooks/useGuarantees\";\r\nimport { Guarantees } from \"../../../data/models\";\r\nimport { AutocompleteSelectType, AutocompleteSelect } from \"./AutocompleteSelect\";\r\n\r\n\r\ntype GuaranteesTypePropsType = Omit, \"data\" | \"getLabel\">;\r\n\r\nexport const GuaranteesTypeSelect: React.FunctionComponent = props => {\r\n\tconst [guaranteesType, renderLabel] = useGuaranteesTypes();\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\tdata={guaranteesType}\r\n\t\t\tgetLabel={renderLabel}\r\n\t\t\t{...(props as any)}\r\n\t\t/>\r\n\t);\r\n};\r\n\r\n","import { getEditLocation } from \"../../../core/util/functions\";\r\nimport { OrdersEditAction } from \"../../../data/trading/orders/types\";\r\nexport const mainBoardMLocation = \"/trading/mainpanelm\"\r\n\r\nexport enum OrdersEditParts {\r\n\tBasicInfo = \"basicinfo\",\r\n\tAttributes = \"attributes\",\r\n}\r\n\r\nexport const getOrderEditLocation = (\r\n\taction: OrdersEditAction = OrdersEditAction.New,\r\n\tpart: OrdersEditParts = OrdersEditParts.BasicInfo,\r\n\tproductId?: string,\r\n\tattributeId?: string\r\n) => getEditLocation(mainBoardMLocation, part, productId, attributeId, action);\r\n\r\nexport const baseEdit = getOrderEditLocation(\":action\" as any, \":editPart\" as any, \":orderId?\");\r\nexport const atributesEdit = getOrderEditLocation(\r\n\t\":action\" as any,\r\n\tOrdersEditParts.Attributes,\r\n\t\":orderId?\",\r\n\t\":attributeId?\"\r\n);\r\n\r\nexport enum SideOverviewParts {\r\n\tSell = \"sell\",\r\n\tBuy = \"buy\",\r\n}","import React from \"react\";\r\nimport { useDispatch } from \"react-redux\";\r\nimport { Attribute } from \"../types\";\r\nimport { getAttribute } from \"../thunks/loadAttribute\";\r\n\r\nexport const useAttribute = (attributeId?: string) => {\r\n\tconst displatch = useDispatch();\r\n\tconst [attribute, setAttribute] = React.useState();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tconst loadAttribute = async () => {\r\n\t\t\tif (attributeId) {\r\n\t\t\t\tconst loadedAttribute = (await displatch(getAttribute(attributeId))) as any;\r\n\t\t\t\tsetAttribute(loadedAttribute);\r\n\t\t\t}\r\n\t\t};\r\n\t\tloadAttribute();\r\n\t}, [displatch, attributeId, setAttribute]);\r\n\r\n\treturn [attribute];\r\n};\r\n","import React from \"react\";\r\nimport { useAttributeValuesData } from \"../../../data/listing/attributes/hooks/attributeValues/useAttributeValuesData\";\r\nimport { AttributeValue } from \"../../../data/listing/attributes/types\";\r\nimport { AutocompleteSelect, AutocompleteSelectType } from \"../common/AutocompleteSelect\";\r\n\r\ntype ProductAttributeSelectPropsType = Omit, \"data\" | \"getLabel\"> & {\r\n\tattributeId: string;\r\n};\r\n\r\nexport const AttributeValueSelect: React.FunctionComponent = ({\r\n\tattributeId,\r\n\t...otherProps\r\n}) => {\r\n\tconst [values, loadValues] = useAttributeValuesData(attributeId);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tloadValues();\r\n\t}, [loadValues]);\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t{...(otherProps as AutocompleteSelectType)}\r\n\t\t\tdata={values?.filter(att => att.attributeId === attributeId && att.status===1)}\r\n\t\t\tgetLabel={renderAttributeLabel}\r\n\t\t/>\r\n\t);\r\n};\r\n\r\nconst renderAttributeLabel = (attr: AttributeValue) => attr.name || attr.nameen;\r\n","import React from \"react\";\r\nimport { AttributeType, AttributeManditory } from \"../../../../data/listing/attributes/types\";\r\nimport { useAttribute } from \"../../../../data/listing/attributes/hooks/useAttribute\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { AttributeValueSelect } from \"../../../components/listing/ProductAttributeValueSelect\";\r\nimport { NumberInput } from \"../../../components/common/NumberInput\";\r\nimport { OrdersEditAction } from \"../../../../data/trading/orders/types\";\r\n//import { useOrderPSTM } from \"../../../../data/trading/orders/hooks/useOrderPSTM\";\r\n\r\nexport interface EditAttributeValueProps {\r\n\tattrId?: string;\r\n\tattrValue?: number;\r\n\tattrType?: AttributeType;\r\n\tattrValId?: string;\r\n\tmanditory?: AttributeManditory;\r\n\tcomparator?: string;\r\n\tattrName?: string;\r\n\tvalueChange: (value?: any) => void;\r\n\tvalueIdChange: (id?: string) => void;\r\n\terror?: boolean;\r\n\taction: OrdersEditAction;\r\n}\r\n\r\nexport const EditAttributeValue: React.FunctionComponent = ({\r\n\tattrId,\r\n\tattrValue,\r\n\tattrType,\r\n\tattrValId,\r\n\tmanditory,\r\n\tvalueChange,\r\n\tvalueIdChange,\r\n\tattrName,\r\n\tcomparator,\r\n\terror,\r\n\taction\r\n}) => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\tconst [selectedAttribute] = useAttribute(\r\n\t\tattrType === undefined || manditory === undefined || comparator === undefined ? attrId : undefined\r\n\t);\r\n\r\n//\tconst manditoryFinal = (manditory || selectedAttribute?.mandatory) === AttributeManditory.True;\r\n\r\n\tconst manditoryFinal = manditory ===1 ? true : false;\r\n\r\n//\tconst [setPSTM, pstm] = useOrderPSTM();\r\n\r\n\tconst label = `${attrName}${getComaprator(comparator || selectedAttribute?.comparator)}`;\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{(attrType || selectedAttribute?.attrType)?.trim() === AttributeType.Text.trim() && (\r\n\t\t\t\t\r\n\t\t\t\t\titem={{value: attrValue}}\r\n\t\t\t\t\tproperty=\"value\"\r\n\t\t\t\t\tonChange={(e: any) => {\r\n\t\t\t\t\t\tvalueChange(e.target.value);\r\n\t\t\t\t\t}}\r\n\t\t\t\t\tfullWidth\r\n\t\t\t\t\tlabel={label}\r\n\t\t\t\t\trequired={manditoryFinal}\r\n\t\t\t\t\terror={manditoryFinal && error && attrValue === undefined}\r\n\t\t\t\t\thelperText={manditoryFinal && error && attrValue === undefined && getString(\"requiredMessage\")}\r\n\t\t\t\t\tdecimalCount={1}\r\n\t\t\t\t\tdisabled={ action === OrdersEditAction.Verify }\r\n//\t\t\t\t\tdisabled={ action === OrdersEditAction.Verify || pstm.type === \"not-started\" }\r\n\t\t\t\t\t/>\r\n\t\t\t)}\r\n\t\t\t{(attrType || selectedAttribute?.attrType)?.trim() === AttributeType.Select.trim() && attrId && (\r\n\t\t\t\t attrValue.attrValueId === attrValId}\r\n\t\t\t\t\tonChangeItem={attrValue => {\r\n\t\t\t\t\t\tvalueIdChange(attrValue ? attrValue.attrValueId : undefined);\r\n\t\t\t\t\t}}\r\n\t\t\t\t\trequired={manditoryFinal}\r\n\t\t\t\t\terror={manditoryFinal && error && attrValId === undefined}\r\n\t\t\t\t\thelperText={manditoryFinal && error && attrValId === undefined && getString(\"requiredMessage\")}\r\n\t\t\t\t\tdisabled={ action === OrdersEditAction.Verify }\r\n//\t\t\t\t\tdisabled={ action === OrdersEditAction.Verify || pstm.type === \"not-started\" }\r\n\t\t\t\t/>\r\n\t\t\t)}\r\n\t\t\r\n\t);\r\n};\r\n\r\nconst getComaprator = (comp?: string) => (comp ? ` (${comp})` : \"\");\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { thunkPSTM } from \"../thunks/thunkPSTM\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useOrderPSTM = () => {\r\n\tconst fetchState = useSelector(\r\n\t\ts => s.data.trading.orderBook.orderPSTM\r\n\t);\r\n\tconst dispatch = useDispatch();\r\n\tconst setPSTM = React.useCallback(() => dispatch(thunkPSTM()), [dispatch]);\r\n\r\n\treturn [setPSTM, fetchState] as [typeof setPSTM, typeof fetchState]\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { setOrderPSTM } from \"../../orderBook/orderBookDataSlice\";\r\n\r\nexport const thunkPSTM = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst orderPSTM = store.data.trading.orderBook.orderPSTM;\r\n\r\n\tconst user = store.data.auth.current.user;\r\n\r\n if(orderPSTM.type === \"not-started\") { dispatch(setOrderPSTM({ type: \"started\" })) }\r\n\tif(orderPSTM.type === \"started\") {dispatch(setOrderPSTM({ type: \"not-started\" }))};\r\n\r\n};\r\n","import React from \"react\";\r\nimport { AttributeType, AttributeManditory } from \"../../../../data/listing/attributes/types\";\r\nimport { OrderAttribute } from \"../../../../data/trading/orders/types\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { Grid, Paper, Typography, Button } from \"@material-ui/core\";\r\nimport { EditAttributeValue } from \"./EditAttributeValue\";\r\nimport { ProducAttributeHasStandard } from \"../../../../data/listing/products/types\";\r\nimport { OrdersEditAction } from \"../../../../data/trading/orders/types\";\r\nimport { useOrderPSTM } from \"../../../../data/trading/orders/hooks/useOrderPSTM\";\r\n\r\nexport interface EditAttributesProps {\r\n\tonChange: (attributes?: OrderAttribute[]) => void;\r\n\tattributes?: OrderAttribute[];\r\n\terror?: boolean;\r\n\tallManditory: boolean\r\n\taction: OrdersEditAction;\r\n}\r\n\r\nexport const EditAttributes: React.FunctionComponent = ({\r\n\tonChange,\r\n\terror,\r\n\tattributes,\r\n\tallManditory,\r\n\taction\r\n}) => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst [setPSTM, pstm] = useOrderPSTM();\r\n\r\n\tconst createValueChanger = (attribute: OrderAttribute, prop: keyof OrderAttribute) => (value: any) => {\r\n\t\tconst newAttrs =\r\n\t\t\tattributes &&\r\n\t\t\tattributes.map(attr =>\r\n\t\t\t\tattr !== attribute\r\n\t\t\t\t\t? attr\r\n\t\t\t\t\t: {\r\n\t\t\t\t\t\t\t...attr,\r\n\t\t\t\t\t\t\t[prop]: value,\r\n\t\t\t\t\t }\r\n\t\t\t);\r\n\t\tonChange(newAttrs);\r\n\t};\r\n\r\n\tconst createValueChangerSrps = () => (value: any) => {\r\n\r\n//\t\tsetPSTM();\r\n\r\n\t\tconst newAttrs =\r\n\t\t\tattributes &&\r\n\t\t\tattributes.map(attr =>\r\n\t\t\t\tattr.hasStandard !== ProducAttributeHasStandard.True\r\n\t\t\t\t\t? attr\r\n\t\t\t\t\t: {\r\n\t\t\t\t\t\t\t...attr,\r\n\t\t\t\t\t\t\tattrValue: attr.standardValue,\r\n\t\t\t\t\t }\r\n\t\t\t);\r\n\t\tonChange(newAttrs);\r\n\t}; \r\n\r\n\t\t\r\n\r\n\tconst hasStandardValues = React.useMemo(\r\n\t\t() => attributes && attributes.some(attr => attr.hasStandard === ProducAttributeHasStandard.True)\r\n\t\t, [attributes])\r\n\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t{getString(\"AttrPsmtTitle\")}\r\n\t\t\t\t\r\n{/*\t\t\t\t\r\n\t\t\t\t\t\r\n */}\r\n\t\t\t\t{attributes &&\r\n\t\t\t\t\tattributes.map((attr, i) => (\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\r\n\t\t\t\t\t))}\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n\r\nconst getComaprator = (comp?: string) => (comp ? ` (${comp})` : \"\");\r\n","import { useSelector } from \"react-redux\";\r\nimport { StoreType } from \"../../../core/store/reducers\";\r\nimport { Region } from \"../../models\";\r\n\r\nconst getSubRegionLabel = (subRegion?: Region) => (subRegion ? subRegion.regName : \"\");\r\n\r\nexport const useTopRegions = () => {\r\n\tconst topRegions = useSelector(store => store.data.initialData.topRegions);\r\n\r\n\treturn [topRegions, getSubRegionLabel] as [typeof topRegions, typeof getSubRegionLabel];\r\n};\r\n","import React from \"react\";\r\nimport { useTopRegions } from \"../../../data/initialData/hooks/useTopRegions\";\r\nimport { Region } from \"../../../data/models\";\r\nimport {\r\n AutocompleteSelect,\r\n AutocompleteSelectType,\r\n} from \"./AutocompleteSelect\";\r\n\r\ntype RegionSelectPropsType = Omit<\r\n AutocompleteSelectType,\r\n \"data\" | \"getLabel\"\r\n>;\r\n\r\nexport const TopRegionSelect: React.FunctionComponent = (\r\n props\r\n) => {\r\n const [topRegions, renderTopRegionLabel] = useTopRegions();\r\n\r\n return (\r\n \r\n data={topRegions}\r\n getLabel={renderTopRegionLabel}\r\n {...(props as any)}\r\n />\r\n );\r\n};\r\n","import React from \"react\";\r\nimport { useWhsData } from \"../../../data/listing/warehouses/hooks/useWhsData\";\r\nimport { Warehouse } from \"../../../data/listing/warehouses/types\";\r\nimport {\r\n AutocompleteSelectType,\r\n AutocompleteSelect,\r\n} from \"../common/AutocompleteSelect\";\r\n\r\nexport type WhsSelectPropsType = Omit<\r\n AutocompleteSelectType,\r\n \"data\" | \"getLabel\"\r\n>;\r\n\r\nexport const WhsSelect: React.FunctionComponent = (\r\n props\r\n) => {\r\n const [, loadAllWhs, warehouses] = useWhsData();\r\n\r\n React.useEffect(() => {\r\n if (!warehouses) {\r\n loadAllWhs();\r\n }\r\n }, [warehouses, loadAllWhs]);\r\n\r\n return (\r\n \r\n {...(props as AutocompleteSelectType)}\r\n data={warehouses}\r\n getLabel={renderWhsLabel}\r\n />\r\n );\r\n};\r\n\r\nconst renderWhsLabel = (warehouse: Warehouse | null) =>\r\n warehouse ? `${warehouse.whsName} ` : \"\";\r\n","import { useSelector } from \"react-redux\";\r\nimport { StoreType } from \"../../../core/store/reducers\";\r\nimport { OrderNote } from \"../../models\";\r\n\r\nconst renderLabel = (item: OrderNote) => item.ftDescr;\r\n\r\nexport const useOrderNotes = () => {\r\n\tconst orderNotes = useSelector(store => store.data.initialData.orderNotes);\r\n\r\n\treturn [orderNotes, renderLabel] as [typeof orderNotes, typeof renderLabel];\r\n};\r\n","import React from \"react\";\r\nimport { useOrderNotes } from \"../../../data/initialData/hooks/useOrderNotes\";\r\nimport { OrderNote } from \"../../../data/models\";\r\nimport { AutocompleteSelect, AutocompleteSelectType } from \"./AutocompleteSelect\";\r\n\r\ntype OrderNoteSelectPropsType = Omit, \"data\" | \"getLabel\">;\r\n\r\nexport const OrderNoteSelect: React.FunctionComponent = props => {\r\n\tconst [notes, renderLabel] = useOrderNotes();\r\n\r\n\treturn (\r\n\t\t data={notes} getLabel={renderLabel} {...(props as any)} />\r\n\t);\r\n};\r\n","import { useSelector } from \"react-redux\";\r\nimport { StoreType } from \"../../../core/store/reducers\";\r\nimport { Pay_Type } from \"../../models\";\r\n\r\nconst getPayTypeLabel = (payType?: Pay_Type) => (payType ? payType.payTypeDescr : \"\");\r\n\r\nexport const usePayTypes = () => {\r\n\tconst payTypes = useSelector(store => store.data.initialData.pay_Types);\r\n\r\n\treturn [payTypes, getPayTypeLabel] as [typeof payTypes, typeof getPayTypeLabel];\r\n};\r\n","import React from \"react\";\r\nimport { usePayTypes } from \"../../../data/initialData/hooks/usePayTypes\";\r\nimport { Pay_Type } from \"../../../data/models\";\r\nimport { AutocompleteSelectType, AutocompleteSelect } from \"./AutocompleteSelect\";\r\n\r\n\r\ntype Pay_TypeSelectPropsType = Omit, \"data\" | \"getLabel\">;\r\n\r\nexport const Pay_TypeSelect: React.FunctionComponent = props => {\r\n\tconst [pay_Types, renderLabel] = usePayTypes();\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\tdata={pay_Types}\r\n\t\t\tgetLabel={renderLabel}\r\n\t\t\t{...(props as any)}\r\n\t\t/>\r\n\t);\r\n};\r\n\r\n","import React from \"react\";\r\nimport {\r\n\tuseOrderValidator,\r\n\tmaxExpiryDate,\r\n\tuseOrderWarehouseRequired,\r\n} from \"../../../data/trading/orders/hooks/useOrderValidator\";\r\nimport { useOrderUpsert } from \"../../../data/trading/orders/hooks/useOrderUpsert\";\r\nimport { EditOrder, OrderAttribute, FundsCheckStatus } from \"../../../data/trading/orders/types\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Grid, InputAdornment, Typography } from \"@material-ui/core\";\r\nimport { FabSave } from \"../../components/common/FabSave\";\r\nimport { OrderRecieveMethodSelect } from \"../../components/common/OrderRecieveMethodSelect\";\r\nimport { BoolInput } from \"../../components/common/BoolInput\";\r\nimport { LeavePrompt } from \"../../components/common/LeavePrompt\";\r\nimport { useAuth } from \"../../../data/auth/hooks\";\r\nimport { ClientSelect } from \"../../components/listing/ClientSelect\";\r\nimport { ProductSelect } from \"../../components/listing/ProductSelect\";\r\nimport { ProductSelectData, ProductSelectAttribute } from \"../../../data/listing/products/types\";\r\nimport { OrderSideSelect } from \"./OrderSideSelect\";\r\nimport { NumberInput } from \"../../components/common/NumberInput\";\r\nimport { FrancoSelect } from \"../../components/common/FrancoSelect\";\r\nimport { GuaranteesTypeSelect } from \"../../components/common/GuaranteesSelect\";\r\nimport { DateInput } from \"../../components/common/DateInput\";\r\nimport { CheckPointSelect } from \"../../components/common/CheckPointSelect\";\r\nimport { CheckPointPayerSelect } from \"../../components/common/CheckPointPayerSelect\";\r\nimport { OrdersEditAction } from \"../../../data/trading/orders/types\";\r\nimport { orderBookLocation } from \"../orderBook/Locations\";\r\nimport { mainBoardLocation } from \"../mainBoard/Locations\";\r\nimport { mainBoardMLocation } from \"../mainpanelm/Locations\";\r\nimport { EditAttributes } from \"./attributes/EditAttributes\";\r\nimport { CountriesSelect } from \"../../components/common/CountriesSelect\";\r\nimport { TopRegionSelect } from \"../../components/common/TopRegionSelect\";\r\nimport { RegionSelect } from \"../../components/common/RegionSelect\";\r\nimport { CitySelect } from \"../../components/common/CitySelect\";\r\nimport { WhsSelect } from \"../../components/listing/WarehouseSelect\";\r\nimport { OrderMarketSelect } from \"./OrderMarketSelect\";\r\n// import { OrderSide, Franco } from \"../../../data/models\";\r\nimport { OrderNoteSelect } from \"../../components/common/OrderNoteSelect\";\r\nimport { CustomDialog } from \"../../components/common/CustomDialog\";\r\nimport { OrderSide, Status } from \"../../../data/models\";\r\nimport { Pay_TypeSelect } from \"../../components/common/Pay_TypeSelect\";\r\nimport { ProducAttributeHasStandard } from \"../../../data/listing/products/types\";\r\nimport { AttributeManditory } from \"../../../data/listing/attributes/types\";\r\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\r\nimport { useTheme } from '@material-ui/core/styles';\r\n\r\n\r\nexport interface EditOrderBasicInfoPageProps {\r\n\torder: EditOrder;\r\n\teditOrder: (field: keyof EditOrder, value: any) => void;\r\n\tchanged: boolean;\r\n\taction: OrdersEditAction;\r\n}\r\n\r\nexport type FundCheckState =\r\n\t| { status: \"INIT\"; message?: string }\r\n\t| { status: \"SHOWMESSAGE\"; message: string }\r\n\t| { status: \"RESUBMITED\"; message?: string }\r\n\t| { status: \"CONFIRMED\"; message?: string };\r\n\r\nexport type ActiveCheckState =\r\n\t| { status: \"INIT\"; message?: string }\r\n\t| { status: \"SHOWMESSAGE\"; message: string }\r\n\t| { status: \"CONFIRMED\"; message?: string };\r\n\r\nexport const EditOrderBasicInfoPage: React.FunctionComponent = props => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\tconst { action, order, editOrder, changed } = props;\r\n\tconst [auth] = useAuth();\r\n\tconst [validationState, validate] = useOrderValidator();\r\n\tconst [fetchState, upsert] = useOrderUpsert(action);\r\n\tconst [selectedProduct, setSelectedProduct] = React.useState(null);\r\n\r\n\tconst history = useHistory();\r\n\tconst [isWhsRequired] = useOrderWarehouseRequired();\r\n\tconst requiredWhs = isWhsRequired(order);\r\n\tconst [fundCheckState, setFundCheckState] = React.useState({ status: \"INIT\" });\r\n\tconst [activeCheckState, setActiveCheckState] = React.useState({ status: \"INIT\" });\r\n\r\n\tconst unsavedChanges = fetchState.type === \"not-started\" && changed;\r\n\r\n\tconst handleChange = React.useCallback(\r\n\t\t(event: React.ChangeEvent) => {\r\n\t\t\teditOrder(event.target.name as any, event.target.value);\r\n\t\t},\r\n\t\t[editOrder]\r\n\t);\r\n\r\n\tconst theme = useTheme();\r\n\tconst screenExtraSmall = useMediaQuery(theme.breakpoints.only('xs'));\r\n\r\n\tconst backLocation = action === OrdersEditAction.Replay ? (screenExtraSmall===true ? mainBoardMLocation : mainBoardLocation) : orderBookLocation;\r\n\tconst statusProducts = Status.Active\r\n\r\nconsole.log(backLocation)\r\n\r\n\tconst saveOrder = React.useCallback(\r\n\t\tasync (order: EditOrder) => {\r\n\t\t\tif (order && order.ordStatus === 2) {\r\n\t\t\t\torder.fundsCheckStatus = FundsCheckStatus.Confirmed\r\n\t\t\t}\r\n\t\t\tconst normalized = validate(order);\r\n\t\t\tif (normalized) {\r\n\t\t\t\tconst result = await upsert(normalized);\r\n\t\t\t\tif (result.status === \"CREATED\") {\r\n\t\t\t\t\teditOrder(\"ordId\", result.newId);\r\n\t\t\t\t} else if (result.status === \"NOFUNDS\") {\r\n\t\t\t\t\tsetFundCheckState({\r\n\t\t\t\t\t\tstatus: \"SHOWMESSAGE\",\r\n\t\t\t\t\t\tmessage: result.message,\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\t[validate, editOrder, upsert]\r\n\t);\r\n\r\n\tconst fabClick = React.useCallback(\r\n\t\t(order: EditOrder) => {\r\n\t\t\tif (fetchState.type === \"successful\") {\r\n\t\t\t\thistory.push(backLocation);\r\n\t\t\t} else if (fetchState.type !== \"started\") {\r\n\t\t\t\tsaveOrder(order);\r\n\t\t\t}\r\n\t\t},\r\n\t\t[fetchState, history, backLocation, saveOrder]\r\n\t);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (fundCheckState.status === \"CONFIRMED\") {\r\n\t\t\tsetFundCheckState(s => ({ status: \"RESUBMITED\", message: s.message }));\r\n\t\t\torder.fundsCheckStatus = FundsCheckStatus.Ignore;\r\n\t\t\tfabClick(order);\r\n\t\t}\r\n\t}, [fabClick, fundCheckState, order]);\r\n\r\n\tif (!order || auth.status !== \"successful\") {\r\n\t\treturn null;\r\n\t}\r\n\r\n\r\n\treturn (\r\n\t\t<>\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\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\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\t{auth.user.userIsEmployee === 1 && (\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 unit.ftValue === order.receiveMethod}\r\n\t\t\t\t\t\t\t\t\tonChangeItem={unit => editOrder(\"receiveMethod\", unit?.ftValue)}\r\n\t\t\t\t\t\t\t\t\trequired={validationState.receiveMethod !== undefined}\r\n\t\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\t\tvalidationState.receiveMethod !== undefined &&\r\n\t\t\t\t\t\t\t\t\t\t!validationState.receiveMethod\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tdisabled={action === OrdersEditAction.Verify}\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\t\r\n\t\t\t\t\t\t\t\t client.cliId === order.clientId}\r\n\t\t\t\t\t\t\t\t\tonChangeItem={client => {\r\n\t\t\t\t\t\t\t\t\t\teditOrder(\"clientId\", client ? client.cliId : undefined)\r\n\t\t\t\t\t\t\t\t\t\teditOrder(\"active\", client ? client.active : undefined)\r\n\t\t\t\t\t\t\t\t\t\tsetActiveCheckState(client && client.active === 0 ? { status: \"SHOWMESSAGE\", message: \"neaktivan\", } : { status: \"INIT\", message: \"\", })\r\n\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\trequired={validationState.clientId !== undefined}\r\n\t\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\t\tvalidationState.clientId !== undefined && !validationState.clientId\r\n\t\t\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\t\t\tvalidationState.clientId !== undefined && !validationState.clientId && !validationState.active\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tdisabled={action === OrdersEditAction.Modify || action === OrdersEditAction.Verify}\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\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t prod.prodId === order.prodId}\r\n\t\t\t\t\t\t\t\tonChangeItem={prod => {\r\n\t\t\t\t\t\t\t\t\tconsole.log(prod)\r\n\t\t\t\t\t\t\t\t\teditOrder(\"prodId\", prod ? prod.prodId : undefined);\r\n\t\t\t\t\t\t\t\t\teditOrder(\r\n\t\t\t\t\t\t\t\t\t\t\"orderAttrList\",\r\n\t\t\t\t\t\t\t\t\t\tprod\r\n\t\t\t\t\t\t\t\t\t\t\t? createOrderAttributes(prod.prodAttrList, order.ordId)\r\n\t\t\t\t\t\t\t\t\t\t\t: undefined\r\n\t\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t\t\tsetSelectedProduct(prod);\r\n\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\trequired={validationState.prodId !== undefined}\r\n\t\t\t\t\t\t\t\terror={validationState.prodId !== undefined && !validationState.prodId}\r\n\t\t\t\t\t\t\t\tdisabled={action === OrdersEditAction.Modify || action === OrdersEditAction.Verify}\r\n\t\t\t\t\t\t\t/>\r\n\t\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\tproperty=\"price\"\r\n\t\t\t\t\t\t\t\titem={order}\r\n\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\tlabel={getString(\"orderPriceWithoutVat\")}\r\n\t\t\t\t\t\t\t\tmoney\r\n\t\t\t\t\t\t\t\tdisabled={action === OrdersEditAction.Verify}\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\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\tproperty=\"qty\"\r\n\t\t\t\t\t\t\t\titem={order}\r\n\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\tlabel={getString(\"orderQty\")}\r\n\t\t\t\t\t\t\t\tInputProps={{\r\n\t\t\t\t\t\t\t\t\tendAdornment: selectedProduct ? (\r\n\t\t\t\t\t\t\t\t\t\t{selectedProduct.unit}\r\n\t\t\t\t\t\t\t\t\t) : undefined,\r\n\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\tdisabled={action === OrdersEditAction.Verify}\r\n\t\t\t\t\t\t\t/>\r\n\t\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\tproperty=\"minQty\"\r\n\t\t\t\t\t\t\t\titem={order}\r\n\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\tlabel={getString(\"orderMinQty\")}\r\n\t\t\t\t\t\t\t\tInputProps={{\r\n\t\t\t\t\t\t\t\t\tendAdornment: selectedProduct ? (\r\n\t\t\t\t\t\t\t\t\t\t{selectedProduct.unit}\r\n\t\t\t\t\t\t\t\t\t) : undefined,\r\n\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\tdisabled={action === OrdersEditAction.Verify}\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t pay_type.payTypeId === order.payTypeId}\r\n\t\t\t\t\t\t\t\tonChangeItem={pay_type => {\r\n\t\t\t\t\t\t\t\t\teditOrder(\"payTypeId\", pay_type ? pay_type.payTypeId : undefined);\r\n\t\t\t\t\t\t\t\t\teditOrder(\"paymentDays\", pay_type && pay_type.payTypeId === \"00000001\" ? 0 : undefined);\r\n\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\trequired={validationState.payTypeId !== undefined}\r\n\t\t\t\t\t\t\t\terror={validationState.payTypeId !== undefined && !validationState.payTypeId}\r\n\t\t\t\t\t\t\t\tdisabled={action === OrdersEditAction.Verify}\r\n\t\t\t\t\t\t\t/>\r\n\t\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\tproperty=\"paymentDays\"\r\n\t\t\t\t\t\t\t\titem={order}\r\n\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\tlabel={getString(\"orderPayDays\")}\r\n\t\t\t\t\t\t\t\trequired={order.payTypeId === \"00000001\"}\r\n\t\t\t\t\t\t\t\terror={!(validationState.paymentDays === undefined || validationState.paymentDays)}\r\n\t\t\t\t\t\t\t\tdisabled={action === OrdersEditAction.Verify || order.payTypeId !== \"00000001\"}\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\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\tproperty=\"allOrNothing\"\r\n\t\t\t\t\t\t\t\titem={order}\r\n\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\tfalsyValue={0}\r\n\t\t\t\t\t\t\t\tthrutyValue={1}\r\n\t\t\t\t\t\t\t\tlabel={getString(\"orderAllOrNothing\")}\r\n\t\t\t\t\t\t\t\tdisabled={action === OrdersEditAction.Verify}\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t editOrder(\"expiryDate\", date)}\r\n\t\t\t\t\t\t\t\trequired={validationState.expiryDate !== undefined}\r\n\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\tvalidationState.expiryDate !== undefined && !validationState.expiryDate\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tmaxDate={maxExpiryDate}\r\n\t\t\t\t\t\t\t\tdisablePast\r\n\t\t\t\t\t\t\t\tdisabled={action === OrdersEditAction.Verify}\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\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t editOrder(\"goodsReadyFrom\", date)}\r\n\t\t\t\t\t\t\t\trequired={validationState.goodsReadyFrom !== undefined}\r\n\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\tvalidationState.goodsReadyFrom !== undefined &&\r\n\t\t\t\t\t\t\t\t\t!validationState.goodsReadyFrom\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tdisabled={action === OrdersEditAction.Verify}\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t editOrder(\"goodsReadyTo\", date)}\r\n\t\t\t\t\t\t\t\trequired={validationState.goodsReadyTo !== undefined}\r\n\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\tvalidationState.goodsReadyTo !== undefined &&\r\n\t\t\t\t\t\t\t\t\t!validationState.goodsReadyTo\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tdisabled={action === OrdersEditAction.Verify}\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\t{/* \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t checkPoint.ftValue === order.checkPoint}\r\n\t\t\t\t\t\t\t\tonChangeItem={checkPoint => {\r\n\t\t\t\t\t\t\t\t\teditOrder(\"checkPoint\", checkPoint ? checkPoint.ftValue : undefined);\r\n\t\t\t\t\t\t\t\t\t// if (!checkPoint) {\r\n\t\t\t\t\t\t\t\t\t// \teditOrder(\"paysCheck\", undefined);\r\n\t\t\t\t\t\t\t\t\t// } else if (order.paysCheck === undefined && checkPoint.ftValue > 0) {\r\n\t\t\t\t\t\t\t\t\t// \teditOrder(\"paysCheck\", 1);\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\trequired={validationState.checkPoint !== undefined}\r\n\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\tvalidationState.checkPoint !== undefined && !validationState.checkPoint\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\t\r\n\t\t\t\t\t\t\t paysCheck.ftValue === order.paysCheck}\r\n\t\t\t\t\t\t\t\tonChangeItem={paysCheck =>\r\n\t\t\t\t\t\t\t\t\teditOrder(\"paysCheck\", paysCheck ? paysCheck.ftValue : undefined)\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\trequired={validationState.paysCheck !== undefined}\r\n\t\t\t\t\t\t\t\terror={validationState.paysCheck !== undefined && !validationState.paysCheck}\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\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t prod.ftValue === order.franco}\r\n\t\t\t\t\t\t\t\tonChangeItem={franco =>\r\n\t\t\t\t\t\t\t\t\teditOrder(\"franco\", franco ? franco.ftValue : undefined)\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\trequired={validationState.franco !== undefined}\r\n\t\t\t\t\t\t\t\terror={validationState.franco !== undefined && !validationState.franco}\r\n\t\t\t\t\t\t\t\tdisabled={action === OrdersEditAction.Verify}\r\n\t\t\t\t\t\t\t/>\r\n\t\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\tproperty=\"exportReady\"\r\n\t\t\t\t\t\t\t\titem={order}\r\n\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\tfalsyValue={0}\r\n\t\t\t\t\t\t\t\tthrutyValue={1}\r\n\t\t\t\t\t\t\t\tlabel={getString(\"orderexportReady\")}\r\n\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\tdisabled={action === OrdersEditAction.Verify}\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\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{`${getString(\"orderDeliveryLocation\")}:`}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t country.cntId === order.locCountryId?.trim()}\r\n\t\t\t\t\t\t\t\tonChangeItem={country => {\r\n\t\t\t\t\t\t\t\t\teditOrder(\"locCountryId\", country ? country.cntId : undefined);\r\n\t\t\t\t\t\t\t\t\teditOrder(\"locRegionId\", undefined);\r\n\t\t\t\t\t\t\t\t\teditOrder(\"locDistrictId\", undefined);\r\n\t\t\t\t\t\t\t\t\teditOrder(\"locCityId\", undefined);\r\n\t\t\t\t\t\t\t\t\teditOrder(\"locWarehouseId\", undefined);\r\n\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\trequired={requiredWhs}\r\n\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\tvalidationState.locCountryId !== undefined &&\r\n\t\t\t\t\t\t\t\t\t!validationState.locCountryId\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tdisabled={action === OrdersEditAction.Verify}\r\n\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\tdisabled={ action === OrdersEditAction.Verify || (auth.user.roleCode==='MEMTRADER' && action === OrdersEditAction.Replay) } \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\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t region.regId === order.locRegionId}\r\n\t\t\t\t\t\t\t\tonChangeItem={region => {\r\n\t\t\t\t\t\t\t\t\teditOrder(\"locRegionId\", region ? region.regId : undefined);\r\n\t\t\t\t\t\t\t\t\teditOrder(\"locDistrictId\", undefined);\r\n\t\t\t\t\t\t\t\t\teditOrder(\"locCityId\", undefined);\r\n\t\t\t\t\t\t\t\t\teditOrder(\"locWarehouseId\", undefined);\r\n\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\tdataFilter={region =>\r\n\t\t\t\t\t\t\t\t\torder.locCountryId !== undefined &&\r\n\t\t\t\t\t\t\t\t\tregion.country === order.locCountryId?.trim()\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\trequired={requiredWhs}\r\n\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\tvalidationState.locRegionId !== undefined && !validationState.locRegionId\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tdisabled={action === OrdersEditAction.Verify}\r\n\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\tdisabled={ action === OrdersEditAction.Verify || (auth.user.roleCode==='MEMTRADER' && action === OrdersEditAction.Replay) } \r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t dist.regId === order.locDistrictId}\r\n\t\t\t\t\t\t\t\tonChangeItem={dist => {\r\n\t\t\t\t\t\t\t\t\teditOrder(\"locDistrictId\", dist ? dist.regId : undefined);\r\n\t\t\t\t\t\t\t\t\teditOrder(\"locCityId\", undefined);\r\n\t\t\t\t\t\t\t\t\teditOrder(\"locWarehouseId\", undefined);\r\n\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\tdataFilter={dist =>\r\n\t\t\t\t\t\t\t\t\torder.locRegionId !== undefined && dist.parentRegId === order.locRegionId\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\trequired={requiredWhs}\r\n\t\t\t\t\t\t\t\terror={validationState.locCityId !== undefined && !validationState.locCityId}\r\n\t\t\t\t\t\t\t\tdisabled={action === OrdersEditAction.Verify}\r\n\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\tdisabled={ action === OrdersEditAction.Verify || (auth.user.roleCode==='MEMTRADER' && action === OrdersEditAction.Replay) } \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\t{/* !(auth.user.roleCode==='MEMTRADER' && action === OrdersEditAction.Replay) && ( */}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t city.cityId === order.locCityId}\r\n\t\t\t\t\t\t\t\tonChangeItem={city => {\r\n\t\t\t\t\t\t\t\t\teditOrder(\"locCityId\", city ? city.cityId : undefined);\r\n\t\t\t\t\t\t\t\t\teditOrder(\"locWarehouseId\", undefined);\r\n\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\tdataFilter={city =>\r\n\t\t\t\t\t\t\t\t\torder.locDistrictId !== undefined && city.regionId === order.locDistrictId\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\trequired={requiredWhs}\r\n\t\t\t\t\t\t\t\terror={validationState.locCityId !== undefined && !validationState.locCityId}\r\n\t\t\t\t\t\t\t\tdisabled={action === OrdersEditAction.Verify}\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t whs.whsId === order.locWarehouseId}\r\n\t\t\t\t\t\t\t\tonChangeItem={whs => {\r\n\t\t\t\t\t\t\t\t\teditOrder(\"locWarehouseId\", whs ? whs.whsId : undefined);\r\n\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\tdataFilter={whs =>\r\n\t\t\t\t\t\t\t\t\torder.locCityId !== undefined && whs.cityId === order.locCityId && whs.status===1 \r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\trequired={requiredWhs}\r\n\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\tvalidationState.locWarehouseId !== undefined &&\r\n\t\t\t\t\t\t\t\t\t!validationState.locWarehouseId\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tdisabled={action === OrdersEditAction.Verify}\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\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t{/*\r\n\t\t\t\t\t\t\t checkPoint.ftValue === order.checkPoint}\r\n\t\t\t\t\t\t\t\tonChangeItem={checkPoint => {\r\n\t\t\t\t\t\t\t\t\teditOrder(\"checkPoint\", checkPoint ? checkPoint.ftValue : undefined);\r\n\t\t\t\t\t\t\t\t\t// if (!checkPoint) {\r\n\t\t\t\t\t\t\t\t\t// \teditOrder(\"paysCheck\", undefined);\r\n\t\t\t\t\t\t\t\t\t// } else if (order.paysCheck === undefined && checkPoint.ftValue > 0) {\r\n\t\t\t\t\t\t\t\t\t// \teditOrder(\"paysCheck\", 1);\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\trequired={validationState.checkPoint !== undefined}\r\n\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\tvalidationState.checkPoint !== undefined && !validationState.checkPoint\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\t */}\r\n\t\t\t\t\t\t{/*\r\n\t\t\t\t\t\t\t paysCheck.ftValue === order.paysCheck}\r\n\t\t\t\t\t\t\t\tonChangeItem={paysCheck =>\r\n\t\t\t\t\t\t\t\t\teditOrder(\"paysCheck\", paysCheck ? paysCheck.ftValue : undefined)\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\trequired={validationState.paysCheck !== undefined}\r\n\t\t\t\t\t\t\t\terror={validationState.paysCheck !== undefined && !validationState.paysCheck}\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t */}\r\n\t\t\t\t\t \r\n\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\t prod.ftValue === order.bankGuarantee}\r\n\t\t\t\t\t\t\t\tonChangeItem={bankGuarantee =>\r\n\t\t\t\t\t\t\t\t\teditOrder(\"bankGuarantee\", bankGuarantee ? bankGuarantee.ftValue : undefined)\r\n\t\t\t\t\t\t\t\t}\r\n//\t\t\t\t\t\t\t\trequired={validationState.franco !== undefined}\r\n//\t\t\t\t\t\t\t\terror={validationState.franco !== undefined && !validationState.franco}\r\n\t\t\t\t\t\t\t\tdisabled={action === OrdersEditAction.Modify || action === OrdersEditAction.Verify}\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\r\n\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\tproperty=\"bankGuarantee\"\r\n\t\t\t\t\t\t\t\titem={order}\r\n\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\tfalsyValue={0}\r\n\t\t\t\t\t\t\t\tthrutyValue={1}\r\n\t\t\t\t\t\t\t\tlabel={getString(\"orderBankGuarantee\")}\r\n\t\t\t\t\t\t\t\tdisabled={action === OrdersEditAction.Verify}\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t*/}\r\n\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t note.ftDescr === order.comment}\r\n\t\t\t\t\t\t\t\tonChangeItem={note => editOrder(\"comment\", note?.ftDescr)}\r\n\t\t\t\t\t\t\t\trequired={validationState.comment !== undefined}\r\n\t\t\t\t\t\t\t\terror={validationState.comment !== undefined && !validationState.comment}\r\n\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\tdisabled={ action === OrdersEditAction.Verify }\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\t\r\n\t\t\t\t\t editOrder(\"orderAttrList\", list)}\r\n\t\t\t\t\t\terror={validationState.orderAttrList === false}\r\n\t\t\t\t\t\t//\t\t\t\t\t\tallManditory={order.side === OrderSide.Sell}\r\n\t\t\t\t\t\tallManditory={false}\r\n\t\t\t\t\t\taction={action}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t fabClick(order)} />\r\n\t\t\t\r\n\t\t\t {\r\n\t\t\t\t\tsetFundCheckState(s => ({ status: \"CONFIRMED\", message: s.message }));\r\n\t\t\t\t}}\r\n\t\t\t\tdisableBackdropClick\r\n\t\t\t/>\r\n\t\t\t {\r\n\t\t\t\t\tsetActiveCheckState(s => ({ status: \"CONFIRMED\", message: s.message }));\r\n\t\t\t\t\teditOrder(\"clientId\", undefined)\r\n\t\t\t\t}}\r\n\t\t\t\tdisableBackdropClick\r\n\t\t\t/>\r\n\t\t\r\n\t);\r\n};\r\n\r\n\r\nconst createOrderAttributes = (attributes: ProductSelectAttribute[], ordId?: string): OrderAttribute[] =>\r\n\t\tattributes?.map(att => ({\r\n\t\tordId,\r\n\t\tattrId: att.attrId,\r\n\t\tattrName: att.attrName,\r\n\t\tcomparator: att.comparator,\r\n\t\tmanditory: att.mandatory,\r\n\t\ttype: att.type,\r\n\t\thasStandard: att.hasStandard,\r\n\t\tstandardValue: att.standardValue,\r\n\t\tattrValue: att.hasStandard ? att.standardValue : undefined, // ovo ubačeno da odmah upiše vrednost kad se odabere proizvod\r\n\t}));\r\n\r\n\r\n\t\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { Order } from \"../types\";\r\n\r\nexport const getOppositeOrder = (userId: string, ordid: string) =>\r\n webApi({\r\n method: \"GET\",\r\n url: \"order/getoppositeorder\",\r\n params: {\r\n userId,\r\n ordid,\r\n },\r\n });\r\n\r\nexport default getOppositeOrder;\r\n","import React from \"react\";\r\nimport { EditOrder, OrderMarkt, FundsCheckStatus } from \"../types\";\r\nimport { useCopiedState } from \"../../../../core/util/hooks\";\r\nimport { OrderSide } from \"../../../models\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { useAuth } from \"../../../auth/hooks\";\r\nimport { OrdersEditAction } from \"../types\";\r\nimport { useOrderForEdit } from \"./useOrderForEdit\";\r\n\r\nexport const createDefauiltOrder = (user: User): EditOrder => ({\r\n\tuserId: user.userId,\r\n\tclientId: user.clientId,\r\n\tside: OrderSide.Buy,\r\n\treceiveMethod: user.userIsEmployee === 1 ? 60 : undefined,\r\n\texportReady: 0,\r\n\tpaysCheck: 3,\r\n\tlocCountryId: \"RS\",\r\n\tmarket: OrderMarkt.Spot,\r\n\tfundsCheckStatus: FundsCheckStatus.NotChecked,\r\n});\r\n\r\nexport const useEditOrder = (action: OrdersEditAction, orderId?: string): EditOrder | undefined => {\r\n\tconst diplayedOrder = useOrderForEdit(action, orderId);\r\n\tconst [auth] = useAuth();\r\n\r\n\treturn React.useMemo(() => {\r\n\t\tif ((orderId !== undefined && diplayedOrder === undefined) || auth.status !== \"successful\") {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\tif (orderId === undefined) {\r\n\t\t\tconst defaultOrder = createDefauiltOrder(auth.user);\r\n\t\t\treturn { ...defaultOrder };\r\n\t\t}\r\n\t\tconst order = diplayedOrder\r\n\t\t\t? (({ ...diplayedOrder } as unknown) as EditOrder)\r\n//\t\t\t? (({ ...diplayedOrder, userId: auth.user.userId } as unknown) as EditOrder)\r\n\t\t\t: undefined;\r\n\r\n\t\tif (order && auth.user.clientId) {\r\n\t\t\torder.clientId = auth.user.clientId;\r\n\t\t}\r\n\r\n\t\treturn order;\r\n\t}, [orderId, diplayedOrder, auth]);\r\n};\r\n\r\nexport const useEditOrderState = (action: OrdersEditAction, orderId?: string) => {\r\n\tconst order = useEditOrder(action, orderId);\r\n\treturn useCopiedState(order);\r\n};\r\n","import { OrdersEditAction, Order } from \"../types\";\r\nimport { getOppositeOrder } from \"../api/getOppositeOrder\";\r\nimport { getOrderApi } from \"../api/getOrder\";\r\nimport { useAuth } from \"../../../auth/hooks\";\r\nimport { useDispatch } from \"react-redux\";\r\nimport React from \"react\";\r\n\r\nexport const useOrderForEdit = (action: OrdersEditAction, ordId?: string) => {\r\n\tconst [auth] = useAuth();\r\n\tconst dispatch = useDispatch();\r\n\tconst [order, setOrder] = React.useState();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (auth.status !== \"successful\" || !ordId) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\t\tconst load = async () => {\r\n\t\t\tconst newOrder =\r\n\t\t\t\taction === OrdersEditAction.Replay\r\n\t\t\t\t\t? await dispatch(getOppositeOrder(auth.user.userId, ordId))\r\n\t\t\t\t\t: await dispatch(getOrderApi(auth.user.userId, ordId));\r\n\t\t\tsetOrder(newOrder as any);\r\n\t\t};\r\n\t\tload();\r\n\t}, [dispatch, action, ordId, setOrder, auth]);\r\n\r\n\treturn order;\r\n};\r\n","import React from \"react\";\r\nimport { RouteComponentProps } from \"react-router-dom\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { Card, Grid, CardHeader, Divider, CardContent } from \"@material-ui/core\";\r\nimport { EditOrderBasicInfoPage } from \"./EditOrderBasicInfoPage\";\r\nimport { useEditOrderState } from \"../../../data/trading/orders/hooks/useEditOrderState\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { mainBoardLocation } from \"../mainBoard/Locations\";\r\nimport { mainBoardMLocation } from \"../mainpanelm/Locations\";\r\nimport { OrdersEditAction } from \"../../../data/trading/orders/types\";\r\nimport { orderBookLocation } from \"../orderBook/Locations\";\r\nimport { OrderSide } from \"../../../data/models\";\r\nimport { useOrderSideStyles } from \"./useOrderRowColor\";\r\n\r\nexport interface EditOrderPageInfo {\r\n\taction: OrdersEditAction;\r\n\teditPart?: string;\r\n\torderId?: string;\r\n}\r\n\r\nexport interface EditOrderPageProps extends RouteComponentProps {}\r\n\r\nexport const EditOrderPage: React.FunctionComponent = props => {\r\n\tconst pageStyles = usePageStyles();\r\n\tconst { action, orderId } = props.match.params;\r\n\tconst sideStyle = useOrderSideStyles();\r\n\r\n\tconst [order, editOrder, changed] = useEditOrderState(action, orderId);\r\n\r\n\tconst backLocation = action === OrdersEditAction.Replay ? mainBoardLocation : orderBookLocation;\r\n\r\n\tconsole.log(backLocation)\r\n\r\n\tconst pageTitle = orderId ? (action === OrdersEditAction.Verify && order && order.ordStatus===2 ? \"orderConfirm\": \r\n\t\t\t\t\t\t\t\t(action === OrdersEditAction.Verify && order && order.ordStatus!==2 ? \"orderVerify\" : \r\n\t\t\t\t\t\t\t\t(action === OrdersEditAction.Replay ? \"orderReplay\" : \"orderModify\")))\r\n\t\t: \"orderCreateTitle\";\r\n\r\n\treturn (\r\n\t\t\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\t}\r\n\t\t\t\t\t\tclassName={order && order.side === OrderSide.Sell ? sideStyle.sell : sideStyle.buy}\r\n\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\t\t{order && (\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\t);\r\n};\r\n","import MainBoard from \"./MainBoard\";\r\nimport { NavigationItem } from \"../../../core/navigation/types\";\r\nimport { mainBoardLocation, baseEdit } from \"./Locations\";\r\nimport { EditOrderPage } from \"../orders/EditOrderPage\"\r\n\r\nexport const mainBoardComponents: NavigationItem[] = [\r\n\t{\r\n\t\tComponent: MainBoard,\r\n\t\tisMenuItem: true,\r\n\t\tpath: mainBoardLocation,\r\n\t\tnotifications: true,\r\n\t},\r\n\t{\r\n\t\tComponent: EditOrderPage,\r\n\t\tisMenuItem: false,\r\n\t\tpath: baseEdit,\r\n\t},\r\n];\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { TradeList } from \"../types\";\r\n\r\nexport const getTradeApi = (userId: string, tradeid: string) =>\r\n webApi({\r\n method: \"GET\",\r\n url: \"trade/gettrade\",\r\n params: {\r\n userId,\r\n tradeid,\r\n },\r\n });\r\n\r\nexport default getTradeApi;\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getTradeApi from \"../api/getTrade\";\r\nimport { setDisplayed } from \"../tradesDataSlice\";\r\nimport { TradeList } from \"../types\";\r\n\r\nexport const loadTrade = (tradeId: string): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n dispatch(setDisplayed());\r\n\r\n const trade = await dispatch(getTrade(tradeId));\r\n\r\n dispatch(setDisplayed(trade));\r\n};\r\n\r\nexport const getTrade = (\r\n tradeId: string\r\n): ThunkType> => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { userId } = store.data.auth.current.user;\r\n return await dispatch(getTradeApi(userId, tradeId));\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { TradeList } from \"../types\";\r\nimport { loadTrade } from \"../thunks/loadTrade\";\r\n\r\nexport const useDisplayTrade = (tradeId?: string) => {\r\n const storeTrade = useSelector(\r\n (store) => store.data.trading.trades.displayedTrade\r\n );\r\n\r\n const displayedTrade =\r\n storeTrade && storeTrade.tradeId === tradeId ? storeTrade : undefined;\r\n\r\n const displatch = useDispatch();\r\n\r\n React.useEffect(() => {\r\n if (tradeId) {\r\n displatch(loadTrade(tradeId));\r\n }\r\n }, [displatch, tradeId]);\r\n\r\n return displayedTrade;\r\n};\r\n","import React from \"react\";\r\nimport { TradeList } from \"../../../data/trading/trades/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { useDisplaySingleEmementStyles } from \"../../useDisplaySingleEmementStyles\";\r\nimport { useOrderMarketOptionsTranslator } from \"../../../data/trading/orders/hooks/useOrderMarketOptions\";\r\n\r\nexport interface DisplayTradeMainAttributesProps {\r\n\ttrade: TradeList;\r\n}\r\n\r\nexport const DisplayTradeMainAttributes: React.FunctionComponent = ({\r\n\ttrade,\r\n}) => {\r\n\tconst style = useDisplaySingleEmementStyles();\r\n\tconst { getString, getDateTimeString, getDateString, getFormatedNumberString } = React.useContext(LocalizationContext);\r\n\tconst marketTranslator = useOrderMarketOptionsTranslator();\r\n\t\r\n\treturn (\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"tradeNo\")}\r\n\t\t\t\t{trade.tradeNo}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"tradeTime\")}\r\n\t\t\t\t{getDateTimeString(trade.tradeTime)}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"startDeliveryDate\")}\r\n\t\t\t\t{getDateString(trade.startDeliveryDate, \"DD.MM.YYYY\")}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"tradeFulfillmentDate\")}\r\n\t\t\t\t{getDateString(trade.fulfillmentDate, \"DD.MM.YYYY\")}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"tranNoSell\")}\r\n\t\t\t\t{trade.tranNoSell}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"orderNoSell\")}\r\n\t\t\t\t{trade.orderNoSell}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"clientNameSell\")}\r\n\t\t\t\t{trade.clientNameSell}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"tranNoBuy\")}\r\n\t\t\t\t{trade.tranNoBuy}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"orderNoBuy\")}\r\n\t\t\t\t{trade.orderNoBuy}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"clientNameBuy\")}\r\n\t\t\t\t{trade.clientNameBuy}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"tradeProdName\")}\r\n\t\t\t\t{`${trade.prodName} (${trade.prodCode})`}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"tradeQty\")}\r\n\t\t\t\t\r\n\t\t\t\t\t{`${getFormatedNumberString(trade.qty)} ${trade.unitDescr}`}\r\n\t\t\t\t\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"tradePrice\")}\r\n\t\t\t\t{getFormatedNumberString(trade.price, true)}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"tradeVatPerc\")}\r\n\t\t\t\t{`${trade.vatPerc} %`}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"tradePriceWithVat\")}\r\n\t\t\t\t{getFormatedNumberString(trade.priceWithVat, true)}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"tradeAmt\")}\r\n\t\t\t\t{getFormatedNumberString(trade.amt, true)}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"tradeAmtWithVat\")}\r\n\t\t\t\t{getFormatedNumberString(trade.amtWithVat, true)}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"orderMarket\")}\r\n\t\t\t\t{marketTranslator(trade.market)}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"tradeStatusDescr\")}\r\n\t\t\t\t{trade.statusDescr}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"tradeCommPercSell\")}\r\n\t\t\t\t{`${getFormatedNumberString(trade.commPercSell,true)}%`}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"tradeCommAmtSell\")}\r\n\t\t\t\t{getFormatedNumberString(trade.commAmtSell,true)}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"tradeCommPercBuy\")}\r\n\t\t\t\t{`${getFormatedNumberString(trade.commPercBuy,true)}%`}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"tradeCommAmtBuy\")}\r\n\t\t\t\t{getFormatedNumberString(trade.commAmtBuy,true)}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"tradeDeliveryWhsName\")}\r\n\t\t\t\t{trade.deliveryWhsName}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"tradePayTypeDescr\")}\r\n\t\t\t\t{trade.payTypeDescr}\r\n\t\t\t
\r\n\t\t
\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport { useDisplaySingleEmementStyles } from \"../../useDisplaySingleEmementStyles\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport {TableContainer,\tTable,\tTableHead,\tTableCell,\tTableRow,\tPaper,\tTableBody,\tTypography,\tGrid,} from \"@material-ui/core\";\r\nimport { TradeLogData } from \"../../../data/trading/trades/types\";\r\nimport { useAuth } from \"../../../data/auth/hooks\";\r\n\r\nexport interface DisplayTradeLogDataProps {\r\n\ttradelog?: TradeLogData[];\r\n}\r\n\r\nexport const DisplayTradeLogData: React.FunctionComponent = ({ tradelog }) => {\r\n\tconst style = useDisplaySingleEmementStyles();\r\n\r\n\treturn (\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t \r\n\t\t\t
\r\n\t\t
\r\n\t);\r\n};\r\n\r\ninterface TradeLogDisplayTableProps {\r\n\ttradelog?: TradeLogData[];\r\n}\r\n\r\nexport const TradeLogDisplayTable: React.FunctionComponent = ({\r\n\ttradelog,\r\n}) => {\r\n\tconst { getString, getNumberString } = React.useContext(LocalizationContext);\r\n//\tconst [values, displayValue] = useAttributeValues();\r\n\r\n\tconst [auth] = useAuth();\r\n\r\n\tif (auth.status !== \"successful\") {\r\n\t\treturn null;\r\n\t}\r\n\r\n\tif (!tradelog || tradelog.length === 0) {\r\n\t\treturn (\r\n\t\t\t\r\n\t\t\t\t\t{ auth.user.roleCode !== \"MEMTRADER\" && auth.user.roleCode !== \"MEMMANAGER\" && auth.user.roleCode !== \"MEMCONTACT\" && ( \r\n\t\t\t\t{getString(\"orderLogDataEmpty\")} )}\r\n\t\t\t\r\n\t\t);\r\n\t}\r\n\r\n\treturn (\r\n\t\t\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\t{getString(\"orderLogDataTable\")} \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t{tradelog &&\r\n\t\t\t\t\t\ttradelog.map(tradelog => (\r\n\t\t\t\t\t\t\t\r\n{/*\t\t\t\t\t\t\t\t{attribute.attrName} */}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t{tradelog.changeTime}\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{tradelog.userName}\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{tradelog.activity}\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{tradelog.status}\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 \r\n\t\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};\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const printTrade = (user: User, tradeid: string) => {\r\n\treturn httpWebApi({\r\n\t\tmethod: \"GET\",\r\n\t\tresponseType: \"blob\",\r\n\t\ttimeout: 60 * 4 * 1000,\r\n\t\turl: \"reporting/gettradeconfreport\",\r\n\t\tparams: {\r\n\t\t\tuserid: user.userId,\r\n\t\t\ttradeid,\r\n\t\t},\r\n\t});\r\n};\r\n\r\nexport default printTrade;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { printTradeThunk } from \"../thunks/printTradeThunk\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { TradeList } from \"../types\";\r\nimport { setPrintTradeFetchState } from \"../../../../data/trading/trades/tradesDataSlice\";\r\n\r\nexport const useTradePrinter = (trade?: TradeList) => {\r\n\tconst fetchState = useSelector(\r\n\t\ts => s.data.trading.trades.printTradeFetchState\r\n\t);\r\n\tconst dispatch = useDispatch();\r\n\r\n\tconst download = React.useCallback(() => {\r\n\t\t\tdispatch(printTradeThunk(trade));\r\n\t}, [dispatch, trade]);\r\n\r\n\tconst dispatchSetFetch = React.useCallback(() => { // Ovo da prvo izađe customDialog box\r\n\t\tdispatch(setPrintTradeFetchState({ type: \"started\" }))\r\n\t},\t[dispatch] );\r\n\t\r\n\treturn [download, fetchState, dispatchSetFetch] as [typeof download, typeof fetchState, typeof dispatchSetFetch];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { printTrade } from \"../../trades/api/printTrade\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setPrintTradeFetchState } from \"../tradesDataSlice\";\r\nimport { TradeList } from \"../types\";\r\n\r\nexport const printTradeThunk = (trade?: TradeList): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\t\r\n\tif (store.data.auth.current.status !== \"successful\" || !trade || !trade.tradeId) {\r\n\t\treturn undefined;\r\n\t}\r\n\tconst lan = store.ux.localization.language\r\n\tconst filename = `TradeConfirmation_${trade.tradeNo}.pdf`\r\n\tconst user = store.data.auth.current.user;\r\n\tdispatch(setPrintTradeFetchState({ type: \"started\" }));\r\n\tconst tradesReport = await dispatch(printTrade(user, trade.tradeId));\r\n\tif (tradesReport) {\r\n\t\tfileDownload(new Blob([tradesReport as any], { type: \"application/pdf\" }), filename);\r\n\t}\r\n\tdispatch(setPrintTradeFetchState({ type: \"not-started\" }));\r\n};\r\n","import React from \"react\";\r\nimport { useDisplayTrade } from \"../../../data/trading/trades/hooks/useDisplayTrades\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { TradeList } from \"../../../data/trading/trades/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { DisplayTradeMainAttributes } from \"./DisplayTradeMainAttributes\";\r\nimport {\r\n ExpansionPanel,\r\n ExpansionPanelSummary,\r\n Typography,\r\n Grid,IconButton,\r\n} from \"@material-ui/core\";\r\nimport { DisplayTradeLogData } from \"./DisplayTradeLogData\";\r\nimport { useTradePrinter } from \"../../../data/trading/trades/hooks/useTradePrinter\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\n//import PrintIcon from \"@material-ui/icons/PrintOutlined\";\r\n//import { useAuth } from \"../../../data/auth/hooks\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport { CustomDialog } from \"../../components/common/CustomDialog\";\r\nimport { DisplayAttributes } from \"../orders/attributes/DisplayAttributes\";\r\n\r\nexport interface DisplayTradeProps {\r\n id?: string;\r\n\tenablePrint?: boolean;\r\n}\r\n\r\nexport const DisplayTrade: React.FunctionComponent = ({\r\n id,\r\n enablePrint,\r\n}) => {\r\n const trade = useDisplayTrade(id);\r\n const { getString } = React.useContext(LocalizationContext);\r\n\tconst [print, fetchState, setfetch] = useTradePrinter(trade);\r\n \r\n //const [auth] = useAuth();\r\n //{auth.status === \"successful\" && auth.user.roleCode == \"MEMTRADER\" && (\r\n\r\n return !trade ? (\r\n <>{\"loading placeholder\"}\r\n ) : (\r\n \r\n \r\n \r\n \r\n \r\n {getString(\"tableBasciInfo\")}\r\n \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\r\n\t\t\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\r\n { fetchState.type !== \"not-started\" ? getString(\"pleaseWait\") : null }\r\n\t\t\t\t\t\t\t\r\n \r\n \r\n \r\n\t\t\t\t\r\n\t\t\t\t \r\n \r\n\r\n\t \t{/*\r\n */}\r\n\r\n \r\n );\r\n};\r\n\r\nexport const useViewTrade = () => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n return React.useCallback(\r\n (trade: TradeList) => showWithDrawer(),\r\n [showWithDrawer]\r\n );\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { TradeList } from \"../types\";\r\n\r\nexport const cancelTradeApi = (userId: string, tradeid: string) =>\r\n webApi({\r\n method: \"PUT\",\r\n url: \"trade/canceltrade\",\r\n params: {\r\n userId,\r\n tradeid,\r\n },\r\n });\r\n\r\nexport default cancelTradeApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { cancelTrade } from \"../thunks/cancelTrade\";\r\nimport { setCancelTradeFetchState } from \"../tradesDataSlice\";\r\n\r\nexport const useTradeCancel = () => {\r\n\tconst fetchState = useSelector(\r\n\t\tstore => store.data.trading.trades.cancelFetchState\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchCancelOrder = React.useCallback(\r\n\t\t(id: string) => dispatch(cancelTrade(id)),\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\tReact.useEffect(() => {\r\n\t\treturn () => {\r\n\t\t\tdispatch(setCancelTradeFetchState({ type: \"not-started\" }))\r\n\t\t}\r\n\t}, [dispatch])\r\n\r\n\treturn [fetchState, dispatchCancelOrder] as [typeof fetchState, typeof dispatchCancelOrder]\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { cancelTradeApi } from \"../api/cancelTrade\";\r\nimport { setCancelTradeFetchState, invalidateTrades } from \"../tradesDataSlice\";\r\n\r\nexport const cancelTrade = (tradeId: string): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setCancelTradeFetchState({ type: \"started\" }));\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst result = await dispatch(cancelTradeApi(userId, tradeId));\r\n\r\n\tif (result !== undefined)\r\n\t{\r\n\t\tdispatch(invalidateTrades());\r\n\t\tdispatch(setCancelTradeFetchState({ type: \"successful\" }));\r\n\t} else {\r\n\t\tdispatch(setCancelTradeFetchState({ type: \"error\"}));\r\n\t}\r\n};\r\n","import React from \"react\";\r\nimport { DisplayTrade } from \"./DisplayTrade\";\r\nimport { TradeList } from \"../../../data/trading/trades/types\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { Grid, Typography, Button, Paper } from \"@material-ui/core\";\r\nimport { useTradeCancel } from \"../../../data/trading/trades/hooks/useTradeCancel\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\n\r\nexport interface CancelTradeProps {\r\n\ttradeId: string;\r\n\tcancel: () => void;\r\n}\r\n\r\nexport const CancelTrade: React.FunctionComponent = ({ tradeId: orderId, cancel }) => {\r\n\tconst [state, cancelTrade] = useTradeCancel();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (state.type === \"successful\") cancel();\r\n\t}, [state, cancel]);\r\n\r\n\treturn (\r\n\t\t\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\t{getString(\"orderTradeQuestion\")}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t cancelTrade(orderId)}\r\n\t\t\t\t\t\t\t\tdisabled={state.type !== \"not-started\"}\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t{getString(\"orderCancelQuestionYes\")}\r\n\t\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{getString(\"orderCancelQuestionNo\")}\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\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport const useShowCancelTrade = () => {\r\n\tconst showWithDrawer = React.useContext(DisplayDrawerContext);\r\n\treturn React.useCallback(\r\n\t\t(trade: TradeList) =>\r\n\t\t\tshowWithDrawer( showWithDrawer(undefined)} />),\r\n\t\t[showWithDrawer]\r\n\t);\r\n};\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport ViewIcon from \"@material-ui/icons/InputOutlined\";\r\nimport CancelIcon from \"@material-ui/icons/CancelOutlined\";\r\nimport { TradeList } from \"../../../data/trading/trades/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { MaterialTableProps } from \"material-table\";\r\nimport { useViewTrade } from \"./DisplayTrade\";\r\nimport { useShowCancelTrade } from \"./CancelTrade\";\r\nimport { useAuth } from \"../../../data/auth/hooks\";\r\n\r\nexport function useTradeActions() {\r\n\tconst { getString } = useContext(LocalizationContext);\r\n\tconst onShowTrade = useViewTrade();\r\n\tconst onCancelTrade = useShowCancelTrade();\r\n\tconst [auth] = useAuth();\r\n\r\n\treturn useMemo[\"actions\"]>(\r\n\t\t() => [\r\n\t\t\t{\r\n\t\t\t\ticon: () => ,\r\n\t\t\t\ttooltip: getString(\"tradeViewAction\"),\r\n\t\t\t\tonClick: (event, rowData) => onShowTrade(rowData as TradeList),\r\n\t\t\t},\r\n\t\t\ttrans => ({\r\n\t\t\t\ticon: () => ,\r\n\t\t\t\ttooltip: getString(\"tradeCancelAction\"),\r\n\t\t\t\tonClick: (event, rowData) => onCancelTrade(rowData as TradeList),\r\n\t\t\t\thidden: auth.status !== \"successful\" || auth.user.userIsEmployee !== 1 || auth.user.roleCode !== \"CONTROL\" || trans.status === 40 ,\r\n\t\t\t}),\r\n\t\t],\r\n\t\t[onShowTrade, getString, onCancelTrade, auth]\r\n\t);\r\n}\r\n","import { TradeList } from \"../../../data/trading/trades/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\nimport { useOrderMarketOptionsTranslator } from \"../../../data/trading/orders/hooks/useOrderMarketOptions\";\r\nimport { TurnocateText } from \"../orders/columRenderers\";\r\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\r\nimport { useTheme } from '@material-ui/core/styles';\r\n\r\nexport const useTradeColumns = () => {\r\n\tconst { getString, getDateTimeString, getFormatedNumberString } = React.useContext(LocalizationContext);\r\n\tconst marketTranslator = useOrderMarketOptionsTranslator();\r\n\r\n\tconst theme = useTheme();\r\n\tconst screenExtraSmall = useMediaQuery(theme.breakpoints.only('xs'));\r\n\r\n\treturn React.useMemo(\r\n\t\t() => [\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"tradeNo\"),\r\n\t\t\t\tfield: \"tradeNo\",\r\n\t\t\t\tsorting: false,\r\n\t\t\t\twidth: \"70px\",\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\tmaxWidth: \"70px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\tmaxWidth: \"70px\",\r\n\t\t\t\t},\r\n\t\t\t\thidden: screenExtraSmall,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"tradeTime\"),\r\n\t\t\t\trender: trade => getDateTimeString(trade.tradeTime),\r\n\t\t\t\tsorting: false,\r\n\t\t\t\twidth: \"180px\",\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\tmaxWidth: \"180px\",\r\n\t\t\t\t\tminWidth: \"180px\",\r\n\t\t\t\t\twidth: \"180px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\tmaxWidth: \"180px\",\r\n\t\t\t\t\tminWidth: \"180px\",\r\n\t\t\t\t\twidth: \"180px\",\r\n\t\t\t\t},\r\n\t\t\t\thidden: screenExtraSmall,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"clientNameSell\"),\r\n\t\t\t\trender: trade => ,\r\n\t\t\t\tsorting: false,\r\n\t\t\t\twidth: \"180px\",\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\tmaxWidth: \"180px\",\r\n\t\t\t\t\twidth: \"180px\",\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\tmaxWidth: \"180px\",\r\n\t\t\t\t\twidth: \"180px\",\r\n\t\t\t\t},\r\n\t\t\t\thidden: screenExtraSmall,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"clientNameBuy\"),\r\n\t\t\t\trender: trade => ,\r\n\t\t\t\tsorting: false,\r\n\t\t\t\twidth: \"180px\",\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\tmaxWidth: \"180px\",\r\n\t\t\t\t\twidth: \"180px\",\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\tmaxWidth: \"180px\",\r\n\t\t\t\t\twidth: \"180px\",\r\n\t\t\t\t},\r\n\t\t\t\thidden: screenExtraSmall,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"tradeProdName\"),\r\n\t\t\t\tfield: \"prodName\",\r\n\t\t\t\tsorting: false,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"tradeQty\"),\r\n\t\t\t\trender: trade => `${getFormatedNumberString(trade.qty)} ${trade.unitDescr}`,\r\n\t\t\t\tsorting: false,\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\tminWidth: \"130px\",\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\tminWidth: \"130px\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t},\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"orderPrice\"),\r\n\t\t\t\trender: trade => getFormatedNumberString(trade.price, true),\r\n\t\t\t\tsorting: false,\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t},\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"orderMarket\"),\r\n\t\t\t\trender: trade => marketTranslator(trade.market),\r\n\t\t\t\tsorting: false,\r\n\t\t\t\thidden: screenExtraSmall,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"tradeStatusDescr\"),\r\n\t\t\t\tfield: \"statusDescr\",\r\n\t\t\t\tsorting: false,\r\n\t\t\t\thidden: screenExtraSmall,\r\n\t\t\t},\r\n\t\t],\r\n\t\t[getString, getDateTimeString, getFormatedNumberString, marketTranslator,screenExtraSmall]\r\n\t) as Column[];\r\n};\r\n","import React from \"react\";\r\nimport { TradeList } from \"../../../data/trading/trades/types\";\r\nimport {\r\n PaginationTable,\r\n PaginationDataProps,\r\n} from \"../../components/common/PagginationTable\";\r\nimport { useTradeActions } from \"./useTradeActions\";\r\nimport { useTradeColumns } from \"./useTradeColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\r\nimport { useTheme } from '@material-ui/core/styles';\r\n\r\nexport interface TradeTableProps {\r\n userAccessRights: AccessRights;\r\n getData: () => void;\r\n}\r\n\r\ntype TradeTablePropsType = TradeTableProps & PaginationDataProps;\r\n\r\nconst TradesTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n getData,\r\n ...tableProps\r\n}) => {\r\n const actions = useTradeActions();\r\n const columns = useTradeColumns();\r\n\r\n const theme = useTheme();\r\n const screenExtraSmall = useMediaQuery(theme.breakpoints.only('xs'));\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={getData}\r\n // immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n actions={actions}\r\n options={{\r\n\t\t\t\tactionsColumnIndex: screenExtraSmall === true ? 0 : -1 ,\r\n search: false,\r\n toolbar: false,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default TradesTable;\r\n","import { TradeList, GetTradesParams, TradeFilter } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nconst getTradesWebApi = (\r\n user: User,\r\n page?: number,\r\n itemsPerPage?: number,\r\n filter?: TradeFilter,\r\n) => {\r\n\r\n const params: GetTradesParams = {\r\n userid: user.userId,\r\n numofrows: itemsPerPage,\r\n fromrow: page && itemsPerPage ? page * itemsPerPage : undefined,\r\n status: filter?.tradeStatus?.ftValue,\r\n datefrom: getParamsDateString(filter?.datefrom),\r\n dateto: getParamsDateString(filter?.dateto),\r\n prodid: filter?.product?.prodId,\r\n delivstatus: filter?.delivstatus?.ftValue,\r\n cliid: user.clientId,\r\n market: filter?.market,\r\n clientid: user.roleCode !== \"MEMTRADER\" && user.roleCode !== \"MEMMANAGER\" && user.roleCode !== \"MEMCONTACT\"? filter?.client?.cliId : \"\",\r\n client2id: user.roleCode === \"MEMTRADER\" || user.roleCode === \"MEMMANAGER\" || user.roleCode === \"MEMCONTACT\"? filter?.client?.cliId : \"\",\r\n };\r\n\r\n return webApiWithResponse({\r\n method: \"GET\",\r\n url: \"trade/gettradelist\",\r\n params,\r\n });\r\n};\r\n\r\nexport default getTradesWebApi;\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getTrades from \"../api/getTrades\";\r\nimport { PageDataStatus, PageData } from \"../../../models\";\r\nimport { TradeFilter, TradeList } from \"../types\";\r\n\r\nexport const getTradesThunk = (\r\n\tpageNumber?: number,\r\n\titemsPerPage?: number,\r\n\tfilter?: TradeFilter\r\n): ThunkType | undefined>> => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst user = store.data.auth.current.user;\r\n\r\n\tconst tradesData = await dispatch(getTrades(user, pageNumber, itemsPerPage, filter));\r\n\r\n\tif (!tradesData || tradesData.resCode !== \"OK\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\treturn {\r\n\t\tcurrentPageData: tradesData.obj,\r\n\t\ttotalCount: Number(tradesData.resDesc) || 0,\r\n\t\tstatus: PageDataStatus.DataCurrent,\r\n\t};\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { setTrades } from \"../tradesDataSlice\";\r\nimport { setTradesIndex } from \"../tradesUXSlice\";\r\nimport { PageIndex } from \"../../../models\";\r\nimport { getTradesThunk } from \"./getTradesThunk\";\r\n\r\nexport const loadTrades = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tconst { pageNumber, itemsPerPage } = store.ux.trading.trades.index;\r\n\tconst { filter } = store.ux.trading.trades;\r\n\r\n\tconst tradesData = await dispatch(getTradesThunk(pageNumber, itemsPerPage, filter));\r\n\r\n\tif (tradesData) {\r\n\t\tdispatch(setTrades(tradesData));\r\n\t}\r\n};\r\n\r\nexport const setTradesIndexThunk = (index: PageIndex): ThunkType => dispatch => {\r\n\tdispatch(setTradesIndex(index));\r\n\tdispatch(loadTrades());\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { resetTradeIdices } from \"../tradesUXSlice\";\r\nimport { PageIndex } from \"../../../../data/models\";\r\nimport { setTradesIndexThunk } from \"../thunks/loadTrades\";\r\n\r\nexport const useTradeIndex = () => {\r\n const pageIndex = useSelector((s) => s.ux.trading.trades.index);\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetIndex = React.useCallback(\r\n (index: PageIndex) => dispatch(setTradesIndexThunk(index)),\r\n [dispatch]\r\n );\r\n const dispatchResetIndex = React.useCallback(\r\n () => dispatch(resetTradeIdices()),\r\n [dispatch]\r\n );\r\n\r\n return [pageIndex, dispatchSetIndex, dispatchResetIndex] as [\r\n typeof pageIndex,\r\n typeof dispatchSetIndex,\r\n typeof dispatchResetIndex\r\n ];\r\n};\r\n","import React from \"react\";\r\nimport { Chip, Grid } from \"@material-ui/core\";\r\nimport { TradeFilter } from \"../../../data/trading/trades/types\"\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { useOrderMarketOptionsTranslator } from \"../../../data/trading/orders/hooks/useOrderMarketOptions\";\r\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\r\nimport { useTheme } from '@material-ui/core/styles';\r\n\r\nexport const TradesFilterChips: React.FunctionComponent = ({\r\n\tfilter,\r\n\tremnoveFilter,\r\n}) => {\r\n\tconst { getDateString, getString } = React.useContext(LocalizationContext);\r\n\tconst marketTranslator = useOrderMarketOptionsTranslator();\r\n\r\n\tconst theme = useTheme();\r\n\tconst screenExtraSmall = useMediaQuery(theme.breakpoints.only('xs'));\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t{filter.datefrom && !screenExtraSmall && (\r\n\t\t\t\t\r\n\t\t\t\t\t remnoveFilter(\"datefrom\")}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\r\n\t\t\t)}\r\n\t\t\t{filter.dateto && !screenExtraSmall && (\r\n\t\t\t\t\r\n\t\t\t\t\t remnoveFilter(\"dateto\")}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\r\n\t\t\t)}\r\n\t\t\t{filter.product && !screenExtraSmall && (\r\n\t\t\t\t\r\n\t\t\t\t\t remnoveFilter(\"product\")}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\r\n\t\t\t)}\r\n\t\t\t{filter.client && !screenExtraSmall && (\r\n\t\t\t\t\r\n\t\t\t\t\t remnoveFilter(\"client\")}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\r\n\t\t\t)}\r\n\t\t\t{filter.market !== undefined && typeof(filter.market) == 'number' && !screenExtraSmall && (\r\n\t\t\t\t\r\n\t\t\t\t\t remnoveFilter(\"market\")}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\r\n\t\t\t)}\r\n\t\t\t{filter.tradeStatus && !screenExtraSmall && (\r\n\t\t\t\t\r\n\t\t\t\t\t remnoveFilter(\"tradeStatus\")}\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};\r\n\r\ninterface TradeFilterChipsProps {\r\n\tfilter: TradeFilter;\r\n\tremnoveFilter: (type: keyof TradeFilter) => void;\r\n}\r\n","import { useSelector } from \"react-redux\";\r\nimport { StoreType } from \"../../../core/store/reducers\";\r\nimport { OrderStatus } from \"../../models\";\r\n\r\nconst getStatusLabel = (status?: OrderStatus) => (status ? status.ftDescr : \"\");\r\n\r\nexport const useTradeStatuses = () => {\r\n\tconst statuses = useSelector(store => store.data.initialData.tradeStatuses);\r\n\r\n\treturn [statuses, getStatusLabel] as [typeof statuses, typeof getStatusLabel];\r\n};\r\n","import React from \"react\";\r\nimport { useTradeStatuses } from \"../../../data/initialData/hooks/useTradeStatuses\";\r\nimport { TradeStatus } from \"../../../data/models\";\r\nimport {\r\n AutocompleteSelect,\r\n AutocompleteSelectType,\r\n} from \"./AutocompleteSelect\";\r\n\r\ntype RegionSelectPropsType = Omit<\r\n AutocompleteSelectType,\r\n \"data\" | \"getLabel\"\r\n>;\r\n\r\n\r\nexport const TradeStatusSelect: React.FunctionComponent = (\r\n props\r\n) => {\r\n const [statuses, renderStatus] = useTradeStatuses();\r\n\r\n return (\r\n \r\n data={statuses}\r\n getLabel={renderStatus}\r\n {...(props as any)}\r\n />\r\n );\r\n};\r\n","import React from \"react\";\r\nimport { Paper, Grid, Button } from \"@material-ui/core\";\r\nimport { DateInput } from \"../../components/common/DateInput\";\r\nimport { ProductSelect } from \"../../components/listing/ProductSelect\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { TradeStatusSelect } from \"../../components/common/TradeStatusSelect\";\r\nimport { isValidDate } from \"../../../core/util/functions\";\r\nimport { TradeFilter } from \"../../../data/trading/trades/types\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { OrderMarketSelect } from \"../orders/OrderMarketSelect\";\r\nimport { ClientSelect } from \"../../components/listing/ClientSelect\";\r\nimport { useAuth } from \"../../../data/auth/hooks\";\r\n\r\nexport interface TradesFilterEditorProps {\r\n\tfilter?: TradeFilter;\r\n\teditFilter: (prop: keyof TradeFilter, value: any) => void;\r\n\tsave: () => void;\r\n\treset: () => void;\r\n}\r\n\r\nexport const TradesFilterEditor: React.FunctionComponent = ({\r\n\tfilter,\r\n\teditFilter,\r\n\tsave,\r\n\treset,\r\n}) => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst showWithDrawer = React.useContext(DisplayDrawerContext);\r\n\r\n\tconst [auth] = useAuth();\r\n\r\n\tif (auth.status !== \"successful\") {\r\n\t\treturn null;\r\n\t}\r\n\r\n\treturn (\r\n\t\t\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\t\r\n\t\t\t\t\t\t\t\teditFilter(\"datefrom\", isValidDate(date) ? date.toISOString() : undefined)\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\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\teditFilter(\"dateto\", isValidDate(date) ? date.toISOString() : undefined)\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\t\r\n\t\t\t\t\t prod.prodId === filter?.product?.prodId}\r\n\t\t\t\t\t\tonChangeItem={prod => {\r\n\t\t\t\t\t\t\teditFilter(\"product\", prod);\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\t\r\n\t\t\t\t\t editFilter(\"market\", e.target.value)}\r\n\t\t\t\t\t\tmarket={filter?.market}\r\n\t\t\t\t\t\tnullable\r\n\t\t\t\t\t/>\r\n\t\t\t\t\r\n\r\n\t\t\t\t\r\n\t\t\t\t\t client.cliId === filter?.client?.cliId}\r\n\t\t\t\t\t\tonChangeItem={client => editFilter(\"client\", client)}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\r\n\r\n\t\t\t\t\r\n\t\t\t\t\t status.ftValue === filter?.tradeStatus?.ftValue}\r\n\t\t\t\t\t\tonChangeItem={status => {\r\n\t\t\t\t\t\t\teditFilter(\"tradeStatus\", status);\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\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\tsave();\r\n\t\t\t\t\t\t\t\tshowWithDrawer(undefined);\r\n\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t{getString(\"orderFilterConfirm\")}\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};\r\n","import React from \"react\";\r\nimport FilterIcon from \"@material-ui/icons/FilterListOutlined\";\r\nimport { IconButton, Grid } from \"@material-ui/core\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { useTradesFilter, useCurrentTradesFilter } from \"../../../data/trading/trades/hooks/useTradesFilter\";\r\nimport { TradesFilterChips } from \"./TradesFilterChips\";\r\nimport { TradesFilterEditor } from \"./TradesFilterEditor\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\r\nimport { useTheme } from '@material-ui/core/styles';\r\n\r\nexport const TradesFilterButton: React.FunctionComponent = () => {\r\n\tconst showWithDrawer = React.useContext(DisplayDrawerContext);\r\n\tconst showFilter = React.useCallback(() => showWithDrawer(), [showWithDrawer]);\r\n\r\n\tconst theme = useTheme();\r\n\tconst screenExtraSmall = useMediaQuery(theme.breakpoints.only('xs'));\r\n\r\n\tconst [filter, remnoveFilter] = useCurrentTradesFilter();\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\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\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};\r\n\r\nconst TradesFilterDrawer: React.FunctionComponent = () => {\r\n\tconst [filter, editFilter, save, , reset] = useTradesFilter();\r\n\r\n\treturn ;\r\n};\r\n","import { useCopiedState } from \"../../../../core/util/hooks\";\r\nimport { setFilter, removeFilter, initialState } from \"../tradesUXSlice\"\r\nimport { invalidateTrades } from \"../tradesDataSlice\"\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport React from \"react\";\r\nimport { TradeFilter } from \"../types\";\r\n\r\n\r\nexport const useTradesFilter = () => {\r\n\tconst storeFilter = useSelector(store => store.ux.trading.trades.filter);\r\n\tconst [filter, editFilter, changeState, setCurrentFilter] = useCopiedState(storeFilter);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchSetFilter = React.useCallback(() => {\r\n\t\tdispatch(setFilter(filter!))\r\n\t\tdispatch(invalidateTrades())\r\n\t}, [dispatch, filter])\r\n\r\n\tconst dispatchResetFilter = React.useCallback(() => {\r\n\t\tsetCurrentFilter(initialState.filter)\r\n\t}, [setCurrentFilter])\r\n\r\n\treturn [\r\n\t\tfilter,\r\n\t\teditFilter,\r\n\t\tdispatchSetFilter,\r\n\t\tchangeState, \r\n\t\tdispatchResetFilter\r\n\t] as [\r\n\t\ttypeof filter,\r\n\t\ttypeof editFilter,\r\n\t\ttypeof dispatchSetFilter,\r\n\t\ttypeof changeState,\r\n\t\ttypeof dispatchResetFilter\r\n\t]\r\n};\r\n\r\nexport const useCurrentTradesFilter = () => {\r\n\tconst filter = useSelector(store => store.ux.trading.trades.filter);\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchRemoveFilter = React.useCallback(\r\n\t\t(type: keyof TradeFilter) => {\r\n\t\t\tdispatch(removeFilter(type));\r\n\t\t\tdispatch(invalidateTrades());\r\n\t\t},\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\treturn [filter, dispatchRemoveFilter] as [typeof filter, typeof dispatchRemoveFilter];\r\n};\r\n","import TradesPage from \"./TradesPage\";\r\nimport { NavigationItem } from \"../../../core/navigation/types\";\r\nimport { tradesLocation } from \"./Locations\";\r\n\r\nexport const tradesComponents: NavigationItem[] = [\r\n {\r\n Component: TradesPage,\r\n isMenuItem: true,\r\n path: tradesLocation,\r\n notifications: true,\r\n },\r\n];\r\n","import React from \"react\";\r\nimport { Grid, CardContent, CardHeader, Card, Divider, Fab } from \"@material-ui/core\";\r\nimport TradesTable from \"./TradesTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { PageComponent } from \"../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { useTradesData } from \"../../../data/trading/trades/hooks/useTradesData\";\r\nimport { useTradeIndex } from \"../../../data/trading/trades/hooks/useTradesIndex\";\r\nimport { TradesFilterButton } from \"./TradesFilter\";\r\nimport { PageDataStatus } from \"../../../data/models\";\r\nimport { useNotificationHandler } from \"../../../core/notifications/hooks\";\r\n\r\nconst TradesPage: PageComponent = ({ userAccessRights }) => {\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst [pageData, dispatchLoadTradesPage, invalidateData] = useTradesData();\r\n\tconst [pageIndex, dispatchSetIndex] = useTradeIndex();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (pageData && pageData.status === PageDataStatus.DataInvalidated) {\r\n\t\t\tdispatchLoadTradesPage();\r\n\t\t}\r\n\t}, [dispatchLoadTradesPage, pageData]);\r\n\r\n\tReact.useEffect(() => () => { invalidateData() }, [])\r\n\r\n\tuseNotificationHandler(\r\n\t\t\"TradeChange\",\r\n\t\te => {\r\n\t\t\tconsole.log(\"TradeChange\", e);\r\n\t\t\tinvalidateData();\r\n\t\t},\r\n\t\t[]\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\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\t}\r\n\t\t\t\t\t\t\taction={}\r\n\t\t\t\t\t\t/>\r\n\t\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\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};\r\n\r\nexport default TradesPage;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadTrades } from \"../thunks/loadTrades\";\r\nimport { TradeList } from \"../types\";\r\nimport { PageData } from \"../../../../data/models\";\r\nimport { invalidateTrades } from \"../tradesDataSlice\";\r\n\r\nexport const useTradesData = () => {\r\n\tconst pageData = useSelector | undefined>(\r\n\t\ts => s.data.trading.trades.currentPage\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchLoadTradesPage = React.useCallback(() => dispatch(loadTrades()), [dispatch]);\r\n\r\n\tconst dispatchInvalidate = React.useCallback(() => dispatch(invalidateTrades()), [dispatch]);\r\n\r\n\treturn [pageData, dispatchLoadTradesPage, dispatchInvalidate] as [\r\n\t\ttypeof pageData,\r\n\t\ttypeof dispatchLoadTradesPage,\r\n\t\ttypeof dispatchInvalidate\r\n\t];\r\n};\r\n","export const tradesLocation = \"/trading/trades\";\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { Order } from \"../types\";\r\n\r\nexport const cancelOrderApi = (userId: string, ordid: string) =>\r\n webApi({\r\n method: \"PUT\",\r\n url: \"order/cancelorder\",\r\n params: {\r\n userId,\r\n ordid,\r\n },\r\n });\r\n\r\nexport default cancelOrderApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { cancelOrder } from \"../thunks/cancelOrderThunk\";\r\nimport { setCancelOrderFetchState } from \"../../mainBoard/ordersDataSlice\";\r\n\r\nexport const useCancelOrder = () => {\r\n\tconst fetchState = useSelector(\r\n\t\tstore => store.data.trading.mainBoard.cancelOrderFetchState\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchCancelOrder = React.useCallback(\r\n\t\t(id: string) => dispatch(cancelOrder(id)),\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\tReact.useEffect(() => {\r\n\t\treturn () => {\r\n\t\t\tdispatch(setCancelOrderFetchState({ type: \"not-started\" }))\r\n\t\t}\r\n\t}, [dispatch])\r\n\r\n\treturn [fetchState, dispatchCancelOrder] as [typeof fetchState, typeof dispatchCancelOrder]\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { cancelOrderApi } from \"../api/cancelOrder\";\r\nimport { setCancelOrderFetchState, invalidateOrders } from \"../../mainBoard/ordersDataSlice\";\r\n\r\nexport const cancelOrder = (orderId: string): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setCancelOrderFetchState({ type: \"started\" }));\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst result = await dispatch(cancelOrderApi(userId, orderId));\r\n\r\n\tif (result !== undefined)\r\n\t{\r\n\t\tdispatch(invalidateOrders());\r\n\t\tdispatch(setCancelOrderFetchState({ type: \"successful\" }));\r\n\t} else {\r\n\t\tdispatch(setCancelOrderFetchState({ type: \"error\"}));\r\n\t}\r\n};\r\n","import React from \"react\";\r\nimport { DisplayOrder } from \"./DisplayOrder\";\r\nimport { ViewOrder } from \"../../../data/trading/orders/types\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { Grid, Typography, Button, Paper } from \"@material-ui/core\";\r\nimport { useCancelOrder } from \"../../../data/trading/orders/hooks/useOrderCancel\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { DiplayOrderMod } from \"./DisplayOrderMainAttributes\";\r\n\r\nexport interface CancelOrderProps {\r\n\torderId: string;\r\n\tcancel: () => void;\r\n}\r\n\r\nexport const CancelOrder: React.FunctionComponent = ({ orderId, cancel }) => {\r\n\tconst [state, cancelOrder] = useCancelOrder();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (state.type === \"successful\") cancel();\r\n\t}, [state, cancel]);\r\n\r\n\treturn (\r\n\t\t<>\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\t\r\n\t\t\t\t\t\t\t{getString(\"orderCancelQuestion\")}\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 cancelOrder(orderId)}\r\n\t\t\t\t\t\t\t\t\tdisabled={state.type !== \"not-started\"}\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t{getString(\"orderCancelQuestionYes\")}\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\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};\r\n\r\nexport const useShowCancelOrder = () => {\r\n\tconst showWithDrawer = React.useContext(DisplayDrawerContext);\r\n\treturn React.useCallback(\r\n\t\t(order: ViewOrder) =>\r\n\t\t\tshowWithDrawer( showWithDrawer(undefined)} />),\r\n\t\t[showWithDrawer]\r\n\t);\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { Order } from \"../types\";\r\n\r\nexport const delOrderApi = (userId: string, ordid: string) =>\r\n webApi({\r\n method: \"DELETE\",\r\n url: \"order/delorder\",\r\n params: {\r\n userId,\r\n ordid,\r\n },\r\n });\r\n\r\nexport default delOrderApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { delOrder } from \"../thunks/delOrderThunk\";\r\nimport { setDeleteOrderFetchState } from \"../../mainBoard/ordersDataSlice\";\r\n\r\nexport const useDeleteOrder = () => {\r\n\tconst fetchState = useSelector(\r\n\t\tstore => store.data.trading.mainBoard.deleteOrderFetchState\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchDelOrder = React.useCallback(\r\n\t\t(id: string) => dispatch(delOrder(id)),\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\tReact.useEffect(() => {\r\n\t\treturn () => {\r\n\t\t\tdispatch(setDeleteOrderFetchState({ type: \"not-started\" }))\r\n\t\t}\r\n\t}, [dispatch])\r\n\r\n\treturn [fetchState, dispatchDelOrder] as [typeof fetchState, typeof dispatchDelOrder]\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { delOrderApi } from \"../api/delOrder\";\r\nimport { setDeleteOrderFetchState, invalidateOrders } from \"../../mainBoard/ordersDataSlice\";\r\n\r\nexport const delOrder = (orderId: string): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setDeleteOrderFetchState({ type: \"started\" }));\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst result = await dispatch(delOrderApi(userId, orderId));\r\n\r\n\tif (result !== undefined)\r\n\t{\r\n\t\tdispatch(invalidateOrders());\r\n\t\tdispatch(setDeleteOrderFetchState({ type: \"successful\" }));\r\n\t} else {\r\n\t\tdispatch(setDeleteOrderFetchState({ type: \"error\"}));\r\n\t}\r\n};\r\n","import React from \"react\";\r\nimport { DisplayOrder } from \"./DisplayOrder\";\r\nimport { ViewOrder } from \"../../../data/trading/orders/types\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { Grid, Typography, Button, Paper } from \"@material-ui/core\";\r\nimport { useCancelOrder } from \"../../../data/trading/orders/hooks/useOrderCancel\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { DiplayOrderMod } from \"./DisplayOrderMainAttributes\";\r\nimport { useDeleteOrder} from \"../../../data/trading/orders/hooks/useOrderDel\";\r\n\r\nexport interface DeleteOrderProps {\r\n\torderId: string;\r\n\tcancel: () => void;\r\n}\r\n\r\nexport const DeleteOrder: React.FunctionComponent = ({ orderId, cancel }) => {\r\n//\tconst [state, cancelOrder] = useCancelOrder();\r\n\tconst [state, deleteOrder] = useDeleteOrder();\r\n\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (state.type === \"successful\") cancel();\r\n\t}, [state, cancel]);\r\n\r\n\treturn (\r\n\t\t<>\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\t\r\n\t\t\t\t\t\t\t{getString(\"orderDelete\")}\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 deleteOrder(orderId)}\r\n\t\t\t\t\t\t\t\t\tdisabled={state.type !== \"not-started\"}\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t{getString(\"orderCancelQuestionYes\")}\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\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};\r\n\r\nexport const useShowDeleteOrder = () => {\r\n\tconst showWithDrawer = React.useContext(DisplayDrawerContext);\r\n\treturn React.useCallback(\r\n\t\t(order: ViewOrder) =>\r\n\t\t\tshowWithDrawer( showWithDrawer(undefined)} />),\r\n\t\t[showWithDrawer]\r\n\t);\r\n};\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport ViewIcon from \"@material-ui/icons/InputOutlined\";\r\nimport VerifyIcon from '@material-ui/icons/EventAvailableOutlined';\r\nimport CancelIcon from '@material-ui/icons/CancelOutlined';\r\nimport MofifyIcoon from '@material-ui/icons/EditOutlined';\r\nimport DeleteIcoon from '@material-ui/icons/DeleteOutlined';\r\nimport { ViewOrder } from \"../../../data/trading/orders/types\";\r\nimport { OrdersEditAction } from \"../../../data/trading/orders/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { MaterialTableProps } from \"material-table\";\r\nimport { useViewOrder } from \"../orders/DisplayOrder\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { getOrderEditLocation, OrdersEditParts } from \"../mainBoard/Locations\";\r\nimport { useShowCancelOrder } from \"../orders/CancelOrder\";\r\nimport { DiplayOrderMod } from \"../orders/DisplayOrderMainAttributes\";\r\nimport { useAuth } from \"../../../data/auth/hooks\";\r\nimport { useDeleteOrder} from \"../../../data/trading/orders/hooks/useOrderDel\";\r\nimport { RowingOutlined } from \"@material-ui/icons\";\r\nimport { useShowDeleteOrder } from \"../orders/DeleteOrder\";\r\n\r\nexport function useOrderBookActions() {\r\n const { getString } = useContext(LocalizationContext);\r\n const onShowOBOrder = useViewOrder(DiplayOrderMod.Full, true);\r\n const onModifyOrder = useEditOrder(OrdersEditAction.Modify);\r\n const onVerifyOrder = useEditOrder(OrdersEditAction.Verify);\r\n const onCancelOrder = useShowCancelOrder();\r\n// const onDeleteOrder = useDeleteOrderAction();\r\n const onDeleteOrder = useShowDeleteOrder();\r\n\r\n const [auth] = useAuth();\r\n\r\n return useMemo(() => {\r\n const result: MaterialTableProps[\"actions\"] = [\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"orderActView\"),\r\n onClick: (event, rowData) => onShowOBOrder(rowData as ViewOrder),\r\n },\r\n row => ({\r\n icon: () => ,\r\n tooltip: row.statusN === 2 ? getString(\"orderConfirm\") : getString(\"orderVerify\"),\r\n// tooltip: auth.status === \"successful\" && auth.user.roleCode===\"MEMTRADER\" ? getString(\"orderConfirm\") : getString(\"orderVerify\"),\r\n onClick: (event, rowData) => onVerifyOrder(rowData as ViewOrder),\r\n hidden: row.canVerify !== 1,\r\n }),\r\n row => ({\r\n icon: () => ,\r\n tooltip: getString(\"orderCancel\"),\r\n onClick: (event, rowData) => onCancelOrder(rowData as ViewOrder),\r\n hidden: row.canCancel !== 1,\r\n }),\r\n row => ({\r\n icon: () => ,\r\n tooltip: getString(\"orderModify\"),\r\n onClick: (event, rowData) => onModifyOrder(rowData as ViewOrder),\r\n hidden: row.canReplace !== 1,\r\n }),\r\n row => ({\r\n icon: () => ,\r\n tooltip: getString(\"orderDelete\"),\r\n onClick: (event, rowData) => onDeleteOrder(rowData as ViewOrder),\r\n hidden: row.canDelete !== 1,\r\n }),\r\n ];\r\n return result;\r\n }, [onShowOBOrder, onVerifyOrder, getString, onModifyOrder, onCancelOrder,onDeleteOrder]);\r\n}\r\n\r\nexport const useReplyOrderBookOrder = () => {\r\n const history = useHistory();\r\n return React.useCallback((order: ViewOrder) => history.push(\"\"), [history]);\r\n};\r\n\r\nexport const useEditOrder = (action: OrdersEditAction) => {\r\n const history = useHistory();\r\n\treturn React.useCallback(\r\n\t\t(order: ViewOrder) =>\r\n\t\t\thistory.push(\r\n\t\t\t\tgetOrderEditLocation(action, OrdersEditParts.BasicInfo, order.ordId)\r\n\t\t\t),\r\n\t\t[history, action]\r\n\t);\r\n};\r\n\r\nexport const useDeleteOrderAction = () => {\r\n const [, deleteOrder] = useDeleteOrder();\r\n return React.useCallback(\r\n async (order: ViewOrder) => {\r\n if (order.ordId ) {\r\n await deleteOrder(order.ordId);\r\n }\r\n },\r\n [deleteOrder]\r\n );\r\n};\r\n","import { ViewOrder } from \"../../../data/trading/orders/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\nimport { renderOrderPrice, renderClient, TurnocateText } from \"../orders/columRenderers\";\r\nimport { useOrderMarketOptionsTranslator } from \"../../../data/trading/orders/hooks/useOrderMarketOptions\";\r\n\r\nexport const useOrderBookColumns = () => {\r\n const { getString, getFormatedNumberString } = React.useContext(LocalizationContext);\r\n const marketTranslator = useOrderMarketOptionsTranslator()\r\n\r\n\treturn React.useMemo(\r\n\t\t() => [\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"orderClmOrdNo\"),\r\n\t\t\t\tfield: \"ordNo\",\r\n sorting: false,\r\n width: \"100px\",\r\n cellStyle: {\r\n maxWidth: \"100px\",\r\n minWidth: \"100px\",\r\n width: \"100px\",\r\n },\r\n headerStyle: {\r\n maxWidth: \"100px\",\r\n minWidth: \"100px\",\r\n width: \"100px\",\r\n },\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"orderTimeReceived\"),\r\n\t\t\t\trender: order => order.timeReceived,\r\n\t\t\t\tsorting: false,\r\n width: \"180px\",\r\n cellStyle: {\r\n maxWidth: \"180px\",\r\n minWidth: \"180px\",\r\n width: \"180px\",\r\n },\r\n headerStyle: {\r\n maxWidth: \"180px\",\r\n minWidth: \"180px\",\r\n width: \"180px\",\r\n },\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"orderClientName\"),\r\n\t\t\t\trender: renderClient,\r\n\t\t\t\tsorting: false,\r\n width: \"200px\",\r\n cellStyle: {\r\n maxWidth: \"200px\",\r\n minWidth: \"200px\",\r\n width: \"200px\",\r\n whiteSpace: \"nowrap\"\r\n },\r\n headerStyle: {\r\n maxWidth: \"200px\",\r\n minWidth: \"200px\",\r\n width: \"200px\",\r\n },\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"orderSide\"),\r\n\t\t\t\tfield: \"side\",\r\n\t\t\t\tsorting: false,\r\n width: \"80px\",\r\n cellStyle: {\r\n maxWidth: \"80px\",\r\n minWidth: \"80px\",\r\n width: \"80px\",\r\n },\r\n headerStyle: {\r\n maxWidth: \"80px\",\r\n minWidth: \"80px\",\r\n width: \"80px\",\r\n },\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"orderPrice\"),\r\n\t\t\t\trender: renderOrderPrice,\r\n\t\t\t\tsorting: false,\r\n headerStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\"\r\n },\r\n cellStyle: {\r\n\t\t\t\t\ttextAlign: \"end\"\r\n \t\t},\r\n\t\t\t},\r\n {\r\n\t\t\t\ttitle: getString(\"orderQty\"),\r\n\t\t\t\trender: order => `${getFormatedNumberString(order.qty)} ${order.unit}`,\r\n\t\t\t\tsorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\"\r\n },\r\n headerStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\"\r\n },\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"orderProduct\"),\r\n\t\t\t\tfield: \"product\",\r\n\t\t\t\tsorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\"\r\n },\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"orderMarket\"),\r\n render: order => marketTranslator(order.market),\r\n\t\t\t\tsorting: false,\r\n width: \"70px\",\r\n cellStyle: {\r\n maxWidth: \"70px\",\r\n minWidth: \"70px\",\r\n width: \"70px\",\r\n },\r\n headerStyle: {\r\n maxWidth: \"70px\",\r\n minWidth: \"70px\",\r\n width: \"70px\",\r\n },\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"orderStatus\"),\r\n render: order => (),\r\n\t\t\t\tsorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\"\r\n },\r\n\t\t\t},\r\n\t\t],\r\n\t\t[getString, getFormatedNumberString, marketTranslator]\r\n\t) as Column[];\r\n};\r\n","import React from \"react\";\r\nimport { ViewOrder } from \"../../../data/trading/orders/types\";\r\nimport { PaginationTable, PaginationDataProps } from \"../../components/common/PagginationTable\";\r\nimport { useOrderBookActions } from \"./useOrderBookActions\";\r\nimport { useOrderBookColumns } from \"./useOrderBookColumns\";\r\nimport { useOrderBookColumnsClient } from \"./useOrderBookColumnsClient\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\nimport { useOrderRowColor } from \"../orders/useOrderRowColor\";\r\nimport { useAuth } from \"../../../data/auth/hooks\";\r\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\r\nimport { useTheme } from '@material-ui/core/styles';\r\n\r\nexport interface OrderBookTableProps {\r\n\tuserAccessRights: AccessRights;\r\n\tgetData: () => void;\r\n}\r\n\r\ntype OrderBookTablePropsType = OrderBookTableProps & PaginationDataProps;\r\n\r\nconst OrdersBookTable: React.FunctionComponent = ({\r\n\tuserAccessRights,\r\n\tgetData,\r\n\t...tableProps\r\n}) => {\r\n\r\n const [auth] = useAuth();\r\n\r\n const theme = useTheme();\r\n const screenExtraSmall = useMediaQuery(theme.breakpoints.only('xs'));\r\n\r\n const actions = useOrderBookActions();\r\n const columns = useOrderBookColumns();\r\n const columnsClient = useOrderBookColumnsClient();\r\n const rowStyle = useOrderRowColor()\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t{...tableProps}\r\n\t\t\tgetData={getData}\r\n\t\t\ttitle=\"\"\r\n\t\t\tcolumns={auth.status === \"successful\" && auth.user.roleCode !== \"MEMTRADER\" && auth.user.roleCode !== \"MEMMANAGER\" && auth.user.roleCode !== \"MEMCONTACT\" ? columns: columnsClient}\r\n\t\t\tactions={actions}\r\n\t\t\toptions={{\r\n\t\t\t\tactionsColumnIndex: screenExtraSmall === true ? 0 : -1 ,\r\n\t\t\t\tsearch: false,\r\n\t\t\t\ttoolbar: false,\r\n\t\t\t\tactionsCellStyle: {\r\n\t\t\t\t\twidth: \"100px\",\r\n\t\t\t\t\tmaxWidth: \"100px\",\r\n\t\t\t\t},\r\n rowStyle\r\n }}\r\n\t\t/>\r\n\t);\r\n};\r\n\r\nexport default OrdersBookTable;\r\n","import { ViewOrder } from \"../../../data/trading/orders/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\nimport { renderOrderPrice, renderClient, TurnocateText } from \"../orders/columRenderers\";\r\nimport { useOrderMarketOptionsTranslator } from \"../../../data/trading/orders/hooks/useOrderMarketOptions\";\r\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\r\nimport { useTheme } from '@material-ui/core/styles';\r\n\r\nexport const useOrderBookColumnsClient = () => {\r\n const { getString, getFormatedNumberString } = React.useContext(LocalizationContext);\r\n const marketTranslator = useOrderMarketOptionsTranslator()\r\n\r\n const theme = useTheme();\r\n\tconst screenExtraSmall = useMediaQuery(theme.breakpoints.only('xs'));\r\n\r\n\treturn React.useMemo(\r\n\t\t() => [\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"orderClmOrdNo\"),\r\n\t\t\t\tfield: \"ordNo\",\r\n sorting: false,\r\n width: \"100px\",\r\n cellStyle: {\r\n maxWidth: \"100px\",\r\n minWidth: \"100px\",\r\n width: \"100px\",\r\n },\r\n headerStyle: {\r\n maxWidth: \"100px\",\r\n minWidth: \"100px\",\r\n width: \"100px\",\r\n },\r\n\t\t\t\thidden: screenExtraSmall,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"orderTimeReceived\"),\r\n\t\t\t\trender: order => order.timeReceived,\r\n\t\t\t\tsorting: false,\r\n width: \"180px\",\r\n cellStyle: {\r\n maxWidth: \"180px\",\r\n minWidth: \"180px\",\r\n width: \"180px\",\r\n },\r\n headerStyle: {\r\n maxWidth: \"180px\",\r\n minWidth: \"180px\",\r\n width: \"180px\",\r\n },\r\n\t\t\t\thidden: screenExtraSmall,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"orderSide\"),\r\n\t\t\t\tfield: \"side\",\r\n\t\t\t\tsorting: false,\r\n width: \"80px\",\r\n cellStyle: {\r\n maxWidth: \"80px\",\r\n minWidth: \"80px\",\r\n width: \"80px\",\r\n },\r\n headerStyle: {\r\n maxWidth: \"80px\",\r\n minWidth: \"80px\",\r\n width: \"80px\",\r\n },\r\n\t\t\t\thidden: screenExtraSmall,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"orderPrice\"),\r\n\t\t\t\trender: renderOrderPrice,\r\n\t\t\t\tsorting: false,\r\n headerStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\"\r\n },\r\n cellStyle: {\r\n\t\t\t\t\ttextAlign: \"end\"\r\n \t\t},\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"orderQty\"),\r\n\t\t\t\trender: order => `${getFormatedNumberString(order.qty)} ${order.unit}`,\r\n\t\t\t\tsorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\"\r\n },\r\n headerStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\"\r\n },\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"orderProduct\"),\r\n\t\t\t\tfield: \"product\",\r\n\t\t\t\tsorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\"\r\n },\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"orderMarket\"),\r\n render: order => marketTranslator(order.market),\r\n\t\t\t\tsorting: false,\r\n width: \"70px\",\r\n cellStyle: {\r\n maxWidth: \"70px\",\r\n minWidth: \"70px\",\r\n width: \"70px\",\r\n },\r\n headerStyle: {\r\n maxWidth: \"70px\",\r\n minWidth: \"70px\",\r\n width: \"70px\",\r\n },\r\n\t\t\t\thidden: screenExtraSmall,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"orderStatus\"),\r\n render: order => (),\r\n\t\t\t\tsorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\"\r\n },\r\n\t\t\t\thidden: screenExtraSmall,\r\n\t\t\t},\r\n\t\t],\r\n\t\t[getString, getFormatedNumberString, marketTranslator,screenExtraSmall]\r\n\t) as Column[];\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadOrderBook } from \"../thunks/loadAllOrderBook\";\r\nimport { ViewOrder } from \"../../orders/types\";\r\nimport { PageData } from \"../../../models\";\r\nimport { invalidateOrders } from \"../orderBookDataSlice\";\r\n\r\nexport const useOrderBookData = () => {\r\n const pageData = useSelector | undefined>(\r\n (s) => s.data.trading.orderBook.currentPage\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadOrderBookPage = React.useCallback(\r\n () => dispatch(loadOrderBook()),\r\n [dispatch]\r\n );\r\n\r\n const dispatchInvalidateOrders = React.useCallback(\r\n () => dispatch(invalidateOrders()),\r\n [dispatch]\r\n );\r\n\r\n return [pageData, dispatchLoadOrderBookPage, dispatchInvalidateOrders] as [\r\n typeof pageData,\r\n typeof dispatchLoadOrderBookPage,\r\n typeof invalidateOrders,\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { setOrders, invalidateOrders } from \"../orderBookDataSlice\";\r\nimport { setOrdersIndex } from \"../orderBookUXSlice\";\r\nimport { PageIndex } from \"../../../models\";\r\nimport { getOrdersThunk } from \"../../orders/thunks/getOrdersThunk\";\r\n\r\nexport const loadOrderBook = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tconst { pageNumber, itemsPerPage } = store.ux.trading.orderBook.index;\r\n\tconst { filter } = store.ux.trading.orderBook;\r\n\r\n\tconst pagedOrders = await dispatch(getOrdersThunk(pageNumber, itemsPerPage, filter));\r\n\r\n\tif (pagedOrders) {\r\n\t\tdispatch(setOrders(pagedOrders));\r\n\t}\r\n};\r\n\r\nexport const setOrdersIndexThunk = (index: PageIndex): ThunkType => dispatch => {\r\n\tdispatch(setOrdersIndex(index));\r\n\tdispatch(invalidateOrders());\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { resetOrderIdices } from \"../orderBookUXSlice\";\r\nimport { PageIndex } from \"../../../models\";\r\nimport { setOrdersIndexThunk } from \"../thunks/loadAllOrderBook\";\r\n\r\nexport const useOrderBookIndex = () => {\r\n\tconst pageIndex = useSelector(s => s.ux.trading.orderBook.index);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchSetIndex = React.useCallback((index: PageIndex) => dispatch(setOrdersIndexThunk(index)), [\r\n\t\tdispatch,\r\n\t]);\r\n\tconst dispatchResetIndex = React.useCallback(() => dispatch(resetOrderIdices()), [dispatch]);\r\n\r\n\treturn [pageIndex, dispatchSetIndex, dispatchResetIndex] as [\r\n\t\ttypeof pageIndex,\r\n\t\ttypeof dispatchSetIndex,\r\n\t\ttypeof dispatchResetIndex\r\n\t];\r\n};\r\n","import { useCopiedState } from \"../../../../core/util/hooks\";\r\nimport { OrderFilter } from \"../../../models\";\r\nimport { setFilter, removeFilter, initialState } from \"../orderBookUXSlice\";\r\nimport { invalidateOrders } from \"../orderBookDataSlice\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport React from \"react\";\r\n\r\nexport const useOrderBookFilter = () => {\r\n\tconst [storeFilter] = useCurrentOrderBookFilter();\r\n\tconst [filter, editFilter, changeState, setCurrentFilter] = useCopiedState(storeFilter, true);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchSetFilter = React.useCallback(() => {\r\n\t\tdispatch(setFilter(filter!));\r\n\t\tdispatch(invalidateOrders());\r\n\t}, [dispatch, filter]);\r\n\r\n\tconst dispatchResetFilter = React.useCallback(() => {\r\n\t\tsetCurrentFilter(initialState.filter)\r\n\t}, [setCurrentFilter]);\r\n\r\n\treturn [filter, editFilter, dispatchSetFilter, changeState, dispatchResetFilter] as [\r\n\t\ttypeof filter,\r\n\t\ttypeof editFilter,\r\n\t\ttypeof dispatchSetFilter,\r\n\t\ttypeof changeState,\r\n\t\ttypeof dispatchResetFilter\r\n\t];\r\n};\r\n\r\nexport const useCurrentOrderBookFilter = () => {\r\n\tconst filter = useSelector(store => store.ux.trading.orderBook.filter);\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchRemoveFilter = React.useCallback(\r\n\t\t(type: keyof OrderFilter) => {\r\n\t\t\tdispatch(removeFilter(type));\r\n\t\t\tdispatch(invalidateOrders());\r\n\t\t},\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\treturn [filter, dispatchRemoveFilter] as [typeof filter, typeof dispatchRemoveFilter];\r\n};\r\n","import React from \"react\";\r\nimport FilterIcon from \"@material-ui/icons/FilterListOutlined\";\r\nimport { IconButton, Grid } from \"@material-ui/core\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport {\r\n\tuseOrderBookFilter,\r\n\tuseCurrentOrderBookFilter,\r\n} from \"../../../data/trading/orderBook/hooks/useOrderBookFilter\";\r\nimport { OrderFilterEditor, OrderFilterEditorType, OrderFilterChips } from \"../orders/OrderFilterEditor\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\r\nimport { useTheme } from '@material-ui/core/styles';\r\n\r\nexport const OrderBookFilterButton: React.FunctionComponent = () => {\r\n\tconst showWithDrawer = React.useContext(DisplayDrawerContext);\r\n\tconst showFilter = React.useCallback(() => showWithDrawer(), [showWithDrawer]);\r\n\r\n\tconst theme = useTheme();\r\n\tconst screenExtraSmall = useMediaQuery(theme.breakpoints.only('xs'));\r\n\r\n\tconst [filter, remnoveFilter] = useCurrentOrderBookFilter();\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\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\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};\r\n\r\nconst OrderBookFilterEditor: React.FunctionComponent = () => {\r\n\tconst [filter, editFilter, save, , reset] = useOrderBookFilter();\r\n\treturn (\r\n\t\t\r\n\t);\r\n};\r\n","import OrderBook from \"./OrderBook\";\r\nimport { NavigationItem } from \"../../../core/navigation/types\";\r\nimport { orderBookLocation, baseEdit } from \"./Locations\";\r\nimport { EditOrderPage } from \"../orders/EditOrderPage\"\r\n\r\nexport const orderBookComponents: NavigationItem[] = [\r\n\t{\r\n\t\tComponent: OrderBook,\r\n\t\tisMenuItem: true,\r\n\t\tpath: orderBookLocation,\r\n\t\tnotifications: true,\r\n\t},\r\n\t{\r\n\t\tComponent: EditOrderPage,\r\n\t\tisMenuItem: false,\r\n\t\tpath: baseEdit,\r\n\t},\r\n];\r\n","import React from \"react\";\r\nimport { Grid, CardContent, CardHeader, Card, Divider, Fab } from \"@material-ui/core\";\r\nimport OrdersTable from \"./OrderBookTable\";\r\nimport AddIcon from \"@material-ui/icons/Add\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { PageComponent, AccessRights } from \"../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { useOrderBookData } from \"../../../data/trading/orderBook/hooks/useOrderBookData\";\r\nimport { useOrderBookIndex } from \"../../../data/trading/orderBook/hooks/useOrderBookIndex\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { getOrderEditLocation } from \"../mainBoard/Locations\";\r\nimport { PageDataStatus } from \"../../../data/models\";\r\nimport { OrderBookFilterButton } from \"./OrderBookFilter\";\r\nimport { useAuth } from \"../../../data/auth/hooks\";\r\nimport { useNotificationHandler } from \"../../../core/notifications/hooks\";\r\nimport moment from \"moment\";\r\n\r\nconst OrderBook: PageComponent = ({ userAccessRights }) => {\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst [pageData, dispatchLoadOrders, invalidateData] = useOrderBookData();\r\n\tconst [pageIndex, dispatchSetIndex] = useOrderBookIndex();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (pageData && pageData.status === PageDataStatus.DataInvalidated) {\r\n\t\t\tdispatchLoadOrders();\r\n\t\t}\r\n\t}, [dispatchLoadOrders, pageData]);\r\n\r\n\tReact.useEffect(() => () => { invalidateData() }, [])\r\n\r\n\tconst history = useHistory();\r\n\r\n\tconst [auth] = useAuth();\r\n\r\n\tuseNotificationHandler(\r\n\t\t\"OrderChanged\",\r\n\t\te => {\r\n\t\t\tconsole.log(\"OrderChanged\", e);\r\n\t\t\tinvalidateData();\r\n\t\t},\r\n\t\t[]\r\n\t);\r\n\r\n\tif (auth.status !== \"successful\") {\r\n\t\treturn null;\r\n\t}\r\n\r\n const radnovreme = moment().hour()>8 && moment().hour()<14\r\n\tconsole.log(radnovreme)\r\n\r\n\treturn (\r\n\t\t<>\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\t}\r\n\t\t\t\t\t\t\taction={}\r\n\t\t\t\t\t\t/>\r\n\t\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\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t{userAccessRights === AccessRights.All && (auth.user.roleCode === \"BROKER\" || auth.user.roleCode === \"MEMTRADER\" || auth.user.roleCode === \"MEMMANAGER\"\r\n\t\t\t || auth.user.roleCode === \"MEMCONTACT\") && (\r\n\t\t\t\t history.push(getOrderEditLocation())}\r\n\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};\r\n\r\nexport default OrderBook;\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport ViewIcon from \"@material-ui/icons/InputOutlined\";\r\nimport ReplyIcon from \"@material-ui/icons/ReplyOutlined\";\r\nimport { ViewOrder } from \"../../../data/trading/orders/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { MaterialTableProps } from \"material-table\";\r\nimport { useViewOrder } from \"../orders/DisplayOrder\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { getOrderEditLocation, OrdersEditParts } from \"./Locations\";\r\nimport { OrdersEditAction } from \"../../../data/trading/orders/types\";\r\nimport { DiplayOrderMod } from \"../orders/DisplayOrderMainAttributes\";\r\n\r\nexport function useOrderActions() {\r\n\t// onShowOrder?: (order: ViewOrder) => void,\r\n\t// onReplayToOrder?: (order: ViewOrder) => void\r\n\tconst { getString } = useContext(LocalizationContext);\r\n\tconst onShowMBOrder = useViewOrder(DiplayOrderMod.PublicData);\r\n\tconst onReplayToOrder = useReplyMBOrder();\r\n\r\n\treturn useMemo(() => {\r\n\t\tconst result: MaterialTableProps[\"actions\"] = [\r\n\t\t\t{\r\n\t\t\t\ticon: () => ,\r\n\t\t\t\ttooltip: getString(\"orderActView\"),\r\n\t\t\t\tonClick: (event, rowData) => onShowMBOrder(rowData as ViewOrder),\r\n\t\t\t},\r\n\t\t\trow => ({\r\n\t\t\t\ticon: () => ,\r\n\t\t\t\ttooltip: getString(\"orderActReply\"),\r\n\t\t\t\tonClick: (event, rowData) => onReplayToOrder(rowData as ViewOrder),\r\n\t\t\t\thidden: row.canReplace !== 1,\r\n\t\t\t}),\r\n\t\t];\r\n\t\treturn result;\r\n\t}, [onShowMBOrder, onReplayToOrder, getString]);\r\n}\r\n\r\nexport const useReplyMBOrder = () => {\r\n\tconst history = useHistory();\r\n\treturn React.useCallback(\r\n\t\t(order: ViewOrder) =>\r\n\t\t\thistory.push(\r\n\t\t\t\tgetOrderEditLocation(OrdersEditAction.Replay, OrdersEditParts.BasicInfo, order.ordId)\r\n\t\t\t),\r\n\t\t[history]\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport { ViewOrder } from \"../../../data/trading/orders/types\";\r\nimport {\r\n PaginationTable,\r\n PaginationDataProps,\r\n} from \"../../components/common/PagginationTable\";\r\nimport { useOrderActions } from \"./useOrderActions\";\r\nimport { useOrderColumns } from \"./useOrderColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\nimport { useOrderRowColor } from \"../orders/useOrderRowColor\";\r\n\r\nexport interface OrderTableProps {\r\n // onShowOrder?: (order: ViewOrder) => void;\r\n // onReplayToOrder?: (order: ViewOrder) => void;\r\n userAccessRights: AccessRights;\r\n getData: () => void;\r\n}\r\n\r\ntype OrderTablePropsType = OrderTableProps & PaginationDataProps;\r\n\r\nconst OrdersTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n getData,\r\n ...tableProps\r\n}) => {\r\n const actions = useOrderActions();\r\n const columns = useOrderColumns();\r\n const rowStyle = useOrderRowColor()\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={getData}\r\n // immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n actions={actions}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n rowStyle\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default OrdersTable;\r\n","import { ViewOrder } from \"../../../data/trading/orders/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\nimport { renderOrderPrice, TooltipElises } from \"../orders/columRenderers\";\r\nimport { useOrderMarketOptionsTranslator } from \"../../../data/trading/orders/hooks/useOrderMarketOptions\";\r\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\r\nimport { useTheme } from '@material-ui/core/styles';\r\n\r\nexport const useOrderColumns = () => {\r\n\tconst { getString, getFormatedNumberString } = React.useContext(LocalizationContext);\r\n\tconst marketTranslator = useOrderMarketOptionsTranslator();\r\n\r\n\tconst theme = useTheme();\r\n\tconst screenExtraSmall = useMediaQuery(theme.breakpoints.only('xs'));\r\n\r\n\treturn React.useMemo(\r\n\t\t() => [\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"orderTimeReceived\"),\r\n\t\t\t\trender: order => order.timeReceived,\r\n\t\t\t\tsorting: false,\r\n\t\t\t\twidth: \"150px\",\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\tmaxWidth: \"150px\",\r\n\t\t\t\t\tminWidth: \"150px\",\r\n\t\t\t\t\twidth: \"150px\",\r\n\t\t\t\t\tpaddingRight: 0,\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\tmaxWidth: \"150px\",\r\n\t\t\t\t\tminWidth: \"150px\",\r\n\t\t\t\t\twidth: \"150px\",\r\n\t\t\t\t\tpaddingRight: 0,\r\n\t\t\t\t},\r\n\t\t\t\thidden: screenExtraSmall,\r\n\t\t\t\t\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"orderProduct\"),\r\n//\t\t\t\trender: order => (\r\n//\t\t\t\t\t\r\n//\t\t\t\t),\r\n\t\t\t\trender: order => (\r\n\t\t\t\t\t\r\n\t\t\t\t),\r\n\t\t\t\tsorting: false,\r\n\t\t\t\twidth: \"125px\",\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\tmaxWidth: \"125px\",\r\n\t\t\t\t\tminWidth: \"110px\",\r\n\t\t\t\t\twidth: \"125px\",\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextOverflow: \"ellipsis\",\r\n\t\t\t\t\toverflowX: \"hidden\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\tmaxWidth: \"125px\",\r\n\t\t\t\t\tminWidth: \"110px\",\r\n\t\t\t\t\twidth: \"125px\",\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextOverflow: \"ellipsis\",\r\n\t\t\t\t\toverflowX: \"hidden\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t\thidden: screenExtraSmall,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"orderProduct\"),\r\n//\t\t\t\trender: order => (\r\n//\t\t\t\t\t\r\n//\t\t\t\t),\r\n\t\t\t\trender: order => (\r\n\t\t\t\t\t\r\n\t\t\t\t),\r\n\t\t\t\tsorting: false,\r\n\t\t\t\twidth: \"80px\",\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\tmaxWidth: \"80px\",\r\n\t\t\t\t\tminWidth: \"80px\",\r\n\t\t\t\t\twidth: \"80px\",\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextOverflow: \"ellipsis\",\r\n\t\t\t\t\toverflowX: \"hidden\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\tmaxWidth: \"80px\",\r\n\t\t\t\t\tminWidth: \"80px\",\r\n\t\t\t\t\twidth: \"80px\",\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextOverflow: \"ellipsis\",\r\n\t\t\t\t\toverflowX: \"hidden\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t\thidden: !screenExtraSmall,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"orderPrice\"),\r\n\t\t\t\trender: renderOrderPrice,\r\n\t\t\t\tsorting: false,\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"orderQty\"),\r\n\t\t\t\trender: order => `${getFormatedNumberString(order.qtyLeft || order.qty)} ${order.unit}`,\r\n\t\t\t\tsorting: false,\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"orderMarket\"),\r\n\t\t\t\trender: order => marketTranslator(order.market),\r\n\t\t\t\tsorting: false,\r\n\t\t\t\twidth: \"80px\",\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\tmaxWidth: \"80px\",\r\n\t\t\t\t\tminWidth: \"80px\",\r\n\t\t\t\t\twidth: \"80px\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\tmaxWidth: \"80px\",\r\n\t\t\t\t\tminWidth: \"80px\",\r\n\t\t\t\t\twidth: \"80px\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t\thidden: screenExtraSmall,\r\n\t\t\t},\r\n\t\t],\r\n\t\t[getString, marketTranslator, getFormatedNumberString, screenExtraSmall]\r\n\t) as Column[];\r\n};\r\n","import React from \"react\";\r\nimport FilterIcon from \"@material-ui/icons/FilterListOutlined\";\r\nimport { IconButton, Grid } from \"@material-ui/core\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport {\r\n\tuseMainBoardFilter,\r\n\tuseCurrentMainBoardFilter,\r\n} from \"../../../data/trading/mainBoard/hooks/useMainBoardFilter\";\r\nimport { OrderFilterEditor, OrderFilterEditorType, OrderFilterChips } from \"../orders/OrderFilterEditor\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\r\nimport { useTheme } from '@material-ui/core/styles';\r\n\r\nexport const MainBoarFilterButton: React.FunctionComponent = () => {\r\n\tconst showWithDrawer = React.useContext(DisplayDrawerContext);\r\n\tconst showFilter = React.useCallback(() => showWithDrawer(), [showWithDrawer]);\r\n\r\n\tconst theme = useTheme();\r\n\tconst screenExtraSmall = useMediaQuery(theme.breakpoints.only('xs'));\r\n\r\n\tconst [filter, remnoveFilter] = useCurrentMainBoardFilter();\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\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\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};\r\n\r\nconst MainBoarFilterEditor: React.FunctionComponent = () => {\r\n\tconst [filter, editFilter, save, , rest] = useMainBoardFilter();\r\n\treturn (\r\n\t\t\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport { CardContent, Card, Typography } from \"@material-ui/core\";\r\nimport { useTickerData } from \"../../../data/trading/ticker/hooks/useTickerData\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport Ticker from \"react-ticker\";\r\nimport { useCapacitorAppState } from \"../../../core/util/useCapacitorAppState\";\r\n\r\nexport const PriceTicker: React.FunctionComponent = () => {\r\n\tconst { getDateString, getFormatedNumberString } = React.useContext(LocalizationContext);\r\n\tconst { isVisiable } = useCapacitorAppState()\r\n\tconst [data] = useTickerData(isVisiable);\r\n\tconst [move, setMove] = React.useState(true);\r\n\tconsole.log(\"Ticker visiable: \", isVisiable)\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{data && data.length > 0 && isVisiable && (\r\n\t\t\t\t\r\n\t\t\t\t\t setMove(false)}\r\n\t\t\t\t\t\tonMouseLeave={() => setMove(true)}\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t{({ index }) => {\r\n\t\t\t\t\t\t\t\tconst priceData = data[index % data.length];\r\n\t\t\t\t\t\t\t\treturn (\r\n\t\t\t\t\t\t\t\t\t<>\r\n\t\t\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\t\t{`${priceData.prodName} (${getDateString(priceData.tradeTime, \"DD.MM.\")}): ${getFormatedNumberString(priceData.price, true)}`}\r\n\t\t\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);\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\t);\r\n};\r\n","import React, { useContext } from \"react\";\r\nimport { Grid, CardContent, CardHeader, Card, Divider, Typography, Tabs, Tab } from \"@material-ui/core\";\r\nimport OrdersTable from \"./OrdersTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { PageComponent } from \"../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { useMainBoardData } from \"../../../data/trading/mainBoard/hooks/useMainBoardData\";\r\nimport { useMainBoardIndex } from \"../../../data/trading/mainBoard/hooks/useMainBoardIndex\";\r\nimport { OrderSide, PageDataStatus } from \"../../../data/models\";\r\nimport { MainBoarFilterButton } from \"./MainBoardFilter\";\r\nimport { useNotificationHandler } from \"../../../core/notifications/hooks\";\r\nimport { PriceTicker } from \"./Ticker\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { SideOverviewParts } from \"./Locations\";\r\nimport { ProductGraph } from \"../mainBoard/ProductGraph\";\r\n\r\nconst MainBoard: PageComponent = ({ userAccessRights }) => {\r\n\tconst pageStyles = usePageStyles();\r\n\tconst { getString } = useContext(LocalizationContext);\r\n\r\n\tconst [tab, setTab] = React.useState(SideOverviewParts.Sell);\r\n\r\n\tconst [buyPageData, dispatchLoadBuyOrders, invalidateData] = useMainBoardData(OrderSide.Buy);\r\n\tconst [buyPageIndex, dispatchSetBuyIndex] = useMainBoardIndex(OrderSide.Buy);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (buyPageData && buyPageData.status === PageDataStatus.DataInvalidated) {\r\n\t\t\tdispatchLoadBuyOrders();\r\n\t\t}\r\n\t}, [dispatchLoadBuyOrders, buyPageData]);\r\n\r\n\tconst [sellPageData, dispatchLoadSellOrders] = useMainBoardData(OrderSide.Sell);\r\n\tconst [sellPageIndex, dispatchSetSellIndex] = useMainBoardIndex(OrderSide.Sell);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (sellPageData && sellPageData.status === PageDataStatus.DataInvalidated) {\r\n\t\t\tdispatchLoadSellOrders();\r\n\t\t}\r\n\t}, [dispatchLoadSellOrders, sellPageData]);\r\n\r\n\tconst handleSideChange = React.useCallback(\r\n\t\t(event: React.ChangeEvent<{}>, newValue: any) => {\r\n\t\t\tsetTab(newValue);\r\n\t\t},\r\n\t\t[setTab]\r\n\t);\r\n\r\n\tReact.useEffect(\r\n\t\t() => () => {\r\n\t\t\tinvalidateData();\r\n\t\t},\r\n\t\t[]\r\n\t);\r\n\r\n\tuseNotificationHandler(\r\n\t\t\"OrderChanged\",\r\n\t\te => {\r\n\t\t\tconsole.log(\"OrderChanged\", e);\r\n\t\t\tinvalidateData();\r\n\t\t},\r\n\t\t[]\r\n\t);\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\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\taction={}\r\n\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\r\n\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\t
\r\n\t\t\t\t\t\t\t{tab === SideOverviewParts.Buy && (\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t{tab === SideOverviewParts.Sell && (\r\n\t\t\t\t\t\t\t\t\r\n\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\t\r\n\t\t\t\t\r\n\t\t\t\r\n\r\n\t\t
\r\n\t);\r\n};\r\n\r\nexport default MainBoard;\r\n","import MainBoard from \"./MainBoard\";\r\nimport { NavigationItem } from \"../../../core/navigation/types\";\r\nimport { mainBoardMLocation, baseEdit } from \"./Locations\";\r\nimport { EditOrderPage } from \"../orders/EditOrderPage\"\r\n\r\nexport const mainBoardMComponents: NavigationItem[] = [\r\n\t{\r\n\t\tComponent: MainBoard,\r\n\t\tisMenuItem: true,\r\n\t\tpath: mainBoardMLocation,\r\n\t\tnotifications: true,\r\n\t},\r\n\t{\r\n\t\tComponent: EditOrderPage,\r\n\t\tisMenuItem: false,\r\n\t\tpath: baseEdit,\r\n\t},\r\n];\r\n","import React from \"react\";\r\nimport { CardContent, CardHeader, Card, Divider, Typography, Grid } from \"@material-ui/core\";\r\nimport { useGraphData } from \"../../../data/trading/ticker/hooks/useGraphData\";\r\nimport { useGraphPeriod } from \"../../../data/trading/ticker/hooks/useGraphPeriod\";\r\nimport { ToggleButton, ToggleButtonGroup } from \"@material-ui/lab\";\r\nimport { ChartPeriod } from \"../../../data/trading/ticker/types\";\r\nimport { CartesianGrid, Line, LineChart, XAxis, Tooltip, YAxis, ResponsiveContainer } from \"recharts\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { ProductSelect } from \"../../components/listing/ProductSelect\";\r\nimport { useGraphProduct } from \"../../../data/trading/ticker/hooks/useGraphProduct\";\r\n\r\nexport interface ProductGraphProps {\r\n\tgraphId: string;\r\n}\r\n\r\nexport const ProductGraph: React.FunctionComponent = ({ graphId }) => {\r\n\tconst { getString, getDateString, getDateTimeString, getFormatedNumberString } = React.useContext(\r\n\t\tLocalizationContext\r\n\t);\r\n\r\n\tconst [prodId, setProdId] = useGraphProduct(graphId);\r\n\tconst [data] = useGraphData(graphId);\r\n\tconst [period, setPeriod] = useGraphPeriod(graphId);\r\n\t\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t prod.prodId === prodId}\r\n\t\t\t\t\t\t\t\tonChangeItem={prod => {\r\n\t\t\t\t\t\t\t\t\tsetProdId(prod ? prod.prodId : undefined);\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\t\r\n\t\t\t\t\t\t\t setPeriod(v)}\r\n\t\t\t\t\t\t\t\tsize=\"small\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t1M\r\n\t\t\t\t\t\t\t\t3M\r\n\t\t\t\t\t\t\t\t6M\r\n\t\t\t\t\t\t\t\tYTD\r\n\t\t\t\t\t\t\t\t1Y\r\n\t\t\t\t\t\t\t\tAll\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\t\t\r\n\t\t\t\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\t getDateString(date, \"DD.MM.\")} />\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t [\r\n\t\t\t\t\t\t\t\tgetFormatedNumberString(value as any, true),\r\n\t\t\t\t\t\t\t\tgetString(\"orderPrice\"),\r\n\t\t\t\t\t\t\t]}\r\n//\t\t\t\t\t\t\tlabelFormatter={(date: any) => getDateTimeString(date)}\r\n\t\t\t\t\t\t\tlabelFormatter={(date: any) => getDateString(date)}\r\n\t\t\t\t\t\t/>\r\n\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\t);\r\n};\r\n","import ChartMob from \"./ChartMob\";\r\nimport { NavigationItem } from \"../../../core/navigation/types\";\r\nimport { chartsmobLocation } from \"./Locations\";\r\n\r\nexport const chartsmobComponents: NavigationItem[] = [\r\n\t{\r\n\t\tComponent: ChartMob,\r\n\t\tisMenuItem: true,\r\n\t\tpath: chartsmobLocation,\r\n\t\tnotifications: true,\r\n\t},\r\n];\r\n","import React, { useContext } from \"react\";\r\nimport { Grid } from \"@material-ui/core\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { PageComponent } from \"../../../core/navigation/types\";\r\nimport { ProductGraph } from \"./ProductGraph\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\n\r\nconst ChartMob: PageComponent = ({ userAccessRights }) => {\r\n\tconst pageStyles = usePageStyles();\r\n\tconst { getString } = useContext(LocalizationContext);\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t\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 ChartMob;\r\n","import { getEditLocation } from \"../../../core/util/functions\";\r\nimport { OrdersEditAction } from \"../../../data/trading/orders/types\";\r\n\r\nexport const chartsmobLocation = \"/trading/charts\"\r\n\r\n//export enum OrdersEditParts {\r\n//\tBasicInfo = \"basicinfo\",\r\n//\tAttributes = \"attributes\",\r\n//}\r\n\r\n//export const getOrderEditLocation = (\r\n//\taction: OrdersEditAction = OrdersEditAction.New,\r\n//\tpart: OrdersEditParts = OrdersEditParts.BasicInfo,\r\n//\tproductId?: string,\r\n//\tattributeId?: string\r\n//) => getEditLocation(chartsmobLocation, part, productId, attributeId, action);\r\n\r\n//export const baseEdit = getOrderEditLocation(\":action\" as any, \":editPart\" as any, \":orderId?\");\r\n//export const atributesEdit = getOrderEditLocation(\r\n//\t\":action\" as any,\r\n//\tOrdersEditParts.Attributes,\r\n//\t\":orderId?\",\r\n//\t\":attributeId?\"\r\n//);","import { mainBoardComponents } from \"./mainBoard/navigationComponents\";\r\nimport { tradesComponents } from \"./trades/navigationComponents\";\r\nimport { orderBookComponents } from \"./orderBook/navigationComponents\";\r\nimport { mainBoardMComponents } from \"./mainpanelm/navigationComponents\";\r\nimport { chartsmobComponents } from \"./chartsmob/navigationComponents\";\r\n\r\nexport const tradingComponents = [...mainBoardComponents, ...tradesComponents, ...orderBookComponents,...mainBoardMComponents,...chartsmobComponents];\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { PaymentData } from \"../types\";\r\n\r\nexport const getPaymentApi = (userId: string, payid: string) =>\r\n webApi({\r\n method: \"GET\",\r\n url: \"clearing/getpayment\",\r\n params: {\r\n userId,\r\n payid,\r\n },\r\n });\r\n\r\nexport default getPaymentApi;\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getPaymentApi from \"../api/getPayment\";\r\nimport { setDisplayed } from \"../paymentsDataSlice\";\r\nimport { PaymentData } from \"../types\";\r\n\r\nexport const loadPayment = (payId: string): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n dispatch(setDisplayed());\r\n\r\n const payment = await dispatch(getPayment(payId));\r\n\r\n dispatch(setDisplayed(payment));\r\n};\r\n\r\nexport const getPayment = (\r\n payId: string\r\n): ThunkType> => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { userId } = store.data.auth.current.user;\r\n return await dispatch(getPaymentApi(userId, payId));\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { PaymentData } from \"../types\";\r\nimport { loadPayment } from \"../thunks/loadPayment\";\r\n\r\nexport const useDisplayPayment = (payId?: string) => {\r\n const storePayment = useSelector(\r\n (store) => store.data.clearing.payments.displayedPayment\r\n );\r\n\r\n const displayedPayment =\r\n storePayment && storePayment.payId === payId ? storePayment : undefined;\r\n\r\n const displatch = useDispatch();\r\n\r\n React.useEffect(() => {\r\n if (payId) {\r\n displatch(loadPayment(payId));\r\n }\r\n }, [displatch, payId]);\r\n\r\n return displayedPayment;\r\n};\r\n","import React from \"react\";\r\nimport { PaymentData } from \"../../../data/clearing/payments/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { useDisplaySingleEmementStyles } from \"../../useDisplaySingleEmementStyles\";\r\nimport { DisplayBoolNumber } from \"../../components/common/DisplayBoolNumber\";\r\nimport { Status } from \"../../../data/models\";\r\n\r\nexport interface DisplayPaymentMainAttributesProps {\r\n\tpayment: PaymentData;\r\n}\r\n\r\nexport const DisplayPaymentMainAttributes: React.FunctionComponent = ({\r\n\tpayment,\r\n}) => {\r\n\tconst style = useDisplaySingleEmementStyles();\r\n\tconst { getString, getDateString, getFormatedNumberString } = React.useContext(LocalizationContext);\r\n\r\n\treturn (\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"paymentDataTime\")}\r\n\t\t\t\t{getDateString(payment.payDate)}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"paymentClientCode\")}\r\n\t\t\t\t{payment.clientIdNo}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"paymentClientName\")}\r\n\t\t\t\t{payment.clientName}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"paymentPayType\")}\r\n\t\t\t\t{payment.payTypeDescr}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"paymentClmOrdNo\")}\r\n\t\t\t\t{payment.orderNo}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"paymentTranNo\")}\r\n\t\t\t\t{payment.tranNo}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"paymentAmount\")}\r\n\t\t\t\t{getFormatedNumberString(payment.amt, true)}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"paymentCurrCode\")}\r\n\t\t\t\t{payment.currCode}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"paymentAmtBal\")}\r\n\t\t\t\t{getFormatedNumberString(payment.amtBal, true)}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"paymentAmtBalNonAlloc\")}\r\n\t\t\t\t{getFormatedNumberString(payment.amtNonAllocBal, true)}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"paymentAmtOrdersBal\")}\r\n\t\t\t\t{getFormatedNumberString(payment.amtOrdersBal, true)}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"paymentAmtTradesBal\")}\r\n\t\t\t\t{getFormatedNumberString(payment.amtTransBal, true)}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"paymentStatus\")}\r\n\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};\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const printPayment = (user: User, payid: string) => {\r\n\treturn httpWebApi({\r\n\t\tmethod: \"GET\",\r\n\t\tresponseType: \"blob\",\r\n\t\ttimeout: 60 * 4 * 1000,\r\n\t\turl: \"reporting/getpaymentconfreport\",\r\n\t\tparams: {\r\n\t\t\tuserid: user.userId,\r\n\t\t\tpayid,\r\n\t\t},\r\n\t});\r\n};\r\n\r\nexport default printPayment;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { printPaymentThunk } from \"../thunks/printPaymentThunk\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { PaymentData } from \"../types\";\r\nimport { setPrintPaymentFetchState } from \"../paymentsDataSlice\";\r\n\r\nexport const usePaymentPrinter = (payment?: PaymentData) => {\r\n\tconst fetchState = useSelector(\r\n\t\ts => s.data.clearing.payments.printReportFetchState\r\n\t);\r\n\tconst dispatch = useDispatch();\r\n\r\n\tconst download = React.useCallback(() => {\r\n\t\t\tdispatch(printPaymentThunk(payment));\r\n\t}, [dispatch,payment ]);\r\n\r\n\tconst dispatchSetFetch = React.useCallback(() => { // Ovo da prvo izađe customDialog box\r\n\t\tdispatch(setPrintPaymentFetchState({ type: \"started\" }))\r\n\t},\t[dispatch] );\r\n\t\r\n\treturn [download, fetchState, dispatchSetFetch] as [typeof download, typeof fetchState, typeof dispatchSetFetch];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { printPayment } from \"../api/printPayment\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setPrintPaymentFetchState } from \"../paymentsDataSlice\";\r\nimport { PaymentData } from \"../types\";\r\n\r\nexport const printPaymentThunk = (payment?: PaymentData): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\" || !payment || !payment.payId) {\r\n\t\treturn undefined;\r\n\t}\r\n\tconst lan = store.ux.localization.language\r\n\tconst filename = `PaymentConfirmation_${payment.payId}.pdf`\r\n\tconst user = store.data.auth.current.user;\r\n\tdispatch(setPrintPaymentFetchState({ type: \"started\" }));\r\n\tconst paymentsReport = await dispatch(printPayment(user, payment.payId));\r\n\tif (paymentsReport) {\r\n\t\tfileDownload(new Blob([paymentsReport as any], { type: \"application/pdf\" }), filename);\r\n\t}\r\n\tdispatch(setPrintPaymentFetchState({ type: \"not-started\" }));\r\n};\r\n","import React from \"react\";\r\nimport { useDisplayPayment } from \"../../../data/clearing/payments/hooks/useDisplayPayments\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport {\r\n PaymentData,\r\n PaymentListData,\r\n} from \"../../../data/clearing/payments/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { DisplayPaymentMainAttributes } from \"./DisplayPaymentMainAttributes\";\r\nimport {\r\n ExpansionPanel,\r\n ExpansionPanelSummary,\r\n Typography,\r\n Grid,IconButton,\r\n} from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport { usePaymentPrinter } from \"../../../data/clearing/payments/hooks/usePaymentPrinter\";\r\n\r\nexport interface DisplayPaymentProps {\r\n id?: string;\r\n}\r\n\r\nexport const DisplayPayment: React.FunctionComponent = ({\r\n id,\r\n}) => {\r\n const payment = useDisplayPayment(id);\r\n const { getString } = React.useContext(LocalizationContext);\r\n\tconst [download, fetchState, setfetch] = usePaymentPrinter(payment);\r\n\r\n return !payment ? (\r\n <>{\"loading placeholder\"}\r\n ) : (\r\n \r\n \r\n \r\n \r\n \r\n {getString(\"tableBasciInfo\")}\r\n \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\r\n\t\t\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\r\n { fetchState.type !== \"not-started\" ? getString(\"pleaseWait\") : null }\r\n\t\t\t\t\t\t\t\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const useViewPayment = () => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n return React.useCallback(\r\n (payment: PaymentListData) =>\r\n showWithDrawer(),\r\n [showWithDrawer]\r\n );\r\n};\r\n","import { getEditLocation } from \"../../../core/util/functions\";\r\nexport const paymentLocation = \"/cliring/paymentsdelivery/payments\";\r\nexport const getPaymentEditLocation = (id?: string) =>\r\n getEditLocation(paymentLocation, undefined, id);\r\n\r\nexport const editRouter = getPaymentEditLocation(\":payId?\");\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const deletePaymentApi = (userId: string, payid: string) =>\r\n webApi({\r\n method: \"DELETE\",\r\n url: \"clearing/delpayment\",\r\n params: {\r\n userId,\r\n payid,\r\n },\r\n });\r\n\r\nexport default deletePaymentApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { deletePayment } from \"../thunks/deletePayment\";\r\nimport { setFetchState } from \"../paymentsDataSlice\";\r\n\r\nexport const usePaymentDelete = () => {\r\n const fetchState = useSelector(\r\n (store) => store.data.clearing.payments.cancelFetchState\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchDeletePayment = React.useCallback(\r\n (id: string) => dispatch(deletePayment(id)),\r\n [dispatch]\r\n );\r\n\r\n React.useEffect(() => {\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n }, [dispatch]);\r\n\r\n return [fetchState, dispatchDeletePayment] as [\r\n typeof fetchState,\r\n typeof dispatchDeletePayment\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport deletePaymentApi from \"../api/deletePayment\";\r\nimport { setFetchState, invalidatePayment } from \"../paymentsDataSlice\";\r\n\r\nexport const deletePayment = (payId: string): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n dispatch(setFetchState({ type: \"started\" }));\r\n\r\n const { userId } = store.data.auth.current.user;\r\n const result = await dispatch(deletePaymentApi(userId, payId));\r\n\r\n dispatch(\r\n setFetchState(\r\n result !== undefined ? { type: \"successful\" } : { type: \"error\" }\r\n )\r\n );\r\n dispatch(invalidatePayment())\r\n};\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport ViewIcon from \"@material-ui/icons/InputOutlined\";\r\nimport EditIcon from \"@material-ui/icons/EditOutlined\";\r\nimport { PaymentListData } from \"../../../data/clearing/payments/types\";\r\nimport { PaymentData } from \"../../../data/clearing/payments/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { MaterialTableProps } from \"material-table\";\r\nimport { useViewPayment } from \"./DisplayPayment\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { getPaymentEditLocation } from \"../payments/Locations\";\r\nimport { DisplayPaymentMainAttributes } from \"../payments/DisplayPaymentMainAttributes\";\r\nimport { usePaymentDelete } from \"../../../data/clearing/payments/hooks/usePaymentDelete\";\r\n\r\nexport function usePaymentsActions() {\r\n const { getString } = useContext(LocalizationContext);\r\n const onShowPayment = useViewPayment();\r\n const onEditPayment = useEditPaymentAction();\r\n\r\n return useMemo(() => {\r\n const result: MaterialTableProps[\"actions\"] = [\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"orderActView\"),\r\n onClick: (event, rowData) => onShowPayment(rowData as PaymentListData),\r\n },\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"tableEdit\"),\r\n onClick: (event, rowData) => onEditPayment(rowData as PaymentListData),\r\n },\r\n ];\r\n return result;\r\n }, [onShowPayment, onEditPayment, getString]);\r\n}\r\n\r\nexport const useDeletePaymentAction = () => {\r\n const [, deletePayment] = usePaymentDelete();\r\n return React.useCallback(\r\n async (payments: PaymentListData) => {\r\n if (payments.payId) {\r\n await deletePayment(payments.payId);\r\n }\r\n },\r\n [deletePayment]\r\n );\r\n};\r\n\r\nexport const useEditPaymentAction = () => {\r\n const history = useHistory();\r\n return React.useCallback(\r\n (payments: PaymentListData) =>\r\n history.push(getPaymentEditLocation(payments.payId)),\r\n [history]\r\n );\r\n};\r\n","import { ValidationState } from \"../../../core/util/types\";\r\nimport { ClientListData } from \"../../../data/listing/clients/types\";\r\n\r\nexport enum PaymentSide {\r\n in = \"IN\",\r\n out = \"OUT\",\r\n}\r\n\r\nexport enum PaymentDedication {\r\n yes = \"Y\",\r\n no = \"N\",\r\n}\r\n\r\nexport interface PaymentListData {\r\n payId: string;\r\n payDate: Date;\r\n clientIdNo: string;\r\n clientName: string;\r\n payTypeDescr: string;\r\n orderNo: string;\r\n tranNo: string;\r\n amtPay: number;\r\n amtIn: number;\r\n amtOut: number;\r\n amtNonAllocBal: number;\r\n amtBal: number;\r\n amtTransBal: number;\r\n amtOrdersBal: number;\r\n currCode: string;\r\n status: number;\r\n grntId: string;\r\n}\r\n\r\nexport interface GetPaymentParams {\r\n userid: string;\r\n inout?: PaymentSide;\r\n nondedicated?: PaymentDedication;\r\n //currid?: string;\r\n cliid?: string;\r\n // paytype?: string;\r\n datefrom?: string;\r\n dateto?: string;\r\n fromrow: number;\r\n numofrows: number;\r\n paygroup: PayGroup.Payments;\r\n tranid?: string;\r\n}\r\n\r\nexport interface GetPaymentParamsKlijenti {\r\n userid: string;\r\n inout?: PaymentSide;\r\n nondedicated?: PaymentDedication;\r\n cliid?: string;\r\n datefrom?: string;\r\n dateto?: string;\r\n fromrow: number;\r\n numofrows: number;\r\n tranid?: string;\r\n}\r\n\r\nexport interface PaymentData {\r\n payId: string;\r\n payDate?: Date;\r\n clientId: string;\r\n clientIdNo?: string;\r\n clientName?: string;\r\n payType: number;\r\n payTypeDescr?: string;\r\n hasOrdTran?: number;\r\n orderId?: string;\r\n orderNo?: string;\r\n tranId?: string;\r\n tranNo?: string;\r\n sign?: number;\r\n amt?: number;\r\n amtBal?: number;\r\n amtNonAllocBal?: number;\r\n currId?: string;\r\n currCode?: string;\r\n currRate?: number;\r\n status?: number;\r\n amtTransBal?: number;\r\n amtOrdersBal?: number;\r\n grntId?: string;\r\n grntNo?: string;\r\n price?: number;\r\n amtPayment?: number;\r\n}\r\n\r\nexport interface PaymentStatus {\r\n ftValue: number;\r\n ftDescr: string;\r\n}\r\n\r\nexport interface PaymentFilter {\r\n status?: Partial;\r\n datefrom?: string;\r\n dateto?: string;\r\n client?: Partial;\r\n inout?: PaymentSide;\r\n nondedicated?: PaymentDedication;\r\n tranId?: string;\r\n tranDesc?: string;\r\n}\r\n\r\nexport enum PayGroup {\r\n\tGuarantees = \"G\",\r\n\tPayments = \"P\",\r\n}\r\n\r\nexport type PaymentValidationState = ValidationState;\r\n","import React from \"react\";\r\nimport { PaymentListData } from \"../../../data/clearing/payments/types\";\r\nimport {\r\n PaginationTable,\r\n PaginationDataProps,\r\n} from \"../../components/common/PagginationTable\";\r\nimport {\r\n usePaymentsActions,\r\n useDeletePaymentAction,\r\n} from \"./usePaymentsActions\";\r\nimport { usePaymentsColumns } from \"./usePaymentsColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\n\r\nexport interface PaymentsTableProps {\r\n userAccessRights: AccessRights;\r\n getData: () => void;\r\n}\r\n\r\ntype PaymentsTablePropsType = PaymentsTableProps &\r\n PaginationDataProps;\r\n\r\nconst PaymentsTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n getData,\r\n ...tableProps\r\n}) => {\r\n const actions = usePaymentsActions();\r\n const columns = usePaymentsColumns();\r\n const onDeletePayment = useDeletePaymentAction();\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={getData}\r\n // immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n actions={actions}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n }}\r\n editable={{\r\n onRowDelete: onDeletePayment,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default PaymentsTable;\r\n","import { PaymentListData } from \"../../../data/clearing/payments/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\n\r\nexport const usePaymentsColumns = () => {\r\n\tconst { getString, getDateString, getFormatedNumberString } = React.useContext(LocalizationContext);\r\n\r\n\treturn React.useMemo(\r\n\t\t() => [\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"paymentDataTime\"),\r\n\t\t\t\trender: payment => getDateString(payment.payDate, \"DD.MM.YYYY\"),\r\n\t\t\t\tsorting: false,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"paymentClientCode\"),\r\n\t\t\t\tfield: \"clientIdNo\",\r\n\t\t\t\tsorting: false,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"paymentClientName\"),\r\n\t\t\t\tfield: \"clientName\",\r\n\t\t\t\tsorting: false,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"paymentPayType\"),\r\n\t\t\t\tfield: \"payTypeDescr\",\r\n\t\t\t\tsorting: false,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"paymentClmOrdNo\"),\r\n\t\t\t\tfield: \"orderNo\",\r\n\t\t\t\tsorting: false,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"paymentTranNo\"),\r\n\t\t\t\tfield: \"tranNo\",\r\n\t\t\t\tsorting: false,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"paymentAmount\"),\r\n\t\t\t\trender: payment => getFormatedNumberString(payment.amtPay, true),\r\n\t\t\t\tsorting: false,\r\n\t\t\t\twidth: \"140px\",\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\tmaxWidth: \"140px\",\r\n\t\t\t\t\tminWidth: \"140px\",\r\n\t\t\t\t\twidth: \"140px\",\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\tmaxWidth: \"140px\",\r\n\t\t\t\t\tminWidth: \"140px\",\r\n\t\t\t\t\twidth: \"140px\",\r\n//\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"paymentAmtBal\"),\r\n\t\t\t\trender: payment => getFormatedNumberString(payment.amtBal, true),\r\n\t\t\t\tsorting: false,\r\n\t\t\t\twidth: \"140px\",\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\tmaxWidth: \"140px\",\r\n\t\t\t\t\tminWidth: \"140px\",\r\n\t\t\t\t\twidth: \"140px\",\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\tmaxWidth: \"140px\",\r\n\t\t\t\t\tminWidth: \"140px\",\r\n\t\t\t\t\twidth: \"140px\",\r\n//\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"paymentAmtBalNonAlloc\"),\r\n\t\t\t\trender: payment => getFormatedNumberString(payment.amtNonAllocBal, true),\r\n\t\t\t\tsorting: false,\r\n\t\t\t\twidth: \"140px\",\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\tmaxWidth: \"140px\",\r\n\t\t\t\t\tminWidth: \"140px\",\r\n\t\t\t\t\twidth: \"140px\",\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\tmaxWidth: \"140px\",\r\n\t\t\t\t\tminWidth: \"140px\",\r\n\t\t\t\t\twidth: \"140px\",\r\n//\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t},\r\n\t\t],\r\n\t\t[getString, getFormatedNumberString, getDateString]\r\n\t) as Column[];\r\n};\r\n","import { PaymentFilter, PayGroup } from \"../types\";\r\nimport { PaymentListData, GetPaymentParams } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nconst getPaymentsWebApi = (\r\n user: User,\r\n page: number,\r\n itemsPerPage: number,\r\n filter: PaymentFilter\r\n) => {\r\n const params: GetPaymentParams = {\r\n userid: user.userId,\r\n inout: filter.inout,\r\n fromrow: page * itemsPerPage,\r\n numofrows: itemsPerPage,\r\n cliid: filter?.client?.cliId,\r\n nondedicated: filter.nondedicated,\r\n datefrom: getParamsDateString(filter.datefrom),\r\n dateto: getParamsDateString(filter.dateto),\r\n paygroup: PayGroup.Payments,\r\n tranid: filter?.tranId,\r\n };\r\n\r\n return webApiWithResponse({\r\n method: \"GET\",\r\n url: \"clearing/getpaymentlist\",\r\n params,\r\n });\r\n};\r\n\r\nexport default getPaymentsWebApi;\r\n","import React from \"react\";\r\nimport { Grid, Paper, Button, Typography } from \"@material-ui/core\";\r\nimport { PaymentSideSelect } from \"./PaymentSideSelect\";\r\nimport { PaymentDedicationSelect } from \"./PaymentDedicationSelect\";\r\nimport { DateInput } from \"../../components/common/DateInput\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { PaymentFilter } from \"../../../data/clearing/payments/types\";\r\nimport { ClientSelect } from \"../../components/listing/ClientSelect\";\r\nimport { useAuth } from \"../../../data/auth/hooks\";\r\nimport { PaymentFilterChipsComponent } from \"./PaymentFilterChips\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { StringInput } from \"../../components/common/StringInput\";\r\nimport { FiltredTransactionsSelect } from \"../../components/trading/FiltredTransactionsSelect\";\r\nimport { SimpleTransFilter } from \"../../../data/trading/transactions/types\";\r\nimport { TransSimpleData } from \"../../../data/trading/transactions/types\";\r\n\r\nexport enum PaymentFilterEditorType {\r\n Basic,\r\n Extended,\r\n}\r\n\r\ninterface PaymentFilterEditorProps {\r\n// filter: PaymentFilter;\r\n filter?: PaymentFilter;\r\n editFilter: (prop: keyof PaymentFilter, value: any) => void;\r\n save: () => void;\r\n type: PaymentFilterEditorType;\r\n reset?: () => void;\r\n}\r\n\r\nexport const PaymentFilterEditor: React.FunctionComponent = ({\r\n filter,\r\n editFilter,\r\n save,\r\n type,\r\n reset,\r\n}) => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const { getString } = React.useContext(LocalizationContext);\r\n const [auth] = useAuth();\r\n\r\n\tconst [tradesFilter, setTransactionFilter] = React.useState(\r\n\t\tcreateTransactionFilterPayment(filter)\r\n\t);\r\n\tconst [selectedOrder, setSelectedOrder] = React.useState(null);\r\n\r\n React.useEffect(() => {\r\n\t\tsetTransactionFilter(createTransactionFilterPayment(filter));\r\n\t}, [filter, setTransactionFilter]);\r\n\r\n const handleChange = React.useCallback(\r\n (event: React.ChangeEvent) => {\r\n editFilter(event.target.name as any, event.target.value);\r\n },\r\n [editFilter]\r\n );\r\n \r\n return (\r\n \r\n \r\n \r\n \r\n editFilter(\"datefrom\", date?.toISOString())}\r\n />\r\n \r\n \r\n editFilter(\"dateto\", date?.toISOString())}\r\n />\r\n \r\n\r\n{/* \r\n editFilter(\"inout\", e.target.value)}\r\n side={filter?.inout}\r\n nullable\r\n />\r\n \r\n \r\n editFilter(\"nondedicated\", e.target.value)}\r\n sidededication={filter?.nondedicated}\r\n nullable\r\n />\r\n */}\r\n\r\n\r\n {type === PaymentFilterEditorType.Extended &&\r\n auth.status === \"successful\" &&\r\n auth.user.userIsEmployee === 1 && (\r\n \r\n cli.cliId === filter?.client?.cliId}\r\n onChangeItem={(cli) => editFilter(\"client\", cli)}\r\n />\r\n \r\n )}\r\n{/*\r\n \r\n \t\t\t\t\t\t\t\t \r\n property=\"tranId\"\r\n\t\t\t\t\t\t\t\t\titem= {filter ? filter : {}}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"paymentTranNo\")}\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t */}\r\n\r\n \r\n\r\n \r\n\t\t\t\t\t\t\t\t\t trans.ordId === filter?.tranId}\r\n\t\t\t\t\t\t\t\t\t\tonChangeItem={trans => {\r\n\t\t\t\t\t\t\t\t\t\t\tsetSelectedOrder(trans);\r\n\t\t\t\t\t\t\t\t\t\t\teditFilter(\"tranId\", trans ? trans.ordId : undefined);\r\n\t\t\t\t\t\t\t\t\t\t\teditFilter(\"tranDesc\", trans ? trans.ordData : undefined);\r\n\t\t\t\t\t\t\t\t\t\t}}\r\n disabled={false}\r\n\t\t\t\t\t\t\t\t/>\r\n \t\t\t\r\n\r\n \r\n \r\n {\r\n save();\r\n showWithDrawer(undefined);\r\n }}\r\n >\r\n {getString(\"orderFilterConfirm\")}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nconst createTransactionFilterPayment = (filter?: PaymentFilter) => {\r\n\treturn filter && filter.client && filter.client.cliId\r\n\t\t? {\r\n\t\t\t\tcliid: filter.client.cliId,\r\n\t\t }\r\n\t\t: undefined;\r\n};\r\n\r\nexport const PaymentFilterChips = PaymentFilterChipsComponent;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadAllPayments } from \"../thunks/loadAllPayment\";\r\nimport { PaymentListData } from \"../types\";\r\nimport { PageData } from \"../../../models\";\r\nimport { invalidatePayment } from \"../paymentsDataSlice\";\r\n\r\nexport const usePaymentsData = () => {\r\n const pageData = useSelector<\r\n StoreType,\r\n PageData | undefined\r\n >((s) => s.data.clearing.payments.currentPage);\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadPaymentsPage = React.useCallback(\r\n () => dispatch(loadAllPayments()),\r\n [dispatch]\r\n );\r\n\r\n const invalidate = React.useCallback(() => dispatch(invalidatePayment()), [dispatch]);\r\n\r\n return [pageData, dispatchLoadPaymentsPage, invalidate] as [\r\n typeof pageData,\r\n typeof dispatchLoadPaymentsPage,\r\n typeof invalidate,\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { setPayments, invalidatePayment } from \"../paymentsDataSlice\";\r\nimport { setPaymentIndex } from \"../paymentsUXSlice\";\r\nimport getPayments from \"../api/getPayments\";\r\nimport { PageIndex, PageDataStatus } from \"../../../models\";\r\n\r\nexport const loadAllPayments = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n const { pageNumber, itemsPerPage } = store.ux.clearing.payments.index;\r\n const { filter } = store.ux.clearing.payments;\r\n const user = store.data.auth.current.user;\r\n\r\n console.log(filter)\r\n const paymentsResponse = await dispatch(\r\n getPayments(user, pageNumber, itemsPerPage, filter)\r\n );\r\n\r\n if (!paymentsResponse || paymentsResponse.resCode !== \"OK\") {\r\n return;\r\n }\r\n\r\n const payments = {\r\n currentPageData: paymentsResponse.obj,\r\n totalCount: Number(paymentsResponse.resDesc) || 0,\r\n status: PageDataStatus.DataCurrent,\r\n };\r\n\r\n dispatch(setPayments(payments));\r\n};\r\n\r\nexport const setPaymentsIndexThunk = (index: PageIndex): ThunkType => (\r\n dispatch\r\n) => {\r\n dispatch(setPaymentIndex(index));\r\n dispatch(invalidatePayment());\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { resetPaymentIdices } from \"../paymentsUXSlice\";\r\nimport { PageIndex } from \"../../../models\";\r\nimport { setPaymentsIndexThunk } from \"../thunks/loadAllPayment\";\r\n\r\nexport const usePaymentIndex = () => {\r\n const pageIndex = useSelector(\r\n (s) => s.ux.clearing.payments.index\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetIndex = React.useCallback(\r\n (index: PageIndex) => dispatch(setPaymentsIndexThunk(index)),\r\n [dispatch]\r\n );\r\n const dispatchResetIndex = React.useCallback(\r\n () => dispatch(resetPaymentIdices()),\r\n [dispatch]\r\n );\r\n\r\n return [pageIndex, dispatchSetIndex, dispatchResetIndex] as [\r\n typeof pageIndex,\r\n typeof dispatchSetIndex,\r\n typeof dispatchResetIndex\r\n ];\r\n};\r\n","import { useCopiedState } from \"../../../../core/util/hooks\";\r\nimport { setFilter, removeFilter, initialState } from \"../paymentsUXSlice\";\r\nimport { invalidatePayment } from \"../paymentsDataSlice\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport React from \"react\";\r\nimport { PaymentFilter } from \"../types\";\r\n\r\nexport const usePaymentsFilter = () => {\r\n const [storeFilter] = useCurrentPaymentsFilter();\r\n const [filter, editFilter, changeState, setCurrentFilter] = useCopiedState<\r\n PaymentFilter\r\n >(storeFilter);\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetFilter = React.useCallback(() => {\r\n dispatch(setFilter(filter!));\r\n dispatch(invalidatePayment());\r\n }, [dispatch, filter]);\r\n\r\n const dispatchResetFilter = React.useCallback(() => {\r\n setCurrentFilter(initialState.filter);\r\n }, [setCurrentFilter]);\r\n\r\n return [\r\n filter,\r\n editFilter,\r\n dispatchSetFilter,\r\n changeState,\r\n dispatchResetFilter,\r\n ] as [\r\n typeof filter,\r\n typeof editFilter,\r\n typeof dispatchSetFilter,\r\n typeof changeState,\r\n typeof dispatchResetFilter\r\n ];\r\n};\r\n\r\nexport const useCurrentPaymentsFilter = () => {\r\n const filter = useSelector(\r\n (store) => store.ux.clearing.payments.filter\r\n );\r\n const dispatch = useDispatch();\r\n const dispatchRemoveFilter = React.useCallback(\r\n (type: keyof PaymentFilter) => {\r\n dispatch(removeFilter(type));\r\n dispatch(invalidatePayment());\r\n },\r\n [dispatch]\r\n );\r\n\r\n return [filter, dispatchRemoveFilter] as [\r\n typeof filter,\r\n typeof dispatchRemoveFilter\r\n ];\r\n};\r\n","import React from \"react\";\r\nimport { PaymentSide } from \"../types\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { exhaustiveCheck } from \"../../../../core/util/functions\";\r\n\r\nexport const usePaymentSideOptionsTranslator = () => {\r\n const { getString } = React.useContext(LocalizationContext);\r\n return React.useCallback(\r\n (side: PaymentSide) => {\r\n switch (side) {\r\n case PaymentSide.in:\r\n return getString(\"paymentSideIn\");\r\n case PaymentSide.out:\r\n return getString(\"paymentSideOut\");\r\n default:\r\n exhaustiveCheck(side);\r\n }\r\n },\r\n [getString]\r\n );\r\n};\r\n\r\ninterface AccountPaymentSideOption {\r\n label: string;\r\n value: PaymentSide;\r\n}\r\n\r\nexport const usePaymentSideOptions = (): AccountPaymentSideOption[] => {\r\n const translator = usePaymentSideOptionsTranslator();\r\n return React.useMemo(\r\n () => [\r\n {\r\n label: translator(PaymentSide.in) as string,\r\n value: PaymentSide.in,\r\n },\r\n {\r\n label: translator(PaymentSide.out) as string,\r\n value: PaymentSide.out,\r\n },\r\n ],\r\n [translator]\r\n );\r\n};\r\n","import React from \"react\";\r\nimport { PaymentDedication } from \"../types\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { exhaustiveCheck } from \"../../../../core/util/functions\";\r\n\r\nexport const usePaymentDedicationOptionsTranslator = () => {\r\n const { getString } = React.useContext(LocalizationContext);\r\n return React.useCallback(\r\n (side: PaymentDedication) => {\r\n switch (side) {\r\n case PaymentDedication.yes:\r\n return getString(\"paymentSideDedicated\");\r\n case PaymentDedication.no:\r\n return getString(\"paymentSideNonDedicated\");\r\n default:\r\n exhaustiveCheck(side);\r\n }\r\n },\r\n [getString]\r\n );\r\n};\r\n\r\ninterface AccountPaymentSideOption {\r\n label: string;\r\n value: PaymentDedication;\r\n}\r\n\r\nexport const usePaymentDedicationOptions = (): AccountPaymentSideOption[] => {\r\n const translator = usePaymentDedicationOptionsTranslator();\r\n return React.useMemo(\r\n () => [\r\n {\r\n label: translator(PaymentDedication.yes) as string,\r\n value: PaymentDedication.yes,\r\n },\r\n {\r\n label: translator(PaymentDedication.no) as string,\r\n value: PaymentDedication.no,\r\n },\r\n ],\r\n [translator]\r\n );\r\n};\r\n","import { TransSimpleData, GetSimpleTransParams, SimpleTransFilter } from \"../types\";\r\nimport { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const getSimpleTrades = (userid: string, filter: SimpleTransFilter) => {\r\n\tconst params: GetSimpleTransParams = {\r\n\t\tuserid,\r\n\t\t...filter,\r\n\t};\r\n\r\n\treturn webApiWithResponse({\r\n\t\tmethod: \"GET\",\r\n\t\turl: \"trade/gettransimplelist\",\r\n\t\tparams,\r\n\t});\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getSimpleTrades } from \"../api/getSimpleTrades\";\r\nimport { TransSimpleData, SimpleTransFilter } from \"../types\";\r\n\r\nexport const getSimpleTradesThunk = (\r\n\tfilter: SimpleTransFilter\r\n): ThunkType> => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst user = store.data.auth.current.user;\r\n\tconst ordersResponse = await dispatch(getSimpleTrades(user.userId, filter));\r\n\r\n\tif (!ordersResponse || ordersResponse.resCode !== \"OK\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\treturn ordersResponse.obj;\r\n};\r\n","import React from \"react\";\r\nimport { AutocompleteSelect, AutocompleteSelectType } from \"../common/AutocompleteSelect\";\r\nimport { useSimpleTradesData } from \"../../../data/trading/transactions/hooks/useSimpleTradesData\";\r\nimport { TransSimpleData, SimpleTransFilter } from \"../../../data/trading/transactions/types\";\r\n\r\ntype FiltredTransactionsSelectPropsType = Omit<\r\n\tAutocompleteSelectType,\r\n\t\"data\" | \"getLabel\"\r\n> & {\r\n\tfilter?: SimpleTransFilter;\r\n\tdisabled?: boolean;\r\n};\r\n\r\nexport const FiltredTransactionsSelect: React.FunctionComponent = ({\r\n\tfilter,\r\n\tdisabled,\r\n\t...otherProps\r\n}) => {\r\n\tconst [trades] = useSimpleTradesData(filter);\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t{...(otherProps as AutocompleteSelectType)}\r\n\t\t\tdata={trades || []}\r\n\t\t\tgetLabel={renderAttributeLabel}\r\n\t\t\tdisabled={filter === undefined || disabled}\r\n\t\t/>\r\n\t);\r\n};\r\n\r\nconst renderAttributeLabel = (trans: TransSimpleData) => trans.ordData;\r\n","import React from \"react\";\r\nimport { useDispatch } from \"react-redux\";\r\nimport { getSimpleTradesThunk } from \"../thunks/getSimpleTradesThunk\";\r\nimport { SimpleTransFilter, TransSimpleData } from \"../types\";\r\n\r\nexport const useSimpleTradesData = (filter?: SimpleTransFilter) => {\r\n\tconst dispatch = useDispatch();\r\n\tconst [orders, setOrders] = React.useState();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tconst loadOrders = async () => {\r\n\t\t\tif (filter) {\r\n\t\t\t\tconst loaded = ((await dispatch(getSimpleTradesThunk(filter))) as any) as TransSimpleData[];\r\n\t\t\t\tsetOrders(loaded);\r\n\t\t\t}\r\n\t\t};\r\n\t\tif (!filter) {\r\n\t\t\tsetOrders(undefined);\r\n\t\t} else {\r\n\t\t\tloadOrders();\r\n\t\t}\r\n\t}, [filter, dispatch]);\r\n\r\n\treturn [orders] as [typeof orders];\r\n};\r\n","import React from \"react\";\r\nimport { Chip, Grid } from \"@material-ui/core\";\r\nimport { PaymentFilter } from \"../../../data/clearing/payments/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\n\r\nimport { usePaymentSideOptionsTranslator } from \"../../../data/clearing/payments/hooks/usePaymentSideOptions\";\r\nimport { usePaymentDedicationOptionsTranslator } from \"../../../data/clearing/payments/hooks/usePaymentDedicationOptions\";\r\n\r\nexport const PaymentFilterChipsComponent: React.FunctionComponent = ({\r\n filter,\r\n removeFilter,\r\n}) => {\r\n const { getDateString, getString } = React.useContext(LocalizationContext);\r\n const sideTranslator = usePaymentSideOptionsTranslator();\r\n const dedicatedTranslator = usePaymentDedicationOptionsTranslator();\r\n return (\r\n \r\n {filter.inout && (\r\n \r\n removeFilter(\"inout\")}\r\n />\r\n \r\n )}\r\n {filter.nondedicated !== undefined && (\r\n \r\n removeFilter(\"nondedicated\")}\r\n />\r\n \r\n )}\r\n {filter.datefrom && (\r\n \r\n removeFilter(\"datefrom\")}\r\n />\r\n \r\n )}\r\n {filter.dateto && (\r\n \r\n removeFilter(\"dateto\")}\r\n />\r\n \r\n )}\r\n {filter.client && (\r\n \r\n {\r\n removeFilter(\"client\");\r\n removeFilter(\"tranId\");\r\n }}\r\n />\r\n \r\n )}\r\n {filter.tranId && (\r\n \r\n removeFilter(\"tranId\")}\r\n />\r\n \r\n )}\r\n {filter.status && filter.status.ftDescr !== \"\" && (\r\n \r\n removeFilter(\"status\")}\r\n />\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\ninterface PaymentFilterChipsProps {\r\n filter: PaymentFilter;\r\n removeFilter: (type: keyof PaymentFilter) => void;\r\n}\r\n","import React from \"react\";\r\nimport FilterIcon from \"@material-ui/icons/FilterListOutlined\";\r\nimport { IconButton, Grid } from \"@material-ui/core\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport {\r\n\tusePaymentsFilter,\r\n\tuseCurrentPaymentsFilter,\r\n} from \"../../../data/clearing/payments/hooks/usePaymentsFilter\";\r\nimport {\r\n\tPaymentFilterEditor,\r\n\tPaymentFilterEditorType,\r\n\tPaymentFilterChips,\r\n} from \"../payments/PaymentFilterEditor\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\n\r\nexport const PaymentFilterButton: React.FunctionComponent = () => {\r\n\tconst showWithDrawer = React.useContext(DisplayDrawerContext);\r\n\tconst showFilter = React.useCallback(() => showWithDrawer(), [showWithDrawer]);\r\n\r\n\tconst [filter, removeFilter] = useCurrentPaymentsFilter();\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\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\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};\r\n\r\nconst PaymentsFilterEditor: React.FunctionComponent = () => {\r\n\tconst [filter, editFilter, save, , rest] = usePaymentsFilter();\r\n\r\n\treturn (\r\n\t\t\r\n\t);\r\n};\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { PaymentFilter, PayGroup } from \"../types\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nexport const getPaymentsReport = (user: User, filter: PaymentFilter) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getguaranteesreport\",\r\n params: {\r\n userid: user.userId,\r\n paygroup: PayGroup.Payments,\r\n inout: filter.inout,\r\n cliid: filter?.client?.cliId,\r\n nondedicated: filter.nondedicated,\r\n datefrom: getParamsDateString(filter.datefrom),\r\n dateto: getParamsDateString(filter.dateto),\r\n },\r\n });\r\n};\r\n\r\nexport default getPaymentsReport;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadPaymentsReport } from \"../thunks/downloadReport\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const usePaymentsReportDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.clearing.payments.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadPaymentsReport()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getPaymentsReport } from \"../api/getPaymentsReport\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../paymentsDataSlice\";\r\n\r\nexport const downloadPaymentsReport = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.clearing.payments;\r\n const user = store.data.auth.current.user;\r\n\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const ordersReport = await dispatch(getPaymentsReport(user, filter));\r\n if (ordersReport) {\r\n fileDownload(\r\n new Blob([ordersReport as any], { type: \"application/pdf\" }),\r\n \"Payments.pdf\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { PaymentFilter, PayGroup } from \"../types\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nexport const getPaymentsExcel = (user: User, filter: PaymentFilter) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getpaymentsxls\",\r\n params: {\r\n userid: user.userId,\r\n paygroup: PayGroup.Payments,\r\n inout: filter.inout,\r\n cliid: filter?.client?.cliId,\r\n nondedicated: filter.nondedicated,\r\n datefrom: getParamsDateString(filter.datefrom),\r\n dateto: getParamsDateString(filter.dateto),\r\n },\r\n });\r\n};\r\n\r\nexport default getPaymentsExcel;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadPaymentsExcel } from \"../thunks/downloadReportExcel\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const usePaymentsExcelDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) =>\r\n s.data.clearing.payments.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadPaymentsExcel()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getPaymentsExcel } from \"../api/getPaymentsExcel\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../paymentsDataSlice\";\r\n\r\nexport const downloadPaymentsExcel = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n \r\n const { filter } = store.ux.clearing.payments;\r\n const user = store.data.auth.current.user;\r\n\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const dailyTrading = await dispatch(getPaymentsExcel(user, filter));\r\n if (dailyTrading) {\r\n fileDownload(\r\n new Blob([dailyTrading as any], {\r\n type: \"application/vnd.openxmlformat\",\r\n }),\r\n \"Payments.xlsx\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import React from \"react\";\r\nimport { usePaymentsReportDownloader } from \"../../../data/clearing/payments/hooks/usePaymentsReportDownloader\";\r\nimport { usePaymentsExcelDownloader } from \"../../../data/clearing/payments/hooks/usePaymentsExcelDownloader\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport ExcelIcon from \"@material-ui/icons/TableChartOutlined\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\n\r\nexport const DownloadButton: React.FunctionComponent = () => {\r\n\tconst [downloader, fetchState] = usePaymentsReportDownloader();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\treturn (\r\n\t\t<>\r\n\t\t\t\r\n\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\t{fetchState.type !== \"not-started\" ? getString(\"pleaseWait\") : null}\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport const DownloadExcelButton: React.FunctionComponent = () => {\r\n\tconst [downloader, fetchState] = usePaymentsExcelDownloader();\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport {\r\n Grid,\r\n CardContent,\r\n CardHeader,\r\n Card,\r\n Divider,\r\n Fab,\r\n} from \"@material-ui/core\";\r\nimport PaymentsTable from \"./PaymentsTable\";\r\nimport AddIcon from \"@material-ui/icons/Add\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { PageComponent, AccessRights } from \"../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { usePaymentsData } from \"../../../data/clearing/payments/hooks/usePaymentsData\";\r\nimport { usePaymentIndex } from \"../../../data/clearing/payments/hooks/usePaymentsIndex\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { getPaymentEditLocation } from \"../payments/Locations\";\r\nimport { PageDataStatus } from \"../../../data/models\";\r\nimport { PaymentFilterButton } from \"./PaymentFilter\";\r\nimport { useAuth } from \"../../../data/auth/hooks\";\r\nimport { DownloadButton, DownloadExcelButton } from \"./DownloadButton\";\r\n\r\nconst PaymentsPage: PageComponent = ({ userAccessRights }) => {\r\n const pageStyles = usePageStyles();\r\n\r\n const [pageData, dispatchLoadPayments, invalidate] = usePaymentsData();\r\n const [pageIndex, dispatchSetIndex] = usePaymentIndex();\r\n\r\n React.useEffect(() => {\r\n if (pageData && pageData.status === PageDataStatus.DataInvalidated) {\r\n dispatchLoadPayments();\r\n }\r\n }, [dispatchLoadPayments, pageData]);\r\n React.useEffect(() => () => { invalidate() }, [])\r\n\r\n const history = useHistory();\r\n\r\n const [auth] = useAuth();\r\n\r\n if (auth.status !== \"successful\") {\r\n return null;\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n }\r\n action={}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {userAccessRights === AccessRights.All && (\r\n history.push(getPaymentEditLocation())}\r\n >\r\n \r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nexport const PaymentsActions: React.FunctionComponent = () => (\r\n \r\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 PaymentsPage;\r\n","import React from \"react\";\r\nimport { useDisplayPayment } from \"./useDisplayPayments\";\r\nimport { PaymentData } from \"../types\";\r\nimport { useCopiedState } from \"../../../../core/util/hooks\";\r\nimport { Status } from \"../../../models\";\r\n\r\nexport const defaultPayment: PaymentData = {\r\n payId: \"\",\r\n payType: 1,\r\n hasOrdTran: 0,\r\n clientId: \"\",\r\n status: Status.Active,\r\n currId: \"00000001\",\r\n};\r\n\r\nexport const useEditPayment = (payId?: string): PaymentData | undefined => {\r\n const displayPayment = useDisplayPayment(payId);\r\n\r\n return React.useMemo(() => {\r\n if (payId !== undefined && displayPayment === undefined) {\r\n return undefined;\r\n }\r\n\r\n if (payId === undefined) {\r\n return { ...defaultPayment };\r\n }\r\n\r\n return displayPayment ? { ...displayPayment } : undefined;\r\n }, [payId, displayPayment]);\r\n};\r\n\r\nexport const useEditPaymentState = (payId?: string) => {\r\n const payment = useEditPayment(payId);\r\n return useCopiedState(payment);\r\n};\r\n","import { PaymentData, PaymentValidationState } from \"../types\";\r\nimport { createUseValidator } from \"../../../../core/util/hooks\";\r\n\r\nexport const paymentValidationState: PaymentValidationState = {\r\n payDate: true,\r\n payType: true,\r\n clientId: true,\r\n amt: true,\r\n};\r\n\r\nexport const usePaymentValidator = createUseValidator< PaymentData, PaymentValidationState>\r\n(paymentValidationState,\r\n (item, validation) => ({\r\n ...validation,\r\n tranId: (item.tranId && item.hasOrdTran===2) || (!item.tranId && item.hasOrdTran!==2)\r\n })\r\n );\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { PaymentData } from \"../types\";\r\n\r\nexport const createPaymentApi = (userId: string, payment: PaymentData) =>\r\n webApiWithResponse({\r\n method: \"PUT\",\r\n url: \"clearing/newpayment\",\r\n params: {\r\n userId,\r\n },\r\n data: payment,\r\n });\r\n\r\nexport default createPaymentApi;\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { PaymentData } from \"../types\";\r\n\r\nexport const updatePaymentApi = (userId: string, payment: PaymentData) =>\r\n webApiWithResponse({\r\n method: \"PUT\",\r\n url: \"clearing/updpayment\",\r\n params: {\r\n userId,\r\n },\r\n data: payment,\r\n });\r\n\r\nexport default updatePaymentApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { upsertPayment } from \"../thunks/upsertPayment\";\r\nimport { setFetchState } from \"../paymentsDataSlice\";\r\nimport { PaymentData } from \"../types\";\r\n\r\nexport const usePaymentUpsert = () => {\r\n const fetchState = useSelector(\r\n (store) => store.data.clearing.payments.fetchState\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchUpsertPayment = React.useCallback(\r\n (payment: PaymentData) => dispatch(upsertPayment(payment)),\r\n [dispatch]\r\n );\r\n\r\n React.useEffect(() => {\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n }, [dispatch]);\r\n\r\n return [fetchState, dispatchUpsertPayment] as [\r\n typeof fetchState,\r\n typeof dispatchUpsertPayment\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport createPaymentApi from \"../api/createPayment\";\r\nimport updatePaymentApi from \"../api/updatePayment\";\r\nimport { PaymentData } from \"../types\";\r\nimport { setFetchState, invalidatePayment } from \"../paymentsDataSlice\";\r\n\r\nexport const upsertPayment = (payment: PaymentData): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n dispatch(setFetchState({ type: \"started\" }));\r\n\r\n const { userId } = store.data.auth.current.user;\r\n const result = payment.payId\r\n ? await dispatch(updatePaymentApi(userId, payment))\r\n : await dispatch(createPaymentApi(userId, payment));\r\n\r\n if (result && result.resCode === \"OK\") {\r\n dispatch(setFetchState({ type: \"successful\", result: result.resDesc }));\r\n dispatch(invalidatePayment());\r\n return result.resDesc;\r\n } else {\r\n dispatch(setFetchState({ type: \"error\", errorCode: result?.resCode }));\r\n }\r\n};\r\n","import { useSelector } from \"react-redux\";\r\nimport { StoreType } from \"../../../core/store/reducers\";\r\nimport { PayTypes } from \"../../models\";\r\n\r\nconst renderLabel = (item: PayTypes) => `${item.ftDescr} `;\r\n\r\nexport const usePaymentTypes = () => {\r\n const payTypes = useSelector(\r\n (store) => store.data.initialData.payTypes\r\n );\r\n\r\n return [payTypes, renderLabel] as [typeof payTypes, typeof renderLabel];\r\n};\r\n","import React from \"react\";\r\nimport { usePaymentTypes } from \"../../../data/initialData/hooks/usePaymentTypes\";\r\nimport { PayTypes } from \"../../../data/models\";\r\nimport {\r\n AutocompleteSelect,\r\n AutocompleteSelectType,\r\n} from \"./AutocompleteSelect\";\r\n\r\ntype PayTypesPropsType = Omit<\r\n AutocompleteSelectType,\r\n \"data\" | \"getLabel\"\r\n>;\r\n\r\nexport const PaymentTypeSelect: React.FunctionComponent = (\r\n props\r\n) => {\r\n const [payTypes, renderLabel] = usePaymentTypes();\r\n\r\n return (\r\n \r\n data={payTypes}\r\n getLabel={renderLabel}\r\n {...(props as any)}\r\n />\r\n );\r\n};\r\n","import React from \"react\";\r\nimport { useEditPaymentState } from \"../../../data/clearing/payments/hooks/useEditPaymentState\";\r\nimport { usePaymentValidator } from \"../../../data/clearing/payments/hooks/usePaymentValidator\";\r\nimport { usePaymentUpsert } from \"../../../data/clearing/payments/hooks/usePaymentUpsert\";\r\nimport { RouteComponentProps, useHistory } from \"react-router-dom\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Card, Grid, CardHeader, Divider, CardContent, Paper, TextField, Typography, } from \"@material-ui/core\";\r\nimport { FabSave } from \"../../components/common/FabSave\";\r\nimport { PaymentData } from \"../../../data/clearing/payments/types\";\r\nimport { LeavePrompt } from \"../../components/common/LeavePrompt\";\r\nimport { Status, OrderSide } from \"../../../data/models\";\r\nimport { BoolInput } from \"../../components/common/BoolInput\";\r\nimport { paymentLocation } from \"./Locations\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { ClientSelect } from \"../../components/listing/ClientSelect\";\r\nimport { NumberInput } from \"../../components/common/NumberInput\";\r\nimport { DateInput } from \"../../components/common/DateInput\";\r\nimport { CurrencySelect } from \"../../components/common/CurrencySelect\";\r\nimport { PaymentTypeSelect } from \"../../components/common/PaymentTypeSelect\";\r\nimport { FiltredTransactionsSelect } from \"../../components/trading/FiltredTransactionsSelect\";\r\nimport { SimpleTransFilter } from \"../../../data/trading/transactions/types\";\r\nimport { TransSimpleData } from \"../../../data/trading/transactions/types\";\r\n\r\n\r\nexport interface EditPaymentInfo {\r\n\tpayId?: string;\r\n}\r\n\r\nexport interface EditPaymentProps extends RouteComponentProps {}\r\n\r\nexport const EditPaymentPage: React.FunctionComponent = props => {\r\n\tconst { getString, getFormatedNumberString } = React.useContext(LocalizationContext);\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst [payment, editPayment, changed] = useEditPaymentState(props.match.params.payId);\r\n\tconst [validationState, validate] = usePaymentValidator();\r\n\tconst [fetchState, upsert] = usePaymentUpsert();\r\n\tconst history = useHistory();\r\n\tconst [tradesFilter, setTransactionFilter] = React.useState(\r\n\t\tcreateTransactionFilter(payment)\r\n\t);\r\n\tconst [selectedOrder, setSelectedOrder] = React.useState(null);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tsetTransactionFilter(createTransactionFilter(payment));\r\n\t}, [payment, setTransactionFilter]);\r\n\r\n\tconst unsavedChanges = fetchState.type === \"not-started\" && changed;\r\n\r\n\tconst handleChange = React.useCallback(\r\n\t\t(event: React.ChangeEvent) => {\r\n\t\t\teditPayment(event.target.name as any, event.target.value);\r\n\t\t},\r\n\t\t[editPayment]\r\n\t);\r\n\r\n\tconst changeAmt=React.useCallback((e: any) => {\r\n\t\tconst newValue = e.target.value;\r\n\t\teditPayment(\"amt\", newValue);\r\n\t\teditPayment(\"amtPayment\", payment && newValue && payment.price ? newValue /payment.price : 0);\r\n\t},\t[editPayment,payment]\t)\r\n\r\n\r\n\tconst save = React.useCallback(() => {\r\n\t\tif (fetchState.type === \"successful\") {\r\n\t\t\thistory.push(paymentLocation);\r\n\t\t} else if (fetchState.type !== \"started\") {\r\n\t\t\tconst normalized = validate(payment);\r\n\r\n\t\t\tif (normalized) {\r\n\t\t\t\tupsert(normalized);\r\n\t\t\t}\r\n\t\t}\r\n\t}, [payment, validate, fetchState, history, upsert]);\r\n\r\n\tconst pageTitle = payment && payment.payId ? \"paymentEdit\" : \"paymentCreate\";\r\n\r\n\tif (!payment) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\treturn (\r\n\t\t\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\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 editPayment(\"payDate\", date)}\r\n\t\t\t\t\t\t\t\t\t\terror={validationState.payDate !== undefined && !validationState.payDate}\r\n\t\t\t\t\t\t\t\t\t\trequired={validationState.payDate !== undefined}\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 payTypes.ftValue === payment.payType}\r\n\t\t\t\t\t\t\t\t\t\tonChangeItem={payment =>{\r\n\t\t\t\t\t\t\t\t\t\t\teditPayment(\"payType\", payment ? payment.ftValue : undefined)\r\n\t\t\t\t\t\t\t\t\t\t\teditPayment(\"hasOrdTran\", payment ? payment.hasOrdTran : undefined)\r\n\t\t\t\t\t\t\t\t\t\t\tsetSelectedOrder(null)\r\n\t\t\t\t\t\t\t\t\t\t\teditPayment(\"tranId\", undefined)}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\terror={validationState.payType !== undefined && !validationState.payType}\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 client.cliId === payment.clientId}\r\n\t\t\t\t\t\t\t\t\t\tonChangeItem={client => {\r\n\t\t\t\t\t\t\t\t\t\t\tsetSelectedOrder(null)\r\n\t\t\t\t\t\t\t\t\t\t\teditPayment(\"clientId\", client ? client.cliId : undefined);\r\n\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\trequired={validationState.clientId !== undefined}\r\n\t\t\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\t\t\tvalidationState.clientId !== undefined && !validationState.clientId\r\n\t\t\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\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t trans.ordId === payment.tranId}\r\n\t\t\t\t\t\t\t\t\t\tonChangeItem={trans => {\r\n\t\t\t\t\t\t\t\t\t\t\tsetSelectedOrder(trans);\r\n\t\t\t\t\t\t\t\t\t\t\teditPayment(\"tranId\", trans ? trans.ordId : undefined);\r\n\t\t\t\t\t\t\t\t\t\t\teditPayment(\"price\", trans?.price );\r\n\t\t\t\t\t\t\t\t\t\t}}\r\n//\t\t\t\t\t\t\t\t\t\trequired={validationState.tranId !== undefined || payment.hasOrdTran===2 }\r\n\t\t\t\t\t\t\t\t\t\trequired={payment.hasOrdTran===2 }\r\n\t\t\t\t\t\t\t\t\t\terror={\r\n//\t\t\t\t\t\t\t\t\t\t\t(validationState.tranId !== undefined && !validationState.tranId) || (payment.tranId !== undefined && payment.hasOrdTran!==2)\r\n\t\t\t\t\t\t\t\t\t\t\t(validationState.tranId !== undefined && !validationState.tranId) && payment.hasOrdTran===2\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tdisabled={ payment.hasOrdTran===0 }\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\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\tproperty=\"amt\"\r\n\t\t\t\t\t\t\t\t\t\t\titem={payment}\r\n\t\t\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n//\t\t\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\t\t\tonChange={changeAmt}\r\n\t\t\t\t\t\t\t\t\t\t\tlabel={getString(\"paymentAmount\")}\r\n\t\t\t\t\t\t\t\t\t\t\tmoney\r\n\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t currency.currId === payment.currId}\r\n\t\t\t\t\t\t\t\t\t\t\tonChangeItem={currency => editPayment(\"currId\", currency?.currId)}\r\n\t\t\t\t\t\t\t\t\t\t\trequired={validationState.currId !== undefined}\r\n\t\t\t\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\t\t\t\tvalidationState.currId !== undefined && !validationState.currId\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\tfullWidth\r\n\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\r\n\r\n{/*\t\t\t\t\t\t\t\t\t{selectedOrder && (\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t )}\r\n\r\n\t\t\t\t\t\t\t\t\t{selectedOrder && (\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\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\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\tproperty=\"status\"\r\n\t\t\t\t\t\t\t\t\t\titem={payment}\r\n\t\t\t\t\t\t\t\t\t\t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t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t\t\t \t\r\n\t\t\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)}\r\n\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\r\n\r\n\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\t);\r\n};\r\n\r\nconst createTransactionFilter = (payment?: PaymentData) => {\r\n\treturn payment && payment.clientId\r\n\t\t? {\r\n\t\t\t\tcliid: payment.clientId,\r\n\t\t\t\tside: payment.payType===21? OrderSide.Buy : (payment.payType===23? OrderSide.Sell :undefined),\r\n\t\t }\r\n\t\t: undefined;\r\n};\r\n","import { NavigationItem } from \"../../../core/navigation/types\";\r\nimport PaymentsPage from \"./PaymentsPage\";\r\nimport { EditPaymentPage } from \"./EditPaymentsPage\";\r\nimport { paymentLocation, editRouter } from \"./Locations\";\r\nexport const paymentComponents: NavigationItem[] = [\r\n {\r\n Component: PaymentsPage,\r\n isMenuItem: true,\r\n path: paymentLocation,\r\n },\r\n {\r\n Component: EditPaymentPage,\r\n isMenuItem: false,\r\n path: editRouter,\r\n },\r\n];\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { CtrlGoodsData } from \"../types\";\r\n\r\nexport const getControlApi = (userId: string, ctrlid: string) =>\r\n webApi({\r\n method: \"GET\",\r\n url: \"clearing/getctrlgoods\",\r\n params: {\r\n userId,\r\n ctrlid,\r\n },\r\n });\r\n\r\nexport default getControlApi;\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getControlApi from \"../api/getCtrlGood\";\r\nimport { setDisplayed } from \"../ctrlGoodsDataSlice\";\r\nimport { CtrlGoodsData } from \"../types\";\r\n\r\nexport const loadCtrlGood = (controlId: string): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n dispatch(setDisplayed());\r\n\r\n const ctrlGood = await dispatch(getControlGood(controlId));\r\n\r\n dispatch(setDisplayed(ctrlGood));\r\n};\r\n\r\nexport const getControlGood = (\r\n controlId: string\r\n): ThunkType> => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { userId } = store.data.auth.current.user;\r\n return await dispatch(getControlApi(userId, controlId));\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { CtrlGoodsData } from \"../types\";\r\nimport { loadCtrlGood } from \"../thunks/loadCtrlGood\";\r\n\r\nexport const useDisplayCtrlGood = (controlId?: string) => {\r\n const storeCtrlGoods = useSelector(\r\n (store) => store.data.clearing.controls.displayedControl\r\n );\r\n\r\n const displayedctrlGood =\r\n storeCtrlGoods && storeCtrlGoods.controlId === controlId\r\n ? storeCtrlGoods\r\n : undefined;\r\n\r\n const displatch = useDispatch();\r\n\r\n React.useEffect(() => {\r\n if (controlId) {\r\n displatch(loadCtrlGood(controlId));\r\n }\r\n }, [displatch, controlId]);\r\n\r\n return displayedctrlGood;\r\n};\r\n","import React from \"react\";\r\nimport { CtrlGoodsData } from \"../../../data/clearing/ctrlgoods/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { useDisplaySingleEmementStyles } from \"../../useDisplaySingleEmementStyles\";\r\n\r\nexport interface DisplayCtrlGoodsMainAttributesProps {\r\n ctrlGood: CtrlGoodsData;\r\n}\r\n\r\nexport const DisplayCtrlGoodMainAttributes: React.FunctionComponent = ({\r\n ctrlGood,\r\n}) => {\r\n const style = useDisplaySingleEmementStyles();\r\n const { getString, getDateString } = React.useContext(LocalizationContext);\r\n\r\n return (\r\n
\r\n
\r\n {getString(\"ctrlcontrolDate\")}\r\n {getDateString(ctrlGood.controlDate)}\r\n
\r\n
\r\n {getString(\"ctrltradeNo\")}\r\n {ctrlGood.tradeNo}\r\n
\r\n
\r\n {getString(\"ctrlsellerCode\")}\r\n {ctrlGood.sellerCode}\r\n
\r\n
\r\n {getString(\"ctrlsellerName\")}\r\n {ctrlGood.sellerName}\r\n
\r\n
\r\n {getString(\"ctrlbuyerCode\")}\r\n {ctrlGood.buyerCode}\r\n
\r\n
\r\n {getString(\"ctrlbuyerName\")}\r\n {ctrlGood.buyerName}\r\n
\r\n
\r\n {getString(\"ctrlproductCode\")}\r\n {ctrlGood.productCode}\r\n
\r\n
\r\n {getString(\"ctrlproductName\")}\r\n {ctrlGood.productName}\r\n
\r\n
\r\n {getString(\"ctrlcheckPointDescr\")}\r\n {ctrlGood.checkPointDescr}\r\n
\r\n
\r\n {getString(\"ctrlcheckDoneByDescr\")}\r\n {ctrlGood.checkDoneByDescr}\r\n
\r\n
\r\n {getString(\"ctrlcontrolHouse\")}\r\n {ctrlGood.controlHouse}\r\n
\r\n\r\n
\r\n {getString(\"ctrlcontrolReportText\")}\r\n {ctrlGood.controlReportText}\r\n
\r\n
\r\n {getString(\"ctrlstatus\")}\r\n {ctrlGood.statusDescr}\r\n
\r\n
\r\n );\r\n};\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const printCtrlGoods = (user: User, ctrlid: string) => {\r\n\treturn httpWebApi({\r\n\t\tmethod: \"GET\",\r\n\t\tresponseType: \"blob\",\r\n\t\ttimeout: 60 * 4 * 1000,\r\n\t\turl: \"reporting/getctrlgoodsconfreport\",\r\n\t\tparams: {\r\n\t\t\tuserid: user.userId,\r\n\t\t\tctrlid,\r\n\t\t},\r\n\t});\r\n};\r\n\r\nexport default printCtrlGoods;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { printCtrlGoodsThunk } from \"../thunks/printCtrlGoodsThunk\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { CtrlGoodsData } from \"../types\";\r\nimport { setDownloadFetchState } from \"../ctrlGoodsDataSlice\";\r\n\r\nexport const useCtrlGoodsPrinter = (ctrlGoods?: CtrlGoodsData) => {\r\n\tconst fetchState = useSelector(\r\n\t\ts => s.data.clearing.controls.downloadReportFetchState\r\n\t);\r\n\tconst dispatch = useDispatch();\r\n\r\n\tconst download = React.useCallback(() => {\r\n\t\t\tdispatch(printCtrlGoodsThunk(ctrlGoods));\r\n\t}, [dispatch,ctrlGoods]);\r\n\r\n\tconst dispatchSetFetch = React.useCallback(() => { // Ovo da prvo izađe customDialog box\r\n\t\tdispatch(setDownloadFetchState({ type: \"started\" }))\r\n\t},\t[dispatch] );\r\n\t\r\n\treturn [download, fetchState, dispatchSetFetch] as [typeof download, typeof fetchState, typeof dispatchSetFetch];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { printCtrlGoods } from \"../api/printCtrlGoods\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setDownloadFetchState } from \"../ctrlGoodsDataSlice\";\r\nimport { CtrlGoodsData } from \"../types\";\r\n\r\nexport const printCtrlGoodsThunk = (ctrlgoods?: CtrlGoodsData): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\" || !ctrlgoods || !ctrlgoods.controlId) {\r\n\t\treturn undefined;\r\n\t}\r\n\tconst lan = store.ux.localization.language\r\n\tconst filename = `ControlGoodsConf_${ctrlgoods.controlId}.pdf`\r\n\tconst user = store.data.auth.current.user;\r\n\tdispatch(setDownloadFetchState({ type: \"started\" }));\r\n\tconst ctrlGoodsReport = await dispatch(printCtrlGoods(user, ctrlgoods.controlId));\r\n\tif (ctrlGoodsReport) {\r\n\t\tfileDownload(new Blob([ctrlGoodsReport as any], { type: \"application/pdf\" }), filename);\r\n\t}\r\n\tdispatch(setDownloadFetchState({ type: \"not-started\" }));\r\n};\r\n","import React from \"react\";\r\nimport { useDisplayCtrlGood } from \"../../../data/clearing/ctrlgoods/hooks/useDisplayCtrlGoods\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport {\r\n CtrlGoodsData,\r\n CtrlGoodsListData,\r\n} from \"../../../data/clearing/ctrlgoods/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { DisplayCtrlGoodMainAttributes } from \"./DisplayCtrlGoodMainAttributes\";\r\nimport {\r\n ExpansionPanel,\r\n ExpansionPanelSummary,\r\n Typography,\r\n Grid,IconButton\r\n} from \"@material-ui/core\";\r\nimport { useCtrlGoodsPrinter } from \"../../../data/clearing/ctrlgoods/hooks/useCtrlGoodsPrinter\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\n\r\nexport interface DisplayCtrlGoodsProps {\r\n id?: string;\r\n}\r\n\r\nexport const DisplayCtrlGoods: React.FunctionComponent = ({\r\n id,\r\n}) => {\r\n const ctrlGood = useDisplayCtrlGood(id);\r\n const { getString } = React.useContext(LocalizationContext);\r\n\tconst [download, fetchState, setfetch] = useCtrlGoodsPrinter(ctrlGood);\r\n\r\n return !ctrlGood ? (\r\n <>{\"loading placeholder\"}\r\n ) : (\r\n \r\n \r\n \r\n \r\n \r\n {getString(\"tableBasciInfo\")}\r\n \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\r\n\t\t\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\r\n { fetchState.type !== \"not-started\" ? getString(\"pleaseWait\") : null }\r\n\t\t\t\t\t\t\t\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const useViewCtrlGood = () => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n return React.useCallback(\r\n (ctrlGood: CtrlGoodsListData) =>\r\n showWithDrawer(),\r\n [showWithDrawer]\r\n );\r\n};\r\n","import { getEditLocation } from \"../../../core/util/functions\";\r\nexport const ctrlGoodsLocation = \"/cliring/paymentsdelivery/control\";\r\nexport const getCtrlGoodsEditLocation = (id?: string) =>\r\n getEditLocation(ctrlGoodsLocation, undefined, id);\r\n\r\nexport const editRouter = getCtrlGoodsEditLocation(\":ctrlId?\");\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const deleteControlApi = (userId: string, ctrlid: string) =>\r\n webApi({\r\n method: \"DELETE\",\r\n url: \"clearing/delctrlgoods\",\r\n params: {\r\n userId,\r\n ctrlid,\r\n },\r\n });\r\n\r\nexport default deleteControlApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { deleteCtrlGoods } from \"../thunks/deleteCtrlGood\";\r\nimport { setFetchState } from \"../ctrlGoodsDataSlice\";\r\n\r\nexport const useCtrlGoodDelete = () => {\r\n const fetchState = useSelector(\r\n (store) => store.data.clearing.controls.cancelFetchState\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchDeleteCtrlGood = React.useCallback(\r\n (id: string) => dispatch(deleteCtrlGoods(id)),\r\n [dispatch]\r\n );\r\n\r\n React.useEffect(() => {\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n }, [dispatch]);\r\n\r\n return [fetchState, dispatchDeleteCtrlGood] as [\r\n typeof fetchState,\r\n typeof dispatchDeleteCtrlGood\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport deleteControlApi from \"../api/deleteCtrlGoods\";\r\nimport { setFetchState, invalidateControl } from \"../ctrlGoodsDataSlice\";\r\n\r\nexport const deleteCtrlGoods = (controlId: string): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n dispatch(setFetchState({ type: \"started\" }));\r\n\r\n const { userId } = store.data.auth.current.user;\r\n const result = await dispatch(deleteControlApi(userId, controlId));\r\n\r\n dispatch(\r\n setFetchState(\r\n result !== undefined ? { type: \"successful\" } : { type: \"error\" }\r\n )\r\n );\r\n dispatch(invalidateControl())\r\n};\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport ViewIcon from \"@material-ui/icons/InputOutlined\";\r\nimport EditIcon from \"@material-ui/icons/EditOutlined\";\r\nimport { CtrlGoodsListData } from \"../../../data/clearing/ctrlgoods/types\";\r\nimport { CtrlGoodsData } from \"../../../data/clearing/ctrlgoods/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { MaterialTableProps } from \"material-table\";\r\nimport { useViewCtrlGood } from \"./DisplayCtrlGood\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { getCtrlGoodsEditLocation } from \"../ctrlgoods/Locations\";\r\nimport { DisplayCtrlGoodMainAttributes } from \"../ctrlgoods/DisplayCtrlGoodMainAttributes\";\r\nimport { useCtrlGoodDelete } from \"../../../data/clearing/ctrlgoods/hooks/useCtrlGoodDelete\";\r\n\r\nexport function useCtrlGoodsActions() {\r\n const { getString } = useContext(LocalizationContext);\r\n const onShowCtrlGood = useViewCtrlGood();\r\n const onEditCtrlGood = useEditCtrlGoodsAction();\r\n\r\n return useMemo(() => {\r\n const result: MaterialTableProps[\"actions\"] = [\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"orderActView\"),\r\n onClick: (event, rowData) =>\r\n onShowCtrlGood(rowData as CtrlGoodsListData),\r\n },\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"tableEdit\"),\r\n onClick: (event, rowData) =>\r\n onEditCtrlGood(rowData as CtrlGoodsListData),\r\n },\r\n ];\r\n return result;\r\n }, [onShowCtrlGood, onEditCtrlGood, getString]);\r\n}\r\n\r\nexport const useDeleteCtrlGoodsAction = () => {\r\n const [, deleteCtrlGood] = useCtrlGoodDelete();\r\n return React.useCallback(\r\n async (ctrlgoods: CtrlGoodsListData) => {\r\n if (ctrlgoods.controlId) {\r\n await deleteCtrlGood(ctrlgoods.controlId);\r\n }\r\n },\r\n [deleteCtrlGood]\r\n );\r\n};\r\n\r\nexport const useEditCtrlGoodsAction = () => {\r\n const history = useHistory();\r\n return React.useCallback(\r\n (ctrlgoods: CtrlGoodsListData) =>\r\n history.push(getCtrlGoodsEditLocation(ctrlgoods.controlId)),\r\n [history]\r\n );\r\n};\r\n","import React from \"react\";\r\nimport { Grid, Paper, Button, Typography } from \"@material-ui/core\";\r\nimport { DateInput } from \"../../components/common/DateInput\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { CtrlGoodsFilter } from \"../../../data/clearing/ctrlgoods/types\";\r\nimport { ClientSelect } from \"../../components/listing/ClientSelect\";\r\nimport { useAuth } from \"../../../data/auth/hooks\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { CtrlGoodsFilterChipsComponent } from \"./CtrlGoodsFilterChips\";\r\nimport { ProductSelect } from \"../../components/listing/ProductSelect\";\r\n\r\nexport enum CtrlGoodsFilterEditorType {\r\n Basic,\r\n Extended,\r\n}\r\n\r\ninterface CtrlGoodsFilterEditorProps {\r\n filter?: CtrlGoodsFilter;\r\n editFilter: (prop: keyof CtrlGoodsFilter, value: any) => void;\r\n save: () => void;\r\n type: CtrlGoodsFilterEditorType;\r\n reset?: () => void;\r\n} \r\n\r\nexport const CtrlGoodsFilterEditor: React.FunctionComponent = ({\r\n filter,\r\n editFilter,\r\n save,\r\n type,\r\n reset,\r\n}) => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const { getString } = React.useContext(LocalizationContext);\r\n const [auth] = useAuth();\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n editFilter(\"datefrom\", date?.toISOString())}\r\n />\r\n \r\n \r\n editFilter(\"dateto\", date?.toISOString())}\r\n />\r\n \r\n \r\n\r\n \r\n prod.prodId === filter?.product?.prodId}\r\n onChangeItem={(prod) => {\r\n editFilter(\"product\", prod);\r\n }}\r\n />\r\n \r\n \r\n \r\n cli.cliId === filter?.client?.cliId}\r\n onChangeItem={(cli) => editFilter(\"client\", cli)}\r\n />\r\n \r\n\r\n \r\n cli.cliId === filter?.buyer?.cliId}\r\n onChangeItem={(cli) => editFilter(\"buyer\", cli)}\r\n />\r\n \r\n\r\n \r\n cli.cliId === filter?.seller?.cliId}\r\n onChangeItem={(cli) => editFilter(\"seller\", cli)}\r\n />\r\n \r\n\r\n \r\n \r\n {\r\n save();\r\n showWithDrawer(undefined);\r\n }}\r\n >\r\n {getString(\"orderFilterConfirm\")}\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 CtrlGoodsFilterChips = CtrlGoodsFilterChipsComponent;\r\n","import React from \"react\";\r\nimport { CtrlGoodsListData } from \"../../../data/clearing/ctrlgoods/types\";\r\nimport {\r\n PaginationTable,\r\n PaginationDataProps,\r\n} from \"../../components/common/PagginationTable\";\r\nimport {\r\n useCtrlGoodsActions,\r\n useDeleteCtrlGoodsAction,\r\n} from \"./useCtrlGoodsActions\";\r\nimport { useCtrlGoodsColumns } from \"./useCtrlGoodsColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\n\r\nexport interface CtrlGoodsTableProps {\r\n userAccessRights: AccessRights;\r\n getData: () => void;\r\n}\r\n\r\ntype CtrlGoodsTablePropsType = CtrlGoodsTableProps &\r\n PaginationDataProps;\r\n\r\nconst CtrlGoodsTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n getData,\r\n ...tableProps\r\n}) => {\r\n const actions = useCtrlGoodsActions();\r\n const columns = useCtrlGoodsColumns();\r\n const onDeleteCtrlGoods = useDeleteCtrlGoodsAction();\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={getData}\r\n // immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n actions={actions}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n }}\r\n editable={{\r\n onRowDelete: onDeleteCtrlGoods,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default CtrlGoodsTable;\r\n","import { CtrlGoodsListData } from \"../../../data/clearing/ctrlgoods/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\n\r\nexport const useCtrlGoodsColumns = () => {\r\n const { getString, getDateString } = React.useContext(LocalizationContext);\r\n\r\n return React.useMemo(\r\n () => [\r\n {\r\n title: getString(\"ctrlcontrolDate\"),\r\n render: (pctrlGoods) =>\r\n getDateString(pctrlGoods.controlDate, \"DD.MM.YYYY\"),\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"ctrltradeNo\"),\r\n field: \"tradeNo\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"ctrlsellerName\"),\r\n field: \"sellerName\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"ctrlbuyerName\"),\r\n field: \"buyerName\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"ctrlproductName\"),\r\n field: \"productName\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"ctrlcheckPointDescr\"),\r\n field: \"checkPointDescr\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"ctrlstatus\"),\r\n field: \"statusDescr\",\r\n sorting: false,\r\n },\r\n ],\r\n [getString, getDateString]\r\n ) as Column[];\r\n};\r\n","import { CtrlGoodsFilter } from \"../types\";\r\nimport { CtrlGoodsListData, GetCtrlGoodsParams } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nconst getCtrlGoodsWebApi = (\r\n user: User,\r\n page: number,\r\n itemsPerPage: number,\r\n filter: CtrlGoodsFilter\r\n) => {\r\n const params: GetCtrlGoodsParams = {\r\n userid: user.userId,\r\n fromrow: page * itemsPerPage,\r\n numofrows: itemsPerPage,\r\n sellerid: filter?.seller?.cliId,\r\n buyerid:filter?.buyer?.cliId,\r\n cliid:filter?.client?.cliId,\r\n prodid:filter?.product?.prodId,\r\n datefrom: getParamsDateString(filter.datefrom),\r\n dateto: getParamsDateString(filter.dateto),\r\n };\r\n\r\n return webApiWithResponse({\r\n method: \"GET\",\r\n url: \"clearing/getctrlgoodslist\",\r\n params,\r\n });\r\n};\r\n\r\nexport default getCtrlGoodsWebApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadAllCtrlGoods } from \"../thunks/loadAllCtrlGoods\";\r\nimport { CtrlGoodsListData } from \"../types\";\r\nimport { PageData } from \"../../../models\";\r\n\r\nexport const useCtrlGoodsData = () => {\r\n const pageData = useSelector<\r\n StoreType,\r\n PageData | undefined\r\n >((s) => s.data.clearing.controls.currentPage);\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadCtrlGoodsPage = React.useCallback(\r\n () => dispatch(loadAllCtrlGoods()),\r\n [dispatch]\r\n );\r\n\r\n return [pageData, dispatchLoadCtrlGoodsPage] as [\r\n typeof pageData,\r\n typeof dispatchLoadCtrlGoodsPage\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { setControl, invalidateControl } from \"../ctrlGoodsDataSlice\";\r\nimport { setControlIndex } from \"../ctrlGoodsUXSlice\";\r\nimport getCtrlGoods from \"../api/getCtrlGoods\";\r\nimport { PageIndex, PageDataStatus } from \"../../../models\";\r\n\r\nexport const loadAllCtrlGoods = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n const { pageNumber, itemsPerPage } = store.ux.clearing.controls.index;\r\n const { filter } = store.ux.clearing.controls;\r\n const user = store.data.auth.current.user;\r\n\r\n const ctrlGoodsResponse = await dispatch(\r\n getCtrlGoods(user, pageNumber, itemsPerPage, filter)\r\n );\r\n\r\n if (!ctrlGoodsResponse || ctrlGoodsResponse.resCode !== \"OK\") {\r\n return;\r\n }\r\n\r\n const ctrlGoods = {\r\n currentPageData: ctrlGoodsResponse.obj,\r\n totalCount: Number(ctrlGoodsResponse.resDesc) || 0,\r\n status: PageDataStatus.DataCurrent,\r\n };\r\n\r\n dispatch(setControl(ctrlGoods));\r\n};\r\n\r\nexport const setCtrlGoodsIndexThunk = (index: PageIndex): ThunkType => (\r\n dispatch\r\n) => {\r\n dispatch(setControlIndex(index));\r\n dispatch(invalidateControl());\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { resetControlIdices } from \"../ctrlGoodsUXSlice\";\r\nimport { PageIndex } from \"../../../models\";\r\nimport { setCtrlGoodsIndexThunk } from \"../thunks/loadAllCtrlGoods\";\r\n\r\nexport const useCtrlGoodsIndex = () => {\r\n const pageIndex = useSelector(\r\n (s) => s.ux.clearing.controls.index\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetIndex = React.useCallback(\r\n (index: PageIndex) => dispatch(setCtrlGoodsIndexThunk(index)),\r\n [dispatch]\r\n );\r\n const dispatchResetIndex = React.useCallback(\r\n () => dispatch(resetControlIdices()),\r\n [dispatch]\r\n );\r\n\r\n return [pageIndex, dispatchSetIndex, dispatchResetIndex] as [\r\n typeof pageIndex,\r\n typeof dispatchSetIndex,\r\n typeof dispatchResetIndex\r\n ];\r\n};\r\n","import { useCopiedState } from \"../../../../core/util/hooks\";\r\nimport { setFilter, removeFilter, initialState } from \"../ctrlGoodsUXSlice\";\r\nimport { invalidateControl } from \"../ctrlGoodsDataSlice\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport React from \"react\";\r\nimport { CtrlGoodsFilter } from \"../types\";\r\n\r\nexport const useCtrlGoodsFilter = () => {\r\n const [storeFilter] = useCurrentCtrlGoodsFilter();\r\n\r\n\r\n const [filter, editFilter, changeState, setCurrentFilter] = useCopiedState(\r\n storeFilter\r\n );\r\n\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetFilter = React.useCallback(() => {\r\n dispatch(setFilter(filter!));\r\n dispatch(invalidateControl());\r\n }, [dispatch, filter]);\r\n\r\n const dispatchResetFilter = React.useCallback(() => {\r\n setCurrentFilter(initialState.filter);\r\n }, [setCurrentFilter]);\r\n\r\n return [filter, editFilter, dispatchSetFilter, changeState, dispatchResetFilter] as [\r\n typeof filter,\r\n typeof editFilter,\r\n typeof dispatchSetFilter,\r\n typeof changeState,\r\n typeof dispatchResetFilter\r\n ];\r\n};\r\n\r\nexport const useCurrentCtrlGoodsFilter = () => {\r\n const filter = useSelector(\r\n (store) => store.ux.clearing.controls.filter\r\n );\r\n const dispatch = useDispatch();\r\n const dispatchRemoveFilter = React.useCallback(\r\n (type: keyof CtrlGoodsFilter) => {\r\n dispatch(removeFilter(type));\r\n dispatch(invalidateControl());\r\n },\r\n [dispatch]\r\n );\r\n\r\n return [filter, dispatchRemoveFilter] as [\r\n typeof filter,\r\n typeof dispatchRemoveFilter\r\n ];\r\n};\r\n","import React from \"react\";\r\nimport { Chip, Grid } from \"@material-ui/core\";\r\nimport { CtrlGoodsFilter } from \"../../../data/clearing/ctrlgoods/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\n\r\nexport const CtrlGoodsFilterChipsComponent: React.FunctionComponent = ({\r\n filter,\r\n removeFilter,\r\n}) => {\r\n const { getDateString, getString } = React.useContext(LocalizationContext);\r\n return (\r\n \r\n {filter.datefrom && (\r\n \r\n removeFilter(\"datefrom\")}\r\n />\r\n \r\n )}\r\n {filter.dateto && (\r\n \r\n removeFilter(\"dateto\")}\r\n />\r\n \r\n )}\r\n {filter.product && (\r\n \r\n removeFilter(\"product\")}\r\n />\r\n \r\n )}\r\n {filter.client && (\r\n \r\n removeFilter(\"client\")}\r\n />\r\n \r\n )}\r\n\r\n {filter.buyer && (\r\n \r\n removeFilter(\"buyer\")}\r\n />\r\n \r\n )}\r\n {filter.seller && (\r\n \r\n removeFilter(\"seller\")}\r\n />\r\n \r\n )}\r\n\r\n \r\n );\r\n};\r\n\r\ninterface CtrlGoodsFilterChipsProps {\r\n filter: CtrlGoodsFilter;\r\n removeFilter: (type: keyof CtrlGoodsFilter) => void;\r\n}\r\n","import React from \"react\";\r\nimport FilterIcon from \"@material-ui/icons/FilterListOutlined\";\r\nimport { IconButton, Grid} from \"@material-ui/core\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { useCtrlGoodsFilter, useCurrentCtrlGoodsFilter } from \"../../../data/clearing/ctrlgoods/hooks/useCtrlGoodsFilter\";\r\nimport {\r\n CtrlGoodsFilterEditor,\r\n CtrlGoodsFilterEditorType,\r\n CtrlGoodsFilterChips,\r\n} from \"../ctrlgoods/CtrlGoodsFilterEditor\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\n\r\nexport const CtrlGoodsFilterButton: React.FunctionComponent = () => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const showFilter = React.useCallback(\r\n () => showWithDrawer(),\r\n [showWithDrawer]\r\n );\r\n\r\n const [filter, removeFilter] = useCurrentCtrlGoodsFilter();\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\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\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};\r\n\r\n\r\nconst ControlGoodsFilterEditor: React.FunctionComponent = () => {\r\n const [filter, editFilter, save, ,reset] = useCtrlGoodsFilter();\r\n return (\r\n \r\n );\r\n};\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { CtrlGoodsFilter } from \"../types\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nexport const getCtrlGoodsReport = (user: User, filter: CtrlGoodsFilter) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getctrlgoodsreport\",\r\n params: {\r\n userid: user.userId,\r\n sellerid: filter?.seller?.cliId,\r\n buyerid:filter?.buyer?.cliId,\r\n cliid:filter?.client?.cliId,\r\n prodid:filter?.product?.prodId,\r\n datefrom: getParamsDateString(filter.datefrom),\r\n dateto: getParamsDateString(filter.dateto),\r\n },\r\n });\r\n};\r\n\r\nexport default getCtrlGoodsReport;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadCtrlGoodsReport } from \"../thunks/downloadReport\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { CtrlGoodsData } from \"../types\";\r\n\r\nexport const useCtrlGoodsReportDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.clearing.controls.downloadReportFetchState\r\n );\r\n\r\n const data = useSelector(\r\n s => s.data.clearing.controls.currentPage?.currentPageData\r\n );\r\n \r\n const hasData = (data !== undefined && data !== null && data.length > 0) ;\r\n\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadCtrlGoodsReport()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState, hasData] as [typeof download, typeof fetchState, typeof hasData];\r\n};\r\n\r\n\r\n\r\n\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getCtrlGoodsReport } from \"../api/getCtrlGoodsReport\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setDownloadFetchState } from \"../ctrlGoodsDataSlice\";\r\n\r\nexport const downloadCtrlGoodsReport = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.clearing.controls;\r\n const user = store.data.auth.current.user;\r\n\r\n dispatch(setDownloadFetchState({ type: \"started\" }));\r\n const ordersReport = await dispatch(getCtrlGoodsReport(user, filter));\r\n if (ordersReport) {\r\n fileDownload(\r\n new Blob([ordersReport as any], { type: \"application/pdf\" }),\r\n \"CtrlGoods.pdf\"\r\n );\r\n }\r\n dispatch(setDownloadFetchState({ type: \"not-started\" }));\r\n};\r\n\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { CtrlGoodsFilter } from \"../types\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nexport const getCtrlGoodsExcel = (user: User, filter: CtrlGoodsFilter) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getctrlgoodsxls\",\r\n params: {\r\n userid: user.userId,\r\n sellerid: filter?.seller?.cliId,\r\n buyerid:filter?.buyer?.cliId,\r\n cliid:filter?.client?.cliId,\r\n prodid:filter?.product?.prodId,\r\n datefrom: getParamsDateString(filter.datefrom),\r\n dateto: getParamsDateString(filter.dateto),\r\n },\r\n });\r\n};\r\n\r\nexport default getCtrlGoodsExcel;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadCtrlGoodsExcel } from \"../thunks/downloadReportExcel\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { CtrlGoodsData } from \"../types\";\r\n\r\nexport const useCtrlGoodsExcelDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) =>\r\n s.data.clearing.controls.downloadReportFetchState\r\n );\r\n\r\n const data = useSelector(\r\n s => s.data.clearing.controls.currentPage?.currentPageData\r\n );\r\n \r\n const hasData = (data !== undefined && data !== null && data.length > 0) ;\r\n\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadCtrlGoodsExcel()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState, hasData] as [typeof download, typeof fetchState, typeof hasData];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getCtrlGoodsExcel } from \"../api/getCtrlGoodsExcel\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setDownloadFetchState } from \"../ctrlGoodsDataSlice\";\r\n\r\nexport const downloadCtrlGoodsExcel = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.clearing.controls;\r\n const user = store.data.auth.current.user;\r\n\r\n dispatch(setDownloadFetchState({ type: \"started\" }));\r\n const dailyTrading = await dispatch(getCtrlGoodsExcel(user, filter));\r\n if (dailyTrading) {\r\n fileDownload(\r\n new Blob([dailyTrading as any], {\r\n type: \"application/vnd.openxmlformat\",\r\n }),\r\n \"CtrlGoods.xlsx\"\r\n );\r\n }\r\n dispatch(setDownloadFetchState({ type: \"not-started\" }));\r\n};\r\n","import React from \"react\";\r\nimport { useCtrlGoodsReportDownloader } from \"../../../data/clearing/ctrlgoods/hooks/useCtrlGoodsReportDownloader\";\r\nimport { useCtrlGoodsExcelDownloader } from \"../../../data/clearing/ctrlgoods/hooks/useCtrlGoodsExcelDownloader\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport ExcelIcon from \"@material-ui/icons/TableChartOutlined\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\n\r\nexport const DownloadButton: React.FunctionComponent = () => {\r\n\tconst [downloader, fetchState, hasdata] = useCtrlGoodsReportDownloader();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\treturn (\r\n\t\t<>\r\n\t\t\t\r\n\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\t{fetchState.type !== \"not-started\" ? getString(\"pleaseWait\") : null}\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport const DownloadExcelButton: React.FunctionComponent = () => {\r\n\tconst [downloader, fetchState, hasdata] = useCtrlGoodsExcelDownloader();\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport {\r\n Grid,\r\n CardContent,\r\n CardHeader,\r\n Card,\r\n Divider,\r\n Fab,\r\n} from \"@material-ui/core\";\r\nimport CtrlGoodsTable from \"./CtrlGoodsTable\";\r\nimport AddIcon from \"@material-ui/icons/Add\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { PageComponent, AccessRights } from \"../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { useCtrlGoodsData } from \"../../../data/clearing/ctrlgoods/hooks/useCtrlGoodsData\";\r\nimport { useCtrlGoodsIndex } from \"../../../data/clearing/ctrlgoods/hooks/useCtrlGoodsIndex\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { getCtrlGoodsEditLocation } from \"../ctrlgoods/Locations\";\r\nimport { PageDataStatus } from \"../../../data/models\";\r\nimport { CtrlGoodsFilterButton } from \"./CtrlGoodsFilter\";\r\nimport { useAuth } from \"../../../data/auth/hooks\";\r\nimport { DownloadButton, DownloadExcelButton } from \"./DownloadButton\";\r\n\r\nconst CtrlGoodsPage: PageComponent = ({ userAccessRights }) => {\r\n const pageStyles = usePageStyles();\r\n\r\n const [pageData, dispatchLoadCtrlGoods] = useCtrlGoodsData();\r\n const [pageIndex, dispatchSetIndex] = useCtrlGoodsIndex();\r\n\r\n React.useEffect(() => {\r\n if (pageData && pageData.status === PageDataStatus.DataInvalidated) {\r\n dispatchLoadCtrlGoods();\r\n }\r\n }, [dispatchLoadCtrlGoods, pageData]);\r\n\r\n const history = useHistory();\r\n\r\n const [auth] = useAuth();\r\n\r\n if (auth.status !== \"successful\") {\r\n return null;\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n }\r\n\t\t\t\t\t\t\taction={}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {userAccessRights === AccessRights.All && (\r\n history.push(getCtrlGoodsEditLocation())}\r\n >\r\n \r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nexport const CtrlGoodsDataActions: React.FunctionComponent = () => (\r\n\t\r\n\t\t\r\n \t\t \r\n \t\r\n \t\r\n \t\t\r\n \t\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n);\r\n\r\n\r\nexport default CtrlGoodsPage;\r\n","import React from \"react\";\r\nimport { useDisplayCtrlGood } from \"./useDisplayCtrlGoods\";\r\nimport { CtrlGoodsData } from \"../types\";\r\nimport { useCopiedState } from \"../../../../core/util/hooks\";\r\n\r\nexport const defaultCtrlGoods: CtrlGoodsData = {\r\n // payId: \"\",\r\n // payTypeDescr: \"\",\r\n // status: Status.Active,\r\n};\r\n\r\nexport const useEditCtrlGood = (controlId?: string) => {\r\n const displayCtrlGood = useDisplayCtrlGood(controlId);\r\n\r\n return React.useMemo(() => {\r\n if (controlId !== undefined && displayCtrlGood === undefined) {\r\n return undefined;\r\n }\r\n\r\n if (controlId === undefined) {\r\n return { ...defaultCtrlGoods };\r\n }\r\n\r\n return displayCtrlGood ? { ...displayCtrlGood } : undefined;\r\n }, [controlId, displayCtrlGood]);\r\n};\r\n\r\nexport const useEditCtrlGoodState = (controlId?: string) => {\r\n const ctrlGood = useEditCtrlGood(controlId);\r\n return useCopiedState(ctrlGood);\r\n};\r\n","import { CtrlGoodsData, CtrlGoodsValidationState } from \"../types\";\r\nimport { createUseValidator } from \"../../../../core/util/hooks\";\r\n\r\nexport const ctrlGoodsValidationState: CtrlGoodsValidationState = {\r\n controlDate: true,\r\n tradeId: true,\r\n};\r\n\r\nexport const useCtrlGoodsValidator = createUseValidator<\r\n CtrlGoodsData,\r\n CtrlGoodsValidationState\r\n>(ctrlGoodsValidationState);\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { CtrlGoodsData } from \"../types\";\r\n\r\nexport const createControlApi = (userId: string, ctrlgoods: CtrlGoodsData) =>\r\n webApiWithResponse({\r\n method: \"PUT\",\r\n url: \"clearing/newctrlgoods\",\r\n params: {\r\n userId,\r\n },\r\n data: ctrlgoods,\r\n });\r\n\r\nexport default createControlApi;\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { CtrlGoodsData } from \"../types\";\r\n\r\nexport const updateCtrlGoodsApi = (userId: string, ctrlgoods: CtrlGoodsData) =>\r\n webApiWithResponse({\r\n method: \"PUT\",\r\n url: \"clearing/updctrlgoods\",\r\n params: {\r\n userId,\r\n },\r\n data: ctrlgoods,\r\n });\r\n\r\nexport default updateCtrlGoodsApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { upsertCtrlGood } from \"../thunks/upsertCtrlGood\";\r\nimport { setFetchState } from \"../ctrlGoodsDataSlice\";\r\nimport { CtrlGoodsData } from \"../types\";\r\n\r\nexport const useCtrlGoodUpsert = () => {\r\n const fetchState = useSelector(\r\n (store) => store.data.clearing.controls.fetchState\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchUpsertCtrlGoods = React.useCallback(\r\n (ctrlGoods: CtrlGoodsData) => dispatch(upsertCtrlGood(ctrlGoods)),\r\n [dispatch]\r\n );\r\n\r\n React.useEffect(() => {\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n }, [dispatch]);\r\n\r\n return [fetchState, dispatchUpsertCtrlGoods] as [\r\n typeof fetchState,\r\n typeof dispatchUpsertCtrlGoods\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport createControlApi from \"../api/createCtrlGoods\";\r\nimport updateCtrlGoodsApi from \"../api/updateCtrlGoods\";\r\nimport { CtrlGoodsData } from \"../types\";\r\nimport { setFetchState, invalidateControl } from \"../ctrlGoodsDataSlice\";\r\n\r\nexport const upsertCtrlGood = (ctrlGoods: CtrlGoodsData): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n dispatch(setFetchState({ type: \"started\" }));\r\n\r\n const { userId } = store.data.auth.current.user;\r\n const result = ctrlGoods.controlId\r\n ? await dispatch(updateCtrlGoodsApi(userId, ctrlGoods))\r\n : await dispatch(createControlApi(userId, ctrlGoods));\r\n\r\n if (result && result.resCode === \"OK\") {\r\n dispatch(setFetchState({ type: \"successful\", result: result.resDesc }));\r\n dispatch(invalidateControl());\r\n return result.resDesc;\r\n } else {\r\n dispatch(setFetchState({ type: \"error\", errorCode: result?.resCode }));\r\n }\r\n};\r\n","import { useSelector } from \"react-redux\";\r\nimport { StoreType } from \"../../../core/store/reducers\";\r\nimport { CheckPoint } from \"../../models\";\r\n\r\nconst renderLabel = (item: CheckPoint) => item.ftDescr\r\n\r\nexport const useCheckPoints = () => {\r\n\tconst checkPoints = useSelector(store => store.data.initialData.checkPoints);\r\n\r\n\treturn [checkPoints, renderLabel] as [typeof checkPoints, typeof renderLabel];\r\n};\r\n","import React from \"react\";\r\nimport { useCheckPoints } from \"../../../data/initialData/hooks/useCheckPoints\";\r\nimport { CheckPoint } from \"../../../data/models\";\r\nimport {\r\n AutocompleteSelect,\r\n AutocompleteSelectType,\r\n} from \"./AutocompleteSelect\";\r\n\r\ntype RegionSelectPropsType = Omit<\r\n AutocompleteSelectType,\r\n \"data\" | \"getLabel\"\r\n>;\r\n\r\nexport const CheckPointSelect: React.FunctionComponent = (\r\n props\r\n) => {\r\n const [checkPoints, renderLabel] = useCheckPoints();\r\n\r\n return (\r\n \r\n data={checkPoints}\r\n getLabel={renderLabel}\r\n {...(props as any)}\r\n />\r\n );\r\n};\r\n","import { useSelector } from \"react-redux\";\r\nimport { StoreType } from \"../../../core/store/reducers\";\r\nimport { CheckPointPayer } from \"../../models\";\r\n\r\nconst renderLabel = (item: CheckPointPayer) => item.ftDescr\r\n\r\nexport const useCheckPointPayers = () => {\r\n\tconst checkPointPayers = useSelector(store => store.data.initialData.checkPointPayers);\r\n\r\n\treturn [checkPointPayers, renderLabel] as [typeof checkPointPayers, typeof renderLabel];\r\n};\r\n","import React from \"react\";\r\nimport { useCheckPointPayers } from \"../../../data/initialData/hooks/useCheckPointPayers\";\r\nimport { CheckPointPayer } from \"../../../data/models\";\r\nimport {\r\n AutocompleteSelect,\r\n AutocompleteSelectType,\r\n} from \"./AutocompleteSelect\";\r\n\r\ntype RegionSelectPropsType = Omit<\r\n AutocompleteSelectType,\r\n \"data\" | \"getLabel\"\r\n>;\r\n\r\nexport const CheckPointPayerSelect: React.FunctionComponent = (\r\n props\r\n) => {\r\n const [checkPoints, renderLabel] = useCheckPointPayers();\r\n\r\n return (\r\n \r\n data={checkPoints}\r\n getLabel={renderLabel}\r\n {...(props as any)}\r\n />\r\n );\r\n};\r\n","import { useSelector } from \"react-redux\";\r\nimport { StoreType } from \"../../../core/store/reducers\";\r\nimport { CheckDoneByList } from \"../../models\";\r\n\r\nconst renderLabel = (item: CheckDoneByList) => item.ftDescr;\r\n\r\nexport const useCheckDoneByList = () => {\r\n const checDoneByList = useSelector(\r\n (store) => store.data.initialData.checkDoneByList\r\n );\r\n\r\n return [checDoneByList, renderLabel] as [\r\n typeof checDoneByList,\r\n typeof renderLabel\r\n ];\r\n};\r\n","import React from \"react\";\r\nimport { useCheckDoneByList } from \"../../../data/initialData/hooks/useCheckDoneByList\";\r\nimport { CheckDoneByList } from \"../../../data/models\";\r\nimport {\r\n AutocompleteSelect,\r\n AutocompleteSelectType,\r\n} from \"./AutocompleteSelect\";\r\n\r\ntype RegionSelectPropsType = Omit<\r\n AutocompleteSelectType,\r\n \"data\" | \"getLabel\"\r\n>;\r\n\r\nexport const CheckDoneBySelect: React.FunctionComponent = (\r\n props\r\n) => {\r\n const [checkDoneByList, renderLabel] = useCheckDoneByList();\r\n\r\n return (\r\n \r\n data={checkDoneByList}\r\n getLabel={renderLabel}\r\n {...(props as any)}\r\n />\r\n );\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getTradesActive } from \"../api/getTradesActive\";\r\nimport { TradesSimpleListData } from \"../types\";\r\n\r\nexport const getTradesActiveThunk = (): ThunkType> => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst user = store.data.auth.current.user;\r\n\tconst ordersResponse = await dispatch(getTradesActive(user.userId));\r\n\r\n\r\n\tif (!ordersResponse || ordersResponse.resCode !== \"OK\") {\r\n\t\treturn undefined;\r\n\t}\r\n\t\r\n\treturn ordersResponse.obj;\r\n};\r\n","import { TradesSimpleListData } from \"../types\";\r\nimport { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const getTradesActive = (userId: string) => {\r\n\treturn webApiWithResponse({\r\n\t\tmethod: \"GET\",\r\n\t\turl: \"trade/gettradesimplelist\",\r\n\t\tparams: {\r\n\t\t\tuserid: userId,\r\n\t\t},\r\n\t});\r\n};\r\n","import React from \"react\";\r\nimport { AutocompleteSelect, AutocompleteSelectType } from \"../common/AutocompleteSelect\";\r\nimport { useTradesActiveData } from \"../../../data/trading/trades/hooks/useTradesActiveData\"\r\nimport { TradeFilter, TradesSimpleListData } from \"../../../data/trading/trades/types\"\r\nimport { ClientListData } from \"../../../data/listing/clients/types\";\r\nimport { useClientSelector } from \"../../../data/listing/clients/hooks/useClientData\";\r\n\r\ntype TradesSelectPropsType = Omit, \"data\" | \"getLabel\"> & {\r\n//\tfilter?: TradeFilter;\r\n\tonSellerChange?: (seller?: ClientListData) => void;\r\n\tonBuyerChange?: (buyer?: ClientListData) => void;\r\n};\r\n\r\nexport const TradesSelect: React.FunctionComponent = ({\r\n//\tfilter,\r\n\tpredicate,\r\n\tonSellerChange,\r\n\tonBuyerChange,\r\n\t...otherProps\r\n}) => {\r\n//\tconst [trades] = useTradesActiveData(undefined, undefined, filter);\r\n\tconst [trades] = useTradesActiveData();\r\n\r\n\tconst selected = React.useMemo(() => predicate && trades?.find(predicate), [trades, predicate])\r\n\r\n\tconst sellerSelector = React.useCallback((client: ClientListData) => client.cliId === selected?.sellerId, [selected])\r\n\tconst buyerSelector = React.useCallback((client: ClientListData) => client.cliId === selected?.buyerId, [selected])\r\n\r\n\tconst [seller] = useClientSelector(sellerSelector)\r\n\tconst [buyer] = useClientSelector(buyerSelector)\r\n\r\n\tReact.useEffect(() => {\r\n\t\tonSellerChange && onSellerChange(seller)\r\n\t}, [seller, onSellerChange])\r\n\r\n\tReact.useEffect(() => {\r\n\t\tonBuyerChange && onBuyerChange(buyer)\r\n\t}, [buyer, onBuyerChange])\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t{...(otherProps as AutocompleteSelectType)}\r\n\t\t\tdata={trades || []}\r\n\t\t\tpredicate={predicate}\r\n\t\t\tgetLabel={renderAttributeLabel}\r\n//\t\t\tdisabled={filter === undefined}\r\n\t\t/>\r\n\t);\r\n};\r\n\r\nconst renderAttributeLabel = (trade: TradesSimpleListData) => trade.tradeData;\r\n","import React from \"react\";\r\nimport { useDispatch } from \"react-redux\";\r\nimport { getTradesActiveThunk } from \"../thunks/getTradesActiveThunk\";\r\nimport { TradesSimpleListData, TradeFilter } from \"../types\";\r\n\r\nexport const useTradesActiveData = () => {\r\n\tconst dispatch = useDispatch();\r\n\tconst [trades, setTrades] = React.useState();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tconst loadTrades = async () => {\r\n\t\t\tconst loaded = ((await dispatch(\r\n\t\t\t\tgetTradesActiveThunk()\r\n\t\t\t)) as any) as TradesSimpleListData[];\r\n\t\t\tsetTrades(loaded);\r\n\t\t};\r\n\t\t\tloadTrades();\r\n\t}, [ dispatch]); \r\n\r\n\tconst loadTrades = React.useCallback(\r\n\t\t() => dispatch(getTradesActiveThunk()),\r\n\t\t[dispatch]\r\n\t );\r\n\t \r\n\treturn [trades] as [typeof trades];\r\n};\r\n\r\n\r\n\r\n","import { useSelector } from \"react-redux\";\r\nimport { StoreType } from \"../../../core/store/reducers\";\r\nimport { QualityCtrlList } from \"../../models\";\r\n\r\nconst getGroupLabel = (attribute?: QualityCtrlList) => (attribute ? attribute.ftDescr : \"\");\r\n\r\nexport const useQualityCtrlList = () => {\r\n\tconst groups = useSelector(store => store.data.initialData.qualityCtrlList);\r\n\r\n\treturn [groups, getGroupLabel] as [typeof groups, typeof getGroupLabel];\r\n};\r\n","import React from \"react\";\r\nimport { useQualityCtrlList } from \"../../../data/initialData/hooks/useQualityCtrlList\";\r\nimport { QualityCtrlList } from \"../../../data/models\";\r\nimport { AutocompleteSelect, AutocompleteSelectType } from \"./AutocompleteSelect\";\r\n\r\ntype QualityCtrlListSelectPropsType = Omit, \"data\" | \"getLabel\">;\r\n\r\nexport const QualityCtrlListSelect: React.FunctionComponent = props => {\r\n\tconst [groups, renderGroupLabel] = useQualityCtrlList();\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t{...(props as AutocompleteSelectType)}\r\n\t\t\tdata={groups}\r\n\t\t\tgetLabel={renderGroupLabel}\r\n\t\t/>\r\n\t);\r\n};\r\n","import { NavigationItem } from \"../../../core/navigation/types\";\r\nimport CtrlGoodsPage from \"./CtrlGoodsPage\";\r\nimport { EditCtrlGoodsPage } from \"./EditCtrlGoodsPage\";\r\nimport { ctrlGoodsLocation, editRouter } from \"./Locations\";\r\nexport const ctrlGoodsComponents: NavigationItem[] = [\r\n {\r\n Component: CtrlGoodsPage,\r\n isMenuItem: true,\r\n path: ctrlGoodsLocation,\r\n },\r\n {\r\n Component: EditCtrlGoodsPage,\r\n isMenuItem: false,\r\n path: editRouter,\r\n },\r\n];\r\n","import React from \"react\";\r\nimport { useEditCtrlGoodState } from \"../../../data/clearing/ctrlgoods/hooks/useEditCtrlGoodsState\";\r\nimport { useCtrlGoodsValidator } from \"../../../data/clearing/ctrlgoods/hooks/useCtrlGoodsValidator\";\r\nimport { useCtrlGoodUpsert } from \"../../../data/clearing/ctrlgoods/hooks/useCtrlGoodUpsert\";\r\nimport { RouteComponentProps, useHistory } from \"react-router-dom\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Card, Grid, CardHeader, Divider, CardContent } from \"@material-ui/core\";\r\nimport { FabSave } from \"../../components/common/FabSave\";\r\nimport { CtrlGoodsData } from \"../../../data/clearing/ctrlgoods/types\";\r\nimport { StringInput } from \"../../components/common/StringInput\";\r\nimport { LeavePrompt } from \"../../components/common/LeavePrompt\";\r\nimport { Status } from \"../../../data/models\";\r\nimport { BoolInput } from \"../../components/common/BoolInput\";\r\nimport { ctrlGoodsLocation } from \"./Locations\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { ClientSelect } from \"../../components/listing/ClientSelect\";\r\nimport { DateInput } from \"../../components/common/DateInput\";\r\nimport { ProductSelect } from \"../../components/listing/ProductSelect\";\r\nimport { CheckPointSelect } from \"../../components/common/CheckPointSelect\";\r\nimport { CheckPointPayerSelect } from \"../../components/common/CheckPointPayerSelect\";\r\nimport { CheckDoneBySelect } from \"../../components/common/CheckDoneBySelect\";\r\nimport { TradesSelect } from \"../../components/trading/TradesSelect\";\r\nimport { QualityCtrlListSelect } from \"../../components/common/QualityCtrlListSelect\";\r\n\r\nexport interface EditCtrlGoodsInfo {\r\n\tctrlId?: string;\r\n}\r\n\r\nexport interface EditCtrlGoodsProps extends RouteComponentProps {}\r\n\r\nexport const EditCtrlGoodsPage: React.FunctionComponent = props => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst [ctrlGoods, editCtrlGoods, changed] = useEditCtrlGoodState(props.match.params.ctrlId);\r\n\tconst [validationState, validate] = useCtrlGoodsValidator();\r\n\tconst [fetchState, upsert] = useCtrlGoodUpsert();\r\n\tconst history = useHistory();\r\n\r\n\tconst unsavedChanges = fetchState.type === \"not-started\" && changed;\r\n\r\n\tconst handleChange = React.useCallback(\r\n\t\t(event: React.ChangeEvent) => {\r\n\t\t\teditCtrlGoods(event.target.name as any, event.target.value);\r\n\t\t},\r\n\t\t[editCtrlGoods]\r\n\t);\r\n\r\n\tconst save = React.useCallback(() => {\r\n\t\tif (fetchState.type === \"successful\") {\r\n\t\t\thistory.push(ctrlGoodsLocation);\r\n\t\t} else if (fetchState.type !== \"started\") {\r\n\t\t\tconst normalized = validate(ctrlGoods);\r\n\r\n\t\t\tif (normalized) {\r\n\t\t\t\tupsert(normalized);\r\n\t\t\t}\r\n\t\t}\r\n\t}, [ctrlGoods, validate, fetchState, history, upsert]);\r\n\r\n\tconst pageTitle = ctrlGoods && ctrlGoods.controlId ? \"crtlGoodsEdit\" : \"ctrlGoodsCreate\";\r\n\r\n\tif (!ctrlGoods) {\r\n\t\treturn null;\r\n\t}\r\n\t\r\n\treturn (\r\n\t\t\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\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 editCtrlGoods(\"controlDate\", date)}\r\n\t\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\t\tvalidationState.controlDate !== undefined &&\r\n\t\t\t\t\t\t\t\t\t\t!validationState.controlDate\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\trequired={validationState.controlDate !== undefined}\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\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t trade.tradeId === ctrlGoods.tradeId}\r\n\t\t\t\t\t\t\t\t\tonChangeItem={trade => {\r\n\t\t\t\t\t\t\t\t\t\teditCtrlGoods(\"tradeId\", trade?.tradeId);\r\n\t\t\t\t\t\t\t\t\t\teditCtrlGoods(\"productId\", trade?.productId);\r\n\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\tonSellerChange={seller =>\r\n\t\t\t\t\t\t\t\t\t\tseller?.cliId !== ctrlGoods.sellerId &&\r\n\t\t\t\t\t\t\t\t\t\teditCtrlGoods(\"sellerId\", seller?.cliId)\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tonBuyerChange={buyer =>\r\n\t\t\t\t\t\t\t\t\t\tbuyer?.cliId !== ctrlGoods.buyerId &&\r\n\t\t\t\t\t\t\t\t\t\teditCtrlGoods(\"buyerId\", buyer?.cliId)\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\trequired={validationState.tradeId !== undefined}\r\n\t\t\t\t\t\t\t\t\terror={validationState.tradeId !== undefined && !validationState.tradeId}\r\n//\t\t\t\t\t\t\t\t\tfilter={{}}\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\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t client.cliId === ctrlGoods.sellerId}\r\n\t\t\t\t\t\t\t\t\tonChangeItem={client =>\r\n\t\t\t\t\t\t\t\t\t\teditCtrlGoods(\"sellerId\", client ? client.cliId : undefined)\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\trequired={validationState.sellerId !== undefined}\r\n\t\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\t\tvalidationState.sellerId !== undefined && !validationState.sellerId\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tdisabled\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\t\r\n\t\t\t\t\t\t\t\t client.cliId === ctrlGoods.buyerId}\r\n\t\t\t\t\t\t\t\t\tonChangeItem={client =>\r\n\t\t\t\t\t\t\t\t\t\teditCtrlGoods(\"buyerId\", client ? client.cliId : undefined)\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\trequired={validationState.buyerId !== undefined}\r\n\t\t\t\t\t\t\t\t\terror={validationState.buyerId !== undefined && !validationState.buyerId}\r\n\t\t\t\t\t\t\t\t\tdisabled\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\t\r\n\t\t\t\t\t\t\t\t prod.prodId === ctrlGoods.productId}\r\n\t\t\t\t\t\t\t\t\tonChangeItem={prod => {\r\n\t\t\t\t\t\t\t\t\t\teditCtrlGoods(\"productId\", prod ? prod.prodId : undefined);\r\n\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\trequired={validationState.productId !== undefined}\r\n\t\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\t\tvalidationState.productId !== undefined && !validationState.productId\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tdisabled\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\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 checkPoint.ftValue === ctrlGoods.checkPoint}\r\n\t\t\t\t\t\t\t\t\tonChangeItem={checkPoint => {\r\n\t\t\t\t\t\t\t\t\t\teditCtrlGoods(\r\n\t\t\t\t\t\t\t\t\t\t\t\"checkPoint\",\r\n\t\t\t\t\t\t\t\t\t\t\tcheckPoint ? checkPoint.ftValue : undefined\r\n\t\t\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\trequired={validationState.checkPoint !== undefined}\r\n\t\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\t\tvalidationState.checkPoint !== undefined &&\r\n\t\t\t\t\t\t\t\t\t\t!validationState.checkPoint\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\r\n\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t checkPoint.ftValue === ctrlGoods.checkPays}\r\n\t\t\t\t\t\t\t\t\tonChangeItem={checkPoint => {\r\n\t\t\t\t\t\t\t\t\t\teditCtrlGoods(\r\n\t\t\t\t\t\t\t\t\t\t\t\"checkPays\",\r\n\t\t\t\t\t\t\t\t\t\t\tcheckPoint ? checkPoint.ftValue : undefined\r\n\t\t\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\trequired={validationState.checkPoint !== undefined}\r\n\t\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\t\tvalidationState.checkPoint !== undefined &&\r\n\t\t\t\t\t\t\t\t\t\t!validationState.checkPoint\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\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\tcheckDoneByList.ftValue === ctrlGoods.checkDoneBy\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tonChangeItem={checkDoneByList => {\r\n\t\t\t\t\t\t\t\t\t\teditCtrlGoods(\r\n\t\t\t\t\t\t\t\t\t\t\t\"checkDoneBy\",\r\n\t\t\t\t\t\t\t\t\t\t\tcheckDoneByList ? checkDoneByList.ftValue : undefined\r\n\t\t\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\trequired={validationState.checkDoneBy !== undefined}\r\n\t\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\t\tvalidationState.checkDoneBy !== undefined &&\r\n\t\t\t\t\t\t\t\t\t\t!validationState.checkDoneBy\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\r\n\t\t\t\t\t\t\r\n\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\tproperty=\"controlHouse\"\r\n\t\t\t\t\t\t\t\t\titem={ctrlGoods}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"ctrlcontrolHouse\")}\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\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\tproperty=\"controlReport\"\r\n\t\t\t\t\t\t\t\t\titem={ctrlGoods}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tfalsyValue={Status.Inactive}\r\n\t\t\t\t\t\t\t\t\tthrutyValue={Status.Active}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"ctrlcontrolReport\")}\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\r\n\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\tproperty=\"controlReportText\"\r\n\t\t\t\t\t\t\t\t\titem={ctrlGoods}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"ctrlcontrolReportText\")}\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\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t type.ftValue === ctrlGoods.status}\r\n \t\t\t\t\tonChangeItem={(type) => editCtrlGoods(\"status\", type?.ftValue)}\r\n \t\t\t\t\trequired={validationState.status !== undefined}\r\n \t\t\t\t\terror={validationState.status !== undefined && !validationState.status}\r\n \t\t\t\t/>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\r\n\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\t);\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { DeliveryData } from \"../types\";\r\n\r\nexport const getDeliveryApi = (userId: string, dlvrid: string) =>\r\n webApi({\r\n method: \"GET\",\r\n url: \"clearing/getdlvrgoods\",\r\n params: {\r\n userId,\r\n dlvrid,\r\n },\r\n });\r\n\r\nexport default getDeliveryApi;\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getDeliveryApi from \"../api/getDelivery\";\r\nimport { setDisplayed } from \"../deliveryDataSlice\";\r\nimport { DeliveryData } from \"../types\";\r\n\r\nexport const loadDelivery = (deliveryId: string): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n dispatch(setDisplayed());\r\n\r\n const delivery = await dispatch(getDelivery(deliveryId));\r\n\r\n dispatch(setDisplayed(delivery));\r\n};\r\n\r\nexport const getDelivery = (\r\n deliveryId: string\r\n): ThunkType> => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { userId } = store.data.auth.current.user;\r\n return await dispatch(getDeliveryApi(userId, deliveryId));\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { DeliveryData } from \"../types\";\r\nimport { loadDelivery } from \"../thunks/loadDelivery\";\r\n\r\nexport const useDisplayDelivery = (dlvrId?: string) => {\r\n const storeDeliveries = useSelector(\r\n (store) => store.data.clearing.deliveries.displayedDelivery\r\n );\r\n\r\n const displayedDelivery =\r\n storeDeliveries && storeDeliveries.deliveryId === dlvrId\r\n ? storeDeliveries\r\n : undefined;\r\n\r\n const displatch = useDispatch();\r\n\r\n React.useEffect(() => {\r\n if (dlvrId) {\r\n displatch(loadDelivery(dlvrId));\r\n }\r\n }, [displatch, dlvrId]);\r\n\r\n return displayedDelivery;\r\n};\r\n","import React from \"react\";\r\nimport { DeliveryData } from \"../../../data/clearing/delivery/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { useDisplaySingleEmementStyles } from \"../../useDisplaySingleEmementStyles\";\r\nimport { DisplayBoolNumber } from \"../../components/common/DisplayBoolNumber\";\r\nimport { Status } from \"../../../data/models\";\r\n\r\nexport interface DisplayDeliveryMainAttributesProps {\r\n delivery: DeliveryData;\r\n}\r\n\r\nexport const DisplayDeliveryMainAttributes: React.FunctionComponent = ({\r\n delivery,\r\n}) => {\r\n const style = useDisplaySingleEmementStyles();\r\n const { getString, getDateString, getFormatedNumberString } = React.useContext(LocalizationContext);\r\n\r\n return (\r\n
\r\n
\r\n {getString(\"dlvrDeliveryDate\")}\r\n {getDateString(delivery.deliveryDate)}\r\n
\r\n
\r\n {getString(\"dlvrTradeNo\")}\r\n {delivery.tradeNo}\r\n
\r\n
\r\n {getString(\"dlvrsellerCode\")}\r\n {delivery.sellerCode}\r\n
\r\n
\r\n {getString(\"dlvrsellerName\")}\r\n {delivery.sellerName}\r\n
\r\n
\r\n {getString(\"dlvrbuyerCode\")}\r\n {delivery.buyerCode}\r\n
\r\n
\r\n {getString(\"dlvrbuyerName\")}\r\n {delivery.buyerName}\r\n
\r\n
\r\n {getString(\"dlvrproductCode\")}\r\n {delivery.productCode}\r\n
\r\n
\r\n {getString(\"dlvrproductName\")}\r\n {delivery.productName}\r\n
\r\n
\r\n {getString(\"dlvrWarehouseCode\")}\r\n {delivery.warehouseCode}\r\n
\r\n
\r\n {getString(\"dlvrWarehouseName\")}\r\n {delivery.warehouseName}\r\n
\r\n
\r\n {getString(\"deliveryTradeQty\")}\r\n {getFormatedNumberString(delivery.tradeQty)}\r\n
\r\n
\r\n {getString(\"dlvrDeliverQty\")}\r\n {getFormatedNumberString(delivery.deliveryQty)}\r\n
\r\n
\r\n {getString(\"deliveryLeftQty\")}\r\n {getFormatedNumberString(delivery.leftQty)}\r\n
\r\n
\r\n {getString(\"tradePriceWithVat\")}\r\n{/* {getString(\"orderPrice\")} */}\r\n {getFormatedNumberString(delivery.price, true)}\r\n
\r\n
\r\n {getString(\"dlvrValue\")}\r\n {getFormatedNumberString(delivery.deliveryAmt, true)}\r\n
\r\n
\r\n {getString(\"dlvrstatus\")}\r\n \r\n \r\n \r\n
\r\n
\r\n );\r\n};\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const printDelivery = (user: User, dlvrid: string) => {\r\n\treturn httpWebApi({\r\n\t\tmethod: \"GET\",\r\n\t\tresponseType: \"blob\",\r\n\t\ttimeout: 60 * 4 * 1000,\r\n\t\turl: \"reporting/getdeliveryconfreport\",\r\n\t\tparams: {\r\n\t\t\tuserid: user.userId,\r\n\t\t\tdlvrid,\r\n\t\t},\r\n\t});\r\n};\r\n\r\nexport default printDelivery;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { printDeliveryThunk } from \"../thunks/printDeliveryThunk\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { DeliveryData } from \"../types\";\r\nimport { setPrintDeliveryFetchState } from \"../deliveryDataSlice\";\r\n\r\nexport const useDeliveryPrinter = (payment?: DeliveryData) => {\r\n\tconst fetchState = useSelector(\r\n\t\ts => s.data.clearing.deliveries.printReportFetchState\r\n\t);\r\n\tconst dispatch = useDispatch();\r\n\r\n\tconst download = React.useCallback(() => {\r\n\t\t\tdispatch(printDeliveryThunk(payment));\r\n\t}, [dispatch,payment ]);\r\n\r\n\tconst dispatchSetFetch = React.useCallback(() => { // Ovo da prvo izađe customDialog box\r\n\t\tdispatch(setPrintDeliveryFetchState({ type: \"started\" }))\r\n\t},\t[dispatch] );\r\n\t\r\n\treturn [download, fetchState, dispatchSetFetch] as [typeof download, typeof fetchState, typeof dispatchSetFetch];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { printDelivery } from \"../api/printDelivery\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setPrintDeliveryFetchState } from \"../deliveryDataSlice\";\r\nimport { DeliveryData } from \"../types\";\r\n\r\n\r\nexport const printDeliveryThunk = (delivery?: DeliveryData): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\" || !delivery || !delivery.deliveryId) {\r\n\t\treturn undefined;\r\n\t}\r\n\tconst lan = store.ux.localization.language\r\n\tconst filename = `DeliveryConfirmation_${delivery.deliveryId}.pdf`\r\n\tconst user = store.data.auth.current.user;\r\n\tdispatch(setPrintDeliveryFetchState({ type: \"started\" }));\r\n\tconst deliveryReport = await dispatch(printDelivery(user, delivery.deliveryId));\r\n\tif (deliveryReport) {\r\n\t\tfileDownload(new Blob([deliveryReport as any], { type: \"application/pdf\" }), filename);\r\n\t}\r\n\tdispatch(setPrintDeliveryFetchState({ type: \"not-started\" }));\r\n};\r\n","import React from \"react\";\r\nimport { useDisplayDelivery } from \"../../../data/clearing/delivery/hooks/useDisplayDelivery\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport {\r\n DeliveryData,\r\n DeliveryListData,\r\n} from \"../../../data/clearing/delivery/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { DisplayDeliveryMainAttributes } from \"./DisplayDeliveryMainAttributes\";\r\nimport {\r\n ExpansionPanel,\r\n ExpansionPanelSummary,\r\n Typography,\r\n Grid,IconButton,\r\n} from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport { useDeliveryPrinter } from \"../../../data/clearing/delivery/hooks/useDeliveryPrinter\";\r\n\r\nexport interface DisplayDeliveryGoodsProps {\r\n id?: string;\r\n}\r\n\r\nexport const DisplayDelivery: React.FunctionComponent = ({\r\n id,\r\n}) => {\r\n\r\n const delivery = useDisplayDelivery(id);\r\n const { getString } = React.useContext(LocalizationContext);\r\n\tconst [download, fetchState, setfetch] = useDeliveryPrinter(delivery);\r\n\r\n return !delivery ? (\r\n <>{\"loading placeholder\"}\r\n ) : (\r\n \r\n \r\n \r\n \r\n \r\n {getString(\"tableBasciInfo\")}\r\n \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\r\n\t\t\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\r\n { fetchState.type !== \"not-started\" ? getString(\"pleaseWait\") : null }\r\n\t\t\t\t\t\t\t\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const useViewDelivery = () => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n return React.useCallback(\r\n (delivery: DeliveryListData) =>\r\n showWithDrawer(),\r\n [showWithDrawer]\r\n );\r\n};\r\n","import { getEditLocation } from \"../../../core/util/functions\";\r\nexport const deliveriesLocation = \"/cliring/paymentsdelivery/delivery\";\r\nexport const getDeliveriesEditLocation = (id?: string) =>\r\n getEditLocation(deliveriesLocation, undefined, id);\r\n\r\nexport const editRouter = getDeliveriesEditLocation(\":dlvrId?\");\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const deleteDeliveryApi = (userId: string, dlvrid: string) =>\r\n webApi({\r\n method: \"DELETE\",\r\n url: \"clearing/deldlvrgoods\",\r\n params: {\r\n userId,\r\n dlvrid,\r\n },\r\n });\r\n\r\nexport default deleteDeliveryApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { deleteDelivery } from \"../thunks/deleteDelivery\";\r\nimport { setFetchState } from \"../deliveryDataSlice\";\r\n\r\nexport const useDeliveryDelete = () => {\r\n const fetchState = useSelector(\r\n (store) => store.data.clearing.deliveries.cancelFetchState\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchDeleteDelivery = React.useCallback(\r\n (id: string) => dispatch(deleteDelivery(id)),\r\n [dispatch]\r\n );\r\n\r\n React.useEffect(() => {\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n }, [dispatch]);\r\n\r\n return [fetchState, dispatchDeleteDelivery] as [\r\n typeof fetchState,\r\n typeof dispatchDeleteDelivery\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport deleteDeliveryApi from \"../api/deleteDelivery\";\r\nimport { setFetchState, invalidateDelivery } from \"../deliveryDataSlice\";\r\n\r\nexport const deleteDelivery = (deliveryId: string): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n dispatch(setFetchState({ type: \"started\" }));\r\n\r\n const { userId } = store.data.auth.current.user;\r\n const result = await dispatch(deleteDeliveryApi(userId, deliveryId));\r\n\r\n dispatch(\r\n setFetchState(\r\n result !== undefined ? { type: \"successful\" } : { type: \"error\" }\r\n )\r\n );\r\n dispatch(invalidateDelivery())\r\n};\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport ViewIcon from \"@material-ui/icons/InputOutlined\";\r\nimport EditIcon from \"@material-ui/icons/EditOutlined\";\r\nimport { DeliveryListData } from \"../../../data/clearing/delivery/types\";\r\nimport { DeliveryData } from \"../../../data/clearing/delivery/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { MaterialTableProps } from \"material-table\";\r\nimport { useViewDelivery } from \"./DisplayDelivery\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { getDeliveriesEditLocation } from \"../delivery/Locations\";\r\nimport { DisplayDeliveryMainAttributes } from \"../delivery/DisplayDeliveryMainAttributes\";\r\nimport { useDeliveryDelete } from \"../../../data/clearing/delivery/hooks/useDeliveryDelete\";\r\n\r\nexport function useDeliveriesActions() {\r\n const { getString } = useContext(LocalizationContext);\r\n const onShowDelivery = useViewDelivery();\r\n const onEditDelivery = useEditDeliveryAction();\r\n\r\n return useMemo(() => {\r\n const result: MaterialTableProps[\"actions\"] = [\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"orderActView\"),\r\n onClick: (event, rowData) =>\r\n onShowDelivery(rowData as DeliveryListData),\r\n },\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"tableEdit\"),\r\n onClick: (event, rowData) =>\r\n onEditDelivery(rowData as DeliveryListData),\r\n },\r\n ];\r\n return result;\r\n }, [onShowDelivery, onEditDelivery, getString]);\r\n}\r\n\r\nexport const useDeleteDeliveryAction = () => {\r\n const [, deleteDelivery] = useDeliveryDelete();\r\n return React.useCallback(\r\n async (delivery: DeliveryListData) => {\r\n if (delivery.deliveryId) {\r\n await deleteDelivery(delivery.deliveryId);\r\n }\r\n },\r\n [deleteDelivery]\r\n );\r\n};\r\n\r\nexport const useEditDeliveryAction = () => {\r\n const history = useHistory();\r\n return React.useCallback(\r\n (deliveries: DeliveryListData) =>\r\n history.push(getDeliveriesEditLocation(deliveries.deliveryId)),\r\n [history]\r\n );\r\n};\r\n","import React from \"react\";\r\nimport { Grid, Paper, Button, Typography } from \"@material-ui/core\";\r\nimport { DateInput } from \"../../components/common/DateInput\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { DeliveryFilter } from \"../../../data/clearing/delivery/types\";\r\nimport { ClientSelect } from \"../../components/listing/ClientSelect\";\r\nimport { useAuth } from \"../../../data/auth/hooks\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { DeliveryFilterChipsComponent } from \"./DeliveryFilterChips\";\r\nimport { ProductSelect } from \"../../components/listing/ProductSelect\";\r\n\r\nexport enum DeliveryFilterEditorType {\r\n Basic,\r\n Extended,\r\n}\r\n\r\ninterface DeliveryFilterEditorProps {\r\n filter?: DeliveryFilter;\r\n editFilter: (prop: keyof DeliveryFilter, value: any) => void;\r\n save: () => void;\r\n type: DeliveryFilterEditorType;\r\n reset?: () => void;\r\n}\r\n\r\nexport const DeliveryFilterEditor: React.FunctionComponent = ({\r\n filter,\r\n editFilter,\r\n save,\r\n type,\r\n reset,\r\n}) => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const { getString } = React.useContext(LocalizationContext);\r\n const [auth] = useAuth();\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n editFilter(\"datefrom\", date?.toISOString())}\r\n />\r\n \r\n \r\n editFilter(\"dateto\", date?.toISOString())}\r\n />\r\n \r\n \r\n\r\n \r\n prod.prodId === filter?.product?.prodId}\r\n onChangeItem={(prod) => {\r\n editFilter(\"product\", prod);\r\n }}\r\n />\r\n \r\n\r\n \r\n cli.cliId === filter?.client?.cliId}\r\n onChangeItem={(cli) => editFilter(\"client\", cli)}\r\n />\r\n \r\n\r\n \r\n cli.cliId === filter?.buyer?.cliId}\r\n onChangeItem={(cli) => editFilter(\"buyer\", cli)}\r\n />\r\n \r\n\r\n \r\n cli.cliId === filter?.seller?.cliId}\r\n onChangeItem={(cli) => editFilter(\"seller\", cli)}\r\n />\r\n \r\n\r\n \r\n \r\n {\r\n save();\r\n showWithDrawer(undefined);\r\n }}\r\n >\r\n {getString(\"orderFilterConfirm\")}\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 DeliveryFilterChips = DeliveryFilterChipsComponent;\r\n","import React from \"react\";\r\nimport { DeliveryListData } from \"../../../data/clearing/delivery/types\";\r\nimport {\r\n PaginationTable,\r\n PaginationDataProps,\r\n} from \"../../components/common/PagginationTable\";\r\nimport {\r\n useDeliveriesActions,\r\n useDeleteDeliveryAction,\r\n} from \"./useDeliveriesActions\";\r\nimport { useDeliveriesColumns } from \"./useDeliveriesColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\n\r\nexport interface DeliveryTableProps {\r\n userAccessRights: AccessRights;\r\n getData: () => void;\r\n}\r\n\r\ntype DeliveryTablePropsType = DeliveryTableProps &\r\n PaginationDataProps;\r\n\r\nconst DeliveriesTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n getData,\r\n ...tableProps\r\n}) => {\r\n const actions = useDeliveriesActions();\r\n const columns = useDeliveriesColumns();\r\n const onDeleteDelivery = useDeleteDeliveryAction();\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={getData}\r\n // immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n actions={actions}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n }}\r\n editable={{\r\n onRowDelete: onDeleteDelivery,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default DeliveriesTable;\r\n","import { DeliveryListData } from \"../../../data/clearing/delivery/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\n\r\nexport const useDeliveriesColumns = () => {\r\n const { getString, getDateString, getFormatedNumberString } = React.useContext(LocalizationContext);\r\n\r\n return React.useMemo(\r\n () => [\r\n {\r\n title: getString(\"dlvrDeliveryDate\"),\r\n render: (delivery) => getDateString(delivery.deliveryDate),\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"dlvrTradeNo\"),\r\n field: \"tradeNo\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"dlvrsellerName\"),\r\n field: \"sellerName\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"dlvrbuyerName\"),\r\n field: \"buyerName\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"dlvrproductName\"),\r\n field: \"productName\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"dlvrDeliverQty\"),\r\n render: (delivery) => getFormatedNumberString(delivery.deliveryQty),\r\n sorting: false,\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n },\r\n {\r\n title: getString(\"dlvrLeftQty\"),\r\n render: (delivery) => getFormatedNumberString(delivery.leftQty),\r\n sorting: false,\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n//\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n },\r\n {\r\n title: getString(\"dlvrTradeQty\"),\r\n render: (delivery) => getFormatedNumberString(delivery.tradeQty),\r\n sorting: false,\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n//\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n },\r\n {\r\n title: getString(\"dlvrValue\"),\r\n render: (delivery) => getFormatedNumberString(delivery.deliveryAmt,true),\r\n sorting: false,\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n//\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n },\r\n ],\r\n [getString, getDateString, getFormatedNumberString]\r\n ) as Column[];\r\n};\r\n","import { DeliveryFilter } from \"../types\";\r\nimport { DeliveryListData, GetDeliveryParams } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nconst getDeliveriesWebApi = (\r\n user: User,\r\n page: number,\r\n itemsPerPage: number,\r\n filter: DeliveryFilter\r\n) => {\r\n const params: GetDeliveryParams = {\r\n userid: user.userId,\r\n fromrow: page * itemsPerPage,\r\n numofrows: itemsPerPage,\r\n sellerid: filter?.seller?.cliId,\r\n buyerid:filter?.buyer?.cliId,\r\n cliid:filter?.client?.cliId,\r\n prodid:filter?.product?.prodId,\r\n datefrom: getParamsDateString(filter.datefrom),\r\n dateto: getParamsDateString(filter.dateto),\r\n };\r\n\r\n return webApiWithResponse({\r\n method: \"GET\",\r\n url: \"clearing/getdlvrgoodslist\",\r\n params,\r\n });\r\n};\r\n\r\nexport default getDeliveriesWebApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadDeliveries } from \"../thunks/loadDeliveries\";\r\nimport { DeliveryListData } from \"../types\";\r\nimport { PageData } from \"../../../models\";\r\n\r\nexport const useDeliveryData = () => {\r\n const pageData = useSelector<\r\n StoreType,\r\n PageData | undefined\r\n >((s) => s.data.clearing.deliveries.currentPage);\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadDeliveryPage = React.useCallback(\r\n () => dispatch(loadDeliveries()),\r\n [dispatch]\r\n );\r\n\r\n return [pageData, dispatchLoadDeliveryPage] as [\r\n typeof pageData,\r\n typeof dispatchLoadDeliveryPage\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { setDelivery, invalidateDelivery } from \"../deliveryDataSlice\";\r\nimport { setDeliveryIndex } from \"../deliveryUXSlice\";\r\nimport getDeliveries from \"../api/getDeliveries\";\r\nimport { PageIndex, PageDataStatus } from \"../../../models\";\r\n\r\nexport const loadDeliveries = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n const { pageNumber, itemsPerPage } = store.ux.clearing.deliveries.index;\r\n const { filter } = store.ux.clearing.deliveries;\r\n const user = store.data.auth.current.user;\r\n\r\n const deliveriesResponse = await dispatch(\r\n getDeliveries(user, pageNumber, itemsPerPage, filter)\r\n );\r\n\r\n if (!deliveriesResponse || deliveriesResponse.resCode !== \"OK\") {\r\n return;\r\n }\r\n\r\n const delivery = {\r\n currentPageData: deliveriesResponse.obj,\r\n totalCount: Number(deliveriesResponse.resDesc) || 0,\r\n status: PageDataStatus.DataCurrent,\r\n };\r\n\r\n dispatch(setDelivery(delivery));\r\n};\r\n\r\nexport const setDeliveryIndexThunk = (index: PageIndex): ThunkType => (\r\n dispatch\r\n) => {\r\n dispatch(setDeliveryIndex(index));\r\n dispatch(invalidateDelivery());\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { resetDeliveryIdices } from \"../deliveryUXSlice\";\r\nimport { PageIndex } from \"../../../models\";\r\nimport { setDeliveryIndexThunk } from \"../thunks/loadDeliveries\";\r\n\r\nexport const useDeliveryIndex = () => {\r\n const pageIndex = useSelector(\r\n (s) => s.ux.clearing.deliveries.index\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetIndex = React.useCallback(\r\n (index: PageIndex) => dispatch(setDeliveryIndexThunk(index)),\r\n [dispatch]\r\n );\r\n const dispatchResetIndex = React.useCallback(\r\n () => dispatch(resetDeliveryIdices()),\r\n [dispatch]\r\n );\r\n\r\n return [pageIndex, dispatchSetIndex, dispatchResetIndex] as [\r\n typeof pageIndex,\r\n typeof dispatchSetIndex,\r\n typeof dispatchResetIndex\r\n ];\r\n};\r\n","import { useCopiedState } from \"../../../../core/util/hooks\";\r\nimport { setFilter, removeFilter, initialState } from \"../deliveryUXSlice\";\r\nimport { invalidateDelivery } from \"../deliveryDataSlice\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport React from \"react\";\r\nimport { DeliveryFilter } from \"../types\";\r\n\r\nexport const useDeliveryFilter = () => {\r\n\r\n const [storeFilter] = useCurrentDeliveryilter();\r\n\r\n const [filter, editFilter, changeState,setCurrentFilter] = useCopiedState(\r\n storeFilter\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetFilter = React.useCallback(() => {\r\n dispatch(setFilter(filter!));\r\n dispatch(invalidateDelivery());\r\n }, [dispatch, filter]);\r\n\r\n const dispatchResetFilter = React.useCallback(() => {\r\n setCurrentFilter(initialState.filter);\r\n }, [setCurrentFilter]);\r\n\r\n return [filter, editFilter, dispatchSetFilter, changeState, dispatchResetFilter ] as [\r\n typeof filter,\r\n typeof editFilter,\r\n typeof dispatchSetFilter,\r\n typeof changeState,\r\n typeof dispatchResetFilter,\r\n ];\r\n};\r\n\r\nexport const useCurrentDeliveryilter = () => {\r\n const filter = useSelector(\r\n (store) => store.ux.clearing.deliveries.filter\r\n );\r\n const dispatch = useDispatch();\r\n const dispatchRemoveFilter = React.useCallback(\r\n (type: keyof DeliveryFilter) => {\r\n dispatch(removeFilter(type));\r\n dispatch(invalidateDelivery());\r\n },\r\n [dispatch]\r\n );\r\n \r\n return [filter, dispatchRemoveFilter] as [\r\n typeof filter,\r\n typeof dispatchRemoveFilter\r\n ];\r\n};\r\n","import React from \"react\";\r\nimport { Chip, Grid } from \"@material-ui/core\";\r\nimport { DeliveryFilter } from \"../../../data/clearing/delivery/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\n\r\nexport const DeliveryFilterChipsComponent: React.FunctionComponent = ({\r\n filter,\r\n removeFilter,\r\n}) => {\r\n const { getDateString, getString } = React.useContext(LocalizationContext);\r\n return (\r\n \r\n {filter.datefrom && (\r\n \r\n removeFilter(\"datefrom\")}\r\n />\r\n \r\n )}\r\n {filter.dateto && (\r\n \r\n removeFilter(\"dateto\")}\r\n />\r\n \r\n )}\r\n {filter.product && (\r\n \r\n removeFilter(\"product\")}\r\n />\r\n \r\n )}\r\n {filter.client && (\r\n \r\n removeFilter(\"client\")}\r\n />\r\n \r\n )}\r\n {filter.buyer && (\r\n \r\n removeFilter(\"buyer\")}\r\n />\r\n \r\n )}\r\n {filter.seller && (\r\n \r\n removeFilter(\"seller\")}\r\n />\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\ninterface DeliveryFilterChipsProps {\r\n filter: DeliveryFilter;\r\n removeFilter: (type: keyof DeliveryFilter) => void;\r\n}\r\n","import React from \"react\";\r\nimport FilterIcon from \"@material-ui/icons/FilterListOutlined\";\r\nimport { IconButton, Grid } from \"@material-ui/core\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { useDeliveryFilter, useCurrentDeliveryilter } from \"../../../data/clearing/delivery/hooks/useDeliveryFilter\";\r\nimport {\r\n DeliveryFilterEditor,\r\n DeliveryFilterEditorType,\r\n DeliveryFilterChips,\r\n} from \"../delivery/DeliveryFilterEditor\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\n\r\nexport const DeliveryFilterButton: React.FunctionComponent = () => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const showFilter = React.useCallback(\r\n () => showWithDrawer(),\r\n [showWithDrawer]\r\n );\r\n\r\n const [filter, removeFilter] = useCurrentDeliveryilter();\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\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\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};\r\n\r\nconst DeliveriesFilterEditor: React.FunctionComponent = () => {\r\n const [filter, editFilter, save, , reset] = useDeliveryFilter();\r\n return (\r\n \r\n );\r\n};\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { DeliveryFilter } from \"../types\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nexport const getDeliveryReport = (user: User, filter: DeliveryFilter ) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getdeliveryreport\",\r\n params: {\r\n userid: user.userId,\r\n sellerid: filter?.seller?.cliId,\r\n buyerid:filter?.buyer?.cliId,\r\n cliid:filter?.client?.cliId,\r\n prodid:filter?.product?.prodId,\r\n datefrom: getParamsDateString(filter.datefrom),\r\n dateto: getParamsDateString(filter.dateto),\r\n },\r\n });\r\n};\r\n\r\nexport default getDeliveryReport;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadDeliveryReport } from \"../thunks/downloadReport\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useDeliveryReportDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.clearing.deliveries.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadDeliveryReport()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getDeliveryReport } from \"../api/getDeliveryReport\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../deliveryDataSlice\";\r\n\r\nexport const downloadDeliveryReport = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.clearing.deliveries;\r\n const user = store.data.auth.current.user;\r\n\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const ordersReport = await dispatch(getDeliveryReport(user, filter));\r\n if (ordersReport) {\r\n fileDownload(\r\n new Blob([ordersReport as any], { type: \"application/pdf\" }),\r\n \"Delivery.pdf\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { DeliveryFilter } from \"../types\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nexport const getDeliveryExcel = (user: User, filter: DeliveryFilter) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getdlvrgoodsxls\",\r\n params: {\r\n userid: user.userId,\r\n sellerid: filter?.seller?.cliId,\r\n buyerid:filter?.buyer?.cliId,\r\n cliid:filter?.client?.cliId,\r\n prodid:filter?.product?.prodId,\r\n datefrom: getParamsDateString(filter.datefrom),\r\n dateto: getParamsDateString(filter.dateto),\r\n },\r\n });\r\n};\r\n\r\nexport default getDeliveryExcel;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadDeliveryExcel } from \"../thunks/downloadReportExcel\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useDeliveryExcelDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) =>\r\n s.data.clearing.deliveries.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadDeliveryExcel()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getDeliveryExcel } from \"../api/getDeliverysExcel\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../deliveryDataSlice\";\r\n\r\nexport const downloadDeliveryExcel = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.clearing.deliveries;\r\n const user = store.data.auth.current.user;\r\n\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const dailyTrading = await dispatch(getDeliveryExcel(user, filter));\r\n if (dailyTrading) {\r\n fileDownload(\r\n new Blob([dailyTrading as any], {\r\n type: \"application/vnd.openxmlformat\",\r\n }),\r\n \"Delivery.xlsx\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import React from \"react\";\r\nimport { useDeliveryReportDownloader } from \"../../../data/clearing/delivery/hooks/useDeliveryReportDownloader\";\r\nimport { useDeliveryExcelDownloader } from \"../../../data/clearing/delivery/hooks/useDeliveryExcelDownloader\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport ExcelIcon from \"@material-ui/icons/TableChartOutlined\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\n\r\nexport const DownloadButton: React.FunctionComponent = () => {\r\n\tconst [downloader, fetchState] = useDeliveryReportDownloader();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\treturn (\r\n\t\t<>\r\n\t\t\t\r\n\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\t{fetchState.type !== \"not-started\" ? getString(\"pleaseWait\") : null}\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport const DownloadExcelButton: React.FunctionComponent = () => {\r\n\tconst [downloader, fetchState] = useDeliveryExcelDownloader();\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport {\r\n Grid,\r\n CardContent,\r\n CardHeader,\r\n Card,\r\n Divider,\r\n Fab,\r\n} from \"@material-ui/core\";\r\nimport DeliveriesTable from \"./DeliveriesTable\";\r\nimport AddIcon from \"@material-ui/icons/Add\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { PageComponent, AccessRights } from \"../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { useDeliveryData } from \"../../../data/clearing/delivery/hooks/useDeliveryData\";\r\nimport { useDeliveryIndex } from \"../../../data/clearing/delivery/hooks/useDeliveryIndex\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { getDeliveriesEditLocation } from \"../delivery/Locations\";\r\nimport { PageDataStatus } from \"../../../data/models\";\r\nimport { DeliveryFilterButton } from \"./DeliveryFilter\";\r\nimport { useAuth } from \"../../../data/auth/hooks\";\r\nimport { DownloadButton, DownloadExcelButton } from \"./DownloadButton\";\r\n\r\nconst DeliveriesPage: PageComponent = ({ userAccessRights }) => {\r\n const pageStyles = usePageStyles();\r\n\r\n const [pageData, dispatchLoadDelivery] = useDeliveryData();\r\n const [pageIndex, dispatchSetIndex] = useDeliveryIndex();\r\n\r\n React.useEffect(() => {\r\n if (pageData && pageData.status === PageDataStatus.DataInvalidated) {\r\n dispatchLoadDelivery();\r\n }\r\n }, [dispatchLoadDelivery, pageData]);\r\n\r\n const history = useHistory();\r\n\r\n const [auth] = useAuth();\r\n\r\n if (auth.status !== \"successful\") {\r\n return null;\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n }\r\n action={}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {userAccessRights === AccessRights.All && (\r\n history.push(getDeliveriesEditLocation())}\r\n >\r\n \r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nexport const DeliveriesActions: React.FunctionComponent = () => (\r\n \r\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 DeliveriesPage;\r\n","import React from \"react\";\r\nimport { useDisplayDelivery } from \"./useDisplayDelivery\";\r\nimport { DeliveryData } from \"../types\";\r\nimport { useCopiedState } from \"../../../../core/util/hooks\";\r\n\r\nexport const defaultDelivery: DeliveryData = {\r\n deliveryId: \"\",\r\n tradeId: \"\",\r\n unitDescr: \"\",\r\n // payTypeDescr: \"\",\r\n // status: Status.Active,\r\n status: 1,\r\n};\r\n\r\nexport const useEditDelivery = (deliveryId?: string) => {\r\n const displayDelivery = useDisplayDelivery(deliveryId);\r\n\r\n return React.useMemo(() => {\r\n if (deliveryId !== undefined && displayDelivery === undefined) {\r\n return undefined;\r\n }\r\n\r\n if (deliveryId === undefined) {\r\n return { ...defaultDelivery };\r\n }\r\n\r\n return displayDelivery ? { ...displayDelivery } : undefined;\r\n }, [deliveryId, displayDelivery]);\r\n};\r\n\r\nexport const useEditDeliveryState = (deliveryId?: string) => {\r\n const deliveries = useEditDelivery(deliveryId);\r\n return useCopiedState(deliveries);\r\n};\r\n","import { DeliveryData, DeliveryValidationState } from \"../types\";\r\nimport { createUseValidator } from \"../../../../core/util/hooks\";\r\n\r\nexport const deliveryValidationState: DeliveryValidationState = {\r\n deliveryDate: true,\r\n tradeId: true,\r\n};\r\n\r\nexport const useDeliveryValidator = createUseValidator<\r\n DeliveryData,\r\n DeliveryValidationState\r\n>(deliveryValidationState);\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { DeliveryData } from \"../types\";\r\n\r\nexport const createDeliveryApi = (userId: string, delivery: DeliveryData) =>\r\n webApiWithResponse({\r\n method: \"PUT\",\r\n url: \"clearing/newdlvrgoods\",\r\n params: {\r\n userId,\r\n },\r\n data: delivery,\r\n });\r\n\r\nexport default createDeliveryApi;\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { DeliveryData } from \"../types\";\r\n\r\nexport const updateDeliveryApi = (userId: string, deliveries: DeliveryData) =>\r\n webApiWithResponse({\r\n method: \"PUT\",\r\n url: \"clearing/upddlvrgoods\",\r\n params: {\r\n userId,\r\n },\r\n data: deliveries,\r\n });\r\n\r\nexport default updateDeliveryApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { upsertDelivery } from \"../thunks/upsertDelivery\";\r\nimport { setFetchState } from \"../deliveryDataSlice\";\r\nimport { DeliveryData } from \"../types\";\r\n\r\nexport const useDeliveryUpsert = () => {\r\n const fetchState = useSelector(\r\n (store) => store.data.clearing.deliveries.fetchState\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchUpsertDelivery = React.useCallback(\r\n (deliveries: DeliveryData) => dispatch(upsertDelivery(deliveries)),\r\n [dispatch]\r\n );\r\n\r\n React.useEffect(() => {\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n }, [dispatch]);\r\n\r\n return [fetchState, dispatchUpsertDelivery] as [\r\n typeof fetchState,\r\n typeof dispatchUpsertDelivery\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport createDeliveryApi from \"../api/createDelivery\";\r\nimport updateDeliveryApi from \"../api/updateDelivery\";\r\nimport { DeliveryData } from \"../types\";\r\nimport { setFetchState, invalidateDelivery } from \"../deliveryDataSlice\";\r\n\r\nexport const upsertDelivery = (deliveries: DeliveryData): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n dispatch(setFetchState({ type: \"started\" }));\r\n\r\n const { userId } = store.data.auth.current.user;\r\n const result = deliveries.deliveryId\r\n ? await dispatch(updateDeliveryApi(userId, deliveries))\r\n : await dispatch(createDeliveryApi(userId, deliveries));\r\n\r\n if (result && result.resCode === \"OK\") {\r\n dispatch(setFetchState({ type: \"successful\", result: result.resDesc }));\r\n dispatch(invalidateDelivery());\r\n return result.resDesc;\r\n } else {\r\n dispatch(setFetchState({ type: \"error\", errorCode: result?.resCode }));\r\n }\r\n};\r\n","import { NavigationItem } from \"../../../core/navigation/types\";\r\nimport DeliveriesPage from \"./DeliveriesPage\";\r\nimport { EditDeliveryPage } from \"./EditDeliveryPage\";\r\nimport { deliveriesLocation, editRouter } from \"./Locations\";\r\nexport const deliveryComponents: NavigationItem[] = [\r\n {\r\n Component: DeliveriesPage,\r\n isMenuItem: true,\r\n path: deliveriesLocation,\r\n },\r\n {\r\n Component: EditDeliveryPage,\r\n isMenuItem: false,\r\n path: editRouter,\r\n },\r\n];\r\n","import React from \"react\";\r\nimport { useEditDeliveryState } from \"../../../data/clearing/delivery/hooks/useEditDeliveryState\";\r\nimport { useDeliveryValidator } from \"../../../data/clearing/delivery/hooks/useDeliveryValidator\";\r\nimport { useDeliveryUpsert } from \"../../../data/clearing/delivery/hooks/useDeliveryUpsert\";\r\nimport { RouteComponentProps, useHistory } from \"react-router-dom\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Card, Grid, CardHeader, Divider, CardContent, TextField } from \"@material-ui/core\";\r\nimport { FabSave } from \"../../components/common/FabSave\";\r\nimport { DeliveryData } from \"../../../data/clearing/delivery/types\";\r\nimport { LeavePrompt } from \"../../components/common/LeavePrompt\";\r\nimport { Status } from \"../../../data/models\";\r\nimport { BoolInput } from \"../../components/common/BoolInput\";\r\nimport { deliveriesLocation } from \"./Locations\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { ClientSelect } from \"../../components/listing/ClientSelect\";\r\nimport { NumberInput } from \"../../components/common/NumberInput\";\r\nimport { DateInput } from \"../../components/common/DateInput\";\r\nimport { ProductSelect } from \"../../components/listing/ProductSelect\";\r\nimport { CitySelect } from \"../../components/common/CitySelect\";\r\nimport { City } from \"../../../data/models\";\r\nimport { UnitSelect } from \"../../components/common/UnitSelect\";\r\nimport { WhsSelect } from \"../../components/listing/WarehouseSelect\";\r\nimport { TradesSelect } from \"../../components/trading/TradesSelect\";\r\n\r\nexport interface EditDeliveryInfo {\r\n\tdlvrId?: string;\r\n}\r\n\r\nexport interface EditDeliveryProps extends RouteComponentProps {}\r\n\r\nexport const EditDeliveryPage: React.FunctionComponent = props => {\r\n\tconst { getString, getFormatedNumberString } = React.useContext(LocalizationContext);\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst [delivery, editDelivery, changed] = useEditDeliveryState(props.match.params.dlvrId);\r\n\tconst [validationState, validate] = useDeliveryValidator();\r\n\tconst [fetchState, upsert] = useDeliveryUpsert();\r\n\tconst history = useHistory();\r\n\r\n\tconst unsavedChanges = fetchState.type === \"not-started\" && changed;\r\n\r\n\tconst handleChange = React.useCallback(\r\n\t\t(event: React.ChangeEvent) => {\r\n\t\t\teditDelivery(event.target.name as any, event.target.value);\r\n\t\t},\r\n\t\t[editDelivery]\r\n\t);\r\n\r\n\tconst changeQty=React.useCallback((e: any) => {\r\n\t\tconst newValue = e.target.value;\r\n\t\teditDelivery(\"deliveryQty\", newValue);\r\n\t\teditDelivery(\"deliveryAmt\", delivery && newValue && delivery.price ? newValue *delivery.price : 0);\r\n\t},\t[editDelivery,delivery]\t)\r\n\t\r\n\tconst save = React.useCallback(() => {\r\n\t\tif (fetchState.type === \"successful\") {\r\n\t\t\thistory.push(deliveriesLocation);\r\n\t\t} else if (fetchState.type !== \"started\") {\r\n\t\t\tconst normalized = validate(delivery);\r\n\r\n\t\t\tif (normalized) {\r\n\t\t\t\tupsert(normalized);\r\n\t\t\t}\r\n\t\t}\r\n\t}, [delivery, validate, fetchState, history, upsert]);\r\n\r\n\tconst pageTitle = delivery && delivery.deliveryId ? \"dlvrEdit\" : \"dlvrCreate\";\r\n\r\n\tif (!delivery) {\r\n\t\treturn null;\r\n\t}\r\n\t\r\n\treturn (\r\n\t\t\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\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 editDelivery(\"deliveryDate\", date)}\r\n\t\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\t\tvalidationState.deliveryDate !== undefined &&\r\n\t\t\t\t\t\t\t\t\t\t!validationState.deliveryDate\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\trequired={validationState.deliveryDate !== undefined}\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\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 trade.tradeId === delivery.tradeId}\r\n\t\t\t\t\t\t\t\t\tonChangeItem={trade => {\r\n\t\t\t\t\t\t\t\t\t\teditDelivery(\"tradeId\", trade?.tradeId);\r\n\t\t\t\t\t\t\t\t\t\teditDelivery(\"productId\", trade?.productId);\r\n\t\t\t\t\t\t\t\t\t\teditDelivery(\"price\", trade?.price);\r\n\t\t\t\t\t\t\t\t\t\teditDelivery(\"deliveryAmt\", delivery.deliveryAmt);\r\n\t\t\t\t\t\t\t\t\t\teditDelivery(\"unit\", trade?.unit);\r\n\t\t\t\t\t\t\t\t\t\teditDelivery(\"unitDescr\", trade?.unitDescr);\r\n//\t\t\t\t\t\t\t\t\t\teditDelivery(\"deliveryAmt\", delivery.deliveryQty && trade ? trade.price*delivery.deliveryQty : 0);\r\n\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\tonSellerChange={seller =>\r\n\t\t\t\t\t\t\t\t\t\tseller?.cliId !== delivery.sellerId &&\r\n\t\t\t\t\t\t\t\t\t\teditDelivery(\"sellerId\", seller?.cliId)\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tonBuyerChange={buyer =>\r\n\t\t\t\t\t\t\t\t\t\tbuyer?.cliId !== delivery.buyerId &&\r\n\t\t\t\t\t\t\t\t\t\teditDelivery(\"buyerId\", buyer?.cliId)\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\trequired={validationState.tradeId !== undefined}\r\n\t\t\t\t\t\t\t\t\terror={validationState.tradeId !== undefined && !validationState.tradeId}\r\n//\t\t\t\t\t\t\t\t\tfilter={{}}\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\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 client.cliId === delivery.sellerId}\r\n\t\t\t\t\t\t\t\t\tonChangeItem={client =>\r\n\t\t\t\t\t\t\t\t\t\teditDelivery(\"sellerId\", client ? client.cliId : undefined)\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\trequired={validationState.sellerId !== undefined}\r\n\t\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\t\tvalidationState.sellerId !== undefined && !validationState.sellerId\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tdisabled\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\t\r\n\t\t\t\t\t\t\t\t client.cliId === delivery.buyerId}\r\n\t\t\t\t\t\t\t\t\tonChangeItem={client =>\r\n\t\t\t\t\t\t\t\t\t\teditDelivery(\"buyerId\", client ? client.cliId : undefined)\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\trequired={validationState.buyerId !== undefined}\r\n\t\t\t\t\t\t\t\t\terror={validationState.buyerId !== undefined && !validationState.buyerId}\r\n\t\t\t\t\t\t\t\t\tdisabled\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\t\r\n\t\t\t\t\t\t\t\t prod.prodId === delivery.productId}\r\n\t\t\t\t\t\t\t\t\tonChangeItem={prod => {\r\n\t\t\t\t\t\t\t\t\t\teditDelivery(\"productId\", prod ? prod.prodId : undefined);\r\n\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\trequired={validationState.productId !== undefined}\r\n\t\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\t\tvalidationState.productId !== undefined && !validationState.productId\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tdisabled\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\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\tproperty=\"deliveryQty\"\r\n\t\t\t\t\t\t\t\t\titem={delivery}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={changeQty}\r\n//\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"dlvrDeliverQty\")}\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\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\r\n{/*\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t unit.ftValue === delivery.unit}\r\n\t\t\t\t\t\t\t\t\tonChangeItem={unit => {\r\n\t\t\t\t\t\t\t\t\t\teditDelivery(\"unit\", unit?.ftValue);\r\n\t\t\t\t\t\t\t\t\t\teditDelivery(\"unitDescr\", unit?.ftDescr);\r\n\t\t\t\t\t\t\t\t\t\teditDelivery(\"deliveryAmt\", delivery.deliveryQty && delivery.price ? delivery.price*delivery.deliveryQty : 0);\r\n\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\trequired={validationState.unit !== undefined}\r\n\t\t\t\t\t\t\t\t\terror={validationState.unit !== undefined && !validationState.unit}\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t */}\r\n\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 \r\n\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\r\n\r\n\t\t\t\t\t\t\r\n\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 warehouse.whsId === delivery.warehouseId}\r\n\t\t\t\t\t\t\t\t\tonChangeItem={warehouse =>\r\n\t\t\t\t\t\t\t\t\t\teditDelivery(\"warehouseId\", warehouse ? warehouse.whsId : undefined)\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\trequired={validationState.warehouseId !== undefined}\r\n\t\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\t\tvalidationState.warehouseId !== undefined &&\r\n\t\t\t\t\t\t\t\t\t\t!validationState.warehouseId\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\r\n\t\t\t\t\t\t */}\r\n\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\tproperty=\"status\"\r\n\t\t\t\t\t\t\t\t\titem={delivery}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tfalsyValue={Status.Inactive}\r\n\t\t\t\t\t\t\t\t\tthrutyValue={Status.Active}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"ctrlstatus\")}\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\r\n\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\t);\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { DisputeData } from \"../types\";\r\n\r\nexport const getDisputeApi = (userId: string, dispid: string) =>\r\n webApi({\r\n method: \"GET\",\r\n url: \"clearing/getdispsit\",\r\n params: {\r\n userId,\r\n dispid,\r\n },\r\n });\r\n\r\nexport default getDisputeApi;\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getDisputeApi from \"../api/getDispute\";\r\nimport { setDisplayed } from \"../disputeDataSlice\";\r\nimport { DisputeData } from \"../types\";\r\n\r\nexport const loadDispute = (disputeId: string): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n dispatch(setDisplayed());\r\n\r\n const dispute = await dispatch(getDispute(disputeId));\r\n\r\n dispatch(setDisplayed(dispute));\r\n};\r\n\r\nexport const getDispute = (\r\n disputeId: string\r\n): ThunkType> => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { userId } = store.data.auth.current.user;\r\n return await dispatch(getDisputeApi(userId, disputeId));\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { DisputeData } from \"../types\";\r\nimport { loadDispute } from \"../thunks/loadDispute\";\r\n\r\nexport const useDisplayDispute = (dispId?: string) => {\r\n const storeDispute = useSelector(\r\n (store) => store.data.clearing.disputes.displayedDispute\r\n );\r\n\r\n const displayedDispute =\r\n storeDispute && storeDispute.dispSitId === dispId\r\n ? storeDispute\r\n : undefined;\r\n\r\n const displatch = useDispatch();\r\n\r\n React.useEffect(() => {\r\n if (dispId) {\r\n displatch(loadDispute(dispId));\r\n }\r\n }, [displatch, dispId]);\r\n\r\n return displayedDispute;\r\n};\r\n","import React from \"react\";\r\nimport { DisputeData } from \"../../../data/clearing/dispute/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { useDisplaySingleEmementStyles } from \"../../useDisplaySingleEmementStyles\";\r\n\r\nexport interface DisplayDisputeMainAttributesProps {\r\n dispute: DisputeData;\r\n}\r\n\r\nexport const DisplayDisputeMainAttributes: React.FunctionComponent = ({\r\n dispute,\r\n}) => {\r\n const style = useDisplaySingleEmementStyles();\r\n const { getString, getDateString } = React.useContext(LocalizationContext);\r\n\r\n return (\r\n
\r\n
\r\n {getString(\"disDispSitDate\")}\r\n {getDateString(dispute.dispSitDate)}\r\n
\r\n
\r\n {getString(\"disTradeNo\")}\r\n {dispute.tradeNo}\r\n
\r\n
\r\n {getString(\"dissellerCode\")}\r\n {dispute.sellerCode}\r\n
\r\n
\r\n {getString(\"dissellerName\")}\r\n {dispute.sellerName}\r\n
\r\n
\r\n {getString(\"disbuyerCode\")}\r\n {dispute.buyerCode}\r\n
\r\n
\r\n {getString(\"disbuyerName\")}\r\n {dispute.buyerName}\r\n
\r\n
\r\n {getString(\"disproductCode\")}\r\n {dispute.productCode}\r\n
\r\n
\r\n {getString(\"disproductName\")}\r\n {dispute.productName}\r\n
\r\n
\r\n {getString(\"disDisputeDescr\")}\r\n {dispute.situationDescr}\r\n
\r\n
\r\n {getString(\"disstatus\")}\r\n {dispute.statusDescr}\r\n
\r\n
\r\n );\r\n};\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const printDispute = (user: User, dispid: string) => {\r\n\treturn httpWebApi({\r\n\t\tmethod: \"GET\",\r\n\t\tresponseType: \"blob\",\r\n\t\ttimeout: 60 * 4 * 1000,\r\n\t\turl: \"reporting/getdispsitconfreport\",\r\n\t\tparams: {\r\n\t\t\tuserid: user.userId,\r\n\t\t\tdispid,\r\n\t\t},\r\n\t});\r\n};\r\n\r\nexport default printDispute;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { printDisputeThunk } from \"../thunks/printDisputeThunk\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { DisputeData } from \"../types\";\r\nimport { setDownloadFetchState } from \"../disputeDataSlice\";\r\n\r\nexport const useDisputePrinter = (dispute?: DisputeData) => {\r\n\tconst fetchState = useSelector(\r\n\t\ts => s.data.clearing.disputes.downloadReportFetchState\r\n\t);\r\n\tconst dispatch = useDispatch();\r\n\r\n\tconst download = React.useCallback(() => {\r\n\t\t\tdispatch(printDisputeThunk(dispute));\r\n\t}, [dispatch,dispute]);\r\n\r\n\tconst dispatchSetFetch = React.useCallback(() => { // Ovo da prvo izađe customDialog box\r\n\t\tdispatch(setDownloadFetchState({ type: \"started\" }))\r\n\t},\t[dispatch] );\r\n\t\r\n\treturn [download, fetchState, dispatchSetFetch] as [typeof download, typeof fetchState, typeof dispatchSetFetch];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { printDispute } from \"../api/printDispute\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setDownloadFetchState } from \"../disputeDataSlice\";\r\nimport { DisputeData } from \"../types\";\r\n\r\nexport const printDisputeThunk = (dispute?: DisputeData): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\" || !dispute || !dispute.dispSitId) {\r\n\t\treturn undefined;\r\n\t}\r\n\tconst lan = store.ux.localization.language\r\n\tconst filename = `DisputeConf_${dispute.dispSitId}.pdf`\r\n\tconst user = store.data.auth.current.user;\r\n\tdispatch(setDownloadFetchState({ type: \"started\" }));\r\n\tconst disputeReport = await dispatch(printDispute(user, dispute.dispSitId));\r\n\tif (disputeReport) {\r\n\t\tfileDownload(new Blob([disputeReport as any], { type: \"application/pdf\" }), filename);\r\n\t}\r\n\tdispatch(setDownloadFetchState({ type: \"not-started\" }));\r\n};\r\n","import React from \"react\";\r\nimport { useDisplayDispute } from \"../../../data/clearing/dispute/hooks/useDisplayDispute\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport {\r\n DisputeData,\r\n DisputeListData,\r\n} from \"../../../data/clearing/dispute/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { DisplayDisputeMainAttributes } from \"./DisplayDisputeMainAttributes\";\r\nimport {\r\n ExpansionPanel,\r\n ExpansionPanelSummary,\r\n Typography,\r\n Grid, IconButton,\r\n} from \"@material-ui/core\";\r\nimport { useDisputePrinter } from \"../../../data/clearing/dispute/hooks/useDisputePrinter\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\n\r\nexport interface DisplayDisputeProps {\r\n id?: string;\r\n}\r\n\r\nexport const DisplayDispute: React.FunctionComponent = ({\r\n id,\r\n}) => {\r\n const dispute = useDisplayDispute(id);\r\n const { getString } = React.useContext(LocalizationContext);\r\n\tconst [download, fetchState, setfetch] = useDisputePrinter(dispute);\r\n\r\n return !dispute ? (\r\n <>{\"loading placeholder\"}\r\n ) : (\r\n \r\n \r\n \r\n \r\n \r\n {getString(\"tableBasciInfo\")}\r\n \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\r\n\t\t\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\r\n { fetchState.type !== \"not-started\" ? getString(\"pleaseWait\") : null }\r\n\t\t\t\t\t\t\t\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const useViewDispute = () => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n return React.useCallback(\r\n (dispute: DisputeListData) =>\r\n showWithDrawer(),\r\n [showWithDrawer]\r\n );\r\n};\r\n","import { getEditLocation } from \"../../../core/util/functions\";\r\nexport const disputesLocation = \"/cliring/disputedsituations\";\r\nexport const getDisputesEditLocation = (id?: string) =>\r\n getEditLocation(disputesLocation, undefined, id);\r\n\r\nexport const editRouter = getDisputesEditLocation(\":dispId?\");\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const deleteDisputeApi = (userId: string, dispid: string) =>\r\n webApi({\r\n method: \"DELETE\",\r\n url: \"clearing/deldispsit\",\r\n params: {\r\n userId,\r\n dispid,\r\n },\r\n });\r\n\r\nexport default deleteDisputeApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { deleteDispute } from \"../thunks/deleteDispute\";\r\nimport { setFetchState } from \"../disputeDataSlice\";\r\n\r\nexport const useDisputeDelete = () => {\r\n const fetchState = useSelector(\r\n (store) => store.data.clearing.disputes.cancelFetchState\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchDeleteDispute = React.useCallback(\r\n (id: string) => dispatch(deleteDispute(id)),\r\n [dispatch]\r\n );\r\n\r\n React.useEffect(() => {\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n }, [dispatch]);\r\n\r\n return [fetchState, dispatchDeleteDispute] as [\r\n typeof fetchState,\r\n typeof dispatchDeleteDispute\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport deleteDisputeApi from \"../api/deleteDispute\";\r\nimport { setFetchState, invalidateDispute } from \"../disputeDataSlice\";\r\n\r\nexport const deleteDispute = (disputeId: string): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setFetchState({ type: \"started\" }));\r\n\r\n\tconst { userId } = store.data.auth.current.user;\r\n\tconst result = await dispatch(deleteDisputeApi(userId, disputeId));\r\n\r\n\tdispatch(setFetchState(result !== undefined ? { type: \"successful\" } : { type: \"error\" }));\r\n\tdispatch(invalidateDispute());\r\n};\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport ViewIcon from \"@material-ui/icons/InputOutlined\";\r\nimport EditIcon from \"@material-ui/icons/EditOutlined\";\r\nimport { DisputeListData } from \"../../../data/clearing/dispute/types\";\r\nimport { DisputeData } from \"../../../data/clearing/dispute/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { MaterialTableProps } from \"material-table\";\r\nimport { useViewDispute } from \"./DisplayDispute\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { getDisputesEditLocation } from \"../dispute/Locations\";\r\nimport { DisplayDisputeMainAttributes } from \"../dispute/DisplayDisputeMainAttributes\";\r\nimport { useDisputeDelete } from \"../../../data/clearing/dispute/hooks/useDisputeDelete\";\r\n\r\nexport function useDisputesActions() {\r\n const { getString } = useContext(LocalizationContext);\r\n const onShowDispute = useViewDispute();\r\n const onEditDispute = useEditDisputeAction();\r\n\r\n return useMemo(() => {\r\n const result: MaterialTableProps[\"actions\"] = [\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"orderActView\"),\r\n onClick: (event, rowData) => onShowDispute(rowData as DisputeListData),\r\n },\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"tableEdit\"),\r\n onClick: (event, rowData) => onEditDispute(rowData as DisputeListData),\r\n },\r\n ];\r\n return result;\r\n }, [onShowDispute, onEditDispute, getString]);\r\n}\r\n\r\nexport const useDeleteDisputeAction = () => {\r\n const [, deleteDispute] = useDisputeDelete();\r\n return React.useCallback(\r\n async (dispute: DisputeListData) => {\r\n if (dispute.dispSitDate) {\r\n await deleteDispute(dispute.dispSitId);\r\n }\r\n },\r\n [deleteDispute]\r\n );\r\n};\r\n\r\nexport const useEditDisputeAction = () => {\r\n const history = useHistory();\r\n return React.useCallback(\r\n (dispute: DisputeListData) =>\r\n history.push(getDisputesEditLocation(dispute.dispSitId)),\r\n [history]\r\n );\r\n};\r\n","import React from \"react\";\r\nimport { DisputeListData } from \"../../../data/clearing/dispute/types\";\r\nimport { Typography } from \"@material-ui/core\";\r\nimport { useOrderTableStyles } from \"./styles\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport InfoOutlinedIcon from \"@material-ui/icons/InfoOutlined\";\r\n\r\nexport interface RenderDisputeType {\r\n\t(dispute: DisputeListData): React.ReactNode;\r\n}\r\n\r\nconst createRenderer = (Component: DisputeDisplayComponentType): RenderDisputeType => dispute => (\r\n\t\r\n);\r\n\r\nexport const TooltipColumn: React.FunctionComponent<{\r\n\tdisplayText: React.ReactNode;\r\n\ttooltip?: React.ReactNode;\r\n\ttypography?: boolean;\r\n\thideIcon?: boolean;\r\n}> = ({ displayText, tooltip, typography, hideIcon }) => {\r\n\tconst styles = useOrderTableStyles();\r\n\tconst tooltipElement =\r\n\t\ttypography && tooltip ? {tooltip} : tooltip;\r\n\r\n\treturn tooltip ? (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t{hideIcon !== true && }\r\n\t\t\t\t{displayText}\r\n\t\t\t\r\n\t\t\r\n\t) : (\r\n\t\t<>{displayText}\r\n\t);\r\n};\r\n\r\nexport const TooltipElises: React.FunctionComponent<{ text: string }> = ({ text }) => {\r\n\tconst tooltipElement = {text};\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t{text}\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n\r\ninterface DisputeDisplayComponentProps {\r\n\tdispute: DisputeListData;\r\n}\r\n\r\ntype DisputeDisplayComponentType = React.FunctionComponent;\r\n\r\nexport const DisputeSituationDisplay: DisputeDisplayComponentType = ({ dispute }) => (\r\n\t\r\n);\r\n\r\nconst tunrocateString = (text: string, maxChars: number) => {\r\n\tconst turnocate = text && text.length > maxChars; // pada program ako je upisano null\r\n\treturn {\r\n\t\tturnocate,\r\n\t\ttext: turnocate ? `${text.substring(0, maxChars - 3)}...` : text,\r\n\t};\r\n};\r\n\r\nexport interface TurnocateTextProps {\r\n\ttext: string;\r\n\tmaxChars: number;\r\n}\r\n\r\nexport const TurnocateText: React.FunctionComponent = ({ text, maxChars }) => {\r\n\tconst turnocatedName = tunrocateString(text, maxChars);\r\n\r\n\treturn turnocatedName.turnocate ? (\r\n\t\t\r\n\t) : (\r\n\t\t<>{text}\r\n\t);\r\n};\r\n\r\nexport const renderSituation = createRenderer(DisputeSituationDisplay);\r\n","import React from \"react\";\r\nimport { Grid, Paper, Button } from \"@material-ui/core\";\r\nimport { DateInput } from \"../../components/common/DateInput\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { DisputeFilter } from \"../../../data/clearing/dispute/types\";\r\nimport { ClientSelect } from \"../../components/listing/ClientSelect\";\r\nimport { useAuth } from \"../../../data/auth/hooks\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { DisputeFilterChipsComponent } from \"./DisputeFilterChips\";\r\nimport { ProductSelect } from \"../../components/listing/ProductSelect\";\r\nimport { DispSitListSelect } from \"../../components/common/DispSitListSelect\";\r\n\r\nexport enum DisputeFilterEditorType {\r\n Basic,\r\n Extended,\r\n}\r\n\r\ninterface DisputeFilterEditorProps {\r\n filter?: DisputeFilter;\r\n editFilter: (prop: keyof DisputeFilter, value: any) => void;\r\n save: () => void;\r\n type: DisputeFilterEditorType;\r\n reset?: () => void;\r\n}\r\n\r\nexport const DisputeFilterEditor: React.FunctionComponent = ({\r\n filter,\r\n editFilter,\r\n save,\r\n type,\r\n reset,\r\n}) => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const { getString } = React.useContext(LocalizationContext);\r\n const [auth] = useAuth();\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n editFilter(\"datefrom\", date?.toISOString())}\r\n />\r\n \r\n \r\n editFilter(\"dateto\", date?.toISOString())}\r\n />\r\n \r\n \r\n\r\n \r\n prod.prodId === filter?.product?.prodId}\r\n onChangeItem={(prod) => {\r\n editFilter(\"product\", prod);\r\n }}\r\n />\r\n \r\n\r\n \r\n cli.cliId === filter?.client?.cliId}\r\n onChangeItem={(cli) => editFilter(\"client\", cli)}\r\n />\r\n \r\n\r\n \r\n cli.cliId === filter?.buyer?.cliId}\r\n onChangeItem={(cli) => editFilter(\"buyer\", cli)}\r\n />\r\n \r\n\r\n \r\n cli.cliId === filter?.seller?.cliId}\r\n onChangeItem={(cli) => editFilter(\"seller\", cli)}\r\n />\r\n \r\n\r\n \r\n\t\t\t\t\t\t status.ftValue === filter?.status?.ftValue}\r\n\t\t\t\t\t\t\tonChangeItem={status => {\r\n\t\t\t\t\t\t\t\teditFilter(\"status\", status);\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\r\n \r\n \r\n {\r\n save();\r\n showWithDrawer(undefined);\r\n }}\r\n >\r\n {getString(\"orderFilterConfirm\")}\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 DisputeFilterChips = DisputeFilterChipsComponent;\r\n","import { Theme, makeStyles, createStyles } from \"@material-ui/core\";\r\n\r\nexport const useOrderTableStyles = makeStyles((theme: Theme) => {\r\n\treturn createStyles({\r\n\t\tcellHasTooltip: {\r\n\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\tdisplay: \"flex\",\r\n\t\t\tjustifyContent: \"space-between\",\r\n\t\t\t\"& > svg\": {\r\n\t\t\t\twidth: \"12px\",\r\n\t\t\t\tmarginLeft: \"5px\",\r\n\t\t\t\tdisplay: \"inline\",\r\n\t\t\t\tcolor: theme.palette.info.dark,\r\n\t\t\t},\r\n\t\t},\r\n\t\tlongCell: {\r\n\t\t\twhiteSpace: \"nowrap\",\r\n\t\t},\r\n\t\tvalueLabel: {\r\n\t\t\tdisplay: \"flex\",\r\n\t\t\tjustifyContent: \"space-between\",\r\n\t\t\t\"& > span:not(:first-child)\": {\r\n\t\t\t\tmarginLeft: \"5px\",\r\n\t\t\t},\r\n\t\t},\r\n\t});\r\n});\r\n\r\nexport const useTooltipStyles = makeStyles((theme: Theme) => ({\r\n\tarrow: {\r\n\t\tcolor: theme.palette.common.black,\r\n\t},\r\n\ttooltip: {\r\n\t\tbackgroundColor: theme.palette.common.black,\r\n\t},\r\n}));\r\n","import React from \"react\";\r\nimport { DisputeListData } from \"../../../data/clearing/dispute/types\";\r\nimport {\r\n PaginationTable,\r\n PaginationDataProps,\r\n} from \"../../components/common/PagginationTable\";\r\nimport {\r\n useDisputesActions,\r\n useDeleteDisputeAction,\r\n} from \"./useDisputesActions\";\r\nimport { useDisputeColumns } from \"./useDisputesColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\n\r\nexport interface DisputeTableProps {\r\n userAccessRights: AccessRights;\r\n getData: () => void;\r\n}\r\n\r\ntype DisputeTablePropsType = DisputeTableProps &\r\n PaginationDataProps;\r\n\r\nconst DisputeTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n getData,\r\n ...tableProps\r\n}) => {\r\n const actions = useDisputesActions();\r\n const columns = useDisputeColumns();\r\n const onDeleteDispute = useDeleteDisputeAction();\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={getData}\r\n // immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n actions={actions}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n }}\r\n editable={{\r\n onRowDelete: onDeleteDispute,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default DisputeTable;\r\n","import { DisputeListData } from \"../../../data/clearing/dispute/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\nimport { renderSituation, TurnocateText } from \"./columRenderers\";\r\n\r\nexport const useDisputeColumns = () => {\r\n const { getString, getDateString } = React.useContext(LocalizationContext);\r\n\r\n return React.useMemo(\r\n () => [\r\n {\r\n title: getString(\"disDispSitDate\"),\r\n render: (dispute) => getDateString(dispute.dispSitDate, \"DD.MM.YYYY\"),\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"disTradeNo\"),\r\n field: \"tradeNo\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"dissellerName\"),\r\n field: \"sellerName\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"disbuyerName\"),\r\n field: \"buyerName\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"disproductName\"),\r\n field: \"productName\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"disDisputeDescr\"),\r\n render: renderSituation,\r\n sorting: false,\r\n }, \r\n {\r\n title: getString(\"productStatus\"),\r\n field: \"statusDescr\",\r\n sorting: false,\r\n },\r\n ],\r\n [getString]\r\n ) as Column[];\r\n};\r\n","import { DisputeFilter } from \"../types\";\r\nimport { DisputeListData, GetDisputeParams } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nconst getDisputesWebApi = (\r\n user: User,\r\n page: number,\r\n itemsPerPage: number,\r\n filter: DisputeFilter\r\n) => {\r\n const params: GetDisputeParams = {\r\n userid: user.userId,\r\n fromrow: page * itemsPerPage,\r\n numofrows: itemsPerPage,\r\n sellerid: filter?.seller?.cliId,\r\n buyerid:filter?.buyer?.cliId,\r\n cliid:filter?.client?.cliId,\r\n prodid:filter?.product?.prodId,\r\n datefrom: getParamsDateString(filter.datefrom),\r\n dateto: getParamsDateString(filter.dateto),\r\n };\r\n \r\n return webApiWithResponse({\r\n method: \"GET\",\r\n url: \"clearing/getdispsitlist\",\r\n params,\r\n });\r\n};\r\n\r\nexport default getDisputesWebApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadDisputes } from \"../thunks/loadDisputes\";\r\nimport { DisputeListData } from \"../types\";\r\nimport { PageData } from \"../../../models\";\r\n\r\nexport const useDisputeData = () => {\r\n const pageData = useSelector<\r\n StoreType,\r\n PageData | undefined\r\n >((s) => s.data.clearing.disputes.currentPage);\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadDisputePage = React.useCallback(\r\n () => dispatch(loadDisputes()),\r\n [dispatch]\r\n );\r\n\r\n return [pageData, dispatchLoadDisputePage] as [\r\n typeof pageData,\r\n typeof dispatchLoadDisputePage\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { setDisputes, invalidateDispute } from \"../disputeDataSlice\";\r\nimport { setDisputeIndex } from \"../disputeUXSlice\";\r\nimport getDisputes from \"../api/getDisputes\";\r\nimport { PageIndex, PageDataStatus } from \"../../../models\";\r\n\r\nexport const loadDisputes = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n const { pageNumber, itemsPerPage } = store.ux.clearing.disputes.index;\r\n const { filter } = store.ux.clearing.disputes;\r\n const user = store.data.auth.current.user;\r\n\r\n const disputesResponse = await dispatch(\r\n getDisputes(user, pageNumber, itemsPerPage, filter)\r\n );\r\n\r\n if (!disputesResponse || disputesResponse.resCode !== \"OK\") {\r\n return;\r\n }\r\n\r\n const disputes = {\r\n currentPageData: disputesResponse.obj,\r\n totalCount: Number(disputesResponse.resDesc) || 0,\r\n status: PageDataStatus.DataCurrent,\r\n };\r\n\r\n dispatch(setDisputes(disputes));\r\n};\r\n\r\nexport const setDisputeIndexThunk = (index: PageIndex): ThunkType => (\r\n dispatch\r\n) => {\r\n dispatch(setDisputeIndex(index));\r\n dispatch(invalidateDispute());\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { resetDisputeIdices } from \"../disputeUXSlice\";\r\nimport { PageIndex } from \"../../../models\";\r\nimport { setDisputeIndexThunk } from \"../thunks/loadDisputes\";\r\n\r\nexport const useDisputeIndex = () => {\r\n const pageIndex = useSelector(\r\n (s) => s.ux.clearing.disputes.index\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetIndex = React.useCallback(\r\n (index: PageIndex) => dispatch(setDisputeIndexThunk(index)),\r\n [dispatch]\r\n );\r\n const dispatchResetIndex = React.useCallback(\r\n () => dispatch(resetDisputeIdices()),\r\n [dispatch]\r\n );\r\n\r\n return [pageIndex, dispatchSetIndex, dispatchResetIndex] as [\r\n typeof pageIndex,\r\n typeof dispatchSetIndex,\r\n typeof dispatchResetIndex\r\n ];\r\n};\r\n","import { useCopiedState } from \"../../../../core/util/hooks\";\r\nimport { setFilter, removeFilter, initialState } from \"../disputeUXSlice\";\r\nimport { invalidateDispute } from \"../disputeDataSlice\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport React from \"react\";\r\nimport { DisputeFilter } from \"../types\";\r\n\r\nexport const useDisputeFilter = () => {\r\n const [storeFilter] = useCurrentDisputeFilter();\r\n\r\n const [filter, editFilter, changeState, setCurrentFilter] = useCopiedState< DisputeFilter>(storeFilter);\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetFilter = React.useCallback(() => {\r\n dispatch(setFilter(filter!));\r\n dispatch(invalidateDispute());\r\n }, [dispatch, filter]);\r\n\r\n const dispatchResetFilter = React.useCallback(() => {\r\n setCurrentFilter(initialState.filter);\r\n }, [setCurrentFilter]);\r\n\r\n\r\n return [\r\n filter,\r\n editFilter,\r\n dispatchSetFilter,\r\n changeState,\r\n dispatchResetFilter,\r\n ] as [\r\n typeof filter,\r\n typeof editFilter,\r\n typeof dispatchSetFilter,\r\n typeof changeState,\r\n typeof dispatchResetFilter\r\n ];\r\n\r\n};\r\n\r\nexport const useCurrentDisputeFilter = () => {\r\n const filter = useSelector(\r\n (store) => store.ux.clearing.disputes.filter\r\n );\r\n const dispatch = useDispatch();\r\n const dispatchRemoveFilter = React.useCallback(\r\n (type: keyof DisputeFilter) => {\r\n dispatch(removeFilter(type));\r\n dispatch(invalidateDispute());\r\n },\r\n [dispatch]\r\n );\r\n\r\n return [filter, dispatchRemoveFilter] as [\r\n typeof filter,\r\n typeof dispatchRemoveFilter\r\n ];\r\n};\r\n","import { useSelector } from \"react-redux\";\r\nimport { StoreType } from \"../../../core/store/reducers\";\r\nimport { DispSitList } from \"../../models\";\r\n\r\nconst getGroupLabel = (attribute?: DispSitList) => (attribute ? attribute.ftDescr : \"\");\r\n\r\nexport const useDispSitList = () => {\r\n\tconst groups = useSelector(store => store.data.initialData.dispSitList);\r\n\r\n\treturn [groups, getGroupLabel] as [typeof groups, typeof getGroupLabel];\r\n};\r\n","import React from \"react\";\r\nimport { useDispSitList } from \"../../../data/initialData/hooks/useDispSitList\";\r\nimport { DispSitList } from \"../../../data/models\";\r\nimport { AutocompleteSelect, AutocompleteSelectType } from \"./AutocompleteSelect\";\r\n\r\ntype DispSitListSelectPropsType = Omit, \"data\" | \"getLabel\">;\r\n\r\nexport const DispSitListSelect: React.FunctionComponent = props => {\r\n\tconst [groups, renderGroupLabel] = useDispSitList();\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t{...(props as AutocompleteSelectType)}\r\n\t\t\tdata={groups}\r\n\t\t\tgetLabel={renderGroupLabel}\r\n\t\t/>\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport { Chip, Grid } from \"@material-ui/core\";\r\nimport { DisputeFilter } from \"../../../data/clearing/dispute/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\n\r\nexport const DisputeFilterChipsComponent: React.FunctionComponent = ({\r\n filter,\r\n removeFilter,\r\n}) => {\r\n const { getDateString, getString } = React.useContext(LocalizationContext);\r\n return (\r\n \r\n {filter.datefrom && (\r\n \r\n removeFilter(\"datefrom\")}\r\n />\r\n \r\n )}\r\n {filter.dateto && (\r\n \r\n removeFilter(\"dateto\")}\r\n />\r\n \r\n )}\r\n {filter.product && (\r\n \r\n removeFilter(\"product\")}\r\n />\r\n \r\n )}\r\n {filter.client && (\r\n \r\n removeFilter(\"client\")}\r\n />\r\n \r\n )}\r\n {filter.buyer && (\r\n \r\n removeFilter(\"buyer\")}\r\n />\r\n \r\n )}\r\n {filter.seller && (\r\n \r\n removeFilter(\"seller\")}\r\n />\r\n \r\n )}\r\n\r\n \r\n );\r\n};\r\n\r\ninterface DisputeFilterChipsProps {\r\n filter: DisputeFilter;\r\n removeFilter: (type: keyof DisputeFilter) => void;\r\n}\r\n","import React from \"react\";\r\nimport FilterIcon from \"@material-ui/icons/FilterListOutlined\";\r\nimport { IconButton,Grid } from \"@material-ui/core\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { useDisputeFilter, useCurrentDisputeFilter } from \"../../../data/clearing/dispute/hooks/useDisputeFilter\";\r\nimport {\r\n DisputeFilterEditor,\r\n DisputeFilterEditorType,\r\n DisputeFilterChips,\r\n} from \"../dispute/DisputeFilterEditor\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\n\r\nexport const DisputeFilterButton: React.FunctionComponent = () => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const showFilter = React.useCallback(\r\n () => showWithDrawer(),\r\n [showWithDrawer]\r\n );\r\n\r\n const [filter, removeFilter] = useCurrentDisputeFilter();\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\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\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};\r\n\r\nconst DisputesFilterEditor: React.FunctionComponent = () => {\r\n const [filter, editFilter, save, ,reset] = useDisputeFilter();\r\n return (\r\n \r\n );\r\n};\r\n\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { DisputeFilter } from \"../types\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nexport const getDisputeReport = (user: User, filter: DisputeFilter) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getdispsitreport\",\r\n params: {\r\n userid: user.userId,\r\n sellerid: filter?.seller?.cliId,\r\n buyerid:filter?.buyer?.cliId,\r\n cliid:filter?.client?.cliId,\r\n prodid:filter?.product?.prodId,\r\n datefrom: getParamsDateString(filter.datefrom),\r\n dateto: getParamsDateString(filter.dateto),\r\n },\r\n });\r\n};\r\n\r\nexport default getDisputeReport;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadDisputeReport } from \"../thunks/downloadReport\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useDisputeReportDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.clearing.disputes.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadDisputeReport()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getDisputeReport } from \"../api/getDisputeReport\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../disputeDataSlice\";\r\n\r\nexport const downloadDisputeReport = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.clearing.disputes;\r\n const user = store.data.auth.current.user;\r\n\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const ordersReport = await dispatch(getDisputeReport(user, filter));\r\n if (ordersReport) {\r\n fileDownload(\r\n new Blob([ordersReport as any], { type: \"application/pdf\" }),\r\n \"Dispute.pdf\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { DisputeFilter } from \"../types\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nexport const getDisputeExcel = (user: User, filter: DisputeFilter) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getdispsitxls\",\r\n params: {\r\n userid: user.userId,\r\n sellerid: filter?.seller?.cliId,\r\n buyerid:filter?.buyer?.cliId,\r\n cliid:filter?.client?.cliId,\r\n prodid:filter?.product?.prodId,\r\n datefrom: getParamsDateString(filter.datefrom),\r\n dateto: getParamsDateString(filter.dateto),\r\n },\r\n });\r\n};\r\n\r\nexport default getDisputeExcel;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadDisputeExcel } from \"../thunks/downloadReportExcel\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useDisputeExcelDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) =>\r\n s.data.clearing.disputes.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadDisputeExcel()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getDisputeExcel } from \"../api/getDisputeExcel\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../disputeDataSlice\";\r\n\r\nexport const downloadDisputeExcel = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n \r\n const { filter } = store.ux.clearing.disputes;\r\n const user = store.data.auth.current.user;\r\n\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const dailyTrading = await dispatch(getDisputeExcel(user, filter));\r\n if (dailyTrading) {\r\n fileDownload(\r\n new Blob([dailyTrading as any], {\r\n type: \"application/vnd.openxmlformat\",\r\n }),\r\n \"Dispute.xlsx\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import React from \"react\";\r\nimport { useDisputeReportDownloader } from \"../../../data/clearing/dispute/hooks/useDisputeReportDownloader\";\r\nimport { useDisputeExcelDownloader } from \"../../../data/clearing/dispute/hooks/useDisputeExcelDownloader\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport ExcelIcon from \"@material-ui/icons/TableChartOutlined\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\n\r\nexport const DownloadButton: React.FunctionComponent = () => {\r\n\tconst [downloader, fetchState] = useDisputeReportDownloader();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\treturn (\r\n\t\t<>\r\n\t\t\t\r\n\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\t{fetchState.type !== \"not-started\" ? getString(\"pleaseWait\") : null}\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport const DownloadExcelButton: React.FunctionComponent = () => {\r\n\tconst [downloader, fetchState] = useDisputeExcelDownloader();\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport {\r\n Grid,\r\n CardContent,\r\n CardHeader,\r\n Card,\r\n Divider,\r\n Fab,\r\n} from \"@material-ui/core\";\r\nimport DisputeTable from \"./DisputeTable\";\r\nimport AddIcon from \"@material-ui/icons/Add\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { PageComponent, AccessRights } from \"../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { useDisputeData } from \"../../../data/clearing/dispute/hooks/useDisputeData\";\r\nimport { useDisputeIndex } from \"../../../data/clearing/dispute/hooks/useDisputeIndex\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { getDisputesEditLocation } from \"../dispute/Locations\";\r\nimport { PageDataStatus } from \"../../../data/models\";\r\nimport { DisputeFilterButton } from \"./DisputeFilter\";\r\nimport { useAuth } from \"../../../data/auth/hooks\";\r\nimport { DownloadButton, DownloadExcelButton } from \"./DownloadButton\";\r\n\r\nconst DisputePage: PageComponent = ({ userAccessRights }) => {\r\n const pageStyles = usePageStyles();\r\n\r\n const [pageData, dispatchLoadDispute] = useDisputeData();\r\n const [pageIndex, dispatchSetIndex] = useDisputeIndex();\r\n\r\n React.useEffect(() => {\r\n if (pageData && pageData.status === PageDataStatus.DataInvalidated) {\r\n dispatchLoadDispute();\r\n }\r\n }, [dispatchLoadDispute, pageData]);\r\n\r\n const history = useHistory();\r\n\r\n const [auth] = useAuth();\r\n\r\n if (auth.status !== \"successful\") {\r\n return null;\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n }\r\n action={}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {userAccessRights === AccessRights.All && (\r\n history.push(getDisputesEditLocation())}\r\n >\r\n \r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nexport const DisputeActions: React.FunctionComponent = () => (\r\n \r\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 DisputePage;\r\n","import React from \"react\";\r\nimport { useDisplayDispute } from \"./useDisplayDispute\";\r\nimport { DisputeData } from \"../types\";\r\nimport { useCopiedState } from \"../../../../core/util/hooks\";\r\nimport { Status } from \"../../../models\";\r\n\r\nexport const defaultDispute: DisputeData = {\r\n dispSitId: \"\",\r\n tradeId: \"\",\r\n status: Status.Inactive,\r\n// situationDescr: \" \",\r\n};\r\n\r\nexport const useEditDispute = (dispId?: string) => {\r\n const displayDispute = useDisplayDispute(dispId);\r\n\r\n return React.useMemo(() => {\r\n if (dispId !== undefined && displayDispute === undefined) {\r\n return undefined;\r\n }\r\n\r\n if (dispId === undefined) {\r\n return { ...defaultDispute };\r\n }\r\n\r\n return displayDispute ? { ...displayDispute } : undefined;\r\n }, [dispId, displayDispute]);\r\n};\r\n\r\nexport const useEditDisputeState = (dispId?: string) => {\r\n const disputes = useEditDispute(dispId);\r\n return useCopiedState(disputes);\r\n};\r\n","import { DisputeData, DisputeValidationState } from \"../types\";\r\nimport { createUseValidator } from \"../../../../core/util/hooks\";\r\n\r\nexport const disputeValidationState: DisputeValidationState = {\r\n dispSitDate: true,\r\n tradeId: true,\r\n};\r\n\r\nexport const useDisputeValidator = createUseValidator<\r\n DisputeData,\r\n DisputeValidationState\r\n>(disputeValidationState);\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { DisputeData } from \"../types\";\r\n\r\nexport const createDisputeApi = (userId: string, dispute: DisputeData) =>\r\n webApiWithResponse({\r\n method: \"PUT\",\r\n url: \"clearing/newdispsit\",\r\n params: {\r\n userId,\r\n },\r\n data: dispute,\r\n });\r\n\r\nexport default createDisputeApi;\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { DisputeData } from \"../types\";\r\n\r\nexport const updateDisputeApi = (userId: string, dispute: DisputeData) =>\r\n webApiWithResponse({\r\n method: \"PUT\",\r\n url: \"clearing/upddispsit\",\r\n params: {\r\n userId,\r\n },\r\n data: dispute,\r\n });\r\n\r\nexport default updateDisputeApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { upsertDispute } from \"../thunks/upsertDispute\";\r\nimport { setFetchState } from \"../disputeDataSlice\";\r\nimport { DisputeData } from \"../types\";\r\n\r\nexport const useDisputeUpsert = () => {\r\n const fetchState = useSelector(\r\n (store) => store.data.clearing.disputes.fetchState\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchUpsertDispute = React.useCallback(\r\n (disputes: DisputeData) => dispatch(upsertDispute(disputes)),\r\n [dispatch]\r\n );\r\n\r\n React.useEffect(() => {\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n }, [dispatch]);\r\n\r\n return [fetchState, dispatchUpsertDispute] as [\r\n typeof fetchState,\r\n typeof dispatchUpsertDispute\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport createDisputeApi from \"../api/createDispute\";\r\nimport updateDisputeApi from \"../api/updateDispute\";\r\nimport { DisputeData } from \"../types\";\r\nimport { setFetchState, invalidateDispute } from \"../disputeDataSlice\";\r\n\r\nexport const upsertDispute = (dispute: DisputeData): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n dispatch(setFetchState({ type: \"started\" }));\r\n\r\n const { userId } = store.data.auth.current.user;\r\n\r\n const result = dispute.dispSitId\r\n ? await dispatch(updateDisputeApi(userId, dispute))\r\n : await dispatch(createDisputeApi(userId, dispute));\r\n\r\n if (result && result.resCode === \"OK\") {\r\n dispatch(setFetchState({ type: \"successful\", result: result.resDesc }));\r\n dispatch(invalidateDispute());\r\n return result.resDesc;\r\n } else {\r\n dispatch(setFetchState({ type: \"error\", errorCode: result?.resCode }));\r\n }\r\n};\r\n","import { NavigationItem } from \"../../../core/navigation/types\";\r\nimport DisputePage from \"./DisputePage\";\r\nimport { EditDisputePage } from \"./EditDisputePage\";\r\nimport { disputesLocation, editRouter } from \"./Locations\";\r\nexport const disputeComponents: NavigationItem[] = [\r\n {\r\n Component: DisputePage,\r\n isMenuItem: true,\r\n path: disputesLocation,\r\n },\r\n {\r\n Component: EditDisputePage,\r\n isMenuItem: false,\r\n path: editRouter,\r\n },\r\n];\r\n","import React from \"react\";\r\nimport { useEditDisputeState } from \"../../../data/clearing/dispute/hooks/useEditDisputeState\";\r\nimport { useDisputeValidator } from \"../../../data/clearing/dispute/hooks/useDisputeValidator\";\r\nimport { useDisputeUpsert } from \"../../../data/clearing/dispute/hooks/useDisputeUpsert\";\r\nimport { RouteComponentProps, useHistory } from \"react-router-dom\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Card, Grid, CardHeader, Divider, CardContent } from \"@material-ui/core\";\r\nimport { FabSave } from \"../../components/common/FabSave\";\r\nimport { DisputeData } from \"../../../data/clearing/dispute/types\";\r\nimport { StringInput } from \"../../components/common/StringInput\";\r\nimport { LeavePrompt } from \"../../components/common/LeavePrompt\";\r\nimport { disputesLocation } from \"./Locations\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { ClientSelect } from \"../../components/listing/ClientSelect\";\r\nimport { DateInput } from \"../../components/common/DateInput\";\r\nimport { ProductSelect } from \"../../components/listing/ProductSelect\";\r\nimport { TradesSelect } from \"../../components/trading/TradesSelect\";\r\nimport { DispSitListSelect } from \"../../components/common/DispSitListSelect\";\r\n\r\nexport interface EditDisputeInfo {\r\n\tdispId?: string;\r\n}\r\n\r\nexport interface EditDisputeProps extends RouteComponentProps {}\r\n\r\nexport const EditDisputePage: React.FunctionComponent = props => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst [dispute, editDispute, changed] = useEditDisputeState(props.match.params.dispId);\r\n\tconst [validationState, validate] = useDisputeValidator();\r\n\tconst [fetchState, upsert] = useDisputeUpsert();\r\n\tconst history = useHistory();\r\n\r\n\tconst unsavedChanges = fetchState.type === \"not-started\" && changed;\r\n\r\n\tconst handleChange = React.useCallback(\r\n\t\t(event: React.ChangeEvent) => {\r\n\t\t\teditDispute(event.target.name as any, event.target.value);\r\n\t\t},\r\n\t\t[editDispute]\r\n\t);\r\n\r\n\tconst save = React.useCallback(() => {\r\n\t\tif (fetchState.type === \"successful\") {\r\n\t\t\thistory.push(disputesLocation);\r\n\t\t} else if (fetchState.type !== \"started\") {\r\n\t\t\tconst normalized = validate(dispute);\r\n\t\t\tif (normalized) {\r\n\t\t\t\tupsert(normalized);\r\n\t\t\t}\r\n\t\t}\r\n\t}, [dispute, validate, fetchState, history, upsert]);\r\n\r\n\tconst pageTitle = dispute && dispute.dispSitId ? \"disEdit\" : \"disCreate\";\r\n\r\n\tif (!dispute) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\treturn (\r\n\t\t\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\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 editDispute(\"dispSitDate\", date)}\r\n\t\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\t\tvalidationState.dispSitDate !== undefined &&\r\n\t\t\t\t\t\t\t\t\t\t!validationState.dispSitDate\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\trequired={validationState.dispSitDate !== undefined}\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\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 trade.tradeId === dispute.tradeId}\r\n\t\t\t\t\t\t\t\t\tonChangeItem={trade => {\r\n\t\t\t\t\t\t\t\t\t\teditDispute(\"tradeId\", trade?.tradeId);\r\n\t\t\t\t\t\t\t\t\t\teditDispute(\"productId\", trade?.productId);\r\n\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\tonSellerChange={seller =>\r\n\t\t\t\t\t\t\t\t\t\tseller?.cliId !== dispute.sellerId &&\r\n\t\t\t\t\t\t\t\t\t\teditDispute(\"sellerId\", seller?.cliId)\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tonBuyerChange={buyer =>\r\n\t\t\t\t\t\t\t\t\t\tbuyer?.cliId !== dispute.buyerId &&\r\n\t\t\t\t\t\t\t\t\t\teditDispute(\"buyerId\", buyer?.cliId)\r\n\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\trequired={validationState.tradeId !== undefined}\r\n\t\t\t\t\t\t\t\t\terror={validationState.tradeId !== undefined && !validationState.tradeId}\r\n//\t\t\t\t\t\t\t\t\tfilter={{}}\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\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 client.cliId === dispute.sellerId}\r\n\t\t\t\t\t\t\t\t\tonChangeItem={client =>\r\n\t\t\t\t\t\t\t\t\t\teditDispute(\"sellerId\", client ? client.cliId : undefined)\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\trequired={validationState.sellerId !== undefined}\r\n\t\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\t\tvalidationState.sellerId !== undefined && !validationState.sellerId\r\n }\r\n disabled\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\t\r\n\t\t\t\t\t\t\t\t client.cliId === dispute.buyerId}\r\n\t\t\t\t\t\t\t\t\tonChangeItem={client =>\r\n\t\t\t\t\t\t\t\t\t\teditDispute(\"buyerId\", client ? client.cliId : undefined)\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\trequired={validationState.buyerId !== undefined}\r\n error={validationState.buyerId !== undefined && !validationState.buyerId}\r\n disabled\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\t\r\n\t\t\t\t\t\t\t\t prod.prodId === dispute.productId}\r\n\t\t\t\t\t\t\t\t\tonChangeItem={prod => {\r\n\t\t\t\t\t\t\t\t\t\teditDispute(\"productId\", prod ? prod.prodId : undefined);\r\n\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\trequired={validationState.productId !== undefined}\r\n\t\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\t\tvalidationState.productId !== undefined && !validationState.productId\r\n }\r\n disabled\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\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\tproperty=\"situationDescr\"\r\n\t\t\t\t\t\t\t\t\titem={dispute}\r\n\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\tlabel={getString(\"disDisputeDescr\")}\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\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 type.ftValue === dispute.status}\r\n \t\t\t\t\tonChangeItem={(type) => editDispute(\"status\", type?.ftValue)}\r\n \t\t\t\t\trequired={validationState.status !== undefined}\r\n \t\t\t\t\terror={validationState.status !== undefined && !validationState.status}\r\n \t\t\t\t/>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\r\n\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\t);\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { GuaranteeData } from \"../types\";\r\n\r\nexport const getGuaranteeApi = (userId: string, payid: string) =>\r\n webApi({\r\n method: \"GET\",\r\n url: \"clearing/getpayment\",\r\n params: {\r\n userId,\r\n payid,\r\n },\r\n });\r\n\r\nexport default getGuaranteeApi;\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getGuaranteeApi from \"../api/getGuarantee\";\r\nimport { setDisplayed } from \"../guaranteesDataSlice\";\r\nimport { GuaranteeData } from \"../types\";\r\n\r\nexport const loadGuarantee = (payId: string): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n dispatch(setDisplayed());\r\n\r\n const guarantee = await dispatch(getGuarantee(payId));\r\n\r\n dispatch(setDisplayed(guarantee));\r\n};\r\n\r\nexport const getGuarantee = (\r\n payId: string\r\n): ThunkType> => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { userId } = store.data.auth.current.user;\r\n return await dispatch(getGuaranteeApi(userId, payId));\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { GuaranteeData } from \"../types\";\r\nimport { loadGuarantee } from \"../thunks/loadGuarantees\";\r\n\r\nexport const useDisplayGuarantee = (payId?: string) => {\r\n const storeGuarantee = useSelector(\r\n (store) => store.data.clearing.guarantees.displayedGuarantee\r\n );\r\n\r\n const displayedGuarantee =\r\n storeGuarantee && storeGuarantee.payId === payId\r\n ? storeGuarantee\r\n : undefined;\r\n\r\n const displatch = useDispatch();\r\n\r\n React.useEffect(() => {\r\n if (payId) {\r\n displatch(loadGuarantee(payId));\r\n }\r\n }, [displatch, payId]);\r\n\r\n return displayedGuarantee;\r\n};\r\n","import React from \"react\";\r\nimport { GuaranteeData } from \"../../../data/clearing/guarantees/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { useDisplaySingleEmementStyles } from \"../../useDisplaySingleEmementStyles\";\r\nimport { DisplayBoolNumber } from \"../../components/common/DisplayBoolNumber\";\r\nimport { Status } from \"../../../data/models\";\r\n\r\nexport interface DisplayGuaranteeMainAttributesProps {\r\n guarantee: GuaranteeData;\r\n}\r\n\r\nexport const DisplayGuaranteeMainAttributes: React.FunctionComponent = ({\r\n guarantee,\r\n}) => {\r\n const style = useDisplaySingleEmementStyles();\r\n const {\r\n getString,\r\n getDateString,\r\n getFormatedNumberString,\r\n } = React.useContext(LocalizationContext);\r\n\r\n return (\r\n
\r\n
\r\n {getString(\"paymentDataTime\")}\r\n {getDateString(guarantee.payDate)}\r\n
\r\n
\r\n {getString(\"paymentClientCode\")}\r\n {guarantee.clientIdNo}\r\n
\r\n
\r\n {getString(\"paymentClientName\")}\r\n {guarantee.clientName}\r\n
\r\n
\r\n {getString(\"paymentPayType\")}\r\n {guarantee.payTypeDescr}\r\n
\r\n
\r\n {getString(\"paymentClmOrdNo\")}\r\n {guarantee.orderNo}\r\n
\r\n
\r\n {getString(\"paymentTranNo\")}\r\n {guarantee.tranNo}\r\n
\r\n
\r\n {getString(\"paymentBankGuarantee\")}\r\n {guarantee.grntNo}\r\n
\r\n
\r\n {getString(\"paymentAmount\")}\r\n \r\n {getFormatedNumberString(guarantee.amt, true)}\r\n \r\n
\r\n
\r\n {getString(\"paymentCurrCode\")}\r\n {guarantee.currCode}\r\n
\r\n
\r\n {getString(\"paymentAmtBal\")}\r\n {getFormatedNumberString(guarantee.amtBal, true)}\r\n
\r\n
\r\n {getString(\"paymentAmtBalNonAlloc\")}\r\n {getFormatedNumberString(guarantee.amtBal, true)}\r\n
\r\n
\r\n {getString(\"paymentStatus\")}\r\n \r\n \r\n \r\n
\r\n
\r\n );\r\n};\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const printGuarantee = (user: User, payid: string) => {\r\n\treturn httpWebApi({\r\n\t\tmethod: \"GET\",\r\n\t\tresponseType: \"blob\",\r\n\t\ttimeout: 60 * 4 * 1000,\r\n\t\turl: \"reporting/getguaranteeconfreport\",\r\n\t\tparams: {\r\n\t\t\tuserid: user.userId,\r\n\t\t\tpayid,\r\n\t\t},\r\n\t});\r\n};\r\n\r\nexport default printGuarantee;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { printGuaranteeThunk } from \"../thunks/printGuaranteeThunk\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { GuaranteeData } from \"../types\";\r\nimport { setPrintGuaranteeFetchState } from \"../guaranteesDataSlice\";\r\n\r\nexport const useGuaranteePrinter = (guarantee?: GuaranteeData) => {\r\n\tconst fetchState = useSelector(\r\n\t\ts => s.data.clearing.guarantees.printGuaranteeFetchState\r\n\t);\r\n\tconst dispatch = useDispatch();\r\n\r\n\tconst download = React.useCallback(() => {\r\n\t\t\tdispatch(printGuaranteeThunk(guarantee));\r\n\t}, [dispatch,guarantee ]);\r\n\r\n\tconst dispatchSetFetch = React.useCallback(() => { // Ovo da prvo izađe customDialog box\r\n\t\tdispatch(setPrintGuaranteeFetchState({ type: \"started\" }))\r\n\t},\t[dispatch] );\r\n\t\r\n\treturn [download, fetchState, dispatchSetFetch] as [typeof download, typeof fetchState, typeof dispatchSetFetch];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { printGuarantee } from \"../api/printGuarantee\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setPrintGuaranteeFetchState } from \"../guaranteesDataSlice\";\r\nimport { GuaranteeData } from \"../types\";\r\n\r\nexport const printGuaranteeThunk = (guarantee?: GuaranteeData): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\t\r\n\tif (store.data.auth.current.status !== \"successful\" || !guarantee || !guarantee.payId) {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst filename = `GuaranteeConfirmation_${guarantee.payId}.pdf`\r\n\tconst user = store.data.auth.current.user;\r\n\tdispatch(setPrintGuaranteeFetchState({ type: \"started\" }));\r\n\tconst guaranteesReport = await dispatch(printGuarantee(user, guarantee.payId));\r\n\tif (guaranteesReport) {\r\n\t\tfileDownload(new Blob([guaranteesReport as any], { type: \"application/pdf\" }), filename);\r\n\t}\r\n\tdispatch(setPrintGuaranteeFetchState({ type: \"not-started\" }));\r\n};\r\n","import React from \"react\";\r\nimport { useDisplayGuarantee } from \"../../../data/clearing/guarantees/hooks/useDisplayGuarantees\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport {\r\n GuaranteeData,\r\n GuaranteeListData,\r\n} from \"../../../data/clearing/guarantees/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { DisplayGuaranteeMainAttributes } from \"./DisplayGuaranteeMainAttributes\";\r\nimport {\r\n ExpansionPanel,\r\n ExpansionPanelSummary,\r\n Typography,\r\n Grid,IconButton,\r\n} from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport { useGuaranteePrinter } from \"../../../data/clearing/guarantees/hooks/useGuaranteePrinter\";\r\n\r\nexport interface DisplayGuaranteeProps {\r\n id?: string;\r\n}\r\n\r\nexport const DisplayGuarantee: React.FunctionComponent = ({\r\n id,\r\n}) => {\r\n const guarantee = useDisplayGuarantee(id);\r\n const { getString } = React.useContext(LocalizationContext);\r\n\tconst [download, fetchState, setfetch] = useGuaranteePrinter(guarantee);\r\n\r\n return !guarantee ? (\r\n <>{\"loading placeholder\"}\r\n ) : (\r\n \r\n \r\n \r\n \r\n \r\n {getString(\"tableBasciInfo\")}\r\n \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\r\n\t\t\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\r\n { fetchState.type !== \"not-started\" ? getString(\"pleaseWait\") : null }\r\n\t\t\t\t\t\t\t\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\n\r\nexport const useViewGuarantee = () => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n return React.useCallback(\r\n (guarantee: GuaranteeListData) =>\r\n showWithDrawer(),\r\n [showWithDrawer]\r\n );\r\n};\r\n","import { getEditLocation } from \"../../../core/util/functions\";\r\nexport const guaranteeLocation = \"/cliring/guaranteesmanagement\";\r\nexport const getGuaranteeEditLocation = (id?: string) =>\r\n getEditLocation(guaranteeLocation, undefined, id);\r\n\r\nexport const editRouter = getGuaranteeEditLocation(\":payId?\");\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const deleteGuaranteeApi = (userId: string, payid: string) =>\r\n webApi({\r\n method: \"DELETE\",\r\n url: \"clearing/delpayment\",\r\n params: {\r\n userId,\r\n payid,\r\n },\r\n });\r\n\r\nexport default deleteGuaranteeApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { deleteGuarantee } from \"../thunks/deleteGuarantees\";\r\nimport { setFetchState } from \"../guaranteesDataSlice\";\r\n\r\nexport const useGuaranteeDelete = () => {\r\n const fetchState = useSelector(\r\n (store) => store.data.clearing.guarantees.cancelFetchState\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchDeleteGuarantee = React.useCallback(\r\n (id: string) => dispatch(deleteGuarantee(id)),\r\n [dispatch]\r\n );\r\n\r\n React.useEffect(() => {\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n }, [dispatch]);\r\n\r\n return [fetchState, dispatchDeleteGuarantee] as [\r\n typeof fetchState,\r\n typeof dispatchDeleteGuarantee\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport deleteGuaranteeApi from \"../api/deleteGuarantees\";\r\nimport { setFetchState, invalidateGuarantee } from \"../guaranteesDataSlice\";\r\n\r\nexport const deleteGuarantee = (payId: string): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n dispatch(setFetchState({ type: \"started\" }));\r\n\r\n const { userId } = store.data.auth.current.user;\r\n const result = await dispatch(deleteGuaranteeApi(userId, payId));\r\n\r\n dispatch(\r\n setFetchState(\r\n result !== undefined ? { type: \"successful\" } : { type: \"error\" }\r\n )\r\n );\r\n dispatch(invalidateGuarantee());\r\n};\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport ViewIcon from \"@material-ui/icons/InputOutlined\";\r\nimport EditIcon from \"@material-ui/icons/EditOutlined\";\r\nimport { GuaranteeListData } from \"../../../data/clearing/guarantees/types\";\r\nimport { GuaranteeData } from \"../../../data/clearing/guarantees/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { MaterialTableProps } from \"material-table\";\r\nimport { useViewGuarantee } from \"./DisplayGuarantee\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { getGuaranteeEditLocation } from \"../guarantees/Locations\";\r\nimport { DisplayGuaranteeMainAttributes } from \"../guarantees/DisplayGuaranteeMainAttributes\";\r\nimport { useGuaranteeDelete } from \"../../../data/clearing/guarantees/hooks/useGuaranteeDelete\";\r\n\r\nexport function useGuaranteesActions() {\r\n const { getString } = useContext(LocalizationContext);\r\n const onShowGuarantee = useViewGuarantee();\r\n const onEditGuarantee = useEditGuaranteeAction();\r\n\r\n return useMemo(() => {\r\n const result: MaterialTableProps[\"actions\"] = [\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"orderActView\"),\r\n onClick: (event, rowData) =>\r\n onShowGuarantee(rowData as GuaranteeListData),\r\n },\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"tableEdit\"),\r\n onClick: (event, rowData) =>\r\n onEditGuarantee(rowData as GuaranteeListData),\r\n },\r\n ];\r\n return result;\r\n }, [onShowGuarantee, onEditGuarantee, getString]);\r\n}\r\n\r\nexport const useDeleteGuaranteeAction = () => {\r\n const [, deleteGuarantee] = useGuaranteeDelete();\r\n return React.useCallback(\r\n async (guarantees: GuaranteeListData) => {\r\n if (guarantees.payId) {\r\n await deleteGuarantee(guarantees.payId);\r\n }\r\n },\r\n [deleteGuarantee]\r\n );\r\n};\r\n\r\nexport const useEditGuaranteeAction = () => {\r\n const history = useHistory();\r\n return React.useCallback(\r\n (guarantee: GuaranteeListData) =>\r\n history.push(getGuaranteeEditLocation(guarantee.payId)),\r\n [history]\r\n );\r\n};\r\n","import { ValidationState } from \"../../../core/util/types\";\r\nimport { ClientListData } from \"../../../data/listing/clients/types\";\r\n\r\nexport enum GuaranteeSide {\r\n\tin = \"IN\",\r\n\tout = \"OUT\",\r\n}\r\n\r\nexport enum GuaranteeDedication {\r\n\tyes = \"Y\",\r\n\tno = \"N\",\r\n}\r\n\r\nexport interface GuaranteeListData {\r\n\tpayId: string;\r\n\tpayDate: Date;\r\n\tclientIdNo: string;\r\n\tclientName: string;\r\n\tpayTypeDescr: string;\r\n\torderNo: string;\r\n\ttranNo: string;\r\n\tamtPay:number; \r\n\tamtIn: number;\r\n\tamtOut: number;\r\n\tamtBal: number;\r\n\tamtNonAllocBal: number;\r\n\tamtOrdersBal: number;\r\n\tamtTransBal: number;\r\n\tcurrCode: string;\r\n\tstatus: number;\r\n\tgrntId: string;\r\n}\r\n\r\nexport interface GetGuaranteeParams {\r\n\tuserid: string;\r\n\tinout?: GuaranteeSide;\r\n\tnondedicated?: GuaranteeDedication;\r\n\t//currid?: string;\r\n\tcliid?: string;\r\n\t// paytype?: string;\r\n\tdatefrom?: string;\r\n\tdateto?: string;\r\n\tfromrow: number;\r\n numofrows: number;\r\n paygroup: PayGroup.Guarantees;\r\n}\r\n\r\nexport interface GuaranteeData {\r\n\tpayId: string;\r\n\tpayDate?: Date;\r\n\tclientId: string;\r\n\tclientIdNo?: string;\r\n\tclientName?: string;\r\n\tpayType: number;\r\n\tpayTypeDescr?: string;\r\n\thasOrdTran?: number;\r\n\torderId?: string;\r\n\torderNo?: string;\r\n\ttranId?: string;\r\n\ttranNo?: string;\r\n\tsign?: number;\r\n\tamt?: number;\r\n\tamtBal?: number;\r\n\tamtNonAllocBal?: number;\r\n\tcurrId?: string;\r\n\tcurrCode?: string;\r\n\tcurrRate?: number;\r\n\tstatus?: number;\r\n\tamtTransBal?: number;\r\n\tamtOrdersBal?: number;\r\n\tgrntId?: string;\r\n\tgrntNo?: string;\r\n }\r\n\r\nexport interface GuaranteeStatus {\r\n\tftValue: number;\r\n\tftDescr: string;\r\n }\r\n \r\nexport interface GuaranteeFilter {\r\n\tstatus?: Partial;\r\n\tdatefrom?: string;\r\n\tdateto?: string;\r\n\tclient?: Partial;\r\n\tinout?: GuaranteeSide;\r\n\tnondedicated?: GuaranteeDedication;\r\n}\r\n\r\nexport enum PayGroup {\r\n\tGuarantees = \"G\",\r\n\tPayments = \"P\",\r\n}\r\n\r\nexport type GuaranteeValidationState = ValidationState;\r\n","import React from \"react\";\r\nimport { GuaranteeListData } from \"../../../data/clearing/guarantees/types\";\r\nimport {\r\n PaginationTable,\r\n PaginationDataProps,\r\n} from \"../../components/common/PagginationTable\";\r\nimport {\r\n useGuaranteesActions,\r\n useDeleteGuaranteeAction,\r\n} from \"./useGuaranteesActions\";\r\nimport { useGuaranteeColumns } from \"./useGuaranteesColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\n\r\nexport interface GuaranteeTableProps {\r\n userAccessRights: AccessRights;\r\n getData: () => void;\r\n}\r\n\r\ntype GuaranteeTablePropsType = GuaranteeTableProps &\r\n PaginationDataProps;\r\n\r\nconst GuaranteesTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n getData,\r\n ...tableProps\r\n}) => {\r\n const actions = useGuaranteesActions();\r\n const columns = useGuaranteeColumns();\r\n const onDeleteGuarantee = useDeleteGuaranteeAction();\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={getData}\r\n // immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n actions={actions}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n }}\r\n editable={{\r\n onRowDelete: onDeleteGuarantee,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default GuaranteesTable;\r\n","import { GuaranteeListData } from \"../../../data/clearing/guarantees/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\n\r\nexport const useGuaranteeColumns = () => {\r\n const {\r\n getString,\r\n getDateString,\r\n getFormatedNumberString,\r\n } = React.useContext(LocalizationContext);\r\n\r\n\r\n return React.useMemo(\r\n () => [\r\n {\r\n title: getString(\"paymentDataTime\"),\r\n render: (guarantee) => getDateString(guarantee.payDate, \"DD.MM.YYYY\"),\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"paymentClientCode\"),\r\n field: \"clientIdNo\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"paymentClientName\"),\r\n field: \"clientName\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"paymentPayType\"),\r\n field: \"payTypeDescr\",\r\n sorting: false,\r\n width: \"300px\",\r\n },\r\n {\r\n title: getString(\"paymentClmOrdNo\"),\r\n field: \"orderNo\",\r\n sorting: false,\r\n },\r\n/* {\r\n title: getString(\"paymentTranNo\"),\r\n field: \"tranNo\",\r\n sorting: false,\r\n }, */\r\n {\r\n title: getString(\"paymentBankGuarantee\"),\r\n field: \"grntNo\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"paymentAmount\"),\r\n render: (guarantee) => getFormatedNumberString(guarantee.amtPay, true),\r\n sorting: false,\r\n\t\t\t\twidth: \"140px\",\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\tmaxWidth: \"140px\",\r\n\t\t\t\t\tminWidth: \"140px\",\r\n\t\t\t\t\twidth: \"140px\",\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\tmaxWidth: \"140px\",\r\n\t\t\t\t\tminWidth: \"140px\",\r\n\t\t\t\t\twidth: \"140px\",\r\n//\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n },\r\n {\r\n title: getString(\"paymentAmtBal\"),\r\n render: (guarantee) => getFormatedNumberString(guarantee.amtBal, true),\r\n sorting: false,\r\n\t\t\t\twidth: \"140px\",\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\tmaxWidth: \"140px\",\r\n\t\t\t\t\tminWidth: \"140px\",\r\n\t\t\t\t\twidth: \"140px\",\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\tmaxWidth: \"140px\",\r\n\t\t\t\t\tminWidth: \"140px\",\r\n\t\t\t\t\twidth: \"140px\",\r\n//\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n },\r\n {\r\n title: getString(\"paymentAmtBalNonAlloc\"),\r\n render: (guarantee) => getFormatedNumberString(guarantee.amtNonAllocBal, true),\r\n sorting: false,\r\n\t\t\t\twidth: \"140px\",\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\tmaxWidth: \"140px\",\r\n\t\t\t\t\tminWidth: \"140px\",\r\n\t\t\t\t\twidth: \"140px\",\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\tmaxWidth: \"140px\",\r\n\t\t\t\t\tminWidth: \"140px\",\r\n\t\t\t\t\twidth: \"140px\",\r\n//\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n },\r\n ],\r\n [getString, getFormatedNumberString, getDateString]\r\n ) as Column[];\r\n};\r\n","import { GuaranteeFilter, PayGroup } from \"../types\";\r\nimport { GuaranteeListData, GetGuaranteeParams } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nconst getGuaranteeWebApi = (\r\n user: User,\r\n page: number,\r\n itemsPerPage: number,\r\n filter: GuaranteeFilter\r\n) => {\r\n const params: GetGuaranteeParams = {\r\n userid: user.userId,\r\n inout: filter.inout,\r\n fromrow: page * itemsPerPage,\r\n numofrows: itemsPerPage,\r\n cliid: filter?.client?.cliId,\r\n nondedicated: filter.nondedicated,\r\n datefrom: getParamsDateString(filter.datefrom),\r\n dateto: getParamsDateString(filter.dateto),\r\n paygroup: PayGroup.Guarantees,\r\n };\r\n\r\n return webApiWithResponse({\r\n method: \"GET\",\r\n url: \"clearing/getpaymentlist\",\r\n params,\r\n });\r\n};\r\n\r\nexport default getGuaranteeWebApi;\r\n","import React from \"react\";\r\nimport { Grid, Paper, Button, Typography } from \"@material-ui/core\";\r\nimport { GuaranteeSideSelect } from \"./GuaranteeSideSelect\";\r\nimport { GuaranteeDedicationSelect } from \"./GuaranteeDedicationSelect\";\r\nimport { DateInput } from \"../../components/common/DateInput\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { GuaranteeFilter } from \"../../../data/clearing/guarantees/types\";\r\nimport { ClientSelect } from \"../../components/listing/ClientSelect\";\r\nimport { useAuth } from \"../../../data/auth/hooks\";\r\nimport { GuaranteesFilterChipsComponent } from \"./GuaranteesFilterChips\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\n\r\nexport enum GuaranteeFilterEditorType {\r\n Basic,\r\n Extended,\r\n}\r\n\r\ninterface GuaranteeFilterEditorProps {\r\n filter?: GuaranteeFilter;\r\n editFilter: (prop: keyof GuaranteeFilter, value: any) => void;\r\n save: () => void;\r\n reset: () => void;\r\n type: GuaranteeFilterEditorType;\r\n}\r\n\r\nexport const GuaranteeFilterEditor: React.FunctionComponent = ({\r\n filter,\r\n editFilter,\r\n save,\r\n type,\r\n reset\r\n}) => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const { getString } = React.useContext(LocalizationContext);\r\n const [auth] = useAuth();\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n editFilter(\"datefrom\", date?.toISOString())}\r\n />\r\n \r\n \r\n editFilter(\"dateto\", date?.toISOString())}\r\n />\r\n \r\n\r\n{/* \r\n editFilter(\"inout\", e.target.value)}\r\n side={filter?.inout}\r\n nullable\r\n />\r\n \r\n \r\n editFilter(\"nondedicated\", e.target.value)}\r\n sidededication={filter?.nondedicated}\r\n nullable\r\n />\r\n */}\r\n\r\n {type === GuaranteeFilterEditorType.Extended &&\r\n auth.status === \"successful\" &&\r\n auth.user.userIsEmployee === 1 && (\r\n \r\n client.cliId === filter?.client?.cliId}\r\n onChangeItem={(client) =>\r\n editFilter(\"client\", client)\r\n }\r\n />\r\n \r\n )}\r\n \r\n\r\n \r\n \r\n {\r\n save();\r\n showWithDrawer(undefined);\r\n }}\r\n >\r\n {getString(\"orderFilterConfirm\")}\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 GuaranteesFilterChips = GuaranteesFilterChipsComponent;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadAllGuarantees } from \"../thunks/loadAllGuarantees\";\r\nimport { GuaranteeListData } from \"../types\";\r\nimport { PageData } from \"../../../models\";\r\nimport { invalidateGuarantee } from \"../guaranteesDataSlice\";\r\n\r\nexport const useGuaranteeData = () => {\r\n const pageData = useSelector<\r\n StoreType,\r\n PageData | undefined\r\n >((s) => s.data.clearing.guarantees.currentPage);\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadGuaranteePage = React.useCallback(\r\n () => dispatch(loadAllGuarantees()),\r\n [dispatch]\r\n );\r\n\r\n const invalidate = React.useCallback(() => dispatch(invalidateGuarantee()), [dispatch]);\r\n\r\n return [pageData, dispatchLoadGuaranteePage, invalidate] as [\r\n typeof pageData,\r\n typeof dispatchLoadGuaranteePage,\r\n typeof invalidate,\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { setGuarantees, invalidateGuarantee } from \"../guaranteesDataSlice\";\r\nimport { setGuaranteeIndex } from \"../guaranteesUXSlice\";\r\nimport getGuarantees from \"../api/getGuarantees\";\r\nimport { PageIndex, PageDataStatus } from \"../../../models\";\r\n\r\nexport const loadAllGuarantees = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n const { pageNumber, itemsPerPage } = store.ux.clearing.guarantees.index;\r\n const { filter } = store.ux.clearing.guarantees;\r\n const user = store.data.auth.current.user;\r\n\r\n const guaranteesResponse = await dispatch(\r\n getGuarantees(user, pageNumber, itemsPerPage, filter)\r\n );\r\n\r\n if (!guaranteesResponse || guaranteesResponse.resCode !== \"OK\") {\r\n return;\r\n }\r\n\r\n const guarantees = {\r\n currentPageData: guaranteesResponse.obj,\r\n totalCount: Number(guaranteesResponse.resDesc) || 0,\r\n status: PageDataStatus.DataCurrent,\r\n };\r\n\r\n dispatch(setGuarantees(guarantees));\r\n};\r\n\r\nexport const setGuaranteesIndexThunk = (index: PageIndex): ThunkType => (\r\n dispatch\r\n) => {\r\n dispatch(setGuaranteeIndex(index));\r\n dispatch(invalidateGuarantee());\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { resetGuaranteeIdices } from \"../guaranteesUXSlice\";\r\nimport { PageIndex } from \"../../../models\";\r\nimport { setGuaranteesIndexThunk } from \"../thunks/loadAllGuarantees\";\r\n\r\nexport const useGuaranteeIndex = () => {\r\n const pageIndex = useSelector(\r\n (s) => s.ux.clearing.guarantees.index\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetIndex = React.useCallback(\r\n (index: PageIndex) => dispatch(setGuaranteesIndexThunk(index)),\r\n [dispatch]\r\n );\r\n const dispatchResetIndex = React.useCallback(\r\n () => dispatch(resetGuaranteeIdices()),\r\n [dispatch]\r\n );\r\n\r\n return [pageIndex, dispatchSetIndex, dispatchResetIndex] as [\r\n typeof pageIndex,\r\n typeof dispatchSetIndex,\r\n typeof dispatchResetIndex\r\n ];\r\n};\r\n","import { useCopiedState } from \"../../../../core/util/hooks\";\r\nimport { setFilter, removeFilter, initialState } from \"../guaranteesUXSlice\";\r\nimport { invalidateGuarantee } from \"../guaranteesDataSlice\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport React from \"react\";\r\nimport { GuaranteeFilter } from \"../types\";\r\n\r\n\r\nexport const useGuaranteeFilter = () => {\r\n\tconst [storeFilter] = useCurrentGuaranteeFilter();\r\n\tconst [filter, editFilter, changeState, setCurrentFilter] = useCopiedState(storeFilter);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchSetFilter = React.useCallback(() => {\r\n\t\tdispatch(setFilter(filter!));\r\n\t\tdispatch(invalidateGuarantee());\r\n\t}, [dispatch, filter]);\r\n\r\n\tconst dispatchResetFilter = React.useCallback(() => {\r\n\t\tsetCurrentFilter(initialState.filter);\r\n\t}, [setCurrentFilter]);\r\n\r\n\treturn [filter, editFilter, dispatchSetFilter, changeState, dispatchResetFilter] as [\r\n\t\ttypeof filter,\r\n\t\ttypeof editFilter,\r\n\t\ttypeof dispatchSetFilter,\r\n\t\ttypeof changeState,\r\n\t\ttypeof dispatchResetFilter\r\n\t];\r\n};\r\n\r\nexport const useCurrentGuaranteeFilter = () => {\r\n\tconst filter = useSelector(\r\n\t (store) => store.ux.clearing.guarantees.filter\r\n\t);\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchRemoveFilter = React.useCallback(\r\n\t (type: keyof GuaranteeFilter) => {\r\n\t\tdispatch(removeFilter(type));\r\n\t\tdispatch(invalidateGuarantee());\r\n\t },\r\n\t [dispatch]\r\n\t);\r\n \r\n\treturn [filter, dispatchRemoveFilter] as [\r\n\t typeof filter,\r\n\t typeof dispatchRemoveFilter\r\n\t];\r\n };\r\n ","import React from \"react\";\r\nimport { GuaranteeSide } from \"../types\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { exhaustiveCheck } from \"../../../../core/util/functions\";\r\n\r\nexport const useGuaranteeSideOptionsTranslator = () => {\r\n const { getString } = React.useContext(LocalizationContext);\r\n return React.useCallback(\r\n (side: GuaranteeSide) => {\r\n switch (side) {\r\n case GuaranteeSide.in:\r\n return getString(\"paymentSideIn\");\r\n case GuaranteeSide.out:\r\n return getString(\"paymentSideOut\");\r\n default:\r\n exhaustiveCheck(side);\r\n }\r\n },\r\n [getString]\r\n );\r\n};\r\n\r\ninterface AccountGuaranteeSideOption {\r\n label: string;\r\n value: GuaranteeSide;\r\n}\r\n\r\nexport const useGuaranteeSideOptions = (): AccountGuaranteeSideOption[] => {\r\n const translator = useGuaranteeSideOptionsTranslator();\r\n return React.useMemo(\r\n () => [\r\n {\r\n label: translator(GuaranteeSide.in) as string,\r\n value: GuaranteeSide.in,\r\n },\r\n {\r\n label: translator(GuaranteeSide.out) as string,\r\n value: GuaranteeSide.out,\r\n },\r\n ],\r\n [translator]\r\n );\r\n};\r\n","import React from \"react\";\r\nimport { GuaranteeDedication } from \"../types\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { exhaustiveCheck } from \"../../../../core/util/functions\";\r\n\r\nexport const useGuaranteeDedicationOptionsTranslator = () => {\r\n const { getString } = React.useContext(LocalizationContext);\r\n return React.useCallback(\r\n (side: GuaranteeDedication) => {\r\n switch (side) {\r\n case GuaranteeDedication.yes:\r\n return getString(\"paymentSideDedicated\");\r\n case GuaranteeDedication.no:\r\n return getString(\"paymentSideNonDedicated\");\r\n default:\r\n exhaustiveCheck(side);\r\n }\r\n },\r\n [getString]\r\n );\r\n};\r\n\r\ninterface AccountGuaranteeSideOption {\r\n label: string;\r\n value: GuaranteeDedication;\r\n}\r\n\r\nexport const useGuaranteeDedicationOptions = (): AccountGuaranteeSideOption[] => {\r\n const translator = useGuaranteeDedicationOptionsTranslator();\r\n return React.useMemo(\r\n () => [\r\n {\r\n label: translator(GuaranteeDedication.yes) as string,\r\n value: GuaranteeDedication.yes,\r\n },\r\n {\r\n label: translator(GuaranteeDedication.no) as string,\r\n value: GuaranteeDedication.no,\r\n },\r\n ],\r\n [translator]\r\n );\r\n};\r\n","import React from \"react\";\r\nimport { Chip, Grid } from \"@material-ui/core\";\r\nimport { GuaranteeFilter } from \"../../../data/clearing/guarantees/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\n\r\nimport { useGuaranteeSideOptionsTranslator } from \"../../../data/clearing/guarantees/hooks/useGuaranteeSideOptions\";\r\nimport { useGuaranteeDedicationOptionsTranslator } from \"../../../data/clearing/guarantees/hooks/useGuaranteeDedicationOptions\";\r\n\r\nexport const GuaranteesFilterChipsComponent: React.FunctionComponent = ({\r\n filter,\r\n removeFilter,\r\n}) => {\r\n const { getDateString, getString } = React.useContext(LocalizationContext);\r\n const sideTranslator = useGuaranteeSideOptionsTranslator();\r\n const dedicatedTranslator = useGuaranteeDedicationOptionsTranslator();\r\n return (\r\n \r\n {filter.inout && (\r\n \r\n removeFilter(\"inout\")}\r\n />\r\n \r\n )}\r\n {filter.nondedicated !== undefined && (\r\n \r\n removeFilter(\"nondedicated\")}\r\n />\r\n \r\n )}\r\n {filter.datefrom && (\r\n \r\n removeFilter(\"datefrom\")}\r\n />\r\n \r\n )}\r\n {filter.dateto && (\r\n \r\n removeFilter(\"dateto\")}\r\n />\r\n \r\n )}\r\n {filter.client && (\r\n \r\n removeFilter(\"client\")}\r\n />\r\n \r\n )}\r\n {filter.status && filter.status.ftDescr !== \"\" && (\r\n \r\n removeFilter(\"status\")}\r\n />\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\ninterface GuaranteeFilterChipsProps {\r\n filter: GuaranteeFilter;\r\n removeFilter: (type: keyof GuaranteeFilter) => void;\r\n}\r\n","import React from \"react\";\r\nimport FilterIcon from \"@material-ui/icons/FilterListOutlined\";\r\nimport { IconButton, Grid } from \"@material-ui/core\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { useGuaranteeFilter, useCurrentGuaranteeFilter } from \"../../../data/clearing/guarantees/hooks/useGuaranteeFilter\";\r\nimport { GuaranteeFilterEditor, GuaranteeFilterEditorType, GuaranteesFilterChips } from \"../guarantees/GuaranteeFilterEditor\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\n\r\nexport const GuaranteeFilterButton: React.FunctionComponent = () => {\r\n\tconst showWithDrawer = React.useContext(DisplayDrawerContext);\r\n\tconst showFilter = React.useCallback(() => showWithDrawer(), [showWithDrawer]);\r\n\r\n\tconst [filter, removeFilter] = useCurrentGuaranteeFilter();\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\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\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};\r\n\r\nconst GuaranteesFilterEditor: React.FunctionComponent = () => {\r\n\tconst [filter, editFilter, save, , reset] = useGuaranteeFilter();\r\n\treturn (\r\n\t\t\r\n\t);\r\n};\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { GuaranteeFilter, PayGroup } from \"../types\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nexport const getGuaranteesReport = (user: User, filter: GuaranteeFilter) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getguaranteesreport\",\r\n params: {\r\n userid: user.userId,\r\n paygroup: PayGroup.Guarantees,\r\n inout: filter.inout,\r\n cliid: filter?.client?.cliId,\r\n nondedicated: filter.nondedicated,\r\n datefrom: getParamsDateString(filter.datefrom),\r\n dateto: getParamsDateString(filter.dateto),\r\n },\r\n });\r\n};\r\n\r\nexport default getGuaranteesReport;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadGuaranteesReport } from \"../thunks/downloadReport\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useGuaranteesReportDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.clearing.guarantees.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadGuaranteesReport()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getGuaranteesReport } from \"../api/getGuaranteesReport\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../guaranteesDataSlice\";\r\n\r\nexport const downloadGuaranteesReport = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.clearing.guarantees;\r\n const user = store.data.auth.current.user;\r\n\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const ordersReport = await dispatch(getGuaranteesReport(user, filter));\r\n if (ordersReport) {\r\n fileDownload(\r\n new Blob([ordersReport as any], { type: \"application/pdf\" }),\r\n \"Guarantees.pdf\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { GuaranteeFilter, PayGroup } from \"../types\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nexport const getGuaranteesExcel = (user: User, filter: GuaranteeFilter) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getpaymentsxls\",\r\n params: {\r\n userid: user.userId,\r\n paygroup: PayGroup.Guarantees,\r\n inout: filter.inout,\r\n cliid: filter?.client?.cliId,\r\n nondedicated: filter.nondedicated,\r\n datefrom: getParamsDateString(filter.datefrom),\r\n dateto: getParamsDateString(filter.dateto),\r\n },\r\n });\r\n};\r\n\r\nexport default getGuaranteesExcel;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadGuaranteesExcel } from \"../thunks/downloadReportExcel\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useGuaranteesExcelDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) =>\r\n s.data.clearing.guarantees.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadGuaranteesExcel()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getGuaranteesExcel } from \"../api/getGuaranteesExcel\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../guaranteesDataSlice\";\r\n\r\nexport const downloadGuaranteesExcel = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.clearing.guarantees;\r\n const user = store.data.auth.current.user;\r\n\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const dailyTrading = await dispatch(getGuaranteesExcel(user, filter));\r\n if (dailyTrading) {\r\n fileDownload(\r\n new Blob([dailyTrading as any], {\r\n type: \"application/vnd.openxmlformat\",\r\n }),\r\n \"Guarantees.xlsx\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import React from \"react\";\r\nimport { useGuaranteesReportDownloader } from \"../../../data/clearing/guarantees/hooks/useGuaranteesReportDownloader\";\r\nimport { useGuaranteesExcelDownloader } from \"../../../data/clearing/guarantees/hooks/useGuaranteesExcelDownloader\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport ExcelIcon from \"@material-ui/icons/TableChartOutlined\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\n\r\nexport const DownloadButton: React.FunctionComponent = () => {\r\n\tconst [downloader, fetchState] = useGuaranteesReportDownloader();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\treturn (\r\n\t\t<>\r\n\t\t\t\r\n\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\t{fetchState.type !== \"not-started\" ? getString(\"pleaseWait\") : null}\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport const DownloadExcelButton: React.FunctionComponent = () => {\r\n\tconst [downloader, fetchState] = useGuaranteesExcelDownloader();\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport {\r\n Grid,\r\n CardContent,\r\n CardHeader,\r\n Card,\r\n Divider,\r\n Fab,\r\n} from \"@material-ui/core\";\r\nimport GuaranteesTable from \"./GuaranteesTable\";\r\nimport AddIcon from \"@material-ui/icons/Add\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { PageComponent, AccessRights } from \"../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { useGuaranteeData } from \"../../../data/clearing/guarantees/hooks/useGuaranteeData\";\r\nimport { useGuaranteeIndex } from \"../../../data/clearing/guarantees/hooks/useGuaranteeIndex\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { getGuaranteeEditLocation } from \"../guarantees/Locations\";\r\nimport { PageDataStatus } from \"../../../data/models\";\r\nimport { GuaranteeFilterButton } from \"./GuaranteeFilter\";\r\nimport { useAuth } from \"../../../data/auth/hooks\";\r\nimport { DownloadButton, DownloadExcelButton } from \"./DownloadButton\";\r\n\r\nconst GuaranteesPage: PageComponent = ({ userAccessRights }) => {\r\n const pageStyles = usePageStyles();\r\n\r\n const [pageData, dispatchLoadGuarantee, invalidate] = useGuaranteeData();\r\n const [pageIndex, dispatchSetIndex] = useGuaranteeIndex();\r\n\r\n React.useEffect(() => {\r\n if (pageData && pageData.status === PageDataStatus.DataInvalidated) {\r\n dispatchLoadGuarantee();\r\n }\r\n }, [dispatchLoadGuarantee, pageData]);\r\n React.useEffect(() => () => { invalidate() }, [])\r\n\r\n const history = useHistory();\r\n\r\n const [auth] = useAuth();\r\n\r\n if (auth.status !== \"successful\") {\r\n return null;\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n }\r\n action={}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {userAccessRights === AccessRights.All && (\r\n history.push(getGuaranteeEditLocation())}\r\n >\r\n \r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nexport const GuaranteesActions: React.FunctionComponent = () => (\r\n \r\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 GuaranteesPage;\r\n","import React from \"react\";\r\nimport { useDisplayGuarantee } from \"./useDisplayGuarantees\";\r\nimport { GuaranteeData, PayGroup } from \"../types\";\r\nimport { useCopiedState } from \"../../../../core/util/hooks\";\r\nimport { Status } from \"../../../models\";\r\n\r\nexport const defaultGuarantee: GuaranteeData = {\r\n payId: \"\",\r\n payType: 1,\r\n hasOrdTran: 0,\r\n clientId: \"\",\r\n status: Status.Active,\r\n currId: \"00000001\",\r\n};\r\n\r\nexport const useEditGuarantee = (payId?: string): GuaranteeData | undefined => {\r\n const displayGuarantee = useDisplayGuarantee(payId);\r\n\r\n return React.useMemo(() => {\r\n if (payId !== undefined && displayGuarantee === undefined) {\r\n return undefined;\r\n }\r\n\r\n if (payId === undefined) {\r\n return { ...defaultGuarantee };\r\n }\r\n\r\n return displayGuarantee ? { ...displayGuarantee } : undefined;\r\n }, [payId, displayGuarantee]);\r\n};\r\n\r\nexport const useEditGuaranteeState = (payId?: string) => {\r\n const guarantee = useEditGuarantee(payId);\r\n return useCopiedState(guarantee);\r\n};\r\n","import { GuaranteeData, GuaranteeValidationState } from \"../types\";\r\nimport { createUseValidator } from \"../../../../core/util/hooks\";\r\n\r\nexport const guaranteeValidationState: GuaranteeValidationState = {\r\n payDate: true,\r\n payType: true,\r\n clientId: true,\r\n amt: true,\r\n};\r\n\r\nexport const useGuaranteeValidator = createUseValidator\r\n(guaranteeValidationState,\r\n (item, validation) => ({\r\n ...validation,\r\n orderId: (item.orderId && item.hasOrdTran===1) || (!item.orderId && item.hasOrdTran!==1),\r\n grntId: (item.grntId && item.hasOrdTran===3) || (!item.grntId && item.hasOrdTran!==3)\r\n })\r\n );\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { GuaranteeData } from \"../types\";\r\n\r\nexport const createGuaranteeApi = (userId: string, guarantee: GuaranteeData) =>\r\n webApiWithResponse({\r\n method: \"PUT\",\r\n url: \"clearing/newpayment\",\r\n params: {\r\n userId,\r\n },\r\n data: guarantee,\r\n });\r\n\r\nexport default createGuaranteeApi;\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { GuaranteeData } from \"../types\";\r\n\r\nexport const updateGuaranteeApi = (userId: string, guarantee: GuaranteeData) =>\r\n webApiWithResponse({\r\n method: \"PUT\",\r\n url: \"clearing/updpayment\",\r\n params: {\r\n userId,\r\n },\r\n data: guarantee,\r\n });\r\n\r\nexport default updateGuaranteeApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { upsertGuarantee } from \"../thunks/upsertGuarantees\";\r\nimport { setFetchState } from \"../guaranteesDataSlice\";\r\nimport { GuaranteeData } from \"../types\";\r\n\r\nexport const useGuaranteeUpsert = () => {\r\n const fetchState = useSelector(\r\n (store) => store.data.clearing.guarantees.fetchState\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchUpsertGuarantee = React.useCallback(\r\n (guarantee: GuaranteeData) => dispatch(upsertGuarantee(guarantee)),\r\n [dispatch]\r\n );\r\n\r\n React.useEffect(() => {\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n }, [dispatch]);\r\n\r\n return [fetchState, dispatchUpsertGuarantee] as [\r\n typeof fetchState,\r\n typeof dispatchUpsertGuarantee\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport createGuarantees from \"../api/createGuarantees\";\r\nimport updateGuarantees from \"../api/updateGuarantees\";\r\nimport { GuaranteeData } from \"../types\";\r\nimport { setFetchState, invalidateGuarantee } from \"../guaranteesDataSlice\";\r\n\r\nexport const upsertGuarantee = (guarantee: GuaranteeData): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n dispatch(setFetchState({ type: \"started\" }));\r\n\r\n const { userId } = store.data.auth.current.user;\r\n const result = guarantee.payId\r\n ? await dispatch(updateGuarantees(userId, guarantee))\r\n : await dispatch(createGuarantees(userId, guarantee));\r\n\r\n if (result && result.resCode === \"OK\") {\r\n dispatch(setFetchState({ type: \"successful\", result: result.resDesc }));\r\n dispatch(invalidateGuarantee());\r\n return result.resDesc;\r\n } else {\r\n dispatch(setFetchState({ type: \"error\", errorCode: result?.resCode }));\r\n }\r\n};\r\n","import { useSelector } from \"react-redux\";\r\nimport { StoreType } from \"../../../core/store/reducers\";\r\nimport { PayTypesG } from \"../../models\";\r\n\r\nconst renderLabel = (item: PayTypesG) => `${item.ftDescr} `;\r\n\r\nexport const usePaymentGuarTypes = () => {\r\n const payTypesG = useSelector(\r\n (store) => store.data.initialData.payTypesG\r\n );\r\n\r\n return [payTypesG, renderLabel] as [typeof payTypesG, typeof renderLabel];\r\n};\r\n","import React from \"react\";\r\nimport { usePaymentGuarTypes } from \"../../../data/initialData/hooks/usePaymentGuarTypes\";\r\nimport { PayTypesG } from \"../../../data/models\";\r\nimport {\r\n AutocompleteSelect,\r\n AutocompleteSelectType,\r\n} from \"./AutocompleteSelect\";\r\n\r\ntype PayTypesGPropsType = Omit<\r\n AutocompleteSelectType,\r\n \"data\" | \"getLabel\"\r\n>;\r\n\r\nexport const PaymentTypeGuarSelect: React.FunctionComponent = (\r\n props\r\n) => {\r\n const [payTypesG, renderLabel] = usePaymentGuarTypes();\r\n\r\n return (\r\n \r\n data={payTypesG}\r\n getLabel={renderLabel}\r\n {...(props as any)}\r\n />\r\n );\r\n};\r\n","import { OrderSimpleData, GetSimpleOrdersParams, SimpleOrderFilter } from \"../types\";\r\nimport { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const getSimpleOrdersApi = (\r\n\tuserid: string,\r\n\tfilter: SimpleOrderFilter,\r\n) => {\r\n const params: GetSimpleOrdersParams = {\r\n userid,\r\n ...filter,\r\n }\r\n\r\n\treturn webApiWithResponse({\r\n\t\tmethod: \"GET\",\r\n\t\turl: \"order/getordersimplelist\",\r\n\t\tparams,\r\n\t});\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getSimpleOrdersApi } from \"../api/getSimpleOrders\";\r\nimport { OrderSimpleData, SimpleOrderFilter } from \"../types\";\r\n\r\nexport const getSimpleOrdersThunk = (\r\n\tfilter: SimpleOrderFilter\r\n): ThunkType> => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst user = store.data.auth.current.user;\r\n\tconst ordersResponse = await dispatch(getSimpleOrdersApi(user.userId, filter));\r\n\r\n\tif (!ordersResponse || ordersResponse.resCode !== \"OK\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\treturn ordersResponse.obj;\r\n};\r\n","import React from \"react\";\r\nimport { AutocompleteSelect, AutocompleteSelectType } from \"../common/AutocompleteSelect\";\r\nimport { useSimpleOrdersData } from \"../../../data/trading/orders/hooks/useSimpleOrdersData\"\r\nimport { SimpleOrderFilter, OrderSimpleData } from \"../../../data/trading/orders/types\"\r\n\r\ntype FiltredOrdersSelectPropsType = Omit, \"data\" | \"getLabel\"> & {\r\n\tfilter?: SimpleOrderFilter;\r\n\tdisabled?: boolean;\r\n};\r\n\r\nexport const FiltredOrdersSelect: React.FunctionComponent = ({\r\n\tfilter,\r\n\tdisabled,\r\n\t...otherProps\r\n}) => {\r\n\tconst [orders] = useSimpleOrdersData(filter);\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t{...(otherProps as AutocompleteSelectType)}\r\n\t\t\tdata={orders || []}\r\n\t\t\tgetLabel={renderAttributeLabel}\r\n\t\t\tdisabled={filter === undefined || disabled}\r\n\t\t/>\r\n\t);\r\n};\r\n\r\nconst renderAttributeLabel = (order: OrderSimpleData) => order.ordData;\r\n","import React from \"react\";\r\nimport { useDispatch } from \"react-redux\";\r\nimport { getSimpleOrdersThunk } from \"../thunks/getSimpleOrdersThunk\";\r\nimport { SimpleOrderFilter, OrderSimpleData } from \"../types\";\r\n\r\nexport const useSimpleOrdersData = (filter?: SimpleOrderFilter) => {\r\n\tconst dispatch = useDispatch();\r\n\tconst [orders, setOrders] = React.useState();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tconst loadOrders = async () => {\r\n\t\t\tif (filter) {\r\n\t\t\t\tconst loaded = ((await dispatch(getSimpleOrdersThunk(filter))) as any) as OrderSimpleData[];\r\n\t\t\t\tsetOrders(loaded);\r\n\t\t\t}\r\n\t\t};\r\n\t\tif (!filter) {\r\n\t\t\tsetOrders(undefined);\r\n\t\t} else {\r\n\t\t\tloadOrders();\r\n\t\t}\r\n\t}, [filter, dispatch]);\r\n\r\n\treturn [orders] as [typeof orders];\r\n};\r\n","import { SimplBankGuaranteeFilter } from \"../types\";\r\nimport { BankGuaranteeData, GetBankGuaranteeParams } from \"../types\";\r\nimport { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\n\r\nconst getBankGuaranteeWebApi = (\r\n userid: string,\r\n filter: SimplBankGuaranteeFilter\r\n) => {\r\n const params: GetBankGuaranteeParams = {\r\n userid,\r\n fromrow: 0,\r\n numofrows: 100,\r\n ...filter,\r\n };\r\n\r\n return webApiWithResponse({\r\n method: \"GET\",\r\n url: \"clearing/getbankgrntlist\",\r\n params,\r\n });\r\n};\r\n\r\nexport default getBankGuaranteeWebApi;\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { setBankGuarantees, invalidateBankGuarantee } from \"../bankguaranteesDataSlice\";\r\nimport getBankGuaranteesSelected from \"../api/getBankGuaranteesSelected\";\r\nimport { SimplBankGuaranteeFilter } from \"../types\";\r\n\r\nexport const loadAllBankGuaranteesSelected = (\r\n filter: SimplBankGuaranteeFilter\r\n): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n const user = store.data.auth.current.user;\r\n const bankguaranteesResponse = await dispatch(\r\n getBankGuaranteesSelected(user.userId, filter)\r\n );\r\n\r\n if (!bankguaranteesResponse || bankguaranteesResponse.resCode !== \"OK\") {\r\n return;\r\n }\r\n\r\nreturn bankguaranteesResponse.obj;\r\n};\r\n\r\n","import React from \"react\";\r\nimport { useBankGuaranteeDataSelect } from \"../../../data/clearing/bankguarantees/hooks/useBankGuaranteeDataSelect\";\r\nimport { BankGuaranteeData, SimplBankGuaranteeFilter } from \"../../../data/clearing/bankguarantees/types\";\r\nimport { AutocompleteSelectType, AutocompleteSelect } from \"../common/AutocompleteSelect\";\r\n\r\nexport type BankGuaranteePropsType = Omit<\r\n\tAutocompleteSelectType,\r\n\t\"data\" | \"getLabel\"> & {\r\n\t\tfilter?: SimplBankGuaranteeFilter;\r\n\t\tdisabled?: boolean;\r\n\t};\r\n\r\n\r\nexport const BankGuaranteeSelect: React.FunctionComponent = ({\r\n\tfilter,\r\n\tdisabled,\r\n\t...otherProps\r\n}) => {\r\n\r\n\tconst [bnkgrnt] = useBankGuaranteeDataSelect(filter);\r\n\r\n\treturn (\r\n\t\t\r\n\t\t{...(otherProps as AutocompleteSelectType)}\r\n\t\tdata={bnkgrnt || []}\r\n\t\tgetLabel={renderEmployeeLabel}\r\n\t\tdisabled={filter === undefined || disabled}\r\n\t/>\r\n\r\n\t);\r\n};\r\n\r\nconst renderEmployeeLabel = (bnkgrnt: BankGuaranteeData | null) =>\r\nbnkgrnt ? `${bnkgrnt.grntNo} - ${bnkgrnt.clientName} - ${bnkgrnt.bankName}` : \"\";\r\n\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadAllBankGuaranteesSelected } from \"../../bankguarantees/thunks/loadAllBankGuaranteesSelected\";\r\nimport { BankGuaranteeData, SimplBankGuaranteeFilter } from \"../../bankguarantees/types\";\r\n\r\nexport const useBankGuaranteeDataSelect = (filter?: SimplBankGuaranteeFilter) => {\r\n\tconst dispatch = useDispatch();\r\n\tconst [bnkgrnt, setBnkGrnt] = React.useState();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tconst loadOrders = async () => {\r\n\t\t\tif (filter) {\r\n\t\t\t\tconst loaded = ((await dispatch(loadAllBankGuaranteesSelected(filter))) as any) as BankGuaranteeData[];\r\n\t\t\t\tsetBnkGrnt(loaded);\r\n\t\t\t}\r\n\t\t};\r\n\t\tif (!filter) {\r\n\t\t\tsetBnkGrnt(undefined);\r\n\t\t} else {\r\n\t\t\tloadOrders();\r\n\t\t}\r\n\t}, [filter, dispatch]);\r\n\r\n\t\r\n\treturn [bnkgrnt] as [typeof bnkgrnt];\r\n\r\n};\r\n\r\n/* import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadAllBankGuarantees } from \"../../bankguarantees/thunks/loadAllBankGuarantees\";\r\nimport { BankGuaranteeData } from \"../../bankguarantees/types\";\r\n\r\nexport const useBankGuaranteeDataSelect = () => {\r\n\tconst data = useSelector(s => s.data.clearing.bankguarantees.displayData);\r\n\tconst allData = useSelector(s => s.data.clearing.bankguarantees.currentPage?.currentPageData);\r\n\r\nconsole.log(data)\r\nconsole.log(allData)\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchLoadBankGuaranteePage = React.useCallback(() => dispatch(loadAllBankGuarantees()), [dispatch]);\r\n\r\n\treturn [data, dispatchLoadBankGuaranteePage, allData] as [\r\n\t\ttypeof data,\r\n\t\ttypeof dispatchLoadBankGuaranteePage,\r\n\t\ttypeof allData\r\n\t];\r\n}; */\r\n","import React from \"react\";\r\nimport { useEditGuaranteeState } from \"../../../data/clearing/guarantees/hooks/useEditGuaranteeState\";\r\nimport { useGuaranteeValidator } from \"../../../data/clearing/guarantees/hooks/useGuaranteeValidator\";\r\nimport { useGuaranteeUpsert } from \"../../../data/clearing/guarantees/hooks/useGuaranteeUpsert\";\r\nimport { RouteComponentProps, useHistory } from \"react-router-dom\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Card, Grid, CardHeader, Divider, CardContent, Paper, TextField, Typography,} from \"@material-ui/core\";\r\nimport { FabSave } from \"../../components/common/FabSave\";\r\nimport { GuaranteeData } from \"../../../data/clearing/guarantees/types\";\r\nimport { LeavePrompt } from \"../../components/common/LeavePrompt\";\r\nimport { Status } from \"../../../data/models\";\r\nimport { BoolInput } from \"../../components/common/BoolInput\";\r\nimport { guaranteeLocation } from \"./Locations\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { ClientSelect } from \"../../components/listing/ClientSelect\";\r\nimport { NumberInput } from \"../../components/common/NumberInput\";\r\nimport { DateInput } from \"../../components/common/DateInput\";\r\nimport { CurrencySelect } from \"../../components/common/CurrencySelect\";\r\nimport { PaymentTypeGuarSelect } from \"../../components/common/PaymentTypeGuarSelect\";\r\nimport { FiltredOrdersSelect } from \"../../components/trading/FiltredOrdersSelect\";\r\nimport { OrderSimpleData, SimpleOrderFilter } from \"../../../data/trading/orders/types\";\r\nimport { useSimpleOrdersData } from \"../../../data/trading/orders/hooks/useSimpleOrdersData\";\r\nimport { BankGuaranteeSelect } from \"../../components/clearing/BankGuaranteeSelect\";\r\nimport { BankGuaranteeFilter, SimplBankGuaranteeFilter } from \"../../../data/clearing/bankguarantees/types\";\r\n\r\nexport interface EditGuaranteeInfo {\r\n\tpayId?: string;\r\n}\r\n\r\nexport interface EditGuaranteeProps extends RouteComponentProps {}\r\n\r\nexport const EditGuaranteePage: React.FunctionComponent = props => {\r\n\tconst { getString, getFormatedNumberString } = React.useContext(LocalizationContext);\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst [guarantee, editGuarantee, changed] = useEditGuaranteeState(props.match.params.payId);\r\n\r\n\tconst [validationState, validate] = useGuaranteeValidator();\r\n\tconst [fetchState, upsert] = useGuaranteeUpsert();\r\n\tconst history = useHistory();\r\n\r\n\tconst [orderFilter, setOrderFilter] = React.useState(\r\n\t\tcreateOrderFilter(guarantee)\r\n\t);\r\n\r\n\tconst [bnkGrntFilter, setbnkGrntFilter] = React.useState(\r\n\t\tcreateBnkGrntFilter(guarantee)\r\n\t);\r\n\r\n//\tconst [ord] = useSimpleOrdersData(guarantee.orderId);\r\n\t\r\n\tconst [selectedOrder, setSelectedOrder] = React.useState(null);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tsetOrderFilter(createOrderFilter(guarantee));\r\n\t}, [guarantee, setOrderFilter]);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tsetbnkGrntFilter(createBnkGrntFilter(guarantee));\r\n\t}, [guarantee, setbnkGrntFilter]);\r\n\r\n\r\n\tconst unsavedChanges = fetchState.type === \"not-started\" && changed;\r\n\r\n\tconst handleChange = React.useCallback(\r\n\t\t(event: React.ChangeEvent) => {\r\n\t\t\teditGuarantee(event.target.name as any, event.target.value);\r\n\t\t},\r\n\t\t[editGuarantee]\r\n\t);\r\n\r\n\tconst save = React.useCallback(() => {\r\n\t\tif (fetchState.type === \"successful\") {\r\n\t\t\thistory.push(guaranteeLocation);\r\n\t\t} else if (fetchState.type !== \"started\") {\r\n\t\t\tconst normalized = validate(guarantee);\r\n\r\n\t\t\tif (normalized) {\r\n\t\t\t\tupsert(normalized);\r\n\t\t\t}\r\n\t\t}\r\n\t}, [guarantee, validate, fetchState, history, upsert]);\r\n\r\n\tconst pageTitle = guarantee && guarantee.payId ? \"guarEdit\" : \"guarCreate\";\r\n\r\n\tif (!guarantee) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\treturn (\r\n\t\t\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\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 editGuarantee(\"payDate\", date)}\r\n\t\t\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\t\t\tvalidationState.payDate !== undefined && !validationState.payDate\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\trequired={validationState.payDate !== undefined}\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 payTypes.ftValue === guarantee.payType}\r\n\t\t\t\t\t\t\t\t\t\tonChangeItem={guarantee =>{\r\n\t\t\t\t\t\t\t\t\t\t\teditGuarantee(\"payType\",guarantee ? guarantee.ftValue : undefined)\r\n\t\t\t\t\t\t\t\t\t\t\teditGuarantee(\"hasOrdTran\", guarantee ? guarantee.hasOrdTran : undefined)\r\n\t\t\t\t\t\t\t\t\t\t\tsetSelectedOrder(null)\r\n\t\t\t\t\t\t\t\t\t\t\teditGuarantee(\"orderId\", undefined)\r\n\t\t\t\t\t\t\t\t\t\t\teditGuarantee(\"grntId\", undefined)}\r\n//\t\t\t\t\t\t\t\t\t\t\teditGuarantee(\"amt\", undefined)}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\t\t\tvalidationState.payType !== undefined && !validationState.payType\r\n\t\t\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\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t client.cliId === guarantee.clientId}\r\n\t\t\t\t\t\t\t\t\t\tonChangeItem={client => {\r\n\t\t\t\t\t\t\t\t\t\t\tsetSelectedOrder(null)\r\n\t\t\t\t\t\t\t\t\t\t\teditGuarantee(\"clientId\", client ? client.cliId : undefined);\r\n\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\trequired={validationState.clientId !== undefined}\r\n\t\t\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\t\t\tvalidationState.clientId !== undefined &&\r\n\t\t\t\t\t\t\t\t\t\t\t!validationState.clientId\r\n\t\t\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\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t bnkgrnt.grntId === guarantee.grntId}\r\n\t\t\t\t\t\t\t\t\t\tonChangeItem={bnkgrnt => {\r\n\t\t\t\t\t\t\t\t\t\t\teditGuarantee(\"grntId\", bnkgrnt ? bnkgrnt.grntId : undefined);\r\n\t\t\t\t\t\t\t\t\t\t\teditGuarantee(\"amt\", bnkgrnt ? bnkgrnt.amt : undefined);\r\n\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\trequired={ guarantee.hasOrdTran===3 }\r\n\t\t\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\t\t\t(validationState.grntId !== undefined && !validationState.grntId) && guarantee.hasOrdTran===3\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tdisabled={ guarantee.hasOrdTran!==3 }\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 order.ordId === guarantee.orderId}\r\n\t\t\t\t\t\t\t\t\t\tonChangeItem={order => {\r\n\t\t\t\t\t\t\t\t\t\t\tsetSelectedOrder(order);\r\n\t\t\t\t\t\t\t\t\t\t\teditGuarantee(\"orderId\", order ? order.ordId : undefined);\r\n\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\trequired={ guarantee.hasOrdTran===1 }\r\n\t\t\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\t\t\t(validationState.orderId !== undefined && !validationState.orderId) && guarantee.hasOrdTran===1\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tdisabled={ guarantee.hasOrdTran!==1 }\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\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\tproperty=\"amt\"\r\n\t\t\t\t\t\t\t\t\t\t\titem={guarantee}\r\n\t\t\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\t\t\tlabel={getString(\"paymentAmount\")}\r\n\t\t\t\t\t\t\t\t\t\t\tmoney\r\n\t\t\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\r\n\t\t\t\t\t\t\t\t\t\t currency.currId === guarantee.currId}\r\n\t\t\t\t\t\t\t\t\t\t\tonChangeItem={currency =>\r\n\t\t\t\t\t\t\t\t\t\t\t\teditGuarantee(\"currId\", currency?.currId)\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\trequired={validationState.currId !== undefined}\r\n\t\t\t\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\t\t\t\tvalidationState.currId !== undefined &&\r\n\t\t\t\t\t\t\t\t\t\t\t\t!validationState.currId\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\tfullWidth\r\n\t\t\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\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\tproperty=\"status\"\r\n\t\t\t\t\t\t\t\t\t\titem={guarantee}\r\n\t\t\t\t\t\t\t\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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};\r\n\r\nconst createOrderFilter = (guarantee?: GuaranteeData): SimpleOrderFilter | undefined => {\r\n\treturn guarantee && guarantee.clientId\r\n\t\t? {\r\n\t\t\t\tcliid: guarantee.clientId,\r\n\t\t\t\tstatus: -2,\r\n\t\t }\r\n\t\t: undefined;\r\n};\r\n\r\nconst createBnkGrntFilter = (guarantee?: GuaranteeData): SimplBankGuaranteeFilter | undefined => {\r\n\treturn guarantee && guarantee.clientId \t? {\tcliid: guarantee.clientId, } : undefined;\r\n};\r\n","import { NavigationItem } from \"../../../core/navigation/types\";\r\nimport GuaranteesPage from \"./GuaranteesPage\";\r\nimport { EditGuaranteePage } from \"./EditGuaranteePage\";\r\nimport { guaranteeLocation, editRouter } from \"./Locations\";\r\nexport const guaranteeComponents: NavigationItem[] = [\r\n {\r\n Component: GuaranteesPage,\r\n isMenuItem: true,\r\n path: guaranteeLocation,\r\n },\r\n {\r\n Component: EditGuaranteePage,\r\n isMenuItem: false,\r\n path: editRouter,\r\n },\r\n];\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { StockFee } from \"../types\";\r\n\r\nexport const getAllStockFeesApi = (userId: string) =>\r\n webApi({\r\n method: \"GET\",\r\n url: \"clearing/getstockfeeslist\",\r\n params: {\r\n userId,\r\n },\r\n });\r\n\r\nexport default getAllStockFeesApi;\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getAllStockFeesAPI from \"../api/getAllStockFees\";\r\nimport { setStockFee } from \"../stockFeesDataReducer\";\r\n\r\nexport const loadAllStockFees = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n dispatch(setStockFee());\r\n\r\n const { userId } = store.data.auth.current.user;\r\n const stfee = await dispatch(getAllStockFeesAPI(userId));\r\n\r\n dispatch(setStockFee(stfee || []));\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { StockFee } from \"../types\";\r\n\r\nexport const getStockFeeApi = (userId: string, id: number) =>\r\n webApi({\r\n method: \"GET\",\r\n url: \"clearing/getstockfee\",\r\n params: {\r\n userId,\r\n id,\r\n },\r\n });\r\n\r\nexport default getStockFeeApi;\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getStockFeeApi from \"../api/getStockFee\";\r\nimport { setDisplayed } from \"../stockFeesDataReducer\";\r\nimport { StockFee } from \"../types\";\r\n\r\nexport const loadStockFee = (stfee: number): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n dispatch(setDisplayed());\r\n\r\n const stockfee = await dispatch(getStockFee(stfee));\r\n\r\n dispatch(setDisplayed(stockfee));\r\n};\r\n\r\nexport const getStockFee = (\r\n stfee: number\r\n): ThunkType> => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { userId } = store.data.auth.current.user;\r\n return await dispatch(getStockFeeApi(userId, stfee));\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { StockFee } from \"../types\";\r\nimport { loadStockFee } from \"../thunks/loadStockFee\";\r\n\r\nexport const useDisplayStockFee = (stfeeId?: number) => {\r\n const storeStockFee = useSelector(\r\n (store) => store.data.clearing.stockfees.displayedStockFee\r\n );\r\n\r\n const displayedStockFee =\r\n storeStockFee && storeStockFee.id === stfeeId ? storeStockFee : undefined;\r\n\r\n const displatch = useDispatch();\r\n\r\n React.useEffect(() => {\r\n if (stfeeId) {\r\n displatch(loadStockFee(stfeeId));\r\n }\r\n }, [displatch, stfeeId]);\r\n\r\n return displayedStockFee;\r\n};\r\n","import React from \"react\";\r\nimport { StockFee } from \"../../../data/clearing/stockfees/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { useDisplaySingleEmementStyles } from \"../../useDisplaySingleEmementStyles\";\r\nimport { DisplayBoolNumber } from \"../../components/common/DisplayBoolNumber\";\r\nimport { Status } from \"../../../data/models\";\r\n\r\nexport interface DisplayStockFeeMainAttributesProps {\r\n stfee: StockFee;\r\n}\r\n\r\nexport const DisplayStockFeeMainAttributes: React.FunctionComponent = ({\r\n stfee,\r\n}) => {\r\n const style = useDisplaySingleEmementStyles();\r\n const {\r\n getString,\r\n getDateString,\r\n getFormatedNumberString,\r\n } = React.useContext(LocalizationContext);\r\n\r\n return (\r\n
\r\n
\r\n {getString(\"stockFeeStartDate\")}\r\n {getDateString(stfee.startDate)}\r\n
\r\n
\r\n {getString(\"stockFeeStockFee\")}\r\n \r\n {getFormatedNumberString(stfee.stockFee, true)}\r\n \r\n
\r\n
\r\n {getString(\"stockFeeStatus\")}\r\n \r\n \r\n \r\n
\r\n
\r\n );\r\n};\r\n","import React from \"react\";\r\nimport { useDisplayStockFee } from \"../../../data/clearing/stockfees/hooks/useDisplayStockFee\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { StockFee } from \"../../../data/clearing/stockfees/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { DisplayStockFeeMainAttributes } from \"./DisplayStockFeeMainAttributes\";\r\nimport {\r\n ExpansionPanel,\r\n ExpansionPanelSummary,\r\n Typography,\r\n Grid,\r\n} from \"@material-ui/core\";\r\n\r\nexport interface DisplayStockFeeProps {\r\n id?: number;\r\n}\r\n\r\nexport const DisplayStockFee: React.FunctionComponent = ({\r\n id,\r\n}) => {\r\n const stfee = useDisplayStockFee(id);\r\n const { getString } = React.useContext(LocalizationContext);\r\n\r\n return !stfee ? (\r\n <>{\"loading placeholder\"}\r\n ) : (\r\n \r\n \r\n \r\n {getString(\"tableBasciInfo\")}\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const useViewStockFee = () => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n return React.useCallback(\r\n (stfee: StockFee) => showWithDrawer(),\r\n [showWithDrawer]\r\n );\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const deleteStockFeeApi = (userId: string, id: number) =>\r\n webApi({\r\n method: \"DELETE\",\r\n url: \"clearing/delstockfee\",\r\n params: {\r\n userId,\r\n id,\r\n },\r\n });\r\n\r\nexport default deleteStockFeeApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { deleteStockFee } from \"../thunks/deleteStockFee\";\r\nimport { setFetchState } from \"../stockFeesDataReducer\";\r\n\r\nexport const useStockFeeDelete = () => {\r\n const fetchState = useSelector(\r\n (store) => store.data.clearing.stockfees.fetchState\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchDeleteStockFee = React.useCallback(\r\n (id: number) => dispatch(deleteStockFee(id)),\r\n [dispatch]\r\n );\r\n\r\n React.useEffect(() => {\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n }, [dispatch]);\r\n\r\n return [fetchState, dispatchDeleteStockFee] as [\r\n typeof fetchState,\r\n typeof dispatchDeleteStockFee\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport deleteStockFeeApi from \"../api/deleteStockFee\";\r\nimport { setFetchState } from \"../stockFeesDataReducer\";\r\n\r\nexport const deleteStockFee = (sfId: number): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n dispatch(setFetchState({ type: \"started\" }));\r\n\r\n const { userId } = store.data.auth.current.user;\r\n const result = await dispatch(deleteStockFeeApi(userId, sfId));\r\n\r\n dispatch(\r\n setFetchState(\r\n result !== undefined ? { type: \"successful\" } : { type: \"error\" }\r\n )\r\n );\r\n};\r\n","import { getEditLocation } from \"../../../core/util/functions\";\r\nexport const stockFeeLocation = \"/cliring/administrativetasks/importstockfees\";\r\nexport const getStockFeesEditLocation = (id?: string) =>\r\n getEditLocation(stockFeeLocation, undefined, id);\r\n\r\nexport const editRouter = getStockFeesEditLocation(\":id?\");\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport ViewIcon from \"@material-ui/icons/InputOutlined\";\r\nimport EditIcon from \"@material-ui/icons/EditOutlined\";\r\nimport { StockFee } from \"../../../data/clearing/stockfees/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Action } from \"material-table\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { useViewStockFee } from \"./DisplayStockFee\";\r\nimport { useStockFeeDelete } from \"../../../data/clearing/stockfees/hooks/useStockFeeDelete\";\r\nimport { getStockFeesEditLocation } from \"./Locations\";\r\n\r\nexport const useStockFeeActions = () => {\r\n const { getString } = useContext(LocalizationContext);\r\n const onShowstockFee = useViewStockFee();\r\n const onEditStockFee = useEditStockFeeAction();\r\n\r\n return useMemo(() => {\r\n const result: Action[] = [\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"tableShow\"),\r\n onClick: (event, rowData) => onShowstockFee(rowData as StockFee),\r\n },\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"tableEdit\"),\r\n onClick: (event, rowData) => onEditStockFee(rowData as StockFee),\r\n },\r\n ];\r\n\r\n return result;\r\n }, [onShowstockFee, onEditStockFee, getString]);\r\n};\r\n\r\nexport const useDeleteStockFeeAction = () => {\r\n const [, deleteStockFee] = useStockFeeDelete();\r\n return React.useCallback(\r\n async (stfee: StockFee) => {\r\n if (stfee.id) {\r\n await deleteStockFee(stfee.id);\r\n }\r\n },\r\n [deleteStockFee]\r\n );\r\n};\r\n\r\nexport const useEditStockFeeAction = () => {\r\n const history = useHistory();\r\n return React.useCallback(\r\n (stfee: StockFee) =>\r\n history.push(getStockFeesEditLocation(stfee.id?.toString())),\r\n [history]\r\n );\r\n};\r\n","import React from \"react\";\r\nimport { Table, TableDataProps } from \"../../components/common/Table\";\r\nimport { useStockFeeData } from \"../../../data/clearing/stockfees/hooks/useStockFeeData\";\r\nimport { StockFee } from \"../../../data/clearing/stockfees/types\";\r\nimport { useStockFeeColumns } from \"./useStockFeeColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\nimport {\r\n useStockFeeActions,\r\n useDeleteStockFeeAction,\r\n} from \"./useStockFeeActions\";\r\n\r\nexport interface StockFeeTableProps {\r\n userAccessRights: AccessRights;\r\n}\r\n\r\ntype StockFeeTablePropsType = StockFeeTableProps & TableDataProps;\r\n\r\nexport const StockFeesTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n ...tableProps\r\n}) => {\r\n const [data, loadAll] = useStockFeeData();\r\n\r\n const columns = useStockFeeColumns();\r\n const actions = useStockFeeActions();\r\n const onDeleteStockFee = useDeleteStockFeeAction();\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={loadAll}\r\n immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n actions={actions}\r\n options={{\r\n toolbar: false,\r\n pageSize: 10,\r\n actionsColumnIndex: -1,\r\n }}\r\n editable={{\r\n onRowDelete: onDeleteStockFee,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default StockFeesTable;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadAllStockFees } from \"../thunks/loadAllStockFees\";\r\nimport { StockFee } from \"../types\";\r\n\r\nexport const useStockFeeData = () => {\r\n const data = useSelector(\r\n (s) => s.data.clearing.stockfees.displayData\r\n );\r\n const allData = useSelector(\r\n (s) => s.data.clearing.stockfees.all\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadAllStockFees = React.useCallback(\r\n () => dispatch(loadAllStockFees()),\r\n [dispatch]\r\n );\r\n\r\n return [data, dispatchLoadAllStockFees, allData] as [\r\n typeof data,\r\n typeof dispatchLoadAllStockFees,\r\n typeof allData\r\n ];\r\n};\r\n\r\nexport const useStockFee = (id?: number) => {\r\n const allData = useSelector(\r\n (s) => s.data.clearing.stockfees.all\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadAllStockFees = React.useCallback(\r\n () => dispatch(loadAllStockFees()),\r\n [dispatch]\r\n );\r\n\r\n React.useEffect(() => {\r\n if (!allData && id) {\r\n dispatchLoadAllStockFees();\r\n }\r\n }, [allData, id, dispatchLoadAllStockFees]);\r\n\r\n const stfee = React.useMemo(() => {\r\n if (!allData) {\r\n return undefined;\r\n } else {\r\n return allData?.find((e) => e.id === id);\r\n }\r\n }, [id, allData]);\r\n\r\n return [stfee] as [typeof stfee];\r\n};\r\n","import { useContext, useMemo } from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\nimport { StockFee } from \"../../../data/clearing/stockfees/types\";\r\nimport { DisplayBoolNumber } from \"../../components/common/DisplayBoolNumber\";\r\nimport React from \"react\";\r\nimport { Status } from \"../../../data/models\";\r\n\r\nexport function useStockFeeColumns() {\r\n const { getString, getDateString } = useContext(LocalizationContext);\r\n return useMemo(\r\n () => [\r\n {\r\n title: getString(\"stockFeeStartDate\"),\r\n render: (payment) => getDateString(payment.startDate, \"DD.MM.YYYY\"),\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"stockFeeStockFee\"),\r\n field: \"stockFee\",\r\n },\r\n {\r\n title: getString(\"stockFeeStatus\"),\r\n render: (stfee) => (\r\n \r\n ),\r\n customSort: (a, b) => a.status - b.status,\r\n },\r\n ],\r\n [getString]\r\n ) as Column[];\r\n}\r\n","import React from \"react\";\r\nimport {\r\n Grid,\r\n CardContent,\r\n CardHeader,\r\n Divider,\r\n Card,\r\n Fab,\r\n} from \"@material-ui/core\";\r\nimport StockFeesTable from \"./StockFeesTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { SearchBox } from \"../../components/common/SearchBox\";\r\nimport { PageComponent, AccessRights } from \"../../../core/navigation/types\";\r\nimport AddIcon from \"@material-ui/icons/Add\";\r\nimport { useStockFeeSearch } from \"../../../data/clearing/stockfees/hooks/useStockFeeSearch\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { getStockFeesEditLocation } from \"./Locations\";\r\n\r\nconst StockFeesPage: PageComponent = ({ userAccessRights }) => {\r\n const pageStyles = usePageStyles();\r\n\r\n const [search, setSearch] = useStockFeeSearch();\r\n const history = useHistory();\r\n\r\n return (\r\n \r\n \r\n \r\n }\r\n action={}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n {userAccessRights === AccessRights.All && (\r\n history.push(getStockFeesEditLocation())}\r\n >\r\n \r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default StockFeesPage;\r\n","import { setSearchTerm } from \"../stockFeesDataReducer\";\r\nimport { useSearch } from \"../../../../core/util/storeHooks\";\r\n\r\nexport const useStockFeeSearch = () =>\r\n useSearch((s) => s.data.clearing.stockfees.searchTerm, setSearchTerm);\r\n","import React from \"react\";\r\nimport { useDisplayStockFee } from \"./useDisplayStockFee\";\r\nimport { StockFee } from \"../types\";\r\nimport { useCopiedState } from \"../../../../core/util/hooks\";\r\nimport { Status } from \"../../../models\";\r\n\r\nexport const defaultStockFee: StockFee = {\r\n status: Status.Active,\r\n};\r\n\r\nexport const useEditStockFee = (stfeeId?: number) => {\r\n const displayStockFee = useDisplayStockFee(stfeeId);\r\n\r\n return React.useMemo(() => {\r\n if (stfeeId !== undefined && displayStockFee === undefined) {\r\n return undefined;\r\n }\r\n\r\n if (stfeeId === undefined) {\r\n return { ...defaultStockFee };\r\n }\r\n\r\n return displayStockFee ? { ...displayStockFee } : undefined;\r\n }, [stfeeId, displayStockFee]);\r\n};\r\n\r\nexport const useEditStockFeeState = (stfeeId?: string) => {\r\n const id = Number(stfeeId);\r\n const stfee = useEditStockFee(!!id ? id : undefined);\r\n return useCopiedState(stfee);\r\n};\r\n","import { StockFee, StockFeeValidationState } from \"../types\";\r\nimport { createUseValidator } from \"../../../../core/util/hooks\";\r\n\r\nexport const stockFeeValidationState: StockFeeValidationState = {\r\n startDate: true,\r\n stockFee: true,\r\n status: true,\r\n};\r\n\r\nexport const useStockFeeValidator = createUseValidator<\r\n StockFee,\r\n StockFeeValidationState\r\n>(stockFeeValidationState);\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { StockFee } from \"../types\";\r\n\r\nexport const createStockFeeApi = (userId: string, stfee: StockFee) =>\r\n webApiWithResponse({\r\n method: \"PUT\",\r\n url: \"clearing/newstockfee\",\r\n params: {\r\n userId,\r\n },\r\n data: stfee,\r\n });\r\n\r\nexport default createStockFeeApi;\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { StockFee } from \"../types\";\r\n\r\nexport const updateStockFeeApi = (userId: string, stfee: StockFee) =>\r\n webApiWithResponse({\r\n method: \"PUT\",\r\n url: \"clearing/updstockfee\",\r\n params: {\r\n userId,\r\n },\r\n data: stfee,\r\n });\r\n\r\nexport default updateStockFeeApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { upsertStockFee } from \"../thunks/upsertStockFee\";\r\nimport { setFetchState } from \"../stockFeesDataReducer\";\r\nimport { StockFee } from \"../types\";\r\n\r\nexport const useStockFeeUpsert = () => {\r\n const fetchState = useSelector(\r\n (store) => store.data.clearing.stockfees.fetchState\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchUpsertStockFee = React.useCallback(\r\n (stfee: StockFee) => dispatch(upsertStockFee(stfee)),\r\n [dispatch]\r\n );\r\n\r\n React.useEffect(() => {\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n }, [dispatch]);\r\n\r\n return [fetchState, dispatchUpsertStockFee] as [\r\n typeof fetchState,\r\n typeof dispatchUpsertStockFee\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport createStockFeeApi from \"../api/createStockFee\";\r\nimport updatestockFeeApi from \"../api/updateStockFee\";\r\nimport { setFetchState } from \"../stockFeesDataReducer\";\r\nimport { StockFee } from \"../types\";\r\n\r\nexport const upsertStockFee = (stfee: StockFee): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n dispatch(setFetchState({ type: \"started\" }));\r\n\r\n const { userId } = store.data.auth.current.user;\r\n const result = stfee.id\r\n ? await dispatch(updatestockFeeApi(userId, stfee))\r\n : await dispatch(createStockFeeApi(userId, stfee));\r\n\r\n if (result && result.resCode === \"OK\") {\r\n dispatch(setFetchState({ type: \"successful\", result: result.resDesc }));\r\n return result.resDesc;\r\n } else {\r\n dispatch(setFetchState({ type: \"error\", errorCode: result?.resCode }));\r\n }\r\n};\r\n","import { NavigationItem } from \"../../../core/navigation/types\";\r\nimport StockFeesPage from \"./StockFeesPage\";\r\nimport { EditStockFeePage } from \"./EditStockFeePage\";\r\nimport { stockFeeLocation, editRouter } from \"./Locations\";\r\n\r\nexport const stockFeesComponents: NavigationItem[] = [\r\n {\r\n Component: StockFeesPage,\r\n isMenuItem: true,\r\n path: stockFeeLocation,\r\n },\r\n {\r\n Component: EditStockFeePage,\r\n isMenuItem: false,\r\n path: editRouter,\r\n },\r\n];\r\n","import React from \"react\";\r\nimport { useEditStockFeeState } from \"../../../data/clearing/stockfees/hooks/useEditstockFeeState\";\r\nimport { useStockFeeValidator } from \"../../../data/clearing/stockfees/hooks/useStockFeeValidator\";\r\nimport { useStockFeeUpsert } from \"../../../data/clearing/stockfees/hooks/useStockFeeUpsert\";\r\nimport { RouteComponentProps, useHistory } from \"react-router-dom\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport {\r\n Card,\r\n Grid,\r\n CardHeader,\r\n Divider,\r\n CardContent,\r\n} from \"@material-ui/core\";\r\nimport { FabSave } from \"../../components/common/FabSave\";\r\nimport { StockFee } from \"../../../data/clearing/stockfees/types\";\r\nimport { StringInput } from \"../../components/common/StringInput\";\r\nimport { LeavePrompt } from \"../../components/common/LeavePrompt\";\r\nimport { Status } from \"../../../data/models\";\r\nimport { BoolInput } from \"../../components/common/BoolInput\";\r\nimport { stockFeeLocation } from \"./Locations\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { DateInput } from \"../../components/common/DateInput\";\r\nimport { NumberInput } from \"../../components/common/NumberInput\";\r\n\r\nexport interface EditStockFeeInfo {\r\n id?: string;\r\n}\r\n\r\nexport interface EditStockFeeProps\r\n extends RouteComponentProps {}\r\n\r\nexport const EditStockFeePage: React.FunctionComponent = (\r\n props\r\n) => {\r\n const { getString } = React.useContext(LocalizationContext);\r\n const pageStyles = usePageStyles();\r\n\r\n const [stockFee, editStockFee, changed] = useEditStockFeeState(\r\n props.match.params.id\r\n );\r\n const [validationState, validate] = useStockFeeValidator();\r\n const [fetchState, upsert] = useStockFeeUpsert();\r\n const history = useHistory();\r\n\r\n const unsavedChanges = fetchState.type === \"not-started\" && changed;\r\n\r\n const handleChange = React.useCallback(\r\n (event: React.ChangeEvent) => {\r\n editStockFee(event.target.name as any, event.target.value);\r\n },\r\n [editStockFee]\r\n );\r\n\r\n const save = React.useCallback(() => {\r\n if (fetchState.type === \"successful\") {\r\n history.push(stockFeeLocation);\r\n } else if (fetchState.type !== \"started\") {\r\n const normalized = validate(stockFee);\r\n if (normalized) {\r\n upsert(normalized);\r\n }\r\n }\r\n }, [stockFee, validate, fetchState, history, upsert]);\r\n\r\n const pageTitle = stockFee && stockFee.id ? \"stockFeeEdit\" : \"stockFeeCreate\";\r\n\r\n if (!stockFee) {\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 editStockFee(\"startDate\", date)}\r\n error={\r\n validationState.startDate !== undefined &&\r\n !validationState.startDate\r\n }\r\n required={validationState.startDate !== undefined}\r\n />\r\n \r\n \r\n \r\n property=\"stockFee\"\r\n item={stockFee}\r\n validationState={validationState}\r\n onChange={handleChange}\r\n label={getString(\"stockFeeStockFee\")}\r\n money\r\n />\r\n \r\n \r\n \r\n \r\n \r\n property=\"status\"\r\n item={stockFee}\r\n onChange={handleChange}\r\n falsyValue={Status.Inactive}\r\n thrutyValue={Status.Active}\r\n label={getString(\"stockFeeStatus\")}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { TransportFee } from \"../types\";\r\n\r\nexport const getAllTransportFeesApi = (userId: string) =>\r\n webApi({\r\n method: \"GET\",\r\n url: \"clearing/gettransfeeslist\",\r\n params: {\r\n userId,\r\n },\r\n });\r\n\r\nexport default getAllTransportFeesApi;\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getAllTransportFeesAPI from \"../api/getAllTransportFees\";\r\nimport { setTransportFee } from \"../transportFeesDataReducer\";\r\n\r\nexport const loadAllTransportFees = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n dispatch(setTransportFee());\r\n\r\n const { userId } = store.data.auth.current.user;\r\n const stfee = await dispatch(getAllTransportFeesAPI(userId));\r\n\r\n dispatch(setTransportFee(stfee || []));\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { TransportFee } from \"../types\";\r\n\r\nexport const getTransportFeeApi = (userId: string, id: number) =>\r\n webApi({\r\n method: \"GET\",\r\n url: \"clearing/gettransfee\",\r\n params: {\r\n userId,\r\n id,\r\n },\r\n });\r\n\r\nexport default getTransportFeeApi;\r\n","export interface TransportAndStorageCosts {\r\n tradeId:\tstring; // \t\tID trejda\r\n transportDistance:\tnumber; // \trastojanje u km\r\n transportFeePerTon:\tnumber; // cena transporta po toni za dato rastojanje\r\n transportCost:\tnumber; // \tiznos troska prevoza\r\n transportCostWithVat:\tnumber; // iznos troska prevoza sa pdv\r\n storageNoOfMonths:\tnumber; // \tbroj meseci za koje se obracunava skladistenje\r\n storageFeePerc:\tnumber; // \t% od vrednosti robe bez pdv\r\n storageCost:\tnumber; // \tiznos troska skladistenja\r\n storageCostWithVat:\tnumber; // iznos troska skladistenja sa pdv\r\n}\r\n\r\nexport interface CalculationParams {\r\n shouldCalcDistance: ShouldCalc,\r\n shouldCalcStorage: ShouldCalc,\r\n distance?: number,\r\n tradeid: string,\r\n}\r\n\r\nexport enum ShouldCalc {\r\n True = 1,\r\n False = 0\r\n}","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getTransportFeeApi from \"../api/getTransportFee\";\r\nimport { setDisplayed } from \"../transportFeesDataReducer\";\r\nimport { TransportFee } from \"../types\";\r\n\r\nexport const loadTransportFee = (id: number): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n dispatch(setDisplayed());\r\n\r\n const transportfee = await dispatch(getTransport_Fee(id));\r\n\r\n dispatch(setDisplayed(transportfee));\r\n};\r\n\r\nexport const getTransport_Fee = (\r\n trfeeid: number\r\n): ThunkType> => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { userId } = store.data.auth.current.user;\r\n return await dispatch(getTransportFeeApi(userId, trfeeid));\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { TransportFee } from \"../types\";\r\nimport { loadTransportFee } from \"../thunks/loadTransportFee\";\r\n\r\nexport const useDisplayTransportFee = (trfeeId?: number) => {\r\n const storeTransportFee = useSelector(\r\n (store) => store.data.clearing.transportfees.displayedTransportFee\r\n );\r\n\r\n const displayedTransportFee =\r\n storeTransportFee && storeTransportFee.id === trfeeId\r\n ? storeTransportFee\r\n : undefined;\r\n\r\n const displatch = useDispatch();\r\n\r\n React.useEffect(() => {\r\n if (trfeeId) {\r\n displatch(loadTransportFee(trfeeId));\r\n }\r\n }, [displatch, trfeeId]);\r\n\r\n return displayedTransportFee;\r\n};\r\n","import React from \"react\";\r\nimport { TransportFee } from \"../../../data/clearing/transportfees/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { useDisplaySingleEmementStyles } from \"../../useDisplaySingleEmementStyles\";\r\nimport { DisplayBoolNumber } from \"../../components/common/DisplayBoolNumber\";\r\nimport { Status } from \"../../../data/models\";\r\n\r\nexport interface DisplayTransportFeeMainAttributesProps {\r\n trfee: TransportFee;\r\n}\r\n\r\nexport const DisplayTransportFeeMainAttributes: React.FunctionComponent = ({\r\n trfee,\r\n}) => {\r\n const style = useDisplaySingleEmementStyles();\r\n const {\r\n getString,\r\n getDateString,\r\n getFormatedNumberString,\r\n } = React.useContext(LocalizationContext);\r\n\r\n return (\r\n
\r\n
\r\n {getString(\"transFeeStartDate\")}\r\n {getDateString(trfee.startDate)}\r\n
\r\n
\r\n {getString(\"transFeeDistance\")}\r\n \r\n {getFormatedNumberString(trfee.distance, true)}\r\n \r\n
\r\n
\r\n {getString(\"transFeePice\")}\r\n \r\n {getFormatedNumberString(trfee.price, true)}\r\n \r\n
\r\n
\r\n {getString(\"transFeeStatus\")}\r\n \r\n \r\n \r\n
\r\n
\r\n );\r\n};\r\n","import React from \"react\";\r\nimport { useDisplayTransportFee } from \"../../../data/clearing/transportfees/hooks/useDisplayTransportFee\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { TransportFee } from \"../../../data/clearing/transportfees/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { DisplayTransportFeeMainAttributes } from \"./DisplayTransportFeeMainAttributes\";\r\nimport {\r\n ExpansionPanel,\r\n ExpansionPanelSummary,\r\n Typography,\r\n Grid,\r\n} from \"@material-ui/core\";\r\n\r\nexport interface DisplayTransportFeeProps {\r\n id?: number;\r\n}\r\n\r\nexport const DisplayTransportFee: React.FunctionComponent = ({\r\n id,\r\n}) => {\r\n const trfee = useDisplayTransportFee(id);\r\n const { getString } = React.useContext(LocalizationContext);\r\n\r\n return !trfee ? (\r\n <>{\"loading placeholder\"}\r\n ) : (\r\n \r\n \r\n \r\n {getString(\"tableBasciInfo\")}\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const useViewTransportFee = () => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n return React.useCallback(\r\n (trfee: TransportFee) =>\r\n showWithDrawer(),\r\n [showWithDrawer]\r\n );\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const deleteTransportFeeApi = (userId: string, id: number) =>\r\n webApi({\r\n method: \"DELETE\",\r\n url: \"clearing/deltransfee\",\r\n params: {\r\n userId,\r\n id,\r\n },\r\n });\r\n\r\nexport default deleteTransportFeeApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { deleteTransportFee } from \"../thunks/deleteTransportFee\";\r\nimport { setFetchState } from \"../transportFeesDataReducer\";\r\n\r\nexport const useTransportFeeDelete = () => {\r\n const fetchState = useSelector(\r\n (store) => store.data.clearing.transportfees.fetchState\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchDeleteTransportFee = React.useCallback(\r\n (id: number) => dispatch(deleteTransportFee(id)),\r\n [dispatch]\r\n );\r\n\r\n React.useEffect(() => {\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n }, [dispatch]);\r\n\r\n return [fetchState, dispatchDeleteTransportFee] as [\r\n typeof fetchState,\r\n typeof dispatchDeleteTransportFee\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport deleteTransportFeeApi from \"../api/deleteTransportFee\";\r\nimport { setFetchState } from \"../transportFeesDataReducer\";\r\n\r\nexport const deleteTransportFee = (id: number): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n dispatch(setFetchState({ type: \"started\" }));\r\n\r\n const { userId } = store.data.auth.current.user;\r\n const result = await dispatch(deleteTransportFeeApi(userId, id));\r\n\r\n dispatch(\r\n setFetchState(\r\n result !== undefined ? { type: \"successful\" } : { type: \"error\" }\r\n )\r\n );\r\n};\r\n","import { getEditLocation } from \"../../../core/util/functions\";\r\nexport const transportFeeLocation =\r\n \"/cliring/administrativetasks/importtransportcosts\";\r\nexport const getTransportFeesEditLocation = (id?: string) =>\r\n getEditLocation(transportFeeLocation, undefined, id);\r\n\r\nexport const editRouter = getTransportFeesEditLocation(\":id?\");\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport ViewIcon from \"@material-ui/icons/InputOutlined\";\r\nimport EditIcon from \"@material-ui/icons/EditOutlined\";\r\nimport { TransportFee } from \"../../../data/clearing/transportfees/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Action } from \"material-table\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { useViewTransportFee } from \"./DisplayTransportFee\";\r\nimport { useTransportFeeDelete } from \"../../../data/clearing/transportfees/hooks/useTransportFeeDelete\";\r\nimport { getTransportFeesEditLocation } from \"./Locations\";\r\n\r\nexport const useTransportFeeActions = () => {\r\n const { getString } = useContext(LocalizationContext);\r\n const onShowTransportFee = useViewTransportFee();\r\n const onEditTransportFee = useEditTransportFeeAction();\r\n\r\n return useMemo(() => {\r\n const result: Action[] = [\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"tableShow\"),\r\n onClick: (event, rowData) =>\r\n onShowTransportFee(rowData as TransportFee),\r\n },\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"tableEdit\"),\r\n onClick: (event, rowData) =>\r\n onEditTransportFee(rowData as TransportFee),\r\n },\r\n ];\r\n\r\n return result;\r\n }, [onShowTransportFee, onEditTransportFee, getString]);\r\n};\r\n\r\nexport const useDeleteTransportFeeAction = () => {\r\n const [, deleteTransportFee] = useTransportFeeDelete();\r\n return React.useCallback(\r\n async (trfee: TransportFee) => {\r\n if (trfee.id) {\r\n await deleteTransportFee(trfee.id);\r\n }\r\n },\r\n [deleteTransportFee]\r\n );\r\n};\r\n\r\nexport const useEditTransportFeeAction = () => {\r\n const history = useHistory();\r\n return React.useCallback(\r\n (trfee: TransportFee) =>\r\n history.push(getTransportFeesEditLocation(trfee.id?.toString())),\r\n [history]\r\n );\r\n};\r\n","import React from \"react\";\r\nimport { Table, TableDataProps } from \"../../components/common/Table\";\r\nimport { useTransportFeeData } from \"../../../data/clearing/transportfees/hooks/useTransportFeeData\";\r\nimport { TransportFee } from \"../../../data/clearing/transportfees/types\";\r\nimport { useTransportFeeColumns } from \"./useTransportFeeColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\nimport {\r\n useTransportFeeActions,\r\n useDeleteTransportFeeAction,\r\n} from \"./useTransportFeeActions\";\r\n\r\nexport interface TransportFeeTableProps {\r\n userAccessRights: AccessRights;\r\n}\r\n\r\ntype TransportFeeTablePropsType = TransportFeeTableProps &\r\n TableDataProps;\r\n\r\nexport const TransportFeesTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n ...tableProps\r\n}) => {\r\n const [data, loadAll] = useTransportFeeData();\r\n\r\n const columns = useTransportFeeColumns();\r\n const actions = useTransportFeeActions();\r\n const onDeleteTransportFee = useDeleteTransportFeeAction();\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={loadAll}\r\n immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n actions={actions}\r\n options={{\r\n toolbar: false,\r\n pageSize: 10,\r\n actionsColumnIndex: -1,\r\n }}\r\n editable={{\r\n onRowDelete: onDeleteTransportFee,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default TransportFeesTable;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadAllTransportFees } from \"../thunks/loadAllTransportFees\";\r\nimport { TransportFee } from \"../types\";\r\n\r\nexport const useTransportFeeData = () => {\r\n const data = useSelector(\r\n (s) => s.data.clearing.transportfees.displayData\r\n );\r\n const allData = useSelector(\r\n (s) => s.data.clearing.transportfees.all\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadAllTransportFees = React.useCallback(\r\n () => dispatch(loadAllTransportFees()),\r\n [dispatch]\r\n );\r\n\r\n return [data, dispatchLoadAllTransportFees, allData] as [\r\n typeof data,\r\n typeof dispatchLoadAllTransportFees,\r\n typeof allData\r\n ];\r\n};\r\n\r\nexport const useTransportFee = (id?: number) => {\r\n const allData = useSelector(\r\n (s) => s.data.clearing.transportfees.all\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadAllTransportFees = React.useCallback(\r\n () => dispatch(loadAllTransportFees()),\r\n [dispatch]\r\n );\r\n\r\n React.useEffect(() => {\r\n if (!allData && id) {\r\n dispatchLoadAllTransportFees();\r\n }\r\n }, [allData, id, dispatchLoadAllTransportFees]);\r\n\r\n const stfee = React.useMemo(() => {\r\n if (!allData) {\r\n return undefined;\r\n } else {\r\n return allData?.find((e) => e.id === id);\r\n }\r\n }, [id, allData]);\r\n\r\n return [stfee] as [typeof stfee];\r\n};\r\n","import { useContext, useMemo } from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\nimport { TransportFee } from \"../../../data/clearing/transportfees/types\";\r\nimport { DisplayBoolNumber } from \"../../components/common/DisplayBoolNumber\";\r\nimport React from \"react\";\r\nimport { Status } from \"../../../data/models\";\r\n\r\nexport function useTransportFeeColumns() {\r\n const { getString, getDateString } = useContext(LocalizationContext);\r\n return useMemo(\r\n () => [\r\n {\r\n title: getString(\"transFeeStartDate\"),\r\n render: (payment) => getDateString(payment.startDate, \"DD.MM.YYYY\"),\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"transFeeDistance\"),\r\n field: \"distance\",\r\n },\r\n {\r\n title: getString(\"transFeePice\"),\r\n field: \"price\",\r\n },\r\n {\r\n title: getString(\"transFeeStatus\"),\r\n render: (stfee) => (\r\n \r\n ),\r\n customSort: (a, b) => a.status - b.status,\r\n },\r\n ],\r\n [getString]\r\n ) as Column[];\r\n}\r\n","import React from \"react\";\r\nimport {\r\n Grid,\r\n CardContent,\r\n CardHeader,\r\n Divider,\r\n Card,\r\n Fab,\r\n} from \"@material-ui/core\";\r\nimport TransportFeesTable from \"./TransportFeesTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { SearchBox } from \"../../components/common/SearchBox\";\r\nimport { PageComponent, AccessRights } from \"../../../core/navigation/types\";\r\nimport AddIcon from \"@material-ui/icons/Add\";\r\nimport { useTransportFeeSearch } from \"../../../data/clearing/transportfees/hooks/useTransportFeeSearch\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { getTransportFeesEditLocation } from \"./Locations\";\r\n\r\nconst TransportFeesPage: PageComponent = ({ userAccessRights }) => {\r\n const pageStyles = usePageStyles();\r\n\r\n const [search, setSearch] = useTransportFeeSearch();\r\n const history = useHistory();\r\n\r\n return (\r\n \r\n \r\n \r\n }\r\n action={}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n {userAccessRights === AccessRights.All && (\r\n history.push(getTransportFeesEditLocation())}\r\n >\r\n \r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default TransportFeesPage;\r\n","import { setSearchTerm } from \"../transportFeesDataReducer\";\r\nimport { useSearch } from \"../../../../core/util/storeHooks\";\r\n\r\nexport const useTransportFeeSearch = () =>\r\n useSearch((s) => s.data.clearing.transportfees.searchTerm, setSearchTerm);\r\n","import React from \"react\";\r\nimport { useDisplayTransportFee } from \"./useDisplayTransportFee\";\r\nimport { TransportFee } from \"../types\";\r\nimport { useCopiedState } from \"../../../../core/util/hooks\";\r\nimport { Status } from \"../../../models\";\r\n\r\nexport const defaultTransportFee: TransportFee = {\r\n status: Status.Active,\r\n};\r\n\r\nexport const useEditTransportFee = (trfeeId?: number) => {\r\n const displayTransportFee = useDisplayTransportFee(trfeeId);\r\n\r\n return React.useMemo(() => {\r\n if (trfeeId !== undefined && displayTransportFee === undefined) {\r\n return undefined;\r\n }\r\n\r\n if (trfeeId === undefined) {\r\n return { ...defaultTransportFee };\r\n }\r\n\r\n return displayTransportFee ? { ...displayTransportFee } : undefined;\r\n }, [trfeeId, displayTransportFee]);\r\n};\r\n\r\nexport const useEditTransportFeeState = (trfeeId?: string) => {\r\n const id = Number(trfeeId);\r\n const trfee = useEditTransportFee(!!id ? id : undefined);\r\n return useCopiedState(trfee);\r\n};\r\n","import { TransportFee, TransportFeeValidationState } from \"../types\";\r\nimport { createUseValidator } from \"../../../../core/util/hooks\";\r\n\r\nexport const transportfeeValidationState: TransportFeeValidationState = {\r\n startDate: true,\r\n price: true,\r\n distance: true,\r\n status: true,\r\n};\r\n\r\nexport const useTransportFeeValidator = createUseValidator<\r\n TransportFee,\r\n TransportFeeValidationState\r\n>(transportfeeValidationState);\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { TransportFee } from \"../types\";\r\n\r\nexport const createTransportFeeApi = (userId: string, trfee: TransportFee) =>\r\n webApiWithResponse({\r\n method: \"PUT\",\r\n url: \"clearing/newtransfee\",\r\n params: {\r\n userId,\r\n },\r\n data: trfee,\r\n });\r\n\r\nexport default createTransportFeeApi;\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { TransportFee } from \"../types\";\r\n\r\nexport const updateTransportFeeApi = (userId: string, trfee: TransportFee) =>\r\n webApiWithResponse({\r\n method: \"PUT\",\r\n url: \"clearing/updtransfee\",\r\n params: {\r\n userId,\r\n },\r\n data: trfee,\r\n });\r\n\r\nexport default updateTransportFeeApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { upsertTransportFee } from \"../thunks/upsertTransportFee\";\r\nimport { setFetchState } from \"../transportFeesDataReducer\";\r\nimport { TransportFee } from \"../types\";\r\n\r\nexport const useTransportFeeUpsert = () => {\r\n const fetchState = useSelector(\r\n (store) => store.data.clearing.transportfees.fetchState\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchUpsertTransportFee = React.useCallback(\r\n (stfee: TransportFee) => dispatch(upsertTransportFee(stfee)),\r\n [dispatch]\r\n );\r\n\r\n React.useEffect(() => {\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n }, [dispatch]);\r\n\r\n return [fetchState, dispatchUpsertTransportFee] as [\r\n typeof fetchState,\r\n typeof dispatchUpsertTransportFee\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport createTransportFeeApi from \"../api/createTransportFee\";\r\nimport updateTransportFeeApi from \"../api/updateTransportFee\";\r\nimport { setFetchState } from \"../transportFeesDataReducer\";\r\nimport { TransportFee } from \"../types\";\r\n\r\nexport const upsertTransportFee = (trfee: TransportFee): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n dispatch(setFetchState({ type: \"started\" }));\r\n\r\n const { userId } = store.data.auth.current.user;\r\n const result = trfee.id\r\n ? await dispatch(updateTransportFeeApi(userId, trfee))\r\n : await dispatch(createTransportFeeApi(userId, trfee));\r\n\r\n if (result && result.resCode === \"OK\") {\r\n dispatch(setFetchState({ type: \"successful\", result: result.resDesc }));\r\n return result.resDesc;\r\n } else {\r\n dispatch(setFetchState({ type: \"error\", errorCode: result?.resCode }));\r\n }\r\n};\r\n","import { NavigationItem } from \"../../../core/navigation/types\";\r\nimport TransportFeesPage from \"./TransportFeesPage\";\r\nimport { EditTransportFeePage } from \"./EditTransportFeePage\";\r\nimport { transportFeeLocation, editRouter } from \"./Locations\";\r\n\r\nexport const transportFeesComponents: NavigationItem[] = [\r\n {\r\n Component: TransportFeesPage,\r\n isMenuItem: true,\r\n path: transportFeeLocation,\r\n },\r\n {\r\n Component: EditTransportFeePage,\r\n isMenuItem: false,\r\n path: editRouter,\r\n },\r\n];\r\n","import React from \"react\";\r\nimport { useEditTransportFeeState } from \"../../../data/clearing/transportfees/hooks/useEditTransportFeeState\";\r\nimport { useTransportFeeValidator } from \"../../../data/clearing/transportfees/hooks/useTransportFeeValidator\";\r\nimport { useTransportFeeUpsert } from \"../../../data/clearing/transportfees/hooks/useTransportFeeUpsert\";\r\nimport { RouteComponentProps, useHistory } from \"react-router-dom\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport {\r\n Card,\r\n Grid,\r\n CardHeader,\r\n Divider,\r\n CardContent,\r\n} from \"@material-ui/core\";\r\nimport { FabSave } from \"../../components/common/FabSave\";\r\nimport { TransportFee } from \"../../../data/clearing/transportfees/types\";\r\nimport { StringInput } from \"../../components/common/StringInput\";\r\nimport { LeavePrompt } from \"../../components/common/LeavePrompt\";\r\nimport { Status } from \"../../../data/models\";\r\nimport { BoolInput } from \"../../components/common/BoolInput\";\r\nimport { transportFeeLocation } from \"./Locations\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { DateInput } from \"../../components/common/DateInput\";\r\nimport { NumberInput } from \"../../components/common/NumberInput\";\r\n\r\nexport interface EditTransportFeeInfo {\r\n id?: string;\r\n}\r\n\r\nexport interface EditTransportFeeProps\r\n extends RouteComponentProps {}\r\n\r\nexport const EditTransportFeePage: React.FunctionComponent = (\r\n props\r\n) => {\r\n const { getString } = React.useContext(LocalizationContext);\r\n const pageStyles = usePageStyles();\r\n\r\n const [transportFee, editTransportFee, changed] = useEditTransportFeeState(\r\n props.match.params.id\r\n );\r\n const [validationState, validate] = useTransportFeeValidator();\r\n const [fetchState, upsert] = useTransportFeeUpsert();\r\n const history = useHistory();\r\n\r\n const unsavedChanges = fetchState.type === \"not-started\" && changed;\r\n\r\n const handleChange = React.useCallback(\r\n (event: React.ChangeEvent) => {\r\n editTransportFee(event.target.name as any, event.target.value);\r\n },\r\n [editTransportFee]\r\n );\r\n\r\n const save = React.useCallback(() => {\r\n if (fetchState.type === \"successful\") {\r\n history.push(transportFeeLocation);\r\n } else if (fetchState.type !== \"started\") {\r\n const normalized = validate(transportFee);\r\n if (normalized) {\r\n upsert(normalized);\r\n }\r\n }\r\n }, [transportFee, validate, fetchState, history, upsert]);\r\n\r\n const pageTitle =\r\n transportFee && transportFee.id ? \"transFeeEdit\" : \"transFeeCreate\";\r\n\r\n if (!transportFee) {\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 editTransportFee(\"startDate\", date)}\r\n error={\r\n validationState.startDate !== undefined &&\r\n !validationState.startDate\r\n }\r\n required={validationState.startDate !== undefined}\r\n />\r\n \r\n \r\n \r\n property=\"distance\"\r\n item={transportFee}\r\n validationState={validationState}\r\n onChange={handleChange}\r\n label={getString(\"transFeeDistance\")}\r\n money\r\n />\r\n \r\n \r\n \r\n property=\"price\"\r\n item={transportFee}\r\n validationState={validationState}\r\n onChange={handleChange}\r\n label={getString(\"transFeePice\")}\r\n money\r\n />\r\n \r\n \r\n \r\n \r\n \r\n property=\"status\"\r\n item={transportFee}\r\n onChange={handleChange}\r\n falsyValue={Status.Inactive}\r\n thrutyValue={Status.Active}\r\n label={getString(\"transFeeStatus\")}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport { CalculationParams, ShouldCalc } from \"../types\";\r\nimport { useCopiedState } from \"../../../../core/util/hooks\";\r\nimport { TradeList } from \"../../../trading/trades/types\"\r\nimport { OrderMarkt } from \"../../../trading/orders/types\";\r\n\r\nexport const createDefaultState = (trade: TradeList): CalculationParams => ({\r\n\tshouldCalcDistance: trade.market === OrderMarkt.Forward ? ShouldCalc.False : ShouldCalc.True,\r\n\tshouldCalcStorage: ShouldCalc.False,\r\n\ttradeid: trade.tradeId,\r\n});\r\n\r\nexport const useEditCalculationParamsState = (trade: TradeList) => {\r\n\tconst state = React.useMemo(() => createDefaultState(trade), [trade]);\r\n\treturn useCopiedState(state);\r\n};\r\n","import { CalculationParams, ShouldCalc } from \"../types\";\r\nimport { createUseValidator } from \"../../../../core/util/hooks\";\r\nimport { ValidationState } from \"../../../../core/util/types\";\r\n\r\nexport const validationState: ValidationState = {\r\n\tdistance: true,\r\n\ttradeid: true,\r\n};\r\n\r\nexport const useCalculationParamsValidator = createUseValidator(\r\n\tvalidationState,\r\n\t(item, validation) => ({\r\n\t\t...validation,\r\n\t\tdistance:\r\n\t\t\titem.shouldCalcDistance === ShouldCalc.False ||\r\n\t\t\t(item.distance !== undefined && item.distance > 0),\r\n\t})\r\n);\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { calculateTASCostsThunk } from \"../thunks/calculateTASCostsThunk\";\r\nimport { setCalculationFetchState } from \"../TASDataSlice\";\r\nimport { TransportAndStorageCosts, CalculationParams } from \"../types\";\r\n\r\nexport const useTASCalculator = () => {\r\n\tconst fetchState = useSelector>(\r\n\t\tstore => store.data.clearing.transportAndStorage.calculateFetchState\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchCalculate = React.useCallback(\r\n\t\t(params: CalculationParams) => dispatch(calculateTASCostsThunk(params)),\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\tconst dispatchReset = React.useCallback(\r\n\t\t() => dispatch(setCalculationFetchState({ type: \"not-started\" })),\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tdispatch(setCalculationFetchState({ type: \"not-started\" }));\r\n\t}, [dispatch]);\r\n\r\n\treturn [fetchState, dispatchCalculate, dispatchReset] as [\r\n\t\tFetchStateType,\r\n\t\ttypeof dispatchCalculate,\r\n\t\ttypeof dispatchReset\r\n\t];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getTASCostsApi } from \"../api/getTASCosts\";\r\nimport { CalculationParams, TransportAndStorageCosts } from \"../types\";\r\nimport { setCalculationFetchState } from \"../TASDataSlice\";\r\n\r\nexport const calculateTASCostsThunk = (\r\n\tparams: CalculationParams\r\n): ThunkType> => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst user = store.data.auth.current.user;\r\n\r\n\tdispatch(setCalculationFetchState({ type: \"started\" }));\r\n\r\n\tconst costs = await dispatch(\r\n\t\tgetTASCostsApi(user.userId, params.tradeid, params.shouldCalcStorage, params.distance)\r\n\t);\r\n\r\n\tdispatch(setCalculationFetchState({ type: \"successful\", result: costs }));\r\n\r\n\treturn costs;\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { TransportAndStorageCosts, ShouldCalc } from \"../types\";\r\n\r\nexport const getTASCostsApi = (\r\n\tuserid: string,\r\n\ttradeid: string,\r\n\tcalcstoragecost: ShouldCalc,\r\n\tdistance?: number,\r\n) =>\r\n\twebApi({\r\n\t\tmethod: \"GET\",\r\n\t\turl: \"clearing/gettransportandstoragecosts\",\r\n\t\tparams: {\r\n\t\t\tuserid,\r\n\t\t\ttradeid,\r\n\t\t\tdistance,\r\n\t\t\tcalcstoragecost,\r\n\t\t},\r\n\t});\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { saveTASCostsThunk } from \"../thunks/saveTASCostsThunk\";\r\nimport { setSaveCalcFetchState } from \"../TASDataSlice\";\r\nimport { TransportAndStorageCosts } from \"../types\";\r\n\r\nexport const useTASCostSaver = () => {\r\n\tconst fetchState = useSelector(\r\n\t\tstore => store.data.clearing.transportAndStorage.saveCalcFetchState\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchSave = React.useCallback(\r\n\t\t(costs: TransportAndStorageCosts) => dispatch(saveTASCostsThunk(costs)),\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tdispatch(setSaveCalcFetchState({ type: \"not-started\" }));\r\n\t}, [dispatch]);\r\n\r\n\treturn [fetchState, dispatchSave] as [FetchStateType, typeof dispatchSave];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { updateTASCosts } from \"../api/updateTASCosts\";\r\nimport { TransportAndStorageCosts } from \"../types\";\r\nimport { setSaveCalcFetchState } from \"../TASDataSlice\";\r\n\r\nexport const saveTASCostsThunk = (cost: TransportAndStorageCosts): ThunkType => async (\r\n\tdispatch,\r\n\tgetStore\r\n) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdispatch(setSaveCalcFetchState({ type: \"started\" }));\r\n\r\n\tconst user = store.data.auth.current.user;\r\n\tawait dispatch(updateTASCosts(user.userId, cost));\r\n\r\n\tdispatch(setSaveCalcFetchState({ type: \"successful\" }));\r\n};\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { TransportAndStorageCosts } from \"../types\";\r\n\r\nexport const updateTASCosts = (userid: string, TASCost: TransportAndStorageCosts) =>\r\n\twebApi({\r\n\t\tmethod: \"PUT\",\r\n\t\turl: \"trade/updtransportandstoragecosts\",\r\n\t\tparams: {\r\n\t\t\tuserid,\r\n\t\t},\r\n\t\tdata: TASCost,\r\n\t});\r\n","import React from \"react\";\r\nimport { TradeList } from \"../../../data/trading/trades/types\";\r\nimport { Grid, InputAdornment, Button, TextField, Typography } from \"@material-ui/core\";\r\nimport { useEditCalculationParamsState } from \"../../../data/clearing/transportAndStorage/hooks/useEditCalculationParamsState\";\r\nimport { useCalculationParamsValidator } from \"../../../data/clearing/transportAndStorage/hooks/useCalculationParamsValidator\";\r\nimport { useTASCalculator } from \"../../../data/clearing/transportAndStorage/hooks/useTASCalculator\";\r\nimport { useTASCostSaver } from \"../../../data/clearing/transportAndStorage/hooks/useTASCostSaver\";\r\nimport { BoolInput } from \"../../components/common/BoolInput\";\r\nimport { CalculationParams, ShouldCalc } from \"../../../data/clearing/transportAndStorage/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { NumberInput } from \"../../components/common/NumberInput\";\r\nimport { OrderMarkt } from \"../../../data/trading/orders/types\";\r\n\r\nexport interface CancelTradeProps {\r\n\ttrade: TradeList;\r\n\tclose: () => void;\r\n}\r\n\r\nexport const ClaculateTASCosts: React.FunctionComponent = ({ trade, close }) => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst [params, editParams] = useEditCalculationParamsState(trade);\r\n\tconst [validationState, validate] = useCalculationParamsValidator();\r\n\tconst [calculationFetchState, calculate, reset] = useTASCalculator();\r\n\tconst [saveFetchState, save] = useTASCostSaver();\r\n\r\n\tconst handleChange = React.useCallback(\r\n\t\t(event: React.ChangeEvent) => {\r\n\t\t\teditParams(event.target.name as any, event.target.value);\r\n\t\t},\r\n\t\t[editParams]\r\n\t);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (params?.shouldCalcDistance === ShouldCalc.False && params.distance !== undefined) {\r\n\t\t\tparams.distance = undefined;\r\n\t\t}\r\n\t}, [params]);\r\n\r\n\tconst tasCosts = React.useMemo(\r\n\t\t() => (calculationFetchState.type === \"successful\" ? calculationFetchState.result : undefined),\r\n\t\t[calculationFetchState]\r\n\t);\r\n\tconst onCalculate = React.useCallback(() => {\r\n\t\tconst validParams = validate(params);\r\n\t\tif (validParams) {\r\n\t\t\tcalculate(validParams);\r\n\t\t}\r\n\t}, [calculate, validate, params]);\r\n\r\n\tconst onSave = React.useCallback(() => {\r\n\t\tif (tasCosts) {\r\n\t\t\tsave(tasCosts);\r\n\t\t}\r\n\t}, [save, tasCosts]);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (saveFetchState.type === \"successful\") {\r\n\t\t\tclose();\r\n\t\t}\r\n\t}, [saveFetchState, close]);\r\n\r\n\tif (!params) return null;\r\n\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\tproperty=\"shouldCalcDistance\"\r\n\t\t\t\t\titem={params}\r\n\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\tfalsyValue={ShouldCalc.False}\r\n\t\t\t\t\tthrutyValue={ShouldCalc.True}\r\n\t\t\t\t\tlabel={getString(\"TASCalTransport\")}\r\n\t\t\t\t\tdisabled={calculationFetchState.type !== \"not-started\"}\r\n\t\t\t\t/>\r\n\t\t\t\r\n\t\t\t{params.shouldCalcDistance === ShouldCalc.True && (\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tproperty=\"distance\"\r\n\t\t\t\t\t\titem={params}\r\n\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\tlabel={getString(\"TASDistance\")}\r\n\t\t\t\t\t\tInputProps={{\r\n\t\t\t\t\t\t\tendAdornment: {\"km\"},\r\n\t\t\t\t\t\t}}\r\n\t\t\t\t\t\tdisabled={calculationFetchState.type !== \"not-started\"}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\r\n\t\t\t)}\r\n\t\t\t{trade.market === OrderMarkt.Forward && (\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tproperty=\"shouldCalcStorage\"\r\n\t\t\t\t\t\titem={params}\r\n\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\tfalsyValue={ShouldCalc.False}\r\n\t\t\t\t\t\tthrutyValue={ShouldCalc.True}\r\n\t\t\t\t\t\tlabel={getString(\"TASCalcStorage\")}\r\n\t\t\t\t\t\tdisabled={calculationFetchState.type !== \"not-started\"}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\r\n\t\t\t)}\r\n {trade.transCostBuy+trade.transCostSell+trade.storCostBuy+trade.storCostSell !==0 && (\r\n\t\t\t\t<>\r\n\t\t\t\t\r\n\t\t\t\t\t\t{getString(\"TASWarning\")}\r\n\t\t\t\t\r\n\r\n\t\t\t\t\r\n\t\t\t)}\r\n\t\t\t{tasCosts && (\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\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\t{!tasCosts && (\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t{getString(\"TASCaclulate\")}\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t)}\r\n\t\t\t{tasCosts && (\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{getString(\"TASConfirm\")}\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};\r\n","import React from \"react\";\r\nimport { DisplayTrade } from \"../../trading/trades/DisplayTrade\";\r\nimport { TradeList } from \"../../../data/trading/trades/types\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { Grid, Typography, Paper } from \"@material-ui/core\";\r\nimport { ClaculateTASCosts } from \"./ClaculateTASCosts\";\r\n\r\nexport interface CancelTradeProps {\r\n\ttrade: TradeList;\r\n\tclose: () => void;\r\n}\r\n\r\nexport const ClaculateTASCostsDrawer: React.FunctionComponent = ({ trade, close }) => {\r\n\treturn (\r\n\t\t\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\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport const useShowClaculateTASCosts = () => {\r\n\tconst showWithDrawer = React.useContext(DisplayDrawerContext);\r\n\treturn React.useCallback(\r\n\t\t(trade: TradeList) =>\r\n\t\t\tshowWithDrawer( showWithDrawer(undefined)} />),\r\n\t\t[showWithDrawer]\r\n\t);\r\n};\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport CalculateIcon from '@material-ui/icons/MonetizationOnOutlined';\r\nimport { TradeList } from \"../../../data/trading/trades/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { MaterialTableProps } from \"material-table\";\r\nimport { useShowClaculateTASCosts } from \"./ClaculateTASCostsDrawer\";\r\nimport { useAuth } from \"../../../data/auth/hooks\";\r\n\r\nexport function useTTASCostsActions() {\r\n\tconst { getString } = useContext(LocalizationContext);\r\n\tconst onCancelTrade = useShowClaculateTASCosts();\r\n\tconst [auth] = useAuth();\r\n\r\n\treturn useMemo[\"actions\"]>(\r\n\t\t() => [\r\n\t\t\ttrans => ({\r\n\t\t\t\ticon: () => ,\r\n\t\t\t\ttooltip: getString(\"TASTooltip\"),\r\n\t\t\t\tonClick: (event, rowData) => onCancelTrade(rowData as TradeList),\r\n\t\t\t\thidden: auth.status !== \"successful\" || auth.user.userIsEmployee !== 1 || trans.status === 40,\r\n\t\t\t}),\r\n\t\t],\r\n\t\t[getString, onCancelTrade, auth]\r\n\t);\r\n}\r\n","import React from \"react\";\r\nimport { TradeList } from \"../../../data/trading/trades/types\";\r\nimport {\r\n PaginationTable,\r\n PaginationDataProps,\r\n} from \"../../components/common/PagginationTable\";\r\nimport { useTTASCostsActions } from \"./useTTASCostsActions\";\r\nimport { useTradeColumns } from \"../../trading/trades/useTradeColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\n\r\nexport interface TradeTableProps {\r\n userAccessRights: AccessRights;\r\n getData: () => void;\r\n}\r\n\r\ntype TradeTablePropsType = TradeTableProps & PaginationDataProps;\r\n\r\nconst TradesTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n getData,\r\n ...tableProps\r\n}) => {\r\n const actions = useTTASCostsActions();\r\n const columns = useTradeColumns();\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={getData}\r\n // immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n actions={actions}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default TradesTable;\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getTrades from \"../../../trading/trades/api/getTrades\";\r\nimport { PageDataStatus, PageData } from \"../../../models\";\r\nimport { TradeFilter, TradeList } from \"../../../trading/trades/types\";\r\n\r\nexport const getTradesThunk = (\r\n\tpageNumber?: number,\r\n\titemsPerPage?: number,\r\n\tfilter?: TradeFilter\r\n): ThunkType | undefined>> => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst user = store.data.auth.current.user;\r\n\r\n\tconst tradesData = await dispatch(getTrades(user, pageNumber, itemsPerPage, filter));\r\n\r\n\tif (!tradesData || tradesData.resCode !== \"OK\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\treturn {\r\n\t\tcurrentPageData: tradesData.obj,\r\n\t\ttotalCount: Number(tradesData.resDesc) || 0,\r\n\t\tstatus: PageDataStatus.DataCurrent,\r\n\t};\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { setTrades } from \"../TASDataSlice\";\r\nimport { setTradesIndex } from \"../TASUXSlice\";\r\nimport { PageIndex } from \"../../../models\";\r\nimport { getTradesThunk } from \"./getTradesThunk\";\r\n\r\nexport const loadTrades = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tconst { pageNumber, itemsPerPage } = store.ux.clearing.transportAndStorage.index;\r\n\tconst { filter } = store.ux.clearing.transportAndStorage;\r\n\r\n\tconst tradesData = await dispatch(getTradesThunk(pageNumber, itemsPerPage, filter));\r\n\r\n\tif (tradesData) {\r\n\t\tdispatch(setTrades(tradesData));\r\n\t}\r\n};\r\n\r\nexport const setTradesIndexThunk = (index: PageIndex): ThunkType => dispatch => {\r\n\tdispatch(setTradesIndex(index));\r\n\tdispatch(loadTrades());\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { resetTradeIdices } from \"../TASUXSlice\";\r\nimport { PageIndex } from \"../../../models\";\r\nimport { setTradesIndexThunk } from \"../thunks/loadTrades\";\r\n\r\nexport const useTradeIndex = () => {\r\n const pageIndex = useSelector((s) => s.ux.clearing.transportAndStorage.index);\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetIndex = React.useCallback(\r\n (index: PageIndex) => dispatch(setTradesIndexThunk(index)),\r\n [dispatch]\r\n );\r\n const dispatchResetIndex = React.useCallback(\r\n () => dispatch(resetTradeIdices()),\r\n [dispatch]\r\n );\r\n\r\n return [pageIndex, dispatchSetIndex, dispatchResetIndex] as [\r\n typeof pageIndex,\r\n typeof dispatchSetIndex,\r\n typeof dispatchResetIndex\r\n ];\r\n};\r\n","import React from \"react\";\r\nimport FilterIcon from \"@material-ui/icons/FilterListOutlined\";\r\nimport { IconButton, Grid } from \"@material-ui/core\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { useTradesFilter, useCurrentTradesFilter } from \"../../../data/clearing/transportAndStorage/hooks/useTradesFilter\";\r\nimport { TradesFilterChips } from \"../../trading/trades/TradesFilterChips\";\r\nimport { TradesFilterEditor } from \"../../trading/trades/TradesFilterEditor\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\n\r\nexport const TradesFilterButton: React.FunctionComponent = () => {\r\n\tconst showWithDrawer = React.useContext(DisplayDrawerContext);\r\n\tconst showFilter = React.useCallback(() => showWithDrawer(), [showWithDrawer]);\r\n\r\n\tconst [filter, remnoveFilter] = useCurrentTradesFilter();\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\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\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};\r\n\r\nconst TradesFilterDrawer: React.FunctionComponent = () => {\r\n\tconst [filter, editFilter, save, , reset] = useTradesFilter();\r\n\r\n\treturn ;\r\n};\r\n","import { useCopiedState } from \"../../../../core/util/hooks\";\r\nimport { setFilter, removeFilter, initialState } from \"../TASUXSlice\"\r\nimport { invalidateTrades } from \"../TASDataSlice\"\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport React from \"react\";\r\nimport { TradeFilter } from \"../../../trading/trades/types\";\r\n\r\n\r\nexport const useTradesFilter = () => {\r\n\tconst storeFilter = useSelector(store => store.ux.clearing.transportAndStorage.filter);\r\n\tconst [filter, editFilter, changeState, setCurrentFilter] = useCopiedState(storeFilter);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchSetFilter = React.useCallback(() => {\r\n\t\tdispatch(setFilter(filter!))\r\n\t\tdispatch(invalidateTrades())\r\n\t}, [dispatch, filter])\r\n\r\n\tconst dispatchResetFilter = React.useCallback(() => {\r\n\t\tsetCurrentFilter(initialState.filter)\r\n\t}, [setCurrentFilter])\r\n\r\n\treturn [\r\n\t\tfilter,\r\n\t\teditFilter,\r\n\t\tdispatchSetFilter,\r\n\t\tchangeState, \r\n\t\tdispatchResetFilter\r\n\t] as [\r\n\t\ttypeof filter,\r\n\t\ttypeof editFilter,\r\n\t\ttypeof dispatchSetFilter,\r\n\t\ttypeof changeState,\r\n\t\ttypeof dispatchResetFilter\r\n\t]\r\n};\r\n\r\nexport const useCurrentTradesFilter = () => {\r\n\tconst filter = useSelector(store => store.ux.clearing.transportAndStorage.filter);\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchRemoveFilter = React.useCallback(\r\n\t\t(type: keyof TradeFilter) => {\r\n\t\t\tdispatch(removeFilter(type));\r\n\t\t\tdispatch(invalidateTrades());\r\n\t\t},\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\treturn [filter, dispatchRemoveFilter] as [typeof filter, typeof dispatchRemoveFilter];\r\n};\r\n","import TASCostPage from \"./TASCostPage\";\r\nimport { NavigationItem } from \"../../../core/navigation/types\";\r\nimport { transportAndStorageLocation } from \"./Locations\";\r\n\r\nexport const transportAndStorageComponents: NavigationItem[] = [\r\n {\r\n Component: TASCostPage,\r\n isMenuItem: true,\r\n path: transportAndStorageLocation,\r\n },\r\n];\r\n","import React from \"react\";\r\nimport { Grid, CardContent, CardHeader, Card, Divider, Fab } from \"@material-ui/core\";\r\nimport TradesTable from \"./TradesTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { PageComponent } from \"../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { useTradesData } from \"../../../data/clearing/transportAndStorage/hooks/useTradesData\";\r\nimport { useTradeIndex } from \"../../../data/clearing/transportAndStorage/hooks/useTradesIndex\";\r\nimport { TradesFilterButton } from \"./TradesFilter\";\r\nimport { PageDataStatus } from \"../../../data/models\";\r\n\r\nconst TASCostPage: PageComponent = ({ userAccessRights }) => {\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst [pageData, dispatchLoadTradesPage] = useTradesData();\r\n\tconst [pageIndex, dispatchSetIndex] = useTradeIndex();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (pageData && pageData.status === PageDataStatus.DataInvalidated) {\r\n\t\t\tdispatchLoadTradesPage();\r\n\t\t}\r\n\t}, [dispatchLoadTradesPage, pageData]);\r\n\r\n\treturn (\r\n\t\t<>\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\t}\r\n\t\t\t\t\t\t\taction={}\r\n\t\t\t\t\t\t/>\r\n\t\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\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};\r\n\r\nexport default TASCostPage;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadTrades } from \"../thunks/loadTrades\";\r\nimport { TradeList } from \"../../../trading/trades/types\";\r\nimport { PageData } from \"../../../models\";\r\n\r\nexport const useTradesData = () => {\r\n const pageData = useSelector | undefined>(\r\n (s) => s.data.clearing.transportAndStorage.currentPage\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadTradesPage = React.useCallback(\r\n () => dispatch(loadTrades()),\r\n [dispatch]\r\n );\r\n\r\n return [pageData, dispatchLoadTradesPage] as [\r\n typeof pageData,\r\n typeof dispatchLoadTradesPage\r\n ];\r\n};\r\n","export const transportAndStorageLocation = \"/cliring/transportandstorage\";\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { TradingData } from \"../types\";\r\n\r\nexport const getTradingDataApi = (userId: string, ptdid: string) =>\r\n webApi({\r\n method: \"GET\",\r\n url: \"clearing/getprodtradingdata\",\r\n params: {\r\n userId,\r\n ptdid,\r\n },\r\n });\r\n\r\nexport default getTradingDataApi;\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getTradingDataApi from \"../api/getTradingData\";\r\nimport { setDisplayed } from \"../tradingDataSlice\";\r\nimport { TradingData } from \"../types\";\r\n\r\nexport const loadTradingData = (prodId: string): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n dispatch(setDisplayed());\r\n\r\n const tradingData = await dispatch(getTradingData(prodId));\r\n\r\n dispatch(setDisplayed(tradingData));\r\n};\r\n\r\nexport const getTradingData = (\r\n prodId: string\r\n): ThunkType> => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { userId } = store.data.auth.current.user;\r\n return await dispatch(getTradingDataApi(userId, prodId));\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { TradingData } from \"../types\";\r\nimport { loadTradingData } from \"../thunks/loadTradingData\";\r\n\r\nexport const useDisplayTradingData = (prodId?: string) => {\r\n const storeTradingData = useSelector(\r\n (store) => store.data.clearing.tradingData.displayedTradingData\r\n );\r\n\r\n const displayedTradingData =\r\n storeTradingData && storeTradingData.ptdId === prodId ? storeTradingData : undefined;\r\n\r\n const displatch = useDispatch();\r\n\r\n React.useEffect(() => {\r\n if (prodId) {\r\n displatch(loadTradingData(prodId));\r\n }\r\n }, [displatch, prodId]);\r\n\r\n return displayedTradingData;\r\n};\r\n","import React from \"react\";\r\nimport { TradingData } from \"../../../data/clearing/tradingData/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { useDisplaySingleEmementStyles } from \"../../useDisplaySingleEmementStyles\";\r\nimport { DisplayBoolNumber } from \"../../components/common/DisplayBoolNumber\";\r\nimport { Status } from \"../../../data/models\";\r\n\r\nexport interface DisplayTradingDataMainAttributesProps {\r\n tradingData: TradingData;\r\n}\r\n\r\nexport const DisplayTradingDataMainAttributes: React.FunctionComponent = ({\r\n tradingData,\r\n}) => {\r\n const style = useDisplaySingleEmementStyles();\r\n const { getString, getDateString, getFormatedNumberString } = React.useContext(LocalizationContext);\r\n\r\n return (\r\n
\r\n
\r\n {getString(\"tradingDataDataTime\")}\r\n {getDateString(tradingData.tradingDate)}\r\n
\r\n
\r\n {getString(\"tradingDataProductCode\")}\r\n {tradingData.productCode}\r\n
\r\n
\r\n {getString(\"tradingDataProductName\")}\r\n {tradingData.productName}\r\n
\r\n
\r\n {getString(\"tradingDataRefPrice\")}\r\n {getFormatedNumberString(tradingData.refPrice, true)}\r\n
\r\n
\r\n {getString(\"tradingDataBestBid\")}\r\n {getFormatedNumberString(tradingData.bestBid, true)}\r\n
\r\n
\r\n {getString(\"tradingDataBestBidQty\")}\r\n {getFormatedNumberString(tradingData.bestBidQty, true)}\r\n
\r\n
\r\n {getString(\"tradingDataBestAsk\")}\r\n {getFormatedNumberString(tradingData.bestAsk, true)}\r\n
\r\n
\r\n {getString(\"tradingDataBestAskQty\")}\r\n {getFormatedNumberString(tradingData.bestAskQty, true)}\r\n
\r\n
\r\n {getString(\"tradingDataHighPrice\")}\r\n {getFormatedNumberString(tradingData.highPrice, true)}\r\n
\r\n
\r\n {getString(\"tradingDataLowPrice\")}\r\n {getFormatedNumberString(tradingData.lowPrice, true)}\r\n
\r\n
\r\n {getString(\"tradingDataVolume\")}\r\n {getFormatedNumberString(tradingData.volume, true)}\r\n
\r\n
\r\n {getString(\"tradingDataAmount\")}\r\n {getFormatedNumberString(tradingData.amount, true)}\r\n
\r\n
\r\n {getString(\"tradingDataWeightedPrice\")}\r\n {getFormatedNumberString(tradingData.weightedPrice, true)}\r\n
\r\n
\r\n {getString(\"tradingDataMidPrice\")}\r\n {getFormatedNumberString(tradingData.midPrice, true)}\r\n
\r\n
\r\n );\r\n};\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const printTradingData = (user: User, ptdid: string) => {\r\n\treturn httpWebApi({\r\n\t\tmethod: \"GET\",\r\n\t\tresponseType: \"blob\",\r\n\t\ttimeout: 60 * 4 * 1000,\r\n\t\turl: \"reporting/getprodtradingdatacalcreport\",\r\n\t\tparams: {\r\n\t\t\tuserid: user.userId,\r\n\t\t\tptdid,\r\n\t\t},\r\n\t});\r\n};\r\n\r\nexport default printTradingData;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { printTradingDataThunk } from \"../thunks/printTradingDataThunk\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { TradingData } from \"../types\";\r\nimport { setDownloadFetchState } from \"../tradingDataSlice\";\r\n\r\nexport const useTradingDataPrinter = (tradingData?: TradingData) => {\r\n\tconst fetchState = useSelector(\r\n\t\ts => s.data.clearing.tradingData.downloadReportFetchState\r\n\t);\r\n\tconst dispatch = useDispatch();\r\n\r\n\tconst download = React.useCallback(() => {\r\n\t\t\tdispatch(printTradingDataThunk(tradingData));\r\n\t}, [dispatch,tradingData ]);\r\n\r\n\tconst dispatchSetFetch = React.useCallback(() => { // Ovo da prvo izađe customDialog box\r\n\t\tdispatch(setDownloadFetchState({ type: \"started\" }))\r\n\t},\t[dispatch] );\r\n\t\r\n\treturn [download, fetchState, dispatchSetFetch] as [typeof download, typeof fetchState, typeof dispatchSetFetch];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { printTradingData } from \"../api/printTradingData\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setDownloadFetchState } from \"../tradingDataSlice\";\r\nimport { TradingData } from \"../types\";\r\n\r\nexport const printTradingDataThunk = (tradingdata?: TradingData): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\" || !tradingdata || !tradingdata.ptdId) {\r\n\t\treturn undefined;\r\n\t}\r\n\tconst lan = store.ux.localization.language\r\n\tconst filename = `TradingDataCalculation_${tradingdata.ptdId}.pdf`\r\n\tconst user = store.data.auth.current.user;\r\n\tdispatch(setDownloadFetchState({ type: \"started\" }));\r\n\tconst tradingDataCalcReport = await dispatch(printTradingData(user, tradingdata.ptdId));\r\n\tif (tradingDataCalcReport) {\r\n\t\tfileDownload(new Blob([tradingDataCalcReport as any], { type: \"application/pdf\" }), filename);\r\n\t}\r\n\tdispatch(setDownloadFetchState({ type: \"not-started\" }));\r\n};\r\n","import React from \"react\";\r\nimport { useDisplayTradingData } from \"../../../data/clearing/tradingData/hooks/useDisplayTradingData\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { TradingData } from \"../../../data/clearing/tradingData/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { DisplayTradingDataMainAttributes } from \"./DisplayTradingDataMainAttributes\";\r\nimport { ExpansionPanel,ExpansionPanelSummary,Typography,Grid,IconButton} from \"@material-ui/core\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport { useTradingDataPrinter } from \"../../../data/clearing/tradingData/hooks/useTradingDataPrinter\";\r\n\r\nexport interface DisplayTradingDataProps {\r\n id?: string;\r\n}\r\n\r\nexport const DisplayTradingData: React.FunctionComponent = ({\r\n id,\r\n}) => {\r\n const tradingData = useDisplayTradingData(id);\r\n const { getString } = React.useContext(LocalizationContext);\r\n\tconst [download, fetchState, setfetch] = useTradingDataPrinter(tradingData);\r\n\r\n return !tradingData ? (\r\n <>{\"loading placeholder\"}\r\n ) : (\r\n \r\n \r\n \r\n \r\n \r\n {getString(\"tableBasciInfo\")}\r\n \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\r\n\t\t\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\r\n { fetchState.type !== \"not-started\" ? getString(\"pleaseWait\") : null }\r\n\t\t\t\t\t\t\t\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const useViewTradingData = () => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n return React.useCallback(\r\n (tradingData: TradingData) =>\r\n showWithDrawer(),\r\n [showWithDrawer]\r\n );\r\n};\r\n","import { getEditLocation } from \"../../../core/util/functions\";\r\nexport const tradingDataLocation = \"/cliring/referenceprices\";\r\nexport const getTradingDataEditLocation = (id?: string) =>\r\n getEditLocation(tradingDataLocation, undefined, id);\r\n\r\nexport const editRouter = getTradingDataEditLocation(\":ptdId?\");\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport ViewIcon from \"@material-ui/icons/InputOutlined\";\r\nimport EditIcon from \"@material-ui/icons/EditOutlined\";\r\nimport { TradingData } from \"../../../data/clearing/tradingData/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { MaterialTableProps } from \"material-table\";\r\nimport { useViewTradingData } from \"./DisplayTradingData\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { getTradingDataEditLocation } from \"../tradingData/Locations\";\r\n\r\nexport function useTradingDataActions() {\r\n const { getString } = useContext(LocalizationContext);\r\n const onShowTradingData = useViewTradingData();\r\n const onEditTradingData = useEditTradingDataAction();\r\n\r\n return useMemo(() => {\r\n const result: MaterialTableProps[\"actions\"] = [\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"orderActView\"),\r\n onClick: (event, rowData) => onShowTradingData(rowData as TradingData),\r\n },\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"tableEdit\"),\r\n onClick: (event, rowData) => onEditTradingData(rowData as TradingData),\r\n },\r\n ];\r\n return result;\r\n }, [onShowTradingData, onEditTradingData, getString]);\r\n}\r\n\r\nexport const useEditTradingDataAction = () => {\r\n const history = useHistory();\r\n return React.useCallback(\r\n (tradingData: TradingData) =>\r\n history.push(getTradingDataEditLocation(tradingData.ptdId)),\r\n [history]\r\n );\r\n};\r\n","import React from \"react\";\r\nimport { Grid, Paper, Button, Typography } from \"@material-ui/core\";\r\nimport { DateInput } from \"../../components/common/DateInput\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { TradingDataFilter } from \"../../../data/clearing/tradingData/types\";\r\nimport { ProductSelect } from \"../../components/listing/ProductSelect\";\r\nimport { TradingDataFilterChipsComponent } from \"./TradingDataFilterChips\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { isValidDate } from \"../../../core/util/functions\";\r\nimport { useTradingFilterDataValidator } from \"../../../data/clearing/tradingData/hooks/useTradingDataFilterValidator\";\r\n\r\nexport enum TradingDataFilterEditorType {\r\n\tBasic,\r\n\tExtended,\r\n}\r\n\r\ninterface TradingDataFilterEditorProps {\r\n\tfilter?: TradingDataFilter;\r\n\teditFilter: (prop: keyof TradingDataFilter, value: any) => void;\r\n\tsave: () => void;\r\n\ttype: TradingDataFilterEditorType;\r\n\treset?: () => void;\r\n}\r\n\r\nexport const TradingDataFilterEditor: React.FunctionComponent = ({\r\n\tfilter,\r\n\teditFilter,\r\n\tsave,\r\n\ttype,\r\n\treset,\r\n}) => {\r\n\tconst showWithDrawer = React.useContext(DisplayDrawerContext);\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n//\tconst [validationState, validate] = useTradingFilterDataValidator();\r\n\r\n\treturn (\r\n\t\t\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\t\r\n\t\t\t\t\t\t\t\teditFilter(\"datefrom\", isValidDate(date) ? date.toISOString() : undefined)\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tdisableFuture\r\n//\t\t\t\t\t\t\terror={validationState.datefrom !== undefined && !validationState.datefrom}\r\n//\t\t\t\t\t\t\trequired={validationState.datefrom !== undefined}\r\n\t\t\t\t\t\t\terrorMessage={getString(\"noFutureDate\")}\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\t\t\teditFilter(\"dateto\", isValidDate(date) ? date.toISOString() : undefined)\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tdisableFuture\r\n//\t\t\t\t\t\t\terror={validationState.dateto !== undefined && !validationState.dateto}\r\n//\t\t\t\t\t\t\trequired={validationState.dateto !== undefined}\r\n\t\t\t\t\t\t\terrorMessage={getString(\"noFutureDate\")}\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 prod.prodId === filter?.product?.prodId}\r\n\t\t\t\t\t\t\tonChangeItem={prod => editFilter(\"product\", prod)}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\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\tconst valid = validate(filter);\r\n//\t\t\t\t\t\t\t\tif (valid) {\r\n\t\t\t\t\t\t\t\t\tsave();\r\n\t\t\t\t\t\t\t\t\tshowWithDrawer(undefined);\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\t\t{getString(\"orderFilterConfirm\")}\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};\r\n\r\nexport const TradingDataFilterChips = TradingDataFilterChipsComponent;\r\n","import React from \"react\";\r\nimport { TradingData } from \"../../../data/clearing/tradingData/types\";\r\nimport {\r\n PaginationTable,\r\n PaginationDataProps,\r\n} from \"../../components/common/PagginationTable\";\r\nimport {\r\n useTradingDataActions,\r\n} from \"./useTradingDataActions\";\r\nimport { useTradingDataColumns } from \"./useTradingDataColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\n\r\nexport interface TradingDataTableProps {\r\n userAccessRights: AccessRights;\r\n getData: () => void;\r\n}\r\n\r\ntype TradingDataTablePropsType = TradingDataTableProps &\r\n PaginationDataProps;\r\n\r\nconst TradingDataTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n getData,\r\n ...tableProps\r\n}) => {\r\n const actions = useTradingDataActions();\r\n const columns = useTradingDataColumns();\r\n \r\n return (\r\n \r\n {...tableProps}\r\n getData={getData}\r\n // immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n actions={actions}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default TradingDataTable;\r\n","import { TradingData } from \"../../../data/clearing/tradingData/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\n\r\nexport const useTradingDataColumns = () => {\r\n const { getString, getDateString, getFormatedNumberString } = React.useContext(LocalizationContext);\r\n\r\n return React.useMemo(\r\n () => [\r\n {\r\n title: getString(\"tradingDataDataTime\"),\r\n render: (tradingData) => getDateString(tradingData.tradingDate, \"DD.MM.YYYY\"),\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"tradingDataProductName\"),\r\n field: \"productName\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"tradingDataRefPrice\"),\r\n render: (tradingData) => getFormatedNumberString(tradingData.refPrice, true),\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"tradingDataHighPrice\"),\r\n render: (tradingData) => getFormatedNumberString(tradingData.highPrice, true),\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"tradingDataLowPrice\"),\r\n render: (tradingData) => getFormatedNumberString(tradingData.lowPrice, true),\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"tradingDataVolume\"),\r\n render: (tradingData) => getFormatedNumberString(tradingData.volume, true),\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"tradingDataAmount\"),\r\n render: (tradingData) => getFormatedNumberString(tradingData.amount, true),\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"tradingDataWeightedPrice\"),\r\n render: (tradingData) => getFormatedNumberString(tradingData.weightedPrice, true),\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"tradingDataMidPrice\"),\r\n render: (tradingData) => getFormatedNumberString(tradingData.midPrice, true),\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n ],\r\n [getString, getFormatedNumberString, getDateString]\r\n ) as Column[];\r\n};\r\n","import { TradingDataFilter } from \"../types\";\r\nimport { TradingData, GetTradingDataParams } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nconst getTradingDataWebApi = (\r\n user: User,\r\n page: number,\r\n itemsPerPage: number,\r\n filter: TradingDataFilter\r\n) => {\r\n const params: GetTradingDataParams = {\r\n userid: user.userId,\r\n fromrow: page * itemsPerPage,\r\n numofrows: itemsPerPage,\r\n prodid: filter?.product?.prodId ,\r\n datefrom: getParamsDateString(filter.datefrom),\r\n dateto: getParamsDateString(filter.dateto),\r\n };\r\n\r\n return webApiWithResponse({\r\n method: \"GET\",\r\n url: \"clearing/getprodtradingdatalist\",\r\n params,\r\n });\r\n};\r\n\r\nexport default getTradingDataWebApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadAllTradingData } from \"../thunks/loadAllTradingData\";\r\nimport { TradingData } from \"../types\";\r\nimport { PageData } from \"../../../models\";\r\n\r\nexport const useTradingDataData = () => {\r\n const pageData = useSelector<\r\n StoreType,\r\n PageData | undefined\r\n >((s) => s.data.clearing.tradingData.currentPage);\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadTradingDataPage = React.useCallback(\r\n () => dispatch(loadAllTradingData()),\r\n [dispatch]\r\n );\r\n\r\n return [pageData, dispatchLoadTradingDataPage] as [\r\n typeof pageData,\r\n typeof dispatchLoadTradingDataPage\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { setTradingsData, invalidateTradingsData } from \"../tradingDataSlice\";\r\nimport { setTradingDateIndex } from \"../tradingUXSlice\";\r\nimport getTradingDataWebApi from \"../api/getAllTradingData\";\r\nimport { PageIndex, PageDataStatus } from \"../../../models\";\r\n\r\nexport const loadAllTradingData = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n const { pageNumber, itemsPerPage } = store.ux.clearing.tradingData.index;\r\n const { filter } = store.ux.clearing.tradingData;\r\n const user = store.data.auth.current.user;\r\n\r\n const tradingDataResponse = await dispatch(\r\n getTradingDataWebApi(user, pageNumber, itemsPerPage, filter)\r\n );\r\n\r\n if (!tradingDataResponse || tradingDataResponse.resCode !== \"OK\") {\r\n return;\r\n }\r\n\r\n const tradingData = {\r\n currentPageData: tradingDataResponse.obj,\r\n totalCount: Number(tradingDataResponse.resDesc) || 0,\r\n status: PageDataStatus.DataCurrent,\r\n };\r\n\r\n dispatch(setTradingsData(tradingData));\r\n};\r\n\r\nexport const setTradingDataIndexThunk = (index: PageIndex): ThunkType => (\r\n dispatch\r\n) => {\r\n dispatch(setTradingDateIndex(index));\r\n dispatch(invalidateTradingsData());\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { resetTradingDateIdices } from \"../tradingUXSlice\";\r\nimport { PageIndex } from \"../../../models\";\r\nimport { setTradingDataIndexThunk } from \"../thunks/loadAllTradingData\";\r\n\r\nexport const useTradingDataIndex = () => {\r\n const pageIndex = useSelector(\r\n (s) => s.ux.clearing.tradingData.index\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetIndex = React.useCallback(\r\n (index: PageIndex) => dispatch(setTradingDataIndexThunk(index)),\r\n [dispatch]\r\n );\r\n const dispatchResetIndex = React.useCallback(\r\n () => dispatch(resetTradingDateIdices()),\r\n [dispatch]\r\n );\r\n\r\n return [pageIndex, dispatchSetIndex, dispatchResetIndex] as [\r\n typeof pageIndex,\r\n typeof dispatchSetIndex,\r\n typeof dispatchResetIndex\r\n ];\r\n};\r\n","import { useCopiedState } from \"../../../../core/util/hooks\";\r\nimport { setFilter, removeFilter, initialState, setReportData } from \"../tradingUXSlice\";\r\nimport { invalidateTradingsData } from \"../tradingDataSlice\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport React from \"react\";\r\nimport { TradingDataFilter } from \"../types\";\r\n\r\nexport const useTradingDataFilter = () => {\r\n const [storeFilter] = useCurrentTradingDataFilter();\r\n const [filter, editFilter, changeState, setCurrentFilter] = useCopiedState<\r\n TradingDataFilter\r\n >(storeFilter);\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetFilter = React.useCallback(() => {\r\n dispatch(setFilter(filter!));\r\n dispatch(invalidateTradingsData());\r\n }, [dispatch, filter]);\r\n\r\n const dispatchResetFilter = React.useCallback(() => {\r\n setCurrentFilter(initialState.filter);\r\n }, [setCurrentFilter]);\r\n\r\n return [\r\n filter,\r\n editFilter,\r\n dispatchSetFilter,\r\n changeState,\r\n dispatchResetFilter,\r\n ] as [\r\n typeof filter,\r\n typeof editFilter,\r\n typeof dispatchSetFilter,\r\n typeof changeState,\r\n typeof dispatchResetFilter\r\n ];\r\n};\r\n\r\nexport const useCurrentTradingDataFilter = () => {\r\n const filter = useSelector(\r\n (store) => store.ux.clearing.tradingData.filter\r\n );\r\n const dispatch = useDispatch();\r\n const dispatchRemoveFilter = React.useCallback(\r\n (type: keyof TradingDataFilter) => {\r\n dispatch(removeFilter(type));\r\n dispatch(invalidateTradingsData());\r\n },\r\n [dispatch]\r\n );\r\n\tconst dispatchSetReportDate = React.useCallback(\r\n\t\t(reportDate: string) => {\r\n\t\t\tdispatch(setReportData(reportDate));\r\n\t\t\tdispatch(invalidateTradingsData());\r\n\t\t},\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\r\n return [filter, dispatchRemoveFilter,dispatchSetReportDate] as [\r\n typeof filter,\r\n typeof dispatchRemoveFilter,\r\n typeof dispatchSetReportDate\r\n ];\r\n};\r\n","import React from \"react\";\r\nimport { Chip, Grid } from \"@material-ui/core\";\r\nimport { TradingDataFilter } from \"../../../data/clearing/tradingData/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\n\r\nexport const TradingDataFilterChipsComponent: React.FunctionComponent = ({\r\n filter,\r\n removeFilter,\r\n}) => {\r\n const { getDateString, getString } = React.useContext(LocalizationContext);\r\n \r\n return (\r\n \r\n {filter.datefrom && (\r\n \r\n removeFilter(\"datefrom\")}\r\n />\r\n \r\n )}\r\n {filter.dateto && (\r\n \r\n removeFilter(\"dateto\")}\r\n />\r\n \r\n )}\r\n {filter.product && (\r\n \r\n removeFilter(\"product\")}\r\n />\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\ninterface TradingDataFilterChipsProps {\r\n filter: TradingDataFilter;\r\n removeFilter: (type: keyof TradingDataFilter) => void;\r\n}\r\n","import React from \"react\";\r\nimport FilterIcon from \"@material-ui/icons/FilterListOutlined\";\r\nimport { IconButton, Grid } from \"@material-ui/core\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport {\r\n\tuseTradingDataFilter,\r\n\tuseCurrentTradingDataFilter,\r\n} from \"../../../data/clearing/tradingData/hooks/useTradingDataFilter\";\r\nimport {\r\n\tTradingDataFilterEditor,\r\n\tTradingDataFilterEditorType,\r\n\tTradingDataFilterChips,\r\n} from \"../tradingData/TradingDataFilterEditor\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\n\r\nexport const TradingDataFilterButton: React.FunctionComponent = () => {\r\n\tconst showWithDrawer = React.useContext(DisplayDrawerContext);\r\n\tconst showFilter = React.useCallback(() => showWithDrawer(), [showWithDrawer]);\r\n\r\n\tconst [filter, removeFilter] = useCurrentTradingDataFilter();\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\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\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};\r\n\r\nconst TradingsDataFilterEditor: React.FunctionComponent = () => {\r\n\tconst [filter, editFilter, save, , rest] = useTradingDataFilter();\r\n\treturn (\r\n\t\t\r\n\t);\r\n};\r\n","import { TradingData, TradingDataFilter } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nconst getRefPriceButton = (user: User, filter: TradingDataFilter) => {\r\n return webApi({\r\n method: \"PUT\",\r\n url: \"clearing/createprodtradingdata\",\r\n params: {\r\n userid: user.userId,\r\n tradingdate: getParamsDateString(filter.reportDate),\r\n },\r\n });\r\n};\r\nexport default getRefPriceButton;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadRefPriceButton } from \"../thunks/loadRefPriceButton\";\r\nimport { resetData } from \"../tradingDataSlice\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { TradingData, TradingDataFilter } from \"../types\";\r\nimport moment from \"moment\";\r\n\r\nvar tomorow = moment().add(1, \"day\").toDate();\r\n\r\nexport const useRefPriceButton = () => {\r\n\tconst fetchState = useSelector(s => s.data.clearing.tradingData.fetchState);\r\n\r\n\tconst data = useSelector(\r\n\t\ts => s.data.clearing.tradingData.currentPage?.currentPageData\r\n\t);\r\n\r\n\tconst filter = useSelector(\r\n\t\ts => s.ux.clearing.tradingData.filter\r\n\t);\r\n\r\n \r\n \tconst dateOk = filter?.datefrom === filter?.dateto\r\n \tconst reportDateOk = filter?.reportDate && moment(tomorow).isAfter(filter.reportDate);\r\n\r\n\tconst hasData = (data !== undefined && data !== null && data.length > 0) || !dateOk || !reportDateOk;\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst download = React.useCallback(() => {\r\n\t\tdispatch(downloadRefPriceButton());\r\n\t}, [dispatch]);\r\n\r\n\tconst dispatchResetData = React.useCallback(() => {\r\n\t\tdispatch(resetData());\r\n\t}, [dispatch]);\r\n\r\n\treturn [download, fetchState, dispatchResetData, hasData] as [\r\n\t\ttypeof download,\r\n\t\ttypeof fetchState,\r\n\t\ttypeof dispatchResetData,\r\n\t\ttypeof hasData\r\n\t];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getRefPriceButton from \"../api/getRefPriceButton\";\r\nimport { setFetchState, invalidateTradingsData } from \"../tradingDataSlice\";\r\n\r\nexport const downloadRefPriceButton = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst { filter } = store.ux.clearing.tradingData;\r\n\tconst user = store.data.auth.current.user;\r\n\tdispatch(setFetchState({ type: \"started\" }));\r\n\tconst refPrice = await dispatch(getRefPriceButton(user, filter));\r\n\tdispatch(invalidateTradingsData());\r\n\tdispatch(setFetchState({ type: \"successful\" }));\r\n\r\n};\r\n","import React from \"react\";\r\nimport { useRefPriceButton } from \"../../../data/clearing/tradingData/hooks/useRefPriceButton\";\r\nimport { Fab } from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport DownloadIcon from \"@material-ui/icons/DoubleArrowOutlined\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { CustomDialog } from \"../../components/common/CustomDialog\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\n\r\nexport const RefPriceButton: React.FunctionComponent = () => {\r\n\tconst [downloader, fetchState, resetData, hasData] = useRefPriceButton();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t\r\n\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\t\r\n\t\t\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport { Grid } from \"@material-ui/core\";\r\nimport { useCurrentTradingDataFilter } from \"../../../data/clearing/tradingData/hooks/useTradingDataFilter\";\r\nimport { DateInput } from \"../../components/common/DateInput\";\r\nimport { isValidDate } from \"../../../core/util/functions\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\n\r\nexport const TradingDateInput: React.FunctionComponent = () => {\r\n\tconst [filter, ,setReportDate] = useCurrentTradingDataFilter();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t {\r\n\t\t\t\t\t\tif (isValidDate(date)) {\r\n\t\t\t\t\t\t\tsetReportDate(date.toISOString());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}}\r\n\t\t\t\t\tdisableFuture\r\n\t\t\t\t/>\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { TradingDataFilter } from \"../types\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nexport const getRefPriceReport = (user: User, filter: TradingDataFilter) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getprodtradingdatareport\",\r\n params: {\r\n userid: user.userId,\r\n prodid: filter.product?.prodId ,\r\n datefrom: getParamsDateString(filter.datefrom),\r\n dateto: getParamsDateString(filter.dateto),\r\n },\r\n });\r\n};\r\n\r\nexport default getRefPriceReport;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadRefPriceReport } from \"../thunks/downloadReport\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { TradingData } from \"../types\";\r\n\r\nexport const useRefPriceReportDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.clearing.tradingData.downloadReportFetchState\r\n );\r\n\r\n const data = useSelector(\r\n s => s.data.clearing.tradingData.currentPage?.currentPageData\r\n );\r\n \r\n const hasData = (data !== undefined && data !== null && data.length > 0) ;\r\n\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadRefPriceReport()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState, hasData] as [typeof download, typeof fetchState, typeof hasData];\r\n};\r\n\r\n\r\n\r\n\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getRefPriceReport } from \"../api/getRefPriceReport\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setDownloadFetchState } from \"../tradingDataSlice\";\r\n\r\nexport const downloadRefPriceReport = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.clearing.tradingData;\r\n const user = store.data.auth.current.user;\r\n\r\n dispatch(setDownloadFetchState({ type: \"started\" }));\r\n const ordersReport = await dispatch(getRefPriceReport(user, filter));\r\n if (ordersReport) {\r\n fileDownload(\r\n new Blob([ordersReport as any], { type: \"application/pdf\" }),\r\n \"RefPrice.pdf\"\r\n );\r\n }\r\n dispatch(setDownloadFetchState({ type: \"not-started\" }));\r\n};\r\n\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { TradingDataFilter } from \"../types\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nexport const getRefPriceExcel = (user: User, filter: TradingDataFilter) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getprodtradingdataxls\",\r\n params: {\r\n userid: user.userId,\r\n prodid: filter?.product?.prodId ,\r\n datefrom: getParamsDateString(filter.datefrom),\r\n dateto: getParamsDateString(filter.dateto),\r\n },\r\n });\r\n};\r\n\r\nexport default getRefPriceExcel;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadRefPriceExcel } from \"../thunks/downloadReportExcel\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { TradingData } from \"../types\";\r\n\r\nexport const useRefPriceExcelDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) =>\r\n s.data.clearing.tradingData.downloadReportFetchState\r\n );\r\n\r\n const data = useSelector(\r\n s => s.data.clearing.tradingData.currentPage?.currentPageData\r\n );\r\n \r\n const hasData = (data !== undefined && data !== null && data.length > 0) ;\r\n\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadRefPriceExcel()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState, hasData] as [typeof download, typeof fetchState, typeof hasData];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getRefPriceExcel } from \"../api/getRefPriceExcel\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setDownloadFetchState } from \"../tradingDataSlice\";\r\n\r\nexport const downloadRefPriceExcel = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.clearing.tradingData;\r\n const user = store.data.auth.current.user;\r\n\r\n dispatch(setDownloadFetchState({ type: \"started\" }));\r\n const dailyTrading = await dispatch(getRefPriceExcel(user, filter));\r\n if (dailyTrading) {\r\n fileDownload(\r\n new Blob([dailyTrading as any], {\r\n type: \"application/vnd.openxmlformat\",\r\n }),\r\n \"RegPrice.xlsx\"\r\n );\r\n }\r\n dispatch(setDownloadFetchState({ type: \"not-started\" }));\r\n};\r\n","import React from \"react\";\r\nimport { useRefPriceReportDownloader } from \"../../../data/clearing/tradingData/hooks/useRefPriceReportDownloader\";\r\nimport { useRefPriceExcelDownloader } from \"../../../data/clearing/tradingData/hooks/useRefPriceExcelDownloader\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport ExcelIcon from \"@material-ui/icons/TableChartOutlined\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\n\r\nexport const DownloadButton: React.FunctionComponent = () => {\r\n\tconst [downloader, fetchState, hasdata] = useRefPriceReportDownloader();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\treturn (\r\n\t\t<>\r\n\t\t\t\r\n\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\t{fetchState.type !== \"not-started\" ? getString(\"pleaseWait\") : null}\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport const DownloadExcelButton: React.FunctionComponent = () => {\r\n\tconst [downloader, fetchState, hasdata] = useRefPriceExcelDownloader();\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport { Grid, CardContent, CardHeader, Card, Divider } from \"@material-ui/core\";\r\nimport TradingDataTable from \"./TradingDataTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { PageComponent } from \"../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { useTradingDataData } from \"../../../data/clearing/tradingData/hooks/useTradingDataData\";\r\nimport { useTradingDataIndex } from \"../../../data/clearing/tradingData/hooks/useTradingDataIndex\";\r\nimport { PageDataStatus } from \"../../../data/models\";\r\nimport { TradingDataFilterButton } from \"./TradingDataFilter\";\r\nimport { RefPriceButton } from \"./RefPriceButton\";\r\nimport { TradingDateInput } from \"./TradingDateInput\";\r\nimport { DownloadButton, DownloadExcelButton } from \"./DownloadButton\";\r\n\r\nconst TradingDataPage: PageComponent = ({ userAccessRights }) => {\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst [pageData, dispatchLoadTradingData] = useTradingDataData();\r\n\tconst [pageIndex, dispatchSetIndex] = useTradingDataIndex();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (pageData && pageData.status === PageDataStatus.DataInvalidated) {\r\n\t\t\tdispatchLoadTradingData();\r\n\t\t}\r\n\t}, [dispatchLoadTradingData, pageData]);\r\n\r\n\treturn (\r\n\t\t<>\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\t}\r\n\t\t\t\t\t\t\taction={}\r\n\t\t\t\t\t\t/>\r\n\t\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\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport const TradingDataActions: React.FunctionComponent = () => (\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n \t\t \r\n \t\r\n \t\r\n \t\t\r\n \t\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n);\r\n\r\nexport default TradingDataPage;\r\n","import React from \"react\";\r\nimport { useDisplayTradingData } from \"./useDisplayTradingData\";\r\nimport { TradingData } from \"../types\";\r\nimport { useCopiedState } from \"../../../../core/util/hooks\";\r\nimport { Status } from \"../../../models\";\r\n\r\nexport const defaultTradingData: TradingData = {\r\n ptdId: \"\",\r\n productId: \"\",\r\n};\r\n\r\nexport const useEditTradingData = (ptdId?: string): TradingData | undefined => {\r\n const displayTradingData = useDisplayTradingData(ptdId);\r\n\r\n return React.useMemo(() => {\r\n if (ptdId !== undefined && displayTradingData === undefined) {\r\n return undefined;\r\n }\r\n\r\n if (ptdId === undefined) {\r\n return { ...defaultTradingData };\r\n }\r\n\r\n return displayTradingData ? { ...displayTradingData } : undefined;\r\n }, [ptdId, displayTradingData]);\r\n};\r\n\r\nexport const useEditTradingDataState = (ptdId?: string) => {\r\n const tradingData = useEditTradingData(ptdId);\r\n return useCopiedState(tradingData);\r\n};\r\n","import { TradingData, TradingDataValidationState } from \"../types\";\r\nimport { createUseValidator } from \"../../../../core/util/hooks\";\r\n\r\nexport const tradingDataValidationState: TradingDataValidationState = {\r\n\tptdId: true,\r\n\tproductId: true,\r\n};\r\n\r\nexport const useTradingDataValidator = createUseValidator(\r\n\ttradingDataValidationState\r\n);\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { TradingData } from \"../types\";\r\n\r\nexport const updateTradingDataApi = (userId: string, traddata: TradingData) =>\r\n webApiWithResponse({\r\n method: \"PUT\",\r\n url: \"clearing/updprodtradingdata\",\r\n params: {\r\n userId,\r\n },\r\n data: traddata,\r\n });\r\n\r\nexport default updateTradingDataApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { upsertTradingData } from \"../thunks/upsertTradingData\";\r\nimport { setFetchState } from \"../tradingDataSlice\";\r\nimport { TradingData } from \"../types\";\r\n\r\nexport const useTradingDataUpsert = () => {\r\n const fetchState = useSelector(\r\n (store) => store.data.clearing.tradingData.fetchState\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchUpsertTradingData = React.useCallback(\r\n (tradingData: TradingData) => dispatch(upsertTradingData(tradingData)),\r\n [dispatch]\r\n );\r\n\r\n React.useEffect(() => {\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n }, [dispatch]);\r\n\r\n return [fetchState, dispatchUpsertTradingData] as [\r\n typeof fetchState,\r\n typeof dispatchUpsertTradingData\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport updateTradingData from \"../api/updateTradingData\";\r\nimport { TradingData } from \"../types\";\r\nimport { setFetchState, invalidateTradingsData } from \"../tradingDataSlice\";\r\n\r\nexport const upsertTradingData = (tradingData: TradingData): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n dispatch(setFetchState({ type: \"started\" }));\r\n\r\n const { userId } = store.data.auth.current.user;\r\n const result = await dispatch(updateTradingData(userId, tradingData))\r\n\r\n if (result && result.resCode === \"OK\") {\r\n dispatch(setFetchState({ type: \"successful\", result: result.resDesc }));\r\n dispatch(invalidateTradingsData());\r\n return result.resDesc;\r\n } else {\r\n dispatch(setFetchState({ type: \"error\", errorCode: result?.resCode }));\r\n }\r\n};\r\n","import { NavigationItem } from \"../../../core/navigation/types\";\r\nimport TradingDataPage from \"./TradingDataPage\";\r\nimport { EditTradingDataPage } from \"./EditTradingDataPage\";\r\nimport { tradingDataLocation, editRouter } from \"./Locations\";\r\nexport const tradingDataComponents: NavigationItem[] = [\r\n {\r\n Component: TradingDataPage,\r\n isMenuItem: true,\r\n path: tradingDataLocation,\r\n },\r\n {\r\n Component: EditTradingDataPage,\r\n isMenuItem: false,\r\n path: editRouter,\r\n },\r\n];\r\n","import React from \"react\";\r\nimport { useEditTradingDataState } from \"../../../data/clearing/tradingData/hooks/useEditTradingDataState\";\r\nimport { useTradingDataValidator } from \"../../../data/clearing/tradingData/hooks/useTradingDataValidator\";\r\nimport { useTradingDataUpsert } from \"../../../data/clearing/tradingData/hooks/useTradingDataUpsert\";\r\nimport { RouteComponentProps, useHistory } from \"react-router-dom\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Card, Grid, CardHeader, Divider, CardContent } from \"@material-ui/core\";\r\nimport { FabSave } from \"../../components/common/FabSave\";\r\nimport { TradingData } from \"../../../data/clearing/tradingData/types\";\r\nimport { LeavePrompt } from \"../../components/common/LeavePrompt\";\r\nimport { Status } from \"../../../data/models\";\r\nimport { BoolInput } from \"../../components/common/BoolInput\";\r\nimport { tradingDataLocation } from \"./Locations\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { ProductSelect } from \"../../components/listing/ProductSelect\";\r\nimport { NumberInput } from \"../../components/common/NumberInput\";\r\nimport { DateInput } from \"../../components/common/DateInput\";\r\n\r\nexport interface EditTradingDataInfo {\r\n\tptdId?: string;\r\n}\r\n\r\nexport interface EditTradingDataProps extends RouteComponentProps {}\r\n\r\nexport const EditTradingDataPage: React.FunctionComponent = props => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst [tradingData, editTradingData, changed] = useEditTradingDataState(props.match.params.ptdId);\r\n\tconst [validationState, validate] = useTradingDataValidator();\r\n\tconst [fetchState, upsert] = useTradingDataUpsert();\r\n\tconst history = useHistory();\r\n\r\n\tconst unsavedChanges = fetchState.type === \"not-started\" && changed;\r\n\r\n\tconst handleChange = React.useCallback(\r\n\t\t(event: React.ChangeEvent) => {\r\n\t\t\teditTradingData(event.target.name as any, event.target.value);\r\n\t\t},\r\n\t\t[editTradingData]\r\n\t);\r\n\r\n\tconst save = React.useCallback(() => {\r\n\t\tif (fetchState.type === \"successful\") {\r\n\t\t\thistory.push(tradingDataLocation);\r\n\t\t} else if (fetchState.type !== \"started\") {\r\n\t\t\tconst normalized = validate(tradingData);\r\n\r\n\t\t\tif (normalized) {\r\n\t\t\t\tupsert(normalized);\r\n\t\t\t}\r\n\t\t}\r\n\t}, [tradingData, validate, fetchState, history, upsert]);\r\n\r\n\tconst pageTitle = tradingData && tradingData.ptdId ? \"tradingDataEdit\" : \"tradingDataEdit\";\r\n\r\n\tif (!tradingData) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\treturn (\r\n\t\t\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\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 editTradingData(\"tradingDate\", date)}\r\n\t\t\t\t\t\t\t\t\terror={validationState.tradingDate !== undefined && !validationState.tradingDate}\r\n\t\t\t\t\t\t\t\t\trequired={validationState.tradingDate !== undefined}\r\n\t\t\t\t\t\t\t\t\tdisabled={!!tradingData.ptdId}\r\n\t\t\t\t\t\t\t\t\tdisableFuture\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\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 product.prodId === tradingData.productId}\r\n\t\t\t\t\t\t\t\t\tonChangeItem={product => {\r\n\t\t\t\t\t\t\t\t\t\teditTradingData(\"productId\", product ? product.prodId : undefined);\r\n\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\trequired={validationState.productId !== undefined}\r\n\t\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\t\tvalidationState.productId !== undefined && !validationState.productId\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tdisabled={!!tradingData.ptdId}\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\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\tproperty=\"refPrice\"\r\n\t\t\t\t\t\t\t\t\t\titem={tradingData}\r\n\t\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\t\tlabel={getString(\"tradingDataRefPrice\")}\r\n\t\t\t\t\t\t\t\t\t\tmoney\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\r\n\t\t\t\t\t\t\r\n\r\n\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\t);\r\n};\r\n\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { MarginsData } from \"../types\";\r\n\r\nexport const getMarginsDataApi = (userId: string, mrgid: string) =>\r\n webApi({\r\n method: \"GET\",\r\n url: \"clearing/getmarginsdata\",\r\n params: {\r\n userId,\r\n mrgid,\r\n },\r\n });\r\n\r\nexport default getMarginsDataApi;\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getMarginsgDataApi from \"../api/getMarginsData\";\r\nimport { setDisplayed } from \"../marginsDataSlice\";\r\nimport { MarginsData } from \"../types\";\r\n\r\nexport const loadMarginsgData = (mrgId: string): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n dispatch(setDisplayed());\r\n\r\n const marginsData = await dispatch(getMarginsData(mrgId));\r\n\r\n dispatch(setDisplayed(marginsData));\r\n};\r\n\r\nexport const getMarginsData = (\r\n prodId: string\r\n): ThunkType> => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { userId } = store.data.auth.current.user;\r\n return await dispatch(getMarginsgDataApi(userId, prodId));\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { MarginsData } from \"../types\";\r\nimport { loadMarginsgData } from \"../thunks/loadMarginsData\";\r\n\r\nexport const useDisplayMarginsData = (mrgId?: string) => {\r\n const storeMarginsData = useSelector(\r\n (store) => store.data.clearing.marginsData.displayedMarginsgData\r\n );\r\n\r\n const displayedMarginsData =\r\n storeMarginsData && storeMarginsData.mrgId === mrgId ? storeMarginsData : undefined;\r\n\r\n const displatch = useDispatch();\r\n\r\n React.useEffect(() => {\r\n if (mrgId) {\r\n displatch(loadMarginsgData(mrgId));\r\n }\r\n }, [displatch, mrgId]);\r\n\r\n return displayedMarginsData;\r\n};\r\n","import React from \"react\";\r\nimport { MarginsData } from \"../../../data/clearing/marginsData/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { useDisplaySingleEmementStyles } from \"../../useDisplaySingleEmementStyles\";\r\nimport { DisplayBoolNumber } from \"../../components/common/DisplayBoolNumber\";\r\nimport { Status } from \"../../../data/models\";\r\nimport { useOrderSideOptionsTranslator } from \"../../../data/trading/orders/hooks/useOrderSideOptions\";\r\n\r\nexport interface DisplayMarginsDataMainAttributesProps {\r\n marginsData: MarginsData;\r\n}\r\n\r\nexport const DisplayMarginsDataMainAttributes: React.FunctionComponent = ({\r\n marginsData,\r\n}) => {\r\n const style = useDisplaySingleEmementStyles();\r\n const { getString, getDateString, getFormatedNumberString } = React.useContext(LocalizationContext);\r\n\tconst sideTranslator = useOrderSideOptionsTranslator();\r\n\r\n return (\r\n
\r\n
\r\n {getString(\"marginsDataCalcDate\")}\r\n {getDateString(marginsData.calcDate)}\r\n
\r\n
\r\n {getString(\"marginsDataTradeNo\")}\r\n {marginsData.tradeNo}\r\n
\r\n
\r\n {getString(\"marginsDataTradeDate\")}\r\n {getDateString(marginsData.tradeDate)}\r\n
\r\n
\r\n {getString(\"marginsDataSide\")}\r\n\t\t\t\t{sideTranslator(marginsData.side)} \r\n
\r\n
\r\n {getString(\"marginsDataClientIdNo\")}\r\n {marginsData.clientIdNo}\r\n
\r\n
\r\n {getString(\"marginsDataClientName\")}\r\n {marginsData.clientName}\r\n
\r\n
\r\n {getString(\"marginsDataProductCode\")}\r\n {marginsData.productCode}\r\n
\r\n
\r\n {getString(\"marginsDataProductName\")}\r\n {marginsData.productName}\r\n
\r\n
\r\n {getString(\"marginsDataContrPrice\")}\r\n {getFormatedNumberString(marginsData.contrPrice, true)}\r\n
\r\n
\r\n {getString(\"marginsDataContrValue\")}\r\n {getFormatedNumberString(marginsData.contrValue, true)}\r\n
\r\n
\r\n {getString(\"marginsDataGainLoss\")}\r\n {getFormatedNumberString(marginsData.gainLoss, true)}\r\n
\r\n
\r\n {getString(\"marginsDataMarginReq\")}\r\n {getFormatedNumberString(marginsData.marginReq, true)}\r\n
\r\n
\r\n {getString(\"marginsDataMarginCall\")}\r\n {getFormatedNumberString(marginsData.marginCall, true)}\r\n
\r\n
\r\n {getString(\"marginsDataMarginBal\")}\r\n {getFormatedNumberString(marginsData.marginBal, true)}\r\n
\r\n
\r\n {getString(\"marginsDataBalPlusGL\")}\r\n {getFormatedNumberString(marginsData.marginBalPlusGL, true)}\r\n
\r\n
\r\n {getString(\"marginsDataCoverPerc\")}\r\n {getFormatedNumberString(marginsData.marginCoverPerc, true)}\r\n
\r\n
\r\n\t\t\t\t{getString(\"marginsDataMaintTriggered\")}\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t
\r\n
\r\n );\r\n};\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const printMargins = (user: User, mrgid: string) => {\r\n\treturn httpWebApi({\r\n\t\tmethod: \"GET\",\r\n\t\tresponseType: \"blob\",\r\n\t\ttimeout: 60 * 4 * 1000,\r\n\t\turl: \"reporting/getmarginscalcreport\",\r\n\t\tparams: {\r\n\t\t\tuserid: user.userId,\r\n\t\t\tmrgid,\r\n\t\t},\r\n\t});\r\n};\r\n\r\nexport default printMargins;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { printMarginsThunk } from \"../thunks/printMarginsThunk\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { MarginsData } from \"../types\";\r\nimport { setPrintMarginsFetchState } from \"../marginsDataSlice\";\r\n\r\nexport const useMarginsPrinter = (payment?: MarginsData) => {\r\n\tconst fetchState = useSelector(\r\n\t\ts => s.data.clearing.marginsData.printReportFetchState\r\n\t);\r\n\tconst dispatch = useDispatch();\r\n\r\n\tconst download = React.useCallback(() => {\r\n\t\t\tdispatch(printMarginsThunk(payment));\r\n\t}, [dispatch,payment ]);\r\n\r\n\tconst dispatchSetFetch = React.useCallback(() => { // Ovo da prvo izađe customDialog box\r\n\t\tdispatch(setPrintMarginsFetchState({ type: \"started\" }))\r\n\t},\t[dispatch] );\r\n\t\r\n\treturn [download, fetchState, dispatchSetFetch] as [typeof download, typeof fetchState, typeof dispatchSetFetch];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { printMargins } from \"../api/printMargins\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setPrintMarginsFetchState } from \"../marginsDataSlice\";\r\nimport { MarginsData } from \"../types\";\r\n\r\n\r\nexport const printMarginsThunk = (margins?: MarginsData): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\" || !margins || !margins.mrgId) {\r\n\t\treturn undefined;\r\n\t}\r\n\tconst lan = store.ux.localization.language\r\n\tconst filename = `MarginsData_${margins.mrgId}.pdf`\r\n\tconst user = store.data.auth.current.user;\r\n\tdispatch(setPrintMarginsFetchState({ type: \"started\" }));\r\n\tconst marginReport = await dispatch(printMargins(user, margins.mrgId));\r\n\tif (marginReport) {\r\n\t\tfileDownload(new Blob([marginReport as any], { type: \"application/pdf\" }), filename);\r\n\t}\r\n\tdispatch(setPrintMarginsFetchState({ type: \"not-started\" }));\r\n};\r\n","import React from \"react\";\r\nimport { useDisplayMarginsData } from \"../../../data/clearing/marginsData/hooks/useDisplayMarginsData\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { MarginsData } from \"../../../data/clearing/marginsData/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { DisplayMarginsDataMainAttributes } from \"./DisplayMarginsDataMainAttributes\";\r\nimport {\r\n ExpansionPanel,\r\n ExpansionPanelSummary,\r\n Typography,\r\n Grid,IconButton,\r\n} from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport { useMarginsPrinter } from \"../../../data/clearing/marginsData/hooks/useMarginsPrinter\";\r\n\r\nexport interface DisplayMarginsDataProps {\r\n id?: string;\r\n}\r\n\r\nexport const DisplayMarginsData: React.FunctionComponent = ({\r\n id,\r\n}) => {\r\n const marginsData = useDisplayMarginsData(id);\r\n const { getString } = React.useContext(LocalizationContext);\r\n\tconst [download, fetchState, setfetch] = useMarginsPrinter(marginsData);\r\n\r\n return !marginsData ? (\r\n <>{\"loading placeholder\"}\r\n ) : (\r\n \r\n \r\n \r\n \r\n \r\n {getString(\"tableBasciInfo\")}\r\n \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\r\n\t\t\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\r\n { fetchState.type !== \"not-started\" ? getString(\"pleaseWait\") : null }\r\n\t\t\t\t\t\t\t\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const useViewMarginsData = () => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n return React.useCallback(\r\n (marginsData: MarginsData) =>\r\n showWithDrawer(),\r\n [showWithDrawer]\r\n );\r\n};\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport ViewIcon from \"@material-ui/icons/InputOutlined\";\r\nimport EditIcon from \"@material-ui/icons/EditOutlined\";\r\nimport { MarginsData } from \"../../../data/clearing/marginsData/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { MaterialTableProps } from \"material-table\";\r\nimport { useViewMarginsData } from \"./DisplayMarginsData\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { getMarginsDataEditLocation } from \"../marginsData/Locations\";\r\nimport { DisplayMarginsDataMainAttributes } from \"../marginsData/DisplayMarginsDataMainAttributes\";\r\n\r\nexport function useMarginsDataActions() {\r\n const { getString } = useContext(LocalizationContext);\r\n const onShowMarginsData = useViewMarginsData();\r\n\r\n return useMemo(() => {\r\n const result: MaterialTableProps[\"actions\"] = [\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"orderActView\"),\r\n onClick: (event, rowData) => onShowMarginsData(rowData as MarginsData),\r\n },\r\n ];\r\n return result;\r\n }, [onShowMarginsData, getString]);\r\n}\r\n\r\n","import { MarginsData } from \"../../../data/clearing/marginsData/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\nimport { DisplayBoolNumber } from \"../../components/common/DisplayBoolNumber\";\r\nimport { Status } from \"../../../data/models\";\r\n\r\nexport const useMarginsDataColumns = () => {\r\n const { getString, getDateString, getFormatedNumberString } = React.useContext(LocalizationContext);\r\n\r\n return React.useMemo(\r\n () => [\r\n {\r\n title: getString(\"marginsDataCalcDate\"),\r\n render: (marginsData) => getDateString(marginsData.calcDate, \"DD.MM.YYYY\"),\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"marginsDataTradeNo\"),\r\n field: \"tradeNo\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"marginsDataClientName\"),\r\n field: \"clientName\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"marginsDataProductName\"),\r\n field: \"productName\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"marginsDataContrValue\"),\r\n render: (marginsData) => getFormatedNumberString(marginsData.contrValue, true),\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"marginsDataGainLoss\"),\r\n render: (marginsData) => getFormatedNumberString(marginsData.gainLoss, true),\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"marginsDataMarginReq\"),\r\n render: (marginsData) => getFormatedNumberString(marginsData.marginReq, true),\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"marginsDataMarginCall\"),\r\n render: (marginsData) => getFormatedNumberString(marginsData.marginCall, true),\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"marginsDataMaintTriggered\"),\r\n\t\t\t\trender: marginsData => ,\r\n\t\t\t\tcustomSort: (a, b) => a.maintTriggered - b.maintTriggered,\r\n\t\t\t\twidth: \"80px\",\r\n\t\t\t},\r\n],\r\n [getString, getFormatedNumberString, getDateString]\r\n ) as Column[];\r\n};\r\n","import { ProductList } from \"../../listing/products/types\";\r\nimport { ClientListData } from \"../../listing/clients/types\";\r\nimport { TradeStatus } from \"../../models\";\r\nimport { OrderMarkt, OrderAttribute } from \"../orders/types\";\r\nimport { DeliveryStatuses } from \"../../../data/models\";\r\n\r\nexport interface TradeList {\r\n\ttradeId: string;\r\n\ttradeNo: string; // Broj zaključnice\r\n\ttradeTime: Date; // datum/vreme prometa\r\n\ttranIdSell: string; //\r\n\ttranNoSell: string;\r\n\torderNoSell: string;\r\n\tclientIdNoSell: string;\r\n\tclientNameSell: string;\r\n\ttranIdBuy: string; //\r\n\ttranNoBuy: string;\r\n\torderNoBuy: string;\r\n\tclientIdNoBuy: string;\r\n\tclientNameBuy: string;\r\n\tprodID: string;\r\n\tprodCode: string;\r\n\tprodName: string;\r\n\tqty: number;\r\n\tunit: number;\r\n\tunitDescr: string;\r\n\tprice: number;\r\n\tvatPerc: number;\r\n\tpriceWithVat: number;\r\n\tamt: number; // ovo nadole treba obrisati\r\n\tamtWithVat: number;\r\n\tstatus: number;\r\n\tstatusDescr: string;\r\n\tmarket: OrderMarkt;\r\n\tfulfillmentDate: Date;\r\n\tstartDeliveryDate: Date;\r\n\ttransCostSell: number; //\ttrosak transporta prodavca\r\n\tstorCostSell: number; //\ttrosak skladistenja prodavca\r\n\tcommPercSell: number; //\t% provizije prodavca\r\n\tcommAmtSell: number; //\t iznos provizije prodavca\r\n\ttransCostBuy: number; //\tisto za kupca\r\n\tstorCostBuy: number; \r\n\tcommPercBuy: number; \r\n\tcommAmtBuy: number; \r\n\tdeliveryWhsId: string;\r\n\tdeliveryWhsName: string;\r\n\tpayTypeId: string;\r\n\tpayTypeDescr: string;\r\n\tuserIsEmployee?: number; \r\n\ttradeLogList?: TradeLogData[];\r\n\torderAttrList?: OrderAttribute[];\r\n\torderAttributes?:string;\r\n\tdistrictName ?:string;\r\n\tquality?:string;\r\n\t// totNoOfRows: number;\r\n}\r\nexport interface GetTradesParams {\r\n\tuserid: string;\r\n\tprodid?: string;\r\n\tstatus?: number;\r\n\tdatefrom?: string;\r\n\tdateto?: string;\r\n\tfromrow?: number;\r\n\tnumofrows?: number;\r\n\tcliid?: string;\r\n\tdelivstatus?: number;\r\n\tmarket?: OrderMarkt;\r\n\tallTrades?: string;\r\n\tclientid?: string;\r\n\tclient2id?:string;\r\n}\r\n\r\n\r\nexport interface TradeFilter {\r\n\tproduct?: ProductList;\r\n\ttradeStatus?: TradeStatus;\r\n\tdatefrom?: string;\r\n\tdateto?: string;\r\n\tdelivstatus?: DeliveryStatuses;\r\n\tmarket?: OrderMarkt;\r\n\tclient?: ClientListData;\r\n}\r\n\r\nexport enum MarketFilter {\r\n\tForward = \"F\",\r\n\tSpot = \"S\",\r\n}\r\n\r\nexport interface TradeSimpleFilter {\r\n\tprodId?: string;\r\n\tmarket?: MarketFilter;\r\n}\r\n\r\nexport interface TradesSimpleData {\r\n\tordData: string;\r\n\tordId: string;\r\n}\r\n\r\nexport interface TradesSimpleDataTrade {\r\n\ttradeData: string;\r\n\ttradeId: string;\r\n}\r\n\r\nexport interface TradesSimpleListData {\r\n\ttradeId: string;\r\n\ttradeData: string;\r\n\tseller: string;\r\n\tsellerId: string;\r\n\tbuyer: string;\r\n\tbuyerId: string;\r\n\tproduct: string;\r\n\tproductId: string;\r\n\tprice:number;\r\n\tunit: string;\r\n\tunitDescr: string;\r\n}\r\n\r\nexport interface TradeLogData {\r\n\tchangeTime?: Date; \r\n\tuserName?: string; \r\n\tactivity?: string; \r\n\tstatus?: string; \r\n}\r\n","import React from \"react\";\r\nimport { Grid, Paper, Button } from \"@material-ui/core\";\r\nimport { DateInput } from \"../../components/common/DateInput\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { MarginsDataFilter } from \"../../../data/clearing/marginsData/types\";\r\nimport { useAuth } from \"../../../data/auth/hooks\";\r\nimport { MarginsDataFilterChipsComponent } from \"./MarginsDataFilterChips\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { isValidDate } from \"../../../core/util/functions\";\r\nimport { FiltredSimpleTradesSelect } from \"../../components/trading/FiltredSimpleOrdersSelect\";\r\nimport { MarketFilter } from \"../../../data/trading/trades/types\";\r\nimport { ClientSelect } from \"../../components/listing/ClientSelect\";\r\nimport { FiltredTransactionsSelect } from \"../../components/trading/FiltredTransactionsSelect\";\r\n\r\nexport enum MarginsDataFilterEditorType {\r\n\tBasic,\r\n\tExtended,\r\n}\r\n\r\ninterface MarginsDataFilterEditorProps {\r\n\tfilter?: MarginsDataFilter;\r\n\teditFilter: (prop: keyof MarginsDataFilter, value: any) => void;\r\n\tsave: () => void;\r\n\ttype: MarginsDataFilterEditorType;\r\n\treset?: () => void;\r\n}\r\n\r\nexport const MarginsDataFilterEditor: React.FunctionComponent = ({\r\n\tfilter,\r\n\teditFilter,\r\n\tsave,\r\n\ttype,\r\n\treset,\r\n}) => {\r\n\tconst showWithDrawer = React.useContext(DisplayDrawerContext);\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst [auth] = useAuth();\r\n\r\n\tif (!filter) {\r\n\t\treturn null;\r\n\t}\r\n\treturn (\r\n\t\t\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\t\r\n\t\t\t\t\t\t\t\teditFilter(\"datefrom\", isValidDate(date) ? date.toISOString() : undefined)\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\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\teditFilter(\"dateto\", isValidDate(date) ? date.toISOString() : undefined)\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\r\n\t\t\t\t\r\n\t client.cliId === filter?.client?.cliId}\r\n \t onChangeItem={(client) =>\r\n \t editFilter(\"client\", client)\r\n \t \t}\r\n \t/>\r\n \t \r\n\r\n\t\t\t\t\r\n\t\t\t\t\t trade.tradeId === filter.trade?.tradeId}\r\n\t\t\t\t\t\tonChangeItem={trade => {\r\n\t\t\t\t\t\t\teditFilter(\"trade\", trade);\r\n\t\t\t\t\t\t}}\r\n\t\t\t\t\t/>\r\n\t\t\t\t \r\n\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\tsave();\r\n\t\t\t\t\t\t\t\tshowWithDrawer(undefined);\r\n\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t{getString(\"orderFilterConfirm\")}\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};\r\n\r\nexport const MarginsDataFilterChips = MarginsDataFilterChipsComponent;\r\n","import React from \"react\";\r\nimport { MarginsData } from \"../../../data/clearing/marginsData/types\";\r\nimport {\r\n PaginationTable,\r\n PaginationDataProps,\r\n} from \"../../components/common/PagginationTable\";\r\nimport { useMarginsDataActions } from \"./useMarginsDataActions\";\r\nimport { useMarginsDataColumns } from \"./useMarginsDataColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\n\r\nexport interface MarginsDataTableProps {\r\n userAccessRights: AccessRights;\r\n getData: () => void;\r\n}\r\n\r\ntype MarginsDataTablePropsType = MarginsDataTableProps &\r\n PaginationDataProps;\r\n\r\nconst MarginsDataTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n getData,\r\n ...tableProps\r\n}) => {\r\n const actions = useMarginsDataActions();\r\n const columns = useMarginsDataColumns();\r\n \r\n return (\r\n \r\n {...tableProps}\r\n getData={getData}\r\n // immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n actions={actions}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default MarginsDataTable;\r\n","import { MarginsDataFilter } from \"../types\";\r\nimport { MarginsData, GetMarginsDataParams } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nconst getMarginsDataWebApi = (\r\n user: User,\r\n page: number,\r\n itemsPerPage: number,\r\n filter: MarginsDataFilter\r\n) => {\r\n const params: GetMarginsDataParams = {\r\n userid: user.userId,\r\n fromrow: page * itemsPerPage,\r\n numofrows: itemsPerPage,\r\n tradeid: filter.trade?.tradeId,\r\n cliid: filter.client?.cliId,\r\n datefrom: getParamsDateString(filter.datefrom),\r\n dateto: getParamsDateString(filter.dateto),\r\n };\r\n\r\n return webApiWithResponse({\r\n method: \"GET\",\r\n url: \"clearing/getmarginsdatalist\",\r\n params,\r\n });\r\n};\r\n\r\nexport default getMarginsDataWebApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadAllMarginsgData } from \"../thunks/loadAllMarginsData\";\r\nimport { MarginsData } from \"../types\";\r\nimport { PageData } from \"../../../models\";\r\n\r\nexport const useMarginsDataData = () => {\r\n const pageData = useSelector<\r\n StoreType,\r\n PageData | undefined\r\n >((s) => s.data.clearing.marginsData.currentPage);\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadMarginsDataPage = React.useCallback(\r\n () => dispatch(loadAllMarginsgData()),\r\n [dispatch]\r\n );\r\n\r\n return [pageData, dispatchLoadMarginsDataPage] as [\r\n typeof pageData,\r\n typeof dispatchLoadMarginsDataPage\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { setMarginsData, invalidateMarginssData } from \"../marginsDataSlice\";\r\nimport { setMarginsDateIndex } from \"../marginsUXSlice\";\r\nimport getMarginsDataWebApi from \"../api/getAllMarginsData\";\r\nimport { PageIndex, PageDataStatus } from \"../../../models\";\r\n\r\nexport const loadAllMarginsgData = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n const { pageNumber, itemsPerPage } = store.ux.clearing.marginsData.index;\r\n const { filter } = store.ux.clearing.marginsData;\r\n const user = store.data.auth.current.user;\r\n\r\n const marginsDataResponse = await dispatch(\r\n getMarginsDataWebApi(user, pageNumber, itemsPerPage, filter)\r\n );\r\n\r\n if (!marginsDataResponse || marginsDataResponse.resCode !== \"OK\") {\r\n return;\r\n }\r\n\r\n const marginData = {\r\n currentPageData: marginsDataResponse.obj,\r\n totalCount: Number(marginsDataResponse.resDesc) || 0,\r\n status: PageDataStatus.DataCurrent,\r\n };\r\n\r\n dispatch(setMarginsData(marginData));\r\n};\r\n\r\nexport const setMarginsDataIndexThunk = (index: PageIndex): ThunkType => (\r\n dispatch\r\n) => {\r\n dispatch(setMarginsDateIndex(index));\r\n dispatch(invalidateMarginssData());\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { resetMarginsDateIdices } from \"../marginsUXSlice\";\r\nimport { PageIndex } from \"../../../models\";\r\nimport { setMarginsDataIndexThunk } from \"../thunks/loadAllMarginsData\";\r\n\r\nexport const useMarginsDataIndex = () => {\r\n const pageIndex = useSelector(\r\n (s) => s.ux.clearing.marginsData.index\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetIndex = React.useCallback(\r\n (index: PageIndex) => dispatch(setMarginsDataIndexThunk(index)),\r\n [dispatch]\r\n );\r\n const dispatchResetIndex = React.useCallback(\r\n () => dispatch(resetMarginsDateIdices()),\r\n [dispatch]\r\n );\r\n\r\n return [pageIndex, dispatchSetIndex, dispatchResetIndex] as [\r\n typeof pageIndex,\r\n typeof dispatchSetIndex,\r\n typeof dispatchResetIndex\r\n ];\r\n};\r\n","import { useCopiedState } from \"../../../../core/util/hooks\";\r\nimport { setFilter, removeFilter, initialState, setReportData} from \"../marginsUXSlice\";\r\nimport { invalidateMarginssData } from \"../marginsDataSlice\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport React from \"react\";\r\nimport { MarginsDataFilter } from \"../types\";\r\n\r\nexport const useMarginsDataFilter = () => {\r\n const [storeFilter] = useCurrentMarginsDataFilter();\r\n const [filter, editFilter, changeState, setCurrentFilter] = useCopiedState<\r\n MarginsDataFilter\r\n >(storeFilter);\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetFilter = React.useCallback(() => {\r\n dispatch(setFilter(filter!));\r\n dispatch(invalidateMarginssData());\r\n }, [dispatch, filter]);\r\n\r\n const dispatchResetFilter = React.useCallback(() => {\r\n setCurrentFilter(initialState.filter);\r\n }, [setCurrentFilter]);\r\n\r\n return [\r\n filter,\r\n editFilter,\r\n dispatchSetFilter,\r\n changeState,\r\n dispatchResetFilter,\r\n ] as [\r\n typeof filter,\r\n typeof editFilter,\r\n typeof dispatchSetFilter,\r\n typeof changeState,\r\n typeof dispatchResetFilter\r\n ];\r\n};\r\n\r\nexport const useCurrentMarginsDataFilter = () => {\r\n const filter = useSelector(\r\n (store) => store.ux.clearing.marginsData.filter\r\n );\r\n const dispatch = useDispatch();\r\n const dispatchRemoveFilter = React.useCallback(\r\n (type: keyof MarginsDataFilter) => {\r\n dispatch(removeFilter(type));\r\n dispatch(invalidateMarginssData());\r\n },\r\n [dispatch]\r\n );\r\n\tconst dispatchSetReportDate = React.useCallback(\r\n\t\t(reportDate: string) => {\r\n\t\t\tdispatch(setReportData(reportDate));\r\n\t\t\tdispatch(invalidateMarginssData());\r\n\t\t},\r\n\t\t[dispatch]\r\n\t);\r\n\r\n return [filter, dispatchRemoveFilter, dispatchSetReportDate] as [\r\n typeof filter,\r\n typeof dispatchRemoveFilter,\r\n typeof dispatchSetReportDate\r\n ];\r\n};\r\n","import { TradesSimpleData, TradeSimpleFilter } from \"../types\";\r\nimport { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const getTradesSimpleData = (userId: string, filter: TradeSimpleFilter) => {\r\n\treturn webApiWithResponse({\r\n\t\tmethod: \"GET\",\r\n\t\turl: \"trade/gettradesimplelist\",\r\n\t\tparams: {\r\n\t\t\tuserid: userId,\r\n\t\t\tmarket: filter.market,\r\n\t\t\tprodid: filter.prodId,\r\n\t\t},\r\n\t});\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getTradesSimpleData } from \"../api/getTradesSimpleData\";\r\nimport { TradeSimpleFilter, TradesSimpleData } from \"../types\";\r\n\r\nexport const getSimpleTradesThunk = (\r\n\tfilter: TradeSimpleFilter\r\n): ThunkType> => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst user = store.data.auth.current.user;\r\n\tconst ordersResponse = await dispatch(getTradesSimpleData(user.userId, filter));\r\n\r\n\tif (!ordersResponse || ordersResponse.resCode !== \"OK\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\treturn ordersResponse.obj;\r\n};\r\n","import React from \"react\";\r\nimport { AutocompleteSelect, AutocompleteSelectType } from \"../common/AutocompleteSelect\";\r\nimport { useSimpleTradesData } from \"../../../data/trading/trades/hooks/useSimpleTradesData\"\r\nimport { TradesSimpleData, TradeSimpleFilter, TradesSimpleDataTrade } from \"../../../data/trading/trades/types\"\r\n\r\ntype FiltredOrdersSelectPropsType = Omit, \"data\" | \"getLabel\"> & {\r\n\tfilter?: TradeSimpleFilter;\r\n};\r\n\r\nexport const FiltredSimpleTradesSelect: React.FunctionComponent = ({\r\n\tfilter,\r\n\t...otherProps\r\n}) => {\r\n\tconst [trades] = useSimpleTradesData(filter);\r\n\r\nconsole.log(filter)\r\nconsole.log(trades)\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t{...(otherProps as AutocompleteSelectType)}\r\n\t\t\tdata={trades || []}\r\n\t\t\tgetLabel={renderAttributeLabel}\r\n\t\t\tdisabled={filter === undefined}\r\n\t\t/>\r\n\t);\r\n};\r\n\r\nconst renderAttributeLabel = (order: TradesSimpleDataTrade) => order.tradeData;\r\n","import React from \"react\";\r\nimport { useDispatch } from \"react-redux\";\r\nimport { getSimpleTradesThunk } from \"../thunks/getSimpleTradesThunk\";\r\nimport { TradeSimpleFilter, TradesSimpleData, TradesSimpleDataTrade } from \"../types\";\r\n\r\nexport const useSimpleTradesData = (filter?: TradeSimpleFilter) => {\r\n\tconst dispatch = useDispatch();\r\n\tconst [trades, setTrades] = React.useState();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tconst loadOrders = async () => {\r\n\t\t\tif (filter) {\r\n\t\t\t\tconst loaded = ((await dispatch(getSimpleTradesThunk(filter))) as any) as TradesSimpleDataTrade[];\r\n\t\t\t\tsetTrades(loaded);\r\n\t\t\t}\r\n\t\t};\r\n\t\tif (!filter) {\r\n\t\t\tsetTrades(undefined);\r\n\t\t} else {\r\n\t\t\tloadOrders();\r\n\t\t}\r\n\t}, [filter, dispatch]);\r\n\r\n\treturn [trades] as [typeof trades];\r\n};\r\n","import React from \"react\";\r\nimport { Chip, Grid } from \"@material-ui/core\";\r\nimport { MarginsDataFilter } from \"../../../data/clearing/marginsData/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\n\r\nexport const MarginsDataFilterChipsComponent: React.FunctionComponent = ({\r\n filter,\r\n removeFilter,\r\n}) => {\r\n const { getDateString, getString } = React.useContext(LocalizationContext);\r\n \r\n return (\r\n \r\n {filter.datefrom && (\r\n \r\n removeFilter(\"datefrom\")}\r\n />\r\n \r\n )}\r\n {filter.dateto && (\r\n \r\n removeFilter(\"dateto\")}\r\n />\r\n \r\n )}\r\n {filter.trade && (\r\n \r\n removeFilter(\"trade\")}\r\n />\r\n \r\n )}\r\n {filter.client && (\r\n \r\n removeFilter(\"client\")}\r\n />\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\ninterface MarginsDataFilterChipsProps {\r\n filter: MarginsDataFilter;\r\n removeFilter: (type: keyof MarginsDataFilter) => void;\r\n}\r\n","import React from \"react\";\r\nimport FilterIcon from \"@material-ui/icons/FilterListOutlined\";\r\nimport { IconButton, Grid } from \"@material-ui/core\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport {\r\n\tuseMarginsDataFilter,\r\n\tuseCurrentMarginsDataFilter,\r\n} from \"../../../data/clearing/marginsData/hooks/useMarginsDataFilter\";\r\nimport {\r\n\tMarginsDataFilterEditor,\r\n\tMarginsDataFilterEditorType,\r\n\tMarginsDataFilterChips,\r\n} from \"../marginsData/MarginsDataFilterEditor\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\n\r\nexport const MarginsDataFilterButton: React.FunctionComponent = () => {\r\n\tconst showWithDrawer = React.useContext(DisplayDrawerContext);\r\n\tconst showFilter = React.useCallback(() => showWithDrawer(), [showWithDrawer]);\r\n\r\n\tconst [filter, removeFilter] = useCurrentMarginsDataFilter();\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\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\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};\r\n\r\nconst MarginDataFilterEditor: React.FunctionComponent = () => {\r\n\tconst [filter, editFilter, save, , rest] = useMarginsDataFilter();\r\n\treturn (\r\n\t\t\r\n\t);\r\n};\r\n","import { MarginsData, MarginsDataFilter } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\n// import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\n\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nconst getMarginsDataButton = (user: User, filter: MarginsDataFilter) => {\r\n return webApiWithResponse({\r\n method: \"PUT\",\r\n url: \"clearing/createmarginsdata\",\r\n params: {\r\n userid: user.userId,\r\n tradingdate: getParamsDateString(filter.reportDate),\r\n },\r\n });\r\n};\r\nexport default getMarginsDataButton;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadMarginsDataButton } from \"../thunks/loadMarginsDataButton\";\r\nimport { resetData } from \"../marginsDataSlice\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { MarginsData, MarginsDataFilter } from \"../types\";\r\nimport moment from \"moment\";\r\n\r\nvar tomorow = moment().add(1, \"day\").toDate();\r\n\r\nexport const useMarginsDataButton = () => {\r\n\tconst fetchState = useSelector(\r\n\t\ts => s.data.clearing.marginsData.fetchState\r\n\t);\r\n\r\n\tconst data = useSelector(\r\n\t\ts => s.data.clearing.marginsData.currentPage?.currentPageData\r\n\t);\r\n\r\n\tconst filter = useSelector(\r\n\t\ts => s.ux.clearing.marginsData.filter\r\n\t);\r\n \r\nconsole.log(filter?.reportDate)\r\n\r\n\tconst dateOk = filter?.datefrom === filter?.dateto\r\n \tconst reportDateOk = filter?.reportDate && moment(tomorow).isAfter(filter.reportDate);\r\n\r\n\t console.log(reportDateOk)\r\n\t console.log(data)\r\n\t console.log(dateOk)\r\n\r\n//\tconst hasData = (data !== undefined && data !== null && data.length > 0) || !dateOk || !reportDateOk;\r\n//\tconst hasData = !dateOk || !reportDateOk;\r\n\r\n\tconst hasData = true\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst download = React.useCallback(() => \r\n\t{dispatch(downloadMarginsDataButton());\r\n\t}, [dispatch]);\r\n\r\n\tconst dispatchResetData = React.useCallback(() => {\r\n\t\tdispatch(resetData());\r\n\t}, [dispatch]);\r\n\r\n\treturn [download, fetchState, dispatchResetData, hasData] as [\r\n\t\ttypeof download,\r\n\t\ttypeof fetchState,\r\n\t\ttypeof dispatchResetData,\r\n\t\ttypeof hasData\r\n\t];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getMarginsDataButton from \"../api/getMarginsDataButton\";\r\nimport { setFetchState, invalidateMarginssData } from \"../marginsDataSlice\";\r\n\r\nexport const downloadMarginsDataButton =\r\n (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.clearing.marginsData;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n\r\n const result = await dispatch(getMarginsDataButton(user, filter));\r\n\r\n if (result && result.resCode === \"OK\") {\r\n dispatch(setFetchState({ type: \"successful\" }));\r\n dispatch(invalidateMarginssData());\r\n } else {\r\n console.log(result);\r\n dispatch(\r\n setFetchState({ type: \"successful\", result: !result || result.resDesc })\r\n );\r\n dispatch(invalidateMarginssData());\r\n }\r\n };\r\n","import React from \"react\";\r\nimport { useMarginsDataButton } from \"../../../data/clearing/marginsData/hooks/useMarginsDataButton\";\r\nimport { Fab, IconButton } from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport DownloadIcon from \"@material-ui/icons/DoubleArrowOutlined\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { CustomDialog } from \"../../components/common/CustomDialog\";\r\n\r\nexport const MarginsDataButton: React.FunctionComponent = () => {\r\n\tconst [downloader, fetchState, resetData, hasData] = useMarginsDataButton();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst messageError = (fetchState.type === \"successful\" && fetchState.result) ? fetchState.result : \"\"\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport { Grid } from \"@material-ui/core\";\r\nimport { useCurrentMarginsDataFilter } from \"../../../data/clearing/marginsData/hooks/useMarginsDataFilter\";\r\nimport { DateInput } from \"../../components/common/DateInput\";\r\nimport { isValidDate } from \"../../../core/util/functions\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\n\r\nexport const MarginsDateInput: React.FunctionComponent = () => {\r\n\tconst [filter, ,setReportDate] = useCurrentMarginsDataFilter();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t {\r\n\t\t\t\t\t\tif (isValidDate(date)) {\r\n\t\t\t\t\t\t\tsetReportDate(date.toISOString());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}}\r\n\t\t\t\t\tdisableFuture\r\n\t\t\t\t/>\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { MarginsDataFilter } from \"../types\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nexport const getMarginsReport = (user: User, filter: MarginsDataFilter) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getmarginsreport\",\r\n params: {\r\n userid: user.userId,\r\n tradeid: filter.trade?.tradeId,\r\n cliid: filter.client?.cliId,\r\n datefrom: getParamsDateString(filter.datefrom),\r\n dateto: getParamsDateString(filter.dateto),\r\n },\r\n });\r\n};\r\n\r\nexport default getMarginsReport;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadMarginsReport } from \"../thunks/downloadReport\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useMarginsReportDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.clearing.marginsData.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadMarginsReport()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getMarginsReport } from \"../api/getMarginsReport\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../marginsDataSlice\";\r\n\r\nexport const downloadMarginsReport = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.clearing.marginsData;\r\n const user = store.data.auth.current.user;\r\n\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const ordersReport = await dispatch(getMarginsReport(user, filter));\r\n if (ordersReport) {\r\n fileDownload(\r\n new Blob([ordersReport as any], { type: \"application/pdf\" }),\r\n \"Margins.pdf\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { MarginsDataFilter } from \"../types\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nexport const getMarginsExcel = (user: User, filter: MarginsDataFilter) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getmarginsxls\",\r\n params: {\r\n userid: user.userId,\r\n tradeid: filter.trade?.tradeId,\r\n cliid: filter.client?.cliId,\r\n datefrom: getParamsDateString(filter.datefrom),\r\n dateto: getParamsDateString(filter.dateto),\r\n },\r\n });\r\n};\r\n\r\nexport default getMarginsExcel;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadMarginsExcel } from \"../thunks/downloadReportExcel\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useMarginsExcelDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) =>\r\n s.data.clearing.marginsData.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadMarginsExcel()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getMarginsExcel } from \"../api/getMarginsExcel\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../marginsDataSlice\";\r\n\r\nexport const downloadMarginsExcel = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.clearing.marginsData;\r\n const user = store.data.auth.current.user;\r\n\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const dailyTrading = await dispatch(getMarginsExcel(user, filter));\r\n if (dailyTrading) {\r\n fileDownload(\r\n new Blob([dailyTrading as any], {\r\n type: \"application/vnd.openxmlformat\",\r\n }),\r\n \"Margins.xlsx\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import React from \"react\";\r\nimport { useMarginsReportDownloader } from \"../../../data/clearing/marginsData/hooks/useMarginsReportDownloader\";\r\nimport { useMarginsExcelDownloader } from \"../../../data/clearing/marginsData/hooks/useMarginsExcelDownloader\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport ExcelIcon from \"@material-ui/icons/TableChartOutlined\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\n\r\nexport const DownloadButton: React.FunctionComponent = () => {\r\n\tconst [downloader, fetchState] = useMarginsReportDownloader();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\treturn (\r\n\t\t<>\r\n\t\t\t\r\n\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\t{fetchState.type !== \"not-started\" ? getString(\"pleaseWait\") : null}\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport const DownloadExcelButton: React.FunctionComponent = () => {\r\n\tconst [downloader, fetchState] = useMarginsExcelDownloader();\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport { Grid, CardContent, CardHeader, Card, Divider } from \"@material-ui/core\";\r\nimport MarginsDataTable from \"./MarginsDataTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { PageComponent } from \"../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { useMarginsDataData } from \"../../../data/clearing/marginsData/hooks/useMarginsDataData\";\r\nimport { useMarginsDataIndex } from \"../../../data/clearing/marginsData/hooks/useMarginsDataIndex\";\r\nimport { PageDataStatus } from \"../../../data/models\";\r\nimport { MarginsDataFilterButton } from \"./MarginsDataFilter\";\r\nimport { MarginsDataButton } from \"./MarginsDataButton\";\r\nimport { MarginsDateInput } from \"./MarginsDateInput\";\r\nimport { DownloadButton, DownloadExcelButton } from \"./DownloadButton\";\r\n\r\nconst MarginsDataPage: PageComponent = ({ userAccessRights }) => {\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst [pageData, dispatchLoadMarginsData] = useMarginsDataData();\r\n\tconst [pageIndex, dispatchSetIndex] = useMarginsDataIndex();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (pageData && pageData.status === PageDataStatus.DataInvalidated) {\r\n\t\t\tdispatchLoadMarginsData();\r\n\t\t}\r\n\t}, [dispatchLoadMarginsData, pageData]);\r\n\r\n\treturn (\r\n\t\t<>\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\t}\r\n\t\t\t\t\t\t\taction={}\r\n\t\t\t\t\t\t/>\r\n\t\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\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport const MarginsDataActions: React.FunctionComponent = () => (\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n \t\t \r\n \t\r\n \t\r\n \t\t\r\n \t\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n);\r\n\r\nexport default MarginsDataPage;\r\n","import { NavigationItem } from \"../../../core/navigation/types\";\r\nimport MarginsDataPage from \"./MarginsDataPage\";\r\nimport { marginsDataLocation, editRouter } from \"./Locations\";\r\nexport const marginsDataComponents: NavigationItem[] = [\r\n {\r\n Component: MarginsDataPage,\r\n isMenuItem: true,\r\n path: marginsDataLocation,\r\n },\r\n];\r\n","import { getEditLocation } from \"../../../core/util/functions\";\r\nexport const marginsDataLocation = \"/cliring/marginscalculation\";\r\nexport const getMarginsDataEditLocation = (id?: string) =>\r\n getEditLocation(marginsDataLocation, undefined, id);\r\n\r\nexport const editRouter = getMarginsDataEditLocation(\":ptdId?\");\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { BankGuaranteeData } from \"../types\";\r\n\r\nexport const getBankGuaranteeApi = (userId: string, grntid: string) =>\r\n webApi({\r\n method: \"GET\",\r\n url: \"clearing/getbankgrnt\",\r\n params: {\r\n userId,\r\n grntid,\r\n },\r\n });\r\n\r\nexport default getBankGuaranteeApi;\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getBankGuaranteeApi from \"../api/getBankGuarantee\";\r\nimport { setDisplayed } from \"../bankguaranteesDataSlice\";\r\nimport { BankGuaranteeData } from \"../types\";\r\n\r\nexport const loadBankGuarantee = (grntId: string): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n dispatch(setDisplayed());\r\n\r\n const bankguarantee = await dispatch(getBankGuarantee(grntId));\r\n\r\n dispatch(setDisplayed(bankguarantee));\r\n};\r\n\r\nexport const getBankGuarantee = (\r\n grntId: string\r\n): ThunkType> => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { userId } = store.data.auth.current.user;\r\n return await dispatch(getBankGuaranteeApi(userId, grntId));\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { BankGuaranteeData } from \"../types\";\r\nimport { loadBankGuarantee } from \"../thunks/loadBankGuarantees\";\r\n\r\nexport const useDisplayBankGuarantee = (grntId?: string) => {\r\n const storeBankGuarantee = useSelector(\r\n (store) => store.data.clearing.bankguarantees.displayedBankGuarantee\r\n );\r\n\r\n const displayedBankGuarantee =\r\n storeBankGuarantee && storeBankGuarantee.grntId === grntId\r\n ? storeBankGuarantee\r\n : undefined;\r\n\r\n const displatch = useDispatch();\r\n\r\n React.useEffect(() => {\r\n if (grntId) {\r\n displatch(loadBankGuarantee(grntId));\r\n }\r\n }, [displatch, grntId]);\r\n\r\n return displayedBankGuarantee;\r\n};\r\n","import React from \"react\";\r\nimport { BankGuaranteeData } from \"../../../data/clearing/bankguarantees/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { useDisplaySingleEmementStyles } from \"../../useDisplaySingleEmementStyles\";\r\nimport { DisplayBoolNumber } from \"../../components/common/DisplayBoolNumber\";\r\nimport { Status } from \"../../../data/models\";\r\n\r\nexport interface DisplayBankGuaranteeMainAttributesProps {\r\n bankguarantee: BankGuaranteeData;\r\n}\r\n\r\nexport const DisplayBankGuaranteeMainAttributes: React.FunctionComponent = ({\r\n bankguarantee,\r\n}) => {\r\n const style = useDisplaySingleEmementStyles();\r\n const {\r\n getString,\r\n getDateString,\r\n getFormatedNumberString,\r\n } = React.useContext(LocalizationContext);\r\n\r\n\r\n return (\r\n
\r\n
\r\n {getString(\"grntNo\")}\r\n {bankguarantee.grntNo}\r\n
\r\n
\r\n {getString(\"grntDate\")}\r\n {getDateString(bankguarantee.grntDate)}\r\n
\r\n
\r\n {getString(\"grntBankCode\")}\r\n {bankguarantee.bankCode}\r\n
\r\n
\r\n {getString(\"grntBankName\")}\r\n {bankguarantee.bankName}\r\n
\r\n
\r\n {getString(\"grntClientCode\")}\r\n {bankguarantee.clientIdNo}\r\n
\r\n
\r\n {getString(\"grntClientName\")}\r\n {bankguarantee.clientName}\r\n
\r\n
\r\n {getString(\"grntAmount\")}\r\n \r\n {getFormatedNumberString(bankguarantee.amt, true)}\r\n \r\n
\r\n
\r\n {getString(\"grntCurrCode\")}\r\n {bankguarantee.currCode}\r\n
\r\n
\r\n {getString(\"grntExpiryDate\")}\r\n {getDateString(bankguarantee.expiryDate)}\r\n
\r\n
\r\n {getString(\"grntStatus\")}\r\n \r\n \r\n \r\n
\r\n
\r\n );\r\n};\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const printBankGuarantees = (user: User, grntid: string) => {\r\n\treturn httpWebApi({\r\n\t\tmethod: \"GET\",\r\n\t\tresponseType: \"blob\",\r\n\t\ttimeout: 60 * 4 * 1000,\r\n\t\turl: \"reporting/getbankguaranteeconfreport\",\r\n\t\tparams: {\r\n\t\t\tuserid: user.userId,\r\n\t\t\tgrntid,\r\n\t\t},\r\n\t});\r\n};\r\n\r\nexport default printBankGuarantees;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { printBankGuaranteesThunk } from \"../thunks/printBankGuaranteesThunk\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { BankGuaranteeData } from \"../types\";\r\nimport { setDownloadFetchState } from \"../bankguaranteesDataSlice\";\r\n\r\nexport const useBankGuaranteesPrinter = (bankguarantee?: BankGuaranteeData) => {\r\n\tconst fetchState = useSelector(\r\n\t\ts => s.data.clearing.bankguarantees.downloadReportFetchState\r\n\t);\r\n\tconst dispatch = useDispatch();\r\n\r\n\tconst download = React.useCallback(() => {\r\n\t\t\tdispatch(printBankGuaranteesThunk(bankguarantee));\r\n\t}, [dispatch,bankguarantee]);\r\n\r\n\tconst dispatchSetFetch = React.useCallback(() => { // Ovo da prvo izađe customDialog box\r\n\t\tdispatch(setDownloadFetchState({ type: \"started\" }))\r\n\t},\t[dispatch] );\r\n\t\r\n\treturn [download, fetchState, dispatchSetFetch] as [typeof download, typeof fetchState, typeof dispatchSetFetch];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { printBankGuarantees } from \"../api/printBankGuarantees\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setDownloadFetchState } from \"../bankguaranteesDataSlice\";\r\nimport { BankGuaranteeData } from \"../types\";\r\n\r\nexport const printBankGuaranteesThunk = (bankgurantee?: BankGuaranteeData): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\" || !bankgurantee || !bankgurantee.grntId) {\r\n\t\treturn undefined;\r\n\t}\r\n\tconst lan = store.ux.localization.language\r\n\tconst filename = `BankGuaranteeConf_${bankgurantee.grntId}.pdf`\r\n\tconst user = store.data.auth.current.user;\r\n\tdispatch(setDownloadFetchState({ type: \"started\" }));\r\n\tconst bankguaranteesReport = await dispatch(printBankGuarantees(user, bankgurantee.grntId));\r\n\tif (bankguaranteesReport) {\r\n\t\tfileDownload(new Blob([bankguaranteesReport as any], { type: \"application/pdf\" }), filename);\r\n\t}\r\n\tdispatch(setDownloadFetchState({ type: \"not-started\" }));\r\n};\r\n","import React from \"react\";\r\nimport { useDisplayBankGuarantee } from \"../../../data/clearing/bankguarantees/hooks/useDisplayBankGuarantees\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { BankGuaranteeData } from \"../../../data/clearing/bankguarantees/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { DisplayBankGuaranteeMainAttributes } from \"./DisplayBankGuaranteeMainAttributes\";\r\nimport { ExpansionPanel, ExpansionPanelSummary, Typography, Grid, IconButton} from \"@material-ui/core\";\r\nimport { useBankGuaranteesPrinter } from \"../../../data/clearing/bankguarantees/hooks/useBankGuaranteesPrinter\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\n\r\nexport interface DisplayBankGuaranteeProps {\r\n id?: string;\r\n}\r\n\r\nexport const DisplayBankGuarantee: React.FunctionComponent = ({\r\n id,\r\n}) => {\r\n const bankguarantee = useDisplayBankGuarantee(id);\r\n const { getString } = React.useContext(LocalizationContext);\r\n\tconst [download, fetchState, setfetch] = useBankGuaranteesPrinter(bankguarantee);\r\n\r\n return !bankguarantee ? (\r\n <>{\"loading placeholder\"}\r\n ) : (\r\n \r\n \r\n \r\n \r\n \r\n {getString(\"tableBasciInfo\")}\r\n \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\r\n\t\t\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\r\n { fetchState.type !== \"not-started\" ? getString(\"pleaseWait\") : null }\r\n\t\t\t\t\t\t\t\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const useViewBankGuarantee = () => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n return React.useCallback(\r\n (bankguarantee: BankGuaranteeData) =>\r\n showWithDrawer(),\r\n [showWithDrawer]\r\n );\r\n};\r\n","import { getEditLocation } from \"../../../core/util/functions\";\r\nexport const bankguaranteeLocation = \"/cliring/bankguarantees\";\r\nexport const getBankGuaranteeEditLocation = (id?: string) =>\r\n getEditLocation(bankguaranteeLocation, undefined, id);\r\n\r\nexport const editRouter = getBankGuaranteeEditLocation(\":grntId?\");\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const deleteBankGuaranteeApi = (userId: string, grntid: string) =>\r\n webApi({\r\n method: \"DELETE\",\r\n url: \"clearing/delbankgrnt\",\r\n params: {\r\n userId,\r\n grntid,\r\n },\r\n });\r\n\r\nexport default deleteBankGuaranteeApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { deleteBankGuarantee } from \"../thunks/deleteBankGuarantees\";\r\nimport { setFetchState } from \"../bankguaranteesDataSlice\";\r\n\r\nexport const useBankGuaranteeDelete = () => {\r\n const fetchState = useSelector(\r\n (store) => store.data.clearing.bankguarantees.cancelFetchState\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchDeleteBankGuarantee = React.useCallback(\r\n (id: string) => dispatch(deleteBankGuarantee(id)),\r\n [dispatch]\r\n );\r\n\r\n React.useEffect(() => {\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n }, [dispatch]);\r\n\r\n return [fetchState, dispatchDeleteBankGuarantee] as [\r\n typeof fetchState,\r\n typeof dispatchDeleteBankGuarantee\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport deleteBankGuaranteeApi from \"../api/deleteBankGuarantees\";\r\nimport { setFetchState, invalidateBankGuarantee } from \"../bankguaranteesDataSlice\";\r\n\r\nexport const deleteBankGuarantee = (grntId: string): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n dispatch(setFetchState({ type: \"started\" }));\r\n\r\n const { userId } = store.data.auth.current.user;\r\n const result = await dispatch(deleteBankGuaranteeApi(userId, grntId));\r\n\r\n dispatch(\r\n setFetchState(\r\n result !== undefined ? { type: \"successful\" } : { type: \"error\" }\r\n )\r\n );\r\n dispatch(invalidateBankGuarantee());\r\n};\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport ViewIcon from \"@material-ui/icons/InputOutlined\";\r\nimport EditIcon from \"@material-ui/icons/EditOutlined\";\r\nimport { BankGuaranteeData } from \"../../../data/clearing/bankguarantees/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { MaterialTableProps } from \"material-table\";\r\nimport { useViewBankGuarantee } from \"./DisplayBankGuarantee\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { getBankGuaranteeEditLocation } from \"../bankguarantees/Locations\";\r\nimport { useBankGuaranteeDelete } from \"../../../data/clearing/bankguarantees/hooks/useBankGuaranteeDelete\";\r\n\r\nexport function useBankGuaranteesActions() {\r\n const { getString } = useContext(LocalizationContext);\r\n const onShowBankGuarantee = useViewBankGuarantee();\r\n const onEditBankGuarantee = useEditBankGuaranteeAction();\r\n\r\n return useMemo(() => {\r\n const result: MaterialTableProps[\"actions\"] = [\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"grntActView\"),\r\n onClick: (event, rowData) =>\r\n onShowBankGuarantee(rowData as BankGuaranteeData),\r\n },\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"tableEdit\"),\r\n onClick: (event, rowData) =>\r\n onEditBankGuarantee(rowData as BankGuaranteeData),\r\n },\r\n ];\r\n return result;\r\n }, [onShowBankGuarantee, onEditBankGuarantee, getString]);\r\n}\r\n\r\nexport const useDeleteBankGuaranteeAction = () => {\r\n const [, deleteBankGuarantee] = useBankGuaranteeDelete();\r\n return React.useCallback(\r\n async (bankguarantees: BankGuaranteeData) => {\r\n if (bankguarantees.grntId) {\r\n await deleteBankGuarantee(bankguarantees.grntId);\r\n }\r\n },\r\n [deleteBankGuarantee]\r\n );\r\n};\r\n\r\nexport const useEditBankGuaranteeAction = () => {\r\n const history = useHistory();\r\n return React.useCallback(\r\n (bankguarantee: BankGuaranteeData) =>\r\n history.push(getBankGuaranteeEditLocation(bankguarantee.grntId)),\r\n [history]\r\n );\r\n};\r\n","import React from \"react\";\r\nimport { Grid, Paper, Button, Typography } from \"@material-ui/core\";\r\nimport { DateInput } from \"../../components/common/DateInput\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { BankGuaranteeFilter } from \"../../../data/clearing/bankguarantees/types\";\r\nimport { ClientSelect } from \"../../components/listing/ClientSelect\";\r\nimport { useAuth } from \"../../../data/auth/hooks\";\r\nimport { BankGuaranteesFilterChipsComponent } from \"./BankGuaranteesFilterChips\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { BankSelect } from \"../../components/common/BankSelect\";\r\n\r\nexport enum BankGuaranteeFilterEditorType {\r\n Basic,\r\n Extended,\r\n}\r\n\r\ninterface BankGuaranteeFilterEditorProps {\r\n filter?: BankGuaranteeFilter;\r\n editFilter: (prop: keyof BankGuaranteeFilter, value: any) => void;\r\n save: () => void;\r\n reset: () => void;\r\n type: BankGuaranteeFilterEditorType;\r\n}\r\n\r\nexport const BankGuaranteeFilterEditor: React.FunctionComponent = ({\r\n filter,\r\n editFilter,\r\n save,\r\n type,\r\n reset\r\n}) => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const { getString } = React.useContext(LocalizationContext);\r\n const [auth] = useAuth();\r\n\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n editFilter(\"datefrom\", date?.toISOString())}\r\n />\r\n \r\n \r\n editFilter(\"dateto\", date?.toISOString())}\r\n />\r\n \r\n \r\n client.cliId === filter?.client?.cliId}\r\n onChangeItem={(client) =>\r\n editFilter(\"client\", client)\r\n }\r\n />\r\n \r\n \r\n bank.bankId === filter?.bank?.bankId}\r\n onChangeItem={(bank) =>\r\n editFilter(\"bank\", bank)\r\n }\r\n />\r\n \r\n \r\n\r\n \r\n \r\n {\r\n save();\r\n showWithDrawer(undefined);\r\n }}\r\n >\r\n {getString(\"orderFilterConfirm\")}\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 BankGuaranteesFilterChips = BankGuaranteesFilterChipsComponent;\r\n","import React from \"react\";\r\nimport { BankGuaranteeData } from \"../../../data/clearing/bankguarantees/types\";\r\nimport {\r\n PaginationTable,\r\n PaginationDataProps,\r\n} from \"../../components/common/PagginationTable\";\r\nimport {\r\n useBankGuaranteesActions,\r\n useDeleteBankGuaranteeAction,\r\n} from \"./useBankGuaranteesActions\";\r\nimport { useBankGuaranteeColumns } from \"./useBankGuaranteesColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\n\r\nexport interface GuaranteeTableProps {\r\n userAccessRights: AccessRights;\r\n getData: () => void;\r\n}\r\n\r\ntype GuaranteeTablePropsType = GuaranteeTableProps &\r\n PaginationDataProps;\r\n\r\nconst BankGuaranteesTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n getData,\r\n ...tableProps\r\n}) => {\r\n const actions = useBankGuaranteesActions();\r\n const columns = useBankGuaranteeColumns();\r\n const onDeleteBankGuarantee = useDeleteBankGuaranteeAction();\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={getData}\r\n // immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n actions={actions}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n }}\r\n editable={{\r\n onRowDelete: onDeleteBankGuarantee,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default BankGuaranteesTable;\r\n","import { BankGuaranteeData } from \"../../../data/clearing/bankguarantees/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\n\r\nexport const useBankGuaranteeColumns = () => {\r\n const {\r\n getString,\r\n getDateString,\r\n getFormatedNumberString,\r\n } = React.useContext(LocalizationContext);\r\n\r\n\r\n return React.useMemo(\r\n () => [\r\n {\r\n title: getString(\"grntNo\"),\r\n field: \"grntNo\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"grntDate\"),\r\n render: (bankguarantee) => getDateString(bankguarantee.grntDate, \"DD.MM.YYYY\"),\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"grntClientCode\"),\r\n field: \"clientIdNo\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"grntClientName\"),\r\n field: \"clientName\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"grntBankCode\"),\r\n field: \"bankCode\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"grntBankName\"),\r\n field: \"bankName\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"grntExpiryDate\"),\r\n render: (bankguarantee) => getDateString(bankguarantee.expiryDate, \"DD.MM.YYYY\"),\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"grntAmount\"),\r\n render: (bankguarantee) => getFormatedNumberString(bankguarantee.amt, true),\r\n sorting: false,\r\n\t\t\t\twidth: \"140px\",\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\tmaxWidth: \"140px\",\r\n\t\t\t\t\tminWidth: \"140px\",\r\n\t\t\t\t\twidth: \"140px\",\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\tmaxWidth: \"140px\",\r\n\t\t\t\t\tminWidth: \"140px\",\r\n\t\t\t\t\twidth: \"140px\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n },\r\n {\r\n title: getString(\"grntCurrCode\"),\r\n field: \"currCode\",\r\n sorting: false,\r\n },\r\n ],\r\n [getString, getFormatedNumberString, getDateString]\r\n ) as Column[];\r\n};\r\n","import { BankGuaranteeFilter } from \"../types\";\r\nimport { BankGuaranteeData, GetBankGuaranteeParams } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nconst getBankGuaranteeWebApi = (\r\n user: User,\r\n page: number,\r\n itemsPerPage: number,\r\n filter: BankGuaranteeFilter\r\n) => {\r\n const params: GetBankGuaranteeParams = {\r\n userid: user.userId,\r\n fromrow: page * itemsPerPage,\r\n numofrows: itemsPerPage,\r\n cliid: filter?.client?.cliId,\r\n bankid: filter?.bank?.bankId,\r\n datefrom: getParamsDateString(filter.datefrom),\r\n dateto: getParamsDateString(filter.dateto),\r\n };\r\n\r\n return webApiWithResponse({\r\n method: \"GET\",\r\n url: \"clearing/getbankgrntlist\",\r\n params,\r\n });\r\n};\r\n\r\nexport default getBankGuaranteeWebApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadAllBankGuarantees } from \"../thunks/loadAllBankGuarantees\";\r\nimport { BankGuaranteeData } from \"../types\";\r\nimport { PageData } from \"../../../models\";\r\nimport { invalidateBankGuarantee } from \"../bankguaranteesDataSlice\";\r\n\r\nexport const useBankGuaranteeData = () => {\r\n const pageData = useSelector<\r\n StoreType,\r\n PageData | undefined\r\n >((s) => s.data.clearing.bankguarantees.currentPage);\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadBankGuaranteePage = React.useCallback(\r\n () => dispatch(loadAllBankGuarantees()),\r\n [dispatch]\r\n );\r\n\r\n const invalidate = React.useCallback(() => dispatch(invalidateBankGuarantee()), [dispatch]);\r\n\r\n return [pageData, dispatchLoadBankGuaranteePage, invalidate] as [\r\n typeof pageData,\r\n typeof dispatchLoadBankGuaranteePage,\r\n typeof invalidate,\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { setBankGuarantees, invalidateBankGuarantee } from \"../bankguaranteesDataSlice\";\r\nimport { setBankGuaranteeIndex } from \"../bankguaranteesUXSlice\";\r\nimport getBankGuarantees from \"../api/getBankGuarantees\";\r\nimport { PageIndex, PageDataStatus } from \"../../../models\";\r\n\r\nexport const loadAllBankGuarantees = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n const { pageNumber, itemsPerPage } = store.ux.clearing.bankguarantees.index;\r\n const { filter } = store.ux.clearing.bankguarantees;\r\n const user = store.data.auth.current.user;\r\n\r\n const bankguaranteesResponse = await dispatch(\r\n getBankGuarantees(user, pageNumber, itemsPerPage, filter)\r\n );\r\n\r\n if (!bankguaranteesResponse || bankguaranteesResponse.resCode !== \"OK\") {\r\n return;\r\n }\r\n\r\n const bankguarantees = {\r\n currentPageData: bankguaranteesResponse.obj,\r\n totalCount: Number(bankguaranteesResponse.resDesc) || 0,\r\n status: PageDataStatus.DataCurrent,\r\n };\r\n\r\n dispatch(setBankGuarantees(bankguarantees));\r\n};\r\n\r\nexport const setGuaranteesIndexThunk = (index: PageIndex): ThunkType => (\r\n dispatch\r\n) => {\r\n dispatch(setBankGuaranteeIndex(index));\r\n dispatch(invalidateBankGuarantee());\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { resetBankGuaranteeIdices } from \"../bankguaranteesUXSlice\";\r\nimport { PageIndex } from \"../../../models\";\r\nimport { setGuaranteesIndexThunk } from \"../thunks/loadAllBankGuarantees\";\r\n\r\nexport const useBankGuaranteeIndex = () => {\r\n const pageIndex = useSelector(\r\n (s) => s.ux.clearing.bankguarantees.index\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetIndex = React.useCallback(\r\n (index: PageIndex) => dispatch(setGuaranteesIndexThunk(index)),\r\n [dispatch]\r\n );\r\n const dispatchResetIndex = React.useCallback(\r\n () => dispatch(resetBankGuaranteeIdices()),\r\n [dispatch]\r\n );\r\n\r\n return [pageIndex, dispatchSetIndex, dispatchResetIndex] as [\r\n typeof pageIndex,\r\n typeof dispatchSetIndex,\r\n typeof dispatchResetIndex\r\n ];\r\n};\r\n","import { useCopiedState } from \"../../../../core/util/hooks\";\r\nimport { setFilter, removeFilter, initialState } from \"../bankguaranteesUXSlice\";\r\nimport { invalidateBankGuarantee } from \"../bankguaranteesDataSlice\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport React from \"react\";\r\nimport { BankGuaranteeFilter } from \"../types\";\r\n\r\nexport const useBankGuaranteeFilter = () => {\r\n\tconst [storeFilter] = useCurrentBankGuaranteeFilter();\r\n\tconst [filter, editFilter, changeState, setCurrentFilter] = useCopiedState(storeFilter);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchSetFilter = React.useCallback(() => {\r\n\t\tdispatch(setFilter(filter!));\r\n\t\tdispatch(invalidateBankGuarantee());\r\n\t}, [dispatch, filter]);\r\n\r\n\tconst dispatchResetFilter = React.useCallback(() => {\r\n\t\tsetCurrentFilter(initialState.filter);\r\n\t}, [setCurrentFilter]);\r\n\r\n\treturn [filter, editFilter, dispatchSetFilter, changeState, dispatchResetFilter] as [\r\n\t\ttypeof filter,\r\n\t\ttypeof editFilter,\r\n\t\ttypeof dispatchSetFilter,\r\n\t\ttypeof changeState,\r\n\t\ttypeof dispatchResetFilter\r\n\t];\r\n};\r\n\r\nexport const useCurrentBankGuaranteeFilter = () => {\r\n\tconst filter = useSelector(\r\n\t (store) => store.ux.clearing.bankguarantees.filter\r\n\t);\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchRemoveFilter = React.useCallback(\r\n\t (type: keyof BankGuaranteeFilter) => {\r\n\t\tdispatch(removeFilter(type));\r\n\t\tdispatch(invalidateBankGuarantee());\r\n\t },\r\n\t [dispatch]\r\n\t);\r\n \r\n\treturn [filter, dispatchRemoveFilter] as [\r\n\t typeof filter,\r\n\t typeof dispatchRemoveFilter\r\n\t];\r\n };\r\n ","import React from \"react\";\r\nimport { Grid, Paper, Button, Typography } from \"@material-ui/core\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { WeeklyTradingReportFilter } from \"../../../data/reports/weeklyTrade/types\";\r\nimport { useAuth } from \"../../../data/auth/hooks\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { StringInput } from \"../../components/common/StringInput\";\r\n\r\nexport enum WTRFilterEditorType {\r\n Basic,\r\n Extended,\r\n}\r\n\r\ninterface WTRFilterEditorProps {\r\n filter: WeeklyTradingReportFilter;\r\n editFilter: (prop: keyof WeeklyTradingReportFilter, value: any) => void;\r\n save: (numofweeks: number) => void;\r\n reset: () => void;\r\n type: WTRFilterEditorType;\r\n}\r\n\r\nexport const WTRFilterEditor: React.FunctionComponent = ({\r\n filter,\r\n editFilter,\r\n save,\r\n type,\r\n reset,\r\n}) => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const { getString } = React.useContext(LocalizationContext);\r\n const [auth] = useAuth();\r\n\r\n const handleChange = React.useCallback(\r\n (event: React.ChangeEvent) => {\r\n editFilter(event.target.name as any, Number(event.target.value));\r\n },\r\n [editFilter]\r\n );\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n type=\"number\"\r\n property=\"numofweeks\"\r\n item={filter}\r\n onChange={handleChange}\r\n label={getString(\"weeklyNumofWeeks\")}\r\n />\r\n \r\n\r\n \r\n \r\n {\r\n if (filter.numofweeks) {\r\n save(filter.numofweeks);\r\n }\r\n showWithDrawer(undefined);\r\n }}\r\n >\r\n {getString(\"orderFilterConfirm\")}\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport { Chip, Grid } from \"@material-ui/core\";\r\nimport { BankGuaranteeFilter } from \"../../../data/clearing/bankguarantees/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\n\r\nexport const BankGuaranteesFilterChipsComponent: React.FunctionComponent = ({\r\n filter,\r\n removeFilter,\r\n}) => {\r\n const { getDateString, getString } = React.useContext(LocalizationContext);\r\n return (\r\n \r\n {filter.datefrom && (\r\n \r\n removeFilter(\"datefrom\")}\r\n />\r\n \r\n )}\r\n {filter.dateto && (\r\n \r\n removeFilter(\"dateto\")}\r\n />\r\n \r\n )}\r\n {filter.client && (\r\n \r\n removeFilter(\"client\")}\r\n />\r\n \r\n )}\r\n {filter.bank && (\r\n \r\n removeFilter(\"bank\")}\r\n />\r\n \r\n )}\r\n {filter.status && filter.status.ftDescr !== \"\" && (\r\n \r\n removeFilter(\"status\")}\r\n />\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\ninterface BankGuaranteeFilterChipsProps {\r\n filter: BankGuaranteeFilter;\r\n removeFilter: (type: keyof BankGuaranteeFilter) => void;\r\n}\r\n","import React from \"react\";\r\nimport FilterIcon from \"@material-ui/icons/FilterListOutlined\";\r\nimport { IconButton, Grid } from \"@material-ui/core\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { useBankGuaranteeFilter, useCurrentBankGuaranteeFilter } from \"../../../data/clearing/bankguarantees/hooks/useBankGuaranteeFilter\";\r\nimport { BankGuaranteeFilterEditor, BankGuaranteeFilterEditorType, BankGuaranteesFilterChips } from \"../bankguarantees/BankGuaranteeFilterEditor\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\n\r\nexport const BankGuaranteeFilterButton: React.FunctionComponent = () => {\r\n\tconst showWithDrawer = React.useContext(DisplayDrawerContext);\r\n\tconst showFilter = React.useCallback(() => showWithDrawer(), [showWithDrawer]);\r\n\r\n\tconst [filter, removeFilter] = useCurrentBankGuaranteeFilter();\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\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\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};\r\n\r\nconst BankGuaranteesFilterEditor: React.FunctionComponent = () => {\r\n\tconst [filter, editFilter, save, , reset] = useBankGuaranteeFilter();\r\n\treturn (\r\n\t\t\r\n\t);\r\n};\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { BankGuaranteeFilter } from \"../types\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nexport const getBankGuaranteesReport = (user: User, filter: BankGuaranteeFilter) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getbankguaranteesreport\",\r\n params: {\r\n userid: user.userId,\r\n cliid: filter?.client?.cliId,\r\n bankid: filter?.bank?.bankId,\r\n datefrom: getParamsDateString(filter.datefrom),\r\n dateto: getParamsDateString(filter.dateto),\r\n },\r\n });\r\n};\r\n\r\nexport default getBankGuaranteesReport;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadBankGuaranteesReport } from \"../thunks/downloadReport\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useBankGuaranteesReportDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.clearing.bankguarantees.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadBankGuaranteesReport()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getBankGuaranteesReport } from \"../api/getBankGuaranteesReport\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../bankguaranteesDataSlice\";\r\n\r\nexport const downloadBankGuaranteesReport = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.clearing.bankguarantees;\r\n const user = store.data.auth.current.user;\r\n\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const ordersReport = await dispatch(getBankGuaranteesReport(user, filter));\r\n if (ordersReport) {\r\n fileDownload(\r\n new Blob([ordersReport as any], { type: \"application/pdf\" }),\r\n \"BankGuarantees.pdf\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { BankGuaranteeFilter } from \"../types\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nexport const getBankGuaranteesExcel = (user: User, filter: BankGuaranteeFilter) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getbankguaranteesxls\",\r\n params: {\r\n userid: user.userId,\r\n cliid: filter?.client?.cliId,\r\n bankid: filter?.bank?.bankId,\r\n datefrom: getParamsDateString(filter.datefrom),\r\n dateto: getParamsDateString(filter.dateto),\r\n },\r\n });\r\n};\r\n\r\nexport default getBankGuaranteesExcel;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadBankGuaranteesExcel } from \"../thunks/downloadReportExcel\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useBankGuaranteesExcelDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) =>\r\n s.data.clearing.bankguarantees.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadBankGuaranteesExcel()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getBankGuaranteesExcel } from \"../api/getBankGuaranteesExcel\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../bankguaranteesDataSlice\";\r\n\r\nexport const downloadBankGuaranteesExcel = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n \r\n const { filter } = store.ux.clearing.bankguarantees;\r\n const user = store.data.auth.current.user;\r\n\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const dailyTrading = await dispatch(getBankGuaranteesExcel(user, filter));\r\n if (dailyTrading) {\r\n fileDownload(\r\n new Blob([dailyTrading as any], {\r\n type: \"application/vnd.openxmlformat\",\r\n }),\r\n \"BankGuarantees.xlsx\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import React from \"react\";\r\nimport { useBankGuaranteesReportDownloader } from \"../../../data/clearing/bankguarantees/hooks/useBankGuaranteesReportDownloader\";\r\nimport { useBankGuaranteesExcelDownloader } from \"../../../data/clearing/bankguarantees/hooks/useBankGuaranteesExcelDownloader\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport ExcelIcon from \"@material-ui/icons/TableChartOutlined\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\n\r\nexport const DownloadButton: React.FunctionComponent = () => {\r\n\tconst [downloader, fetchState] = useBankGuaranteesReportDownloader();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\treturn (\r\n\t\t<>\r\n\t\t\t\r\n\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\t{fetchState.type !== \"not-started\" ? getString(\"pleaseWait\") : null}\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport const DownloadExcelButton: React.FunctionComponent = () => {\r\n\tconst [downloader, fetchState] = useBankGuaranteesExcelDownloader();\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport {\r\n Grid,\r\n CardContent,\r\n CardHeader,\r\n Card,\r\n Divider,\r\n Fab,\r\n} from \"@material-ui/core\";\r\nimport BankGuaranteesTable from \"./BankGuaranteesTable\";\r\nimport AddIcon from \"@material-ui/icons/Add\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { PageComponent, AccessRights } from \"../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { useBankGuaranteeData } from \"../../../data/clearing/bankguarantees/hooks/useBankGuaranteeData\";\r\nimport { useBankGuaranteeIndex } from \"../../../data/clearing/bankguarantees/hooks/useBankGuaranteeIndex\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { getBankGuaranteeEditLocation } from \"../bankguarantees/Locations\";\r\nimport { PageDataStatus } from \"../../../data/models\";\r\nimport { BankGuaranteeFilterButton } from \"./BankGuaranteeFilter\";\r\nimport { useAuth } from \"../../../data/auth/hooks\";\r\nimport { DownloadButton, DownloadExcelButton } from \"./DownloadButton\";\r\n\r\nconst BankGuaranteesPage: PageComponent = ({ userAccessRights }) => {\r\n const pageStyles = usePageStyles();\r\n\r\n const [pageData, dispatchLoadBankGuarantee, invalidate] = useBankGuaranteeData();\r\n const [pageIndex, dispatchSetIndex] = useBankGuaranteeIndex();\r\n\r\n React.useEffect(() => {\r\n if (pageData && pageData.status === PageDataStatus.DataInvalidated) {\r\n dispatchLoadBankGuarantee();\r\n }\r\n }, [dispatchLoadBankGuarantee, pageData]);\r\n\r\n// React.useEffect(() => () => { invalidate() }, [])\r\n\r\n const history = useHistory();\r\n\r\n const [auth] = useAuth();\r\n\r\n if (auth.status !== \"successful\") {\r\n return null;\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n }\r\n action={}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {userAccessRights === AccessRights.All && (\r\n history.push(getBankGuaranteeEditLocation())}\r\n >\r\n \r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nexport const BankGuaranteesActions: React.FunctionComponent = () => (\r\n \r\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 BankGuaranteesPage;\r\n","import React from \"react\";\r\nimport { useDisplayBankGuarantee } from \"./useDisplayBankGuarantees\";\r\nimport { BankGuaranteeData } from \"../types\";\r\nimport { useCopiedState } from \"../../../../core/util/hooks\";\r\nimport { Status } from \"../../../models\";\r\n\r\nexport const defaultGuarantee: BankGuaranteeData = {\r\n grntId: \"\",\r\n clientId: \"\",\r\n bankId: \"\",\r\n status: Status.Active,\r\n currId: \"00000001\",\r\n};\r\n\r\nexport const useEditGuarantee = (payId?: string): BankGuaranteeData | undefined => {\r\n const displayGuarantee = useDisplayBankGuarantee(payId);\r\n\r\n return React.useMemo(() => {\r\n if (payId !== undefined && displayGuarantee === undefined) {\r\n return undefined;\r\n }\r\n\r\n if (payId === undefined) {\r\n return { ...defaultGuarantee };\r\n }\r\n\r\n return displayGuarantee ? { ...displayGuarantee } : undefined;\r\n }, [payId, displayGuarantee]);\r\n};\r\n\r\nexport const useEditBankGuaranteeState = (payId?: string) => {\r\n const guarantee = useEditGuarantee(payId);\r\n return useCopiedState(guarantee);\r\n};\r\n","import { BankGuaranteeData, BankGuaranteeValidationState } from \"../types\";\r\nimport { createUseValidator } from \"../../../../core/util/hooks\";\r\n\r\nexport const bankguaranteeValidationState: BankGuaranteeValidationState = {\r\n grntDate: true,\r\n clientId: true,\r\n bankId: true,\r\n amt: true,\r\n};\r\n\r\nexport const useBankGuaranteeValidator = createUseValidator<\r\nBankGuaranteeData,\r\nBankGuaranteeValidationState\r\n>(bankguaranteeValidationState);\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { BankGuaranteeData } from \"../types\";\r\n\r\nexport const createBankGuaranteeApi = (userId: string, dataguarantee: BankGuaranteeData) =>\r\n webApiWithResponse({\r\n method: \"PUT\",\r\n url: \"clearing/newbankgrnt\",\r\n params: {\r\n userId,\r\n },\r\n data: dataguarantee,\r\n });\r\n\r\nexport default createBankGuaranteeApi;\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { BankGuaranteeData } from \"../types\";\r\n\r\nexport const updateGuaranteeApi = (userId: string, bankguarantee: BankGuaranteeData) =>\r\n webApiWithResponse({\r\n method: \"PUT\",\r\n url: \"clearing/updbankgrnt\",\r\n params: {\r\n userId,\r\n },\r\n data: bankguarantee,\r\n });\r\n\r\nexport default updateGuaranteeApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { upsertBankGuarantee } from \"../thunks/upsertBankGuarantees\";\r\nimport { setFetchState } from \"../bankguaranteesDataSlice\";\r\nimport { BankGuaranteeData } from \"../types\";\r\n\r\nexport const useBankGuaranteeUpsert = () => {\r\n const fetchState = useSelector(\r\n (store) => store.data.clearing.bankguarantees.fetchState\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchUpsertGuarantee = React.useCallback(\r\n (bankguarantee: BankGuaranteeData) => dispatch(upsertBankGuarantee(bankguarantee)),\r\n [dispatch]\r\n );\r\n\r\n React.useEffect(() => {\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n }, [dispatch]);\r\n\r\n return [fetchState, dispatchUpsertGuarantee] as [\r\n typeof fetchState,\r\n typeof dispatchUpsertGuarantee\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport createBankGuarantees from \"../api/createBankGuarantees\";\r\nimport updateBankGuarantees from \"../api/updateBankGuarantees\";\r\nimport { BankGuaranteeData } from \"../types\";\r\nimport { setFetchState, invalidateBankGuarantee } from \"../bankguaranteesDataSlice\";\r\n\r\nexport const upsertBankGuarantee = (bankguarantee: BankGuaranteeData): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n dispatch(setFetchState({ type: \"started\" }));\r\n\r\n const { userId } = store.data.auth.current.user;\r\n const result = bankguarantee.grntId\r\n ? await dispatch(updateBankGuarantees(userId, bankguarantee))\r\n : await dispatch(createBankGuarantees(userId, bankguarantee));\r\n\r\n if (result && result.resCode === \"OK\") {\r\n dispatch(setFetchState({ type: \"successful\", result: result.resDesc }));\r\n dispatch(invalidateBankGuarantee());\r\n return result.resDesc;\r\n } else {\r\n dispatch(setFetchState({ type: \"error\", errorCode: result?.resCode }));\r\n }\r\n};\r\n","import { NavigationItem } from \"../../../core/navigation/types\";\r\nimport BankGuaranteesPage from \"./BankGuaranteesPage\";\r\nimport { EditBankGuaranteePage } from \"./EditBankGuaranteePage\";\r\nimport { bankguaranteeLocation, editRouter } from \"./Locations\";\r\n\r\nexport const bankguaranteeComponents: NavigationItem[] = [\r\n {\r\n Component: BankGuaranteesPage,\r\n isMenuItem: true,\r\n path: bankguaranteeLocation,\r\n },\r\n {\r\n Component: EditBankGuaranteePage,\r\n isMenuItem: false,\r\n path: editRouter,\r\n },\r\n];\r\n","import React from \"react\";\r\nimport { useEditBankGuaranteeState } from \"../../../data/clearing/bankguarantees/hooks/useEditBankGuaranteeState\";\r\nimport { useBankGuaranteeValidator} from \"../../../data/clearing/bankguarantees/hooks/useBankGuaranteeValidator\";\r\nimport { useBankGuaranteeUpsert } from \"../../../data/clearing/bankguarantees/hooks/useBankGuaranteeUpsert\";\r\nimport { RouteComponentProps, useHistory } from \"react-router-dom\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport {\r\n\tCard,\r\n\tGrid,\r\n\tCardHeader,\r\n\tDivider,\r\n\tCardContent,\r\n} from \"@material-ui/core\";\r\nimport { FabSave } from \"../../components/common/FabSave\";\r\nimport { BankGuaranteeData } from \"../../../data/clearing/bankguarantees/types\";\r\nimport { LeavePrompt } from \"../../components/common/LeavePrompt\";\r\nimport { Status } from \"../../../data/models\";\r\nimport { BoolInput } from \"../../components/common/BoolInput\";\r\nimport { StringInput } from \"../../components/common/StringInput\";\r\nimport { bankguaranteeLocation } from \"./Locations\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { ClientSelect } from \"../../components/listing/ClientSelect\";\r\nimport { NumberInput } from \"../../components/common/NumberInput\";\r\nimport { DateInput } from \"../../components/common/DateInput\";\r\nimport { CurrencySelect } from \"../../components/common/CurrencySelect\";\r\nimport { OrderSimpleData, SimpleOrderFilter } from \"../../../data/trading/orders/types\";\r\nimport { BankSelect } from \"../../components/common/BankSelect\";\r\n\r\nexport interface EditBankGuaranteeInfo {\r\n\tgrntId?: string;\r\n}\r\n\r\nexport interface EditBankGuaranteeProps extends RouteComponentProps {}\r\n\r\nexport const EditBankGuaranteePage: React.FunctionComponent = props => {\r\n\tconst { getString, getFormatedNumberString } = React.useContext(LocalizationContext);\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst [bankguarantee, editBankGuarantee, changed] = useEditBankGuaranteeState(props.match.params.grntId);\r\n\tconst [validationState, validate] = useBankGuaranteeValidator();\r\n\tconst [fetchState, upsert] = useBankGuaranteeUpsert();\r\n\tconst history = useHistory();\r\n/*\tconst [orderFilter, setOrderFilter] = React.useState(\r\n\t\tcreateOrderFilter(bankguarantee)\r\n\t);\r\n\r\n\r\n\tReact.useEffect(() => {\r\n\t\tsetOrderFilter(createOrderFilter(bankguarantee));\r\n\t}, [bankguarantee, setOrderFilter]); */\r\n\r\n\tconst unsavedChanges = fetchState.type === \"not-started\" && changed;\r\n\r\n\tconst handleChange = React.useCallback(\r\n\t\t(event: React.ChangeEvent) => {\r\n\t\t\teditBankGuarantee(event.target.name as any, event.target.value);\r\n\t\t},\r\n\t\t[editBankGuarantee]\r\n\t);\r\n\r\n\tconst save = React.useCallback(() => {\r\n\t\tif (fetchState.type === \"successful\") {\r\n\t\t\thistory.push(bankguaranteeLocation);\r\n\t\t} else if (fetchState.type !== \"started\") {\r\n\t\t\tconst normalized = validate(bankguarantee);\r\n\r\n\t\t\tif (normalized) {\r\n\t\t\t\tupsert(normalized);\r\n\t\t\t}\r\n\t\t}\r\n\t}, [bankguarantee, validate, fetchState, history, upsert]);\r\n\r\n\tconst pageTitle = bankguarantee && bankguarantee.grntId ? \"grntEdit\" : \"grntCreate\";\r\n\r\n\tif (!bankguarantee) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\treturn (\r\n\t\t\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\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\r\n\t\t\t\t\t\t\t\t\t\tproperty=\"grntNo\"\r\n\t\t\t\t\t\t\t\t\t\titem={bankguarantee}\r\n\t\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\t\tlabel={getString(\"grntNo\")}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\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 editBankGuarantee(\"grntDate\", date)}\r\n\t\t\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\t\t\tvalidationState.grntDate !== undefined && !validationState.grntDate\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\trequired={validationState.grntDate !== undefined}\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 client.cliId === bankguarantee.clientId}\r\n\t\t\t\t\t\t\t\t\t\tonChangeItem={client => {\r\n\t\t\t\t\t\t\t\t\t\t\teditBankGuarantee(\"clientId\", client ? client.cliId : undefined);\r\n\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\trequired={validationState.clientId !== undefined}\r\n\t\t\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\t\t\tvalidationState.clientId !== undefined &&\r\n\t\t\t\t\t\t\t\t\t\t\t!validationState.clientId\r\n\t\t\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\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t bank.bankId === bankguarantee.bankId}\r\n\t\t\t\t\t\t\t\t\t\tonChangeItem={bank => {\r\n\t\t\t\t\t\t\t\t\t\t\teditBankGuarantee(\"bankId\", bank ? bank.bankId : undefined);\r\n\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\trequired={validationState.bankId !== undefined}\r\n\t\t\t\t\t\t\t\t\t\terror={validationState.bankId !== undefined && !validationState.bankId}\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\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\tproperty=\"amt\"\r\n\t\t\t\t\t\t\t\t\t\t\titem={bankguarantee}\r\n\t\t\t\t\t\t\t\t\t\t\tvalidationState={validationState}\r\n\t\t\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\t\t\tlabel={getString(\"grntAmount\")}\r\n\t\t\t\t\t\t\t\t\t\t\tmoney\r\n\t\t\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\r\n\t\t\t\t\t\t\t\t\t\t currency.currId === bankguarantee.currId}\r\n\t\t\t\t\t\t\t\t\t\t\tonChangeItem={currency =>\r\n\t\t\t\t\t\t\t\t\t\t\t\teditBankGuarantee(\"currId\", currency?.currId)\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\trequired={validationState.currId !== undefined}\r\n\t\t\t\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\t\t\t\tvalidationState.currId !== undefined &&\r\n\t\t\t\t\t\t\t\t\t\t\t\t!validationState.currId\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\tfullWidth\r\n\t\t\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\r\n\t\t\t\t\t\t\t\t\t\t editBankGuarantee(\"expiryDate\", date)}\r\n\t\t\t\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\t\t\t\tvalidationState.expiryDate !== undefined && !validationState.expiryDate\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\trequired={validationState.expiryDate !== undefined}\r\n\t\t\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\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\tproperty=\"status\"\r\n\t\t\t\t\t\t\t\t\t\titem={bankguarantee}\r\n\t\t\t\t\t\t\t\t\t\tonChange={handleChange}\r\n\t\t\t\t\t\t\t\t\t\tfalsyValue={Status.Inactive}\r\n\t\t\t\t\t\t\t\t\t\tthrutyValue={Status.Active}\r\n\t\t\t\t\t\t\t\t\t\tlabel={getString(\"grntStatus\")}\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\r\n\t\t\t\t\t\t\r\n\r\n\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\t);\r\n};\r\n\r\nconst createOrderFilter = (guarantee?: BankGuaranteeData): SimpleOrderFilter | undefined => {\r\n\treturn guarantee && guarantee.clientId\r\n\t\t? {\r\n\t\t\t\tcliid: guarantee.clientId,\r\n\t\t\t\tstatus: -2,\r\n\t\t }\r\n\t\t: undefined;\r\n};\r\n","import { paymentComponents } from \"./payments/navigationComponents\";\r\nimport { ctrlGoodsComponents } from \"./ctrlgoods/navigationComponents\";\r\nimport { deliveryComponents } from \"./delivery/navigationComponents\";\r\nimport { disputeComponents } from \"./dispute/navigationComponents\";\r\nimport { guaranteeComponents } from \"./guarantees/navigationComponents\";\r\nimport { stockFeesComponents } from \"./stockFees/navigationComponents\";\r\nimport { transportFeesComponents } from \"./transportFees/navigationComponents\";\r\nimport { transportAndStorageComponents } from \"./transportAndStorage/navigationComponents\";\r\nimport { tradingDataComponents } from \"./tradingData/navigationComponents\";\r\nimport { marginsDataComponents } from \"./marginsData/navigationComponents\";\r\nimport { bankguaranteeComponents } from \"./bankguarantees/navigationComponents\";\r\n\r\nexport const clearingComponents = [\r\n\t...paymentComponents,\r\n\t...ctrlGoodsComponents,\r\n\t...deliveryComponents,\r\n\t...disputeComponents,\r\n\t...guaranteeComponents,\r\n\t...stockFeesComponents,\r\n\t...transportFeesComponents,\r\n\t...transportAndStorageComponents,\r\n\t...tradingDataComponents,\r\n\t...marginsDataComponents,\r\n\t...bankguaranteeComponents,\r\n];\r\n","import React from \"react\";\r\nimport { ViewOrder } from \"../../../data/trading/orders/types\";\r\nimport {\r\n PaginationTable,\r\n PaginationDataProps,\r\n} from \"../../components/common/PagginationTable\";\r\nimport { useOrderReportsColumns } from \"./useOrderReportsColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\n\r\nexport interface OrderTableProps {\r\n userAccessRights: AccessRights;\r\n getData: () => void;\r\n}\r\n\r\ntype OrderTablePropsType = OrderTableProps & PaginationDataProps;\r\n\r\nconst OrdersTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n getData,\r\n ...tableProps\r\n}) => {\r\n const columns = useOrderReportsColumns();\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={getData}\r\n // immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default OrdersTable;\r\n","import { ViewOrder } from \"../../../data/trading/orders/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\nimport { renderOrderPrice, TurnocateText, renderClient } from \"../../trading/orders/columRenderers\";\r\nimport { useOrderMarketOptionsTranslator } from \"../../../data/trading/orders/hooks/useOrderMarketOptions\";\r\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\r\nimport { useTheme } from '@material-ui/core/styles';\r\n\r\nexport const useOrderReportsColumns = () => {\r\n\tconst { getString, getFormatedNumberString } = React.useContext(LocalizationContext);\r\n\tconst marketTranslator = useOrderMarketOptionsTranslator();\r\n\r\n\tconst theme = useTheme();\r\n\tconst screenExtraSmall = useMediaQuery(theme.breakpoints.only('xs'));\r\n\r\n\treturn React.useMemo(\r\n\t\t() => [\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"orderClmOrdNo\"),\r\n\t\t\t\tfield: \"ordNo\",\r\n\t\t\t\tsorting: false,\r\n\t\t\t\twidth: \"100px\",\r\n\t\t\t\tcellStyle: (data, order) => ({\r\n\t\t\t\t\tmaxWidth: \"100px\",\r\n\t\t\t\t\tminWidth: \"100px\",\r\n\t\t\t\t\twidth: \"100px\",\r\n\t\t\t\t}),\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\tmaxWidth: \"100px\",\r\n\t\t\t\t\tminWidth: \"100px\",\r\n\t\t\t\t\twidth: \"100px\",\r\n\t\t\t\t},\r\n\t\t\t\thidden: screenExtraSmall,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: screenExtraSmall ? getString(\"newsTime\") :getString(\"orderTimeReceived\") ,\r\n\t\t\t\trender: order => screenExtraSmall ? order.timeReceived.substring(0,10): order.timeReceived,\r\n\t\t\t\tsorting: false,\r\n\t\t\t\twidth: screenExtraSmall ? \"100px\" :\"180px\",\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\tmaxWidth: screenExtraSmall ? \"100px\" :\"180px\",\r\n\t\t\t\t\tminWidth: screenExtraSmall ? \"100px\" :\"180px\",\r\n\t\t\t\t\twidth: screenExtraSmall ? \"100px\" :\"180px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\tmaxWidth: screenExtraSmall ? \"100px\" :\"180px\",\r\n\t\t\t\t\tminWidth: screenExtraSmall ? \"100px\" :\"180px\",\r\n\t\t\t\t\twidth: screenExtraSmall ? \"100px\" :\"180px\",\r\n\t\t\t\t},\r\n\t\t\t\t// hidden: screenExtraSmall,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"orderClientName\"),\r\n\t\t\t\trender: renderClient,\r\n\t\t\t\tsorting: false,\r\n\t\t\t\twidth: \"200px\",\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\tmaxWidth: \"200px\",\r\n\t\t\t\t\tminWidth: \"200px\",\r\n\t\t\t\t\twidth: \"200px\",\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\tmaxWidth: \"200px\",\r\n\t\t\t\t\tminWidth: \"200px\",\r\n\t\t\t\t\twidth: \"200px\",\r\n\t\t\t\t},\r\n\t\t\t\thidden: screenExtraSmall,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"orderProduct\"),\r\n\t\t\t\tfield: \"product\",\r\n\t\t\t\tsorting: false,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"orderSide\"),\r\n\t\t\t\tfield: \"side\",\r\n\t\t\t\tsorting: false,\r\n\t\t width: \"80px\",\r\n \t\tcellStyle: {\r\n\t \t maxWidth: \"80px\",\r\n \t minWidth: \"80px\",\r\n\t\t width: \"80px\",\r\n \t\t},\r\n \t\theaderStyle: {\r\n \t\t\tmaxWidth: \"80px\",\r\n \t\t\tminWidth: \"80px\",\r\n\t\t\t width: \"80px\",\r\n\t\t },\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"orderQty\"),\r\n\t\t\t\trender: order => `${getFormatedNumberString(order.qty)} ${order.unit}`,\r\n\t\t\t\tsorting: false,\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t},\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"orderPrice\"),\r\n\t\t\t\trender: renderOrderPrice,\r\n\t\t\t\tsorting: false,\r\n\t\t width: \"100px\",\r\n\t \t\tcellStyle: {\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tmaxWidth: \"100px\",\r\n \t\t minWidth: \"100px\",\r\n\t\t \t width: \"100px\",\r\n \t\t},\r\n \t\theaderStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"left\",\r\n \t\t\tmaxWidth: \"100px\",\r\n \t\t\tminWidth: \"100px\",\r\n\t\t\t width: \"100px\",\r\n\t\t },\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"orderStatus\"),\r\n\t\t\t\trender: order => ,\r\n\t\t\t\tsorting: false,\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t},\r\n\t\t\t\thidden: screenExtraSmall,\r\n\t\t\t},\r\n\t\t],\r\n\t\t[getString, getFormatedNumberString,screenExtraSmall]\r\n\t) as Column[];\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadOrdersReport } from \"../thunks/loadOrdersReport\";\r\nimport { ViewOrder } from \"../../../trading/orders/types\";\r\nimport { PageData } from \"../../../models\";\r\n\r\nexport const useOrdersReportData = () => {\r\n const pageData = useSelector | undefined>(\r\n (s) => s.data.reports.ordersReport.currentPage\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadAMBPage = React.useCallback(\r\n () => dispatch(loadOrdersReport()),\r\n [dispatch]\r\n );\r\n\r\n return [pageData, dispatchLoadAMBPage] as [\r\n typeof pageData,\r\n typeof dispatchLoadAMBPage,\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { setOrders, invalidateOrders } from \"../ordersReportDataSlice\";\r\nimport { setOrdersIndex } from \"../ordersReportUXSlice\";\r\nimport { PageIndex } from \"../../../models\";\r\nimport { getOrdersThunk } from \"../../../trading/orders/thunks/getOrdersThunk\";\r\n\r\nexport const loadOrdersReport = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tconst { pageNumber, itemsPerPage } = store.ux.reports.ordersReport.index;\r\n\tconst { filter } = store.ux.reports.ordersReport;\r\n\r\n\tconst pagedOrders = await dispatch(getOrdersThunk(pageNumber, itemsPerPage, filter));\r\n\r\n\tif (pagedOrders) {\r\n\t\tdispatch(setOrders(pagedOrders));\r\n\t}\r\n};\r\n\r\nexport const setOrdersIndexThunk = (index: PageIndex): ThunkType => dispatch => {\r\n\tdispatch(setOrdersIndex(index));\r\n\tdispatch(invalidateOrders());\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { resetOrderIdices } from \"../ordersReportUXSlice\";\r\nimport { PageIndex } from \"../../../models\";\r\nimport { setOrdersIndexThunk } from \"../thunks/loadOrdersReport\";\r\n\r\nexport const useOrdersReportIndex = () => {\r\n\tconst pageIndex = useSelector(s => s.ux.reports.ordersReport.index);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchSetIndex = React.useCallback((index: PageIndex) => dispatch(setOrdersIndexThunk(index)), [\r\n\t\tdispatch,\r\n\t]);\r\n\tconst dispatchResetIndex = React.useCallback(() => dispatch(resetOrderIdices()), [dispatch]);\r\n\r\n\treturn [pageIndex, dispatchSetIndex, dispatchResetIndex] as [\r\n\t\ttypeof pageIndex,\r\n\t\ttypeof dispatchSetIndex,\r\n\t\ttypeof dispatchResetIndex\r\n\t];\r\n};\r\n","import { useCopiedState } from \"../../../../core/util/hooks\";\r\nimport { OrderFilter } from \"../../../models\";\r\nimport { setFilter, removeFilter, initialState } from \"../ordersReportUXSlice\";\r\nimport { invalidateOrders } from \"../ordersReportDataSlice\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport React from \"react\";\r\n\r\nexport const useOrdersReportFilter = () => {\r\n\tconst [storeFilter] = useCurrentOrdersReportFilter();\r\n\tconst [filter, editFilter, changeState, setCurrentFilter] = useCopiedState(storeFilter);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchSetFilter = React.useCallback(() => {\r\n\t\tdispatch(setFilter(filter!));\r\n\t\tdispatch(invalidateOrders());\r\n\t}, [dispatch, filter]);\r\n\r\n\tconst dispatchResetFilter = React.useCallback(() => {\r\n\t\tsetCurrentFilter(initialState.filter)\r\n\t}, [setCurrentFilter]);\r\n\r\n\treturn [filter, editFilter, dispatchSetFilter, changeState, dispatchResetFilter] as [\r\n\t\ttypeof filter,\r\n\t\ttypeof editFilter,\r\n\t\ttypeof dispatchSetFilter,\r\n\t\ttypeof changeState,\r\n\t\ttypeof dispatchResetFilter,\r\n\t];\r\n};\r\n\r\nexport const useCurrentOrdersReportFilter = () => {\r\n\tconst filter = useSelector(store => store.ux.reports.ordersReport.filter);\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchRemoveFilter = React.useCallback(\r\n\t\t(type: keyof OrderFilter) => {\r\n\t\t\tdispatch(removeFilter(type));\r\n\t\t\tdispatch(invalidateOrders());\r\n\t\t},\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\treturn [filter, dispatchRemoveFilter] as [typeof filter, typeof dispatchRemoveFilter];\r\n};\r\n","import React from \"react\";\r\nimport FilterIcon from \"@material-ui/icons/FilterListOutlined\";\r\nimport { IconButton, Grid } from \"@material-ui/core\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport {\r\n\tuseOrdersReportFilter,\r\n\tuseCurrentOrdersReportFilter,\r\n} from \"../../../data/reports/ordersReport/hooks/useOrdersReportFilter\";\r\nimport {\r\n\tOrderFilterEditor,\r\n\tOrderFilterEditorType,\r\n\tOrderFilterChips,\r\n} from \"../../trading/orders/OrderFilterEditor\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\r\nimport { useTheme } from '@material-ui/core/styles';\r\n\r\nexport const OrdersReportFilterFilterButton: React.FunctionComponent = () => {\r\n\tconst showWithDrawer = React.useContext(DisplayDrawerContext);\r\n\tconst showFilter = React.useCallback(() => showWithDrawer(), [\r\n\t\tshowWithDrawer,\r\n\t]);\r\n\t\r\n\tconst theme = useTheme();\r\n\tconst screenExtraSmall = useMediaQuery(theme.breakpoints.only('xs'));\r\n\r\n\tconst [filter, remnoveFilter] = useCurrentOrdersReportFilter();\r\n\t\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\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\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};\r\n\r\nconst OrdersReportFilterEditor: React.FunctionComponent = () => {\r\n\tconst [filter, editFilter, save, , rest] = useOrdersReportFilter();\r\n\treturn (\r\n\t\t\r\n\t);\r\n};\r\n","import { OrderFilter } from \"../../../models\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\nimport { GetOrdersParams } from \"../../../trading/orders/types\";\r\n\r\nexport const getOrderListReport = (\r\n\tuser: User,\r\n\tfilter?: OrderFilter,\r\n) => {\r\n\tconst params: GetOrdersParams = {\r\n\t\tuserid: user.userId,\r\n\t\tside: filter?.side,\r\n\t\tprodid: filter?.product?.prodId,\r\n\t\tcliprsid: undefined,\r\n\t\tstatus: filter?.orderStatus?.ftValue,\r\n\t\tcliid: filter?.client?.cliId,\r\n\t\tempid: undefined,\r\n\t\tdatefrom: getParamsDateString(filter?.fromDate),\r\n\t\tdateto: getParamsDateString(filter?.toDate),\r\n\t\tmarket: filter?.market,\r\n\t};\r\n\r\n\treturn httpWebApi({\r\n\t\tmethod: \"GET\",\r\n\t\tresponseType: \"blob\",\r\n\t\ttimeout: 60 * 4 * 1000,\r\n\t\turl: \"reporting/getorderbookreport\",\r\n\t\tparams,\r\n\t});\r\n};\r\n\r\nexport default getOrderListReport;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadOrdersReport } from \"../thunks/downloadReport\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useOrderReportDownloader = () => {\r\n\tconst fetchState = useSelector(\r\n\t\ts => s.data.reports.ordersReport.downloadReportFetchState\r\n\t);\r\n\tconst dispatch = useDispatch();\r\n\tconst download = React.useCallback(() => dispatch(downloadOrdersReport()), [dispatch]);\r\n\r\n\treturn [download, fetchState] as [typeof download, typeof fetchState]\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getOrderListReport } from \"../api/getOrderListReport\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../ordersReportDataSlice\"\r\n\r\nexport const downloadOrdersReport = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst { filter } = store.ux.reports.ordersReport;\r\n\tconst user = store.data.auth.current.user;\r\n\tdispatch(setFetchState({ type: \"started\"}))\r\n\tconst ordersReport = await dispatch(getOrderListReport(user, filter));\r\n\tif (ordersReport) {\r\n\t\tfileDownload(new Blob([ordersReport as any], { type: \"application/pdf\" }), \"OrderBook.pdf\");\r\n\t}\r\n\tdispatch(setFetchState({ type: \"not-started\"}))\r\n};\r\n","import { OrderFilter } from \"../../../models\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\nimport { GetOrdersParams } from \"../../../trading/orders/types\";\r\n\r\nexport const getOrderListReportExcel = (\r\n\tuser: User,\r\n\tfilter?: OrderFilter,\r\n) => {\r\n\tconst params: GetOrdersParams = {\r\n\t\tuserid: user.userId,\r\n\t\tside: filter?.side,\r\n\t\tprodid: filter?.product?.prodId,\r\n\t\tcliprsid: undefined,\r\n\t\tstatus: filter?.orderStatus?.ftValue,\r\n\t\tcliid: filter?.client?.cliId,\r\n\t\tempid: undefined,\r\n\t\tdatefrom: getParamsDateString(filter?.fromDate),\r\n\t\tdateto: getParamsDateString(filter?.toDate),\r\n\t\tmarket: filter?.market,\r\n\t};\r\n\r\n\treturn httpWebApi({\r\n\t\tmethod: \"GET\",\r\n\t\tresponseType: \"blob\",\r\n\t\ttimeout: 60 * 4 * 1000,\r\n\t\turl: \"reporting/getorderbookxls\",\r\n\t\tparams,\r\n\t});\r\n};\r\n\r\nexport default getOrderListReportExcel;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadOrdersReportExcel } from \"../thunks/downloadReportExcel\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useOrderExcelReportDownloader = () => {\r\n\tconst fetchState = useSelector(\r\n\t\ts => s.data.reports.ordersReport.downloadReportFetchState\r\n\t);\r\n\tconst dispatch = useDispatch();\r\n\tconst download = React.useCallback(() => dispatch(downloadOrdersReportExcel()), [dispatch]);\r\n\r\n\treturn [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getOrderListReportExcel } from \"../api/getOrderListReportExcel\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../ordersReportDataSlice\"\r\n\r\nexport const downloadOrdersReportExcel = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst { filter } = store.ux.reports.ordersReport;\r\n\tconst user = store.data.auth.current.user;\r\n\tdispatch(setFetchState({ type: \"started\"}))\r\n\tconst ordersReport = await dispatch(getOrderListReportExcel(user, filter));\r\n\tif (ordersReport) {\r\n\t\tfileDownload(new Blob([ordersReport as any], { type: \"application/vnd.openxmlformat\" }), \"OrderBook.xlsx\");\r\n\t}\r\n\tdispatch(setFetchState({ type: \"not-started\"}))\r\n};\r\n","import React from \"react\";\r\nimport { useOrderReportDownloader } from \"../../../data/reports/ordersReport/hooks/useOrderReportDownloader\";\r\nimport { useOrderExcelReportDownloader } from \"../../../data/reports/ordersReport/hooks/useOrderExcelReportDownloader\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport ExcelIcon from \"@material-ui/icons/TableChartOutlined\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\n\r\nexport const DownloadButton: React.FunctionComponent = () => {\r\n\tconst [downloader, fetchState] = useOrderReportDownloader();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\treturn (\r\n\t\t<>\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t{fetchState.type !== \"not-started\" ? getString(\"pleaseWait\") : null}\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport const DownloadExcelButton: React.FunctionComponent = () => {\r\n\tconst [downloader, fetchState] = useOrderExcelReportDownloader();\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport { Grid, CardContent, CardHeader, Card, Divider } from \"@material-ui/core\";\r\nimport OrdersTable from \"./OrdersTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { PageComponent } from \"../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { useOrdersReportData } from \"../../../data/reports/ordersReport/hooks/useOrdersReportData\";\r\nimport { useOrdersReportIndex } from \"../../../data/reports/ordersReport/hooks/useOrdersReportIndex\";\r\nimport { PageDataStatus } from \"../../../data/models\";\r\nimport { OrdersReportFilterFilterButton } from \"./OrdersReportFilter\";\r\nimport { DownloadButton, DownloadExcelButton } from \"./DownloadButton\";\r\n\r\nconst OrdersReport: PageComponent = ({ userAccessRights }) => {\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst [pageData, dispatchLoadData] = useOrdersReportData();\r\n\tconst [pageIndex, dispatchSetIndex] = useOrdersReportIndex();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (pageData && pageData.status === PageDataStatus.DataInvalidated) {\r\n\t\t\tdispatchLoadData();\r\n\t\t}\r\n\t}, [dispatchLoadData, pageData]);\r\n\r\n\treturn (\r\n\t\t<>\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\t}\r\n\t\t\t\t\t\t\taction={}\r\n\t\t\t\t\t\t/>\r\n\t\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\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};\r\n\r\nexport const OrderReportActions: React.FunctionComponent = () => (\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n)\r\n\r\nexport default OrdersReport;\r\n","import OrdersReport from \"./OrdersReport\";\r\nimport { NavigationItem } from \"../../../core/navigation/types\";\r\nimport { ordersReportLocation, } from \"./Locations\";\r\n\r\nexport const ordersReportComponents: NavigationItem[] = [\r\n\t{\r\n\t\tComponent: OrdersReport,\r\n\t\tisMenuItem: true,\r\n\t\tpath: ordersReportLocation,\r\n\t},\r\n];\r\n","export const ordersReportLocation = \"/reports/orderbookreport\"","import React from \"react\";\r\nimport { PaginationTable, PaginationDataProps } from \"../../components/common/PagginationTable\";\r\nimport { useTradeColumns } from \"./useTradesReportColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\nimport { TradeList } from \"../../../data/trading/trades/types\";\r\n\r\nexport interface OrderTableProps {\r\n\tuserAccessRights: AccessRights;\r\n\tgetData: () => void;\r\n}\r\n\r\ntype OrderTablePropsType = OrderTableProps & PaginationDataProps;\r\n\r\nconst OrdersTable: React.FunctionComponent = ({\r\n\tuserAccessRights,\r\n\tgetData,\r\n\t...tableProps\r\n}) => {\r\n\tconst columns = useTradeColumns();\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t{...tableProps}\r\n\t\t\tgetData={getData}\r\n\t\t\ttitle=\"\"\r\n\t\t\tcolumns={columns}\r\n\t\t\toptions={{\r\n\t\t\t\tactionsColumnIndex: -1,\r\n\t\t\t\tsearch: false,\r\n\t\t\t\ttoolbar: false,\r\n\t\t\t}}\r\n\t\t/>\r\n\t);\r\n};\r\n\r\nexport default OrdersTable;\r\n","import { TradeList } from \"../../../data/trading/trades/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\nimport { useOrderMarketOptionsTranslator } from \"../../../data/trading/orders/hooks/useOrderMarketOptions\";\r\nimport { TurnocateText } from \"../../trading/orders/columRenderers\";\r\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\r\nimport { useTheme } from '@material-ui/core/styles';\r\n\r\nexport const useTradeColumns = () => {\r\n\tconst { getString, getDateString, getDateTimeString, getFormatedNumberString } = React.useContext(LocalizationContext);\r\n\tconst marketTranslator = useOrderMarketOptionsTranslator();\r\n\r\n\tconst theme = useTheme();\r\n\tconst screenExtraSmall = useMediaQuery(theme.breakpoints.only('xs'));\r\n\r\n\treturn React.useMemo(\r\n\t\t() => [\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"tradeNo\"),\r\n\t\t\t\tfield: \"tradeNo\",\r\n\t\t\t\tsorting: false,\r\n\t\t\t\twidth: \"70px\",\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\tmaxWidth: \"70px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\tmaxWidth: \"70px\",\r\n\t\t\t\t},\r\n\t\t\t\thidden: screenExtraSmall,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: screenExtraSmall ? getString(\"annualTradeReportDate\") : getString(\"tradeTime\"),\r\n\t\t\t\trender: (trade) => getDateString(trade.tradeTime, \"DD.MM.YYYY\"),\r\n\t\t\t\tsorting: false,\r\n\t\t\t\twidth: screenExtraSmall ? \"120px\" : \"160px\" ,\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\tmaxWidth: screenExtraSmall ? \"120px\" : \"160px\",\r\n\t\t\t\t\tminWidth: screenExtraSmall ? \"120px\" : \"160px\",\r\n\t\t\t\t\twidth: screenExtraSmall ? \"120px\" : \"160px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\tmaxWidth: screenExtraSmall ? \"120px\" : \"160px\",\r\n\t\t\t\t\tminWidth: screenExtraSmall ? \"120px\" : \"160px\",\r\n\t\t\t\t\twidth: screenExtraSmall ? \"120px\" : \"160px\",\r\n\t\t\t\t},\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"tradeProdName\"),\r\n\t\t\t\tfield: \"prodName\",\r\n\t\t\t\tsorting: false,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"clientNameSell\"),\r\n\t\t\t\trender: trade => ,\r\n\t\t\t\tsorting: false,\r\n\t\t\t\twidth: \"180px\",\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\tmaxWidth: \"180px\",\r\n\t\t\t\t\twidth: \"180px\",\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\tmaxWidth: \"180px\",\r\n\t\t\t\t\twidth: \"180px\",\r\n\t\t\t\t},\r\n\t\t\t\thidden: screenExtraSmall,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"clientNameBuy\"),\r\n\t\t\t\trender: trade => ,\r\n\t\t\t\tsorting: false,\r\n\t\t\t\twidth: \"180px\",\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\tmaxWidth: \"180px\",\r\n\t\t\t\t\twidth: \"180px\",\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\tmaxWidth: \"180px\",\r\n\t\t\t\t\twidth: \"180px\",\r\n\t\t\t\t},\r\n\t\t\t\thidden: screenExtraSmall,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"tradeQty\"),\r\n\t\t\t\trender: trade => `${getFormatedNumberString(trade.qty)} ${trade.unitDescr}`,\r\n\t\t\t\tsorting: false,\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\tminWidth: \"130px\",\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\tminWidth: \"130px\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t},\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"orderPrice\"),\r\n\t\t\t\trender: trade => getFormatedNumberString(trade.price, true),\r\n\t\t\t\tsorting: false,\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t},\r\n\t\t\t\thidden: screenExtraSmall,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"orderMarket\"),\r\n\t\t\t\trender: trade => marketTranslator(trade.market),\r\n\t\t\t\tsorting: false,\r\n\t\t\t\thidden: screenExtraSmall,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"tradeStatusDescr\"),\r\n\t\t\t\tfield: \"statusDescr\",\r\n\t\t\t\tsorting: false,\r\n\t\t\t\thidden: screenExtraSmall,\r\n\t\t\t},\r\n\t\t],\r\n\t\t[getString, getDateTimeString, marketTranslator, screenExtraSmall]\r\n\t) as Column[];\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadReport } from \"../thunks/loadTradesReport\";\r\nimport { TradeList } from \"../../../trading/trades/types\";\r\nimport { PageData } from \"../../../models\";\r\n\r\nexport const useTradesReportData = () => {\r\n const pageData = useSelector | undefined>(\r\n (s) => s.data.reports.tradesReport.currentPage\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadPage = React.useCallback(\r\n () => dispatch(loadReport()),\r\n [dispatch]\r\n );\r\n\r\n return [pageData, dispatchLoadPage] as [\r\n typeof pageData,\r\n typeof dispatchLoadPage\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { setTrades, invalidateOrders } from \"../tradesReportDataSlice\";\r\nimport { setIndex } from \"../tradesReportUXSlice\";\r\nimport { PageIndex } from \"../../../models\";\r\nimport { getTradesThunk } from \"../../../trading/trades/thunks/getTradesThunk\";\r\n\r\nexport const loadReport = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n const { pageNumber, itemsPerPage } = store.ux.reports.tradesReport.index;\r\n const { filter } = store.ux.reports.tradesReport;\r\n\r\n const pagedTrades = await dispatch(\r\n getTradesThunk(pageNumber, itemsPerPage, filter)\r\n );\r\n\r\n if (pagedTrades) {\r\n dispatch(setTrades(pagedTrades));\r\n }\r\n};\r\n\r\nexport const setIndexThunk =\r\n (index: PageIndex): ThunkType =>\r\n (dispatch) => {\r\n dispatch(setIndex(index));\r\n dispatch(invalidateOrders());\r\n };\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { resetIndex } from \"../tradesReportUXSlice\";\r\nimport { PageIndex } from \"../../../models\";\r\nimport { setIndexThunk } from \"../thunks/loadTradesReport\";\r\n\r\nexport const useTradesReportIndex = () => {\r\n\tconst pageIndex = useSelector(s => s.ux.reports.tradesReport.index);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchSetIndex = React.useCallback((index: PageIndex) => dispatch(setIndexThunk(index)), [\r\n\t\tdispatch,\r\n\t]);\r\n\tconst dispatchResetIndex = React.useCallback(() => dispatch(resetIndex()), [dispatch]);\r\n\r\n\treturn [pageIndex, dispatchSetIndex, dispatchResetIndex] as [\r\n\t\ttypeof pageIndex,\r\n\t\ttypeof dispatchSetIndex,\r\n\t\ttypeof dispatchResetIndex\r\n\t];\r\n};\r\n","import { useCopiedState } from \"../../../../core/util/hooks\";\r\nimport { setFilter, removeFilter, initialState } from \"../tradesReportUXSlice\";\r\nimport { invalidateOrders } from \"../tradesReportDataSlice\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { TradeFilter } from \"../../../trading/trades/types\"\r\nimport React from \"react\";\r\n\r\nexport const useTradesReportFilter = () => {\r\n\tconst [storeFilter] = useCurrentTradesReportFilter();\r\n\tconst [filter, editFilter, changeState, setCurrentFilter] = useCopiedState(storeFilter);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchSetFilter = React.useCallback(() => {\r\n\t\tdispatch(setFilter(filter!));\r\n\t\tdispatch(invalidateOrders());\r\n\t}, [dispatch, filter]);\r\n\r\n\tconst dispatchResetFilter = React.useCallback(() => {\r\n\t\tsetCurrentFilter(initialState.filter)\r\n\t}, [setCurrentFilter]);\r\n\r\n\treturn [filter, editFilter, dispatchSetFilter, changeState, dispatchResetFilter] as [\r\n\t\ttypeof filter,\r\n\t\ttypeof editFilter,\r\n\t\ttypeof dispatchSetFilter,\r\n\t\ttypeof changeState,\r\n\t\ttypeof dispatchResetFilter,\r\n\t];\r\n};\r\n\r\nexport const useCurrentTradesReportFilter = () => {\r\n\tconst filter = useSelector(store => store.ux.reports.tradesReport.filter);\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchRemoveFilter = React.useCallback(\r\n\t\t(type: keyof TradeFilter) => {\r\n\t\t\tdispatch(removeFilter(type));\r\n\t\t\tdispatch(invalidateOrders());\r\n\t\t},\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\treturn [filter, dispatchRemoveFilter] as [typeof filter, typeof dispatchRemoveFilter];\r\n};\r\n","import React from \"react\";\r\nimport FilterIcon from \"@material-ui/icons/FilterListOutlined\";\r\nimport { IconButton, Grid } from \"@material-ui/core\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport {\r\n\tuseCurrentTradesReportFilter,\r\n\tuseTradesReportFilter,\r\n} from \"../../../data/reports/tradesReport/hooks/useTradesReportFilter\";\r\nimport { TradesFilterChips } from \"../../trading/trades/TradesFilterChips\";\r\nimport { TradesFilterEditor } from \"../../trading/trades/TradesFilterEditor\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\r\nimport { useTheme } from '@material-ui/core/styles';\r\n\r\nexport const TradesFilterButton: React.FunctionComponent = () => {\r\n\tconst showWithDrawer = React.useContext(DisplayDrawerContext);\r\n\tconst showFilter = React.useCallback(() => showWithDrawer(), [showWithDrawer]);\r\n\r\n\tconst theme = useTheme();\r\n\tconst screenExtraSmall = useMediaQuery(theme.breakpoints.only('xs'));\r\n\r\n\tconst [filter, remnoveFilter] = useCurrentTradesReportFilter();\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\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\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};\r\n\r\nconst TradesFilterDrawer: React.FunctionComponent = () => {\r\n\tconst [filter, editFilter, save, , reset] = useTradesReportFilter();\r\n\r\n\treturn ;\r\n};\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\nimport { GetTradesParams, TradeFilter } from \"../../../trading/trades/types\";\r\n\r\nexport const getTradeBookReport = (\r\n\tuser: User,\r\n\tfilter?: TradeFilter,\r\n) => {\r\n\tconst params: GetTradesParams = {\r\n\t\tuserid: user.userId,\r\n\t\tprodid: filter?.product?.prodId,\r\n\t\tstatus: filter?.tradeStatus?.ftValue,\r\n\t\tdatefrom: getParamsDateString(filter?.datefrom),\r\n\t\tdateto: getParamsDateString(filter?.dateto),\r\n\t\tmarket: filter?.market,\r\n\t\tclientid: user.roleCode !== \"MEMTRADER\" && user.roleCode !== \"MEMMANAGER\" && user.roleCode !== \"MEMCONTACT\" ? filter?.client?.cliId : \"\",\r\n\t\tclient2id: user.roleCode === \"MEMTRADER\" || user.roleCode === \"MEMMANAGER\" || user.roleCode === \"MEMCONTACT\" ? filter?.client?.cliId : \"\",\r\n\t};\r\n\r\n\treturn httpWebApi({\r\n\t\tmethod: \"GET\",\r\n\t\tresponseType: \"blob\",\r\n\t\ttimeout: 60 * 4 * 1000,\r\n\t\turl: \"reporting/gettradebookreport\",\r\n\t\tparams,\r\n\t});\r\n};\r\n\r\nexport default getTradeBookReport;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadOrdersReport } from \"../thunks/downloadReport\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useTradesReportDownloader = () => {\r\n\tconst fetchState = useSelector(\r\n\t\ts => s.data.reports.tradesReport.downloadReportFetchState\r\n\t);\r\n\tconst dispatch = useDispatch();\r\n\tconst download = React.useCallback(() => dispatch(downloadOrdersReport()), [dispatch]);\r\n\r\n\treturn [download, fetchState] as [typeof download, typeof fetchState]\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getTradeBookReport } from \"../api/getTradeBookReport\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../tradesReportDataSlice\"\r\n\r\nexport const downloadOrdersReport = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst { filter } = store.ux.reports.tradesReport;\r\n\tconst user = store.data.auth.current.user;\r\n\tdispatch(setFetchState({ type: \"started\"}))\r\n\tconst ordersReport = await dispatch(getTradeBookReport(user, filter));\r\n\tif (ordersReport) {\r\n\t\tfileDownload(new Blob([ordersReport as any], { type: \"application/pdf\" }), \"TradeBook.pdf\");\r\n\t}\r\n\tdispatch(setFetchState({ type: \"not-started\"}))\r\n};\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\nimport { GetTradesParams, TradeFilter } from \"../../../trading/trades/types\";\r\n\r\nexport const getTradeBookExcel = (\r\n\tuser: User,\r\n\tfilter?: TradeFilter,\r\n) => {\r\n\tconst params: GetTradesParams = {\r\n\t\tuserid: user.userId,\r\n\t\tprodid: filter?.product?.prodId,\r\n\t\tstatus: filter?.tradeStatus?.ftValue,\r\n\t\tdatefrom: getParamsDateString(filter?.datefrom),\r\n\t\tdateto: getParamsDateString(filter?.dateto),\r\n\t\tmarket: filter?.market,\r\n\t\tclientid: user.roleCode !== \"MEMTRADER\" && user.roleCode !== \"MEMMANAGER\" && user.roleCode !== \"MEMCONTACT\"? filter?.client?.cliId : \"\",\r\n\t\tclient2id: user.roleCode === \"MEMTRADER\" || user.roleCode === \"MEMMANAGER\" || user.roleCode === \"MEMCONTACT\"? filter?.client?.cliId : \"\",\r\n\t\t};\r\n\r\n\treturn httpWebApi({\r\n\t\tmethod: \"GET\",\r\n\t\tresponseType: \"blob\",\r\n\t\ttimeout: 60 * 4 * 1000,\r\n\t\turl: \"reporting/gettradebookxls\",\r\n\t\tparams,\r\n\t});\r\n};\r\n\r\nexport default getTradeBookExcel;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadTradesReportExcel } from \"../thunks/downloadReportExcel\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useTradesExcelDownloader = () => {\r\n\tconst fetchState = useSelector(\r\n\t\ts => s.data.reports.tradesReport.downloadReportFetchState\r\n\t);\r\n\tconst dispatch = useDispatch();\r\n\tconst download = React.useCallback(() => dispatch(downloadTradesReportExcel()), [dispatch]);\r\n\r\n\treturn [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getTradeBookExcel } from \"../api/getTradeBookExcel\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../tradesReportDataSlice\"\r\n\r\nexport const downloadTradesReportExcel = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst { filter } = store.ux.reports.tradesReport;\r\n\tconst user = store.data.auth.current.user;\r\n\tdispatch(setFetchState({ type: \"started\"}))\r\n\tconst tradesReport = await dispatch(getTradeBookExcel(user, filter));\r\n\tif (tradesReport) {\r\n\t\tfileDownload(new Blob([tradesReport as any], { type: \"application/vnd.openxmlformat\" }), \"TradeBook.xlsx\");\r\n\t}\r\n\tdispatch(setFetchState({ type: \"not-started\"}))\r\n};\r\n","import React from \"react\";\r\nimport { useTradesReportDownloader } from \"../../../data/reports/tradesReport/hooks/useTradesReportDownloader\";\r\nimport { useTradesExcelDownloader } from \"../../../data/reports/tradesReport/hooks/useTradesExcelDownloader\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport ExcelIcon from \"@material-ui/icons/TableChartOutlined\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { CustomDialog } from \"../../components/common/CustomDialog\";\r\n\r\nexport const DownloadButton: React.FunctionComponent = () => {\r\n\tconst [downloader, fetchState] = useTradesReportDownloader();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\treturn (\r\n\t\t<>\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t{fetchState.type !== \"not-started\" ? getString(\"pleaseWait\") : null}\r\n\r\n\t\t{/*fetchState.type === \"started\" && */}\r\n\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport const DownloadExcelButton: React.FunctionComponent = () => {\r\n\tconst [downloader, fetchState] = useTradesExcelDownloader();\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport { Grid, CardContent, CardHeader, Card, Divider } from \"@material-ui/core\";\r\nimport OrdersTable from \"./TradesReportTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { PageComponent } from \"../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { useTradesReportData } from \"../../../data/reports/tradesReport/hooks/useTradesReportData\";\r\nimport { useTradesReportIndex } from \"../../../data/reports/tradesReport/hooks/useTradesReportIndex\";\r\nimport { PageDataStatus } from \"../../../data/models\";\r\nimport { TradesFilterButton } from \"./TradesReportFilter\";\r\nimport { DownloadButton, DownloadExcelButton } from \"./DownloadButton\";\r\n\r\nconst TradesReport: PageComponent = ({ userAccessRights }) => {\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst [pageData, dispatchLoadData] = useTradesReportData();\r\n\tconst [pageIndex, dispatchSetIndex] = useTradesReportIndex();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (pageData && pageData.status === PageDataStatus.DataInvalidated) {\r\n\t\t\tdispatchLoadData();\r\n\t\t}\r\n\t}, [dispatchLoadData, pageData]);\r\n\r\n\treturn (\r\n\t\t<>\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\t}\r\n\t\t\t\t\t\t\taction={}\r\n\t\t\t\t\t\t/>\r\n\t\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\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};\r\n\r\nexport const TradesReportActions: React.FunctionComponent = () => (\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\r\n)\r\n\r\nexport default TradesReport;\r\n","import TradesReport from \"./TradesReport\";\r\nimport { NavigationItem } from \"../../../core/navigation/types\";\r\nimport { tradesReportLocation, } from \"./Locations\";\r\n\r\nexport const tradesReportComponents: NavigationItem[] = [\r\n\t{\r\n\t\tComponent: TradesReport,\r\n\t\tisMenuItem: true,\r\n\t\tpath: tradesReportLocation,\r\n\t},\r\n];\r\n","export const tradesReportLocation = \"/reports/tradebookreport\"","import React from \"react\";\r\nimport { PaginationTable, PaginationDataProps } from \"../../components/common/PagginationTable\";\r\nimport { useTradeColumns } from \"./useTradesReportColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\nimport { TradeList } from \"../../../data/trading/trades/types\";\r\n\r\nexport interface OrderTableProps {\r\n\tuserAccessRights: AccessRights;\r\n\tgetData: () => void;\r\n}\r\n\r\ntype OrderTablePropsType = OrderTableProps & PaginationDataProps;\r\n\r\nconst OrdersTable: React.FunctionComponent = ({\r\n\tuserAccessRights,\r\n\tgetData,\r\n\t...tableProps\r\n}) => {\r\n\tconst columns = useTradeColumns();\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t{...tableProps}\r\n\t\t\tgetData={getData}\r\n\t\t\ttitle=\"\"\r\n\t\t\tcolumns={columns}\r\n\t\t\toptions={{\r\n\t\t\t\tactionsColumnIndex: -1,\r\n\t\t\t\tsearch: false,\r\n\t\t\t\ttoolbar: false,\r\n\t\t\t}}\r\n\t\t/>\r\n\t);\r\n};\r\n\r\nexport default OrdersTable;\r\n","import { TradeList } from \"../../../data/trading/trades/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\nimport { useOrderMarketOptionsTranslator } from \"../../../data/trading/orders/hooks/useOrderMarketOptions\";\r\nimport { TurnocateText } from \"../../trading/orders/columRenderers\";\r\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\r\nimport { useTheme } from '@material-ui/core/styles';\r\nexport const useTradeColumns = () => {\r\n\tconst { getString, getDateString, getDateTimeString, getFormatedNumberString } = React.useContext(LocalizationContext);\r\n\tconst marketTranslator = useOrderMarketOptionsTranslator();\r\n\r\n\tconst theme = useTheme();\r\n\tconst screenExtraSmall = useMediaQuery(theme.breakpoints.only('xs'));\r\n\r\n\treturn React.useMemo(\r\n\t\t() => [\r\n\t\t\t{\r\n\t\t\t\ttitle: screenExtraSmall ? getString(\"annualTradeReportDate\") : getString(\"tradeTime\"),\r\n\t\t\t\trender: (trade) => getDateString(trade.tradeTime, \"DD.MM.YYYY\"),\r\n\t\t\t\tsorting: false,\r\n\t\t\t\twidth: screenExtraSmall ? \"120px\" : \"160px\",\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\tmaxWidth: screenExtraSmall ? \"120px\" : \"160px\",\r\n\t\t\t\t\tminWidth: screenExtraSmall ? \"120px\" : \"160px\",\r\n\t\t\t\t\twidth: screenExtraSmall ? \"120px\" : \"160px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\tmaxWidth: screenExtraSmall ? \"120px\" : \"160px\",\r\n\t\t\t\t\tminWidth: screenExtraSmall ? \"120px\" : \"160px\",\r\n\t\t\t\t\twidth: screenExtraSmall ? \"120px\" : \"160px\",\r\n\t\t\t\t},\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"tradeProdName\"),\r\n\t\t\t\tfield: \"prodName\",\r\n\t\t\t\tsorting: false,\r\n\t\t\t\twidth: screenExtraSmall ? \"120px\" : \"160px\",\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\tmaxWidth: screenExtraSmall ? \"120px\" : \"160px\",\r\n\t\t\t\t\tminWidth: screenExtraSmall ? \"120px\" : \"160px\",\r\n\t\t\t\t\twidth: screenExtraSmall ? \"120px\" : \"160px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\tmaxWidth: screenExtraSmall ? \"120px\" : \"160px\",\r\n\t\t\t\t\tminWidth: screenExtraSmall ? \"120px\" : \"160px\",\r\n\t\t\t\t\twidth: screenExtraSmall ? \"120px\" : \"160px\",\r\n\t\t\t\t},\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"tradeQty\"),\r\n\t\t\t\trender: trade => `${getFormatedNumberString(trade.qty)} ${trade.unitDescr}`,\r\n\t\t\t\tsorting: false,\r\n\t\t\t\twidth: \"130px\",\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\tminWidth: \"130px\",\r\n\t\t\t\t\tmaxWidth: \"130px\",\r\n\t\t\t\t\twidth: \"130px\",\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\tminWidth: \"130px\",\r\n\t\t\t\t\tmaxWidth: \"130px\",\r\n\t\t\t\t\twidth: \"130px\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t},\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"orderPrice\"),\r\n\t\t\t\trender: trade => getFormatedNumberString(trade.price, true),\r\n\t\t\t\tsorting: false,\r\n\t\t\t\twidth: \"130px\",\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\tminWidth: \"130px\",\r\n\t\t\t\t\tmaxWidth: \"130px\",\r\n\t\t\t\t\twidth: \"130px\",\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\tminWidth: \"130px\",\r\n\t\t\t\t\tmaxWidth: \"130px\",\r\n\t\t\t\t\twidth: \"130px\",\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t},\r\n\t\t\t\t//hidden: screenExtraSmall,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"tradePriceWithVat\"),\r\n\t\t\t\trender: trade => getFormatedNumberString(trade.priceWithVat, true),\r\n\t\t\t\tsorting: false,\r\n\t\t\t\twidth: \"130px\",\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\tminWidth: \"130px\",\r\n\t\t\t\t\tmaxWidth: \"130px\",\r\n\t\t\t\t\twidth: \"130px\",\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\tminWidth: \"130px\",\r\n\t\t\t\t\tmaxWidth: \"130px\",\r\n\t\t\t\t\twidth: \"130px\",\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t},\r\n\t\t\t\thidden: screenExtraSmall,\r\n\t\t\t},\r\n\t\t\t//\t\t\t{\r\n\t\t\t//\t\t\t\ttitle: getString(\"orderMarket\"),\r\n\t\t\t//\t\t\t\trender: trade => marketTranslator(trade.market),\r\n\t\t\t//\t\t\t\tsorting: false,\r\n\t\t\t//\t\t\t\thidden: screenExtraSmall,\r\n\t\t\t//\t\t\t},\r\n\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"orderLocDistrict\"),\r\n\t\t\t\tfield: \"districtName\",\r\n\t\t\t\tsorting: false,\r\n\t\t\t\twidth: \"150px\",\r\n\t\t\t\t//\t\t\t\thidden: screenExtraSmall,\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\t\t\t\t\t\tminWidth: \"150px\",\r\n\t\t\t\t\t\t\t\t\t\tmaxWidth: \"150px\",\r\n\t\t\t\t\t\t\t\t\t\twidth: \"150px\",\r\n\t\t\t\t\t//\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"left\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\t\t\t\t\t\tminWidth: \"150px\",\r\n\t\t\t\t\t\t\t\t\t\tmaxWidth: \"150px\",\r\n\t\t\t\t\t\t\t\t\t\twidth: \"150px\",\r\n\t\t\t\t\t//\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"left\",\r\n\t\t\t\t},\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"orderFranco\"),\r\n\t\t\t\tfield: \"francoDescr\",\r\n\t\t\t\tsorting: false,\r\n\t\t\t\twidth: \"100px\",\r\n\t\t\t\t//\t\t\t\thidden: screenExtraSmall,\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\t\t\t\t\t\tminWidth: \"100px\",\r\n\t\t\t\t\t\t\t\t\t\tmaxWidth: \"100px\",\r\n\t\t\t\t\t\t\t\t\t\twidth: \"100px\",\r\n\t\t\t\t\t//\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"left\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\t\t\t\t\t\tminWidth: \"100px\",\r\n\t\t\t\t\t\t\t\t\t\tmaxWidth: \"100px\",\r\n\t\t\t\t\t\t\t\t\t\twidth: \"100px\",\r\n\t\t\t\t\t//\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"left\",\r\n\t\t\t\t},\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"orderAttrTitle\"),\r\n\t\t\t\tfield: \"orderAttributes\",\r\n\t\t\t\tsorting: false,\r\n\t\t\t\twidth: \"200px\",\r\n\t\t\t\t//\t\t\t\thidden: screenExtraSmall,\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\t\t\t\t\t\tminWidth: \"400px\",\r\n\t\t\t\t\t\t\t\t\t\tmaxWidth: \"400px\",\r\n\t\t\t\t\t\t\t\t\t\twidth: \"400px\",\r\n\t\t\t\t\t//\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"left\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\t\t\t\t\t\tminWidth: \"400px\",\r\n\t\t\t\t\t\t\t\t\t\tmaxWidth: \"400px\",\r\n\t\t\t\t\t\t\t\t\t\twidth: \"400px\",\r\n\t\t\t\t\t//\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"left\",\r\n\t\t\t\t},\r\n\t\t\t},\r\n\t\t],\r\n\t\t[getString, getDateTimeString, marketTranslator, screenExtraSmall]\r\n\t) as Column[];\r\n};\r\n","import { TradeList, GetTradesParams, TradeFilter } from \"../../../../data/trading/trades/types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nconst getTradesWebApi = (\r\n user: User,\r\n page?: number,\r\n itemsPerPage?: number,\r\n filter?: TradeFilter,\r\n) => {\r\n \r\n const params: GetTradesParams = {\r\n userid: user.userId,\r\n numofrows: itemsPerPage,\r\n fromrow: page && itemsPerPage ? page * itemsPerPage : undefined,\r\n status: filter?.tradeStatus?.ftValue,\r\n datefrom: getParamsDateString(filter?.datefrom),\r\n dateto: getParamsDateString(filter?.dateto),\r\n prodid: filter?.product?.prodId,\r\n delivstatus: filter?.delivstatus?.ftValue,\r\n// cliid: user.clientId,\r\n market: filter?.market,\r\n allTrades: \"Y\",\r\n clientid: user.roleCode !== \"MEMTRADER\" && user.roleCode !== \"MEMMANAGER\" && user.roleCode !== \"MEMCONTACT\"? filter?.client?.cliId : \"\",\r\n client2id: user.roleCode === \"MEMTRADER\" || user.roleCode === \"MEMMANAGER\" || user.roleCode === \"MEMCONTACT\"? filter?.client?.cliId : \"\",\r\n};\r\n\r\n return webApiWithResponse({\r\n method: \"GET\",\r\n url: \"trade/gettradelist\",\r\n params,\r\n });\r\n};\r\n\r\nexport default getTradesWebApi;\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getTrades from \"../api/getTrades\";\r\nimport { PageDataStatus, PageData } from \"../../../models\";\r\nimport { TradeFilter, TradeList } from \"../../../../data/trading/trades/types\";\r\n\r\nexport const getTradesThunk = (\r\n\tpageNumber?: number,\r\n\titemsPerPage?: number,\r\n\tfilter?: TradeFilter\r\n): ThunkType | undefined>> => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst user = store.data.auth.current.user;\r\n\r\n\tconst tradesData = await dispatch(getTrades(user, pageNumber, itemsPerPage, filter));\r\n\r\n\tif (!tradesData || tradesData.resCode !== \"OK\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\treturn {\r\n\t\tcurrentPageData: tradesData.obj,\r\n\t\ttotalCount: Number(tradesData.resDesc) || 0,\r\n\t\tstatus: PageDataStatus.DataCurrent,\r\n\t};\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadReport } from \"../thunks/loadTradesReport\";\r\nimport { TradeList } from \"../../../trading/trades/types\";\r\nimport { PageData } from \"../../../models\";\r\n\r\nexport const useTradesReportData = () => {\r\n const pageData = useSelector | undefined>(\r\n (s) => s.data.reports.tradesReportAll.currentPage\r\n );\r\n \r\n const dispatch = useDispatch();\r\n const dispatchLoadPage = React.useCallback(\r\n () => dispatch(loadReport()),\r\n [dispatch]\r\n );\r\n\r\n return [pageData, dispatchLoadPage] as [\r\n typeof pageData,\r\n typeof dispatchLoadPage,\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { setTrades, invalidateOrders } from \"../tradesReportDataSliceAll\";\r\nimport { setIndex } from \"../../tradesReport/tradesReportUXSlice\";\r\nimport { PageIndex } from \"../../../models\";\r\nimport { getTradesThunk } from \"./getTradesThunk\";\r\n\r\nexport const loadReport = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tconst { pageNumber, itemsPerPage } = store.ux.reports.tradesReportAll.index;\r\n\tconst { filter } = store.ux.reports.tradesReportAll;\r\n\r\n\tconst pagedTrades = await dispatch(getTradesThunk(pageNumber, itemsPerPage, filter));\r\n\r\n\r\n\tif (pagedTrades) {\r\n\t\tdispatch(setTrades(pagedTrades));\r\n\t}\r\n};\r\n\r\nexport const setIndexThunk = (index: PageIndex): ThunkType => dispatch => {\r\n\tdispatch(setIndex(index));\r\n\tdispatch(invalidateOrders());\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { resetIndex } from \"../tradesReportUXSliceAll\";\r\nimport { PageIndex } from \"../../../models\";\r\nimport { setIndexThunk } from \"../thunks/loadTradesReport\";\r\n\r\nexport const useTradesReportIndex = () => {\r\n\tconst pageIndex = useSelector(s => s.ux.reports.tradesReportAll.index);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchSetIndex = React.useCallback((index: PageIndex) => dispatch(setIndexThunk(index)), [\r\n\t\tdispatch,\r\n\t]);\r\n\tconst dispatchResetIndex = React.useCallback(() => dispatch(resetIndex()), [dispatch]);\r\n\r\n\treturn [pageIndex, dispatchSetIndex, dispatchResetIndex] as [\r\n\t\ttypeof pageIndex,\r\n\t\ttypeof dispatchSetIndex,\r\n\t\ttypeof dispatchResetIndex\r\n\t];\r\n};\r\n","import { useCopiedState } from \"../../../../core/util/hooks\";\r\nimport { setFilter, removeFilter, initialState } from \"../tradesReportUXSliceAll\";\r\nimport { invalidateOrders } from \"../tradesReportDataSliceAll\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { TradeFilter } from \"../../../trading/trades/types\"\r\nimport React from \"react\";\r\n\r\nexport const useTradesReportFilter = () => {\r\n\tconst [storeFilter] = useCurrentTradesReportFilter();\r\n\tconst [filter, editFilter, changeState, setCurrentFilter] = useCopiedState(storeFilter);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchSetFilter = React.useCallback(() => {\r\n\t\tdispatch(setFilter(filter!));\r\n\t\tdispatch(invalidateOrders());\r\n\t}, [dispatch, filter]);\r\n\r\n\tconst dispatchResetFilter = React.useCallback(() => {\r\n\t\tsetCurrentFilter(initialState.filter)\r\n\t}, [setCurrentFilter]);\r\n\r\n\treturn [filter, editFilter, dispatchSetFilter, changeState, dispatchResetFilter] as [\r\n\t\ttypeof filter,\r\n\t\ttypeof editFilter,\r\n\t\ttypeof dispatchSetFilter,\r\n\t\ttypeof changeState,\r\n\t\ttypeof dispatchResetFilter,\r\n\t];\r\n};\r\n\r\nexport const useCurrentTradesReportFilter = () => {\r\n\tconst filter = useSelector(store => store.ux.reports.tradesReportAll.filter);\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchRemoveFilter = React.useCallback(\r\n\t\t(type: keyof TradeFilter) => {\r\n\t\t\tdispatch(removeFilter(type));\r\n\t\t\tdispatch(invalidateOrders());\r\n\t\t},\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\treturn [filter, dispatchRemoveFilter] as [typeof filter, typeof dispatchRemoveFilter];\r\n};\r\n","import React from \"react\";\r\nimport { Paper, Grid, Button } from \"@material-ui/core\";\r\nimport { DateInput } from \"../../components/common/DateInput\";\r\nimport { ProductSelect } from \"../../components/listing/ProductSelect\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { TradeStatusSelect } from \"../../components/common/TradeStatusSelect\";\r\nimport { isValidDate } from \"../../../core/util/functions\";\r\nimport { TradeFilter } from \"../../../data/trading/trades/types\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { OrderMarketSelect } from \"../../trading/orders/OrderMarketSelect\";\r\nimport { useAuth } from \"../../../data/auth/hooks\";\r\n\r\nexport interface TradesFilterEditorProps {\r\n\tfilter?: TradeFilter;\r\n\teditFilter: (prop: keyof TradeFilter, value: any) => void;\r\n\tsave: () => void;\r\n\treset: () => void;\r\n}\r\n\r\nexport const TradesFilterEditor: React.FunctionComponent = ({\r\n\tfilter,\r\n\teditFilter,\r\n\tsave,\r\n\treset,\r\n}) => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst showWithDrawer = React.useContext(DisplayDrawerContext);\r\n\r\n\tconst [auth] = useAuth();\r\n\r\n\tif (auth.status !== \"successful\") {\r\n\t\treturn null;\r\n\t}\r\n\r\n\treturn (\r\n\t\t\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\t\r\n\t\t\t\t\t\t\t\teditFilter(\"datefrom\", isValidDate(date) ? date.toISOString() : undefined)\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\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\teditFilter(\"dateto\", isValidDate(date) ? date.toISOString() : undefined)\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\t\r\n\t\t\t\t\t prod.prodId === filter?.product?.prodId}\r\n\t\t\t\t\t\tonChangeItem={prod => {\r\n\t\t\t\t\t\t\teditFilter(\"product\", prod);\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\t\r\n\t\t\t\t\t editFilter(\"market\", e.target.value)}\r\n\t\t\t\t\t\tmarket={filter?.market}\r\n\t\t\t\t\t\tnullable\r\n\t\t\t\t\t/>\r\n\t\t\t\t\r\n\r\n\t\t\t\t\r\n\t\t\t\t\t status.ftValue === filter?.tradeStatus?.ftValue}\r\n\t\t\t\t\t\tonChangeItem={status => {\r\n\t\t\t\t\t\t\teditFilter(\"tradeStatus\", status);\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\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\tsave();\r\n\t\t\t\t\t\t\t\tshowWithDrawer(undefined);\r\n\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t{getString(\"orderFilterConfirm\")}\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};\r\n","import React from \"react\";\r\nimport FilterIcon from \"@material-ui/icons/FilterListOutlined\";\r\nimport { IconButton, Grid } from \"@material-ui/core\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport {\r\n\tuseCurrentTradesReportFilter,\r\n\tuseTradesReportFilter,\r\n} from \"../../../data/reports/tradesReportClientAll/hooks/useTradesReportFilter\";\r\nimport { TradesFilterChips } from \"../../trading/trades/TradesFilterChips\";\r\nimport { TradesFilterEditor } from \"./TradesFilterEditor\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\r\nimport { useTheme } from '@material-ui/core/styles';\r\n\r\nexport const TradesFilterButton: React.FunctionComponent = () => {\r\n\tconst showWithDrawer = React.useContext(DisplayDrawerContext);\r\n\tconst showFilter = React.useCallback(() => showWithDrawer(), [showWithDrawer]);\r\n\r\n\tconst theme = useTheme();\r\n\tconst screenExtraSmall = useMediaQuery(theme.breakpoints.only('xs'));\r\n\r\n\tconst [filter, remnoveFilter] = useCurrentTradesReportFilter();\r\n\r\n\tconsole.log(filter)\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\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\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};\r\n\r\nconst TradesFilterDrawer: React.FunctionComponent = () => {\r\n\tconst [filter, editFilter, save, , reset] = useTradesReportFilter();\r\n\r\n\treturn ;\r\n};\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\nimport { GetTradesParams, TradeFilter } from \"../../../trading/trades/types\";\r\n\r\nexport const getTradeBookReport = (\r\n\tuser: User,\r\n\tfilter?: TradeFilter,\r\n) => {\r\n\tconst params: GetTradesParams = {\r\n\t\tuserid: user.userId,\r\n\t\tprodid: filter?.product?.prodId,\r\n\t\tstatus: filter?.tradeStatus?.ftValue,\r\n\t\tdatefrom: getParamsDateString(filter?.datefrom),\r\n\t\tdateto: getParamsDateString(filter?.dateto),\r\n\t\tmarket: filter?.market,\r\n\t\tallTrades: \"Y\",\r\n\t\t};\r\n\r\n\treturn httpWebApi({\r\n\t\tmethod: \"GET\",\r\n\t\tresponseType: \"blob\",\r\n\t\ttimeout: 60 * 4 * 1000,\r\n\t\turl: \"reporting/gettradebookreport\",\r\n\t\tparams,\r\n\t});\r\n};\r\n\r\nexport default getTradeBookReport;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadOrdersReport } from \"../thunks/downloadReport\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useTradesReportDownloader = () => {\r\n\tconst fetchState = useSelector(\r\n\t\ts => s.data.reports.tradesReportAll.downloadReportFetchState\r\n\t);\r\n\tconst dispatch = useDispatch();\r\n\tconst download = React.useCallback(() => dispatch(downloadOrdersReport()), [dispatch]);\r\n\r\n\treturn [download, fetchState] as [typeof download, typeof fetchState]\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getTradeBookReport } from \"../api/getTradeBookReport\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../tradesReportDataSliceAll\"\r\n\r\nexport const downloadOrdersReport = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst { filter } = store.ux.reports.tradesReportAll;\r\n\tconst user = store.data.auth.current.user;\r\n\tdispatch(setFetchState({ type: \"started\"}))\r\n\tconst ordersReport = await dispatch(getTradeBookReport(user, filter));\r\n\tif (ordersReport) {\r\n\t\tfileDownload(new Blob([ordersReport as any], { type: \"application/pdf\" }), \"TradeBookAll.pdf\");\r\n\t}\r\n\tdispatch(setFetchState({ type: \"not-started\"}))\r\n};\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\nimport { GetTradesParams, TradeFilter } from \"../../../trading/trades/types\";\r\n\r\nexport const getTradeBookExcel = (\r\n\tuser: User,\r\n\tfilter?: TradeFilter,\r\n) => {\r\n\tconst params: GetTradesParams = {\r\n\t\tuserid: user.userId,\r\n\t\tprodid: filter?.product?.prodId,\r\n\t\tstatus: filter?.tradeStatus?.ftValue,\r\n\t\tdatefrom: getParamsDateString(filter?.datefrom),\r\n\t\tdateto: getParamsDateString(filter?.dateto),\r\n\t\tmarket: filter?.market,\r\n\t\tallTrades: \"Y\",\r\n\t\t};\r\n\r\n\treturn httpWebApi({\r\n\t\tmethod: \"GET\",\r\n\t\tresponseType: \"blob\",\r\n\t\ttimeout: 60 * 4 * 1000,\r\n\t\turl: \"reporting/gettradebookxls\",\r\n\t\tparams,\r\n\t});\r\n};\r\n\r\nexport default getTradeBookExcel;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadTradesReportExcel } from \"../thunks/downloadReportExcel\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useTradesExcelDownloader = () => {\r\n\tconst fetchState = useSelector(\r\n\t\ts => s.data.reports.tradesReportAll.downloadReportFetchState\r\n\t);\r\n\tconst dispatch = useDispatch();\r\n\tconst download = React.useCallback(() => dispatch(downloadTradesReportExcel()), [dispatch]);\r\n\r\n\treturn [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getTradeBookExcel } from \"../api/getTradeBookExcel\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../tradesReportDataSliceAll\"\r\n\r\nexport const downloadTradesReportExcel = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst { filter } = store.ux.reports.tradesReportAll;\r\n\tconst user = store.data.auth.current.user;\r\n\tdispatch(setFetchState({ type: \"started\"}))\r\n\tconst tradesReport = await dispatch(getTradeBookExcel(user, filter));\r\n\tif (tradesReport) {\r\n\t\tfileDownload(new Blob([tradesReport as any], { type: \"application/vnd.openxmlformat\" }), \"TradeBookAll.xlsx\");\r\n\t}\r\n\tdispatch(setFetchState({ type: \"not-started\"}))\r\n};\r\n","import React from \"react\";\r\nimport { useTradesReportDownloader } from \"../../../data/reports/tradesReportClientAll/hooks/useTradesReportDownloader\";\r\nimport { useTradesExcelDownloader } from \"../../../data/reports/tradesReportClientAll/hooks/useTradesExcelDownloader\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport ExcelIcon from \"@material-ui/icons/TableChartOutlined\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { CustomDialog } from \"../../components/common/CustomDialog\";\r\n\r\nexport const DownloadButton: React.FunctionComponent = () => {\r\n\tconst [downloader, fetchState] = useTradesReportDownloader();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\treturn (\r\n\t\t<>\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t{fetchState.type !== \"not-started\" ? getString(\"pleaseWait\") : null}\r\n\r\n\t\t{/*fetchState.type === \"started\" && */}\r\n\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport const DownloadExcelButton: React.FunctionComponent = () => {\r\n\tconst [downloader, fetchState] = useTradesExcelDownloader();\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport { Grid, CardContent, CardHeader, Card, Divider } from \"@material-ui/core\";\r\nimport OrdersTable from \"./TradesReportTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { PageComponent } from \"../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { useTradesReportData } from \"../../../data/reports/tradesReportClientAll/hooks/useTradesReportData\";\r\nimport { useTradesReportIndex } from \"../../../data/reports/tradesReportClientAll/hooks/useTradesReportIndex\";\r\nimport { PageDataStatus } from \"../../../data/models\";\r\nimport { TradesFilterButton } from \"./TradesReportFilter\";\r\nimport { DownloadButton, DownloadExcelButton } from \"./DownloadButton\";\r\n\r\nconst TradesReport: PageComponent = ({ userAccessRights }) => {\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst [pageData, dispatchLoadData] = useTradesReportData();\r\n\tconst [pageIndex, dispatchSetIndex] = useTradesReportIndex();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (pageData && pageData.status === PageDataStatus.DataInvalidated) {\r\n\t\t\tdispatchLoadData();\r\n\t\t}\r\n\t}, [dispatchLoadData, pageData]);\r\n\r\n\treturn (\r\n\t\t<>\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\t}\r\n\t\t\t\t\t\t\taction={}\r\n\t\t\t\t\t\t/>\r\n\t\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\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};\r\n\r\nexport const TradesReportActions: React.FunctionComponent = () => (\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n)\r\n\r\nexport default TradesReport;\r\n","import TradesReport from \"./TradesReport\";\r\nimport { NavigationItem } from \"../../../core/navigation/types\";\r\nimport { tradesReportAllLocation, } from \"./Locations\";\r\n\r\nexport const tradesReportAllComponents: NavigationItem[] = [\r\n\t{\r\n\t\tComponent: TradesReport,\r\n\t\tisMenuItem: true,\r\n\t\tpath: tradesReportAllLocation,\r\n\t},\r\n];\r\n","export const tradesReportAllLocation = \"/reports/alltrades\"","import { DailyTradingReportData, DailyTradingReportFilter } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nconst getDailyTradingData = (\r\n user: User,\r\n filter: DailyTradingReportFilter,\r\n) => {\r\n\r\n return webApi({\r\n method: \"GET\",\r\n url: \"reporting/getdailytradinglist\",\r\n params: {\r\n userid: user.userId,\r\n reportdate: getParamsDateString(filter.reportDate)\r\n },\r\n });\r\n};\r\n\r\nexport default getDailyTradingData;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadReport } from \"../thunks/loadReportData\";\r\nimport { DailyTradingReportData } from \"../types\";\r\n\r\nexport const useTradesReportData = () => {\r\n const data = useSelector(\r\n (s) => s.data.reports.dailyTrade.data\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadData = React.useCallback(\r\n () => dispatch(loadReport()),\r\n [dispatch]\r\n );\r\n\r\n return [data, dispatchLoadData] as [\r\n typeof data,\r\n typeof dispatchLoadData,\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { setData } from \"../dailyTradeDataSlice\";\r\nimport getDailyTradingDataApi from \"../api/getDailyTradingData\";\r\n\r\nexport const loadReport = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst user = store.data.auth.current.user;\r\n\tconst { filter } = store.ux.reports.dailyTrade;\r\n\r\n\tconst pagedTrades = await dispatch(getDailyTradingDataApi(user, filter));\r\n\r\n\tdispatch(setData(pagedTrades || []));\r\n};\r\n","import React from \"react\";\r\nimport { useDailyTradesColumns } from \"./useDailyTradingReportColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\nimport { ControledTable } from \"../../components/common/ControledTable\";\r\nimport { DailyTradingReportData } from \"../../../data/reports/dailyTrade/types\";\r\nimport { useDailyTradesReportIndex } from \"../../../data/reports/dailyTrade/hooks/useDailyTradesReportIndex\";\r\nimport { useTradesReportData } from \"../../../data/reports/dailyTrade/hooks/useTradesReportData\";\r\n\r\nexport interface OrderTableProps {\r\n userAccessRights: AccessRights;\r\n}\r\n\r\ntype OrderTablePropsType = OrderTableProps;\r\n\r\nconst DailyTradesReportTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n ...tableProps\r\n}) => {\r\n const columns = useDailyTradesColumns();\r\n const [data, load] = useTradesReportData();\r\n const [index, setIndex] = useDailyTradesReportIndex();\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={load}\r\n onPageIndexChange={setIndex}\r\n pageIndex={index}\r\n immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default DailyTradesReportTable;\r\n","import { DailyTradingReportData } from \"../../../data/reports/dailyTrade/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\r\nimport { useTheme } from '@material-ui/core/styles';\r\n\r\nexport const useDailyTradesColumns = () => {\r\n\tconst { getString, getFormatedNumberString } = React.useContext(LocalizationContext);\r\n\r\n\tconst theme = useTheme();\r\n\tconst screenExtraSmall = useMediaQuery(theme.breakpoints.only('xs'));\r\n\r\n\treturn React.useMemo(\r\n\t\t() => [\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"dailyTradeReportProduct\"),\r\n\t\t\t\tfield: \"productName\",\r\n\t\t\t\tsorting: false,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"dailyTradeReportTurnoverRSD\"),\r\n\t\t\t\trender: row => `${getFormatedNumberString(row.turnoverRsd,true)}`,\r\n\t\t\t\tsorting: false,\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t},\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"dailyTradeReportTurnoverEUR\"),\r\n\t\t\t\trender: row => `${getFormatedNumberString(row.turnoverEur,true)}`,\r\n\t\t\t\tsorting: false,\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t},\r\n\t\t\t\thidden: screenExtraSmall,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"dailyTradeReportCountTransaction\"),\r\n\t\t\t\tfield: \"transactionCount\",\r\n\t\t\t\tsorting: false,\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t},\r\n\t\t\t\thidden: screenExtraSmall,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"dailyTradeReportQuantity\"),\r\n\t\t\t\tfield: \"quantity\",\r\n\t\t\t\tsorting: false,\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t},\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"dailyTradeReportReportWeightedRSD\"),\r\n\t\t\t\trender: row => `${getFormatedNumberString(row.weightedPriceRsd,true)}`,\r\n\t\t\t\tsorting: false,\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t},\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"dailyTradeReportReportWeightedEUR\"),\r\n\t\t\t\trender: row => `${getFormatedNumberString(row.weightedPriceEur,true)}`,\r\n\t\t\t\tsorting: false,\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t},\r\n\t\t\t\thidden: screenExtraSmall,\r\n\t\t\t},\r\n\t\t],\r\n\t\t[getString, getFormatedNumberString, screenExtraSmall]\r\n\t) as Column[];\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { setIndex } from \"../dailyTradeUXSlice\";\r\nimport { PageIndex } from \"../../../models\";\r\n\r\nexport const useDailyTradesReportIndex = () => {\r\n const pageIndex = useSelector(\r\n (s) => s.ux.reports.dailyTrade.index\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetIndex = React.useCallback(\r\n (index: PageIndex) => dispatch(setIndex(index)),\r\n [dispatch]\r\n );\r\n\r\n return [pageIndex, dispatchSetIndex] as [\r\n typeof pageIndex,\r\n typeof dispatchSetIndex\r\n ];\r\n};\r\n","import React from \"react\";\r\nimport { Grid } from \"@material-ui/core\";\r\nimport { useCurrentTradesReportFilter } from \"../../../data/reports/dailyTrade/hooks/useTradesReportFilter\";\r\nimport { DateInput } from \"../../components/common/DateInput\";\r\nimport { isValidDate } from \"../../../core/util/functions\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\n\r\nexport const DailyTradesReportFilter: React.FunctionComponent = () => {\r\n\tconst [filter, setReportDate] = useCurrentTradesReportFilter();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t {\r\n\t\t\t\t\t\tif (isValidDate(date)) {\r\n\t\t\t\t\t\t\tsetReportDate(date.toISOString());\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};\r\n","import { setReportData } from \"../dailyTradeUXSlice\";\r\nimport { setData } from \"../dailyTradeDataSlice\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport React from \"react\";\r\nimport { DailyTradingReportFilter } from \"../types\";\r\n\r\nexport const useCurrentTradesReportFilter = () => {\r\n\tconst filter = useSelector(\r\n\t\tstore => store.ux.reports.dailyTrade.filter\r\n\t);\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchSetReportDate = React.useCallback(\r\n\t\t(reportDate: string) => {\r\n\t\t\tdispatch(setReportData(reportDate));\r\n\t\t\tdispatch(setData());\r\n\t\t},\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\treturn [filter, dispatchSetReportDate] as [typeof filter, typeof dispatchSetReportDate];\r\n};\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\nimport { DailyTradingReportFilter } from \"../types\";\r\n\r\nexport const getDailyTradingReport = (user: User, filter: DailyTradingReportFilter) => {\r\n\treturn httpWebApi({\r\n\t\tmethod: \"GET\",\r\n\t\tresponseType: \"blob\",\r\n\t\ttimeout: 60 * 4 * 1000,\r\n\t\turl: \"reporting/getdailytradingreport\",\r\n\t\tparams: {\r\n\t\t\tuserid: user.userId,\r\n\t\t\treportdate: getParamsDateString(filter.reportDate),\r\n\t\t},\r\n\t});\r\n};\r\n\r\nexport default getDailyTradingReport;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadOrdersReport } from \"../thunks/downloadReport\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useTradesReportDownloader = () => {\r\n\tconst fetchState = useSelector(\r\n\t\ts => s.data.reports.dailyTrade.downloadReportFetchState\r\n\t);\r\n\tconst dispatch = useDispatch();\r\n\tconst download = React.useCallback(() => dispatch(downloadOrdersReport()), [dispatch]);\r\n\r\n\treturn [download, fetchState] as [typeof download, typeof fetchState]\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getDailyTradingReport } from \"../api/getDailyTradingReport\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../dailyTradeDataSlice\";\r\n\r\nexport const downloadOrdersReport = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst { filter } = store.ux.reports.dailyTrade;\r\n\tconst user = store.data.auth.current.user;\r\n\tdispatch(setFetchState({ type: \"started\" }));\r\n\tconst ordersReport = await dispatch(getDailyTradingReport(user, filter));\r\n\tif (ordersReport) {\r\n\t\tfileDownload(new Blob([ordersReport as any], { type: \"application/pdf\" }), \"DailyTrading.pdf\");\r\n\t}\r\n\tdispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import { DailyTradingReportFilter } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nexport const getDailyTradingExcel = (\r\n user: User,\r\n filter: DailyTradingReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getdailytradingxls\",\r\n params: {\r\n userid: user.userId,\r\n reportdate: getParamsDateString(filter.reportDate),\r\n },\r\n });\r\n};\r\n\r\nexport default getDailyTradingExcel;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadDailyTradingExcel } from \"../thunks/downloadReportExcel\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useDailyTradingExcelDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.dailyTrade.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadDailyTradingExcel()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getDailyTradingExcel } from \"../api/getDailyTradingExcel\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../dailyTradeDataSlice\";\r\n\r\nexport const downloadDailyTradingExcel = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.dailyTrade;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const dailyTrading = await dispatch(getDailyTradingExcel(user, filter));\r\n if (dailyTrading) {\r\n fileDownload(\r\n new Blob([dailyTrading as any], {\r\n type: \"application/vnd.openxmlformat\",\r\n }),\r\n \"DailyTrading.xlsx\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import React from \"react\";\r\nimport { useTradesReportDownloader } from \"../../../data/reports/dailyTrade/hooks/useTradesReportDownloader\";\r\nimport { useDailyTradingExcelDownloader } from \"../../../data/reports/dailyTrade/hooks/useDailyTradingExcelDownloader\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport ExcelIcon from \"@material-ui/icons/TableChartOutlined\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\n\r\nexport const DownloadButton: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useTradesReportDownloader();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const DownloadExcelButton: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useDailyTradingExcelDownloader();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport {\r\n Grid,\r\n CardContent,\r\n CardHeader,\r\n Card,\r\n Divider,\r\n} from \"@material-ui/core\";\r\nimport DailyTradesReportTable from \"./DailyTradesReportTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { PageComponent } from \"../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { DailyTradesReportFilter } from \"./DailyTradesReportFilter\";\r\nimport { DownloadButton, DownloadExcelButton } from \"./DownloadButton\";\r\n\r\nconst DailyTradesReport: PageComponent = ({ userAccessRights }) => {\r\n const pageStyles = usePageStyles();\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n }\r\n action={}\r\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 DailyTradesReportActions: React.FunctionComponent = () => (\r\n \r\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 DailyTradesReport;\r\n","import DailyTradesReport from \"./DailyTradesReport\";\r\nimport { NavigationItem } from \"../../../core/navigation/types\";\r\nimport { dailyTradesReportLocation, } from \"./Locations\";\r\n\r\nexport const dailyTradesReportComponents: NavigationItem[] = [\r\n\t{\r\n\t\tComponent: DailyTradesReport,\r\n\t\tisMenuItem: true,\r\n\t\tpath: dailyTradesReportLocation,\r\n\t},\r\n];\r\n","export const dailyTradesReportLocation = \"/reports/dailyreports\"","import { WeeklyTradingReportData, WeeklyTradingReportFilter } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nconst getWeeklyTradingData = (\r\n user: User,\r\n filter: WeeklyTradingReportFilter\r\n) => {\r\n return webApi({\r\n method: \"GET\",\r\n url: \"reporting/getweeklytradinglist\",\r\n params: {\r\n userid: user.userId,\r\n numofweeks: filter.numofweeks,\r\n },\r\n });\r\n};\r\n\r\nexport default getWeeklyTradingData;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadReport } from \"../thunks/loadReportData\";\r\nimport { WeeklyTradingReportData } from \"../types\";\r\n\r\nexport const useTradesReportData = () => {\r\n const data = useSelector(\r\n (s) => s.data.reports.weeklyTrade.data\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadData = React.useCallback(() => dispatch(loadReport()), [\r\n dispatch,\r\n ]);\r\n\r\n return [data, dispatchLoadData] as [typeof data, typeof dispatchLoadData];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { setData } from \"../weeklyTradeDataSlice\";\r\nimport getWeeklyTradingDataApi from \"../api/getWeeklyTradingDataList\";\r\n\r\nexport const loadReport = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const user = store.data.auth.current.user;\r\n const { filter } = store.ux.reports.weeklyTrade;\r\n\r\n const pagedTrades = await dispatch(getWeeklyTradingDataApi(user, filter));\r\n\r\n dispatch(setData(pagedTrades || []));\r\n};\r\n","export const weeklyTradesReportLocation = \"/reports/weeklyreports\";\r\n\r\nexport const getReportLocation = (\r\n basePath: string,\r\n year: number,\r\n week: number\r\n) => {\r\n return `${basePath}/${year}/${week}`;\r\n};\r\n\r\nexport const weeklyProductLocationBase = \"/reports/weeklyreports/products\";\r\nexport const weeklyClientLocationBase = \"/reports/weeklyreports/client\";\r\nexport const weeklyDateLocationBase = \"/reports/weeklyreports/date\";\r\n\r\nexport const weeklyProductLocation = `${weeklyProductLocationBase}/:year/:week`;\r\nexport const weeklyClientLocation = `${weeklyClientLocationBase}/:year/:week`;\r\nexport const weeklyDateLocation = `${weeklyDateLocationBase}/:year/:week`;\r\n\r\nexport const getProductLocation = (year: number, week: number) =>\r\n getReportLocation(weeklyProductLocationBase, year, week);\r\nexport const getClientLocation = (year: number, week: number) =>\r\n getReportLocation(weeklyClientLocationBase, year, week);\r\nexport const getDateLocation = (year: number, week: number) =>\r\n getReportLocation(weeklyDateLocationBase, year, week);\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport { WeeklyTradingReportData } from \"../../../data/reports/weeklyTrade/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Action } from \"material-table\";\r\nimport { useHistory } from \"react-router-dom\";\r\n//import { useViewBank } from \"./DisplayBank\";\r\nimport {\r\n getProductLocation,\r\n getClientLocation,\r\n getDateLocation,\r\n} from \"./Locations\";\r\nimport EventOutlinedIcon from \"@material-ui/icons/EventOutlined\";\r\nimport PeopleOutlineOutlinedIcon from \"@material-ui/icons/PeopleOutlineOutlined\";\r\nimport LocalShippingOutlinedIcon from \"@material-ui/icons/LocalShippingOutlined\";\r\nimport { useAuth } from \"../../../data/auth/hooks\";\r\n\r\nexport const useWeeklyActions = () => {\r\n const { getString } = useContext(LocalizationContext);\r\n\r\n const history = useHistory();\r\n\r\n const [auth] = useAuth();\r\n\r\n return useMemo(() => {\r\n const result: Action[] = [\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"wTableProduct\"),\r\n onClick: (event, rowData) => {\r\n const reportData = rowData as WeeklyTradingReportData;\r\n history.push(\r\n getProductLocation(reportData.year, reportData.yearPart)\r\n );\r\n },\r\n },\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"wTableClient\"),\r\n onClick: (event, rowData) => {\r\n const reportData = rowData as WeeklyTradingReportData;\r\n history.push(getClientLocation(reportData.year, reportData.yearPart));\r\n },\r\n hidden: auth.status === \"successful\" && (auth.user.roleCode === \"MEMTRADER\" || auth.user.roleCode === \"MEMMANAGER\" || auth.user.roleCode === \"MEMCONTACT\" ) \r\n },\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"wTableDate\"),\r\n onClick: (event, rowData) => {\r\n const reportData = rowData as WeeklyTradingReportData;\r\n history.push(getDateLocation(reportData.year, reportData.yearPart));\r\n },\r\n },\r\n ];\r\n\r\n return result;\r\n }, [, , getString]);\r\n};\r\n","import React from \"react\";\r\nimport { useWeeklyTradesColumns } from \"./useWeeklyTradingReportColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\nimport { ControledTable } from \"../../components/common/ControledTable\";\r\nimport { WeeklyTradingReportData } from \"../../../data/reports/weeklyTrade/types\";\r\nimport { useTradesReportData } from \"../../../data/reports/weeklyTrade/hooks/useTradesReportData\";\r\nimport { useWeeklyTradesReportIndex } from \"../../../data/reports/weeklyTrade/hooks/useWeeklyTradesReportIndex\";\r\nimport { useWeeklyActions } from \"./useWeeklyActions\";\r\n\r\nexport interface WeeklyTradesTableProps {\r\n userAccessRights: AccessRights;\r\n}\r\n\r\ntype WeeklyTradesTablePropsType = WeeklyTradesTableProps;\r\n\r\nconst WeeklyTradesReportTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n ...tableProps\r\n}) => {\r\n const actions = useWeeklyActions();\r\n const columns = useWeeklyTradesColumns();\r\n\r\n const [data, load] = useTradesReportData();\r\n const [index, setIndex] = useWeeklyTradesReportIndex();\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={load}\r\n onPageIndexChange={setIndex}\r\n pageIndex={index}\r\n immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n actions={actions}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default WeeklyTradesReportTable;\r\n","import { WeeklyTradingReportData } from \"../../../data/reports/weeklyTrade/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\r\nimport { useTheme } from '@material-ui/core/styles';\r\n\r\nexport const useWeeklyTradesColumns = () => {\r\n const { getString, getFormatedNumberString } = React.useContext(\r\n LocalizationContext\r\n );\r\n\r\n const theme = useTheme();\r\n\tconst screenExtraSmall = useMediaQuery(theme.breakpoints.only('xs'));\r\n\r\n return React.useMemo(\r\n () => [\r\n {\r\n title: getString(\"weeklyTradeWeek\"),\r\n field: \"displayVal\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"dailyTradeReportTurnoverRSD\"),\r\n render: (row) => `${getFormatedNumberString(row.turnoverRsd, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"dailyTradeReportTurnoverEUR\"),\r\n render: (row) => `${getFormatedNumberString(row.turnoverEur, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n\t\t\t\thidden: screenExtraSmall,\r\n },\r\n {\r\n title: getString(\"dailyTradeReportCountTransaction\"),\r\n field: \"tranCount\",\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n ],\r\n [getString, getFormatedNumberString, screenExtraSmall]\r\n ) as Column[];\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { setIndex } from \"../weeklyTradeUXSlice\";\r\nimport { PageIndex } from \"../../../models\";\r\n\r\nexport const useWeeklyTradesReportIndex = () => {\r\n const pageIndex = useSelector(\r\n (s) => s.ux.reports.weeklyTrade.index\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetIndex = React.useCallback(\r\n (index: PageIndex) => dispatch(setIndex(index)),\r\n [dispatch]\r\n );\r\n\r\n return [pageIndex, dispatchSetIndex] as [\r\n typeof pageIndex,\r\n typeof dispatchSetIndex\r\n ];\r\n};\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\nimport { WeeklyTradingReportFilter } from \"../types\";\r\n\r\nexport const getWeeklyProductReport = (\r\n user: User,\r\n filter: WeeklyTradingReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getweeklytradingreport\",\r\n params: {\r\n userid: user.userId,\r\n option: \"P\",\r\n year: filter.year,\r\n week: filter.yearPart,\r\n },\r\n });\r\n};\r\n\r\nexport default getWeeklyProductReport;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadReport } from \"../thunks/downloadWeeklyProductReport\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useWeeklyReportDownloaderProduct = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.weeklyTrade.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(() => dispatch(downloadReport()), [\r\n dispatch,\r\n ]);\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getWeeklyProductReport } from \"../api/getWeeklyProductReport\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../weeklyTradeDataSlice\";\r\nimport moment from \"moment\";\r\n\r\nexport const downloadReport = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.weeklyTrade;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const weeklyReport = await dispatch(getWeeklyProductReport(user, filter));\r\n if (weeklyReport) {\r\n fileDownload(\r\n new Blob([weeklyReport as any], { type: \"application/pdf\" }),\r\n \"WeeklyPTrading_\" + moment().format(\"YYYYMMDDhhmmss\") + \".pdf\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import { WeeklyTradingReportFilter } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nexport const getWeeklyProductExcel = (\r\n user: User,\r\n filter: WeeklyTradingReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getweeklytradingxls\",\r\n params: {\r\n userid: user.userId,\r\n option: \"P\",\r\n year: filter.year,\r\n week: filter.yearPart,\r\n },\r\n });\r\n};\r\n\r\nexport default getWeeklyProductExcel;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadWeeklyProductExcel } from \"../thunks/downloadWeeklyProductReportExcel\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useWeeklyProductExcelDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.weeklyTrade.downloadReportFetchState\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadWeeklyProductExcel()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getWeeklyProductExcel } from \"../api/getWeeklyProductExcel\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../weeklyTradeDataSlice\";\r\nimport moment from \"moment\";\r\n\r\nexport const downloadWeeklyProductExcel = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.weeklyTrade;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n\r\n const weeklyTrading = await dispatch(getWeeklyProductExcel(user, filter));\r\n if (weeklyTrading) {\r\n fileDownload(\r\n new Blob([weeklyTrading as any], {\r\n type: \"application/vnd.openxmlformat\",\r\n }),\r\n \"WeeklyPTrading_\" + moment().format(\"YYYYMMDDhhmmss\") + \".xlsx\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\nimport { WeeklyTradingReportFilter } from \"../types\";\r\n\r\nexport const getWeeklyClientReport = (\r\n user: User,\r\n filter: WeeklyTradingReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getweeklytradingreport\",\r\n params: {\r\n userid: user.userId,\r\n option: \"C\",\r\n year: filter.year,\r\n week: filter.yearPart,\r\n },\r\n });\r\n};\r\n\r\nexport default getWeeklyClientReport;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadReport } from \"../thunks/downloadWeeklyClientReport\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useWeeklyReportDownloaderClient = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.weeklyTrade.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(() => dispatch(downloadReport()), [\r\n dispatch,\r\n ]);\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getWeeklyClientReport } from \"../api/getWeeklyClientReport\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../weeklyTradeDataSlice\";\r\nimport moment from \"moment\";\r\n\r\nexport const downloadReport = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.weeklyTrade;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const weeklyReport = await dispatch(getWeeklyClientReport(user, filter));\r\n if (weeklyReport) {\r\n fileDownload(\r\n new Blob([weeklyReport as any], { type: \"application/pdf\" }),\r\n \"WeeklyCTrading_\" + moment().format(\"YYYYMMDDhhmmss\") + \".pdf\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import { WeeklyTradingReportFilter } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nexport const getWeeklyClientExcel = (\r\n user: User,\r\n filter: WeeklyTradingReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getweeklytradingxls\",\r\n params: {\r\n userid: user.userId,\r\n option: \"C\",\r\n year: filter.year,\r\n week: filter.yearPart,\r\n },\r\n });\r\n};\r\n\r\nexport default getWeeklyClientExcel;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadWeeklyClientExcel } from \"../thunks/downloadWeeklyClientReportExcel\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useWeeklyClientExcelDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.weeklyTrade.downloadReportFetchState\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadWeeklyClientExcel()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getWeeklyClientExcel } from \"../api/getWeeklyClientExcel\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../weeklyTradeDataSlice\";\r\nimport moment from \"moment\";\r\n\r\nexport const downloadWeeklyClientExcel = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.weeklyTrade;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n\r\n const weeklyTrading = await dispatch(getWeeklyClientExcel(user, filter));\r\n if (weeklyTrading) {\r\n fileDownload(\r\n new Blob([weeklyTrading as any], {\r\n type: \"application/vnd.openxmlformat\",\r\n }),\r\n \"WeeklyCTrading_\" + moment().format(\"YYYYMMDDhhmmss\") + \".xlsx\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\nimport { WeeklyTradingReportFilter } from \"../types\";\r\n\r\nexport const getWeeklyDateReport = (\r\n user: User,\r\n filter: WeeklyTradingReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getweeklytradingreport\",\r\n params: {\r\n userid: user.userId,\r\n option: \"D\",\r\n year: filter.year,\r\n week: filter.yearPart,\r\n },\r\n });\r\n};\r\n\r\nexport default getWeeklyDateReport;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadReport } from \"../thunks/downloadWeeklyDateReport\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useWeeklyReportDownloaderDate = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.weeklyTrade.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(() => dispatch(downloadReport()), [\r\n dispatch,\r\n ]);\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getWeeklyDateReport } from \"../api/getWeeklyDateReport\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../weeklyTradeDataSlice\";\r\nimport moment from \"moment\";\r\n\r\nexport const downloadReport = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.weeklyTrade;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const weeklyReport = await dispatch(getWeeklyDateReport(user, filter));\r\n if (weeklyReport) {\r\n fileDownload(\r\n new Blob([weeklyReport as any], { type: \"application/pdf\" }),\r\n \"WeeklyDTrading_\" + moment().format(\"YYYYMMDDhhmmss\") + \".pdf\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import { WeeklyTradingReportFilter } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nexport const getWeeklyDateExcel = (\r\n user: User,\r\n filter: WeeklyTradingReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getweeklytradingxls\",\r\n params: {\r\n userid: user.userId,\r\n option: \"D\",\r\n year: filter.year,\r\n week: filter.yearPart,\r\n },\r\n });\r\n};\r\n\r\nexport default getWeeklyDateExcel;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadWeeklyDateExcel } from \"../thunks/downloadWeeklyDateReportExcel\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useWeeklyDateExcelDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.weeklyTrade.downloadReportFetchState\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadWeeklyDateExcel()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getWeeklyDateExcel } from \"../api/getWeeklyDateExcel\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../weeklyTradeDataSlice\";\r\nimport moment from \"moment\";\r\n\r\nexport const downloadWeeklyDateExcel = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.weeklyTrade;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n\r\n const weeklyTrading = await dispatch(getWeeklyDateExcel(user, filter));\r\n if (weeklyTrading) {\r\n fileDownload(\r\n new Blob([weeklyTrading as any], {\r\n type: \"application/vnd.openxmlformat\",\r\n }),\r\n \"WeeklyDTrading_\" + moment().format(\"YYYYMMDDhhmmss\") + \".xlsx\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\nimport { WeeklyTradingReportFilter } from \"../types\";\r\n\r\nexport const getWeeklyTradingDataReport = (\r\n user: User,\r\n filter: WeeklyTradingReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getweeklytradingreport\",\r\n params: {\r\n userid: user.userId,\r\n numofweeks: filter.numofweeks,\r\n },\r\n });\r\n};\r\n\r\nexport default getWeeklyTradingDataReport;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadReport } from \"../thunks/downloadWeeklyReport\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useWeeklyReportDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.weeklyTrade.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(() => dispatch(downloadReport()), [\r\n dispatch,\r\n ]);\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getWeeklyTradingDataReport } from \"../api/getWeeklyTradingDataReport\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../weeklyTradeDataSlice\";\r\nimport moment from \"moment\";\r\n\r\nexport const downloadReport = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.weeklyTrade;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const weeklyReport = await dispatch(getWeeklyTradingDataReport(user, filter));\r\n if (weeklyReport) {\r\n fileDownload(\r\n new Blob([weeklyReport as any], { type: \"application/pdf\" }),\r\n \"WeeklyTrading_\" + moment().format(\"YYYYMMDDhhmmss\") + \".pdf\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import { WeeklyTradingReportFilter } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nexport const getWeeklyTradingDataExcel = (\r\n user: User,\r\n filter: WeeklyTradingReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getweeklytradingxls\",\r\n params: {\r\n userid: user.userId,\r\n numofweeks: filter.numofweeks,\r\n },\r\n });\r\n};\r\n\r\nexport default getWeeklyTradingDataExcel;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadWeeklyTradingExcel } from \"../thunks/downloadWeeklyTradingExcel\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useWeeklyExcelDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.weeklyTrade.downloadReportFetchState\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadWeeklyTradingExcel()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getWeeklyTradingDataExcel } from \"../api/getWeeklyTradingDataExcel\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../weeklyTradeDataSlice\";\r\nimport moment from \"moment\";\r\n\r\nexport const downloadWeeklyTradingExcel = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.weeklyTrade;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n\r\n const weeklyTrading = await dispatch(getWeeklyTradingDataExcel(user, filter));\r\n if (weeklyTrading) {\r\n fileDownload(\r\n new Blob([weeklyTrading as any], {\r\n type: \"application/vnd.openxmlformat\",\r\n }),\r\n \"WeeklyTrading_\" + moment().format(\"YYYYMMDDhhmmss\") + \".xlsx\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import React from \"react\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport ExcelIcon from \"@material-ui/icons/TableChartOutlined\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport { useWeeklyReportDownloaderProduct } from \"../../../data/reports/weeklyTrade/hooks/useWTReportDownloaderProduct\";\r\nimport { useWeeklyProductExcelDownloader } from \"../../../data/reports/weeklyTrade/hooks/useWTExcelDownloaderProducts\";\r\nimport { useWeeklyReportDownloaderClient } from \"../../../data/reports/weeklyTrade/hooks/useWTReportDownloaderClients\";\r\nimport { useWeeklyClientExcelDownloader } from \"../../../data/reports/weeklyTrade/hooks/useWTExcelDownloaderClients\";\r\nimport { useWeeklyReportDownloaderDate } from \"../../../data/reports/weeklyTrade/hooks/useWTReportDownloaderDate\";\r\nimport { useWeeklyDateExcelDownloader } from \"../../../data/reports/weeklyTrade/hooks/useWTExcelDownloaderDate\";\r\nimport { useWeeklyReportDownloader } from \"../../../data/reports/weeklyTrade/hooks/useWTReportDownloader\";\r\nimport { useWeeklyExcelDownloader } from \"../../../data/reports/weeklyTrade/hooks/useWTExcelDownloader\";\r\n\r\nexport const DownloadButton: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useWeeklyReportDownloader();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const DownloadExcelButton: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useWeeklyExcelDownloader();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const DownloadButtonProduct: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useWeeklyReportDownloaderProduct();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const DownloadExcelButtonProduct: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useWeeklyProductExcelDownloader();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const DownloadButtonClient: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useWeeklyReportDownloaderClient();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const DownloadExcelButtonClient: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useWeeklyClientExcelDownloader();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const DownloadButtonDate: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useWeeklyReportDownloaderDate();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const DownloadExcelButtonDate: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useWeeklyDateExcelDownloader();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport { Grid, Paper, Button, Typography } from \"@material-ui/core\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { MonthlyTradingReportFilter } from \"../../../data/reports/monthlyTrade/types\";\r\nimport { useAuth } from \"../../../data/auth/hooks\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { StringInput } from \"../../components/common/StringInput\";\r\n\r\nexport enum MTRFilterEditorType {\r\n Basic,\r\n Extended,\r\n}\r\n\r\ninterface MTRFilterEditorProps {\r\n filter: MonthlyTradingReportFilter;\r\n editFilter: (prop: keyof MonthlyTradingReportFilter, value: any) => void;\r\n save: (numofmonths: number) => void;\r\n reset: () => void;\r\n type: MTRFilterEditorType;\r\n}\r\n\r\nexport const MTRFilterEditor: React.FunctionComponent = ({\r\n filter,\r\n editFilter,\r\n save,\r\n type,\r\n reset,\r\n}) => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const { getString } = React.useContext(LocalizationContext);\r\n const [auth] = useAuth();\r\n\r\n const handleChange = React.useCallback(\r\n (event: React.ChangeEvent) => {\r\n editFilter(event.target.name as any, Number(event.target.value));\r\n },\r\n [editFilter]\r\n );\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n type=\"number\"\r\n property=\"numofmonths\"\r\n item={filter}\r\n onChange={handleChange}\r\n label={getString(\"monthlyNumofmonths\")}\r\n />\r\n \r\n\r\n \r\n \r\n {\r\n if (filter.numofmonths) {\r\n save(filter.numofmonths);\r\n }\r\n showWithDrawer(undefined);\r\n }}\r\n >\r\n {getString(\"orderFilterConfirm\")}\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport FilterIcon from \"@material-ui/icons/FilterListOutlined\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { useWTRFilter } from \"../../../data/reports/weeklyTrade/hooks/useWTRFilter\";\r\nimport {\r\n WTRFilterEditor,\r\n WTRFilterEditorType,\r\n} from \"../weeklyTrades/WTRFilterEditor\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\n\r\nexport const WTRFilterButton: React.FunctionComponent = () => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const showFilter = React.useCallback(\r\n () => showWithDrawer(),\r\n [showWithDrawer]\r\n );\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nconst WTRsFilterEditor: React.FunctionComponent = () => {\r\n const [filter, editFilter, save, , reset] = useWTRFilter();\r\n return (\r\n <>\r\n {filter && (\r\n \r\n )}\r\n \r\n );\r\n};\r\n","import { useCopiedState } from \"../../../../core/util/hooks\";\r\nimport { setFilter, removeFilter, initialState } from \"../weeklyTradeUXSlice\";\r\nimport { setData } from \"../weeklyTradeDataSlice\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport React from \"react\";\r\nimport { WeeklyTradingReportFilter } from \"../types\";\r\n\r\nexport const useWTRFilter = () => {\r\n const storeFilter = useSelector(\r\n (store) => store.ux.reports.weeklyTrade.filter\r\n );\r\n\r\n const [filter, editFilter, changeState, setCurrentFilter] = useCopiedState<\r\n WeeklyTradingReportFilter\r\n >(storeFilter);\r\n\r\n const dispatch = useDispatch();\r\n\r\n const dispatchSetFilter = React.useCallback(\r\n (numofweeks: number) => {\r\n dispatch(setFilter(numofweeks));\r\n dispatch(setData());\r\n },\r\n [dispatch]\r\n );\r\n\r\n const dispatchResetFilter = React.useCallback(() => {\r\n setCurrentFilter(initialState.filter);\r\n }, [setCurrentFilter]);\r\n\r\n return [\r\n filter,\r\n editFilter,\r\n dispatchSetFilter,\r\n changeState,\r\n dispatchResetFilter,\r\n ] as [\r\n typeof filter,\r\n typeof editFilter,\r\n typeof dispatchSetFilter,\r\n typeof changeState,\r\n typeof dispatchResetFilter\r\n ];\r\n};\r\n","import React from \"react\";\r\nimport {\r\n Grid,\r\n CardContent,\r\n CardHeader,\r\n Card,\r\n Divider,\r\n} from \"@material-ui/core\";\r\nimport WeeklyTradesReportTable from \"./WeeklyTradesReportTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { PageComponent } from \"../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\n//import { WeeklyTradesReportFilter } from \"./WeeklyTradesReportFilter\";\r\nimport { DownloadButton, DownloadExcelButton } from \"./DownloadButton\";\r\nimport { WTRFilterButton } from \"./WTRFilter\";\r\n\r\nconst WeeklyTradesReport: PageComponent = ({ userAccessRights }) => {\r\n const pageStyles = usePageStyles();\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n }\r\n action={}\r\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 WeekActions: React.FunctionComponent = () => (\r\n \r\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 WeeklyTradesReport;\r\n","import { WeeklyTradingReportData, WeeklyTradingReportFilter } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nconst getWeeklyProductData = (\r\n user: User,\r\n filter: WeeklyTradingReportFilter\r\n) => {\r\n return webApi({\r\n method: \"GET\",\r\n url: \"reporting/getweeklytradinglist\",\r\n params: {\r\n userid: user.userId,\r\n option: \"P\",\r\n year: filter.year,\r\n week: filter.yearPart,\r\n },\r\n });\r\n};\r\n\r\nexport default getWeeklyProductData;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadReport } from \"../thunks/loadReportProductData\";\r\nimport { WeeklyTradingReportData } from \"../types\";\r\nimport { setData } from \"../weeklyTradeDataSlice\";\r\n\r\nexport const useReportProductData = () => {\r\n const data = useSelector(\r\n (s) => s.data.reports.weeklyTrade.data\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadData = React.useCallback(() => dispatch(loadReport()), [\r\n dispatch,\r\n ]);\r\n\r\n const resetData = React.useCallback(() => {\r\n dispatch(setData(undefined));\r\n }, [dispatch]);\r\n\r\n return [data, dispatchLoadData, resetData] as [\r\n typeof data,\r\n typeof dispatchLoadData,\r\n typeof resetData\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { setData } from \"../weeklyTradeDataSlice\";\r\nimport getWeeklyProductData from \"../api/getWeeklyProductData\";\r\n\r\nexport const loadReport = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const user = store.data.auth.current.user;\r\n const { filter } = store.ux.reports.weeklyTrade;\r\n\r\n const pagedTrades = await dispatch(getWeeklyProductData(user, filter));\r\n\r\n dispatch(setData(pagedTrades || []));\r\n};\r\n","import React from \"react\";\r\nimport { useWTReportProductColumns } from \"./useWTReportProductColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\nimport { TradeList } from \"../../../data/trading/trades/types\";\r\nimport { Table, TableDataProps } from \"../../components/common/Table\";\r\nimport { WeeklyTradingReportData } from \"../../../data/reports/weeklyTrade/types\";\r\nimport { useReportProductData } from \"../../../data/reports/weeklyTrade/hooks/useReportProductData\";\r\nimport { useWeeklyActions } from \"./useWeeklyActions\";\r\n\r\nexport interface WeeklyTradesTableProps {\r\n userAccessRights: AccessRights;\r\n}\r\n\r\ntype WeeklyTradesTablePropsType = WeeklyTradesTableProps &\r\n TableDataProps;\r\n\r\nconst WTRProductTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n ...tableProps\r\n}) => {\r\n const columns = useWTReportProductColumns();\r\n const [data, load, reset] = useReportProductData();\r\n React.useEffect(() => reset, [reset]);\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={load}\r\n immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n // actions={actions}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default WTRProductTable;\r\n","import { WeeklyTradingReportData } from \"../../../data/reports/weeklyTrade/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\r\nimport { useTheme } from '@material-ui/core/styles';\r\n\r\nexport const useWTReportProductColumns = () => {\r\n const { getString, getFormatedNumberString } = React.useContext(\r\n LocalizationContext\r\n );\r\n\r\n const theme = useTheme();\r\n\tconst screenExtraSmall = useMediaQuery(theme.breakpoints.only('xs'));\r\n\r\n return React.useMemo(\r\n () => [\r\n {\r\n title: getString(\"weeklyTradeReportProduct\"),\r\n field: \"displayVal\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"weeklyTradeReportQty\"),\r\n render: (row) => `${getFormatedNumberString(row.qty)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"dailyTradeReportTurnoverRSD\"),\r\n render: (row) => `${getFormatedNumberString(row.turnoverRsd, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"dailyTradeReportTurnoverEUR\"),\r\n render: (row) => `${getFormatedNumberString(row.turnoverEur, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n\t\t\t\thidden: screenExtraSmall,\r\n },\r\n {\r\n title: getString(\"dailyTradeReportCountTransaction\"),\r\n field: \"tranCount\",\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n\t\t\t\thidden: screenExtraSmall,\r\n },\r\n {\r\n title: getString(\"wTReportWeightedPrice\"),\r\n render: (row) => `${getFormatedNumberString(row.weightedPrice, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n\t\t\t\thidden: screenExtraSmall,\r\n },\r\n {\r\n title: getString(\"wTReportWeightedPriceeur\"),\r\n render: (row) =>\r\n `${getFormatedNumberString(row.weightedPriceEur, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n\t\t\t\thidden: screenExtraSmall,\r\n },\r\n ],\r\n [getString, getFormatedNumberString, screenExtraSmall]\r\n ) as Column[];\r\n};\r\n","import { setReportData } from \"../weeklyTradeUXSlice\";\r\nimport { setData } from \"../weeklyTradeDataSlice\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport React from \"react\";\r\nimport { WeeklyTradingReportFilter } from \"../types\";\r\nimport { setReportWeek, setReportYear } from \"../weeklyTradeUXSlice\";\r\n\r\nexport const useCurrentTradesReportFilter = () => {\r\n const filter = useSelector(\r\n (store) => store.ux.reports.weeklyTrade.filter\r\n );\r\n const dispatch = useDispatch();\r\n const dispatchSetReportDate = React.useCallback(\r\n (reportDate: number) => {\r\n dispatch(setReportData(reportDate));\r\n dispatch(setData());\r\n },\r\n [dispatch]\r\n );\r\n const dispatchSetReportWeek = React.useCallback(\r\n (week: number) => {\r\n dispatch(setReportWeek(week));\r\n dispatch(setData());\r\n },\r\n [dispatch]\r\n );\r\n const dispatchSetReportYear = React.useCallback(\r\n (year: number) => {\r\n dispatch(setReportYear(year));\r\n dispatch(setData());\r\n },\r\n [dispatch]\r\n );\r\n\r\n return [\r\n filter,\r\n dispatchSetReportDate,\r\n dispatchSetReportWeek,\r\n dispatchSetReportYear,\r\n ] as [\r\n typeof filter,\r\n typeof dispatchSetReportDate,\r\n typeof dispatchSetReportWeek,\r\n typeof dispatchSetReportYear\r\n ];\r\n};\r\n","import React from \"react\";\r\nimport {\r\n Grid,\r\n CardContent,\r\n CardHeader,\r\n Card,\r\n Divider,\r\n} from \"@material-ui/core\";\r\nimport WTRProductTable from \"./WTRProductTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { PageComponent, AccessRights } from \"../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\n//import { WeeklyTradesReportFilter } from \"./WeeklyTradesReportFilter\";\r\nimport {\r\n DownloadButtonProduct,\r\n DownloadExcelButtonProduct,\r\n} from \"./DownloadButton\";\r\nimport { weeklyTradesReportLocation } from \"./Locations\";\r\nimport { RouteComponentProps } from \"react-router-dom\";\r\nimport { useCurrentTradesReportFilter } from \"../../../data/reports/weeklyTrade/hooks/useTradesReportFilter\";\r\n\r\nexport interface WTRProductPageInfo {\r\n year: string;\r\n week: string;\r\n}\r\n\r\nexport interface WTRProductPageProps\r\n extends RouteComponentProps {\r\n userAccessRights: AccessRights;\r\n}\r\n\r\nconst WTRProductPage: React.FunctionComponent = (\r\n props\r\n) => {\r\n const pageStyles = usePageStyles();\r\n\r\n // ovde su parametri za izvestaj\r\n // zbog toga stho se uzimaju iz URL-a moraju biti tipa string, ali ih konvertujem u number zbog toga sto to trazi API\r\n // dalje ih treba proslediti u odgovarajuci hook da bi se sacuvali u filteru u redux store-u\r\n const yearNumber = Number(props.match.params.year);\r\n const weekNumber = Number(props.match.params.week);\r\n console.log(\"Report params:\", yearNumber, weekNumber);\r\n\r\n const [\r\n filter,\r\n setReportDate,\r\n setReportWeek,\r\n setReporthYear,\r\n ] = useCurrentTradesReportFilter();\r\n\r\n React.useEffect(() => setReportWeek(weekNumber), [weekNumber]);\r\n React.useEffect(() => setReporthYear(yearNumber), [yearNumber]);\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n }\r\n action={}\r\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 WeekActions: React.FunctionComponent = () => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default WTRProductPage;\r\n","import { WeeklyTradingReportData, WeeklyTradingReportFilter } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nconst getWeeklyClientData = (user: User, filter: WeeklyTradingReportFilter) => {\r\n return webApi({\r\n method: \"GET\",\r\n url: \"reporting/getweeklytradinglist\",\r\n params: {\r\n userid: user.userId,\r\n option: \"C\",\r\n year: filter.year,\r\n week: filter.yearPart,\r\n },\r\n });\r\n};\r\n\r\nexport default getWeeklyClientData;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadReport } from \"../thunks/loadReportClientData\";\r\nimport { WeeklyTradingReportData } from \"../types\";\r\nimport { setData } from \"../weeklyTradeDataSlice\";\r\n\r\nexport const useReportClientData = () => {\r\n const data = useSelector(\r\n (s) => s.data.reports.weeklyTrade.data\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadData = React.useCallback(() => dispatch(loadReport()), [\r\n dispatch,\r\n ]);\r\n\r\n const resetData = React.useCallback(() => {\r\n dispatch(setData(undefined));\r\n }, [dispatch]);\r\n\r\n return [data, dispatchLoadData, resetData] as [\r\n typeof data,\r\n typeof dispatchLoadData,\r\n typeof resetData\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { setData } from \"../weeklyTradeDataSlice\";\r\nimport getWeeklyClientData from \"../api/getWeeklyClientData\";\r\n\r\nexport const loadReport = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const user = store.data.auth.current.user;\r\n const { filter } = store.ux.reports.weeklyTrade;\r\n\r\n const pagedTrades = await dispatch(getWeeklyClientData(user, filter));\r\n\r\n dispatch(setData(pagedTrades || []));\r\n};\r\n","import React from \"react\";\r\nimport { useWTReportClientColumns } from \"./useWTReportClientColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\nimport { TradeList } from \"../../../data/trading/trades/types\";\r\nimport { Table, TableDataProps } from \"../../components/common/Table\";\r\nimport { WeeklyTradingReportData } from \"../../../data/reports/weeklyTrade/types\";\r\nimport { useReportClientData } from \"../../../data/reports/weeklyTrade/hooks/useReportClientData\";\r\nimport { useWeeklyActions } from \"./useWeeklyActions\";\r\n\r\nexport interface WeeklyTradesTableProps {\r\n userAccessRights: AccessRights;\r\n}\r\n\r\ntype WeeklyTradesTablePropsType = WeeklyTradesTableProps &\r\n TableDataProps;\r\n\r\nconst WTRClientTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n ...tableProps\r\n}) => {\r\n const columns = useWTReportClientColumns();\r\n const [data, load, reset] = useReportClientData();\r\n React.useEffect(() => reset, [reset]);\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={load}\r\n immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n // actions={actions}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default WTRClientTable;\r\n","import { WeeklyTradingReportData } from \"../../../data/reports/weeklyTrade/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\n\r\nexport const useWTReportClientColumns = () => {\r\n const { getString, getFormatedNumberString } = React.useContext(\r\n LocalizationContext\r\n );\r\n\r\n return React.useMemo(\r\n () => [\r\n {\r\n title: getString(\"weeklyTradeReportClient\"),\r\n field: \"displayVal\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"dailyTradeReportTurnoverRSD\"),\r\n render: (row) => `${getFormatedNumberString(row.turnoverRsd, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"dailyTradeReportTurnoverEUR\"),\r\n render: (row) => `${getFormatedNumberString(row.turnoverEur, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"dailyTradeReportCountTransaction\"),\r\n field: \"tranCount\",\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n ],\r\n [getString, getFormatedNumberString]\r\n ) as Column[];\r\n};\r\n","import React from \"react\";\r\nimport {\r\n Grid,\r\n CardContent,\r\n CardHeader,\r\n Card,\r\n Divider,\r\n} from \"@material-ui/core\";\r\nimport WTRClientTable from \"./WTRClientTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { PageComponent, AccessRights } from \"../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\n//import { WeeklyTradesReportFilter } from \"./WeeklyTradesReportFilter\";\r\nimport {\r\n DownloadButtonClient,\r\n DownloadExcelButtonClient,\r\n} from \"./DownloadButton\";\r\nimport { weeklyTradesReportLocation } from \"./Locations\";\r\nimport { RouteComponentProps } from \"react-router-dom\";\r\nimport { useCurrentTradesReportFilter } from \"../../../data/reports/weeklyTrade/hooks/useTradesReportFilter\";\r\n\r\nexport interface WTRClientPageInfo {\r\n year: string;\r\n week: string;\r\n}\r\n\r\nexport interface WTRClientPageProps\r\n extends RouteComponentProps {\r\n userAccessRights: AccessRights;\r\n}\r\n\r\nconst WTRClientPage: React.FunctionComponent = (props) => {\r\n const pageStyles = usePageStyles();\r\n\r\n // ovde su parametri za izvestaj\r\n // zbog toga stho se uzimaju iz URL-a moraju biti tipa string, ali ih konvertujem u number zbog toga sto to trazi API\r\n // dalje ih treba proslediti u odgovarajuci hook da bi se sacuvali u filteru u redux store-u\r\n const yearNumber = Number(props.match.params.year);\r\n const weekNumber = Number(props.match.params.week);\r\n console.log(\"Report params:\", yearNumber, weekNumber);\r\n\r\n const [\r\n filter,\r\n setReportDate,\r\n setReportWeek,\r\n setReporthYear,\r\n ] = useCurrentTradesReportFilter();\r\n\r\n React.useEffect(() => setReportWeek(weekNumber), [weekNumber]);\r\n React.useEffect(() => setReporthYear(yearNumber), [yearNumber]);\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n }\r\n action={}\r\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 WeekActions: React.FunctionComponent = () => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default WTRClientPage;\r\n","import { WeeklyTradingReportData, WeeklyTradingReportFilter } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nconst getWeeklyDateData = (user: User, filter: WeeklyTradingReportFilter) => {\r\n return webApi({\r\n method: \"GET\",\r\n url: \"reporting/getweeklytradinglist\",\r\n params: {\r\n userid: user.userId,\r\n option: \"D\",\r\n year: filter.year,\r\n week: filter.yearPart,\r\n },\r\n });\r\n};\r\n\r\nexport default getWeeklyDateData;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadReport } from \"../thunks/loadReportDateData\";\r\nimport { WeeklyTradingReportData } from \"../types\";\r\nimport { setData } from \"../weeklyTradeDataSlice\";\r\n\r\nexport const useReportDateData = () => {\r\n const data = useSelector(\r\n (s) => s.data.reports.weeklyTrade.data\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadData = React.useCallback(() => dispatch(loadReport()), [\r\n dispatch,\r\n ]);\r\n\r\n const resetData = React.useCallback(() => {\r\n dispatch(setData(undefined));\r\n }, [dispatch]);\r\n\r\n return [data, dispatchLoadData, resetData] as [\r\n typeof data,\r\n typeof dispatchLoadData,\r\n typeof resetData\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { setData } from \"../weeklyTradeDataSlice\";\r\nimport getWeeklyDateData from \"../api/getWeeklyDateData\";\r\n\r\nexport const loadReport = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const user = store.data.auth.current.user;\r\n const { filter } = store.ux.reports.weeklyTrade;\r\n\r\n const pagedTrades = await dispatch(getWeeklyDateData(user, filter));\r\n\r\n dispatch(setData(pagedTrades || []));\r\n};\r\n","import React from \"react\";\r\nimport { useWTReportDateColumns } from \"./useWTReportDateColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\nimport { TradeList } from \"../../../data/trading/trades/types\";\r\nimport { Table, TableDataProps } from \"../../components/common/Table\";\r\nimport { WeeklyTradingReportData } from \"../../../data/reports/weeklyTrade/types\";\r\nimport { useReportDateData } from \"../../../data/reports/weeklyTrade/hooks/useReportDateData\";\r\nimport { useWeeklyActions } from \"./useWeeklyActions\";\r\n\r\nexport interface WeeklyTradesTableProps {\r\n userAccessRights: AccessRights;\r\n}\r\n\r\ntype WeeklyTradesTablePropsType = WeeklyTradesTableProps &\r\n TableDataProps;\r\n\r\nconst WTRDateTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n ...tableProps\r\n}) => {\r\n const columns = useWTReportDateColumns();\r\n const [data, load, reset] = useReportDateData();\r\n React.useEffect(() => reset, [reset]);\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={load}\r\n immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n // actions={actions}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default WTRDateTable;\r\n","import { WeeklyTradingReportData } from \"../../../data/reports/weeklyTrade/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\r\nimport { useTheme } from '@material-ui/core/styles';\r\n\r\nexport const useWTReportDateColumns = () => {\r\n const { getString, getFormatedNumberString } = React.useContext(\r\n LocalizationContext\r\n );\r\n\r\n const theme = useTheme();\r\n\tconst screenExtraSmall = useMediaQuery(theme.breakpoints.only('xs'));\r\n\r\n return React.useMemo(\r\n () => [\r\n {\r\n title: getString(\"weeklyTradeReportDate\"),\r\n field: \"displayVal\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"dailyTradeReportTurnoverRSD\"),\r\n render: (row) => `${getFormatedNumberString(row.turnoverRsd, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"dailyTradeReportTurnoverEUR\"),\r\n render: (row) => `${getFormatedNumberString(row.turnoverEur, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n\t\t\t\thidden: screenExtraSmall,\r\n },\r\n {\r\n title: getString(\"dailyTradeReportCountTransaction\"),\r\n field: \"tranCount\",\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n ],\r\n [getString, getFormatedNumberString, screenExtraSmall]\r\n ) as Column[];\r\n};\r\n","import React from \"react\";\r\nimport {\r\n Grid,\r\n CardContent,\r\n CardHeader,\r\n Card,\r\n Divider,\r\n} from \"@material-ui/core\";\r\nimport WTRDateTable from \"./WTRDateTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { PageComponent, AccessRights } from \"../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\n//import { WeeklyTradesReportFilter } from \"./WeeklyTradesReportFilter\";\r\nimport { DownloadButtonDate, DownloadExcelButtonDate } from \"./DownloadButton\";\r\nimport { weeklyTradesReportLocation } from \"./Locations\";\r\nimport { RouteComponentProps } from \"react-router-dom\";\r\nimport { useCurrentTradesReportFilter } from \"../../../data/reports/weeklyTrade/hooks/useTradesReportFilter\";\r\n\r\nexport interface WTRDatePageInfo {\r\n year: string;\r\n week: string;\r\n}\r\n\r\nexport interface WTRDatePageProps extends RouteComponentProps {\r\n userAccessRights: AccessRights;\r\n}\r\n\r\nconst WTRDatePage: React.FunctionComponent = (props) => {\r\n const pageStyles = usePageStyles();\r\n\r\n // ovde su parametri za izvestaj\r\n // zbog toga stho se uzimaju iz URL-a moraju biti tipa string, ali ih konvertujem u number zbog toga sto to trazi API\r\n // dalje ih treba proslediti u odgovarajuci hook da bi se sacuvali u filteru u redux store-u\r\n const yearNumber = Number(props.match.params.year);\r\n const weekNumber = Number(props.match.params.week);\r\n console.log(\"Report params:\", yearNumber, weekNumber);\r\n\r\n const [\r\n filter,\r\n setReportDate,\r\n setReportWeek,\r\n setReporthYear,\r\n ] = useCurrentTradesReportFilter();\r\n\r\n React.useEffect(() => setReportWeek(weekNumber), [weekNumber]);\r\n React.useEffect(() => setReporthYear(yearNumber), [yearNumber]);\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n }\r\n action={}\r\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 WeekActions: React.FunctionComponent = () => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default WTRDatePage;\r\n","import WeeklyTradesReport from \"./WeeklyTradesReport\";\r\nimport { NavigationItem } from \"../../../core/navigation/types\";\r\nimport {\r\n weeklyTradesReportLocation,\r\n weeklyProductLocation,\r\n weeklyClientLocation,\r\n weeklyDateLocation,\r\n} from \"./Locations\";\r\nimport WTRProductPage from \"./WTRProductPage\";\r\nimport WTRClientPage from \"./WTRClientPage\";\r\nimport WTRDatePage from \"./WTRDatePage\";\r\n\r\nexport const weeklyTradesReportComponents: NavigationItem[] = [\r\n {\r\n Component: WeeklyTradesReport,\r\n isMenuItem: true,\r\n path: weeklyTradesReportLocation,\r\n },\r\n {\r\n Component: WTRProductPage,\r\n isMenuItem: false,\r\n path: weeklyProductLocation,\r\n },\r\n {\r\n Component: WTRClientPage,\r\n isMenuItem: false,\r\n path: weeklyClientLocation,\r\n },\r\n {\r\n Component: WTRDatePage,\r\n isMenuItem: false,\r\n path: weeklyDateLocation,\r\n },\r\n];\r\n","import { MonthlyTradingReportData, MonthlyTradingReportFilter } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nconst getMonthlyTradingData = (\r\n user: User,\r\n filter: MonthlyTradingReportFilter\r\n) => {\r\n return webApi({\r\n method: \"GET\",\r\n url: \"reporting/getmonthlytradinglist\",\r\n params: {\r\n userid: user.userId,\r\n numofmonths: filter.numofmonths,\r\n },\r\n });\r\n};\r\n\r\nexport default getMonthlyTradingData;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadReport } from \"../thunks/loadReportData\";\r\nimport { MonthlyTradingReportData } from \"../types\";\r\n\r\nexport const useTradesReportData = () => {\r\n const data = useSelector(\r\n (s) => s.data.reports.monthlyTrade.data\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadData = React.useCallback(() => dispatch(loadReport()), [\r\n dispatch,\r\n ]);\r\n\r\n return [data, dispatchLoadData] as [typeof data, typeof dispatchLoadData];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { setData } from \"../monthlyTradeDataSlice\";\r\nimport getMonthlyTradingDataApi from \"../api/getMonthlyTradingDataList\";\r\n\r\nexport const loadReport = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const user = store.data.auth.current.user;\r\n const { filter } = store.ux.reports.monthlyTrade;\r\n\r\n const pagedTrades = await dispatch(getMonthlyTradingDataApi(user, filter));\r\n\r\n dispatch(setData(pagedTrades || []));\r\n};\r\n","export const monthlyTradesReportLocation = \"/reports/monthlyreports\";\r\n\r\nexport const getReportLocation = (\r\n basePath: string,\r\n year: number,\r\n month: number\r\n) => {\r\n return `${basePath}/${year}/${month}`;\r\n};\r\n\r\nexport const monthlyProductLocationBase = \"/reports/monthlyreports/products\";\r\nexport const monthlyClientLocationBase = \"/reports/monthlyreports/client\";\r\nexport const monthlyDateLocationBase = \"/reports/monthlyreports/date\";\r\n\r\nexport const monthlyProductLocation = `${monthlyProductLocationBase}/:year/:month`;\r\nexport const monthlyClientLocation = `${monthlyClientLocationBase}/:year/:month`;\r\nexport const monthlyDateLocation = `${monthlyDateLocationBase}/:year/:month`;\r\n\r\nexport const getProductLocation = (year: number, month: number) =>\r\n getReportLocation(monthlyProductLocationBase, year, month);\r\nexport const getClientLocation = (year: number, month: number) =>\r\n getReportLocation(monthlyClientLocationBase, year, month);\r\nexport const getDateLocation = (year: number, month: number) =>\r\n getReportLocation(monthlyDateLocationBase, year, month);\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport { MonthlyTradingReportData } from \"../../../data/reports/monthlyTrade/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Action } from \"material-table\";\r\nimport { useHistory } from \"react-router-dom\";\r\n//import { useViewBank } from \"./DisplayBank\";\r\nimport {\r\n getProductLocation,\r\n getClientLocation,\r\n getDateLocation,\r\n} from \"./Locations\";\r\nimport EventOutlinedIcon from \"@material-ui/icons/EventOutlined\";\r\nimport PeopleOutlineOutlinedIcon from \"@material-ui/icons/PeopleOutlineOutlined\";\r\nimport LocalShippingOutlinedIcon from \"@material-ui/icons/LocalShippingOutlined\";\r\nimport { useAuth } from \"../../../data/auth/hooks\";\r\n\r\nexport const useMonthlyActions = () => {\r\n const { getString } = useContext(LocalizationContext);\r\n\r\n const [auth] = useAuth();\r\n\r\n const history = useHistory();\r\n\r\n return useMemo(() => {\r\n const result: Action[] = [\r\n { \r\n icon: () => ,\r\n tooltip: getString(\"mTableProduct\"),\r\n onClick: (event, rowData) => {\r\n const reportData = rowData as MonthlyTradingReportData;\r\n history.push(\r\n getProductLocation(reportData.year, reportData.yearPart)\r\n );\r\n }, \r\n },\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"mTableClient\"),\r\n onClick: (event, rowData) => {\r\n const reportData = rowData as MonthlyTradingReportData;\r\n history.push(getClientLocation(reportData.year, reportData.yearPart));\r\n },\r\n hidden: auth.status === \"successful\" && (auth.user.roleCode === \"MEMTRADER\" || auth.user.roleCode === \"MEMMANAGER\" || auth.user.roleCode === \"MEMCONTACT\" ) \r\n },\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"mTableDate\"),\r\n onClick: (event, rowData) => {\r\n const reportData = rowData as MonthlyTradingReportData;\r\n history.push(getDateLocation(reportData.year, reportData.yearPart));\r\n },\r\n },\r\n ];\r\n\r\n return result;\r\n }, [, , getString]);\r\n};\r\n","import React from \"react\";\r\nimport { useMonthlyTradesColumns } from \"./useMonthlyTradingReportColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\nimport { ControledTable } from \"../../components/common/ControledTable\";\r\nimport { MonthlyTradingReportData } from \"../../../data/reports/monthlyTrade/types\";\r\nimport { useMonthlyTradesReportIndex } from \"../../../data/reports/monthlyTrade/hooks/useMonthlyTradesReportIndex\";\r\nimport { useTradesReportData } from \"../../../data/reports/monthlyTrade/hooks/useTradesReportData\";\r\nimport { useMonthlyActions } from \"./useMonthlyActions\";\r\n\r\nexport interface MonthlyTradesTableProps {\r\n userAccessRights: AccessRights;\r\n}\r\n\r\ntype MonthlyTradesTablePropsType = MonthlyTradesTableProps;\r\n\r\nconst MonthlyTradesReportTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n ...tableProps\r\n}) => {\r\n const actions = useMonthlyActions();\r\n const columns = useMonthlyTradesColumns();\r\n\r\n const [data, load] = useTradesReportData();\r\n const [index, setIndex] = useMonthlyTradesReportIndex();\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={load}\r\n onPageIndexChange={setIndex}\r\n pageIndex={index}\r\n immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n actions={actions}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n pageSize: 20,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default MonthlyTradesReportTable;\r\n","import { MonthlyTradingReportData } from \"../../../data/reports/monthlyTrade/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\r\nimport { useTheme } from '@material-ui/core/styles';\r\n\r\nexport const useMonthlyTradesColumns = () => {\r\n const { getString, getFormatedNumberString } = React.useContext(\r\n LocalizationContext\r\n );\r\n\r\n const theme = useTheme();\r\n\tconst screenExtraSmall = useMediaQuery(theme.breakpoints.only('xs'));\r\n\r\n return React.useMemo(\r\n () => [\r\n {\r\n title: getString(\"monthlyTradeMonth\"),\r\n field: \"displayVal\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"dailyTradeReportTurnoverRSD\"),\r\n render: (row) => `${getFormatedNumberString(row.turnoverRsd, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"dailyTradeReportTurnoverEUR\"),\r\n render: (row) => `${getFormatedNumberString(row.turnoverEur, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n\t\t\t\thidden: screenExtraSmall,\r\n },\r\n {\r\n title: getString(\"dailyTradeReportCountTransaction\"),\r\n field: \"tranCount\",\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n\t\t\t\thidden: screenExtraSmall,\r\n },\r\n ],\r\n [getString, getFormatedNumberString, screenExtraSmall]\r\n ) as Column[];\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { setIndex } from \"../monthlyTradeUXSlice\";\r\nimport { PageIndex } from \"../../../models\";\r\n\r\nexport const useMonthlyTradesReportIndex = () => {\r\n const pageIndex = useSelector(\r\n (s) => s.ux.reports.monthlyTrade.index\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetIndex = React.useCallback(\r\n (index: PageIndex) => dispatch(setIndex(index)),\r\n [dispatch]\r\n );\r\n\r\n return [pageIndex, dispatchSetIndex] as [\r\n typeof pageIndex,\r\n typeof dispatchSetIndex\r\n ];\r\n};\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\nimport { MonthlyTradingReportFilter } from \"../types\";\r\n\r\nexport const getMonthlyProductReport = (\r\n user: User,\r\n filter: MonthlyTradingReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getmonthlytradingreport\",\r\n params: {\r\n userid: user.userId,\r\n option: \"P\",\r\n year: filter.year,\r\n month: filter.month,\r\n },\r\n });\r\n};\r\n\r\nexport default getMonthlyProductReport;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadReport } from \"../thunks/downloadMonthlyProductReport\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useMonthlyReportDownloaderProduct = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.monthlyTrade.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(() => dispatch(downloadReport()), [\r\n dispatch,\r\n ]);\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getMonthlyProductReport } from \"../api/getMonthlyProductReport\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../monthlyTradeDataSlice\";\r\nimport moment from \"moment\";\r\n\r\nexport const downloadReport = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.monthlyTrade;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const monthlyReport = await dispatch(getMonthlyProductReport(user, filter));\r\n if (monthlyReport) {\r\n fileDownload(\r\n new Blob([monthlyReport as any], { type: \"application/pdf\" }),\r\n \"MonthlyPTrading_\" + moment().format(\"YYYYMMDDhhmmss\") + \".pdf\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import { MonthlyTradingReportFilter } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nexport const getMonthlyProductExcel = (\r\n user: User,\r\n filter: MonthlyTradingReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getmonthlytradingxls\",\r\n params: {\r\n userid: user.userId,\r\n option: \"P\",\r\n year: filter.year,\r\n month: filter.month,\r\n },\r\n });\r\n};\r\n\r\nexport default getMonthlyProductExcel;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadMonthlyProductExcel } from \"../thunks/downloadMonthlyProductReportExcel\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useMonthlyProductExcelDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.monthlyTrade.downloadReportFetchState\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadMonthlyProductExcel()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getMonthlyProductExcel } from \"../api/getMonthlyProductExcel\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../monthlyTradeDataSlice\";\r\nimport moment from \"moment\";\r\n\r\nexport const downloadMonthlyProductExcel = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.monthlyTrade;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n\r\n const monthlyTrading = await dispatch(getMonthlyProductExcel(user, filter));\r\n if (monthlyTrading) {\r\n fileDownload(\r\n new Blob([monthlyTrading as any], {\r\n type: \"application/vnd.openxmlformat\",\r\n }),\r\n \"MonthlyPTrading_\" + moment().format(\"YYYYMMDDhhmmss\") + \".xlsx\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\nimport { MonthlyTradingReportFilter } from \"../types\";\r\n\r\nexport const getMonthlyClientReport = (\r\n user: User,\r\n filter: MonthlyTradingReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getmonthlytradingreport\",\r\n params: {\r\n userid: user.userId,\r\n option: \"C\",\r\n year: filter.year,\r\n month: filter.month,\r\n },\r\n });\r\n};\r\n\r\nexport default getMonthlyClientReport;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadReport } from \"../thunks/downloadMonthlyClientReport\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useMonthlyReportDownloaderClient = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.monthlyTrade.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(() => dispatch(downloadReport()), [\r\n dispatch,\r\n ]);\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getMonthlyClientReport } from \"../api/getMonthlyClientReport\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../monthlyTradeDataSlice\";\r\nimport moment from \"moment\";\r\n\r\nexport const downloadReport = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.monthlyTrade;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const monthlyReport = await dispatch(getMonthlyClientReport(user, filter));\r\n if (monthlyReport) {\r\n fileDownload(\r\n new Blob([monthlyReport as any], { type: \"application/pdf\" }),\r\n \"MonthlyCTrading_\" + moment().format(\"YYYYMMDDhhmmss\") + \".pdf\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import { MonthlyTradingReportFilter } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nexport const getMonthlyClientExcel = (\r\n user: User,\r\n filter: MonthlyTradingReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getmonthlytradingxls\",\r\n params: {\r\n userid: user.userId,\r\n option: \"C\",\r\n year: filter.year,\r\n month: filter.month,\r\n },\r\n });\r\n};\r\n\r\nexport default getMonthlyClientExcel;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadMonthlyClientExcel } from \"../thunks/downloadMonthlyClientReportExcel\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useMonthlyClientExcelDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.monthlyTrade.downloadReportFetchState\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadMonthlyClientExcel()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getMonthlyClientExcel } from \"../api/getMonthlyClientExcel\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../monthlyTradeDataSlice\";\r\nimport moment from \"moment\";\r\n\r\nexport const downloadMonthlyClientExcel = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.monthlyTrade;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n\r\n const monthlyTrading = await dispatch(getMonthlyClientExcel(user, filter));\r\n if (monthlyTrading) {\r\n fileDownload(\r\n new Blob([monthlyTrading as any], {\r\n type: \"application/vnd.openxmlformat\",\r\n }),\r\n \"MonthlyCTrading_\" + moment().format(\"YYYYMMDDhhmmss\") + \".xlsx\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\nimport { MonthlyTradingReportFilter } from \"../types\";\r\n\r\nexport const getMonthlyDateReport = (\r\n user: User,\r\n filter: MonthlyTradingReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getmonthlytradingreport\",\r\n params: {\r\n userid: user.userId,\r\n option: \"D\",\r\n year: filter.year,\r\n month: filter.month,\r\n },\r\n });\r\n};\r\n\r\nexport default getMonthlyDateReport;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadReport } from \"../thunks/downloadMonthlyDateReport\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useMonthlyReportDownloaderDate = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.monthlyTrade.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(() => dispatch(downloadReport()), [\r\n dispatch,\r\n ]);\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getMonthlyDateReport } from \"../api/getMonthlyDateReport\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../monthlyTradeDataSlice\";\r\nimport moment from \"moment\";\r\n\r\nexport const downloadReport = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.monthlyTrade;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const monthlyReport = await dispatch(getMonthlyDateReport(user, filter));\r\n if (monthlyReport) {\r\n fileDownload(\r\n new Blob([monthlyReport as any], { type: \"application/pdf\" }),\r\n \"MonthlyDTrading_\" + moment().format(\"YYYYMMDDhhmmss\") + \".pdf\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import { MonthlyTradingReportFilter } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nexport const getMonthlyDateExcel = (\r\n user: User,\r\n filter: MonthlyTradingReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getmonthlytradingxls\",\r\n params: {\r\n userid: user.userId,\r\n option: \"D\",\r\n year: filter.year,\r\n month: filter.month,\r\n },\r\n });\r\n};\r\n\r\nexport default getMonthlyDateExcel;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadMonthlyDateExcel } from \"../thunks/downloadMonthlyDateReportExcel\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useMonthlyDateExcelDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.monthlyTrade.downloadReportFetchState\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadMonthlyDateExcel()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getMonthlyDateExcel } from \"../api/getMonthlyDateExcel\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../monthlyTradeDataSlice\";\r\nimport moment from \"moment\";\r\n\r\nexport const downloadMonthlyDateExcel = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.monthlyTrade;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n\r\n const monthlyTrading = await dispatch(getMonthlyDateExcel(user, filter));\r\n if (monthlyTrading) {\r\n fileDownload(\r\n new Blob([monthlyTrading as any], {\r\n type: \"application/vnd.openxmlformat\",\r\n }),\r\n \"MonthlyDTrading_\" + moment().format(\"YYYYMMDDhhmmss\") + \".xlsx\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\nimport { MonthlyTradingReportFilter } from \"../types\";\r\n\r\nexport const getMonthlyReport = (\r\n user: User,\r\n filter: MonthlyTradingReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getmonthlytradingreport\",\r\n params: {\r\n userid: user.userId,\r\n numofmonths: filter.numofmonths,\r\n },\r\n });\r\n};\r\n\r\nexport default getMonthlyReport;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadReport } from \"../thunks/downloadMonthlyReport\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useMonthlyReportDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.monthlyTrade.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(() => dispatch(downloadReport()), [\r\n dispatch,\r\n ]);\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getMonthlyReport } from \"../api/getMonthlyReport\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../monthlyTradeDataSlice\";\r\nimport moment from \"moment\";\r\n\r\nexport const downloadReport = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.monthlyTrade;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const monthlyReport = await dispatch(getMonthlyReport(user, filter));\r\n if (monthlyReport) {\r\n fileDownload(\r\n new Blob([monthlyReport as any], { type: \"application/pdf\" }),\r\n \"MonthlyTrading_\" + moment().format(\"YYYYMMDDhhmmss\") + \".pdf\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import { MonthlyTradingReportFilter } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nexport const getMonthlyExcel = (\r\n user: User,\r\n filter: MonthlyTradingReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getmonthlytradingxls\",\r\n params: {\r\n userid: user.userId,\r\n numofmonths: filter.numofmonths,\r\n },\r\n });\r\n};\r\n\r\nexport default getMonthlyExcel;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadMonthlyExcel } from \"../thunks/downloadMonthlyReportExcel\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useMonthlyExcelDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.monthlyTrade.downloadReportFetchState\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(() => dispatch(downloadMonthlyExcel()), [\r\n dispatch,\r\n ]);\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getMonthlyExcel } from \"../api/getMonthlyExcel\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../monthlyTradeDataSlice\";\r\nimport moment from \"moment\";\r\n\r\nexport const downloadMonthlyExcel = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.monthlyTrade;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n\r\n const monthlyTrading = await dispatch(getMonthlyExcel(user, filter));\r\n if (monthlyTrading) {\r\n fileDownload(\r\n new Blob([monthlyTrading as any], {\r\n type: \"application/vnd.openxmlformat\",\r\n }),\r\n \"MonthlyTrading_\" + moment().format(\"YYYYMMDDhhmmss\") + \".xlsx\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import React from \"react\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport ExcelIcon from \"@material-ui/icons/TableChartOutlined\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport { useMonthlyReportDownloaderProduct } from \"../../../data/reports/monthlyTrade/hooks/useMTReportDownloaderProduct\";\r\nimport { useMonthlyProductExcelDownloader } from \"../../../data/reports/monthlyTrade/hooks/useMTExcelDownloaderProducts\";\r\nimport { useMonthlyReportDownloaderClient } from \"../../../data/reports/monthlyTrade/hooks/useMTReportDownloaderClients\";\r\nimport { useMonthlyClientExcelDownloader } from \"../../../data/reports/monthlyTrade/hooks/useMTExcelDownloaderClients\";\r\nimport { useMonthlyReportDownloaderDate } from \"../../../data/reports/monthlyTrade/hooks/useMTReportDownloaderDate\";\r\nimport { useMonthlyDateExcelDownloader } from \"../../../data/reports/monthlyTrade/hooks/useMTExcelDownloaderDate\";\r\nimport { useMonthlyReportDownloader } from \"../../../data/reports/monthlyTrade/hooks/useMTReportDownloader\";\r\nimport { useMonthlyExcelDownloader } from \"../../../data/reports/monthlyTrade/hooks/useMTExcelDownloader\";\r\n\r\nexport const DownloadButton: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useMonthlyReportDownloader();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const DownloadExcelButton: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useMonthlyExcelDownloader();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const DownloadButtonProduct: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useMonthlyReportDownloaderProduct();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const DownloadExcelButtonProduct: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useMonthlyProductExcelDownloader();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const DownloadButtonClient: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useMonthlyReportDownloaderClient();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const DownloadExcelButtonClient: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useMonthlyClientExcelDownloader();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const DownloadButtonDate: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useMonthlyReportDownloaderDate();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const DownloadExcelButtonDate: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useMonthlyDateExcelDownloader();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport { Grid, Paper, Button, Typography } from \"@material-ui/core\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { AnnualTradingReportFilter } from \"../../../data/reports/annualTrade/types\";\r\nimport { useAuth } from \"../../../data/auth/hooks\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { NumberInput } from \"../../components/common/NumberInput\";\r\n\r\nexport enum ATRFilterEditorType {\r\n Basic,\r\n Extended,\r\n}\r\n\r\ninterface ATRFilterEditorProps {\r\n filter: AnnualTradingReportFilter;\r\n editFilter: (prop: keyof AnnualTradingReportFilter, value: any) => void;\r\n save: (numofweeks: number) => void;\r\n reset: () => void;\r\n type: ATRFilterEditorType;\r\n}\r\n\r\nexport const ATRFilterEditor: React.FunctionComponent = ({\r\n filter,\r\n editFilter,\r\n save,\r\n type,\r\n reset,\r\n}) => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const { getString } = React.useContext(LocalizationContext);\r\n const [auth] = useAuth();\r\n\r\n const handleChange = React.useCallback(\r\n (event: React.ChangeEvent) => {\r\n editFilter(event.target.name as any, event.target.value);\r\n },\r\n [editFilter]\r\n );\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n property=\"numofyears\"\r\n item={filter}\r\n onChange={handleChange}\r\n label={getString(\"annualNumofyears\")}\r\n />\r\n \r\n\r\n \r\n \r\n {\r\n if (filter.numofyears) {\r\n save(filter.numofyears);\r\n }\r\n showWithDrawer(undefined);\r\n }}\r\n >\r\n {getString(\"orderFilterConfirm\")}\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport FilterIcon from \"@material-ui/icons/FilterListOutlined\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { useMTRFilter } from \"../../../data/reports/monthlyTrade/hooks/useMTRFilter\";\r\nimport {\r\n MTRFilterEditor,\r\n MTRFilterEditorType,\r\n} from \"../monthlyTrades/MTRFilterEditor\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\n\r\nexport const MTRFilterButton: React.FunctionComponent = () => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const showFilter = React.useCallback(\r\n () => showWithDrawer(),\r\n [showWithDrawer]\r\n );\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nconst MTRsFilterEditor: React.FunctionComponent = () => {\r\n const [filter, editFilter, save, , reset] = useMTRFilter();\r\n return (\r\n <>\r\n {filter && (\r\n \r\n )}\r\n \r\n );\r\n};\r\n","import { useCopiedState } from \"../../../../core/util/hooks\";\r\nimport { setFilter, removeFilter, initialState } from \"../monthlyTradeUXSlice\";\r\nimport { setData } from \"../monthlyTradeDataSlice\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport React from \"react\";\r\nimport { MonthlyTradingReportFilter } from \"../types\";\r\n\r\nexport const useMTRFilter = () => {\r\n const storeFilter = useSelector(\r\n (store) => store.ux.reports.monthlyTrade.filter\r\n );\r\n\r\n const [filter, editFilter, changeState, setCurrentFilter] = useCopiedState<\r\n MonthlyTradingReportFilter\r\n >(storeFilter);\r\n\r\n const dispatch = useDispatch();\r\n\r\n const dispatchSetFilter = React.useCallback(\r\n (numofmonths: number) => {\r\n dispatch(setFilter(numofmonths));\r\n dispatch(setData());\r\n },\r\n [dispatch]\r\n );\r\n\r\n const dispatchResetFilter = React.useCallback(() => {\r\n setCurrentFilter(initialState.filter);\r\n }, [setCurrentFilter]);\r\n\r\n return [\r\n filter,\r\n editFilter,\r\n dispatchSetFilter,\r\n changeState,\r\n dispatchResetFilter,\r\n ] as [\r\n typeof filter,\r\n typeof editFilter,\r\n typeof dispatchSetFilter,\r\n typeof changeState,\r\n typeof dispatchResetFilter\r\n ];\r\n};\r\n","import React from \"react\";\r\nimport {\r\n Grid,\r\n CardContent,\r\n CardHeader,\r\n Card,\r\n Divider,\r\n} from \"@material-ui/core\";\r\nimport MonthlyTradesReportTable from \"./MonthlyTradesReportTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { PageComponent } from \"../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { DownloadButton, DownloadExcelButton } from \"./DownloadButton\";\r\nimport { MTRFilterButton } from \"./MTRFilter\";\r\n\r\nconst MonthlyTradesReport: PageComponent = ({ userAccessRights }) => {\r\n const pageStyles = usePageStyles();\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n }\r\n action={}\r\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 MonthActions: React.FunctionComponent = () => (\r\n \r\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 MonthlyTradesReport;\r\n","import { MonthlyTradingReportData, MonthlyTradingReportFilter } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nconst getMonthlyProductData = (\r\n user: User,\r\n filter: MonthlyTradingReportFilter\r\n) => {\r\n return webApi({\r\n method: \"GET\",\r\n url: \"reporting/getmonthlytradinglist\",\r\n params: {\r\n userid: user.userId,\r\n option: \"P\",\r\n year: filter.year,\r\n month: filter.month,\r\n },\r\n });\r\n};\r\n\r\nexport default getMonthlyProductData;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadReport } from \"../thunks/loadReportProductData\";\r\nimport { MonthlyTradingReportData } from \"../types\";\r\nimport { setData } from \"../monthlyTradeDataSlice\";\r\n\r\nexport const useReportProductData = () => {\r\n const data = useSelector(\r\n (s) => s.data.reports.monthlyTrade.data\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadData = React.useCallback(() => dispatch(loadReport()), [\r\n dispatch,\r\n ]);\r\n\r\n const resetData = React.useCallback(() => {\r\n dispatch(setData(undefined));\r\n }, [dispatch]);\r\n\r\n return [data, dispatchLoadData, resetData] as [\r\n typeof data,\r\n typeof dispatchLoadData,\r\n typeof resetData\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { setData } from \"../monthlyTradeDataSlice\";\r\nimport getMonthlyProductData from \"../api/getMonthlyProductData\";\r\n\r\nexport const loadReport = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const user = store.data.auth.current.user;\r\n const { filter } = store.ux.reports.monthlyTrade;\r\n\r\n const pagedTrades = await dispatch(getMonthlyProductData(user, filter));\r\n\r\n dispatch(setData(pagedTrades || []));\r\n};\r\n","import React from \"react\";\r\nimport { useMTReportProductColumns } from \"./useMTReportProductColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\nimport { TradeList } from \"../../../data/trading/trades/types\";\r\nimport { Table, TableDataProps } from \"../../components/common/Table\";\r\nimport { MonthlyTradingReportData } from \"../../../data/reports/monthlyTrade/types\";\r\nimport { useReportProductData } from \"../../../data/reports/monthlyTrade/hooks/useReportProductData\";\r\nimport { useMonthlyActions } from \"./useMonthlyActions\";\r\n\r\nexport interface MonthlyTradesTableProps {\r\n userAccessRights: AccessRights;\r\n}\r\n\r\ntype MonthlyTradesTablePropsType = MonthlyTradesTableProps &\r\n TableDataProps;\r\n\r\nconst MTRProductTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n ...tableProps\r\n}) => {\r\n const columns = useMTReportProductColumns();\r\n const [data, load, reset] = useReportProductData();\r\n React.useEffect(() => reset, [reset]);\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={load}\r\n immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n // actions={actions}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default MTRProductTable;\r\n","import { MonthlyTradingReportData } from \"../../../data/reports/monthlyTrade/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\r\nimport { useTheme } from '@material-ui/core/styles';\r\n\r\nexport const useMTReportProductColumns = () => {\r\n const { getString, getFormatedNumberString } = React.useContext(\r\n LocalizationContext\r\n );\r\n\r\n const theme = useTheme();\r\n\tconst screenExtraSmall = useMediaQuery(theme.breakpoints.only('xs'));\r\n\r\n return React.useMemo(\r\n () => [\r\n {\r\n title: getString(\"monthlyTradeReportProduct\"),\r\n field: \"displayVal\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"monthlyTradeReportQty\"),\r\n render: (row) => `${getFormatedNumberString(row.qty)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"dailyTradeReportTurnoverRSD\"),\r\n render: (row) => `${getFormatedNumberString(row.turnoverRsd, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"dailyTradeReportTurnoverEUR\"),\r\n render: (row) => `${getFormatedNumberString(row.turnoverEur, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n\t\t\t\thidden: screenExtraSmall,\r\n },\r\n {\r\n title: getString(\"dailyTradeReportCountTransaction\"),\r\n field: \"tranCount\",\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n\t\t\t\thidden: screenExtraSmall,\r\n },\r\n {\r\n title: getString(\"mTReportWeightedPrice\"),\r\n render: (row) => `${getFormatedNumberString(row.weightedPrice, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n\t\t\t\thidden: screenExtraSmall,\r\n },\r\n {\r\n title: getString(\"mTReportWeightedPriceeur\"),\r\n render: (row) =>\r\n `${getFormatedNumberString(row.weightedPriceEur, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n\t\t\t\thidden: screenExtraSmall,\r\n },\r\n ],\r\n [getString, getFormatedNumberString, screenExtraSmall]\r\n ) as Column[];\r\n};\r\n","import { setReportData } from \"../monthlyTradeUXSlice\";\r\nimport { setData } from \"../monthlyTradeDataSlice\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport React from \"react\";\r\nimport { MonthlyTradingReportFilter } from \"../types\";\r\nimport { setReportMonth, setReportYear } from \"../monthlyTradeUXSlice\";\r\n\r\nexport const useCurrentTradesReportFilter = () => {\r\n const filter = useSelector(\r\n (store) => store.ux.reports.monthlyTrade.filter\r\n );\r\n const dispatch = useDispatch();\r\n const dispatchSetReportDate = React.useCallback(\r\n (reportDate: number) => {\r\n dispatch(setReportData(reportDate));\r\n dispatch(setData());\r\n },\r\n [dispatch]\r\n );\r\n const dispatchSetReportMonth = React.useCallback(\r\n (month: number) => {\r\n dispatch(setReportMonth(month));\r\n dispatch(setData());\r\n },\r\n [dispatch]\r\n );\r\n const dispatchSetReportYear = React.useCallback(\r\n (year: number) => {\r\n dispatch(setReportYear(year));\r\n dispatch(setData());\r\n },\r\n [dispatch]\r\n );\r\n\r\n return [\r\n filter,\r\n dispatchSetReportDate,\r\n dispatchSetReportMonth,\r\n dispatchSetReportYear,\r\n ] as [\r\n typeof filter,\r\n typeof dispatchSetReportDate,\r\n typeof dispatchSetReportMonth,\r\n typeof dispatchSetReportYear\r\n ];\r\n};\r\n","import React from \"react\";\r\nimport {\r\n Grid,\r\n CardContent,\r\n CardHeader,\r\n Card,\r\n Divider,\r\n} from \"@material-ui/core\";\r\nimport MTRProductTable from \"./MTRProductTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { PageComponent, AccessRights } from \"../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport {\r\n DownloadButtonProduct,\r\n DownloadExcelButtonProduct,\r\n} from \"./DownloadButton\";\r\nimport { monthlyTradesReportLocation } from \"./Locations\";\r\nimport { RouteComponentProps } from \"react-router-dom\";\r\nimport { useCurrentTradesReportFilter } from \"../../../data/reports/monthlyTrade/hooks/useTradesReportFilter\";\r\n\r\nexport interface MTRProductPageInfo {\r\n year: string;\r\n month: string;\r\n}\r\n\r\nexport interface MTRProductPageProps\r\n extends RouteComponentProps {\r\n userAccessRights: AccessRights;\r\n}\r\n\r\nconst MTRProductPage: React.FunctionComponent = (\r\n props\r\n) => {\r\n const pageStyles = usePageStyles();\r\n\r\n // ovde su parametri za izvestaj\r\n // zbog toga stho se uzimaju iz URL-a moraju biti tipa string, ali ih konvertujem u number zbog toga sto to trazi API\r\n // dalje ih treba proslediti u odgovarajuci hook da bi se sacuvali u filteru u redux store-u\r\n const yearNumber = Number(props.match.params.year);\r\n const monthNumber = Number(props.match.params.month);\r\n console.log(\"Report params:\", yearNumber, monthNumber);\r\n\r\n const [\r\n filter,\r\n setReportDate,\r\n setReportMonth,\r\n setReporthYear,\r\n ] = useCurrentTradesReportFilter();\r\n\r\n React.useEffect(() => setReportMonth(monthNumber), [monthNumber]);\r\n React.useEffect(() => setReporthYear(yearNumber), [yearNumber]);\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n }\r\n action={}\r\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 MonthActions: React.FunctionComponent = () => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default MTRProductPage;\r\n","import { MonthlyTradingReportData, MonthlyTradingReportFilter } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nconst getMonthlyClientData = (\r\n user: User,\r\n filter: MonthlyTradingReportFilter\r\n) => {\r\n return webApi({\r\n method: \"GET\",\r\n url: \"reporting/getmonthlytradinglist\",\r\n params: {\r\n userid: user.userId,\r\n option: \"C\",\r\n year: filter.year,\r\n month: filter.month,\r\n },\r\n });\r\n};\r\n\r\nexport default getMonthlyClientData;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadReport } from \"../thunks/loadReportClientData\";\r\nimport { MonthlyTradingReportData } from \"../types\";\r\nimport { setData } from \"../monthlyTradeDataSlice\";\r\n\r\nexport const useReportClientData = () => {\r\n const data = useSelector(\r\n (s) => s.data.reports.monthlyTrade.data\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadData = React.useCallback(() => dispatch(loadReport()), [\r\n dispatch,\r\n ]);\r\n\r\n const resetData = React.useCallback(() => {\r\n dispatch(setData(undefined));\r\n }, [dispatch]);\r\n\r\n return [data, dispatchLoadData, resetData] as [\r\n typeof data,\r\n typeof dispatchLoadData,\r\n typeof resetData\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { setData } from \"../monthlyTradeDataSlice\";\r\nimport getMonthlyClientData from \"../api/getMonthlyClientData\";\r\n\r\nexport const loadReport = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const user = store.data.auth.current.user;\r\n const { filter } = store.ux.reports.monthlyTrade;\r\n\r\n const pagedTrades = await dispatch(getMonthlyClientData(user, filter));\r\n\r\n dispatch(setData(pagedTrades || []));\r\n};\r\n","import React from \"react\";\r\nimport { useMTReportClientColumns } from \"./useMTReportClientColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\nimport { TradeList } from \"../../../data/trading/trades/types\";\r\nimport { Table, TableDataProps } from \"../../components/common/Table\";\r\nimport { MonthlyTradingReportData } from \"../../../data/reports/monthlyTrade/types\";\r\nimport { useReportClientData } from \"../../../data/reports/monthlyTrade/hooks/useReportClientData\";\r\nimport { useMonthlyActions } from \"./useMonthlyActions\";\r\n\r\nexport interface MonthlyTradesTableProps {\r\n userAccessRights: AccessRights;\r\n}\r\n\r\ntype MonthlyTradesTablePropsType = MonthlyTradesTableProps &\r\n TableDataProps;\r\n\r\nconst MTRClientTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n ...tableProps\r\n}) => {\r\n const columns = useMTReportClientColumns();\r\n const [data, load, reset] = useReportClientData();\r\n React.useEffect(() => reset, [reset]);\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={load}\r\n immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n // actions={actions}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default MTRClientTable;\r\n","import { MonthlyTradingReportData } from \"../../../data/reports/monthlyTrade/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\n\r\nexport const useMTReportClientColumns = () => {\r\n const { getString, getFormatedNumberString } = React.useContext(\r\n LocalizationContext\r\n );\r\n\r\n return React.useMemo(\r\n () => [\r\n {\r\n title: getString(\"monthlyTradeReportClient\"),\r\n field: \"displayVal\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"dailyTradeReportTurnoverRSD\"),\r\n render: (row) => `${getFormatedNumberString(row.turnoverRsd, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"dailyTradeReportTurnoverEUR\"),\r\n render: (row) => `${getFormatedNumberString(row.turnoverEur, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"dailyTradeReportCountTransaction\"),\r\n field: \"tranCount\",\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n ],\r\n [getString, getFormatedNumberString]\r\n ) as Column[];\r\n};\r\n","import React from \"react\";\r\nimport {\r\n Grid,\r\n CardContent,\r\n CardHeader,\r\n Card,\r\n Divider,\r\n} from \"@material-ui/core\";\r\nimport MTRClientTable from \"./MTRClientTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { PageComponent, AccessRights } from \"../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport {\r\n DownloadButtonClient,\r\n DownloadExcelButtonClient,\r\n} from \"./DownloadButton\";\r\nimport { monthlyTradesReportLocation } from \"./Locations\";\r\nimport { RouteComponentProps } from \"react-router-dom\";\r\nimport { useCurrentTradesReportFilter } from \"../../../data/reports/monthlyTrade/hooks/useTradesReportFilter\";\r\n\r\nexport interface MTRClientPageInfo {\r\n year: string;\r\n month: string;\r\n}\r\n\r\nexport interface MTRClientPageProps\r\n extends RouteComponentProps {\r\n userAccessRights: AccessRights;\r\n}\r\n\r\nconst MTRClientPage: React.FunctionComponent = (props) => {\r\n const pageStyles = usePageStyles();\r\n\r\n // ovde su parametri za izvestaj\r\n // zbog toga stho se uzimaju iz URL-a moraju biti tipa string, ali ih konvertujem u number zbog toga sto to trazi API\r\n // dalje ih treba proslediti u odgovarajuci hook da bi se sacuvali u filteru u redux store-u\r\n const yearNumber = Number(props.match.params.year);\r\n const monthNumber = Number(props.match.params.month);\r\n console.log(\"Report params:\", yearNumber, monthNumber);\r\n\r\n const [\r\n filter,\r\n setReportDate,\r\n setReportMonth,\r\n setReporthYear,\r\n ] = useCurrentTradesReportFilter();\r\n\r\n React.useEffect(() => setReportMonth(monthNumber), [monthNumber]);\r\n React.useEffect(() => setReporthYear(yearNumber), [yearNumber]);\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n }\r\n action={}\r\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 MonthActions: React.FunctionComponent = () => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default MTRClientPage;\r\n","import { MonthlyTradingReportData, MonthlyTradingReportFilter } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nconst getMonthlyDateData = (user: User, filter: MonthlyTradingReportFilter) => {\r\n return webApi({\r\n method: \"GET\",\r\n url: \"reporting/getmonthlytradinglist\",\r\n params: {\r\n userid: user.userId,\r\n option: \"D\",\r\n year: filter.year,\r\n month: filter.month,\r\n },\r\n });\r\n};\r\n\r\nexport default getMonthlyDateData;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadReport } from \"../thunks/loadReportDateData\";\r\nimport { MonthlyTradingReportData } from \"../types\";\r\nimport { setData } from \"../monthlyTradeDataSlice\";\r\n\r\nexport const useReportDateData = () => {\r\n const data = useSelector(\r\n (s) => s.data.reports.monthlyTrade.data\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadData = React.useCallback(() => dispatch(loadReport()), [\r\n dispatch,\r\n ]);\r\n\r\n const resetData = React.useCallback(() => {\r\n dispatch(setData(undefined));\r\n }, [dispatch]);\r\n\r\n return [data, dispatchLoadData, resetData] as [\r\n typeof data,\r\n typeof dispatchLoadData,\r\n typeof resetData\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { setData } from \"../monthlyTradeDataSlice\";\r\nimport getMonthlyDateData from \"../api/getMonthlyDateData\";\r\n\r\nexport const loadReport = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const user = store.data.auth.current.user;\r\n const { filter } = store.ux.reports.monthlyTrade;\r\n\r\n const pagedTrades = await dispatch(getMonthlyDateData(user, filter));\r\n\r\n dispatch(setData(pagedTrades || []));\r\n};\r\n","import React from \"react\";\r\nimport { useMTReportDateColumns } from \"./useMTReportDateColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\nimport { TradeList } from \"../../../data/trading/trades/types\";\r\nimport { Table, TableDataProps } from \"../../components/common/Table\";\r\nimport { MonthlyTradingReportData } from \"../../../data/reports/monthlyTrade/types\";\r\nimport { useReportDateData } from \"../../../data/reports/monthlyTrade/hooks/useReportDateData\";\r\nimport { useMonthlyActions } from \"./useMonthlyActions\";\r\n\r\nexport interface MonthlyTradesTableProps {\r\n userAccessRights: AccessRights;\r\n}\r\n\r\ntype MonthlyTradesTablePropsType = MonthlyTradesTableProps &\r\n TableDataProps;\r\n\r\nconst MTRDateTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n ...tableProps\r\n}) => {\r\n const columns = useMTReportDateColumns();\r\n const [data, load, reset] = useReportDateData();\r\n React.useEffect(() => reset, [reset]);\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={load}\r\n immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n // actions={actions}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default MTRDateTable;\r\n","import { MonthlyTradingReportData } from \"../../../data/reports/monthlyTrade/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\r\nimport { useTheme } from '@material-ui/core/styles';\r\n\r\nexport const useMTReportDateColumns = () => {\r\n const { getString, getFormatedNumberString } = React.useContext(\r\n LocalizationContext\r\n );\r\n \r\n const theme = useTheme();\r\n\tconst screenExtraSmall = useMediaQuery(theme.breakpoints.only('xs'));\r\n\r\n return React.useMemo(\r\n () => [\r\n {\r\n title: getString(\"monthlyTradeReportDate\"),\r\n field: \"displayVal\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"dailyTradeReportTurnoverRSD\"),\r\n render: (row) => `${getFormatedNumberString(row.turnoverRsd, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"dailyTradeReportTurnoverEUR\"),\r\n render: (row) => `${getFormatedNumberString(row.turnoverEur, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n\t\t\t\thidden: screenExtraSmall,\r\n },\r\n {\r\n title: getString(\"dailyTradeReportCountTransaction\"),\r\n field: \"tranCount\",\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n ],\r\n [getString, getFormatedNumberString, screenExtraSmall]\r\n ) as Column[];\r\n};\r\n","import React from \"react\";\r\nimport {\r\n Grid,\r\n CardContent,\r\n CardHeader,\r\n Card,\r\n Divider,\r\n} from \"@material-ui/core\";\r\nimport MTRDateTable from \"./MTRDateTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { PageComponent, AccessRights } from \"../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { DownloadButtonDate, DownloadExcelButtonDate } from \"./DownloadButton\";\r\nimport { monthlyTradesReportLocation } from \"./Locations\";\r\nimport { RouteComponentProps } from \"react-router-dom\";\r\nimport { useCurrentTradesReportFilter } from \"../../../data/reports/monthlyTrade/hooks/useTradesReportFilter\";\r\n\r\nexport interface MTRDatePageInfo {\r\n year: string;\r\n month: string;\r\n}\r\n\r\nexport interface MTRDatePageProps extends RouteComponentProps {\r\n userAccessRights: AccessRights;\r\n}\r\n\r\nconst MTRDatePage: React.FunctionComponent = (props) => {\r\n const pageStyles = usePageStyles();\r\n\r\n // ovde su parametri za izvestaj\r\n // zbog toga stho se uzimaju iz URL-a moraju biti tipa string, ali ih konvertujem u number zbog toga sto to trazi API\r\n // dalje ih treba proslediti u odgovarajuci hook da bi se sacuvali u filteru u redux store-u\r\n const yearNumber = Number(props.match.params.year);\r\n const monthNumber = Number(props.match.params.month);\r\n console.log(\"Report params:\", yearNumber, monthNumber);\r\n\r\n const [\r\n filter,\r\n setReportDate,\r\n setReportMonth,\r\n setReporthYear,\r\n ] = useCurrentTradesReportFilter();\r\n\r\n React.useEffect(() => setReportMonth(monthNumber), [monthNumber]);\r\n React.useEffect(() => setReporthYear(yearNumber), [yearNumber]);\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n }\r\n action={}\r\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 MonthActions: React.FunctionComponent = () => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default MTRDatePage;\r\n","import MonthlyTradesReport from \"./MonthlyTradesReport\";\r\nimport { NavigationItem } from \"../../../core/navigation/types\";\r\nimport {\r\n monthlyTradesReportLocation,\r\n monthlyProductLocation,\r\n monthlyClientLocation,\r\n monthlyDateLocation,\r\n} from \"./Locations\";\r\nimport MTRProductPage from \"./MTRProductPage\";\r\nimport MTRClientPage from \"./MTRClientPage\";\r\nimport MTRDatePage from \"./MTRDatePage\";\r\n\r\nexport const monthlyTradesReportComponents: NavigationItem[] = [\r\n {\r\n Component: MonthlyTradesReport,\r\n isMenuItem: true,\r\n path: monthlyTradesReportLocation,\r\n },\r\n {\r\n Component: MTRProductPage,\r\n isMenuItem: false,\r\n path: monthlyProductLocation,\r\n },\r\n {\r\n Component: MTRClientPage,\r\n isMenuItem: false,\r\n path: monthlyClientLocation,\r\n },\r\n {\r\n Component: MTRDatePage,\r\n isMenuItem: false,\r\n path: monthlyDateLocation,\r\n },\r\n];\r\n","import { AnnualTradingReportData, AnnualTradingReportFilter } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nconst getAnnualTradingData = (\r\n user: User,\r\n filter: AnnualTradingReportFilter\r\n) => {\r\n return webApi({\r\n method: \"GET\",\r\n url: \"reporting/getannualtradinglist\",\r\n params: {\r\n userid: user.userId,\r\n numofyears: filter.numofyears,\r\n },\r\n });\r\n};\r\n\r\nexport default getAnnualTradingData;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadReport } from \"../thunks/loadReportData\";\r\nimport { AnnualTradingReportData } from \"../types\";\r\n\r\nexport const useTradesReportData = () => {\r\n const data = useSelector(\r\n (s) => s.data.reports.annualTrade.data\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadData = React.useCallback(() => dispatch(loadReport()), [\r\n dispatch,\r\n ]);\r\n\r\n return [data, dispatchLoadData] as [typeof data, typeof dispatchLoadData];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { setData } from \"../annualTradeDataSlice\";\r\nimport getAnnualTradingDataApi from \"../api/getAnnualTradingDataList\";\r\n\r\nexport const loadReport = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const user = store.data.auth.current.user;\r\n const { filter } = store.ux.reports.annualTrade;\r\n\r\n const pagedTrades = await dispatch(getAnnualTradingDataApi(user, filter));\r\n\r\n dispatch(setData(pagedTrades || []));\r\n};\r\n","export const annualTradesReportLocation = \"/reports/annualreports\";\r\n\r\nexport const getReportLocation = (basePath: string, year: number) => {\r\n return `${basePath}/${year}`;\r\n};\r\n\r\nexport const annualProductLocationBase = \"/reports/annualreports/products\";\r\nexport const annualClientLocationBase = \"/reports/annualreports/client\";\r\nexport const annualDateLocationBase = \"/reports/annualreports/date\";\r\n\r\nexport const annualProductLocation = `${annualProductLocationBase}/:year`;\r\nexport const annualClientLocation = `${annualClientLocationBase}/:year`;\r\nexport const annualDateLocation = `${annualDateLocationBase}/:year`;\r\n\r\nexport const getProductLocation = (year: number) =>\r\n getReportLocation(annualProductLocationBase, year);\r\nexport const getClientLocation = (year: number) =>\r\n getReportLocation(annualClientLocationBase, year);\r\nexport const getDateLocation = (year: number) =>\r\n getReportLocation(annualDateLocationBase, year);\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport { AnnualTradingReportData } from \"../../../data/reports/annualTrade/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Action } from \"material-table\";\r\nimport { useHistory } from \"react-router-dom\";\r\n//import { useViewBank } from \"./DisplayBank\";\r\nimport {\r\n getProductLocation,\r\n getClientLocation,\r\n getDateLocation,\r\n} from \"./Locations\";\r\nimport EventOutlinedIcon from \"@material-ui/icons/EventOutlined\";\r\nimport PeopleOutlineOutlinedIcon from \"@material-ui/icons/PeopleOutlineOutlined\";\r\nimport LocalShippingOutlinedIcon from \"@material-ui/icons/LocalShippingOutlined\";\r\nimport { useAuth } from \"../../../data/auth/hooks\";\r\n\r\nexport const useAnnualActions = () => {\r\n const { getString } = useContext(LocalizationContext);\r\n\r\n const history = useHistory();\r\n\r\n const [auth] = useAuth();\r\n\r\n return useMemo(() => {\r\n const result: Action[] = [\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"aTableProduct\"),\r\n onClick: (event, rowData) => {\r\n const reportData = rowData as AnnualTradingReportData;\r\n history.push(getProductLocation(reportData.year));\r\n },\r\n },\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"aTableClient\"),\r\n onClick: (event, rowData) => {\r\n const reportData = rowData as AnnualTradingReportData;\r\n history.push(getClientLocation(reportData.year));\r\n },\r\n hidden: auth.status === \"successful\" && (auth.user.roleCode === \"MEMTRADER\" || auth.user.roleCode === \"MEMMANAGER\" || auth.user.roleCode === \"MEMCONTACT\" ) \r\n },\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"aTableDate\"),\r\n onClick: (event, rowData) => {\r\n const reportData = rowData as AnnualTradingReportData;\r\n history.push(getDateLocation(reportData.year));\r\n },\r\n },\r\n ];\r\n\r\n return result;\r\n }, [, , getString]);\r\n};\r\n","import React from \"react\";\r\nimport { useAnnualTradesColumns } from \"./useAnnualTradingReportColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\nimport { ControledTable } from \"../../components/common/ControledTable\";\r\nimport { AnnualTradingReportData } from \"../../../data/reports/annualTrade/types\";\r\nimport { useTradesReportData } from \"../../../data/reports/annualTrade/hooks/useTradesReportData\";\r\nimport { useAnnualTradesReportIndex } from \"../../../data/reports/annualTrade/hooks/useAnnualTradesReportIndex\";\r\nimport { useAnnualActions } from \"./useAnnualActions\";\r\n\r\nexport interface AnnualTradesTableProps {\r\n userAccessRights: AccessRights;\r\n}\r\n\r\ntype AnnualTradesTablePropsType = AnnualTradesTableProps\r\n\r\nconst AnnualTradesReportTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n ...tableProps\r\n}) => {\r\n const actions = useAnnualActions();\r\n const columns = useAnnualTradesColumns();\r\n\r\n const [data, load] = useTradesReportData();\r\n const [index, setIndex] = useAnnualTradesReportIndex();\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={load}\r\n onPageIndexChange={setIndex}\r\n pageIndex={index}\r\n immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n actions={actions}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default AnnualTradesReportTable;\r\n","import { AnnualTradingReportData } from \"../../../data/reports/annualTrade/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\r\nimport { useTheme } from '@material-ui/core/styles';\r\n\r\nexport const useAnnualTradesColumns = () => {\r\n\r\n const { getString, getFormatedNumberString } = React.useContext(LocalizationContext);\r\n \r\n\tconst theme = useTheme();\r\n\tconst screenExtraSmall = useMediaQuery(theme.breakpoints.only('xs'));\r\n\r\n return React.useMemo(\r\n () => [\r\n {\r\n title: getString(\"annualTradeYear\"),\r\n field: \"displayVal\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"dailyTradeReportTurnoverRSD\"),\r\n render: (row) => `${getFormatedNumberString(row.turnoverRsd, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"dailyTradeReportTurnoverEUR\"),\r\n render: (row) => `${getFormatedNumberString(row.turnoverEur, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n\t\t\t\thidden: screenExtraSmall,\r\n },\r\n {\r\n title: getString(\"dailyTradeReportCountTransaction\"),\r\n field: \"tranCount\",\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n\t\t\t\thidden: screenExtraSmall,\r\n },\r\n ],\r\n [getString, getFormatedNumberString,screenExtraSmall]\r\n ) as Column[];\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { setIndex } from \"../annualTradeUXSlice\";\r\nimport { PageIndex } from \"../../../models\";\r\n\r\nexport const useAnnualTradesReportIndex = () => {\r\n\tconst pageIndex = useSelector(s => s.ux.reports.annualTrade.index);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchSetIndex = React.useCallback((index: PageIndex) => dispatch(setIndex(index)), [dispatch]);\r\n\r\n\treturn [pageIndex, dispatchSetIndex] as [typeof pageIndex, typeof dispatchSetIndex];\r\n};\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\nimport { AnnualTradingReportFilter } from \"../types\";\r\n\r\nexport const getAnnualProductReport = (\r\n user: User,\r\n filter: AnnualTradingReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getannualtradingreport\",\r\n params: {\r\n userid: user.userId,\r\n option: \"P\",\r\n year: filter.year,\r\n },\r\n });\r\n};\r\n\r\nexport default getAnnualProductReport;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadReport } from \"../thunks/downloadAnnualProductReport\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useAnnualReportDownloaderProduct = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.annualTrade.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(() => dispatch(downloadReport()), [\r\n dispatch,\r\n ]);\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getAnnualProductReport } from \"../api/getAnnualProductReport\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../annualTradeDataSlice\";\r\nimport moment from \"moment\";\r\n\r\nexport const downloadReport = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.annualTrade;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const annualReport = await dispatch(getAnnualProductReport(user, filter));\r\n if (annualReport) {\r\n fileDownload(\r\n new Blob([annualReport as any], { type: \"application/pdf\" }),\r\n \"AnnualPTrading_\" + moment().format(\"YYYYMMDDhhmmss\") + \".pdf\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import { AnnualTradingReportFilter } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nexport const getAnnualProductExcel = (\r\n user: User,\r\n filter: AnnualTradingReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getannualtradingxls\",\r\n params: {\r\n userid: user.userId,\r\n option: \"P\",\r\n year: filter.year,\r\n },\r\n });\r\n};\r\n\r\nexport default getAnnualProductExcel;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadAnnualProductExcel } from \"../thunks/downloadAnnualProductReportExcel\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useAnnualProductExcelDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.annualTrade.downloadReportFetchState\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadAnnualProductExcel()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getAnnualProductExcel } from \"../api/getAnnualProductExcel\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../annualTradeDataSlice\";\r\nimport moment from \"moment\";\r\n\r\nexport const downloadAnnualProductExcel = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.annualTrade;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n\r\n const annualTrading = await dispatch(getAnnualProductExcel(user, filter));\r\n if (annualTrading) {\r\n fileDownload(\r\n new Blob([annualTrading as any], {\r\n type: \"application/vnd.openxmlformat\",\r\n }),\r\n \"AnnualPTrading_\" + moment().format(\"YYYYMMDDhhmmss\") + \".xlsx\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\nimport { AnnualTradingReportFilter } from \"../types\";\r\n\r\nexport const getAnnualClientReport = (\r\n user: User,\r\n filter: AnnualTradingReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getannualtradingreport\",\r\n params: {\r\n userid: user.userId,\r\n option: \"C\",\r\n year: filter.year,\r\n },\r\n });\r\n};\r\n\r\nexport default getAnnualClientReport;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadReport } from \"../thunks/downloadAnnualClientReport\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useAnnualReportDownloaderClient = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.annualTrade.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(() => dispatch(downloadReport()), [\r\n dispatch,\r\n ]);\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getAnnualClientReport } from \"../api/getAnnualClientReport\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../annualTradeDataSlice\";\r\nimport moment from \"moment\";\r\n\r\nexport const downloadReport = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.annualTrade;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const annualReport = await dispatch(getAnnualClientReport(user, filter));\r\n if (annualReport) {\r\n fileDownload(\r\n new Blob([annualReport as any], { type: \"application/pdf\" }),\r\n \"AnnualCTrading_\" + moment().format(\"YYYYMMDDhhmmss\") + \".pdf\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import { AnnualTradingReportFilter } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nexport const getAnnualClientExcel = (\r\n user: User,\r\n filter: AnnualTradingReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getannualtradingxls\",\r\n params: {\r\n userid: user.userId,\r\n option: \"C\",\r\n year: filter.year,\r\n },\r\n });\r\n};\r\n\r\nexport default getAnnualClientExcel;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadAnnualClientExcel } from \"../thunks/downloadAnnualClientReportExcel\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useAnnualClientExcelDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.annualTrade.downloadReportFetchState\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadAnnualClientExcel()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getAnnualClientExcel } from \"../api/getAnnualClientExcel\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../annualTradeDataSlice\";\r\nimport moment from \"moment\";\r\n\r\nexport const downloadAnnualClientExcel = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.annualTrade;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n\r\n const annualTrading = await dispatch(getAnnualClientExcel(user, filter));\r\n if (annualTrading) {\r\n fileDownload(\r\n new Blob([annualTrading as any], {\r\n type: \"application/vnd.openxmlformat\",\r\n }),\r\n \"AnnualCTrading_\" + moment().format(\"YYYYMMDDhhmmss\") + \".xlsx\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\nimport { AnnualTradingReportFilter } from \"../types\";\r\n\r\nexport const getAnnualDateReport = (\r\n user: User,\r\n filter: AnnualTradingReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getannualtradingreport\",\r\n params: {\r\n userid: user.userId,\r\n option: \"D\",\r\n year: filter.year,\r\n },\r\n });\r\n};\r\n\r\nexport default getAnnualDateReport;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadReport } from \"../thunks/downloadAnnualDateReport\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useAnnualReportDownloaderDate = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.annualTrade.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(() => dispatch(downloadReport()), [\r\n dispatch,\r\n ]);\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getAnnualDateReport } from \"../api/getAnnualDateReport\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../annualTradeDataSlice\";\r\nimport moment from \"moment\";\r\n\r\nexport const downloadReport = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.annualTrade;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const annualReport = await dispatch(getAnnualDateReport(user, filter));\r\n if (annualReport) {\r\n fileDownload(\r\n new Blob([annualReport as any], { type: \"application/pdf\" }),\r\n \"AnnualDTrading_\" + moment().format(\"YYYYMMDDhhmmss\") + \".pdf\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import { AnnualTradingReportFilter } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nexport const getAnnualDateExcel = (\r\n user: User,\r\n filter: AnnualTradingReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getannualtradingxls\",\r\n params: {\r\n userid: user.userId,\r\n option: \"D\",\r\n year: filter.year,\r\n },\r\n });\r\n};\r\n\r\nexport default getAnnualDateExcel;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadAnnualDateExcel } from \"../thunks/downloadAnnualDateReportExcel\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useAnnualDateExcelDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.annualTrade.downloadReportFetchState\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadAnnualDateExcel()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getAnnualDateExcel } from \"../api/getAnnualDateExcel\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../annualTradeDataSlice\";\r\nimport moment from \"moment\";\r\n\r\nexport const downloadAnnualDateExcel = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.annualTrade;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n\r\n const annualTrading = await dispatch(getAnnualDateExcel(user, filter));\r\n if (annualTrading) {\r\n fileDownload(\r\n new Blob([annualTrading as any], {\r\n type: \"application/vnd.openxmlformat\",\r\n }),\r\n \"AnnualDTrading_\" + moment().format(\"YYYYMMDDhhmmss\") + \".xlsx\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\nimport { AnnualTradingReportFilter } from \"../types\";\r\n\r\nexport const getAnnualReport = (\r\n user: User,\r\n filter: AnnualTradingReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getannualtradingreport\",\r\n params: {\r\n userid: user.userId,\r\n },\r\n });\r\n};\r\n\r\nexport default getAnnualReport;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadReport } from \"../thunks/downloadAnnualReport\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useAnnualReportDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.annualTrade.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(() => dispatch(downloadReport()), [\r\n dispatch,\r\n ]);\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getAnnualReport } from \"../api/getAnnualReport\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../annualTradeDataSlice\";\r\nimport moment from \"moment\";\r\n\r\nexport const downloadReport = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.annualTrade;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const annualReport = await dispatch(getAnnualReport(user, filter));\r\n if (annualReport) {\r\n fileDownload(\r\n new Blob([annualReport as any], { type: \"application/pdf\" }),\r\n \"AnnualTrading_\" + moment().format(\"YYYYMMDDhhmmss\") + \".pdf\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import { AnnualTradingReportFilter } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nexport const getAnnualExcel = (\r\n user: User,\r\n filter: AnnualTradingReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getannualtradingxls\",\r\n params: {\r\n userid: user.userId,\r\n },\r\n });\r\n};\r\n\r\nexport default getAnnualExcel;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadAnnualExcel } from \"../thunks/downloadAnnualExcel\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useAnnualExcelDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.annualTrade.downloadReportFetchState\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(() => dispatch(downloadAnnualExcel()), [\r\n dispatch,\r\n ]);\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getAnnualExcel } from \"../api/getAnnualExcel\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../annualTradeDataSlice\";\r\nimport moment from \"moment\";\r\n\r\nexport const downloadAnnualExcel = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.annualTrade;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n\r\n const annualTrading = await dispatch(getAnnualExcel(user, filter));\r\n if (annualTrading) {\r\n fileDownload(\r\n new Blob([annualTrading as any], {\r\n type: \"application/vnd.openxmlformat\",\r\n }),\r\n \"AnnualTrading_\" + moment().format(\"YYYYMMDDhhmmss\") + \".xlsx\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import React from \"react\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport ExcelIcon from \"@material-ui/icons/TableChartOutlined\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport { useAnnualReportDownloaderProduct } from \"../../../data/reports/annualTrade/hooks/useATReportDownloaderProduct\";\r\nimport { useAnnualProductExcelDownloader } from \"../../../data/reports/annualTrade/hooks/useATExcelDownloaderProducts\";\r\nimport { useAnnualReportDownloaderClient } from \"../../../data/reports/annualTrade/hooks/useATReportDownloaderClients\";\r\nimport { useAnnualClientExcelDownloader } from \"../../../data/reports/annualTrade/hooks/useATExcelDownloaderClients\";\r\nimport { useAnnualReportDownloaderDate } from \"../../../data/reports/annualTrade/hooks/useATReportDownloaderDate\";\r\nimport { useAnnualDateExcelDownloader } from \"../../../data/reports/annualTrade/hooks/useATExcelDownloaderDate\";\r\nimport { useAnnualReportDownloader } from \"../../../data/reports/annualTrade/hooks/useATReportDownloader\";\r\nimport { useAnnualExcelDownloader } from \"../../../data/reports/annualTrade/hooks/useATExcelDownloader\";\r\n\r\nexport const DownloadButton: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useAnnualReportDownloader();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const DownloadExcelButton: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useAnnualExcelDownloader();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const DownloadButtonProduct: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useAnnualReportDownloaderProduct();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const DownloadExcelButtonProduct: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useAnnualProductExcelDownloader();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const DownloadButtonClient: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useAnnualReportDownloaderClient();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const DownloadExcelButtonClient: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useAnnualClientExcelDownloader();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const DownloadButtonDate: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useAnnualReportDownloaderDate();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const DownloadExcelButtonDate: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useAnnualDateExcelDownloader();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport FilterIcon from \"@material-ui/icons/FilterListOutlined\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { useATRFilter } from \"../../../data/reports/annualTrade/hooks/useATRFilter\";\r\nimport {\r\n ATRFilterEditor,\r\n ATRFilterEditorType,\r\n} from \"../annualTrades/ATRFilterEditor\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\n\r\nexport const ATRFilterButton: React.FunctionComponent = () => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const showFilter = React.useCallback(\r\n () => showWithDrawer(),\r\n [showWithDrawer]\r\n );\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nconst ATRsFilterEditor: React.FunctionComponent = () => {\r\n const [filter, editFilter, save, , reset] = useATRFilter();\r\n return (\r\n <>\r\n {filter && (\r\n \r\n )}\r\n \r\n );\r\n};\r\n","import { useCopiedState } from \"../../../../core/util/hooks\";\r\nimport { setFilter, removeFilter, initialState } from \"../annualTradeUXSlice\";\r\nimport { setData } from \"../annualTradeDataSlice\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport React from \"react\";\r\nimport { AnnualTradingReportFilter } from \"../types\";\r\n\r\nexport const useATRFilter = () => {\r\n const storeFilter = useSelector(\r\n (store) => store.ux.reports.annualTrade.filter\r\n );\r\n\r\n const [filter, editFilter, changeState, setCurrentFilter] = useCopiedState<\r\n AnnualTradingReportFilter\r\n >(storeFilter);\r\n\r\n const dispatch = useDispatch();\r\n\r\n const dispatchSetFilter = React.useCallback(\r\n (numofyears: number) => {\r\n dispatch(setFilter(numofyears));\r\n dispatch(setData());\r\n },\r\n [dispatch]\r\n );\r\n\r\n const dispatchResetFilter = React.useCallback(() => {\r\n setCurrentFilter(initialState.filter);\r\n }, [setCurrentFilter]);\r\n\r\n return [\r\n filter,\r\n editFilter,\r\n dispatchSetFilter,\r\n changeState,\r\n dispatchResetFilter,\r\n ] as [\r\n typeof filter,\r\n typeof editFilter,\r\n typeof dispatchSetFilter,\r\n typeof changeState,\r\n typeof dispatchResetFilter\r\n ];\r\n};\r\n","import React from \"react\";\r\nimport {\r\n Grid,\r\n CardContent,\r\n CardHeader,\r\n Card,\r\n Divider,\r\n} from \"@material-ui/core\";\r\nimport AnnualTradesReportTable from \"./AnnualTradesReportTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { PageComponent } from \"../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { DownloadButton, DownloadExcelButton } from \"./DownloadButton\";\r\nimport { ATRFilterButton } from \"./ATRFilter\";\r\n\r\nconst AnnualTradesReport: PageComponent = ({ userAccessRights }) => {\r\n const pageStyles = usePageStyles();\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n }\r\n action={}\r\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 AnnualActions: React.FunctionComponent = () => (\r\n \r\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 AnnualTradesReport;\r\n","import { AnnualTradingReportData, AnnualTradingReportFilter } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nconst getAnnualProductData = (\r\n user: User,\r\n filter: AnnualTradingReportFilter\r\n) => {\r\n return webApi({\r\n method: \"GET\",\r\n url: \"reporting/getannualtradinglist\",\r\n params: {\r\n userid: user.userId,\r\n option: \"P\",\r\n year: filter.year,\r\n },\r\n });\r\n};\r\n\r\nexport default getAnnualProductData;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadReport } from \"../thunks/loadReportProductData\";\r\nimport { AnnualTradingReportData } from \"../types\";\r\nimport { setData } from \"../annualTradeDataSlice\";\r\n\r\nexport const useReportProductData = () => {\r\n const data = useSelector(\r\n (s) => s.data.reports.annualTrade.data\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadData = React.useCallback(() => dispatch(loadReport()), [\r\n dispatch,\r\n ]);\r\n\r\n const resetData = React.useCallback(() => {\r\n dispatch(setData(undefined));\r\n }, [dispatch]);\r\n\r\n return [data, dispatchLoadData, resetData] as [\r\n typeof data,\r\n typeof dispatchLoadData,\r\n typeof resetData\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { setData } from \"../annualTradeDataSlice\";\r\nimport getAnnualProductData from \"../api/getAnnualProductData\";\r\n\r\nexport const loadReport = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const user = store.data.auth.current.user;\r\n const { filter } = store.ux.reports.annualTrade;\r\n\r\n const pagedTrades = await dispatch(getAnnualProductData(user, filter));\r\n\r\n dispatch(setData(pagedTrades || []));\r\n};\r\n","import React from \"react\";\r\nimport { useATReportProductColumns } from \"./useATReportProductColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\nimport { TradeList } from \"../../../data/trading/trades/types\";\r\nimport { Table, TableDataProps } from \"../../components/common/Table\";\r\nimport { AnnualTradingReportData } from \"../../../data/reports/annualTrade/types\";\r\nimport { useReportProductData } from \"../../../data/reports/annualTrade/hooks/useReportProductData\";\r\nimport { useAnnualActions } from \"./useAnnualActions\";\r\n\r\nexport interface AnnualTradesTableProps {\r\n userAccessRights: AccessRights;\r\n}\r\n\r\ntype AnnualTradesTablePropsType = AnnualTradesTableProps &\r\n TableDataProps;\r\n\r\nconst ATRaProductTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n ...tableProps\r\n}) => {\r\n const columns = useATReportProductColumns();\r\n const [data, load, reset] = useReportProductData();\r\n React.useEffect(() => reset, [reset]);\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={load}\r\n immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n // actions={actions}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default ATRaProductTable;\r\n","import { AnnualTradingReportData } from \"../../../data/reports/annualTrade/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\r\nimport { useTheme } from '@material-ui/core/styles';\r\n\r\nexport const useATReportProductColumns = () => {\r\n const { getString, getFormatedNumberString } = React.useContext(\r\n LocalizationContext\r\n );\r\n\r\n const theme = useTheme();\r\n\tconst screenExtraSmall = useMediaQuery(theme.breakpoints.only('xs'));\r\n\r\n return React.useMemo(\r\n () => [\r\n {\r\n title: getString(\"annualTradeReportProduct\"),\r\n field: \"displayVal\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"annualTradeReportQty\"),\r\n render: (row) => `${getFormatedNumberString(row.qty)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"dailyTradeReportTurnoverRSD\"),\r\n render: (row) => `${getFormatedNumberString(row.turnoverRsd, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"dailyTradeReportTurnoverEUR\"),\r\n render: (row) => `${getFormatedNumberString(row.turnoverEur, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n\t\t\t\thidden: screenExtraSmall,\r\n },\r\n {\r\n title: getString(\"dailyTradeReportCountTransaction\"),\r\n field: \"tranCount\",\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n\t\t\t\thidden: screenExtraSmall,\r\n },\r\n {\r\n title: getString(\"aTReportWeightedPrice\"),\r\n render: (row) => `${getFormatedNumberString(row.weightedPrice, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n\t\t\t\thidden: screenExtraSmall,\r\n },\r\n {\r\n title: getString(\"aTReportWeightedPriceeur\"),\r\n render: (row) =>\r\n `${getFormatedNumberString(row.weightedPriceEur, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n\t\t\t\thidden: screenExtraSmall,\r\n },\r\n ],\r\n [getString, getFormatedNumberString, screenExtraSmall]\r\n ) as Column[];\r\n};\r\n","import { setReportData } from \"../annualTradeUXSlice\";\r\nimport { setData } from \"../annualTradeDataSlice\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport React from \"react\";\r\nimport { AnnualTradingReportFilter } from \"../types\";\r\nimport { setReportYear } from \"../annualTradeUXSlice\";\r\n\r\nexport const useCurrentTradesReportFilter = () => {\r\n const filter = useSelector(\r\n (store) => store.ux.reports.annualTrade.filter\r\n );\r\n const dispatch = useDispatch();\r\n const dispatchSetReportDate = React.useCallback(\r\n (reportDate: number) => {\r\n dispatch(setReportData(reportDate));\r\n dispatch(setData());\r\n },\r\n [dispatch]\r\n );\r\n const dispatchSetReportYear = React.useCallback(\r\n (year: number) => {\r\n dispatch(setReportYear(year));\r\n dispatch(setData());\r\n },\r\n [dispatch]\r\n );\r\n\r\n return [filter, dispatchSetReportDate, dispatchSetReportYear] as [\r\n typeof filter,\r\n typeof dispatchSetReportDate,\r\n typeof dispatchSetReportYear\r\n ];\r\n};\r\n","import React from \"react\";\r\nimport {\r\n Grid,\r\n CardContent,\r\n CardHeader,\r\n Card,\r\n Divider,\r\n} from \"@material-ui/core\";\r\nimport ATRProductTable from \"./ATRProductTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { PageComponent, AccessRights } from \"../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport {\r\n DownloadButtonProduct,\r\n DownloadExcelButtonProduct,\r\n} from \"./DownloadButton\";\r\nimport { annualTradesReportLocation } from \"./Locations\";\r\nimport { RouteComponentProps } from \"react-router-dom\";\r\nimport { useCurrentTradesReportFilter } from \"../../../data/reports/annualTrade/hooks/useTradesReportFilter\";\r\n\r\nexport interface ATRProductPageInfo {\r\n year: string;\r\n}\r\n\r\nexport interface ATRProductPageProps\r\n extends RouteComponentProps {\r\n userAccessRights: AccessRights;\r\n}\r\n\r\nconst ATRProductPage: React.FunctionComponent = (\r\n props\r\n) => {\r\n const pageStyles = usePageStyles();\r\n\r\n // ovde su parametri za izvestaj\r\n // zbog toga stho se uzimaju iz URL-a moraju biti tipa string, ali ih konvertujem u number zbog toga sto to trazi API\r\n // dalje ih treba proslediti u odgovarajuci hook da bi se sacuvali u filteru u redux store-u\r\n const yearNumber = Number(props.match.params.year);\r\n console.log(\"Report params:\", yearNumber);\r\n\r\n const [filter, setReportDate, setReportYear] = useCurrentTradesReportFilter();\r\n\r\n React.useEffect(() => setReportYear(yearNumber), [yearNumber]);\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n }\r\n action={}\r\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 AnnualActions: React.FunctionComponent = () => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default ATRProductPage;\r\n","import { AnnualTradingReportData, AnnualTradingReportFilter } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nconst getAnnualClientData = (user: User, filter: AnnualTradingReportFilter) => {\r\n return webApi({\r\n method: \"GET\",\r\n url: \"reporting/getannualtradinglist\",\r\n params: {\r\n userid: user.userId,\r\n option: \"C\",\r\n year: filter.year,\r\n },\r\n });\r\n};\r\n\r\nexport default getAnnualClientData;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadReport } from \"../thunks/loadReportClientData\";\r\nimport { AnnualTradingReportData } from \"../types\";\r\nimport { setData } from \"../annualTradeDataSlice\";\r\n\r\nexport const useReportClientData = () => {\r\n const data = useSelector(\r\n (s) => s.data.reports.annualTrade.data\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadData = React.useCallback(() => dispatch(loadReport()), [\r\n dispatch,\r\n ]);\r\n\r\n const resetData = React.useCallback(() => {\r\n dispatch(setData(undefined));\r\n }, [dispatch]);\r\n\r\n return [data, dispatchLoadData, resetData] as [\r\n typeof data,\r\n typeof dispatchLoadData,\r\n typeof resetData\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { setData } from \"../annualTradeDataSlice\";\r\nimport getAnnualClientData from \"../api/getAnnualClientData\";\r\n\r\nexport const loadReport = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const user = store.data.auth.current.user;\r\n const { filter } = store.ux.reports.annualTrade;\r\n\r\n const pagedTrades = await dispatch(getAnnualClientData(user, filter));\r\n\r\n dispatch(setData(pagedTrades || []));\r\n};\r\n","import React from \"react\";\r\nimport { useATReportClientColumns } from \"./useATReportClientColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\nimport { TradeList } from \"../../../data/trading/trades/types\";\r\nimport { Table, TableDataProps } from \"../../components/common/Table\";\r\nimport { AnnualTradingReportData } from \"../../../data/reports/annualTrade/types\";\r\nimport { useReportClientData } from \"../../../data/reports/annualTrade/hooks/useReportClientData\";\r\nimport { useAnnualActions } from \"./useAnnualActions\";\r\n\r\nexport interface AnnualTradesTableProps {\r\n userAccessRights: AccessRights;\r\n}\r\n\r\ntype AnnualTradesTablePropsType = AnnualTradesTableProps &\r\n TableDataProps;\r\n\r\nconst ATRClientTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n ...tableProps\r\n}) => {\r\n const columns = useATReportClientColumns();\r\n const [data, load, reset] = useReportClientData();\r\n React.useEffect(() => reset, [reset]);\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={load}\r\n immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n // actions={actions}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default ATRClientTable;\r\n","import { AnnualTradingReportData } from \"../../../data/reports/annualTrade/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\n\r\nexport const useATReportClientColumns = () => {\r\n const { getString, getFormatedNumberString } = React.useContext(\r\n LocalizationContext\r\n );\r\n\r\n return React.useMemo(\r\n () => [\r\n {\r\n title: getString(\"annualTradeReportClient\"),\r\n field: \"displayVal\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"dailyTradeReportTurnoverRSD\"),\r\n render: (row) => `${getFormatedNumberString(row.turnoverRsd, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"dailyTradeReportTurnoverEUR\"),\r\n render: (row) => `${getFormatedNumberString(row.turnoverEur, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"dailyTradeReportCountTransaction\"),\r\n field: \"tranCount\",\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n ],\r\n [getString, getFormatedNumberString]\r\n ) as Column[];\r\n};\r\n","import React from \"react\";\r\nimport {\r\n Grid,\r\n CardContent,\r\n CardHeader,\r\n Card,\r\n Divider,\r\n} from \"@material-ui/core\";\r\nimport ATRClientTable from \"./ATRClientTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { PageComponent, AccessRights } from \"../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport {\r\n DownloadButtonClient,\r\n DownloadExcelButtonClient,\r\n} from \"./DownloadButton\";\r\nimport { annualTradesReportLocation } from \"./Locations\";\r\nimport { RouteComponentProps } from \"react-router-dom\";\r\nimport { useCurrentTradesReportFilter } from \"../../../data/reports/annualTrade/hooks/useTradesReportFilter\";\r\n\r\nexport interface ATRClientPageInfo {\r\n year: string;\r\n}\r\n\r\nexport interface ATRClientPageProps\r\n extends RouteComponentProps {\r\n userAccessRights: AccessRights;\r\n}\r\n\r\nconst ATRClientPage: React.FunctionComponent = (props) => {\r\n const pageStyles = usePageStyles();\r\n\r\n // ovde su parametri za izvestaj\r\n // zbog toga stho se uzimaju iz URL-a moraju biti tipa string, ali ih konvertujem u number zbog toga sto to trazi API\r\n // dalje ih treba proslediti u odgovarajuci hook da bi se sacuvali u filteru u redux store-u\r\n const yearNumber = Number(props.match.params.year);\r\n console.log(\"Report params:\", yearNumber);\r\n\r\n const [filter, setReportDate, setReportYear] = useCurrentTradesReportFilter();\r\n\r\n React.useEffect(() => setReportYear(yearNumber), [yearNumber]);\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n }\r\n action={}\r\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 AnnualActions: React.FunctionComponent = () => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default ATRClientPage;\r\n","import { AnnualTradingReportData, AnnualTradingReportFilter } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nconst getAnnualDateData = (user: User, filter: AnnualTradingReportFilter) => {\r\n return webApi({\r\n method: \"GET\",\r\n url: \"reporting/getannualtradinglist\",\r\n params: {\r\n userid: user.userId,\r\n option: \"D\",\r\n year: filter.year,\r\n },\r\n });\r\n};\r\n\r\nexport default getAnnualDateData;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadReport } from \"../thunks/loadReportDateData\";\r\nimport { AnnualTradingReportData } from \"../types\";\r\nimport { setData } from \"../annualTradeDataSlice\";\r\n\r\nexport const useReportDateData = () => {\r\n const data = useSelector(\r\n (s) => s.data.reports.annualTrade.data\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadData = React.useCallback(() => dispatch(loadReport()), [\r\n dispatch,\r\n ]);\r\n\r\n const resetData = React.useCallback(() => {\r\n dispatch(setData(undefined));\r\n }, [dispatch]);\r\n\r\n return [data, dispatchLoadData, resetData] as [\r\n typeof data,\r\n typeof dispatchLoadData,\r\n typeof resetData\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { setData } from \"../annualTradeDataSlice\";\r\nimport getAnnualDateData from \"../api/getAnnualDateData\";\r\n\r\nexport const loadReport = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const user = store.data.auth.current.user;\r\n const { filter } = store.ux.reports.annualTrade;\r\n\r\n const pagedTrades = await dispatch(getAnnualDateData(user, filter));\r\n\r\n dispatch(setData(pagedTrades || []));\r\n};\r\n","import React from \"react\";\r\nimport { useATReportDateColumns } from \"./useATReportDateColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\nimport { TradeList } from \"../../../data/trading/trades/types\";\r\nimport { Table, TableDataProps } from \"../../components/common/Table\";\r\nimport { AnnualTradingReportData } from \"../../../data/reports/annualTrade/types\";\r\nimport { useReportDateData } from \"../../../data/reports/annualTrade/hooks/useReportDateData\";\r\nimport { useAnnualActions } from \"./useAnnualActions\";\r\n\r\nexport interface AnnualTradesTableProps {\r\n userAccessRights: AccessRights;\r\n}\r\n\r\ntype AnnualTradesTablePropsType = AnnualTradesTableProps &\r\n TableDataProps;\r\n\r\nconst ATRDateTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n ...tableProps\r\n}) => {\r\n const columns = useATReportDateColumns();\r\n const [data, load, reset] = useReportDateData();\r\n React.useEffect(() => reset, [reset]);\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={load}\r\n immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n // actions={actions}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default ATRDateTable;\r\n","import { AnnualTradingReportData } from \"../../../data/reports/annualTrade/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\r\nimport { useTheme } from '@material-ui/core/styles';\r\n\r\nexport const useATReportDateColumns = () => {\r\n const { getString, getFormatedNumberString } = React.useContext(LocalizationContext);\r\n\r\n const theme = useTheme();\r\n\tconst screenExtraSmall = useMediaQuery(theme.breakpoints.only('xs'));\r\n\r\n return React.useMemo(\r\n () => [\r\n {\r\n title: getString(\"annualTradeReportDate\"),\r\n field: \"displayVal\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"dailyTradeReportTurnoverRSD\"),\r\n render: (row) => `${getFormatedNumberString(row.turnoverRsd, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"dailyTradeReportTurnoverEUR\"),\r\n render: (row) => `${getFormatedNumberString(row.turnoverEur, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n\t\t\t\thidden: screenExtraSmall,\r\n },\r\n {\r\n title: getString(\"dailyTradeReportCountTransaction\"),\r\n field: \"tranCount\",\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n ],\r\n [getString, getFormatedNumberString, screenExtraSmall]\r\n ) as Column[];\r\n};\r\n","import React from \"react\";\r\nimport {\r\n Grid,\r\n CardContent,\r\n CardHeader,\r\n Card,\r\n Divider,\r\n} from \"@material-ui/core\";\r\nimport ATRDateTable from \"./ATRDateTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { DownloadButtonDate, DownloadExcelButtonDate } from \"./DownloadButton\";\r\nimport { annualTradesReportLocation } from \"./Locations\";\r\nimport { RouteComponentProps } from \"react-router-dom\";\r\nimport { useCurrentTradesReportFilter } from \"../../../data/reports/annualTrade/hooks/useTradesReportFilter\";\r\n\r\nexport interface ATRDatePageInfo {\r\n year: string;\r\n}\r\n\r\nexport interface ATRDatePageProps extends RouteComponentProps {\r\n userAccessRights: AccessRights;\r\n}\r\n\r\nconst ATRDatePage: React.FunctionComponent = (props) => {\r\n const pageStyles = usePageStyles();\r\n\r\n // ovde su parametri za izvestaj\r\n // zbog toga stho se uzimaju iz URL-a moraju biti tipa string, ali ih konvertujem u number zbog toga sto to trazi API\r\n // dalje ih treba proslediti u odgovarajuci hook da bi se sacuvali u filteru u redux store-u\r\n const yearNumber = Number(props.match.params.year);\r\n console.log(\"Report params:\", yearNumber);\r\n\r\n const [filter, setReportDate, setReportYear] = useCurrentTradesReportFilter();\r\n\r\n React.useEffect(() => setReportYear(yearNumber), [yearNumber]);\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n }\r\n action={}\r\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 AmmualActions: React.FunctionComponent = () => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default ATRDatePage;\r\n","import AnnualTradesReport from \"./AnnualTradesReport\";\r\nimport { NavigationItem } from \"../../../core/navigation/types\";\r\nimport {\r\n annualTradesReportLocation,\r\n annualProductLocation,\r\n annualClientLocation,\r\n annualDateLocation,\r\n} from \"./Locations\";\r\nimport ATRProductPage from \"./ATRProductPage\";\r\nimport ATRClientPage from \"./ATRClientPage\";\r\nimport ATRDatePage from \"./ATRDatePage\";\r\n\r\nexport const annualTradesReportComponents: NavigationItem[] = [\r\n {\r\n Component: AnnualTradesReport,\r\n isMenuItem: true,\r\n path: annualTradesReportLocation,\r\n },\r\n {\r\n Component: ATRProductPage,\r\n isMenuItem: false,\r\n path: annualProductLocation,\r\n },\r\n {\r\n Component: ATRClientPage,\r\n isMenuItem: false,\r\n path: annualClientLocation,\r\n },\r\n {\r\n Component: ATRDatePage,\r\n isMenuItem: false,\r\n path: annualDateLocation,\r\n },\r\n];\r\n","import { MonthlyTradingReportData, MonthlyTradingReportFilter } from \"../types\";\r\nimport { User } from \"../../../../auth/types\";\r\nimport { webApi } from \"../../../../../core/http/httpThunks\";\r\n\r\nconst getMonthlyTradingData = (\r\n user: User,\r\n filter: MonthlyTradingReportFilter,\r\n) => {\r\n\r\n return webApi({\r\n method: \"GET\",\r\n url: \"reporting/getsecmonthlytradinglist\",\r\n params: {\r\n userid: user.userId,\r\n month: filter.month,\r\n year: filter.year,\r\n },\r\n });\r\n};\r\n\r\nexport default getMonthlyTradingData;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { loadReport } from \"../thunks/loadReportData\";\r\nimport { MonthlyTradingReportData } from \"../types\";\r\n\r\nexport const useTradesReportData = () => {\r\n\tconst data = useSelector(\r\n\t\ts => s.data.reports.securityCommission.monthlyTrade.data\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchLoadData = React.useCallback(() => dispatch(loadReport()), [dispatch]);\r\n\r\n\treturn [data, dispatchLoadData] as [typeof data, typeof dispatchLoadData];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { setData } from \"../monthlyTradeDataSlice\";\r\nimport getDailyTradingDataApi from \"../api/getMonthlyTradingData\";\r\n\r\nexport const loadReport = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst user = store.data.auth.current.user;\r\n\tconst { filter } = store.ux.reports.securityCommission.monthlyTrade;\r\n\r\n\tconst pagedTrades = await dispatch(getDailyTradingDataApi(user, filter));\r\n\r\n\tdispatch(setData(pagedTrades || []));\r\n};\r\n","import React from \"react\";\r\nimport { useDailyTradesColumns } from \"./useMonthlyTradingReportColumns\";\r\nimport { AccessRights } from \"../../../../core/navigation/types\";\r\nimport { MonthlyTradingReportData } from \"../../../../data/reports/securityCommission/monthlyTrade/types\";\r\nimport { ControledTable } from \"../../../components/common/ControledTable\";\r\nimport { useTradesReportData } from \"../../../../data/reports/securityCommission/monthlyTrade/hooks/useTradesReportData\";\r\nimport { useTradesReportIndex } from \"../../../../data/reports/securityCommission/monthlyTrade/hooks/useTradesReportIndex\";\r\n\r\nexport interface OrderTableProps {\r\n userAccessRights: AccessRights;\r\n}\r\n\r\ntype OrderTablePropsType = OrderTableProps;\r\n\r\nconst DailyTradesReportTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n ...tableProps\r\n}) => {\r\n const columns = useDailyTradesColumns();\r\n const [data, load] = useTradesReportData();\r\n const [index, setIndex] = useTradesReportIndex();\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={load}\r\n onPageIndexChange={setIndex}\r\n pageIndex={index}\r\n immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default DailyTradesReportTable;\r\n","import { MonthlyTradingReportData } from \"../../../../data/reports/securityCommission/monthlyTrade/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\n\r\nexport const useDailyTradesColumns = () => {\r\n const { getString, getFormatedNumberString } = React.useContext(\r\n LocalizationContext\r\n );\r\n\r\n return React.useMemo(\r\n () => [\r\n {\r\n title: getString(\"monthlyTradeReportReportDate\"),\r\n field: \"date\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"dailyTradeReportProduct\"),\r\n field: \"prodName\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"monthlyTradeReportReportQty\"),\r\n render: (row) => `${getFormatedNumberString(row.qty)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"dailyTradeReportTurnoverRSD\"),\r\n render: (row) => `${getFormatedNumberString(row.turnoverRsd)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"dailyTradeReportTurnoverEUR\"),\r\n render: (row) => `${getFormatedNumberString(row.turnoverEur)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"dailyTradeReportCountTransaction\"),\r\n field: \"tranCount\",\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"monthlyTradeReportReportWeightedRSD\"),\r\n render: (row) => `${getFormatedNumberString(row.weightedPrice, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"monthlyTradeReportReportWeightedEUR\"),\r\n render: (row) =>\r\n `${getFormatedNumberString(row.weightedPriceEur, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n ],\r\n [getString, getFormatedNumberString]\r\n ) as Column[];\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { setIndex } from \"../monthlyTradeUXSlice\";\r\nimport { PageIndex } from \"../../../../models\";\r\n\r\nexport const useTradesReportIndex = () => {\r\n const pageIndex = useSelector(\r\n (s) => s.ux.reports.securityCommission.monthlyTrade.index\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetIndex = React.useCallback(\r\n (index: PageIndex) => dispatch(setIndex(index)),\r\n [dispatch]\r\n );\r\n\r\n return [pageIndex, dispatchSetIndex] as [\r\n typeof pageIndex,\r\n typeof dispatchSetIndex\r\n ];\r\n};\r\n","import React from \"react\";\r\nimport { TextField, MenuItem } from \"@material-ui/core\";\r\n\r\ninterface YearSelectProps {\r\n selected?: number;\r\n yearChange: (year: number) => void;\r\n label: string;\r\n}\r\n\r\nexport const YearSelect: React.FunctionComponent = ({\r\n selected,\r\n yearChange,\r\n label,\r\n}) => {\r\n const options = React.useMemo(() => {\r\n const currentYear = new Date().getFullYear();\r\n const result: (number | undefined)[] = [undefined];\r\n for (let i = currentYear; i > currentYear - 10; i--) {\r\n result.push(i);\r\n }\r\n return result;\r\n }, []);\r\n\r\n const handleChange = React.useCallback(\r\n (event: React.ChangeEvent) => {\r\n yearChange(Number(event.target.value));\r\n },\r\n [yearChange]\r\n );\r\n\r\n return (\r\n \r\n {options.map((option) => (\r\n \r\n {option}\r\n \r\n ))}\r\n \r\n );\r\n};\r\n\r\ninterface MonthSelectProps {\r\n selected?: number;\r\n monthChange: (year: number) => void;\r\n label: string;\r\n}\r\n\r\nexport const MonthSelect: React.FunctionComponent = ({\r\n selected,\r\n monthChange,\r\n label,\r\n}) => {\r\n const options = React.useMemo(() => {\r\n const result: (number | undefined)[] = [undefined];\r\n for (let i = 1; i <= 12; i++) {\r\n result.push(i);\r\n }\r\n return result;\r\n }, []);\r\n\r\n const handleChange = React.useCallback(\r\n (event: React.ChangeEvent) => {\r\n monthChange(Number(event.target.value));\r\n },\r\n [monthChange]\r\n );\r\n\r\n return (\r\n \r\n {options.map((option) => (\r\n \r\n {option}\r\n \r\n ))}\r\n \r\n );\r\n};\r\n\r\ninterface QuarterSelectProps {\r\n selected?: number;\r\n quarterChange: (quarter: number) => void;\r\n label: string;\r\n}\r\nexport const QuarterSelect: React.FunctionComponent = ({\r\n selected,\r\n quarterChange,\r\n label,\r\n}) => {\r\n const options = React.useMemo(() => {\r\n const result: (number | undefined)[] = [undefined];\r\n for (let i = 1; i <= 4; i++) {\r\n result.push(i);\r\n }\r\n return result;\r\n }, []);\r\n\r\n const handleChange = React.useCallback(\r\n (event: React.ChangeEvent) => {\r\n quarterChange(Number(event.target.value));\r\n },\r\n [quarterChange]\r\n );\r\n\r\n return (\r\n \r\n {options.map((option) => (\r\n \r\n {option}\r\n \r\n ))}\r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport { Grid } from \"@material-ui/core\";\r\nimport { useCurrentTradesReportFilter } from \"../../../../data/reports/securityCommission/monthlyTrade/hooks/useTradesReportFilter\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { MonthSelect, YearSelect} from \"../../../components/reports/DatePartSelect\"\r\n\r\nexport const MonthlyTradesReportFilter: React.FunctionComponent = () => {\r\n\tconst [filter, setReportMonth, setReporthYear] = useCurrentTradesReportFilter();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n","import { setReportMonth, setReportYear } from \"../monthlyTradeUXSlice\";\r\nimport { setData } from \"../monthlyTradeDataSlice\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport React from \"react\";\r\nimport { MonthlyTradingReportFilter } from \"../types\";\r\n\r\nexport const useCurrentTradesReportFilter = () => {\r\n\tconst filter = useSelector(\r\n\t\tstore => store.ux.reports.securityCommission.monthlyTrade.filter\r\n\t);\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchSetReportMonth = React.useCallback(\r\n\t\t(month: number) => {\r\n\t\t\tdispatch(setReportMonth(month));\r\n\t\t\tdispatch(setData());\r\n\t\t},\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\tconst dispatchSetReportYear = React.useCallback(\r\n\t\t(year: number) => {\r\n\t\t\tdispatch(setReportYear(year));\r\n\t\t\tdispatch(setData());\r\n\t\t},\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\treturn [filter, dispatchSetReportMonth, dispatchSetReportYear] as [\r\n\t\ttypeof filter,\r\n\t\ttypeof dispatchSetReportMonth,\r\n\t\ttypeof dispatchSetReportYear\r\n\t];\r\n};\r\n","import { User } from \"../../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../../core/http/httpThunks\";\r\nimport { MonthlyTradingReportFilter } from \"../types\";\r\n\r\nexport const getMonthlyTradingReport = (user: User, filter: MonthlyTradingReportFilter) => {\r\n\treturn httpWebApi({\r\n\t\tmethod: \"GET\",\r\n\t\tresponseType: \"blob\",\r\n\t\ttimeout: 60 * 4 * 1000,\r\n\t\turl: \"reporting/getsecmonthlytradingreport\",\r\n\t\tparams: {\r\n\t\t\tuserid: user.userId,\r\n\t\t\tmonth: filter.month,\r\n\t\t\tyear: filter.year,\r\n\t\t},\r\n\t});\r\n};\r\n\r\nexport default getMonthlyTradingReport;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadOrdersReport } from \"../thunks/downloadReport\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\n\r\nexport const useTradesReportDownloader = () => {\r\n\tconst fetchState = useSelector(\r\n\t\ts => s.data.reports.securityCommission.monthlyTrade.downloadReportFetchState\r\n\t);\r\n\tconst dispatch = useDispatch();\r\n\tconst download = React.useCallback(() => dispatch(downloadOrdersReport()), [dispatch]);\r\n\r\n\treturn [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { getMonthlyTradingReport } from \"../api/getMonthlyTradingReport\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../monthlyTradeDataSlice\";\r\n\r\nexport const downloadOrdersReport = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst { filter } = store.ux.reports.securityCommission.monthlyTrade;\r\n\tconst user = store.data.auth.current.user;\r\n\tdispatch(setFetchState({ type: \"started\" }));\r\n\tconst ordersReport = await dispatch(getMonthlyTradingReport(user, filter));\r\n\tif (ordersReport) {\r\n\t\tfileDownload(new Blob([ordersReport as any], { type: \"application/pdf\" }), \"SecMonthlyTrading.pdf\");\r\n\t}\r\n\tdispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import { MonthlyTradingReportFilter } from \"../types\";\r\nimport { User } from \"../../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../../core/util/functions\";\r\n\r\nexport const getMonthlyTradingExcel = (\r\n user: User,\r\n filter: MonthlyTradingReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getsecmonthlytradingxls\",\r\n params: {\r\n userid: user.userId,\r\n month: filter.month,\r\n year: filter.year,\r\n },\r\n });\r\n};\r\n\r\nexport default getMonthlyTradingExcel;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadMonthlyTradeingExcel } from \"../thunks/downloadReportExcel\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\n\r\nexport const useMonthlySecurityExcelDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.securityCommission.monthlyTrade.downloadReportFetchState);\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadMonthlyTradeingExcel()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { getMonthlyTradingExcel } from \"../api/getMonthlyTradingExcel\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../monthlyTradeDataSlice\";\r\n\r\nexport const downloadMonthlyTradeingExcel = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.securityCommission.monthlyTrade;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const monthlyTrading = await dispatch(getMonthlyTradingExcel(user, filter));\r\n if (monthlyTrading) {\r\n fileDownload(\r\n new Blob([monthlyTrading as any], {\r\n type: \"application/vnd.openxmlformat\",\r\n }),\r\n \"MonthlySecurityTrading.xlsx\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n\r\n};\r\n","import React from \"react\";\r\nimport { useTradesReportDownloader } from \"../../../../data/reports/securityCommission/monthlyTrade/hooks/useTradesReportDownloader\";\r\nimport { useMonthlySecurityExcelDownloader } from \"../../../../data/reports/securityCommission/monthlyTrade/hooks/useTradesReportExcelDownloader\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport ExcelIcon from \"@material-ui/icons/TableChartOutlined\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../../components/common/CustomTooltip\";\r\n\r\nexport const DownloadButton: React.FunctionComponent = () => {\r\n\tconst [downloader, fetchState] = useTradesReportDownloader();\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport const DownloadExcelButton: React.FunctionComponent = () => {\r\n\tconst [downloader, fetchState] = useMonthlySecurityExcelDownloader();\r\n\treturn (\r\n\t \r\n\t\t\r\n\t\t \r\n\t\t\r\n\t \r\n\t);\r\n };\r\n ","import React from \"react\";\r\nimport { Grid, CardContent, CardHeader, Card, Divider } from \"@material-ui/core\";\r\nimport DailyTradesReportTable from \"./MonthlyTradesReportTable\";\r\nimport { usePageStyles } from \"../../../pageStyles\";\r\nimport { PageComponent } from \"../../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../../components/common/PageTitle\";\r\nimport { MonthlyTradesReportFilter } from \"./MonthlyTradesReportFilter\";\r\nimport { DownloadButton, DownloadExcelButton } from \"./DownloadButton\";\r\n\r\nconst MonthlyTradesReport: PageComponent = ({ userAccessRights }) => {\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\treturn (\r\n\t\t<>\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\t}\r\n\t\t\t\t\t\t\taction={}\r\n\t\t\t\t\t\t/>\r\n\t\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\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};\r\n\r\nexport const MonthlyTradesReportActions: React.FunctionComponent = () => (\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n \r\n \r\n\r\n\t\r\n);\r\n\r\nexport default MonthlyTradesReport;\r\n","import MonthlyTradesReport from \"./MonthlyTradesReport\";\r\nimport { NavigationItem } from \"../../../../core/navigation/types\";\r\nimport { dailyTradesReportLocation, } from \"./Locations\";\r\n\r\nexport const monthlyTradesReportComponents: NavigationItem[] = [\r\n\t{\r\n\t\tComponent: MonthlyTradesReport,\r\n\t\tisMenuItem: true,\r\n\t\tpath: dailyTradesReportLocation,\r\n\t},\r\n];\r\n","export const dailyTradesReportLocation = \"/reports/sec/monthlyreports\"","import { DailySecurityReportData, DailySecurityReportFilter } from \"../types\";\r\nimport { User } from \"../../../../auth/types\";\r\nimport { webApi } from \"../../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../../core/util/functions\";\r\n\r\nconst getDailySecurityData = (\r\n user: User,\r\n filter: DailySecurityReportFilter\r\n) => {\r\n return webApi({\r\n method: \"GET\",\r\n url: \"reporting/getsecdailytradinglist\",\r\n params: {\r\n userid: user.userId,\r\n repdate: getParamsDateString(filter.reportDate),\r\n },\r\n });\r\n};\r\n\r\nexport default getDailySecurityData;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { loadReport } from \"../thunks/loadReportData\";\r\nimport { DailySecurityReportData } from \"../types\";\r\n\r\nexport const useSecurityReportData = () => {\r\n const data = useSelector(\r\n (s) => s.data.reports.securityCommission.dailySecurity.data\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadData = React.useCallback(\r\n () => dispatch(loadReport()),\r\n [dispatch]\r\n );\r\n\r\n return [data, dispatchLoadData] as [\r\n typeof data,\r\n typeof dispatchLoadData,\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { setData } from \"../dailySecurityDataSlice\";\r\nimport getDailySecurityDataApi from \"../api/getDailySecurityData\";\r\n\r\nexport const loadReport = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst user = store.data.auth.current.user;\r\n\tconst { filter } = store.ux.reports.securityCommission.dailySecurity;\r\n\r\n\tconst pagedTrades = await dispatch(getDailySecurityDataApi(user, filter));\r\n\r\n\tdispatch(setData(pagedTrades || []));\r\n};\r\n","import React from \"react\";\r\nimport { useDailySecurityColumns } from \"./useDailySecurityReportColumns\";\r\nimport { AccessRights } from \"../../../../core/navigation/types\";\r\nimport { ControledTable } from \"../../../components/common/ControledTable\";\r\nimport { DailySecurityReportData } from \"../../../../data/reports/securityCommission/securityDaily/types\";\r\nimport { useSecurityReportData } from \"../../../../data/reports/securityCommission/securityDaily/hooks/useSecurityReportData\";\r\nimport { useSecurityReportIndex } from \"../../../../data/reports/securityCommission/securityDaily/hooks/useSecurityReportIndex\";\r\n\r\nexport interface SecurityTableProps {\r\n userAccessRights: AccessRights;\r\n}\r\n\r\ntype SecurityTablePropsType = SecurityTableProps;\r\n\r\nconst DailySecurityReportTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n ...tableProps\r\n}) => {\r\n const columns = useDailySecurityColumns();\r\n const [data, load] = useSecurityReportData();\r\n const [index, setIndex] = useSecurityReportIndex();\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={load}\r\n onPageIndexChange={setIndex}\r\n pageIndex={index}\r\n immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default DailySecurityReportTable;\r\n","import { DailySecurityReportData } from \"../../../../data/reports/securityCommission/securityDaily/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\n\r\nexport const useDailySecurityColumns = () => {\r\n const { getString, getFormatedNumberString } = React.useContext(\r\n LocalizationContext\r\n );\r\n\r\n return React.useMemo(\r\n () => [\r\n {\r\n title: getString(\"secCommProduct\"),\r\n field: \"prodName\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"secCommTurnoverRSD\"),\r\n render: (row) => `${getFormatedNumberString(row.turnoverRsd)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"secCommTurnoverEUR\"),\r\n render: (row) => `${getFormatedNumberString(row.turnoverEur)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"secCommCountTransaction\"),\r\n field: \"tranCount\",\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"secCommReportWeightedRSD\"),\r\n render: (row) => `${getFormatedNumberString(row.weightedPrice, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"secCommReportWeightedEUR\"),\r\n render: (row) =>\r\n `${getFormatedNumberString(row.weightedPriceEur, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n ],\r\n [getString, getFormatedNumberString]\r\n ) as Column[];\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { setIndex } from \"../dailySecurityUXSlice\";\r\nimport { PageIndex } from \"../../../../models\";\r\n\r\nexport const useSecurityReportIndex = () => {\r\n const pageIndex = useSelector(\r\n (s) => s.ux.reports.securityCommission.dailySecurity.index\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetIndex = React.useCallback(\r\n (index: PageIndex) => dispatch(setIndex(index)),\r\n [dispatch]\r\n );\r\n\r\n return [pageIndex, dispatchSetIndex] as [\r\n typeof pageIndex,\r\n typeof dispatchSetIndex\r\n ];\r\n};\r\n","import React from \"react\";\r\nimport { Grid } from \"@material-ui/core\";\r\nimport { useCurrentSecurityReportFilter } from \"../../../../data/reports/securityCommission/securityDaily/hooks/useSecurityReportFilter\";\r\nimport { DateInput } from \"../../../components/common/DateInput\";\r\nimport { isValidDate } from \"../../../../core/util/functions\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\n\r\nexport const DailySecurityReportFilter: React.FunctionComponent = () => {\r\n\tconst [filter, setReportDate] = useCurrentSecurityReportFilter();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t {\r\n\t\t\t\t\t\tif (isValidDate(date)) {\r\n\t\t\t\t\t\t\tsetReportDate(date.toISOString());\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};\r\n","import { setReportData } from \"../dailySecurityUXSlice\";\r\nimport { setData } from \"../dailySecurityDataSlice\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport React from \"react\";\r\nimport { DailySecurityReportFilter } from \"../types\";\r\n\r\nexport const useCurrentSecurityReportFilter = () => {\r\n\tconst filter = useSelector(\r\n\t\tstore => store.ux.reports.securityCommission.dailySecurity.filter\r\n\t);\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchSetReportDate = React.useCallback(\r\n\t\t(reportDate: string) => {\r\n\t\t\tdispatch(setReportData(reportDate));\r\n\t\t\tdispatch(setData());\r\n\t\t},\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\treturn [filter, dispatchSetReportDate] as [typeof filter, typeof dispatchSetReportDate];\r\n};\r\n","import { User } from \"../../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../../core/util/functions\";\r\nimport { DailySecurityReportFilter } from \"../types\";\r\n\r\nexport const getDailySecurityReport = (\r\n user: User,\r\n filter: DailySecurityReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getsecdailytradingreport\",\r\n params: {\r\n userid: user.userId,\r\n repdate: getParamsDateString(filter.reportDate),\r\n },\r\n });\r\n};\r\n\r\nexport default getDailySecurityReport;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadSecurityReport } from \"../thunks/downloadReport\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\n\r\nexport const useSecurityReportDownloader = () => {\r\n\tconst fetchState = useSelector(\r\n\t\ts => s.data.reports.securityCommission.dailySecurity.downloadReportFetchState\r\n\t);\r\n\tconst dispatch = useDispatch();\r\n\tconst download = React.useCallback(() => dispatch(downloadSecurityReport()), [dispatch]);\r\n\r\n\treturn [download, fetchState] as [typeof download, typeof fetchState]\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { getDailySecurityReport } from \"../api/getDailySecurityReport\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../dailySecurityDataSlice\";\r\n\r\nexport const downloadSecurityReport = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst { filter } = store.ux.reports.securityCommission.dailySecurity;\r\n\tconst user = store.data.auth.current.user;\r\n\tdispatch(setFetchState({ type: \"started\" }));\r\n\tconst ordersReport = await dispatch(getDailySecurityReport(user, filter));\r\n\tif (ordersReport) {\r\n\t\tfileDownload(new Blob([ordersReport as any], { type: \"application/pdf\" }), \"DailySecurityTrading.pdf\");\r\n\t}\r\n\tdispatch(setFetchState({ type: \"not-started\" }));\r\n\r\n};\r\n","import { DailySecurityReportFilter } from \"../types\";\r\nimport { User } from \"../../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../../core/util/functions\";\r\n\r\nexport const getDailySecurityExcel = (\r\n user: User,\r\n filter: DailySecurityReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getsecdailytradingxls\",\r\n params: {\r\n userid: user.userId,\r\n repdate: getParamsDateString(filter.reportDate),\r\n },\r\n });\r\n};\r\n\r\nexport default getDailySecurityExcel;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadDailySecurityExcel } from \"../thunks/downloadReportExcel\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\n\r\nexport const useDailySecurityExcelDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.securityCommission.dailySecurity.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadDailySecurityExcel()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { getDailySecurityExcel } from \"../api/getDailySecurityExcel\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../dailySecurityDataSlice\";\r\n\r\nexport const downloadDailySecurityExcel = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.securityCommission.dailySecurity;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const dailyTrading = await dispatch(getDailySecurityExcel(user, filter));\r\n if (dailyTrading) {\r\n fileDownload(\r\n new Blob([dailyTrading as any], {\r\n type: \"application/vnd.openxmlformat\",\r\n }),\r\n \"DailySecurityTrading.xlsx\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n\r\n console.log(dailyTrading);\r\n};\r\n","import React from \"react\";\r\nimport { useSecurityReportDownloader } from \"../../../../data/reports/securityCommission/securityDaily/hooks/useSecurityReportDownloader\";\r\nimport { useDailySecurityExcelDownloader } from \"../../../../data/reports/securityCommission/securityDaily/hooks/useDailySecurityExcelDownloader\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport ExcelIcon from \"@material-ui/icons/TableChartOutlined\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../../components/common/CustomTooltip\";\r\n\r\nexport const DownloadButton: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useSecurityReportDownloader();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const DownloadExcelButton: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useDailySecurityExcelDownloader();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport {\r\n Grid,\r\n CardContent,\r\n CardHeader,\r\n Card,\r\n Divider,\r\n} from \"@material-ui/core\";\r\nimport DailySecuriyReportTable from \"./DailySecurityReportTable\";\r\nimport { usePageStyles } from \"../../../pageStyles\";\r\nimport { PageComponent } from \"../../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../../components/common/PageTitle\";\r\nimport { DailySecurityReportFilter } from \"./DailySecurityReportFilter\";\r\nimport { DownloadButton, DownloadExcelButton } from \"./DownloadButton\";\r\n\r\nconst DailySecurityReport: PageComponent = ({ userAccessRights }) => {\r\n const pageStyles = usePageStyles();\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n }\r\n action={}\r\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 DailySecurityReportActions: React.FunctionComponent = () => (\r\n \r\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 DailySecurityReport;\r\n","import DailySecurityReport from \"./DailySecurityReport\";\r\nimport { NavigationItem } from \"../../../../core/navigation/types\";\r\nimport { dailySecurityReportLocation, } from \"./Locations\";\r\n\r\nexport const dailySecurityReportComponents: NavigationItem[] = [\r\n\t{\r\n\t\tComponent: DailySecurityReport,\r\n\t\tisMenuItem: true,\r\n\t\tpath: dailySecurityReportLocation,\r\n\t},\r\n];\r\n","export const dailySecurityReportLocation = \"/reports/sec/dailyreports\"","import { AnnualSecurityReportData, AnnualSecurityReportFilter } from \"../types\";\r\nimport { User } from \"../../../../auth/types\";\r\nimport { webApi } from \"../../../../../core/http/httpThunks\";\r\n\r\nconst getAnnualSecurityData = (\r\n user: User,\r\n filter: AnnualSecurityReportFilter,\r\n) => {\r\n\r\n return webApi({\r\n method: \"GET\",\r\n url: \"reporting/getsecannualtradinglist\",\r\n params: {\r\n userid: user.userId,\r\n year: filter.year,\r\n },\r\n });\r\n};\r\n\r\nexport default getAnnualSecurityData;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { loadReport } from \"../thunks/loadReportData\";\r\nimport { AnnualSecurityReportData } from \"../types\";\r\n\r\nexport const useAnnualSecurityReportData = () => {\r\n\tconst data = useSelector(\r\n\t\ts => s.data.reports.securityCommission.annualSecurity.data\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchLoadData = React.useCallback(() => dispatch(loadReport()), [dispatch]);\r\n\r\n\treturn [data, dispatchLoadData] as [typeof data, typeof dispatchLoadData];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { setData } from \"../annualSecurityDataSlice\";\r\nimport getAnnualSecurityDataApi from \"../api/getAnnualSecurityData\";\r\n\r\nexport const loadReport = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst user = store.data.auth.current.user;\r\n\tconst { filter } = store.ux.reports.securityCommission.annualSecurity;\r\n\r\n\tconst pagedTrades = await dispatch(getAnnualSecurityDataApi(user, filter));\r\n\r\n\tdispatch(setData(pagedTrades || []));\r\n};\r\n","import React from \"react\";\r\nimport { useAnnualTradesColumns } from \"./useAnnualTradingReportColumns\";\r\nimport { AccessRights } from \"../../../../core/navigation/types\";\r\nimport { AnnualSecurityReportData } from \"../../../../data/reports/securityCommission/securityAnnual/types\";\r\nimport { ControledTable } from \"../../../components/common/ControledTable\";\r\nimport { useAnnualSecurityReportData } from \"../../../../data/reports/securityCommission/securityAnnual/hooks/useSecurityReportData\";\r\nimport { useSecurityReportIndex } from \"../../../../data/reports/securityCommission/securityAnnual/hooks/useSecurityReportIndex\";\r\n\r\nexport interface AnnualSecurityTableProps {\r\n userAccessRights: AccessRights;\r\n}\r\n\r\ntype OrderTablePropsType = AnnualSecurityTableProps;\r\n\r\nconst DailyTradesReportTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n ...tableProps\r\n}) => {\r\n const columns = useAnnualTradesColumns();\r\n const [data, load] = useAnnualSecurityReportData();\r\n const [index, setIndex] = useSecurityReportIndex();\r\n\r\n return (\r\n \r\n {...tableProps}\r\n onPageIndexChange={setIndex}\r\n pageIndex={index}\r\n getData={load}\r\n immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default DailyTradesReportTable;\r\n","import { AnnualSecurityReportData } from \"../../../../data/reports/securityCommission/securityAnnual/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\n\r\nexport const useAnnualTradesColumns = () => {\r\n const { getString, getFormatedNumberString } = React.useContext(\r\n LocalizationContext\r\n );\r\n\r\n return React.useMemo(\r\n () => [\r\n {\r\n title: getString(\"secCommReportDate\"),\r\n field: \"date\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"secCommProduct\"),\r\n field: \"prodName\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"secCommReportQty\"),\r\n render: (row) => `${getFormatedNumberString(row.qty)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"secCommTurnoverRSD\"),\r\n render: (row) => `${getFormatedNumberString(row.turnoverRsd)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"secCommTurnoverEUR\"),\r\n render: (row) => `${getFormatedNumberString(row.turnoverEur)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"secCommCountTransaction\"),\r\n field: \"tranCount\",\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"secCommReportWeightedRSD\"),\r\n render: (row) => `${getFormatedNumberString(row.weightedPrice, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"secCommReportWeightedEUR\"),\r\n render: (row) =>\r\n `${getFormatedNumberString(row.weightedPriceEur, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n ],\r\n [getString, getFormatedNumberString]\r\n ) as Column[];\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { setIndex } from \"../annualSecurityUXSlice\";\r\nimport { PageIndex } from \"../../../../models\";\r\n\r\nexport const useSecurityReportIndex = () => {\r\n const pageIndex = useSelector(\r\n (s) => s.ux.reports.securityCommission.annualSecurity.index\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetIndex = React.useCallback(\r\n (index: PageIndex) => dispatch(setIndex(index)),\r\n [dispatch]\r\n );\r\n\r\n return [pageIndex, dispatchSetIndex] as [\r\n typeof pageIndex,\r\n typeof dispatchSetIndex\r\n ];\r\n};\r\n","import React from \"react\";\r\nimport { Grid } from \"@material-ui/core\";\r\nimport { useCurrentTradesReportFilter } from \"../../../../data/reports/securityCommission/securityAnnual/hooks/useSecurityReportFilter\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { YearSelect} from \"../../../components/reports/DatePartSelect\"\r\n\r\nexport const AnnualTradesReportFilter: React.FunctionComponent = () => {\r\n\tconst [filter, setReporthYear] = useCurrentTradesReportFilter();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n","import { setReportYear } from \"../annualSecurityUXSlice\";\r\nimport { setData } from \"../annualSecurityDataSlice\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport React from \"react\";\r\nimport { AnnualSecurityReportFilter } from \"../types\";\r\n\r\nexport const useCurrentTradesReportFilter = () => {\r\n\tconst filter = useSelector(\r\n\t\tstore => store.ux.reports.securityCommission.annualSecurity.filter\r\n\t);\r\n\tconst dispatch = useDispatch();\r\n\r\n\tconst dispatchSetReportYear = React.useCallback(\r\n\t\t(year: number) => {\r\n\t\t\tdispatch(setReportYear(year));\r\n\t\t\tdispatch(setData());\r\n\t\t},\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\treturn [filter, dispatchSetReportYear] as [\r\n\t\ttypeof filter,\r\n\t\ttypeof dispatchSetReportYear\r\n\t];\r\n};\r\n","import { User } from \"../../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../../core/http/httpThunks\";\r\nimport { AnnualSecurityReportFilter } from \"../types\";\r\n\r\nexport const getAnnualSecurityReport = (user: User, filter: AnnualSecurityReportFilter) => {\r\n\treturn httpWebApi({\r\n\t\tmethod: \"GET\",\r\n\t\tresponseType: \"blob\",\r\n\t\ttimeout: 60 * 4 * 1000,\r\n\t\turl: \"reporting/getsecannualtradingreport\",\r\n\t\tparams: {\r\n\t\t\tuserid: user.userId,\r\n\t\t\tyear: filter.year,\r\n\t\t},\r\n\t});\r\n};\r\n\r\nexport default getAnnualSecurityReport;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadOrdersReport } from \"../thunks/downloadReport\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\n\r\nexport const useAnnualSecurityReportDownloader = () => {\r\n\tconst fetchState = useSelector(\r\n\t\ts => s.data.reports.securityCommission.annualSecurity.downloadReportFetchState\r\n\t);\r\n\tconst dispatch = useDispatch();\r\n\tconst download = React.useCallback(() => dispatch(downloadOrdersReport()), [dispatch]);\r\n\r\n\treturn [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { getAnnualSecurityReport } from \"../api/getAnnualSecurityReport\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../annualSecurityDataSlice\";\r\n\r\nexport const downloadOrdersReport = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.securityCommission.annualSecurity;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const ordersReport = await dispatch(getAnnualSecurityReport(user, filter));\r\n if (ordersReport) {\r\n fileDownload(\r\n new Blob([ordersReport as any], { type: \"application/pdf\" }),\r\n \"AnnualSecurityTrading.pdf\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import { AnnualSecurityReportFilter } from \"../types\";\r\nimport { User } from \"../../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../../core/util/functions\";\r\n\r\nexport const getAnnualSecurityExcel = (\r\n user: User,\r\n filter: AnnualSecurityReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getsecannualtradingxls\",\r\n params: {\r\n userid: user.userId,\r\n year: filter.year,\r\n },\r\n });\r\n};\r\n\r\nexport default getAnnualSecurityExcel;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadAnnualSecurityExcel } from \"../thunks/downloadReportExcel\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\n\r\nexport const useAnnualSecurityExcelDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.securityCommission.annualSecurity.downloadReportFetchState);\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadAnnualSecurityExcel()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { getAnnualSecurityExcel } from \"../api/getAnnualSecurityExcel\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../annualSecurityDataSlice\";\r\n\r\nexport const downloadAnnualSecurityExcel = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.securityCommission.annualSecurity;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const dailyTrading = await dispatch(getAnnualSecurityExcel(user, filter));\r\n if (dailyTrading) {\r\n fileDownload(\r\n new Blob([dailyTrading as any], {\r\n type: \"application/vnd.openxmlformat\",\r\n }),\r\n \"AnnualSecurityTrading.xlsx\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n\r\n};\r\n","import React from \"react\";\r\nimport { useAnnualSecurityReportDownloader } from \"../../../../data/reports/securityCommission/securityAnnual/hooks/useSecurityReportDownloader\";\r\nimport { useAnnualSecurityExcelDownloader } from \"../../../../data/reports/securityCommission/securityAnnual/hooks/useAnnualSecurityExcelDownloader\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport ExcelIcon from \"@material-ui/icons/TableChartOutlined\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../../components/common/CustomTooltip\";\r\n\r\nexport const DownloadButton: React.FunctionComponent = () => {\r\n\tconst [downloader, fetchState] = useAnnualSecurityReportDownloader();\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n\r\n\r\nexport const DownloadExcelButton: React.FunctionComponent = () => {\r\n\tconst [downloader, fetchState] = useAnnualSecurityExcelDownloader();\r\n\treturn (\r\n\t \r\n\t\t\r\n\t\t \r\n\t\t\r\n\t \r\n\t);\r\n };\r\n ","import React from \"react\";\r\nimport {\r\n Grid,\r\n CardContent,\r\n CardHeader,\r\n Card,\r\n Divider,\r\n} from \"@material-ui/core\";\r\nimport AnnualTradesReportTable from \"./AnnualTradesReportTable\";\r\nimport { usePageStyles } from \"../../../pageStyles\";\r\nimport { PageComponent } from \"../../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../../components/common/PageTitle\";\r\nimport { AnnualTradesReportFilter } from \"./AnnualTradesReportFilter\";\r\nimport { DownloadButton, DownloadExcelButton } from \"./DownloadButton\";\r\n\r\nconst AnnualTradesReport: PageComponent = ({ userAccessRights }) => {\r\n const pageStyles = usePageStyles();\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n }\r\n action={}\r\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 AnnualTradesReportActions: React.FunctionComponent = () => (\r\n \r\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 AnnualTradesReport;\r\n","import AnnualTradesReport from \"./AnnualTradesReport\";\r\nimport { NavigationItem } from \"../../../../core/navigation/types\";\r\nimport { annualTradesReportLocation, } from \"./Locations\";\r\n\r\nexport const annualSecurityReportComponents: NavigationItem[] = [\r\n\t{\r\n\t\tComponent: AnnualTradesReport,\r\n\t\tisMenuItem: true,\r\n\t\tpath: annualTradesReportLocation,\r\n\t},\r\n];\r\n","export const annualTradesReportLocation = \"/reports/sec/annualreports\"","import { QuarterlySecurityReportData, QuarterlySecurityReportFilter } from \"../types\";\r\nimport { User } from \"../../../../auth/types\";\r\nimport { webApi } from \"../../../../../core/http/httpThunks\";\r\n\r\nconst getQuarterlySecurityData = (\r\n user: User,\r\n filter: QuarterlySecurityReportFilter,\r\n) => {\r\n\r\n return webApi({\r\n method: \"GET\",\r\n url: \"reporting/getsecquartertradinglist\",\r\n params: {\r\n userid: user.userId,\r\n year: filter.year,\r\n\t\t\tqtnumber: filter.qtnumber,\r\n },\r\n });\r\n};\r\n\r\nexport default getQuarterlySecurityData;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { loadReport } from \"../thunks/loadReportData\";\r\nimport { QuarterlySecurityReportData } from \"../types\";\r\n\r\nexport const useQuarterlySecurityReportData = () => {\r\n\tconst data = useSelector(\r\n\t\ts => s.data.reports.securityCommission.quarterlylSecurity.data\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchLoadData = React.useCallback(() => dispatch(loadReport()), [dispatch]);\r\n\r\n\treturn [data, dispatchLoadData] as [typeof data, typeof dispatchLoadData];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { setData } from \"../quarterlySecurityDataSlice\";\r\nimport getQuarterlySecurityDataApi from \"../api/getQuarterlySecurityData\";\r\n\r\nexport const loadReport = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst user = store.data.auth.current.user;\r\n\tconst { filter } = store.ux.reports.securityCommission.quarterlylSecurity;\r\n\r\n\tconst pagedTrades = await dispatch(getQuarterlySecurityDataApi(user, filter));\r\n\r\n\tdispatch(setData(pagedTrades || []));\r\n};\r\n","import React from \"react\";\r\nimport { useQuarterlyTradesColumns } from \"./useQuarterlyTradingReportColumns\";\r\nimport { AccessRights } from \"../../../../core/navigation/types\";\r\nimport { QuarterlySecurityReportData } from \"../../../../data/reports/securityCommission/securityQuarterly/types\";\r\nimport { ControledTable } from \"../../../components/common/ControledTable\";\r\nimport { useQuarterlySecurityReportData } from \"../../../../data/reports/securityCommission/securityQuarterly/hooks/useSecurityReportData\";\r\nimport { useSecurityReportIndex } from \"../../../../data/reports/securityCommission/securityQuarterly/hooks/useSecurityReportIndex\";\r\n\r\nexport interface OrderTableProps {\r\n userAccessRights: AccessRights;\r\n}\r\n\r\ntype OrderTablePropsType = OrderTableProps;\r\n\r\nconst QuarterlyTradesReportTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n ...tableProps\r\n}) => {\r\n const columns = useQuarterlyTradesColumns();\r\n const [data, load] = useQuarterlySecurityReportData();\r\n const [index, setIndex] = useSecurityReportIndex();\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={load}\r\n onPageIndexChange={setIndex}\r\n pageIndex={index}\r\n immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default QuarterlyTradesReportTable;\r\n","import { QuarterlySecurityReportData } from \"../../../../data/reports/securityCommission/securityQuarterly/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\n\r\nexport const useQuarterlyTradesColumns = () => {\r\n const { getString, getFormatedNumberString } = React.useContext(\r\n LocalizationContext\r\n );\r\n\r\n return React.useMemo(\r\n () => [\r\n {\r\n title: getString(\"secCommReportDate\"),\r\n field: \"date\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"secCommProduct\"),\r\n field: \"prodName\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"secCommReportQty\"),\r\n render: (row) => `${getFormatedNumberString(row.qty)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"secCommTurnoverRSD\"),\r\n render: (row) => `${getFormatedNumberString(row.turnoverRsd)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"secCommTurnoverEUR\"),\r\n render: (row) => `${getFormatedNumberString(row.turnoverEur)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"secCommCountTransaction\"),\r\n field: \"tranCount\",\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"secCommReportWeightedRSD\"),\r\n render: (row) => `${getFormatedNumberString(row.weightedPrice, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"secCommReportWeightedEUR\"),\r\n render: (row) =>\r\n `${getFormatedNumberString(row.weightedPriceEur, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n ],\r\n [getString, getFormatedNumberString]\r\n ) as Column[];\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { setIndex } from \"../quarterlySecurityUXSlice\";\r\nimport { PageIndex } from \"../../../../models\";\r\n\r\nexport const useSecurityReportIndex = () => {\r\n const pageIndex = useSelector(\r\n (s) => s.ux.reports.securityCommission.quarterlylSecurity.index\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetIndex = React.useCallback(\r\n (index: PageIndex) => dispatch(setIndex(index)),\r\n [dispatch]\r\n );\r\n\r\n return [pageIndex, dispatchSetIndex] as [\r\n typeof pageIndex,\r\n typeof dispatchSetIndex\r\n ];\r\n};\r\n","import React from \"react\";\r\nimport { Grid } from \"@material-ui/core\";\r\nimport { useCurrentTradesReportFilter } from \"../../../../data/reports/securityCommission/securityQuarterly/hooks/useSecurityReportFilter\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport {\r\n MonthSelect,\r\n YearSelect,\r\n QuarterSelect,\r\n} from \"../../../components/reports/DatePartSelect\";\r\n\r\nexport const QuarterlyTradesReportFilter: React.FunctionComponent = () => {\r\n const [\r\n filter,\r\n setReporthYear,\r\n setReportQuarter,\r\n ] = useCurrentTradesReportFilter();\r\n const { getString } = React.useContext(LocalizationContext);\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","import { setReportYear, setReportQuarter } from \"../quarterlySecurityUXSlice\";\r\nimport { setData } from \"../quarterlySecurityDataSlice\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport React from \"react\";\r\nimport { QuarterlySecurityReportFilter } from \"../types\";\r\n\r\nexport const useCurrentTradesReportFilter = () => {\r\n\tconst filter = useSelector(\r\n\t\tstore => store.ux.reports.securityCommission.quarterlylSecurity.filter\r\n\t);\r\n\tconst dispatch = useDispatch();\r\n\r\n\tconst dispatchSetReportYear = React.useCallback(\r\n\t\t(year: number) => {\r\n\t\t\tdispatch(setReportYear(year));\r\n\t\t\tdispatch(setData());\r\n\t\t},\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\tconst dispatchSetReportQuarter = React.useCallback(\r\n\t\t(qtnumber: number) => {\r\n\t\t\tdispatch(setReportQuarter(qtnumber));\r\n\t\t\tdispatch(setData());\r\n\t\t},\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\treturn [filter, dispatchSetReportYear, dispatchSetReportQuarter] as [\r\n\t\ttypeof filter,\r\n\t\ttypeof dispatchSetReportYear,\r\n\t\ttypeof dispatchSetReportQuarter\r\n\t];\r\n};\r\n","import { User } from \"../../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../../core/http/httpThunks\";\r\nimport { QuarterlySecurityReportFilter } from \"../types\";\r\n\r\nexport const getQuarterlySecurityReport = (user: User, filter: QuarterlySecurityReportFilter) => {\r\n\treturn httpWebApi({\r\n\t\tmethod: \"GET\",\r\n\t\tresponseType: \"blob\",\r\n\t\ttimeout: 60 * 4 * 1000,\r\n\t\turl: \"reporting/getsecquartertradingreport\",\r\n\t\tparams: {\r\n\t\t\tuserid: user.userId,\r\n\t\t\tyear: filter.year,\r\n\t\t\tqtnumber: filter.qtnumber,\r\n\t\t},\r\n\t});\r\n};\r\n\r\nexport default getQuarterlySecurityReport;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadOrdersReport } from \"../thunks/downloadReport\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\n\r\nexport const useQuarterlySecurityReportDownloader = () => {\r\n\tconst fetchState = useSelector(\r\n\t\ts => s.data.reports.securityCommission.quarterlylSecurity.downloadReportFetchState\r\n\t);\r\n\tconst dispatch = useDispatch();\r\n\tconst download = React.useCallback(() => dispatch(downloadOrdersReport()), [dispatch]);\r\n\r\n\treturn [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { getQuarterlySecurityReport } from \"../api/getQuarterlySecurityReport\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../quarterlySecurityDataSlice\";\r\n\r\nexport const downloadOrdersReport = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.securityCommission.quarterlylSecurity;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const ordersReport = await dispatch(getQuarterlySecurityReport(user, filter));\r\n if (ordersReport) {\r\n fileDownload(\r\n new Blob([ordersReport as any], { type: \"application/pdf\" }),\r\n \"QuarterlySecurityTrading.pdf\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import { QuarterlySecurityReportFilter } from \"../types\";\r\nimport { User } from \"../../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../../core/util/functions\";\r\n\r\nexport const getQuarterlySecurityExcel = (\r\n user: User,\r\n filter: QuarterlySecurityReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getsecquartertradingxls\",\r\n params: {\r\n userid: user.userId,\r\n year: filter.year,\r\n\t\t\tqtnumber: filter.qtnumber,\r\n },\r\n });\r\n};\r\n\r\nexport default getQuarterlySecurityExcel;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadQuarterlySecurityExcel } from \"../thunks/downloadReportExcel\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\n\r\nexport const useQuarterlySecurityExcelDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.securityCommission.quarterlylSecurity.downloadReportFetchState);\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadQuarterlySecurityExcel()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { getQuarterlySecurityExcel } from \"../api/getQuarterlySecurityExcel\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../quarterlySecurityDataSlice\";\r\n\r\nexport const downloadQuarterlySecurityExcel = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.securityCommission.quarterlylSecurity;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const dailyTrading = await dispatch(getQuarterlySecurityExcel(user, filter));\r\n if (dailyTrading) {\r\n fileDownload(\r\n new Blob([dailyTrading as any], {\r\n type: \"application/vnd.openxmlformat\",\r\n }),\r\n \"QuarterlySecurityTrading.xlsx\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n\r\n};\r\n","import React from \"react\";\r\nimport { useQuarterlySecurityReportDownloader } from \"../../../../data/reports/securityCommission/securityQuarterly/hooks/useSecurityReportDownloader\";\r\nimport { useQuarterlySecurityExcelDownloader } from \"../../../../data/reports/securityCommission/securityQuarterly/hooks/useQuarterlySecurityExcelDownloader\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport ExcelIcon from \"@material-ui/icons/TableChartOutlined\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../../components/common/CustomTooltip\";\r\n\r\nexport const DownloadButton: React.FunctionComponent = () => {\r\n\tconst [downloader, fetchState] = useQuarterlySecurityReportDownloader();\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n\r\n\r\nexport const DownloadExcelButton: React.FunctionComponent = () => {\r\n\tconst [downloader, fetchState] = useQuarterlySecurityExcelDownloader();\r\n\treturn (\r\n\t \r\n\t\t\r\n\t\t \r\n\t\t\r\n\t \r\n\t);\r\n };\r\n ","import React from \"react\";\r\nimport {\r\n Grid,\r\n CardContent,\r\n CardHeader,\r\n Card,\r\n Divider,\r\n} from \"@material-ui/core\";\r\nimport QuarterlyTradesReportTable from \"./QuarterlyTradesReportTable\";\r\nimport { usePageStyles } from \"../../../pageStyles\";\r\nimport { PageComponent } from \"../../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../../components/common/PageTitle\";\r\nimport { QuarterlyTradesReportFilter } from \"./QuarterlyTradesReportFilter\";\r\nimport { DownloadButton, DownloadExcelButton } from \"./DownloadButton\";\r\n\r\nconst QuarterlyTradesReport: PageComponent = ({ userAccessRights }) => {\r\n const pageStyles = usePageStyles();\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n }\r\n action={}\r\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 QuarterlyTradesReportActions: React.FunctionComponent = () => (\r\n \r\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 QuarterlyTradesReport;\r\n","import QuarterlyTradesReport from \"./QuarterlyTradesReport\";\r\nimport { NavigationItem } from \"../../../../core/navigation/types\";\r\nimport { quarterlyTradesReportLocation, } from \"./Locations\";\r\n\r\nexport const quarterlySecurityReportComponents: NavigationItem[] = [\r\n\t{\r\n\t\tComponent: QuarterlyTradesReport,\r\n\t\tisMenuItem: true,\r\n\t\tpath: quarterlyTradesReportLocation,\r\n\t},\r\n];\r\n","export const quarterlyTradesReportLocation = \"/reports/sec/quarterlyreports\"","import { monthlyTradesReportComponents } from \"./monthlyTrades/navigationComponents\";\r\nimport { dailySecurityReportComponents } from \"./securityDaily/navigationComponents\";\r\nimport { annualSecurityReportComponents } from \"./securityAnnual/navigationComponents\";\r\nimport { quarterlySecurityReportComponents } from \"./securityQuarterly/navigationComponents\";\r\n\r\nexport const securityCommissionComponents = [...monthlyTradesReportComponents, ...dailySecurityReportComponents,...quarterlySecurityReportComponents, ...annualSecurityReportComponents];\r\n","import { AntiLaunderingReportData, AntiLaunderingReportFilter } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nconst getAntiLaunderingData = (\r\n user: User,\r\n filter: AntiLaunderingReportFilter\r\n) => {\r\n return webApi({\r\n method: \"GET\",\r\n url: \"reporting/getantimnylndcommlist\",\r\n params: {\r\n userid: user.userId,\r\n datefrom: getParamsDateString(filter.datefrom),\r\n dateto: getParamsDateString(filter.dateto),\r\n limit: filter.limit,\r\n },\r\n });\r\n};\r\n\r\nexport default getAntiLaunderingData;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadReport } from \"../thunks/loadReportData\";\r\nimport { AntiLaunderingReportData } from \"../types\";\r\n\r\nexport const useAntiMnyLndCommReportData = () => {\r\n const data = useSelector(\r\n (s) => s.data.reports.antiLaundering.data\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadData = React.useCallback(() => dispatch(loadReport()), [\r\n dispatch,\r\n ]);\r\n\r\n return [data, dispatchLoadData] as [typeof data, typeof dispatchLoadData];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { setData } from \"../amlaunderingDataSlice\";\r\nimport getAntiLaunderingDataApi from \"../api/getAntiLaunderingData\";\r\n\r\nexport const loadReport = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const user = store.data.auth.current.user;\r\n const { filter } = store.ux.reports.antiLaundering;\r\n\r\n const pagedTrades = await dispatch(getAntiLaunderingDataApi(user, filter));\r\n\r\n dispatch(setData(pagedTrades || []));\r\n};\r\n","import React from \"react\";\r\nimport { useAntiMnyLndCommColumns } from \"./useAntiMnyLndCommReportColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\nimport { AntiLaunderingReportData } from \"../../../data/reports/amlaundering/types\";\r\nimport { ControledTable } from \"../../components/common/ControledTable\";\r\nimport { useAntiMnyLndCommReportData } from \"../../../data/reports/amlaundering/hooks/useAntiMnyLndCommReportData\";\r\nimport { useAntiMnyLndCommReportIndex } from \"../../../data/reports/amlaundering/hooks/useAntiMnyLndCommReportIndex\";\r\n\r\nexport interface AntiMnyLndCommTableProps {\r\n userAccessRights: AccessRights;\r\n}\r\n\r\ntype OrderTablePropsType = AntiMnyLndCommTableProps;\r\n\r\nexport const AntiMnyLndCommReportTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n ...tableProps\r\n}) => {\r\n const columns = useAntiMnyLndCommColumns();\r\n const [data, load] = useAntiMnyLndCommReportData();\r\n const [index, setIndex] = useAntiMnyLndCommReportIndex();\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={load}\r\n onPageIndexChange={setIndex}\r\n pageIndex={index}\r\n immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default AntiMnyLndCommReportTable;\r\n","import { AntiLaunderingReportData } from \"../../../data/reports/amlaundering/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\n\r\nexport const useAntiMnyLndCommColumns = () => {\r\n const { getString, getFormatedNumberString } = React.useContext(\r\n LocalizationContext\r\n );\r\n\r\n return React.useMemo(\r\n () => [\r\n {\r\n title: getString(\"amtimnylndcommTradeNumber\"),\r\n field: \"tradeNumber\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"amtimnylndcommTradeDate\"),\r\n field: \"tradeDate\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"amtimnylndcommProduct\"),\r\n field: \"product\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"amtimnylndcommQuantity\"),\r\n render: (row) => `${getFormatedNumberString(row.quantity)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"amtimnylndcommPrice\"),\r\n render: (row) => `${getFormatedNumberString(row.price, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"amtimnylndcommAmount\"),\r\n render: (row) => `${getFormatedNumberString(row.amount, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"amtimnylndcommBuyer\"),\r\n field: \"buyer\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"amtimnylndcommSeller\"),\r\n field: \"seller\",\r\n sorting: false,\r\n },\r\n ],\r\n [getString, getFormatedNumberString]\r\n ) as Column[];\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { setIndex } from \"../amlaunderingUXSlice\";\r\nimport { PageIndex } from \"../../../models\";\r\n\r\nexport const useAntiMnyLndCommReportIndex = () => {\r\n const pageIndex = useSelector(\r\n (s) => s.ux.reports.antiLaundering.index\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetIndex = React.useCallback(\r\n (index: PageIndex) => dispatch(setIndex(index)),\r\n [dispatch]\r\n );\r\n\r\n return [pageIndex, dispatchSetIndex] as [\r\n typeof pageIndex,\r\n typeof dispatchSetIndex\r\n ];\r\n};\r\n","import { setFilter } from \"../amlaunderingUXSlice\";\r\nimport { setData } from \"../amlaunderingDataSlice\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport React from \"react\";\r\nimport { AntiLaunderingReportFilter } from \"../types\";\r\nimport { useCopiedState } from \"../../../../core/util/hooks\";\r\n\r\nexport const useAntiMnyLndcommReportFilter = () => {\r\n const storeFilter = useSelector(\r\n (store) => store.ux.reports.antiLaundering.filter\r\n );\r\n const [filter, editFilter] = useCopiedState(\r\n storeFilter\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetFilter = React.useCallback(() => {\r\n dispatch(setFilter(filter!));\r\n dispatch(setData());\r\n }, [dispatch, filter]);\r\n\r\n return [filter, editFilter, dispatchSetFilter] as [\r\n typeof filter,\r\n typeof editFilter,\r\n typeof dispatchSetFilter\r\n ];\r\n};\r\n","import React from \"react\";\r\nimport { Grid, Paper, Button, Typography } from \"@material-ui/core\";\r\nimport { DateInput } from \"../../components/common/DateInput\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { AntiLaunderingReportFilter } from \"../../../data/reports/amlaundering/types\";\r\nimport { useAuth } from \"../../../data/auth/hooks\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { NumberInput } from \"../../components/common/NumberInput\";\r\n\r\ninterface AntiLaunderingFilterEditorProps {\r\n filter?: AntiLaunderingReportFilter;\r\n editFilter: (prop: keyof AntiLaunderingReportFilter, value: any) => void;\r\n save: () => void;\r\n}\r\n\r\nexport const AntiMnyLndCommFilterEditor: React.FunctionComponent = ({\r\n filter,\r\n editFilter,\r\n save,\r\n}) => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const { getString } = React.useContext(LocalizationContext);\r\n\r\n const handleChange = React.useCallback(\r\n (event: React.ChangeEvent) => {\r\n editFilter(event.target.name as any, event.target.value);\r\n },\r\n [editFilter]\r\n );\r\n\r\n if (!filter) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n editFilter(\"datefrom\", date?.toISOString())}\r\n />\r\n \r\n \r\n editFilter(\"dateto\", date?.toISOString())}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n \r\n property=\"limit\"\r\n item={filter}\r\n onChange={handleChange}\r\n label={getString(\"amtimnylndcommLimit\")}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n {\r\n save();\r\n showWithDrawer(undefined);\r\n }}\r\n >\r\n {getString(\"orderFilterConfirm\")}\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport { IconButton, Grid } from \"@material-ui/core\";\r\nimport FilterIcon from \"@material-ui/icons/FilterListOutlined\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { useAntiMnyLndcommReportFilter } from \"../../../data/reports/amlaundering/hooks/useAntiMnyLndCommReportFilter\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport { AntiMnyLndCommFilterEditor } from \"../amlaundering/AntiMnyLndCommFilterEditor\";\r\n\r\nexport const AntiMnyLndCommReportFilter: React.FunctionComponent = () => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const showFilter = React.useCallback(\r\n () => showWithDrawer(),\r\n [showWithDrawer]\r\n );\r\n\r\n const [filter, editfilter, save] = useAntiMnyLndcommReportFilter();\r\n const { getString } = React.useContext(LocalizationContext);\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\nconst AntiMnyLndCommReportsFiltEditor: React.FunctionComponent = () => {\r\n const [filter, editFilter, save] = useAntiMnyLndcommReportFilter();\r\n return (\r\n \r\n );\r\n};\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { AntiLaunderingReportFilter } from \"../types\";\r\n\r\nexport const getAntiLaunderingReport = (\r\n user: User,\r\n filter: AntiLaunderingReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getantimnylndcommreport\",\r\n params: {\r\n userid: user.userId,\r\n datefrom: filter.datefrom,\r\n dateto: filter.dateto,\r\n limit: filter.limit,\r\n },\r\n });\r\n};\r\n\r\nexport default getAntiLaunderingReport;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadAntiLndReport } from \"../thunks/downloadReport\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useAntiMnyLndCommReportDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.antiLaundering.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(() => dispatch(downloadAntiLndReport()), [\r\n dispatch,\r\n ]);\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getAntiLaunderingReport } from \"../api/getAntiLaunderingReport\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../amlaunderingDataSlice\";\r\n\r\nexport const downloadAntiLndReport = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.antiLaundering;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const ordersReport = await dispatch(getAntiLaunderingReport(user, filter));\r\n if (ordersReport) {\r\n fileDownload(\r\n new Blob([ordersReport as any], { type: \"application/pdf\" }),\r\n \"AntiMnyLndComm.pdf\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import { AntiLaunderingReportFilter } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nexport const getAntiLaunderingExcel = (\r\n user: User,\r\n filter: AntiLaunderingReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getantimnylndcommxls\",\r\n params: {\r\n userid: user.userId,\r\n datefrom: filter.datefrom,\r\n dateto: filter.dateto,\r\n limit: filter.limit,\r\n },\r\n });\r\n};\r\n\r\nexport default getAntiLaunderingExcel;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadAntiMnyLndCommExcel } from \"../thunks/downloadReportExcel\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useAntiMnyLndCommExcelDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.antiLaundering.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadAntiMnyLndCommExcel()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getAntiLaunderingExcel } from \"../api/getAntiLaunderingExcel\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../amlaunderingDataSlice\";\r\n\r\nexport const downloadAntiMnyLndCommExcel = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.antiLaundering;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const dailyTrading = await dispatch(getAntiLaunderingExcel(user, filter));\r\n if (dailyTrading) {\r\n fileDownload(\r\n new Blob([dailyTrading as any], {\r\n type: \"application/vnd.openxmlformat\",\r\n }),\r\n \"AntiMnyLndComm.xlsx\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import React from \"react\";\r\nimport { useAntiMnyLndCommReportDownloader } from \"../../../data/reports/amlaundering/hooks/useAntiMnyLndCommReportDownloader\";\r\nimport { useAntiMnyLndCommExcelDownloader } from \"../../../data/reports/amlaundering/hooks/useAntiMnyLndCommExcelDownloader\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport ExcelIcon from \"@material-ui/icons/TableChartOutlined\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\n\r\nexport const DownloadButton: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useAntiMnyLndCommReportDownloader();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const DownloadExcelButton: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useAntiMnyLndCommExcelDownloader();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport {\r\n Grid,\r\n CardContent,\r\n CardHeader,\r\n Card,\r\n Divider,\r\n} from \"@material-ui/core\";\r\nimport { AntiMnyLndCommReportTable } from \"./AntiMnyLndCommReportTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { PageComponent } from \"../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { AntiMnyLndCommReportFilter } from \"./AntiMnyLndCommReportFilter\";\r\nimport { DownloadButton, DownloadExcelButton } from \"./DownloadButton\";\r\n\r\nconst AntiMnyLndCommReport: PageComponent = ({ userAccessRights }) => {\r\n const pageStyles = usePageStyles();\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n }\r\n action={}\r\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 AntiMnyLndCommReportActions: React.FunctionComponent = () => (\r\n \r\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 AntiMnyLndCommReport;\r\n","import AntiMnyLndCommReport from \"./AntiMnyLndCommReport\";\r\nimport { NavigationItem } from \"../../../core/navigation/types\";\r\nimport { antiMnyLndCommLocation } from \"./Locations\";\r\n\r\nexport const antiMnyLndCommReportComponents: NavigationItem[] = [\r\n {\r\n Component: AntiMnyLndCommReport,\r\n isMenuItem: true,\r\n path: antiMnyLndCommLocation,\r\n },\r\n];\r\n","export const antiMnyLndCommLocation = \"/reports/antimoneylaundering\";\r\n","import { MemberContractsReportData } from \"../types\";\r\nimport { User } from \"../../../../auth/types\";\r\nimport { webApi } from \"../../../../../core/http/httpThunks\";\r\n\r\nconst getMemberContractsData = (user: User) => {\r\n return webApi({\r\n method: \"GET\",\r\n url: \"reporting/getclicontrlist\",\r\n params: {\r\n userid: user.userId,\r\n status: 1,\r\n },\r\n });\r\n};\r\n\r\nexport default getMemberContractsData;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { loadReport } from \"../thunks/loadReportData\";\r\nimport { MemberContractsReportData } from \"../types\";\r\n\r\nexport const useMemberContractsReportData = () => {\r\n const data = useSelector(\r\n (s) => s.data.reports.exchbusiness.memberContracts.data\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadData = React.useCallback(() => dispatch(loadReport()), [\r\n dispatch,\r\n ]);\r\n\r\n return [data, dispatchLoadData] as [typeof data, typeof dispatchLoadData];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { setData } from \"../memberContractsDataSlice\";\r\nimport getMemberContractsDataApi from \"../api/getMemberContractsData\";\r\n\r\nexport const loadReport = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const user = store.data.auth.current.user;\r\n\r\n const pagedTrades = await dispatch(getMemberContractsDataApi(user));\r\n\r\n dispatch(setData(pagedTrades || []));\r\n};\r\n","import React from \"react\";\r\nimport { useMemberContractsColumns } from \"./useMemberContractsReportColumns\";\r\nimport { AccessRights } from \"../../../../core/navigation/types\";\r\nimport { MemberContractsReportData } from \"../../../../data/reports/exchbusiness/memberContracts/types\";\r\nimport { ControledTable } from \"../../../components/common/ControledTable\";\r\nimport { useMemberContractsReportData } from \"../../../../data/reports/exchbusiness/memberContracts/hooks/useMemberContractsReportData\";\r\nimport { useMemberContractsReportIndex } from \"../../../../data/reports/exchbusiness/memberContracts/hooks/useMemberContractsReportIndex\";\r\n\r\nexport interface MemberContractsTableProps {\r\n userAccessRights: AccessRights;\r\n}\r\n\r\ntype MemberContractsTablePropsType = MemberContractsTableProps;\r\n\r\nconst MemberContractsReportTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n ...tableProps\r\n}) => {\r\n const columns = useMemberContractsColumns();\r\n const [data, load] = useMemberContractsReportData();\r\n const [index, setIndex] = useMemberContractsReportIndex();\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={load}\r\n onPageIndexChange={setIndex}\r\n pageIndex={index}\r\n immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default MemberContractsReportTable;\r\n","import { MemberContractsReportData } from \"../../../../data/reports/exchbusiness/memberContracts/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\n\r\nexport const useMemberContractsColumns = () => {\r\n const { getString, getFormatedNumberString } = React.useContext(\r\n LocalizationContext\r\n );\r\n\r\n return React.useMemo(\r\n () => [\r\n {\r\n title: getString(\"memcontMember\"),\r\n field: \"member\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"memcontContractDate\"),\r\n field: \"contractDate\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"memcontExpireDate\"),\r\n field: \"expireDate\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"memcontStatus\"),\r\n field: \"status\",\r\n sorting: false,\r\n },\r\n ],\r\n [getString, getFormatedNumberString]\r\n ) as Column[];\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { setIndex } from \"../memberContractsUXSlice\";\r\nimport { PageIndex } from \"../../../../models\";\r\n\r\nexport const useMemberContractsReportIndex = () => {\r\n const pageIndex = useSelector(\r\n (s) => s.ux.reports.exchbusiness.memberContracts.index\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetIndex = React.useCallback(\r\n (index: PageIndex) => dispatch(setIndex(index)),\r\n [dispatch]\r\n );\r\n\r\n return [pageIndex, dispatchSetIndex] as [\r\n typeof pageIndex,\r\n typeof dispatchSetIndex\r\n ];\r\n};\r\n","import { User } from \"../../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../../core/http/httpThunks\";\r\n\r\nexport const getMemberContractsReport = (user: User) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getclicontrreport\",\r\n params: {\r\n userid: user.userId,\r\n status: 1,\r\n },\r\n });\r\n};\r\n\r\nexport default getMemberContractsReport;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadMemberContractsReport } from \"../thunks/downloadReport\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\n\r\nexport const useMemberContractsReportDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.exchbusiness.memberContracts.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadMemberContractsReport()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { getMemberContractsReport } from \"../api/getMemberContractsReport\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../memberContractsDataSlice\";\r\n\r\nexport const downloadMemberContractsReport = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const ordersReport = await dispatch(getMemberContractsReport(user));\r\n if (ordersReport) {\r\n fileDownload(\r\n new Blob([ordersReport as any], { type: \"application/pdf\" }),\r\n \"MemberCintracts.pdf\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import { User } from \"../../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../../core/http/httpThunks\";\r\n\r\nexport const getMemberContractsExcel = (user: User) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getclicontrxls\",\r\n params: {\r\n userid: user.userId,\r\n status: 1,\r\n },\r\n });\r\n};\r\n\r\nexport default getMemberContractsExcel;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadMemberContractsExcel } from \"../thunks/downloadReportExcel\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\n\r\nexport const useMemberContractsExcelDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.exchbusiness.memberContracts.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadMemberContractsExcel()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { getMemberContractsExcel } from \"../api/getMemberContractsExcel\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../memberContractsDataSlice\";\r\n\r\nexport const downloadMemberContractsExcel = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const dailyTrading = await dispatch(getMemberContractsExcel(user));\r\n if (dailyTrading) {\r\n fileDownload(\r\n new Blob([dailyTrading as any], {\r\n type: \"application/vnd.openxmlformat\",\r\n }),\r\n \"MemberContracts.xlsx\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import React from \"react\";\r\nimport { useMemberContractsReportDownloader } from \"../../../../data/reports/exchbusiness/memberContracts/hooks/useMemberContractsReportDownloader\";\r\nimport { useMemberContractsExcelDownloader } from \"../../../../data/reports/exchbusiness/memberContracts/hooks/useMemberContractsExcelDownloader\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport ExcelIcon from \"@material-ui/icons/TableChartOutlined\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../../components/common/CustomTooltip\";\r\n\r\nexport const DownloadButton: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useMemberContractsReportDownloader();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const DownloadExcelButton: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useMemberContractsExcelDownloader();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport {\r\n Grid,\r\n CardContent,\r\n CardHeader,\r\n Card,\r\n Divider,\r\n} from \"@material-ui/core\";\r\nimport MemberContractsReportTable from \"./MemberContractsReportTable\";\r\nimport { usePageStyles } from \"../../../pageStyles\";\r\nimport { PageComponent } from \"../../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../../components/common/PageTitle\";\r\nimport { DownloadButton, DownloadExcelButton } from \"./DownloadButton\";\r\n\r\nconst MemberContractsReport: PageComponent = ({ userAccessRights }) => {\r\n const pageStyles = usePageStyles();\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n }\r\n action={}\r\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 MemberContractsReportActions: React.FunctionComponent = () => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default MemberContractsReport;\r\n","import MemberContractsReport from \"./MemberContractsReport\";\r\nimport { NavigationItem } from \"../../../../core/navigation/types\";\r\nimport { memberContractsReportLocation } from \"./Locations\";\r\n\r\nexport const memberContractsReportComponents: NavigationItem[] = [\r\n {\r\n Component: MemberContractsReport,\r\n isMenuItem: true,\r\n path: memberContractsReportLocation,\r\n },\r\n];\r\n","export const memberContractsReportLocation =\r\n \"/reports/exchbusiness/membercontracts\";\r\n","import { TradeReviewReportData, TradeReviewReportFilter } from \"../types\";\r\nimport { User } from \"../../../../auth/types\";\r\nimport { webApi } from \"../../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../../core/util/functions\";\r\n\r\nconst getTradeReviewData = (user: User, filter: TradeReviewReportFilter) => {\r\n return webApi({\r\n method: \"GET\",\r\n url: \"reporting/gettradereviewlist\",\r\n params: {\r\n userid: user.userId,\r\n datefrom: getParamsDateString(filter.datefrom),\r\n dateto: getParamsDateString(filter.dateto),\r\n productid: filter.productid,\r\n },\r\n });\r\n};\r\n\r\nexport default getTradeReviewData;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { loadReport } from \"../thunks/loadReportData\";\r\nimport { TradeReviewReportData } from \"../types\";\r\n\r\nexport const useTradeReviewReportData = () => {\r\n const data = useSelector(\r\n (s) => s.data.reports.exchbusiness.tradeReview.data\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadData = React.useCallback(() => dispatch(loadReport()), [\r\n dispatch,\r\n ]);\r\n\r\n return [data, dispatchLoadData] as [typeof data, typeof dispatchLoadData];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { setData } from \"../tradeReviewDataSlice\";\r\nimport getTradeReviewDataApi from \"../api/getTradeReviewData\";\r\n\r\nexport const loadReport = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const user = store.data.auth.current.user;\r\n const { filter } = store.ux.reports.exchbusiness.tradeReview;\r\n\r\n const pagedTrades = await dispatch(getTradeReviewDataApi(user, filter));\r\n\r\n dispatch(setData(pagedTrades || []));\r\n};\r\n","import React from \"react\";\r\nimport { useTradeReviewColumns } from \"./useTradeReviewReportColumns\";\r\nimport { AccessRights } from \"../../../../core/navigation/types\";\r\nimport { TradeReviewReportData } from \"../../../../data/reports/exchbusiness/tradeReview/types\";\r\nimport { ControledTable } from \"../../../components/common/ControledTable\";\r\nimport { useTradeReviewReportData } from \"../../../../data/reports/exchbusiness/tradeReview/hooks/useTradeReviewReportData\";\r\nimport { useTradeReviewReportIndex } from \"../../../../data/reports/exchbusiness/tradeReview/hooks/useTradeReviewReportIndex\";\r\n\r\nexport interface TradeReviewTableProps {\r\n userAccessRights: AccessRights;\r\n}\r\n\r\ntype TradeReviewTablePropsType = TradeReviewTableProps;\r\n\r\nexport const TradeReviewReportTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n ...tableProps\r\n}) => {\r\n const columns = useTradeReviewColumns();\r\n const [data, load] = useTradeReviewReportData();\r\n const [index, setIndex] = useTradeReviewReportIndex();\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={load}\r\n onPageIndexChange={setIndex}\r\n pageIndex={index}\r\n immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default TradeReviewReportTable;\r\n","import { TradeReviewReportData } from \"../../../../data/reports/exchbusiness/tradeReview/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\n\r\nexport const useTradeReviewColumns = () => {\r\n const { getString, getFormatedNumberString } = React.useContext(\r\n LocalizationContext\r\n );\r\n\r\n return React.useMemo(\r\n () => [\r\n {\r\n title: getString(\"exchTradeNumber\"),\r\n field: \"tradeNumber\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"exchTradeDate\"),\r\n field: \"tradeDate\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"exchProduct\"),\r\n field: \"product\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"exchPrice\"),\r\n render: (row) => `${getFormatedNumberString(row.price, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"exchQuantity\"),\r\n render: (row) => `${getFormatedNumberString(row.quantity)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"exchAmount\"),\r\n render: (row) => `${getFormatedNumberString(row.amount, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n ],\r\n [getString, getFormatedNumberString]\r\n ) as Column[];\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { setIndex } from \"../tradeReviewUXSlice\";\r\nimport { PageIndex } from \"../../../../models\";\r\n\r\nexport const useTradeReviewReportIndex = () => {\r\n const pageIndex = useSelector(\r\n (s) => s.ux.reports.exchbusiness.tradeReview.index\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetIndex = React.useCallback(\r\n (index: PageIndex) => dispatch(setIndex(index)),\r\n [dispatch]\r\n );\r\n\r\n return [pageIndex, dispatchSetIndex] as [\r\n typeof pageIndex,\r\n typeof dispatchSetIndex\r\n ];\r\n};\r\n","import { setFilter } from \"../tradeReviewUXSlice\";\r\nimport { setData } from \"../tradeReviewDataSlice\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport React from \"react\";\r\nimport { TradeReviewReportFilter } from \"../types\";\r\nimport { useCopiedState } from \"../../../../../core/util/hooks\";\r\n\r\nexport const useTradeReviewReportFilter = () => {\r\n const storeFilter = useSelector(\r\n (store) => store.ux.reports.exchbusiness.tradeReview.filter\r\n );\r\n const [filter, editFilter] = useCopiedState(\r\n storeFilter\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetFilter = React.useCallback(() => {\r\n dispatch(setFilter(filter!));\r\n dispatch(setData());\r\n }, [dispatch, filter]);\r\n\r\n return [filter, editFilter, dispatchSetFilter] as [\r\n typeof filter,\r\n typeof editFilter,\r\n typeof dispatchSetFilter\r\n ];\r\n};\r\n","import React from \"react\";\r\nimport { Grid, Paper, Button, Typography } from \"@material-ui/core\";\r\nimport { DateInput } from \"../../../components/common/DateInput\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { TradeReviewReportFilter } from \"../../../../data/reports/exchbusiness/tradeReview/types\";\r\nimport { useAuth } from \"../../../../data/auth/hooks\";\r\nimport { DisplayDrawerContext } from \"../../../../layout/DisplayDrawerContext\";\r\nimport { NumberInput } from \"../../../components/common/NumberInput\";\r\nimport { ProductSelect } from \"../../../components/listing/ProductSelect\";\r\n\r\ninterface TradeReviewFilterEditorProps {\r\n filter?: TradeReviewReportFilter;\r\n editFilter: (prop: keyof TradeReviewReportFilter, value: any) => void;\r\n save: () => void;\r\n}\r\n\r\nexport const TradeReviewFilterEditor: React.FunctionComponent = ({\r\n filter,\r\n editFilter,\r\n save,\r\n}) => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const { getString } = React.useContext(LocalizationContext);\r\n\r\n const handleChange = React.useCallback(\r\n (event: React.ChangeEvent) => {\r\n editFilter(event.target.name as any, event.target.value);\r\n },\r\n [editFilter]\r\n );\r\n\r\n if (!filter) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n editFilter(\"datefrom\", date?.toISOString())}\r\n />\r\n \r\n \r\n editFilter(\"dateto\", date?.toISOString())}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n prod.prodId === filter.productid}\r\n onChangeItem={(prod) => {\r\n editFilter(\"productid\", prod ? prod.prodId : undefined);\r\n }}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n {\r\n save();\r\n showWithDrawer(undefined);\r\n }}\r\n >\r\n {getString(\"orderFilterConfirm\")}\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport { IconButton, Grid } from \"@material-ui/core\";\r\nimport FilterIcon from \"@material-ui/icons/FilterListOutlined\";\r\nimport { DisplayDrawerContext } from \"../../../../layout/DisplayDrawerContext\";\r\nimport { useTradeReviewReportFilter } from \"../../../../data/reports/exchbusiness/tradeReview/hooks/useTradeReviewReportFilter\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { CustomTooltip } from \"../../../components/common/CustomTooltip\";\r\nimport { TradeReviewFilterEditor } from \"./TradereviewFilterEditor\";\r\n\r\nexport const TradeReviewReportFilter: React.FunctionComponent = () => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const showFilter = React.useCallback(\r\n () => showWithDrawer(),\r\n [showWithDrawer]\r\n );\r\n\r\n const [filter, editfilter, save] = useTradeReviewReportFilter();\r\n const { getString } = React.useContext(LocalizationContext);\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\nconst TradeReviewsFiltEditor: React.FunctionComponent = () => {\r\n const [filter, editFilter, save] = useTradeReviewReportFilter();\r\n return (\r\n \r\n );\r\n};\r\n","import { User } from \"../../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../../core/http/httpThunks\";\r\nimport { TradeReviewReportFilter } from \"../types\";\r\n\r\nexport const getTradeReviewReport = (\r\n user: User,\r\n filter: TradeReviewReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/gettradereviewreport\",\r\n params: {\r\n userid: user.userId,\r\n datefrom: filter.datefrom,\r\n dateto: filter.dateto,\r\n productid: filter.productid,\r\n },\r\n });\r\n};\r\n\r\nexport default getTradeReviewReport;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadTradeReviewReport } from \"../thunks/downloadReport\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\n\r\nexport const useTradeViewReportDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.exchbusiness.tradeReview.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadTradeReviewReport()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { getTradeReviewReport } from \"../api/getTradeReviewReport\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../tradeReviewDataSlice\";\r\n\r\nexport const downloadTradeReviewReport = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.exchbusiness.tradeReview;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const ordersReport = await dispatch(getTradeReviewReport(user, filter));\r\n if (ordersReport) {\r\n fileDownload(\r\n new Blob([ordersReport as any], { type: \"application/pdf\" }),\r\n \"TradeReview.pdf\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import { TradeReviewReportFilter } from \"../types\";\r\nimport { User } from \"../../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../../core/util/functions\";\r\n\r\nexport const getTradeReviewExcel = (\r\n user: User,\r\n filter: TradeReviewReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/gettradereviewxls\",\r\n params: {\r\n userid: user.userId,\r\n datefrom: filter.datefrom,\r\n dateto: filter.dateto,\r\n productid: filter.productid,\r\n },\r\n });\r\n};\r\n\r\nexport default getTradeReviewExcel;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadTradeReviewExcel } from \"../thunks/downloadReportExcel\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\n\r\nexport const useTradeReviewExcelDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.exchbusiness.tradeReview.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadTradeReviewExcel()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { getTradeReviewExcel } from \"../api/getTradeReviewExcel\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../tradeReviewDataSlice\";\r\n\r\nexport const downloadTradeReviewExcel = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.exchbusiness.tradeReview;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const dailyTrading = await dispatch(getTradeReviewExcel(user, filter));\r\n if (dailyTrading) {\r\n fileDownload(\r\n new Blob([dailyTrading as any], {\r\n type: \"application/vnd.openxmlformat\",\r\n }),\r\n \"TradeReview.xlsx\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import React from \"react\";\r\nimport { useTradeViewReportDownloader } from \"../../../../data/reports/exchbusiness/tradeReview/hooks/useTradeReviewReportDownloader\";\r\nimport { useTradeReviewExcelDownloader } from \"../../../../data/reports/exchbusiness/tradeReview/hooks/useTradeReviewExcelDownloader\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport ExcelIcon from \"@material-ui/icons/TableChartOutlined\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../../components/common/CustomTooltip\";\r\n\r\nexport const DownloadButton: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useTradeViewReportDownloader();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const DownloadExcelButton: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useTradeReviewExcelDownloader();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport {\r\n Grid,\r\n CardContent,\r\n CardHeader,\r\n Card,\r\n Divider,\r\n} from \"@material-ui/core\";\r\nimport { TradeReviewReportTable } from \"./TradeReviewReportTable\";\r\nimport { usePageStyles } from \"../../../pageStyles\";\r\nimport { PageComponent } from \"../../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../../components/common/PageTitle\";\r\nimport { TradeReviewReportFilter } from \"./TradeReviewReportFilter\";\r\nimport { DownloadButton, DownloadExcelButton } from \"./DownloadButton\";\r\n\r\nconst TradeReviewReport: PageComponent = ({ userAccessRights }) => {\r\n const pageStyles = usePageStyles();\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n }\r\n action={}\r\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 TradeReviewReportActions: React.FunctionComponent = () => (\r\n \r\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 TradeReviewReport;\r\n","import TradeReviewReport from \"./TradeReviewReport\";\r\nimport { NavigationItem } from \"../../../../core/navigation/types\";\r\nimport { tradeReviewLocation } from \"./Locations\";\r\n\r\nexport const tradeReviewReportComponents: NavigationItem[] = [\r\n {\r\n Component: TradeReviewReport,\r\n isMenuItem: true,\r\n path: tradeReviewLocation,\r\n },\r\n];\r\n","export const tradeReviewLocation = \"/reports/exchbusiness/tradereview\";\r\n","import {\r\n TradeByProductsReportData,\r\n TradeByProductsReportFilter,\r\n} from \"../types\";\r\nimport { User } from \"../../../../auth/types\";\r\nimport { webApi } from \"../../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../../core/util/functions\";\r\n\r\nconst getTradeByProductsData = (\r\n user: User,\r\n filter: TradeByProductsReportFilter\r\n) => {\r\n return webApi({\r\n method: \"GET\",\r\n url: \"reporting/gettradebyprodlist\",\r\n params: {\r\n userid: user.userId,\r\n datefrom: getParamsDateString(filter.datefrom),\r\n dateto: getParamsDateString(filter.dateto),\r\n },\r\n });\r\n};\r\n\r\nexport default getTradeByProductsData;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { loadReport } from \"../thunks/loadReportData\";\r\nimport { TradeByProductsReportData } from \"../types\";\r\n\r\nexport const useTradeByProductsReportData = () => {\r\n const data = useSelector(\r\n (s) => s.data.reports.exchbusiness.tradeByProducts.data\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadData = React.useCallback(() => dispatch(loadReport()), [\r\n dispatch,\r\n ]);\r\n\r\n return [data, dispatchLoadData] as [typeof data, typeof dispatchLoadData];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { setData } from \"../tradeByProductsDataSlice\";\r\nimport getTradeByProductsDataApi from \"../api/getTradeByProductsData\";\r\n\r\nexport const loadReport = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const user = store.data.auth.current.user;\r\n const { filter } = store.ux.reports.exchbusiness.tradeByProducts;\r\n\r\n const pagedTrades = await dispatch(getTradeByProductsDataApi(user, filter));\r\n\r\n dispatch(setData(pagedTrades || []));\r\n};\r\n","import React from \"react\";\r\nimport { useTradeByProductsColumns } from \"./useTradeByProductsReportColumns\";\r\nimport { AccessRights } from \"../../../../core/navigation/types\";\r\nimport { TradeByProductsReportData } from \"../../../../data/reports/exchbusiness/tradeByProducts/types\";\r\nimport { ControledTable } from \"../../../components/common/ControledTable\";\r\nimport { useTradeByProductsReportData } from \"../../../../data/reports/exchbusiness/tradeByProducts/hooks/useTradeByProductsReportData\";\r\nimport { useTradeByProductsReportIndex } from \"../../../../data/reports/exchbusiness/tradeByProducts/hooks/useTradeByProductsReportIndex\";\r\n\r\nexport interface TradeByProductsTableProps {\r\n userAccessRights: AccessRights;\r\n}\r\n\r\ntype TradeByProductsTablePropsType = TradeByProductsTableProps;\r\n\r\nexport const TradeByProductsReportTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n ...tableProps\r\n}) => {\r\n const columns = useTradeByProductsColumns();\r\n const [data, load] = useTradeByProductsReportData();\r\n const [index, setIndex] = useTradeByProductsReportIndex();\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={load}\r\n onPageIndexChange={setIndex}\r\n pageIndex={index}\r\n immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default TradeByProductsReportTable;\r\n","import { TradeByProductsReportData } from \"../../../../data/reports/exchbusiness/tradeByProducts/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\n\r\nexport const useTradeByProductsColumns = () => {\r\n const { getString, getFormatedNumberString } = React.useContext(\r\n LocalizationContext\r\n );\r\n\r\n return React.useMemo(\r\n () => [\r\n {\r\n title: getString(\"exchTransactionDate\"),\r\n field: \"transactionDate\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"exchTransactionNumber\"),\r\n field: \"transactionNumber\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"exchProduct\"),\r\n field: \"product\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"exchQuantity\"),\r\n render: (row) => `${getFormatedNumberString(row.quantity)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"exchPrice\"),\r\n render: (row) => `${getFormatedNumberString(row.price, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"exchAmount\"),\r\n render: (row) => `${getFormatedNumberString(row.amount, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n ],\r\n [getString, getFormatedNumberString]\r\n ) as Column[];\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { setIndex } from \"../tradeByProductsUXSlice\";\r\nimport { PageIndex } from \"../../../../models\";\r\n\r\nexport const useTradeByProductsReportIndex = () => {\r\n const pageIndex = useSelector(\r\n (s) => s.ux.reports.exchbusiness.tradeByProducts.index\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetIndex = React.useCallback(\r\n (index: PageIndex) => dispatch(setIndex(index)),\r\n [dispatch]\r\n );\r\n\r\n return [pageIndex, dispatchSetIndex] as [\r\n typeof pageIndex,\r\n typeof dispatchSetIndex\r\n ];\r\n};\r\n","import { setFilter } from \"../tradeByProductsUXSlice\";\r\nimport { setData } from \"../tradeByProductsDataSlice\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport React from \"react\";\r\nimport { TradeByProductsReportFilter } from \"../types\";\r\nimport { useCopiedState } from \"../../../../../core/util/hooks\";\r\n\r\nexport const useTradeByProductsReportFilter = () => {\r\n const storeFilter = useSelector(\r\n (store) => store.ux.reports.exchbusiness.tradeByProducts.filter\r\n );\r\n const [filter, editFilter] = useCopiedState(\r\n storeFilter\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetFilter = React.useCallback(() => {\r\n dispatch(setFilter(filter!));\r\n dispatch(setData());\r\n }, [dispatch, filter]);\r\n\r\n return [filter, editFilter, dispatchSetFilter] as [\r\n typeof filter,\r\n typeof editFilter,\r\n typeof dispatchSetFilter\r\n ];\r\n};\r\n","import React from \"react\";\r\nimport { Grid, Paper, Button, Typography } from \"@material-ui/core\";\r\nimport { DateInput } from \"../../../components/common/DateInput\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { TradeByProductsReportFilter } from \"../../../../data/reports/exchbusiness/tradeByProducts/types\";\r\nimport { useAuth } from \"../../../../data/auth/hooks\";\r\nimport { DisplayDrawerContext } from \"../../../../layout/DisplayDrawerContext\";\r\n\r\ninterface TradeByProductsFilterEditorProps {\r\n filter?: TradeByProductsReportFilter;\r\n editFilter: (prop: keyof TradeByProductsReportFilter, value: any) => void;\r\n save: () => void;\r\n}\r\n\r\nexport const TradeByProductsFilterEditor: React.FunctionComponent = ({\r\n filter,\r\n editFilter,\r\n save,\r\n}) => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const { getString } = React.useContext(LocalizationContext);\r\n\r\n const handleChange = React.useCallback(\r\n (event: React.ChangeEvent) => {\r\n editFilter(event.target.name as any, event.target.value);\r\n },\r\n [editFilter]\r\n );\r\n\r\n if (!filter) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n editFilter(\"datefrom\", date?.toISOString())}\r\n />\r\n \r\n \r\n editFilter(\"dateto\", date?.toISOString())}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n {\r\n save();\r\n showWithDrawer(undefined);\r\n }}\r\n >\r\n {getString(\"orderFilterConfirm\")}\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport { IconButton, Grid } from \"@material-ui/core\";\r\nimport FilterIcon from \"@material-ui/icons/FilterListOutlined\";\r\nimport { DisplayDrawerContext } from \"../../../../layout/DisplayDrawerContext\";\r\nimport { useTradeByProductsReportFilter } from \"../../../../data/reports/exchbusiness/tradeByProducts/hooks/useTradeByProductsReportFilter\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { CustomTooltip } from \"../../../components/common/CustomTooltip\";\r\nimport { TradeByProductsFilterEditor } from \"./TradeByProductsFilterEditor\";\r\n\r\nexport const TradeByProductsReportFilter: React.FunctionComponent = () => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const showFilter = React.useCallback(\r\n () => showWithDrawer(),\r\n [showWithDrawer]\r\n );\r\n\r\n const [filter, editfilter, save] = useTradeByProductsReportFilter();\r\n const { getString } = React.useContext(LocalizationContext);\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\nconst TradesByProductsFilterEditor: React.FunctionComponent = () => {\r\n const [filter, editFilter, save] = useTradeByProductsReportFilter();\r\n return (\r\n \r\n );\r\n};\r\n","import { User } from \"../../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../../core/http/httpThunks\";\r\nimport { TradeByProductsReportFilter } from \"../types\";\r\n\r\nexport const getTradeByProductsReport = (\r\n user: User,\r\n filter: TradeByProductsReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/gettradebyprodreport\",\r\n params: {\r\n userid: user.userId,\r\n datefrom: filter.datefrom,\r\n dateto: filter.dateto,\r\n },\r\n });\r\n};\r\n\r\nexport default getTradeByProductsReport;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadTradeByProductsReport } from \"../thunks/downloadReport\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\n\r\nexport const useTradeByProductsReportDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.exchbusiness.tradeByProducts.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadTradeByProductsReport()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { getTradeByProductsReport } from \"../api/getTradeByProductsReport\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../tradeByProductsDataSlice\";\r\n\r\nexport const downloadTradeByProductsReport = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.exchbusiness.tradeByProducts;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const ordersReport = await dispatch(getTradeByProductsReport(user, filter));\r\n if (ordersReport) {\r\n fileDownload(\r\n new Blob([ordersReport as any], { type: \"application/pdf\" }),\r\n \"TradeByProducts.pdf\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import { TradeByProductsReportFilter } from \"../types\";\r\nimport { User } from \"../../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../../core/util/functions\";\r\n\r\nexport const getTradeByProductsExcel = (\r\n user: User,\r\n filter: TradeByProductsReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/gettradebyprodxls\",\r\n params: {\r\n userid: user.userId,\r\n datefrom: filter.datefrom,\r\n dateto: filter.dateto,\r\n },\r\n });\r\n};\r\n\r\nexport default getTradeByProductsExcel;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadTradeByProductsExcel } from \"../thunks/downloadReportExcel\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\n\r\nexport const useTradeByProductsExcelDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.exchbusiness.tradeByProducts.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadTradeByProductsExcel()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { getTradeByProductsExcel } from \"../api/getTradeByProductsExcel\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../tradeByProductsDataSlice\";\r\n\r\nexport const downloadTradeByProductsExcel = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.exchbusiness.tradeByProducts;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const dailyTrading = await dispatch(getTradeByProductsExcel(user, filter));\r\n if (dailyTrading) {\r\n fileDownload(\r\n new Blob([dailyTrading as any], {\r\n type: \"application/vnd.openxmlformat\",\r\n }),\r\n \"TradeByProducts.xlsx\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import React from \"react\";\r\nimport { useTradeByProductsReportDownloader } from \"../../../../data/reports/exchbusiness/tradeByProducts/hooks/useTradeByProductsReportDownloader\";\r\nimport { useTradeByProductsExcelDownloader } from \"../../../../data/reports/exchbusiness/tradeByProducts/hooks/useTradeByProductsExcelDownloader\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport ExcelIcon from \"@material-ui/icons/TableChartOutlined\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../../components/common/CustomTooltip\";\r\n\r\nexport const DownloadButton: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useTradeByProductsReportDownloader();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const DownloadExcelButton: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useTradeByProductsExcelDownloader();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport {\r\n Grid,\r\n CardContent,\r\n CardHeader,\r\n Card,\r\n Divider,\r\n} from \"@material-ui/core\";\r\nimport { TradeByProductsReportTable } from \"./TradeByProductsReportTable\";\r\nimport { usePageStyles } from \"../../../pageStyles\";\r\nimport { PageComponent } from \"../../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../../components/common/PageTitle\";\r\nimport { TradeByProductsReportFilter } from \"./TradeByProductsReportFilter\";\r\nimport { DownloadButton, DownloadExcelButton } from \"./DownloadButton\";\r\n\r\nconst TradeByProductsReport: PageComponent = ({ userAccessRights }) => {\r\n const pageStyles = usePageStyles();\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n }\r\n action={}\r\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 TradeByProductsReportActions: React.FunctionComponent = () => (\r\n \r\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 TradeByProductsReport;\r\n","import TradeByProductsReport from \"./TradeByProductsReport\";\r\nimport { NavigationItem } from \"../../../../core/navigation/types\";\r\nimport { tradeByProductsLocation } from \"./Locations\";\r\n\r\nexport const tradeByProductsReportComponents: NavigationItem[] = [\r\n {\r\n Component: TradeByProductsReport,\r\n isMenuItem: true,\r\n path: tradeByProductsLocation,\r\n },\r\n];\r\n","export const tradeByProductsLocation = \"/reports/exchbusiness/tradebyproducts\";\r\n","import { TradeByClientsReportData, TradeByClientsReportFilter } from \"../types\";\r\nimport { User } from \"../../../../auth/types\";\r\nimport { webApi } from \"../../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../../core/util/functions\";\r\n\r\nconst getTradeByClinetsData = (\r\n user: User,\r\n filter: TradeByClientsReportFilter\r\n) => {\r\n return webApi({\r\n method: \"GET\",\r\n url: \"reporting/getturnoverbyclilist\",\r\n params: {\r\n userid: user.userId,\r\n datefrom: getParamsDateString(filter.datefrom),\r\n dateto: getParamsDateString(filter.dateto),\r\n clientId: filter?.clientId,\r\n cliStatus: filter?.cliStatus,\r\n },\r\n });\r\n};\r\n\r\nexport default getTradeByClinetsData;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { loadReport } from \"../thunks/loadReportData\";\r\nimport { TradeByClientsReportData } from \"../types\";\r\n\r\nexport const useTradeByClientsReportData = () => {\r\n const data = useSelector(\r\n (s) => s.data.reports.exchbusiness.tradeByClients.data\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadData = React.useCallback(() => dispatch(loadReport()), [\r\n dispatch,\r\n ]);\r\n\r\n return [data, dispatchLoadData] as [typeof data, typeof dispatchLoadData];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { setData } from \"../tradeByClientsDataSlice\";\r\nimport getTradeByClientsDataApi from \"../api/getTradeByClientsData\";\r\n\r\nexport const loadReport = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const user = store.data.auth.current.user;\r\n const { filter } = store.ux.reports.exchbusiness.tradeByClients;\r\n\r\n const pagedTrades = await dispatch(getTradeByClientsDataApi(user, filter));\r\n\r\n dispatch(setData(pagedTrades || []));\r\n};\r\n","import React from \"react\";\r\nimport { useTradeByClientsColumns } from \"./useTradeByClientsReportColumns\";\r\nimport { AccessRights } from \"../../../../core/navigation/types\";\r\nimport { TradeByClientsReportData } from \"../../../../data/reports/exchbusiness/tradeByClients/types\";\r\nimport { ControledTable } from \"../../../components/common/ControledTable\";\r\nimport { useTradeByClientsReportData } from \"../../../../data/reports/exchbusiness/tradeByClients/hooks/useTradeByClientsReportData\";\r\nimport { useTradeByClientsReportIndex } from \"../../../../data/reports/exchbusiness/tradeByClients/hooks/useTradeByClientsReportIndex\";\r\n\r\nexport interface TradeByClientsTableProps {\r\n userAccessRights: AccessRights;\r\n}\r\n\r\ntype TradeByClientsTablePropsType = TradeByClientsTableProps;\r\n\r\nexport const TradeByClientsReportTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n ...tableProps\r\n}) => {\r\n const columns = useTradeByClientsColumns();\r\n const [data, load] = useTradeByClientsReportData();\r\n const [index, setIndex] = useTradeByClientsReportIndex();\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={load}\r\n onPageIndexChange={setIndex}\r\n pageIndex={index}\r\n immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default TradeByClientsReportTable;\r\n","import { TradeByClientsReportData } from \"../../../../data/reports/exchbusiness/tradeByClients/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\n\r\nexport const useTradeByClientsColumns = () => {\r\n const { getString, getFormatedNumberString } = React.useContext(\r\n LocalizationContext\r\n );\r\n\r\n return React.useMemo(\r\n () => [\r\n {\r\n title: getString(\"exchClient\"),\r\n field: \"client\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"exchTurnoverValue\"),\r\n render: (row) => `${getFormatedNumberString(row.turnoverValue, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"exchCommissionValue\"),\r\n render: (row) =>\r\n `${getFormatedNumberString(row.commissionValue, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"exchTurnoverParticipation\"),\r\n render: (row) =>\r\n `${getFormatedNumberString(row.turnoverParticipations, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"exchCommissionParticipation\"),\r\n render: (row) =>\r\n `${getFormatedNumberString(row.commissionParticipations, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n ],\r\n [getString, getFormatedNumberString]\r\n ) as Column[];\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { setIndex } from \"../tradeByClientsUXSlice\";\r\nimport { PageIndex } from \"../../../../models\";\r\n\r\nexport const useTradeByClientsReportIndex = () => {\r\n const pageIndex = useSelector(\r\n (s) => s.ux.reports.exchbusiness.tradeByClients.index\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetIndex = React.useCallback(\r\n (index: PageIndex) => dispatch(setIndex(index)),\r\n [dispatch]\r\n );\r\n\r\n return [pageIndex, dispatchSetIndex] as [\r\n typeof pageIndex,\r\n typeof dispatchSetIndex\r\n ];\r\n};\r\n","import { setFilter } from \"../tradeByClientsUXSlice\";\r\nimport { setData } from \"../tradeByClientsDataSlice\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport React from \"react\";\r\nimport { TradeByClientsReportFilter } from \"../types\";\r\nimport { useCopiedState } from \"../../../../../core/util/hooks\";\r\n\r\nexport const useTradeByClientsReportFilter = () => {\r\n const storeFilter = useSelector(\r\n (store) => store.ux.reports.exchbusiness.tradeByClients.filter\r\n );\r\n const [filter, editFilter] = useCopiedState(\r\n storeFilter\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetFilter = React.useCallback(() => {\r\n dispatch(setFilter(filter!));\r\n dispatch(setData());\r\n }, [dispatch, filter]);\r\n\r\n return [filter, editFilter, dispatchSetFilter] as [\r\n typeof filter,\r\n typeof editFilter,\r\n typeof dispatchSetFilter\r\n ];\r\n};\r\n","import { useSelector } from \"react-redux\";\r\nimport { StoreType } from \"../../../core/store/reducers\";\r\nimport { ActStatuses } from \"../../models\";\r\n\r\n// const renderLabel = (item: ActStatuses) => `${item.ftDescr} `;\r\n\r\nconst renderLabel = (item?: ActStatuses) => (item ? item.ftDescr : \"\");\r\n\r\n\r\nexport const useActStatusClinetsTypes = () => {\r\n const actstatusClients = useSelector(\r\n (store) => store.data.initialData.actStatuses\r\n );\r\n\r\n return [actstatusClients, renderLabel] as [typeof actstatusClients, typeof renderLabel];\r\n};\r\n","import React from \"react\";\r\nimport { useActStatusClinetsTypes } from \"../../../data/initialData/hooks/useActStatusClients\";\r\nimport { ActStatuses } from \"../../../data/models\";\r\nimport { AutocompleteSelectType, AutocompleteSelect } from \"./AutocompleteSelect\";\r\n\r\n\r\ntype ActStatusClientsPropsType = Omit, \"data\" | \"getLabel\">;\r\n\r\nexport const ActStatusClientsSelect: React.FunctionComponent = (props) => {\r\n\tconst [actStatusClinet, renderLabel] = useActStatusClinetsTypes();\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\tdata={actStatusClinet}\r\n\t\t\tgetLabel={renderLabel}\r\n\t\t\t{...(props as any)}\r\n\t\t/>\r\n\t);\r\n};\r\n\r\n\r\n","import React from \"react\";\r\nimport { Grid, Paper, Button, Typography } from \"@material-ui/core\";\r\nimport { DateInput } from \"../../../components/common/DateInput\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { TradeByClientsReportFilter } from \"../../../../data/reports/exchbusiness/tradeByClients/types\";\r\nimport { useAuth } from \"../../../../data/auth/hooks\";\r\nimport { DisplayDrawerContext } from \"../../../../layout/DisplayDrawerContext\";\r\nimport { ClientSelect } from \"../../../components/listing/ClientSelect\";\r\nimport { ActStatusClientsSelect } from \"../../../components/common/ActStatusClients\";\r\n\r\ninterface TradeByClientsFilterEditorProps {\r\n filter?: TradeByClientsReportFilter;\r\n editFilter: (prop: keyof TradeByClientsReportFilter, value: any) => void;\r\n save: () => void;\r\n}\r\n\r\nexport const TradeByClientsFilterEditor: React.FunctionComponent = ({\r\n filter,\r\n editFilter,\r\n save,\r\n}) => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const { getString } = React.useContext(LocalizationContext);\r\n\r\n const handleChange = React.useCallback(\r\n (event: React.ChangeEvent) => {\r\n editFilter(event.target.name as any, event.target.value);\r\n },\r\n [editFilter]\r\n );\r\n\r\n if (!filter) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n editFilter(\"datefrom\", date?.toISOString())}\r\n />\r\n \r\n \r\n editFilter(\"dateto\", date?.toISOString())}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n client.cliId === filter.clientId}\r\n\t\t\t\t\t\t\t\tonChangeItem={(client) => {editFilter(\"clientId\", client ? client.cliId :undefined);}}\r\n />\r\n \r\n \r\n\r\n\r\n \r\n\t\t\t\t\t\t status.ftValue === filter.cliStatus}\r\n\t\t\t\t\t\t\tonChangeItem={status => {\r\n\t\t\t\t\t\t\t\teditFilter(\"cliStatus\", status?.ftValue);\r\n\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t/> \r\n \r\n\r\n \r\n \r\n {\r\n save();\r\n showWithDrawer(undefined);\r\n }}\r\n >\r\n {getString(\"orderFilterConfirm\")}\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport { IconButton, Grid } from \"@material-ui/core\";\r\nimport FilterIcon from \"@material-ui/icons/FilterListOutlined\";\r\nimport { DisplayDrawerContext } from \"../../../../layout/DisplayDrawerContext\";\r\nimport { useTradeByClientsReportFilter } from \"../../../../data/reports/exchbusiness/tradeByClients/hooks/useTradeByClientsReportFilter\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { CustomTooltip } from \"../../../components/common/CustomTooltip\";\r\nimport { TradeByClientsFilterEditor } from \"./TradeByClientsEditor\";\r\n\r\nexport const TradeByClientsReportFilter: React.FunctionComponent = () => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const showFilter = React.useCallback(\r\n () => showWithDrawer(),\r\n [showWithDrawer]\r\n );\r\n\r\n const [filter, editfilter, save] = useTradeByClientsReportFilter();\r\n const { getString } = React.useContext(LocalizationContext);\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\nconst TradesByClientsFilterEditor: React.FunctionComponent = () => {\r\n const [filter, editFilter, save] = useTradeByClientsReportFilter();\r\n return (\r\n \r\n );\r\n};\r\n","import { User } from \"../../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../../core/http/httpThunks\";\r\nimport { TradeByClientsReportFilter } from \"../types\";\r\n\r\nexport const getTradeByClientsReport = (\r\n user: User,\r\n filter: TradeByClientsReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getturnoverbyclireport\",\r\n params: {\r\n userid: user.userId,\r\n datefrom: filter.datefrom,\r\n dateto: filter.dateto,\r\n clientId: filter?.clientId,\r\n cliStatus: filter?.cliStatus,\r\n },\r\n });\r\n};\r\n\r\nexport default getTradeByClientsReport;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadTradeByClientsReport } from \"../thunks/downloadReport\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\n\r\nexport const useTradeByClientsReportDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.exchbusiness.tradeByClients.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadTradeByClientsReport()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { getTradeByClientsReport } from \"../api/getTradeByClientsReport\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../tradeByClientsDataSlice\";\r\n\r\nexport const downloadTradeByClientsReport = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.exchbusiness.tradeByClients;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const ordersReport = await dispatch(getTradeByClientsReport(user, filter));\r\n if (ordersReport) {\r\n fileDownload(\r\n new Blob([ordersReport as any], { type: \"application/pdf\" }),\r\n \"TradeByClients.pdf\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import { TradeByClientsReportFilter } from \"../types\";\r\nimport { User } from \"../../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../../core/util/functions\";\r\n\r\nexport const getTradeByClientsExcel = (\r\n user: User,\r\n filter: TradeByClientsReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getturnoverbyclixls\",\r\n params: {\r\n userid: user.userId,\r\n datefrom: filter.datefrom,\r\n dateto: filter.dateto,\r\n clientId: filter?.clientId,\r\n cliStatus: filter?.cliStatus,\r\n },\r\n });\r\n};\r\n\r\nexport default getTradeByClientsExcel;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadTradeByClientsExcel } from \"../thunks/downloadReportExcel\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\n\r\nexport const useTradeByclientsExcelDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.exchbusiness.tradeByClients.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadTradeByClientsExcel()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { getTradeByClientsExcel } from \"../api/getTradeByClientsExcel\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../tradeByClientsDataSlice\";\r\n\r\nexport const downloadTradeByClientsExcel = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.exchbusiness.tradeByClients;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const dailyTrading = await dispatch(getTradeByClientsExcel(user, filter));\r\n if (dailyTrading) {\r\n fileDownload(\r\n new Blob([dailyTrading as any], {\r\n type: \"application/vnd.openxmlformat\",\r\n }),\r\n \"TradeByClients.xlsx\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import React from \"react\";\r\nimport { useTradeByClientsReportDownloader } from \"../../../../data/reports/exchbusiness/tradeByClients/hooks/useTradeByClientsReportDownloader\";\r\nimport { useTradeByclientsExcelDownloader } from \"../../../../data/reports/exchbusiness/tradeByClients/hooks/useTradeByClientsExcelDownloader\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport ExcelIcon from \"@material-ui/icons/TableChartOutlined\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../../components/common/CustomTooltip\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\n\r\nexport const DownloadButton: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useTradeByClientsReportDownloader();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n return (\r\n\t\t<>\r\n \r\n \r\n \r\n \r\n \r\n\t\t{fetchState.type !== \"not-started\" ? getString(\"pleaseWait\") : null}\r\n\t\t\r\n );\r\n};\r\n\r\nexport const DownloadExcelButton: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useTradeByclientsExcelDownloader();\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n);\r\n};\r\n","import React from \"react\";\r\nimport {\r\n Grid,\r\n CardContent,\r\n CardHeader,\r\n Card,\r\n Divider,\r\n} from \"@material-ui/core\";\r\nimport { TradeByClientsReportTable } from \"./TradeByClientsReportTable\";\r\nimport { usePageStyles } from \"../../../pageStyles\";\r\nimport { PageComponent } from \"../../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../../components/common/PageTitle\";\r\nimport { TradeByClientsReportFilter } from \"./TradeByClientsReportFilter\";\r\nimport { DownloadButton, DownloadExcelButton } from \"./DownloadButton\";\r\n\r\nconst TradeByClientsReport: PageComponent = ({ userAccessRights }) => {\r\n const pageStyles = usePageStyles();\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n }\r\n action={}\r\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 TradeByClientsReportActions: React.FunctionComponent = () => (\r\n \r\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 TradeByClientsReport;\r\n","import TradeByClientsReport from \"./TradeByClientsReport\";\r\nimport { NavigationItem } from \"../../../../core/navigation/types\";\r\nimport { tradeByClientsLocation } from \"./Locations\";\r\n\r\nexport const tradeByClientsReportComponents: NavigationItem[] = [\r\n {\r\n Component: TradeByClientsReport,\r\n isMenuItem: true,\r\n path: tradeByClientsLocation,\r\n },\r\n];\r\n","export const tradeByClientsLocation = \"/reports/exchbusiness/turnoverclients\";\r\n","import {\r\n TurnoverByBrokersReportData,\r\n TurnoverByBrokersReportFilter,\r\n} from \"../types\";\r\nimport { User } from \"../../../../auth/types\";\r\nimport { webApi } from \"../../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../../core/util/functions\";\r\n\r\nconst getTradeByBrokersData = (\r\n user: User,\r\n filter: TurnoverByBrokersReportFilter\r\n) => {\r\n return webApi({\r\n method: \"GET\",\r\n url: \"reporting/getturnoverbybroklist\",\r\n params: {\r\n userid: user.userId,\r\n datefrom: getParamsDateString(filter.datefrom),\r\n dateto: getParamsDateString(filter.dateto),\r\n brokerId: filter?.brokerId,\r\n cliStatus: filter?.cliStatus, \r\n },\r\n });\r\n};\r\n\r\nexport default getTradeByBrokersData;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { loadReport } from \"../thunks/loadReportData\";\r\nimport { TurnoverByBrokersReportData } from \"../types\";\r\n\r\nexport const useTradeByBrokersReportData = () => {\r\n const data = useSelector<\r\n StoreType,\r\n TurnoverByBrokersReportData[] | undefined\r\n >((s) => s.data.reports.exchbusiness.tradeByBrokers.data);\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadData = React.useCallback(() => dispatch(loadReport()), [\r\n dispatch,\r\n ]);\r\n\r\n return [data, dispatchLoadData] as [typeof data, typeof dispatchLoadData];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { setData } from \"../tradeByBrokersDataSlice\";\r\nimport getTradeByBrokersDataApi from \"../api/getTradeByBrokersData\";\r\n\r\nexport const loadReport = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const user = store.data.auth.current.user;\r\n const { filter } = store.ux.reports.exchbusiness.tradeByBrokers;\r\n\r\n const pagedTrades = await dispatch(getTradeByBrokersDataApi(user, filter));\r\n\r\n dispatch(setData(pagedTrades || []));\r\n};\r\n","import React from \"react\";\r\nimport { useTradeByBrokersColumns } from \"./useTradeByBrokersReportColumns\";\r\nimport { AccessRights } from \"../../../../core/navigation/types\";\r\nimport { TurnoverByBrokersReportData } from \"../../../../data/reports/exchbusiness/tradeByBrokers/types\";\r\nimport { ControledTable } from \"../../../components/common/ControledTable\";\r\nimport { useTradeByBrokersReportData } from \"../../../../data/reports/exchbusiness/tradeByBrokers/hooks/useTradeByBrokersReportData\";\r\nimport { useTradeByBrokersReportIndex } from \"../../../../data/reports/exchbusiness/tradeByBrokers/hooks/useTradeByBrokersReportIndex\";\r\n\r\nexport interface TradeByBrokersTableProps {\r\n userAccessRights: AccessRights;\r\n}\r\n\r\ntype TradeByBrokersTablePropsType = TradeByBrokersTableProps;\r\n\r\nexport const TradeByBrokersReportTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n ...tableProps\r\n}) => {\r\n const columns = useTradeByBrokersColumns();\r\n const [data, load] = useTradeByBrokersReportData();\r\n const [index, setIndex] = useTradeByBrokersReportIndex();\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={load}\r\n onPageIndexChange={setIndex}\r\n pageIndex={index}\r\n immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default TradeByBrokersReportTable;\r\n","import { TurnoverByBrokersReportData } from \"../../../../data/reports/exchbusiness/tradeByBrokers/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\n\r\nexport const useTradeByBrokersColumns = () => {\r\n const { getString, getFormatedNumberString } = React.useContext(\r\n LocalizationContext\r\n );\r\n\r\n return React.useMemo(\r\n () => [\r\n {\r\n title: getString(\"exchDate\"),\r\n field: \"date\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"exchProduct\"),\r\n field: \"product\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"exchSellerBroker\"),\r\n field: \"brokerSeller\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"exchSeller\"),\r\n field: \"seller\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"exchBuyerBroker\"),\r\n field: \"brokerBuyer\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"exchBuyer\"),\r\n field: \"buyer\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"exchQuantity\"),\r\n render: (row) => `${getFormatedNumberString(row.quantity)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"exchPrice\"),\r\n render: (row) => `${getFormatedNumberString(row.price, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"exchAmount\"),\r\n render: (row) => `${getFormatedNumberString(row.amount, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n ],\r\n [getString, getFormatedNumberString]\r\n ) as Column[];\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { setIndex } from \"../tradeByBrokersUXSlice\";\r\nimport { PageIndex } from \"../../../../models\";\r\n\r\nexport const useTradeByBrokersReportIndex = () => {\r\n const pageIndex = useSelector(\r\n (s) => s.ux.reports.exchbusiness.tradeByBrokers.index\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetIndex = React.useCallback(\r\n (index: PageIndex) => dispatch(setIndex(index)),\r\n [dispatch]\r\n );\r\n\r\n return [pageIndex, dispatchSetIndex] as [\r\n typeof pageIndex,\r\n typeof dispatchSetIndex\r\n ];\r\n};\r\n","import { setFilter } from \"../tradeByBrokersUXSlice\";\r\nimport { setData } from \"../tradeByBrokersDataSlice\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport React from \"react\";\r\nimport { TurnoverByBrokersReportFilter } from \"../types\";\r\nimport { useCopiedState } from \"../../../../../core/util/hooks\";\r\n\r\nexport const useTradeByBrokersReportFilter = () => {\r\n const storeFilter = useSelector(\r\n (store) => store.ux.reports.exchbusiness.tradeByBrokers.filter\r\n );\r\n const [filter, editFilter] = useCopiedState(\r\n storeFilter\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetFilter = React.useCallback(() => {\r\n dispatch(setFilter(filter!));\r\n dispatch(setData());\r\n }, [dispatch, filter]);\r\n\r\n return [filter, editFilter, dispatchSetFilter] as [\r\n typeof filter,\r\n typeof editFilter,\r\n typeof dispatchSetFilter\r\n ];\r\n};\r\n","import React from \"react\";\r\nimport { Grid, Paper, Button, Typography } from \"@material-ui/core\";\r\nimport { DateInput } from \"../../../components/common/DateInput\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { TurnoverByBrokersReportFilter } from \"../../../../data/reports/exchbusiness/tradeByBrokers/types\";\r\nimport { useAuth } from \"../../../../data/auth/hooks\";\r\nimport { DisplayDrawerContext } from \"../../../../layout/DisplayDrawerContext\";\r\nimport { ActStatusClientsSelect } from \"../../../components/common/ActStatusClients\";\r\nimport { EmployeeSelect } from \"../../../components/listing/EmployeeSelect\";\r\n\r\ninterface TradeByBrokersFilterEditorProps {\r\n filter?: TurnoverByBrokersReportFilter;\r\n editFilter: (prop: keyof TurnoverByBrokersReportFilter, value: any) => void;\r\n save: () => void;\r\n}\r\n\r\nexport const TradeByBrokersFilterEditor: React.FunctionComponent = ({\r\n filter,\r\n editFilter,\r\n save,\r\n}) => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const { getString } = React.useContext(LocalizationContext);\r\n\r\n const handleChange = React.useCallback(\r\n (event: React.ChangeEvent) => {\r\n editFilter(event.target.name as any, event.target.value);\r\n },\r\n [editFilter]\r\n );\r\n\r\n if (!filter) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n editFilter(\"datefrom\", date?.toISOString())}\r\n />\r\n \r\n \r\n editFilter(\"dateto\", date?.toISOString())}\r\n />\r\n \r\n \r\n\r\n{/* \r\n \r\n client.cliId === filter.clientId}\r\n\t\t\t\t\t\t\t\tonChangeItem={(client) => {editFilter(\"clientId\", client ? client.cliId :undefined);}}\r\n />\r\n \r\n */}\r\n\r\n \r\n\t\t\t\t\t\t employee.empId === filter?.brokerId}\r\n\t\t\t\t\t\t\tonChangeItem={(employee) => {\teditFilter(\"brokerId\", employee ? employee.empId : undefined);\t}}\r\n />\r\n\t\t\t\t\t\r\n\r\n \r\n\t\t\t\t\t\t status.ftValue === filter.cliStatus}\r\n\t\t\t\t\t\t\tonChangeItem={status => {\r\n\t\t\t\t\t\t\t\teditFilter(\"cliStatus\", status?.ftValue);\r\n\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t/> \r\n \r\n\r\n\r\n \r\n \r\n {\r\n save();\r\n showWithDrawer(undefined);\r\n }}\r\n >\r\n {getString(\"orderFilterConfirm\")}\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport { IconButton, Grid } from \"@material-ui/core\";\r\nimport FilterIcon from \"@material-ui/icons/FilterListOutlined\";\r\nimport { DisplayDrawerContext } from \"../../../../layout/DisplayDrawerContext\";\r\nimport { useTradeByBrokersReportFilter } from \"../../../../data/reports/exchbusiness/tradeByBrokers/hooks/useTradeByBrokersReportFilter\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { CustomTooltip } from \"../../../components/common/CustomTooltip\";\r\nimport { TradeByBrokersFilterEditor } from \"./TradeByBrokersEditor\";\r\n\r\nexport const TradeByBrokersReportFilter: React.FunctionComponent = () => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const showFilter = React.useCallback(\r\n () => showWithDrawer(),\r\n [showWithDrawer]\r\n );\r\n\r\n const [filter, editfilter, save] = useTradeByBrokersReportFilter();\r\n const { getString } = React.useContext(LocalizationContext);\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\nconst TradesByBrokersFilterEditor: React.FunctionComponent = () => {\r\n const [filter, editFilter, save] = useTradeByBrokersReportFilter();\r\n return (\r\n \r\n );\r\n};\r\n","import { User } from \"../../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../../core/http/httpThunks\";\r\nimport { TurnoverByBrokersReportFilter } from \"../types\";\r\n\r\nexport const getTradeByBrokersReport = (\r\n user: User,\r\n filter: TurnoverByBrokersReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getturnoverbybrokreport\",\r\n params: {\r\n userid: user.userId,\r\n datefrom: filter.datefrom,\r\n dateto: filter.dateto,\r\n brokerId: filter?.brokerId,\r\n cliStatus: filter?.cliStatus, \r\n },\r\n });\r\n};\r\n\r\nexport default getTradeByBrokersReport;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadTradeByBrokersReport } from \"../thunks/downloadReport\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\n\r\nexport const useTradeByBrokersReportDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.exchbusiness.tradeByBrokers.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadTradeByBrokersReport()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { getTradeByBrokersReport } from \"../api/getTradeByBrokersReport\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../tradeByBrokersDataSlice\";\r\n\r\nexport const downloadTradeByBrokersReport = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.exchbusiness.tradeByBrokers;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const ordersReport = await dispatch(getTradeByBrokersReport(user, filter));\r\n if (ordersReport) {\r\n fileDownload(\r\n new Blob([ordersReport as any], { type: \"application/pdf\" }),\r\n \"TradeByBrokers.pdf\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import { TurnoverByBrokersReportFilter } from \"../types\";\r\nimport { User } from \"../../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../../core/util/functions\";\r\n\r\nexport const getTradeByBrokersExcel = (\r\n user: User,\r\n filter: TurnoverByBrokersReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getturnoverbybrokxls\",\r\n params: {\r\n userid: user.userId,\r\n datefrom: filter.datefrom,\r\n dateto: filter.dateto,\r\n brokerId: filter?.brokerId,\r\n cliStatus: filter?.cliStatus, \r\n },\r\n });\r\n};\r\n\r\nexport default getTradeByBrokersExcel;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadTradeByBrokersExcel } from \"../thunks/downloadReportExcel\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\n\r\nexport const useTradeByBrokersExcelDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.exchbusiness.tradeByBrokers.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadTradeByBrokersExcel()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { getTradeByBrokersExcel } from \"../api/getTradeByBrokersExcel\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../tradeByBrokersDataSlice\";\r\n\r\nexport const downloadTradeByBrokersExcel = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.exchbusiness.tradeByBrokers;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const dailyTrading = await dispatch(getTradeByBrokersExcel(user, filter));\r\n if (dailyTrading) {\r\n fileDownload(\r\n new Blob([dailyTrading as any], {\r\n type: \"application/vnd.openxmlformat\",\r\n }),\r\n \"TradeByBrokers.xlsx\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import React from \"react\";\r\nimport { useTradeByBrokersReportDownloader } from \"../../../../data/reports/exchbusiness/tradeByBrokers/hooks/useTradeByBrokersReportDownloader\";\r\nimport { useTradeByBrokersExcelDownloader } from \"../../../../data/reports/exchbusiness/tradeByBrokers/hooks/useTradeByBrokersExcelDownloader\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport ExcelIcon from \"@material-ui/icons/TableChartOutlined\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../../components/common/CustomTooltip\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\n\r\nexport const DownloadButton: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useTradeByBrokersReportDownloader();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n return (\r\n\t\t<>\r\n \r\n \r\n \r\n \r\n \r\n\t\t{fetchState.type !== \"not-started\" ? getString(\"pleaseWait\") : null}\r\n\t\t\r\n );\r\n};\r\n\r\nexport const DownloadExcelButton: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useTradeByBrokersExcelDownloader();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport {\r\n Grid,\r\n CardContent,\r\n CardHeader,\r\n Card,\r\n Divider,\r\n} from \"@material-ui/core\";\r\nimport { TradeByBrokersReportTable } from \"./TradeByBrokersReportTable\";\r\nimport { usePageStyles } from \"../../../pageStyles\";\r\nimport { PageComponent } from \"../../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../../components/common/PageTitle\";\r\nimport { TradeByBrokersReportFilter } from \"./TradeByBrokersReportFilter\";\r\nimport { DownloadButton, DownloadExcelButton } from \"./DownloadButton\";\r\n\r\nconst TradeByBrokersReport: PageComponent = ({ userAccessRights }) => {\r\n const pageStyles = usePageStyles();\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n }\r\n action={}\r\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 TradeByBrokersReportActions: React.FunctionComponent = () => (\r\n \r\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 TradeByBrokersReport;\r\n","import TradeByBrokersReport from \"./TradeByBrokersReport\";\r\nimport { NavigationItem } from \"../../../../core/navigation/types\";\r\nimport { tradeByBrokersLocation } from \"./Locations\";\r\n\r\nexport const tradeByBrokersReportComponents: NavigationItem[] = [\r\n {\r\n Component: TradeByBrokersReport,\r\n isMenuItem: true,\r\n path: tradeByBrokersLocation,\r\n },\r\n];\r\n","export const tradeByBrokersLocation = \"/reports/exchbusiness/turnoverbrokers\";\r\n","import { WeightedPricesReportData, WeightedPricesReportFilter } from \"../types\";\r\nimport { User } from \"../../../../auth/types\";\r\nimport { webApi } from \"../../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../../core/util/functions\";\r\n\r\nconst getWeightedPriceData = (\r\n user: User,\r\n filter: WeightedPricesReportFilter\r\n) => {\r\n return webApi({\r\n method: \"GET\",\r\n url: \"reporting/getweightedpricelist\",\r\n params: {\r\n userid: user.userId,\r\n datefrom: getParamsDateString(filter.datefrom),\r\n dateto: getParamsDateString(filter.dateto),\r\n productid: filter.productid,\r\n },\r\n });\r\n};\r\n\r\nexport default getWeightedPriceData;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { loadReport } from \"../thunks/loadReportData\";\r\nimport { WeightedPricesReportData } from \"../types\";\r\n\r\nexport const useWeightedPriceReportData = () => {\r\n const data = useSelector(\r\n (s) => s.data.reports.exchbusiness.weightedPrice.data\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadData = React.useCallback(() => dispatch(loadReport()), [\r\n dispatch,\r\n ]);\r\n\r\n return [data, dispatchLoadData] as [typeof data, typeof dispatchLoadData];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { setData } from \"../weightedPriceDataSlice\";\r\nimport getWeightedPricesDataApi from \"../api/getWeightedPriceData\";\r\n\r\nexport const loadReport = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const user = store.data.auth.current.user;\r\n const { filter } = store.ux.reports.exchbusiness.weightedPrice;\r\n\r\n const pagedTrades = await dispatch(getWeightedPricesDataApi(user, filter));\r\n\r\n dispatch(setData(pagedTrades || []));\r\n};\r\n","import React from \"react\";\r\nimport { useWeightedPricesColumns } from \"./useWeightedPricesReportColumns\";\r\nimport { AccessRights } from \"../../../../core/navigation/types\";\r\nimport { WeightedPricesReportData } from \"../../../../data/reports/exchbusiness/weightedPrices/types\";\r\nimport { ControledTable } from \"../../../components/common/ControledTable\";\r\nimport { useWeightedPriceReportData } from \"../../../../data/reports/exchbusiness/weightedPrices/hooks/useWeightedPriceReportData\";\r\nimport { useWeightedPriceReportIndex } from \"../../../../data/reports/exchbusiness/weightedPrices/hooks/useWeightedPriceReportIndex\";\r\n\r\nexport interface WeightedPricesTableProps {\r\n userAccessRights: AccessRights;\r\n}\r\n\r\ntype WeightedPricesTablePropsType = WeightedPricesTableProps;\r\n\r\nexport const WeightedPricesReportTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n ...tableProps\r\n}) => {\r\n const columns = useWeightedPricesColumns();\r\n const [data, load] = useWeightedPriceReportData();\r\n const [index, setIndex] = useWeightedPriceReportIndex();\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={load}\r\n onPageIndexChange={setIndex}\r\n pageIndex={index}\r\n immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default WeightedPricesReportTable;\r\n","import { WeightedPricesReportData } from \"../../../../data/reports/exchbusiness/weightedPrices/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\n\r\nexport const useWeightedPricesColumns = () => {\r\n const { getString, getFormatedNumberString } = React.useContext(\r\n LocalizationContext\r\n );\r\n\r\n return React.useMemo(\r\n () => [\r\n {\r\n title: getString(\"exchProduct\"),\r\n field: \"product\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"exchQuantity\"),\r\n render: (row) => `${getFormatedNumberString(row.quantity)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"exchTurnoverRsd\"),\r\n render: (row) => `${getFormatedNumberString(row.turnoverRsd, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"exchTurnoverEur\"),\r\n render: (row) => `${getFormatedNumberString(row.turnoverEur, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"exchWeightedPriceRsd\"),\r\n render: (row) =>\r\n `${getFormatedNumberString(row.weightedPriceRsd, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"exchWeightedPriceEur\"),\r\n render: (row) =>\r\n `${getFormatedNumberString(row.weightedPriceEur, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n ],\r\n [getString, getFormatedNumberString]\r\n ) as Column[];\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { setIndex } from \"../weightedPriceUXSlice\";\r\nimport { PageIndex } from \"../../../../models\";\r\n\r\nexport const useWeightedPriceReportIndex = () => {\r\n const pageIndex = useSelector(\r\n (s) => s.ux.reports.exchbusiness.weightedPrice.index\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetIndex = React.useCallback(\r\n (index: PageIndex) => dispatch(setIndex(index)),\r\n [dispatch]\r\n );\r\n\r\n return [pageIndex, dispatchSetIndex] as [\r\n typeof pageIndex,\r\n typeof dispatchSetIndex\r\n ];\r\n};\r\n","import { setFilter } from \"../weightedPriceUXSlice\";\r\nimport { setData } from \"../weightedPriceDataSlice\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport React from \"react\";\r\nimport { WeightedPricesReportFilter } from \"../types\";\r\nimport { useCopiedState } from \"../../../../../core/util/hooks\";\r\n\r\nexport const useWeightPriceReportFilter = () => {\r\n const storeFilter = useSelector(\r\n (store) => store.ux.reports.exchbusiness.weightedPrice.filter\r\n );\r\n const [filter, editFilter] = useCopiedState(\r\n storeFilter\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetFilter = React.useCallback(() => {\r\n dispatch(setFilter(filter!));\r\n dispatch(setData());\r\n }, [dispatch, filter]);\r\n\r\n return [filter, editFilter, dispatchSetFilter] as [\r\n typeof filter,\r\n typeof editFilter,\r\n typeof dispatchSetFilter\r\n ];\r\n};\r\n","import React from \"react\";\r\nimport { Grid, Paper, Button, Typography } from \"@material-ui/core\";\r\nimport { DateInput } from \"../../../components/common/DateInput\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { WeightedPricesReportFilter } from \"../../../../data/reports/exchbusiness/weightedPrices/types\";\r\nimport { useAuth } from \"../../../../data/auth/hooks\";\r\nimport { DisplayDrawerContext } from \"../../../../layout/DisplayDrawerContext\";\r\nimport { NumberInput } from \"../../../components/common/NumberInput\";\r\nimport { ProductSelect } from \"../../../components/listing/ProductSelect\";\r\n\r\ninterface WeightedPricesFilterEditorProps {\r\n filter?: WeightedPricesReportFilter;\r\n editFilter: (prop: keyof WeightedPricesReportFilter, value: any) => void;\r\n save: () => void;\r\n}\r\n\r\nexport const WeightedPricesFilterEditor: React.FunctionComponent = ({\r\n filter,\r\n editFilter,\r\n save,\r\n}) => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const { getString } = React.useContext(LocalizationContext);\r\n\r\n const handleChange = React.useCallback(\r\n (event: React.ChangeEvent) => {\r\n editFilter(event.target.name as any, event.target.value);\r\n },\r\n [editFilter]\r\n );\r\n\r\n if (!filter) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n editFilter(\"datefrom\", date?.toISOString())}\r\n />\r\n \r\n \r\n editFilter(\"dateto\", date?.toISOString())}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n prod.prodId === filter.productid}\r\n onChangeItem={(prod) => {\r\n editFilter(\"productid\", prod ? prod.prodId : undefined);\r\n }}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n {\r\n save();\r\n showWithDrawer(undefined);\r\n }}\r\n >\r\n {getString(\"orderFilterConfirm\")}\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport { IconButton, Grid } from \"@material-ui/core\";\r\nimport FilterIcon from \"@material-ui/icons/FilterListOutlined\";\r\nimport { DisplayDrawerContext } from \"../../../../layout/DisplayDrawerContext\";\r\nimport { useWeightPriceReportFilter } from \"../../../../data/reports/exchbusiness/weightedPrices/hooks/useWeightedPriceReportFilter\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { CustomTooltip } from \"../../../components/common/CustomTooltip\";\r\nimport { WeightedPricesFilterEditor } from \"./WeightedPricesFilterEditor\";\r\n\r\nexport const WeightedPricesReportFilter: React.FunctionComponent = () => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const showFilter = React.useCallback(\r\n () => showWithDrawer(),\r\n [showWithDrawer]\r\n );\r\n\r\n const [filter, editfilter, save] = useWeightPriceReportFilter();\r\n const { getString } = React.useContext(LocalizationContext);\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\nconst WeightedPricesFiltersEditor: React.FunctionComponent = () => {\r\n const [filter, editFilter, save] = useWeightPriceReportFilter();\r\n return (\r\n \r\n );\r\n};\r\n","import { User } from \"../../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../../core/http/httpThunks\";\r\nimport { WeightedPricesReportFilter } from \"../types\";\r\n\r\nexport const getWeightedPriceReport = (\r\n user: User,\r\n filter: WeightedPricesReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getweightedpricereport\",\r\n params: {\r\n userid: user.userId,\r\n datefrom: filter.datefrom,\r\n dateto: filter.dateto,\r\n productid: filter.productid,\r\n },\r\n });\r\n};\r\n\r\nexport default getWeightedPriceReport;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadWeightedPriceReport } from \"../thunks/downloadReport\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\n\r\nexport const useWeightedPriceDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.exchbusiness.weightedPrice.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadWeightedPriceReport()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { getWeightedPriceReport } from \"../api/getWeightedPriceReport\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../weightedPriceDataSlice\";\r\n\r\nexport const downloadWeightedPriceReport = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.exchbusiness.weightedPrice;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const ordersReport = await dispatch(getWeightedPriceReport(user, filter));\r\n if (ordersReport) {\r\n fileDownload(\r\n new Blob([ordersReport as any], { type: \"application/pdf\" }),\r\n \"WeightedPrice.pdf\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import { WeightedPricesReportFilter } from \"../types\";\r\nimport { User } from \"../../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../../core/util/functions\";\r\n\r\nexport const getWeightedPriceExcel = (\r\n user: User,\r\n filter: WeightedPricesReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getweightedpricexls\",\r\n params: {\r\n userid: user.userId,\r\n datefrom: filter.datefrom,\r\n dateto: filter.dateto,\r\n productid: filter.productid,\r\n },\r\n });\r\n};\r\n\r\nexport default getWeightedPriceExcel;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadWeightedPricesExcel } from \"../thunks/downloadReportExcel\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\n\r\nexport const useWeightedPricesExcelDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.exchbusiness.weightedPrice.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadWeightedPricesExcel()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { getWeightedPriceExcel } from \"../api/getWeightedPriceExcel\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../weightedPriceDataSlice\";\r\n\r\nexport const downloadWeightedPricesExcel = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.exchbusiness.weightedPrice;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const dailyTrading = await dispatch(getWeightedPriceExcel(user, filter));\r\n if (dailyTrading) {\r\n fileDownload(\r\n new Blob([dailyTrading as any], {\r\n type: \"application/vnd.openxmlformat\",\r\n }),\r\n \"WeightedPrice.xlsx\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import React from \"react\";\r\nimport { useWeightedPriceDownloader } from \"../../../../data/reports/exchbusiness/weightedPrices/hooks/useWeightedPriceReportDownloader\";\r\nimport { useWeightedPricesExcelDownloader } from \"../../../../data/reports/exchbusiness/weightedPrices/hooks/useWeightedPriceExcelDownloader\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport ExcelIcon from \"@material-ui/icons/TableChartOutlined\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../../components/common/CustomTooltip\";\r\n\r\nexport const DownloadButton: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useWeightedPriceDownloader();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const DownloadExcelButton: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useWeightedPricesExcelDownloader();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport {\r\n Grid,\r\n CardContent,\r\n CardHeader,\r\n Card,\r\n Divider,\r\n} from \"@material-ui/core\";\r\nimport { WeightedPricesReportTable } from \"./WeightedPricesReportTable\";\r\nimport { usePageStyles } from \"../../../pageStyles\";\r\nimport { PageComponent } from \"../../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../../components/common/PageTitle\";\r\nimport { WeightedPricesReportFilter } from \"./WeightedPricesReportFilter\";\r\nimport { DownloadButton, DownloadExcelButton } from \"./DownloadButton\";\r\n\r\nconst WeightedPricesReport: PageComponent = ({ userAccessRights }) => {\r\n const pageStyles = usePageStyles();\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n }\r\n action={}\r\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 WeightedPricesReportActions: React.FunctionComponent = () => (\r\n \r\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 WeightedPricesReport;\r\n","import WeightedPricesReport from \"./WeightedPricesReport\";\r\nimport { NavigationItem } from \"../../../../core/navigation/types\";\r\nimport { weightedPricesLocation } from \"./Locations\";\r\n\r\nexport const weightedPricesReportComponents: NavigationItem[] = [\r\n {\r\n Component: WeightedPricesReport,\r\n isMenuItem: true,\r\n path: weightedPricesLocation,\r\n },\r\n];\r\n","export const weightedPricesLocation = \"/reports/exchbusiness/weightedprices\";\r\n","import {\r\n BusinessActivitiesReportData,\r\n BusinessActivitiesReportFilter,\r\n} from \"../types\";\r\nimport { User } from \"../../../../auth/types\";\r\nimport { webApi } from \"../../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../../core/util/functions\";\r\n\r\nconst getBusinessActivitiesData = (\r\n user: User,\r\n filter: BusinessActivitiesReportFilter\r\n) => {\r\n return webApi({\r\n method: \"GET\",\r\n url: \"reporting/getbusinessactivitieslist\",\r\n params: {\r\n userid: user.userId,\r\n datefrom: getParamsDateString(filter.datefrom),\r\n dateto: getParamsDateString(filter.dateto),\r\n },\r\n });\r\n};\r\n\r\nexport default getBusinessActivitiesData;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { loadReport } from \"../thunks/loadReportData\";\r\nimport { BusinessActivitiesReportData } from \"../types\";\r\n\r\nexport const useBusinessActivitiesReportData = () => {\r\n const data = useSelector<\r\n StoreType,\r\n BusinessActivitiesReportData[] | undefined\r\n >((s) => s.data.reports.exchbusiness.businessActivities.data);\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadData = React.useCallback(() => dispatch(loadReport()), [\r\n dispatch,\r\n ]);\r\n\r\n return [data, dispatchLoadData] as [typeof data, typeof dispatchLoadData];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { setData } from \"../businessActivitiesDataSlice\";\r\nimport getBusinesActivitiesDataApi from \"../api/getBusinessActivitiesData\";\r\n\r\nexport const loadReport = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const user = store.data.auth.current.user;\r\n const { filter } = store.ux.reports.exchbusiness.businessActivities;\r\n\r\n const pagedTrades = await dispatch(getBusinesActivitiesDataApi(user, filter));\r\n\r\n dispatch(setData(pagedTrades || []));\r\n};\r\n","import React from \"react\";\r\nimport { useBusinessActivitiesColumns } from \"./useBusinessActivitiesReportColumns\";\r\nimport { AccessRights } from \"../../../../core/navigation/types\";\r\nimport { BusinessActivitiesReportData } from \"../../../../data/reports/exchbusiness/businessActivities/types\";\r\nimport { ControledTable } from \"../../../components/common/ControledTable\";\r\nimport { useBusinessActivitiesReportData } from \"../../../../data/reports/exchbusiness/businessActivities/hooks/useBusinessActivitiesReportData\";\r\nimport { useBusinessActivitiesReportIndex } from \"../../../../data/reports/exchbusiness/businessActivities/hooks/useBusinessActivitiesReportIndex\";\r\n\r\nexport interface BusinessActivitiesTableProps {\r\n userAccessRights: AccessRights;\r\n}\r\n\r\ntype BusinessActivitiesTablePropsType = BusinessActivitiesTableProps;\r\n\r\nexport const BusinessActivitiesReportTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n ...tableProps\r\n}) => {\r\n const columns = useBusinessActivitiesColumns();\r\n const [data, load] = useBusinessActivitiesReportData();\r\n const [index, setIndex] = useBusinessActivitiesReportIndex();\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={load}\r\n onPageIndexChange={setIndex}\r\n pageIndex={index}\r\n immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default BusinessActivitiesReportTable;\r\n","import { BusinessActivitiesReportData } from \"../../../../data/reports/exchbusiness/businessActivities/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\n\r\nexport const useBusinessActivitiesColumns = () => {\r\n const { getString, getFormatedNumberString } = React.useContext(\r\n LocalizationContext\r\n );\r\n\r\n return React.useMemo(\r\n () => [\r\n {\r\n title: getString(\"exchDate\"),\r\n field: \"date\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"exchTradeNumber\"),\r\n field: \"tradeNumber\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"exchTurnoverValue\"),\r\n render: (row) => `${getFormatedNumberString(row.turnoverValue)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"exchBuyersCommission\"),\r\n render: (row) =>\r\n `${getFormatedNumberString(row.buyersCommission, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"exchSellersCommission\"),\r\n render: (row) =>\r\n `${getFormatedNumberString(row.sellersCommission, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"exchBuyerBroker\"),\r\n field: \"buyersBroker\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"exchSellerBroker\"),\r\n field: \"sellersBroker\",\r\n sorting: false,\r\n },\r\n ],\r\n [getString, getFormatedNumberString]\r\n ) as Column[];\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { setIndex } from \"../businessActivitiesUXSlice\";\r\nimport { PageIndex } from \"../../../../models\";\r\n\r\nexport const useBusinessActivitiesReportIndex = () => {\r\n const pageIndex = useSelector(\r\n (s) => s.ux.reports.exchbusiness.businessActivities.index\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetIndex = React.useCallback(\r\n (index: PageIndex) => dispatch(setIndex(index)),\r\n [dispatch]\r\n );\r\n\r\n return [pageIndex, dispatchSetIndex] as [\r\n typeof pageIndex,\r\n typeof dispatchSetIndex\r\n ];\r\n};\r\n","import { setFilter } from \"../businessActivitiesUXSlice\";\r\nimport { setData } from \"../businessActivitiesDataSlice\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport React from \"react\";\r\nimport { BusinessActivitiesReportFilter } from \"../types\";\r\nimport { useCopiedState } from \"../../../../../core/util/hooks\";\r\n\r\nexport const useBusinessActivitiesReportFilter = () => {\r\n const storeFilter = useSelector(\r\n (store) => store.ux.reports.exchbusiness.businessActivities.filter\r\n );\r\n const [filter, editFilter] = useCopiedState(\r\n storeFilter\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetFilter = React.useCallback(() => {\r\n dispatch(setFilter(filter!));\r\n dispatch(setData());\r\n }, [dispatch, filter]);\r\n\r\n return [filter, editFilter, dispatchSetFilter] as [\r\n typeof filter,\r\n typeof editFilter,\r\n typeof dispatchSetFilter\r\n ];\r\n};\r\n","import React from \"react\";\r\nimport { Grid, Paper, Button, Typography } from \"@material-ui/core\";\r\nimport { DateInput } from \"../../../components/common/DateInput\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { BusinessActivitiesReportFilter } from \"../../../../data/reports/exchbusiness/businessActivities/types\";\r\nimport { useAuth } from \"../../../../data/auth/hooks\";\r\nimport { DisplayDrawerContext } from \"../../../../layout/DisplayDrawerContext\";\r\n\r\ninterface BusinessActivitiesFilterEditorProps {\r\n filter?: BusinessActivitiesReportFilter;\r\n editFilter: (prop: keyof BusinessActivitiesReportFilter, value: any) => void;\r\n save: () => void;\r\n}\r\n\r\nexport const BusinessActivitiesFilterEditor: React.FunctionComponent = ({\r\n filter,\r\n editFilter,\r\n save,\r\n}) => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const { getString } = React.useContext(LocalizationContext);\r\n\r\n const handleChange = React.useCallback(\r\n (event: React.ChangeEvent) => {\r\n editFilter(event.target.name as any, event.target.value);\r\n },\r\n [editFilter]\r\n );\r\n\r\n if (!filter) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n editFilter(\"datefrom\", date?.toISOString())}\r\n />\r\n \r\n \r\n editFilter(\"dateto\", date?.toISOString())}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n {\r\n save();\r\n showWithDrawer(undefined);\r\n }}\r\n >\r\n {getString(\"orderFilterConfirm\")}\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport { IconButton, Grid } from \"@material-ui/core\";\r\nimport FilterIcon from \"@material-ui/icons/FilterListOutlined\";\r\nimport { DisplayDrawerContext } from \"../../../../layout/DisplayDrawerContext\";\r\nimport { useBusinessActivitiesReportFilter } from \"../../../../data/reports/exchbusiness/businessActivities/hooks/useBusinessActivitiesReportFilter\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { CustomTooltip } from \"../../../components/common/CustomTooltip\";\r\nimport { BusinessActivitiesFilterEditor } from \"./BusinessActivitiesEditor\";\r\n\r\nexport const BusinessActivitiesReportFilter: React.FunctionComponent = () => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const showFilter = React.useCallback(\r\n () => showWithDrawer(),\r\n [showWithDrawer]\r\n );\r\n\r\n const [filter, editfilter, save] = useBusinessActivitiesReportFilter();\r\n const { getString } = React.useContext(LocalizationContext);\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\nconst BusinessActivitiesFiltersEditor: React.FunctionComponent = () => {\r\n const [filter, editFilter, save] = useBusinessActivitiesReportFilter();\r\n return (\r\n \r\n );\r\n};\r\n","import { User } from \"../../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../../core/http/httpThunks\";\r\nimport { BusinessActivitiesReportFilter } from \"../types\";\r\n\r\nexport const getBusinessActivitiesReport = (\r\n user: User,\r\n filter: BusinessActivitiesReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getbusinessactivitiesreport\",\r\n params: {\r\n userid: user.userId,\r\n datefrom: filter.datefrom,\r\n dateto: filter.dateto,\r\n },\r\n });\r\n};\r\n\r\nexport default getBusinessActivitiesReport;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadBusinessActivitiesReport } from \"../thunks/downloadReport\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\n\r\nexport const useBusinessActivitiesReportDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) =>\r\n s.data.reports.exchbusiness.businessActivities.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadBusinessActivitiesReport()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { getBusinessActivitiesReport } from \"../api/getBusinessActivitiesReport\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../businessActivitiesDataSlice\";\r\n\r\nexport const downloadBusinessActivitiesReport = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.exchbusiness.businessActivities;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const ordersReport = await dispatch(\r\n getBusinessActivitiesReport(user, filter)\r\n );\r\n if (ordersReport) {\r\n fileDownload(\r\n new Blob([ordersReport as any], { type: \"application/pdf\" }),\r\n \"BusinessActivities.pdf\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import { BusinessActivitiesReportFilter } from \"../types\";\r\nimport { User } from \"../../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../../core/util/functions\";\r\n\r\nexport const getBusinesActivitiesExcel = (\r\n user: User,\r\n filter: BusinessActivitiesReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getbusinessactivitiesxls\",\r\n params: {\r\n userid: user.userId,\r\n datefrom: filter.datefrom,\r\n dateto: filter.dateto,\r\n },\r\n });\r\n};\r\n\r\nexport default getBusinesActivitiesExcel;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadBusinessActivitiesExcel } from \"../thunks/downloadReportExcel\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\n\r\nexport const useBusinessActivitiesExcelDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) =>\r\n s.data.reports.exchbusiness.businessActivities.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadBusinessActivitiesExcel()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { getBusinesActivitiesExcel } from \"../api/getBusinessActivitiesExcel\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../businessActivitiesDataSlice\";\r\n\r\nexport const downloadBusinessActivitiesExcel = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.exchbusiness.businessActivities;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const dailyTrading = await dispatch(getBusinesActivitiesExcel(user, filter));\r\n if (dailyTrading) {\r\n fileDownload(\r\n new Blob([dailyTrading as any], {\r\n type: \"application/vnd.openxmlformat\",\r\n }),\r\n \"BusinessActivities.xlsx\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import React from \"react\";\r\nimport { useBusinessActivitiesReportDownloader } from \"../../../../data/reports/exchbusiness/businessActivities/hooks/useBusinessActivitiesReportDownloader\";\r\nimport { useBusinessActivitiesExcelDownloader } from \"../../../../data/reports/exchbusiness/businessActivities/hooks/useBusinessActivitiesExcelDownloader\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport ExcelIcon from \"@material-ui/icons/TableChartOutlined\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../../components/common/CustomTooltip\";\r\n\r\nexport const DownloadButton: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useBusinessActivitiesReportDownloader();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const DownloadExcelButton: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useBusinessActivitiesExcelDownloader();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport {\r\n Grid,\r\n CardContent,\r\n CardHeader,\r\n Card,\r\n Divider,\r\n} from \"@material-ui/core\";\r\nimport { BusinessActivitiesReportTable } from \"./BusinessActivitiesReportTable\";\r\nimport { usePageStyles } from \"../../../pageStyles\";\r\nimport { PageComponent } from \"../../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../../components/common/PageTitle\";\r\nimport { BusinessActivitiesReportFilter } from \"./BusinessActivitiesReportFilter\";\r\nimport { DownloadButton, DownloadExcelButton } from \"./DownloadButton\";\r\n\r\nconst BusinessActivitiesReport: PageComponent = ({ userAccessRights }) => {\r\n const pageStyles = usePageStyles();\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n }\r\n action={}\r\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 BusinessActivitiesReportActions: React.FunctionComponent = () => (\r\n \r\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 BusinessActivitiesReport;\r\n","import BusinessActivitiesReport from \"./BusinessActivitiesReport\";\r\nimport { NavigationItem } from \"../../../../core/navigation/types\";\r\nimport { businessActivitiesLocation } from \"./Locations\";\r\n\r\nexport const businessActivitiesReportComponents: NavigationItem[] = [\r\n {\r\n Component: BusinessActivitiesReport,\r\n isMenuItem: true,\r\n path: businessActivitiesLocation,\r\n },\r\n];\r\n","export const businessActivitiesLocation = \"/reports/exchbusiness/actinperiod\";\r\n","import { CommReviewReportData, ComReviewReportFilter } from \"../types\";\r\nimport { User } from \"../../../../auth/types\";\r\nimport { webApi } from \"../../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../../core/util/functions\";\r\n\r\nconst getCommReviewData = (user: User, filter: ComReviewReportFilter) => {\r\n return webApi({\r\n method: \"GET\",\r\n url: \"reporting/getcommreviewlist\",\r\n params: {\r\n userid: user.userId,\r\n datefrom: getParamsDateString(filter.datefrom),\r\n dateto: getParamsDateString(filter.dateto),\r\n productid: filter.product?.prodId,\r\n clientid: filter.client?.cliId,\r\n broker: filter.broker?.empId,\r\n side: filter.side,\r\n },\r\n });\r\n};\r\n\r\nexport default getCommReviewData;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { loadReport } from \"../thunks/loadReportData\";\r\nimport { CommReviewReportData } from \"../types\";\r\n\r\nexport const useCommReviewReportData = () => {\r\n const data = useSelector(\r\n (s) => s.data.reports.exchbusiness.commReview.data\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadData = React.useCallback(() => dispatch(loadReport()), [\r\n dispatch,\r\n ]);\r\n\r\n return [data, dispatchLoadData] as [typeof data, typeof dispatchLoadData];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { setData } from \"../commReviewDataSlice\";\r\nimport getCommReviewDataApi from \"../api/getCommReviewData\";\r\n\r\nexport const loadReport = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const user = store.data.auth.current.user;\r\n const { filter } = store.ux.reports.exchbusiness.commReview;\r\n\r\n const pagedTrades = await dispatch(getCommReviewDataApi(user, filter));\r\n\r\n dispatch(setData(pagedTrades || []));\r\n};\r\n","import React from \"react\";\r\nimport { useCommReviewColumns } from \"./useCommReviewReportColumns\";\r\nimport { AccessRights } from \"../../../../core/navigation/types\";\r\nimport { CommReviewReportData } from \"../../../../data/reports/exchbusiness/commReview/types\";\r\nimport { ControledTable } from \"../../../components/common/ControledTable\";\r\nimport { useCommReviewReportData } from \"../../../../data/reports/exchbusiness/commReview/hooks/useCommReviewReportData\";\r\nimport { useCommReviewReportIndex } from \"../../../../data/reports/exchbusiness/commReview/hooks/useCommReviewReportIndex\";\r\n\r\nexport interface CommReviewTableProps {\r\n userAccessRights: AccessRights;\r\n}\r\n\r\ntype CommReviewTablePropsType = CommReviewTableProps;\r\n\r\nexport const CommReviewReportTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n ...tableProps\r\n}) => {\r\n const columns = useCommReviewColumns();\r\n const [data, load] = useCommReviewReportData();\r\n const [index, setIndex] = useCommReviewReportIndex();\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={load}\r\n onPageIndexChange={setIndex}\r\n pageIndex={index}\r\n immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default CommReviewReportTable;\r\n","import { CommReviewReportData } from \"../../../../data/reports/exchbusiness/commReview/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\n\r\nexport const useCommReviewColumns = () => {\r\n const { getString, getFormatedNumberString } = React.useContext(\r\n LocalizationContext\r\n );\r\n\r\n return React.useMemo(\r\n () => [\r\n {\r\n title: getString(\"exchClient\"),\r\n field: \"client\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"exchTransactionDate\"),\r\n field: \"transactionDate\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"exchTransactionNumber\"),\r\n field: \"transactionNumber\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"exchOrderNumber\"),\r\n field: \"orderNumber\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"exchSide\"),\r\n field: \"side\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"exchProduct\"),\r\n field: \"product\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"exchPrice\"),\r\n render: (row) => `${getFormatedNumberString(row.price, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"exchAmount\"),\r\n render: (row) => `${getFormatedNumberString(row.amount)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"exchCommission\"),\r\n render: (row) => `${getFormatedNumberString(row.commission, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n ],\r\n [getString, getFormatedNumberString]\r\n ) as Column[];\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { setIndex } from \"../commReviewUXSlice\";\r\nimport { PageIndex } from \"../../../../models\";\r\n\r\nexport const useCommReviewReportIndex = () => {\r\n const pageIndex = useSelector(\r\n (s) => s.ux.reports.exchbusiness.commReview.index\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetIndex = React.useCallback(\r\n (index: PageIndex) => dispatch(setIndex(index)),\r\n [dispatch]\r\n );\r\n\r\n return [pageIndex, dispatchSetIndex] as [\r\n typeof pageIndex,\r\n typeof dispatchSetIndex\r\n ];\r\n};\r\n","import React from \"react\";\r\nimport { Grid, Paper, Button, Typography } from \"@material-ui/core\";\r\nimport { DateInput } from \"../../../components/common/DateInput\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { ComReviewReportFilter } from \"../../../../data/reports/exchbusiness/commReview/types\";\r\nimport { useAuth } from \"../../../../data/auth/hooks\";\r\nimport { DisplayDrawerContext } from \"../../../../layout/DisplayDrawerContext\";\r\nimport { NumberInput } from \"../../../components/common/NumberInput\";\r\nimport { ProductSelect } from \"../../../components/listing/ProductSelect\";\r\nimport { OrderSideSelect } from \"../../../trading/orders/OrderSideSelect\";\r\nimport { ClientSelect } from \"../../../components/listing/ClientSelect\";\r\nimport { EmployeeSelect } from \"../../../components/listing/EmployeeSelect\";\r\n\r\ninterface CommReviewFilterEditorProps {\r\n filter?: ComReviewReportFilter;\r\n editFilter: (prop: keyof ComReviewReportFilter, value: any) => void;\r\n save: () => void;\r\n}\r\n\r\nexport const CommReviewFilterEditor: React.FunctionComponent = ({\r\n filter,\r\n editFilter,\r\n save,\r\n}) => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const { getString } = React.useContext(LocalizationContext);\r\n\r\n const handleChange = React.useCallback(\r\n (event: React.ChangeEvent) => {\r\n editFilter(event.target.name as any, event.target.value);\r\n },\r\n [editFilter]\r\n );\r\n\r\n if (!filter) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n editFilter(\"datefrom\", date?.toISOString())}\r\n />\r\n \r\n \r\n editFilter(\"dateto\", date?.toISOString())}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n prod.prodId === filter.product?.prodId}\r\n onChangeItem={(prod) => {\r\n editFilter(\"product\", prod);\r\n }}\r\n />\r\n \r\n \r\n \r\n client.cliId === filter.client?.cliId}\r\n onChangeItem={(client) => editFilter(\"client\", client)}\r\n />\r\n \r\n \r\n employee.empId === filter.broker}\r\n onChangeItem={(employee) => {\r\n editFilter(\"broker\", employee);\r\n }}\r\n />\r\n \r\n\r\n \r\n editFilter(\"side\", e.target.value)}\r\n side={filter?.side}\r\n nullable\r\n />\r\n \r\n\r\n \r\n \r\n {\r\n save();\r\n showWithDrawer(undefined);\r\n }}\r\n >\r\n {getString(\"orderFilterConfirm\")}\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport { Chip, Grid } from \"@material-ui/core\";\r\nimport { ComReviewReportFilter } from \"../../../../data/reports/exchbusiness/commReview/types\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { useOrderSideOptionsTranslator } from \"../../../../data/trading/orders/hooks/useOrderSideOptions\";\r\n\r\nexport const CommReviewFilterChips: React.FunctionComponent = ({\r\n filter,\r\n removefilter,\r\n}) => {\r\n const { getDateString, getString } = React.useContext(LocalizationContext);\r\n const sideTranslator = useOrderSideOptionsTranslator();\r\n\r\n return (\r\n \r\n {filter.datefrom && (\r\n \r\n removefilter(\"datefrom\")}\r\n />\r\n \r\n )}\r\n {filter.dateto && (\r\n \r\n removefilter(\"dateto\")}\r\n />\r\n \r\n )}\r\n {filter.client && (\r\n \r\n removefilter(\"client\")}\r\n />\r\n \r\n )}\r\n\r\n {filter.product && (\r\n \r\n removefilter(\"product\")}\r\n />\r\n \r\n )}\r\n {filter.broker && (\r\n \r\n removefilter(\"broker\")}\r\n />\r\n \r\n )}\r\n\r\n {filter.side && (\r\n \r\n removefilter(\"side\")}\r\n />\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\ninterface CommReviewFilterChipsProps {\r\n filter: ComReviewReportFilter;\r\n removefilter: (type: keyof ComReviewReportFilter) => void;\r\n}\r\n","import React from \"react\";\r\nimport { IconButton, Grid } from \"@material-ui/core\";\r\nimport FilterIcon from \"@material-ui/icons/FilterListOutlined\";\r\nimport { DisplayDrawerContext } from \"../../../../layout/DisplayDrawerContext\";\r\nimport {\r\n useCommReviewReportFilter,\r\n useCurrentCommReviewFilter,\r\n} from \"../../../../data/reports/exchbusiness/commReview/hooks/useCommReviewReportFilter\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { CustomTooltip } from \"../../../components/common/CustomTooltip\";\r\nimport { CommReviewFilterEditor } from \"./CommReviewFilterEditor\";\r\nimport { CommReviewFilterChips } from \"./CommReviewFilterChips\";\r\n\r\nexport const CommReviewReportFilter: React.FunctionComponent = () => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const showFilter = React.useCallback(\r\n () => showWithDrawer(),\r\n [showWithDrawer]\r\n );\r\n\r\n //const [filter, editfilter, save] = useCommReviewReportFilter();\r\n //const { getString } = React.useContext(LocalizationContext);\r\n const [filter, removeFilter] = useCurrentCommReviewFilter();\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\nconst CommReviewsFiltEditor: React.FunctionComponent = () => {\r\n const [filter, editFilter, save] = useCommReviewReportFilter();\r\n return (\r\n \r\n );\r\n};\r\n","import { setFilter, removeFilter, initialState } from \"../commReviewUXSlice\";\r\nimport { setData } from \"../commReviewDataSlice\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport React from \"react\";\r\nimport { ComReviewReportFilter } from \"../types\";\r\nimport { useCopiedState } from \"../../../../../core/util/hooks\";\r\nimport { invalidateCommReview } from \"../commReviewDataSlice\";\r\n\r\nexport const useCommReviewReportFilter = () => {\r\n const storeFilter = useSelector(\r\n (store) => store.ux.reports.exchbusiness.commReview.filter\r\n );\r\n const [filter, editFilter] = useCopiedState(\r\n storeFilter\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetFilter = React.useCallback(() => {\r\n dispatch(setFilter(filter!));\r\n dispatch(setData());\r\n }, [dispatch, filter]);\r\n\r\n return [filter, editFilter, dispatchSetFilter] as [\r\n typeof filter,\r\n typeof editFilter,\r\n typeof dispatchSetFilter\r\n ];\r\n};\r\n\r\nexport const useCurrentCommReviewFilter = () => {\r\n const filter = useSelector(\r\n (store) => store.ux.reports.exchbusiness.commReview.filter\r\n );\r\n const dispatch = useDispatch();\r\n const dispatchRemoveFilter = React.useCallback(\r\n (type: keyof ComReviewReportFilter) => {\r\n dispatch(removeFilter(type));\r\n dispatch(invalidateCommReview());\r\n },\r\n [dispatch]\r\n );\r\n\r\n return [filter, dispatchRemoveFilter] as [\r\n typeof filter,\r\n typeof dispatchRemoveFilter\r\n ];\r\n};\r\n","import { User } from \"../../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../../core/http/httpThunks\";\r\nimport { ComReviewReportFilter } from \"../types\";\r\nimport { getParamsDateString } from \"../../../../../core/util/functions\";\r\n\r\nexport const getCommReviewReport = (\r\n user: User,\r\n filter: ComReviewReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getcommreviewreport\",\r\n params: {\r\n userid: user.userId,\r\n datefrom: getParamsDateString(filter.datefrom),\r\n dateto: getParamsDateString(filter.dateto),\r\n productid: filter.product?.prodId,\r\n clientid: filter.client?.cliId,\r\n broker: filter.broker?.empId,\r\n side: filter.side,\r\n },\r\n });\r\n};\r\n\r\nexport default getCommReviewReport;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadCommReviewReport } from \"../thunks/downloadReport\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\n\r\nexport const useCommReviewReportDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.exchbusiness.commReview.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadCommReviewReport()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { getCommReviewReport } from \"../api/getCommReviewReport\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../commReviewDataSlice\";\r\n\r\nexport const downloadCommReviewReport = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.exchbusiness.commReview;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const ordersReport = await dispatch(getCommReviewReport(user, filter));\r\n if (ordersReport) {\r\n fileDownload(\r\n new Blob([ordersReport as any], { type: \"application/pdf\" }),\r\n \"CommissionReview.pdf\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import { ComReviewReportFilter } from \"../types\";\r\nimport { User } from \"../../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../../core/util/functions\";\r\n\r\nexport const getCommReviewExcel = (\r\n user: User,\r\n filter: ComReviewReportFilter\r\n) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getcommreviewxls\",\r\n params: {\r\n userid: user.userId,\r\n datefrom: getParamsDateString(filter.datefrom),\r\n dateto: getParamsDateString(filter.dateto),\r\n productid: filter.product?.prodId,\r\n clientid: filter.client?.cliId,\r\n broker: filter.broker?.empId,\r\n side: filter.side,\r\n },\r\n });\r\n};\r\n\r\nexport default getCommReviewExcel;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadCommReviewExcel } from \"../thunks/downloadReportExcel\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\n\r\nexport const useCommReviewExcelDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.exchbusiness.commReview.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadCommReviewExcel()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { getCommReviewExcel } from \"../api/getCommReviewExcel\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../commReviewDataSlice\";\r\n\r\nexport const downloadCommReviewExcel = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.exchbusiness.commReview;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const dailyTrading = await dispatch(getCommReviewExcel(user, filter));\r\n if (dailyTrading) {\r\n fileDownload(\r\n new Blob([dailyTrading as any], {\r\n type: \"application/vnd.openxmlformat\",\r\n }),\r\n \"CommReview.xlsx\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import React from \"react\";\r\nimport { useCommReviewReportDownloader } from \"../../../../data/reports/exchbusiness/commReview/hooks/useCommReviewReportDownloader\";\r\nimport { useCommReviewExcelDownloader } from \"../../../../data/reports/exchbusiness/commReview/hooks/useCommReviewExcelDownloader\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport ExcelIcon from \"@material-ui/icons/TableChartOutlined\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../../components/common/CustomTooltip\";\r\n\r\nexport const DownloadButton: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useCommReviewReportDownloader();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const DownloadExcelButton: React.FunctionComponent = () => {\r\n const [downloader, fetchState] = useCommReviewExcelDownloader();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport {\r\n Grid,\r\n CardContent,\r\n CardHeader,\r\n Card,\r\n Divider,\r\n} from \"@material-ui/core\";\r\nimport { CommReviewReportTable } from \"./CommReviewReportTable\";\r\nimport { usePageStyles } from \"../../../pageStyles\";\r\nimport { PageComponent } from \"../../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../../components/common/PageTitle\";\r\nimport { CommReviewReportFilter } from \"./CommReviewReportFilter\";\r\nimport { DownloadButton, DownloadExcelButton } from \"./DownloadButton\";\r\n\r\nconst CommReviewReport: PageComponent = ({ userAccessRights }) => {\r\n const pageStyles = usePageStyles();\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n }\r\n action={}\r\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 CommReviewReportActions: React.FunctionComponent = () => (\r\n \r\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 CommReviewReport;\r\n","import CommReviewReport from \"./CommReviewReport\";\r\nimport { NavigationItem } from \"../../../../core/navigation/types\";\r\nimport { commReviewLocation } from \"./Locations\";\r\n\r\nexport const commReviewReportComponents: NavigationItem[] = [\r\n {\r\n Component: CommReviewReport,\r\n isMenuItem: true,\r\n path: commReviewLocation,\r\n },\r\n];\r\n","export const commReviewLocation = \"/reports/exchbusiness/commreview\";\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { resetClientOverviewIdices } from \"../clientOverviewUXSlice\";\r\nimport { PageIndex } from \"../../../../models\";\r\nimport { TableType } from \"../types\";\r\nimport { setCOIndex } from \"../thunks/setCOIndexThunk\";\r\n\r\nexport const useClientOverviewIndex = (type: TableType) => {\r\n\tconst pageIndex = useSelector(s => s.ux.reports.exchbusiness.clientOverview.index[type]);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchSetIndex = React.useCallback((index: PageIndex) => dispatch(setCOIndex(type, index)), [\r\n\t\tdispatch,\r\n\t\ttype,\r\n\t]);\r\n\r\n\tconst dispatchResetIndex = React.useCallback(() => dispatch(resetClientOverviewIdices(type)), [\r\n\t\tdispatch,\r\n\t\ttype,\r\n\t]);\r\n\r\n\treturn [pageIndex, dispatchSetIndex, dispatchResetIndex] as [\r\n\t\ttypeof pageIndex,\r\n\t\ttypeof dispatchSetIndex,\r\n\t\ttypeof dispatchResetIndex\r\n\t];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { invalidateData } from \"../clientOverviewDataSlice\";\r\nimport { setClientOverviewIndex } from \"../clientOverviewUXSlice\";\r\nimport { PageIndex } from \"../../../../models\";\r\nimport { TableType } from \"../types\";\r\n\r\nexport const setCOIndex = (type: TableType, index: PageIndex): ThunkType => dispatch => {\r\n\tdispatch(setClientOverviewIndex({ type, index }));\r\n\tdispatch(invalidateData());\r\n};\r\n","import { ClientOverviewFilter, GetClientOverviewParams } from \"../types\";\r\nimport { DeliveryListData } from \"../../../../clearing/delivery/types\";\r\nimport { User } from \"../../../../auth/types\";\r\nimport { webApiWithResponse } from \"../../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../../core/util/functions\";\r\n\r\nconst getDeliveriesWebApi = (\r\n user: User,\r\n page: number,\r\n itemsPerPage: number,\r\n filter: ClientOverviewFilter\r\n) => {\r\n const params: GetClientOverviewParams = {\r\n userid: user.userId,\r\n fromrow: page * itemsPerPage,\r\n numofrows: itemsPerPage,\r\n cliid: filter.client?.cliId,\r\n datefrom: getParamsDateString(filter.datefrom),\r\n dateto: getParamsDateString(filter.dateto),\r\n };\r\n\r\n return webApiWithResponse({\r\n method: \"GET\",\r\n url: \"clearing/getdlvrgoodslist\",\r\n params,\r\n });\r\n};\r\n\r\nexport default getDeliveriesWebApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { loadDeliveries } from \"../thunks/loadDeliveries\";\r\nimport { PageData } from \"../../../../models\";\r\nimport { DeliveryListData } from \"../../../../clearing/delivery/types\";\r\n\r\nexport const useDeliveryData = () => {\r\n\tconst pageData = useSelector | undefined>(\r\n\t\ts => s.data.reports.exchbusiness.clientOverview.currentPageDelivery\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchLoadDeliveryPage = React.useCallback(() => dispatch(loadDeliveries()), [dispatch]);\r\n\r\n\treturn [pageData, dispatchLoadDeliveryPage] as [typeof pageData, typeof dispatchLoadDeliveryPage];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { setCODeliveriesData } from \"../clientOverviewDataSlice\";\r\nimport getDeliveries from \"../api/getDeliveries\";\r\nimport { PageDataStatus } from \"../../../../models\";\r\nimport { TableType } from \"../types\";\r\n\r\nexport const loadDeliveries = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tconst { pageNumber, itemsPerPage } = store.ux.reports.exchbusiness.clientOverview.index[\r\n\t\tTableType.Deliveries\r\n\t];\r\n\tconst { filter } = store.ux.reports.exchbusiness.clientOverview;\r\n\tconst user = store.data.auth.current.user;\r\n\r\n\tconst deliveriesResponse = await dispatch(getDeliveries(user, pageNumber, itemsPerPage, filter));\r\n\r\n\tif (!deliveriesResponse || deliveriesResponse.resCode !== \"OK\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tconst delivery = {\r\n\t\tcurrentPageData: deliveriesResponse.obj,\r\n\t\ttotalCount: Number(deliveriesResponse.resDesc) || 0,\r\n\t\tstatus: PageDataStatus.DataCurrent,\r\n\t};\r\n\r\n\tdispatch(setCODeliveriesData(delivery));\r\n};\r\n\r\n","import React from \"react\";\r\nimport { DeliveryListData } from \"../../../../../data/clearing/delivery/types\";\r\nimport { PaginationTable } from \"../../../../components/common/PagginationTable\";\r\nimport { useDeliveriesColumns } from \"./useDeliveriesColumns\";\r\nimport { useClientOverviewIndex } from \"../../../../../data/reports/exchbusiness/clientOverview/hooks/useClientOverviewIndex\";\r\nimport { useDeliveryData } from \"../../../../../data/reports/exchbusiness/clientOverview/hooks/useDeliveryData\";\r\nimport { TableType } from \"../../../../../data/reports/exchbusiness/clientOverview/types\";\r\nimport { PageDataStatus } from \"../../../../../data/models\";\r\nimport { useDeliveriesActions } from \"./useDeliveriesActions\";\r\n\r\nconst ClientOverviewDeliveriesTable: React.FunctionComponent = () => {\r\n\tconst columns = useDeliveriesColumns();\r\n\tconst actions = useDeliveriesActions()\r\n\r\n\tconst [data, loadData] = useDeliveryData();\r\n\tconst [index, setIndex] = useClientOverviewIndex(TableType.Deliveries);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (data && data.status === PageDataStatus.DataInvalidated) {\r\n\t\t\tloadData();\r\n\t\t}\r\n\t}, [loadData, data]);\r\n\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\tgetData={loadData}\r\n\t\t\tpageData={data}\r\n\t\t\tonPageIndexChange={setIndex}\r\n\t\t\tpageIndex={index}\r\n\t\t\ttitle=\"\"\r\n\t\t\tcolumns={columns}\r\n\t\t\tactions={actions}\r\n\t\t\toptions={{\r\n\t\t\t\tactionsColumnIndex: -1,\r\n\t\t\t\tsearch: false,\r\n\t\t\t\ttoolbar: false,\r\n\t\t\t}}\r\n\t\t/>\r\n\t);\r\n};\r\n\r\nexport default ClientOverviewDeliveriesTable;\r\n","import { DeliveryListData } from \"../../../../../data/clearing/delivery/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\n\r\nexport const useDeliveriesColumns = () => {\r\n const { getString, getDateString, getFormatedNumberString } = React.useContext(LocalizationContext);\r\n\r\n return React.useMemo(\r\n () => [\r\n {\r\n title: getString(\"dlvrDeliveryDate\"),\r\n render: (delivery) => getDateString(delivery.deliveryDate),\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"dlvrTradeNo\"),\r\n field: \"tradeNo\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"dlvrsellerName\"),\r\n field: \"sellerName\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"dlvrbuyerName\"),\r\n field: \"buyerName\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"dlvrproductName\"),\r\n field: \"productName\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"dlvrDeliverQty\"),\r\n render: (delivery) => getFormatedNumberString(delivery.deliveryQty),\r\n sorting: false,\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n//\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n },\r\n {\r\n title: getString(\"deliveryTradeQty\"),\r\n render: (delivery) => getFormatedNumberString(delivery.tradeQty),\r\n sorting: false,\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n//\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n },\r\n {\r\n title: getString(\"deliveryLeftQty\"),\r\n render: (delivery) => getFormatedNumberString(delivery.leftQty),\r\n sorting: false,\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n//\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n },\r\n {\r\n title: getString(\"dlvrValue\"),\r\n render: (delivery) => getFormatedNumberString(delivery.deliveryAmt,true),\r\n sorting: false,\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n//\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n },\r\n ],\r\n [getString, getDateString, getFormatedNumberString]\r\n ) as Column[];\r\n};\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport ViewIcon from \"@material-ui/icons/InputOutlined\";\r\nimport { DeliveryListData } from \"../../../../../data/clearing/delivery/types\";\r\nimport { LocalizationContext } from \"../../../../../core/localization/Localization\";\r\nimport { MaterialTableProps } from \"material-table\";\r\nimport { useViewDelivery } from \"../../../../clearing/delivery/DisplayDelivery\";\r\n\r\nexport function useDeliveriesActions() {\r\n const { getString } = useContext(LocalizationContext);\r\n const onShowDelivery = useViewDelivery();\r\n\r\n return useMemo(() => {\r\n const result: MaterialTableProps[\"actions\"] = [\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"orderActView\"),\r\n onClick: (event, rowData) =>\r\n onShowDelivery(rowData as DeliveryListData),\r\n },\r\n ];\r\n return result;\r\n }, [onShowDelivery, getString]);\r\n}\r\n","import { ClientOverviewFilter, GetClientOverviewParams } from \"../types\";\r\nimport { ViewOrder } from \"../../../../trading/orders/types\";\r\nimport { User } from \"../../../../auth/types\";\r\nimport { webApiWithResponse } from \"../../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../../core/util/functions\";\r\n\r\nconst getOrdersWebApi = (\r\n user: User,\r\n page: number,\r\n itemsPerPage: number,\r\n filter: ClientOverviewFilter,\r\n) => {\r\n const params: GetClientOverviewParams = {\r\n userid: user.userId,\r\n fromrow: page * itemsPerPage,\r\n numofrows: itemsPerPage,\r\n cliid: filter.client?.cliId,\r\n datefrom: getParamsDateString(filter.datefrom),\r\n dateto: getParamsDateString(filter.dateto),\r\n status: filter.orderStatus?.ftValue\r\n };\r\n\r\n return webApiWithResponse({\r\n method: \"GET\",\r\n url: \"order/getorderlist\",\r\n params,\r\n });\r\n};\r\n\r\nexport default getOrdersWebApi;\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport getOrders from \"../api/getOrders\";\r\nimport { PageDataStatus, PageData } from \"../../../../models\";\r\nimport { ViewOrder } from \"../../../../trading/orders/types\";\r\nimport { ClientOverviewFilter } from \"../types\";\r\n\r\nexport const getOrdersThunk = (\r\n\tpageNumber: number,\r\n\titemsPerPage: number,\r\n\tfilter: ClientOverviewFilter,\r\n//\tdefaultStatus?: number\r\n): ThunkType | undefined>> => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\t\r\n\tconst user = store.data.auth.current.user;\r\n//\tconst ordersResponse = await dispatch(getOrders(user, pageNumber, itemsPerPage, filter, defaultStatus));\r\n\tconst ordersResponse = await dispatch(getOrders(user, pageNumber, itemsPerPage, filter ));\r\n\r\n\tif (!ordersResponse || ordersResponse.resCode !== \"OK\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\treturn {\r\n\t\tcurrentPageData: ordersResponse.obj,\r\n\t\ttotalCount: Number(ordersResponse.resDesc) || 0,\r\n\t\tstatus: PageDataStatus.DataCurrent,\r\n\t};\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { loadOrderBook } from \"../thunks/loadAllOrderBook\";\r\nimport { PageData } from \"../../../../models\";\r\nimport { ViewOrder } from \"../../../../trading/orders/types\";\r\n\r\nexport const useOrderBookData = () => {\r\n\tconst pageData = useSelector | undefined>(\r\n\t\ts => s.data.reports.exchbusiness.clientOverview.currentPageOrder\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchLoadOrderBookPage = React.useCallback(() => dispatch(loadOrderBook()), [dispatch]);\r\n\r\n\treturn [pageData, dispatchLoadOrderBookPage] as [\r\n\t\ttypeof pageData,\r\n\t\ttypeof dispatchLoadOrderBookPage\r\n\t];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { setCOOrdersData } from \"../clientOverviewDataSlice\";\r\nimport { getOrdersThunk } from \"./getOrdersThunk\";\r\nimport { TableType } from \"../types\";\r\n\r\nexport const loadOrderBook = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tconst { pageNumber, itemsPerPage } = store.ux.reports.exchbusiness.clientOverview.index[TableType.Orders];\r\n\tconst { filter } = store.ux.reports.exchbusiness.clientOverview;\r\n\r\n\tconst pagedOrders = await dispatch(getOrdersThunk(pageNumber, itemsPerPage, filter));\r\n\r\n\tif (pagedOrders) {\r\n\t\tdispatch(setCOOrdersData(pagedOrders));\r\n\t}\r\n};\r\n","import React from \"react\";\r\nimport { ViewOrder } from \"../../../../../data/trading/orders/types\";\r\nimport { PaginationTable } from \"../../../../components/common/PagginationTable\";\r\nimport { useOrderBookColumns } from \"../../../../../views/trading/orderBook/useOrderBookColumns\";\r\nimport { useOrderBookData } from \"../../../../../data/reports/exchbusiness/clientOverview/hooks/useOrderBookData\";\r\nimport { useClientOverviewIndex } from \"../../../../../data/reports/exchbusiness/clientOverview/hooks/useClientOverviewIndex\";\r\nimport { TableType } from \"../../../../../data/reports/exchbusiness/clientOverview/types\";\r\nimport { PageDataStatus } from \"../../../../../data/models\";\r\nimport { useOrderActions } from \"./useOrderActions\";\r\n\r\nconst ClientOverviewOrdersTable: React.FunctionComponent = () => {\r\n\tconst columns = useOrderBookColumns();\r\n\r\n\tconst [data, loadData] = useOrderBookData();\r\n\tconst [index, setIndex] = useClientOverviewIndex(TableType.Orders);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (data && data.status === PageDataStatus.DataInvalidated) {\r\n\t\t\tloadData();\r\n\t\t}\r\n\t}, [loadData, data]);\r\n\r\n\tconst actions = useOrderActions()\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\tgetData={loadData}\r\n\t\t\tpageData={data}\r\n\t\t\tonPageIndexChange={setIndex}\r\n\t\t\tpageIndex={index}\r\n\t\t\ttitle=\"\"\r\n\t\t\tcolumns={columns}\r\n\t\t\tactions={actions}\r\n\t\t\toptions={{\r\n\t\t\t\tactionsColumnIndex: -1,\r\n\t\t\t\tsearch: false,\r\n\t\t\t\ttoolbar: false,\r\n\t\t\t}}\r\n\t\t/>\r\n\t);\r\n};\r\n\r\nexport default ClientOverviewOrdersTable;\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport ViewIcon from \"@material-ui/icons/InputOutlined\";\r\nimport { ViewOrder } from \"../../../../../data/trading/orders/types\";\r\nimport { LocalizationContext } from \"../../../../../core/localization/Localization\";\r\nimport { MaterialTableProps } from \"material-table\";\r\nimport { useViewOrder } from \"../../../../trading/orders/DisplayOrder\";\r\nimport { DiplayOrderMod } from \"../../../../trading/orders/DisplayOrderMainAttributes\";\r\n\r\nexport function useOrderActions() {\r\n const { getString } = useContext(LocalizationContext);\r\n const onShowOBOrder = useViewOrder(DiplayOrderMod.Full, true);\r\n\r\n return useMemo(() => {\r\n const result: MaterialTableProps[\"actions\"] = [\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"orderActView\"),\r\n onClick: (event, rowData) => onShowOBOrder(rowData as ViewOrder),\r\n },\r\n ];\r\n return result;\r\n }, [onShowOBOrder, getString]);\r\n}\r\n\r\n\r\n","import { ClientOverviewFilter, GetClientOverviewParams } from \"../types\";\r\nimport { PaymentListData } from \"../../../../clearing/payments/types\";\r\nimport { User } from \"../../../../auth/types\";\r\nimport { webApiWithResponse } from \"../../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../../core/util/functions\";\r\n\r\nconst getPaymentsWebApi = (\r\n user: User,\r\n page: number,\r\n itemsPerPage: number,\r\n filter: ClientOverviewFilter\r\n) => {\r\n const params: GetClientOverviewParams = {\r\n userid: user.userId,\r\n fromrow: page * itemsPerPage,\r\n numofrows: itemsPerPage,\r\n cliid: filter.client?.cliId,\r\n datefrom: getParamsDateString(filter.datefrom),\r\n dateto: getParamsDateString(filter.dateto),\r\n tranid: filter?.tranId,\r\n };\r\n\r\n return webApiWithResponse({\r\n method: \"GET\",\r\n url: \"clearing/getpaymentlist\",\r\n params,\r\n });\r\n};\r\n\r\nexport default getPaymentsWebApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { loadAllPayments } from \"../thunks/loadAllPayment\";\r\nimport { PageData } from \"../../../../models\";\r\nimport { PaymentListData } from \"../../../../clearing/payments/types\";\r\n\r\nexport const usePaymentsData = () => {\r\n\tconst pageData = useSelector | undefined>(\r\n\t\ts => s.data.reports.exchbusiness.clientOverview.currentPagePayment\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchLoadPaymentsPage = React.useCallback(() => dispatch(loadAllPayments()), [dispatch]);\r\n\r\n\treturn [pageData, dispatchLoadPaymentsPage] as [typeof pageData, typeof dispatchLoadPaymentsPage];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { setCOPaymentsData } from \"../clientOverviewDataSlice\";\r\nimport getPayments from \"../api/getPayments\";\r\nimport { PageDataStatus } from \"../../../../models\";\r\nimport { TableType } from \"../types\";\r\n\r\nexport const loadAllPayments = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tconst { pageNumber, itemsPerPage } = store.ux.reports.exchbusiness.clientOverview.index[\r\n\t\tTableType.Payments\r\n\t];\r\n\tconst { filter } = store.ux.reports.exchbusiness.clientOverview;\r\n\tconst user = store.data.auth.current.user;\r\n\r\n\tconst paymentsResponse = await dispatch(getPayments(user, pageNumber, itemsPerPage, filter));\r\n\r\n\tif (!paymentsResponse || paymentsResponse.resCode !== \"OK\") {\r\n\t\treturn;\r\n\t}\r\n\r\n\tconst payments = {\r\n\t\tcurrentPageData: paymentsResponse.obj,\r\n\t\ttotalCount: Number(paymentsResponse.resDesc) || 0,\r\n\t\tstatus: PageDataStatus.DataCurrent,\r\n\t};\r\n\r\n\tdispatch(setCOPaymentsData(payments));\r\n};\r\n","import React from \"react\";\r\nimport { PaymentListData } from \"../../../../../data/clearing/payments/types\";\r\nimport { PaginationTable } from \"../../../../components/common/PagginationTable\";\r\nimport { usePaymentsColumns } from \"./usePaymentsColumns\";\r\nimport { useClientOverviewIndex } from \"../../../../../data/reports/exchbusiness/clientOverview/hooks/useClientOverviewIndex\";\r\nimport { usePaymentsData } from \"../../../../../data/reports/exchbusiness/clientOverview/hooks/usePaymentsData\";\r\nimport { TableType } from \"../../../../../data/reports/exchbusiness/clientOverview/types\";\r\nimport { PageDataStatus } from \"../../../../../data/models\";\r\nimport { usePaymentsActions } from \"./usePaymentsActions\";\r\n\r\nconst ClientOverviewPaymentsTable: React.FunctionComponent = () => {\r\n\tconst columns = usePaymentsColumns();\r\n\tconst [data, loadData] = usePaymentsData();\r\n\tconst [index, setIndex] = useClientOverviewIndex(TableType.Payments);\r\n\tconst actions = usePaymentsActions()\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (data && data.status === PageDataStatus.DataInvalidated) {\r\n\t\t\tloadData();\r\n\t\t}\r\n\t}, [loadData, data]);\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\tgetData={loadData}\r\n\t\t\tpageData={data}\r\n\t\t\tonPageIndexChange={setIndex}\r\n\t\t\tpageIndex={index}\r\n\t\t\ttitle=\"\"\r\n\t\t\tcolumns={columns}\r\n\t\t\tactions={actions}\r\n\t\t\toptions={{\r\n\t\t\t\tactionsColumnIndex: -1,\r\n\t\t\t\tsearch: false,\r\n\t\t\t\ttoolbar: false,\r\n\t\t\t}}\r\n\t\t/>\r\n\t);\r\n};\r\n\r\nexport default ClientOverviewPaymentsTable;\r\n","import { PaymentListData } from \"../../../../../data/clearing/payments/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\n\r\nexport const usePaymentsColumns = () => {\r\n const { getString, getDateString, getFormatedNumberString } = React.useContext(LocalizationContext);\r\n\r\n return React.useMemo(\r\n () => [\r\n {\r\n title: getString(\"paymentDataTime\"),\r\n render: (payment) => getDateString(payment.payDate, \"DD.MM.YYYY\"),\r\n\t\tsorting: false,\r\n\t\twidth: \"140px\",\r\n\t\tcellStyle: {\r\n\t\t\tmaxWidth: \"140px\",\r\n\t\t\tminWidth: \"140px\",\r\n\t\t\twidth: \"140px\",\r\n\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\ttextAlign: \"center\",\r\n\t\t\tpaddingRight: \"10px\",\r\n\t\t},\r\n\t\theaderStyle: {\r\n\t\t\tmaxWidth: \"140px\",\r\n\t\t\tminWidth: \"140px\",\r\n\t\t\twidth: \"140px\",\r\n//\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\ttextAlign: \"center\",\r\n\t\t\tpaddingRight: \"10px\",\r\n\t\t},\r\n\r\n },\r\n {\r\n title: getString(\"paymentPayType\"),\r\n field: \"payTypeDescr\",\r\n sorting: false,\r\n },\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"paymentAmount\"),\r\n\t\t\t\trender: payment => getFormatedNumberString(payment.amtPay, true),\r\n\t\t\t\tsorting: false,\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t},\r\n {\r\n title: getString(\"paymentAmtBal\"),\r\n render: (payment) => getFormatedNumberString(payment.amtBal, true),\r\n sorting: false,\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n },\r\n {\r\n title: getString(\"paymentAmtBalNonAlloc\"),\r\n render: (payment) => getFormatedNumberString(payment.amtNonAllocBal, true),\r\n sorting: false,\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n },\r\n {\r\n title: getString(\"paymentAmtOrdersBal\"),\r\n render: (payment) => getFormatedNumberString(payment.amtOrdersBal, true),\r\n sorting: false,\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n },\r\n {\r\n title: getString(\"paymentAmtTradesBal\"),\r\n render: (payment) => getFormatedNumberString(payment.amtTransBal, true),\r\n sorting: false,\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n },\r\n ],\r\n [getString, getFormatedNumberString, getDateString]\r\n ) as Column[];\r\n};\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport ViewIcon from \"@material-ui/icons/InputOutlined\";\r\nimport { PaymentListData } from \"../../../../../data/clearing/payments/types\";\r\nimport { LocalizationContext } from \"../../../../../core/localization/Localization\";\r\nimport { MaterialTableProps } from \"material-table\";\r\nimport { useViewPayment } from \"../../../../clearing/payments/DisplayPayment\";\r\n\r\nexport function usePaymentsActions() {\r\n const { getString } = useContext(LocalizationContext);\r\n const onShowPayment = useViewPayment();\r\n\r\n return useMemo(() => {\r\n const result: MaterialTableProps[\"actions\"] = [\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"orderActView\"),\r\n onClick: (event, rowData) => onShowPayment(rowData as PaymentListData),\r\n },\r\n ];\r\n return result;\r\n }, [onShowPayment, getString]);\r\n}\r\n","import { ClientOverviewFilter, GetClientOverviewParams } from \"../types\";\r\nimport { TradeList } from \"../../../../trading/trades/types\";\r\nimport { User } from \"../../../../auth/types\";\r\nimport { webApiWithResponse } from \"../../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../../core/util/functions\";\r\n\r\nconst getTradesWebApi = (\r\n user: User,\r\n page: number,\r\n itemsPerPage: number,\r\n filter: ClientOverviewFilter\r\n) => {\r\n const params: GetClientOverviewParams = {\r\n userid: user.userId,\r\n fromrow: page * itemsPerPage,\r\n numofrows: itemsPerPage,\r\n cliid: filter.client?.cliId,\r\n datefrom: getParamsDateString(filter.datefrom),\r\n dateto: getParamsDateString(filter.dateto),\r\n status: filter.tradeStatus?.ftValue,\r\n };\r\n\r\n\r\n return webApiWithResponse({\r\n method: \"GET\",\r\n url: \"trade/gettradelist\",\r\n params,\r\n });\r\n};\r\nexport default getTradesWebApi;\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport getTrades from \"../api/getTrades\";\r\nimport { PageDataStatus, PageData } from \"../../../../models\";\r\nimport { TradeList } from \"../../../../trading/trades/types\";\r\nimport { ClientOverviewFilter } from \"../types\";\r\n\r\nexport const getTradesThunk = (\r\n\tpageNumber: number,\r\n\titemsPerPage: number,\r\n\tfilter: ClientOverviewFilter\r\n): ThunkType | undefined>> => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst user = store.data.auth.current.user;\r\n\r\n\tconst tradesData = await dispatch(getTrades(user, pageNumber, itemsPerPage, filter));\r\n\r\n\tif (!tradesData || tradesData.resCode !== \"OK\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\treturn {\r\n\t\tcurrentPageData: tradesData.obj,\r\n\t\ttotalCount: Number(tradesData.resDesc) || 0,\r\n\t\tstatus: PageDataStatus.DataCurrent,\r\n\t};\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { loadTrades } from \"../thunks/loadTrades\";\r\nimport { PageData } from \"../../../../../data/models\";\r\nimport { TradeList } from \"../../../../trading/trades/types\";\r\n\r\nexport const useTradesData = () => {\r\n\tconst pageData = useSelector | undefined>(\r\n\t\ts => s.data.reports.exchbusiness.clientOverview.currentPageTrade\r\n\t\t// (s) => s.data.trading.trades.currentPage\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchLoadTradesPage = React.useCallback(() => dispatch(loadTrades()), [dispatch]);\r\n\r\n\treturn [pageData, dispatchLoadTradesPage] as [typeof pageData, typeof dispatchLoadTradesPage];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { setCOTradesData } from \"../clientOverviewDataSlice\";\r\nimport { getTradesThunk } from \"./getTradesThunk\";\r\nimport { TableType } from \"../types\";\r\n\r\nexport const loadTrades = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tconst { pageNumber, itemsPerPage } = store.ux.reports.exchbusiness.clientOverview.index[TableType.Trades];\r\n\tconst { filter } = store.ux.reports.exchbusiness.clientOverview;\r\n\r\n\tconst tradesData = await dispatch(getTradesThunk(pageNumber, itemsPerPage, filter));\r\n\r\n\tif (tradesData) {\r\n\t\tdispatch(setCOTradesData(tradesData));\r\n\t}\r\n};\r\n\r\n","import React from \"react\";\r\nimport { TradeList } from \"../../../../../data/trading/trades/types\";\r\nimport { PaginationTable } from \"../../../../components/common/PagginationTable\";\r\nimport { useTradeColumns } from \"../../../../../views/trading/trades/useTradeColumns\";\r\nimport { useClientOverviewIndex } from \"../../../../../data/reports/exchbusiness/clientOverview/hooks/useClientOverviewIndex\";\r\nimport { useTradesData } from \"../../../../../data/reports/exchbusiness/clientOverview/hooks/useTradesData\";\r\nimport { TableType } from \"../../../../../data/reports/exchbusiness/clientOverview/types\";\r\nimport { PageDataStatus } from \"../../../../../data/models\";\r\nimport { useTradeActions } from \"./useTradeActions\";\r\n\r\nconst ClientOverviewTradesTable: React.FunctionComponent = () => {\r\n\tconst columns = useTradeColumns();\r\n\r\n\tconst [data, loadData] = useTradesData();\r\n\tconst [index, setIndex] = useClientOverviewIndex(TableType.Trades);\r\n\tconst actions = useTradeActions()\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (data && data.status === PageDataStatus.DataInvalidated) {\r\n\t\t\tloadData();\r\n\t\t}\r\n\t}, [loadData, data]);\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\tgetData={loadData}\r\n\t\t\tpageData={data}\r\n\t\t\tonPageIndexChange={setIndex}\r\n\t\t\tpageIndex={index}\r\n\t\t\ttitle=\"\"\r\n\t\t\tcolumns={columns}\r\n\t\t\tactions={actions}\r\n\t\t\toptions={{\r\n\t\t\t\tactionsColumnIndex: -1,\r\n\t\t\t\tsearch: false,\r\n\t\t\t\ttoolbar: false,\r\n\t\t\t}}\r\n\t\t/>\r\n\t);\r\n};\r\n\r\nexport default ClientOverviewTradesTable;\r\n","import { getEditLocation } from \"../../../../core/util/functions\";\r\n\r\nexport enum ClientOverviewParts {\r\n\tOrders = \"orders\",\r\n\tTrades = \"trades\",\r\n\tPayments = \"payments\",\r\n\tDeliveries = \"deliveries\",\r\n}\r\n\r\nexport const clientsOverviewLocation = \"/reports/exchbusiness/clientoverview\";\r\n\r\nexport const getClientsOverviewLocation = (\r\n\tpart: ClientOverviewParts = ClientOverviewParts.Orders,\r\n\tclientId?: string,\r\n\tattributeId?: string\r\n) => getEditLocation(clientsOverviewLocation, part, clientId, attributeId);\r\n\r\nexport const ordersView = getClientsOverviewLocation(ClientOverviewParts.Orders, \":clientId\", \":orderId?\");\r\nexport const tradesView = getClientsOverviewLocation(ClientOverviewParts.Trades, \":clientId\", \":tradeId?\");\r\nexport const paymentsView = getClientsOverviewLocation(ClientOverviewParts.Payments, \":clientId\", \":paymentId?\");\r\nexport const deliveriesView = getClientsOverviewLocation(ClientOverviewParts.Deliveries, \":clientId\", \":deliveryId?\");\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport ViewIcon from \"@material-ui/icons/InputOutlined\";\r\nimport { TradeList } from \"../../../../../data/trading/trades/types\";\r\nimport { LocalizationContext } from \"../../../../../core/localization/Localization\";\r\nimport { MaterialTableProps } from \"material-table\";\r\nimport { useViewTrade } from \"../../../../trading/trades/DisplayTrade\";\r\n\r\nexport function useTradeActions() {\r\n\tconst { getString } = useContext(LocalizationContext);\r\n\tconst onShowTrade = useViewTrade();\r\n\r\n\treturn useMemo[\"actions\"]>(\r\n\t\t() => [\r\n\t\t\t{\r\n\t\t\t\ticon: () => ,\r\n\t\t\t\ttooltip: getString(\"tradeViewAction\"),\r\n\t\t\t\tonClick: (event, rowData) => onShowTrade(rowData as TradeList),\r\n\t\t\t},\r\n\t\t],\r\n\t\t[onShowTrade, getString]\r\n\t);\r\n}\r\n","import React, { useContext } from \"react\";\r\nimport { Grid, CardContent, CardHeader, Card, Divider, Typography, Tabs, Tab } from \"@material-ui/core\";\r\nimport { usePageStyles } from \"../../../pageStyles\";\r\nimport { PageComponent } from \"../../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../../components/common/PageTitle\";\r\nimport { useMainBoardData } from \"../../../../data/trading/mainBoard/hooks/useMainBoardData\";\r\nimport { OrderSide, PageDataStatus } from \"../../../../data/models\";\r\nimport { ProductGraph } from \"./ProductGraph\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\r\nimport { useTheme } from '@material-ui/core/styles';\r\n\r\nconst HistoricalPricesPage: PageComponent = ({ userAccessRights }) => {\r\n\tconst pageStyles = usePageStyles();\r\n\tconst { getString } = useContext(LocalizationContext);\r\n\r\n\tconst [tab, setTab] = React.useState(ProductSelectHistory.Kukuruz);\r\n\r\n\tconst theme = useTheme();\r\n\tconst screenExtraSmall = useMediaQuery(theme.breakpoints.only('xs'));\r\n\r\n\tconst handleSideChange = React.useCallback(\r\n\t\t(event: React.ChangeEvent<{}>, newValue: any) => {\r\n\t\t\tsetTab(newValue);\r\n\t\t},\r\n\t\t[setTab]\r\n\t);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t{\tscreenExtraSmall===true && (\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\t\t\t\r\n\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\t
\r\n\t\t\t\t\t\t\t{tab === ProductSelectHistory.Kukuruz && (\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\r\n\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t{tab === ProductSelectHistory.Psenica && (\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\r\n\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t{tab === ProductSelectHistory.Soja && (\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\r\n\t\t\t\t\t)}\r\n\t\t\t\t\t\t
\r\n\t\t\t
\r\n\r\n\t\t
) }\r\n\t\t{\tscreenExtraSmall!==true && (\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t ) }\r\n\t\t\r\n);\r\n\r\n};\r\n\r\nexport default HistoricalPricesPage;\r\n\r\nexport enum ProductSelectHistory {\r\n\tKukuruz = \"Kukuruz\",\r\n\tPsenica = \"Psenica\",\r\n\tSoja = \"Soja nije GMO\",\r\n}\r\n","import { useCopiedState } from \"../../../../../core/util/hooks\";\r\nimport { setFilter, removeFilter, initialState } from \"../clientOverviewUXSlice\";\r\nimport { invalidateData } from \"../clientOverviewDataSlice\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport React from \"react\";\r\nimport { ClientOverviewFilter } from \"../types\";\r\n\r\nexport const useClientOverviewFilter = () => {\r\n\tconst [storeFilter] = useCurrentClientOverviewFilter();\r\n\tconst [filter, editFilter, changeState, setCurrentFilter] = useCopiedState(\r\n\t\tstoreFilter\r\n\t);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchSetFilter = React.useCallback(() => {\r\n\t\tdispatch(setFilter(filter!));\r\n\t\tdispatch(invalidateData());\r\n\t}, [dispatch, filter]);\r\n\r\n\tconst dispatchResetFilter = React.useCallback(() => {\r\n\t\tsetCurrentFilter(initialState.filter);\r\n\t}, [setCurrentFilter]);\r\n\r\n\treturn [filter, editFilter, dispatchSetFilter, changeState, dispatchResetFilter] as [\r\n\t\ttypeof filter,\r\n\t\ttypeof editFilter,\r\n\t\ttypeof dispatchSetFilter,\r\n\t\ttypeof changeState,\r\n\t\ttypeof dispatchResetFilter\r\n\t];\r\n};\r\n\r\nexport const useCurrentClientOverviewFilter = () => {\r\n\tconst filter = useSelector(\r\n\t\tstore => store.ux.reports.exchbusiness.clientOverview.filter\r\n\t);\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchRemoveFilter = React.useCallback(\r\n\t\t(type: keyof ClientOverviewFilter) => {\r\n\t\t\tdispatch(removeFilter(type));\r\n\t\t\tdispatch(invalidateData());\r\n\t\t},\r\n\t\t[dispatch]\r\n\t);\r\n\r\n\treturn [filter, dispatchRemoveFilter] as [typeof filter, typeof dispatchRemoveFilter];\r\n};\r\n","import React from \"react\";\r\nimport { Grid, Paper, Button, Typography } from \"@material-ui/core\";\r\nimport { DateInput } from \"../../../components/common/DateInput\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { ClientOverviewFilter } from \"../../../../data/reports/exchbusiness/clientOverview/types\";\r\nimport { ClientSelect } from \"../../../components/listing/ClientSelect\";\r\nimport { ClientOverviewFilterChipsComponent } from \"./ClientOverviewFilterChips\";\r\nimport { DisplayDrawerContext } from \"../../../../layout/DisplayDrawerContext\";\r\nimport { isValidDate } from \"../../../../core/util/functions\";\r\nimport { OrderStatusSelect } from \"../../../components/common/OrderStatusSelect\";\r\nimport { ClientOverviewParts } from \"./Locations\";\r\nimport { TradeStatusSelect } from \"../../../components/common/TradeStatusSelect\";\r\nimport { FiltredTransactionsSelect } from \"../../../components/trading/FiltredTransactionsSelect\";\r\nimport { SimpleTransFilter } from \"../../../../data/trading/transactions/types\";\r\nimport { TransSimpleData } from \"../../../../data/trading/transactions/types\";\r\n\r\ninterface ClientOverviewFilterEditorProps {\r\n\tfilter?: ClientOverviewFilter;\r\n\teditFilter: (prop: keyof ClientOverviewFilter, value: any) => void;\r\n\tsave: () => void;\r\n\ttype?: ClientOverviewParts;\r\n\treset?: () => void;\r\n}\r\n\r\nexport const ClientOverviewFilterEditor: React.FunctionComponent = ({\r\n\tfilter,\r\n\teditFilter,\r\n\tsave,\r\n\ttype,\r\n\treset,\r\n}) => {\r\n\tconst showWithDrawer = React.useContext(DisplayDrawerContext);\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\tconst [tradesFilter, setTransactionFilter] = React.useState(\r\n\t\tcreateTransactionFilterPayment(filter)\r\n\t);\r\n\tconst [selectedOrder, setSelectedOrder] = React.useState(null);\r\n\r\n React.useEffect(() => {\r\n\t\tsetTransactionFilter(createTransactionFilterPayment(filter));\r\n\t}, [filter, setTransactionFilter]);\r\n\r\n\r\n\treturn (\r\n\t\t\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\t\r\n\t\t\t\t\t\t\t\teditFilter(\"datefrom\", isValidDate(date) ? date.toISOString() : undefined)\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tdisableFuture\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\t\t\teditFilter(\"dateto\", isValidDate(date) ? date.toISOString() : undefined)\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tdisableFuture\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 client.cliId === filter?.client?.cliId}\r\n\t\t\t\t\t\t\tonChangeItem={client => editFilter(\"client\", client)}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t\r\n\t\t\t\t\t{type === ClientOverviewParts.Orders && (\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t status.ftValue === filter?.orderStatus?.ftValue}\r\n\t\t\t\t\t\t\t\tonChangeItem={status => {\r\n\t\t\t\t\t\t\t\t\teditFilter(\"orderStatus\", status);\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\t{type === ClientOverviewParts.Trades && (\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t status.ftValue === filter?.tradeStatus?.ftValue}\r\n\t\t\t\t\t\t\t\tonChangeItem={status => {\r\n\t\t\t\t\t\t\t\t\teditFilter(\"tradeStatus\", status);\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\r\n\t\t\t\t{type === ClientOverviewParts.Payments && (\r\n\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t trans.ordId === filter?.tranId}\r\n\t\t\t\t\t\t\t\t\t\tonChangeItem={trans => {\r\n\t\t\t\t\t\t\t\t\t\t\tsetSelectedOrder(trans);\r\n\t\t\t\t\t\t\t\t\t\t\teditFilter(\"tranId\", trans ? trans.ordId : undefined);\r\n\t\t\t\t\t\t\t\t\t\t\teditFilter(\"tranDesc\", trans ? trans.ordData : undefined);\r\n\t\t\t\t\t\t\t\t\t\t}}\r\n disabled={false}\r\n\t\t\t\t\t\t\t\t/>\r\n\t \t\t\t\r\n\t\t\t\t )}\r\n\r\n\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\tsave();\r\n\t\t\t\t\t\t\t\tshowWithDrawer(undefined);\r\n\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t{getString(\"orderFilterConfirm\")}\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};\r\n\r\n\r\nconst createTransactionFilterPayment = (filter?: ClientOverviewFilter) => {\r\n\treturn filter && filter.client && filter.client.cliId\r\n\t\t? {\r\n\t\t\t\tcliid: filter.client.cliId,\r\n\t\t }\r\n\t\t: undefined;\r\n};\r\n\r\nexport const ClientOverviewFilterChips = ClientOverviewFilterChipsComponent;\r\n","import React from \"react\";\r\nimport { Chip, Grid } from \"@material-ui/core\";\r\nimport { ClientOverviewFilter } from \"../../../../data/reports/exchbusiness/clientOverview/types\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\n\r\nexport const ClientOverviewFilterChipsComponent: React.FunctionComponent = ({\r\n filter,\r\n removeFilter,\r\n}) => {\r\n const { getDateString, getString } = React.useContext(LocalizationContext);\r\n \r\n return (\r\n \r\n {filter.datefrom && (\r\n \r\n removeFilter(\"datefrom\")}\r\n />\r\n \r\n )}\r\n {filter.dateto && (\r\n \r\n removeFilter(\"dateto\")}\r\n />\r\n \r\n )}\r\n {filter.client && (\r\n \r\n {\r\n removeFilter(\"client\");\r\n removeFilter(\"tranId\");\r\n }}\r\n />\r\n \r\n )}\r\n {filter.orderStatus && (\r\n \r\n removeFilter(\"orderStatus\")}\r\n />\r\n \r\n )}\r\n {filter.tradeStatus && (\r\n \r\n removeFilter(\"tradeStatus\")}\r\n />\r\n \r\n )}\r\n {filter.tranId && (\r\n \r\n removeFilter(\"tranId\")}\r\n />\r\n \r\n )}\r\n\r\n \r\n );\r\n};\r\n\r\ninterface ClientOverviewFilterChipsProps {\r\n filter: ClientOverviewFilter;\r\n removeFilter: (type: keyof ClientOverviewFilter) => void;\r\n}\r\n","import React from \"react\";\r\nimport FilterIcon from \"@material-ui/icons/FilterListOutlined\";\r\nimport { IconButton, Grid } from \"@material-ui/core\";\r\nimport { DisplayDrawerContext } from \"../../../../layout/DisplayDrawerContext\";\r\nimport { useClientOverviewFilter, \tuseCurrentClientOverviewFilter, } from \"../../../../data/reports/exchbusiness/clientOverview/hooks/useClientOverviewFilter\";\r\nimport {\r\n\tClientOverviewFilterEditor,\r\n\tClientOverviewFilterChips,\r\n} from \"../clientOverview/ClientOverviewFilterEditor\";\r\nimport { CustomTooltip } from \"../../../components/common/CustomTooltip\";\r\nimport { ClientOverviewParts } from \"./Locations\";\r\n\r\nexport const ClientOverviewFilterButton: React.FunctionComponent<{tab?: ClientOverviewParts}> = ({ tab }) => {\r\n\tconst showWithDrawer = React.useContext(DisplayDrawerContext);\r\n\tconst showFilter = React.useCallback(() => showWithDrawer(), [showWithDrawer, tab]);\r\n\r\n\tconst [filter, removeFilter] = useCurrentClientOverviewFilter();\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\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\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};\r\n\r\nconst ClientsOverviewFilterEditor: React.FunctionComponent<{tab?: ClientOverviewParts}> = ({ tab }) => {\r\n\tconst [filter, editFilter, save, , rest] = useClientOverviewFilter();\r\n\treturn (\r\n\t\t\r\n\t);\r\n};\r\n","import { User } from \"../../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../../core/util/functions\";\r\nimport { ClientOverviewFilter } from \"../types\";\r\n\r\nexport const getOrderListReport = (user: User, filter?: ClientOverviewFilter) => {\r\n\treturn httpWebApi({\r\n\t\tmethod: \"GET\",\r\n\t\tresponseType: \"blob\",\r\n\t\ttimeout: 60 * 4 * 1000,\r\n\t\turl: \"reporting/getorderbookreport\",\r\n\t\tparams: {\r\n\t\t\tuserid: user.userId,\r\n\t\t\tstatus: filter?.orderStatus?.ftValue,\r\n\t\t\tcliid: filter?.client?.cliId,\r\n\t\t\tdatefrom: getParamsDateString(filter?.datefrom),\r\n\t\t\tdateto: getParamsDateString(filter?.dateto),\r\n\t\t\tclicard: \"C\",\r\n\t\t},\r\n\t});\r\n};\r\n\r\nexport default getOrderListReport;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadOrdersReport } from \"../thunks/downloadOrdersReport\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\n\r\nexport const useOrderReportDownloader = () => {\r\n\tconst fetchState = useSelector(\r\n\t\ts => s.data.reports.exchbusiness.clientOverview.fetchState\r\n\t);\r\n\tconst dispatch = useDispatch();\r\n\tconst download = React.useCallback(() => dispatch(downloadOrdersReport()), [dispatch]);\r\n\r\n\treturn [download, fetchState] as [typeof download, typeof fetchState]\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { getOrderListReport } from \"../api/getOrderListReport\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../clientOverviewDataSlice\"\r\n\r\nexport const downloadOrdersReport = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst { filter } = store.ux.reports.exchbusiness.clientOverview;\r\n\tconst user = store.data.auth.current.user;\r\n\tdispatch(setFetchState({ type: \"started\"}))\r\n\tconst ordersReport = await dispatch(getOrderListReport(user, filter));\r\n\tif (ordersReport) {\r\n\t\tfileDownload(new Blob([ordersReport as any], { type: \"application/pdf\" }), \"OrderBook.pdf\");\r\n\t}\r\n\tdispatch(setFetchState({ type: \"not-started\"}))\r\n};\r\n","import { User } from \"../../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../../core/util/functions\";\r\nimport { ClientOverviewFilter } from \"../types\";\r\n\r\nexport const getOrderListReportExcel = (user: User, filter?: ClientOverviewFilter) => {\r\n\treturn httpWebApi({\r\n\t\tmethod: \"GET\",\r\n\t\tresponseType: \"blob\",\r\n\t\ttimeout: 60 * 4 * 1000,\r\n\t\turl: \"reporting/getorderbookxls\",\r\n\t\tparams: {\r\n\t\t\tuserid: user.userId,\r\n\t\t\tstatus: filter?.orderStatus?.ftValue,\r\n\t\t\tcliid: filter?.client?.cliId,\r\n\t\t\tdatefrom: getParamsDateString(filter?.datefrom),\r\n\t\t\tdateto: getParamsDateString(filter?.dateto),\r\n\t\t},\r\n\t});\r\n};\r\n\r\nexport default getOrderListReportExcel;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadOrdersReportExcel } from \"../thunks/downloadOrdersReportExcel\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\n\r\nexport const useOrderExcelReportDownloader = () => {\r\n\tconst fetchState = useSelector(\r\n\t\ts => s.data.reports.exchbusiness.clientOverview.fetchState\r\n\t);\r\n\tconst dispatch = useDispatch();\r\n\tconst download = React.useCallback(() => dispatch(downloadOrdersReportExcel()), [dispatch]);\r\n\r\n\treturn [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { getOrderListReportExcel } from \"../api/getOrderListReportExcel\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../clientOverviewDataSlice\"\r\n\r\nexport const downloadOrdersReportExcel = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst { filter } = store.ux.reports.exchbusiness.clientOverview;\r\n\tconst user = store.data.auth.current.user;\r\n\tdispatch(setFetchState({ type: \"started\"}))\r\n\tconst ordersReport = await dispatch(getOrderListReportExcel(user, filter));\r\n\tif (ordersReport) {\r\n\t\tfileDownload(new Blob([ordersReport as any], { type: \"application/vnd.openxmlformat\" }), \"OrderBook.xlsx\");\r\n\t}\r\n\tdispatch(setFetchState({ type: \"not-started\"}))\r\n};\r\n","import React from \"react\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport ExcelIcon from \"@material-ui/icons/TableChartOutlined\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../../../components/common/CustomTooltip\";\r\nimport { useOrderReportDownloader } from \"../../../../../data/reports/exchbusiness/clientOverview/hooks/useOrderReportDownloader\";\r\nimport { useOrderExcelReportDownloader } from \"../../../../../data/reports/exchbusiness/clientOverview/hooks/useOrderExcelReportDownloader\";\r\n\r\nexport const DownloadOrderButton: React.FunctionComponent = () => {\r\n\tconst [downloader, fetchState] = useOrderReportDownloader();\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport const DownloadOrderButtonExcel: React.FunctionComponent = () => {\r\n\tconst [downloader, fetchState] = useOrderExcelReportDownloader();\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n","import { User } from \"../../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../../core/util/functions\";\r\nimport { ClientOverviewFilter } from \"../types\";\r\n\r\nexport const getTradeBookReport = (user: User, filter?: ClientOverviewFilter) => {\r\n\treturn httpWebApi({\r\n\t\tmethod: \"GET\",\r\n\t\tresponseType: \"blob\",\r\n\t\ttimeout: 60 * 4 * 1000,\r\n\t\turl: \"reporting/gettradebookreport\",\r\n\t\tparams: {\r\n\t\t\tuserid: user.userId,\r\n\t\t\tclientid: filter?.client?.cliId,\r\n\t\t\tstatus: filter?.tradeStatus?.ftValue,\r\n\t\t\tdatefrom: getParamsDateString(filter?.datefrom),\r\n\t\t\tdateto: getParamsDateString(filter?.dateto),\r\n\t\t\tclicard: \"C\",\r\n\t\t},\r\n\t});\r\n};\r\n\r\nexport default getTradeBookReport;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadTradesReport } from \"../thunks/downloadTradesReport\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\n\r\nexport const useTradesReportDownloader = () => {\r\n\tconst fetchState = useSelector(\r\n\t\ts => s.data.reports.exchbusiness.clientOverview.fetchState\r\n\t);\r\n\tconst dispatch = useDispatch();\r\n\tconst download = React.useCallback(() => dispatch(downloadTradesReport()), [dispatch]);\r\n\r\n\treturn [download, fetchState] as [typeof download, typeof fetchState]\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { getTradeBookReport } from \"../api/getTradeBookReport\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../clientOverviewDataSlice\"\r\n\r\nexport const downloadTradesReport = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst { filter } = store.ux.reports.exchbusiness.clientOverview;\r\n\tconst user = store.data.auth.current.user;\r\n\tdispatch(setFetchState({ type: \"started\"}))\r\n\tconst ordersReport = await dispatch(getTradeBookReport(user, filter));\r\n\tif (ordersReport) {\r\n\t\tfileDownload(new Blob([ordersReport as any], { type: \"application/pdf\" }), \"TradeBook.pdf\");\r\n\t}\r\n\tdispatch(setFetchState({ type: \"not-started\"}))\r\n};\r\n","import { User } from \"../../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../../core/util/functions\";\r\nimport { ClientOverviewFilter } from \"../types\";\r\n\r\nexport const getTradeBookExcel = (user: User, filter?: ClientOverviewFilter) => {\r\n\treturn httpWebApi({\r\n\t\tmethod: \"GET\",\r\n\t\tresponseType: \"blob\",\r\n\t\ttimeout: 60 * 4 * 1000,\r\n\t\turl: \"reporting/gettradebookxls\",\r\n\t\tparams: {\r\n\t\t\tuserid: user.userId,\r\n\t\t\tclientid: filter?.client?.cliId,\r\n\t\t\tstatus: filter?.tradeStatus?.ftValue,\r\n\t\t\tdatefrom: getParamsDateString(filter?.datefrom),\r\n\t\t\tdateto: getParamsDateString(filter?.dateto),\r\n\t\t},\r\n\t});\r\n};\r\n\r\nexport default getTradeBookExcel;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadTradesReportExcel } from \"../thunks/downloadTradesReportExcel\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\n\r\nexport const useTradesExcelReportDownloader = () => {\r\n\tconst fetchState = useSelector(\r\n\t\ts => s.data.reports.exchbusiness.clientOverview.fetchState\r\n\t);\r\n\tconst dispatch = useDispatch();\r\n\tconst download = React.useCallback(() => dispatch(downloadTradesReportExcel()), [dispatch]);\r\n\r\n\treturn [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { getTradeBookExcel } from \"../api/getTradeBookExcel\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../clientOverviewDataSlice\";\r\n\r\nexport const downloadTradesReportExcel = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst { filter } = store.ux.reports.exchbusiness.clientOverview;\r\n\tconst user = store.data.auth.current.user;\r\n\tdispatch(setFetchState({ type: \"started\" }));\r\n\tconst ordersReport = await dispatch(getTradeBookExcel(user, filter));\r\n\tif (ordersReport) {\r\n\t\tfileDownload(\r\n\t\t\tnew Blob([ordersReport as any], { type: \"application/vnd.openxmlformat\" }),\r\n\t\t\t\"TradeBook.xlsx\"\r\n\t\t);\r\n\t}\r\n\tdispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import React from \"react\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport ExcelIcon from \"@material-ui/icons/TableChartOutlined\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../../../components/common/CustomTooltip\";\r\nimport { useTradesReportDownloader } from \"../../../../../data/reports/exchbusiness/clientOverview/hooks/useTradesReportDownloader\";\r\nimport { useTradesExcelReportDownloader } from \"../../../../../data/reports/exchbusiness/clientOverview/hooks/useTradesExcelReportDownloader\";\r\n\r\nexport const DownloadTradesButton: React.FunctionComponent = () => {\r\n\tconst [downloader, fetchState] = useTradesReportDownloader();\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport const DownloadTradesButtonExcel: React.FunctionComponent = () => {\r\n\tconst [downloader, fetchState] = useTradesExcelReportDownloader();\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n","import { User } from \"../../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../../core/util/functions\";\r\nimport { ClientOverviewFilter } from \"../types\";\r\n\r\nexport const getPaymentsReport = (user: User, filter?: ClientOverviewFilter) => {\r\n\treturn httpWebApi({\r\n\t\tmethod: \"GET\",\r\n\t\tresponseType: \"blob\",\r\n\t\ttimeout: 60 * 4 * 1000,\r\n\t\turl: \"reporting/getpaymentsreport\",\r\n\t\tparams: {\r\n\t\t\tuserid: user.userId,\r\n\t\t\tcliid: user.roleCode !== \"MEMTRADER\" && user.roleCode !== \"MEMMANAGER\" && user.roleCode !== \"MEMCONTACT\" ? filter?.client?.cliId : user.clientId ,\r\n\t\t\tdatefrom: getParamsDateString(filter?.datefrom),\r\n\t\t\tdateto: getParamsDateString(filter?.dateto),\r\n\t\t\tclicard: \"C\",\r\n\t\t},\r\n\t});\r\n};\r\n\r\nexport default getPaymentsReport;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadPaymentsReport } from \"../thunks/downloadPaymentsReport\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\n\r\nexport const usePaymentsReportDownloader = () => {\r\n\tconst fetchState = useSelector(\r\n\t\ts => s.data.reports.exchbusiness.clientOverview.fetchState\r\n\t);\r\n\tconst dispatch = useDispatch();\r\n\tconst download = React.useCallback(() => dispatch(downloadPaymentsReport()), [dispatch]);\r\n\r\n\treturn [download, fetchState] as [typeof download, typeof fetchState]\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { getPaymentsReport } from \"../api/getPaymentsReport\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../clientOverviewDataSlice\"\r\n\r\nexport const downloadPaymentsReport = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst { filter } = store.ux.reports.exchbusiness.clientOverview;\r\n\tconst user = store.data.auth.current.user;\r\n\tdispatch(setFetchState({ type: \"started\"}))\r\n\tconst ordersReport = await dispatch(getPaymentsReport(user, filter));\r\n\tif (ordersReport) {\r\n\t\tfileDownload(new Blob([ordersReport as any], { type: \"application/pdf\" }), \"Payments.pdf\");\r\n\t}\r\n\tdispatch(setFetchState({ type: \"not-started\"}))\r\n};\r\n","import { User } from \"../../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../../core/util/functions\";\r\nimport { ClientOverviewFilter } from \"../types\";\r\n\r\nexport const getPaymentsReportExcel = (user: User, filter?: ClientOverviewFilter) => {\r\n\treturn httpWebApi({\r\n\t\tmethod: \"GET\",\r\n\t\tresponseType: \"blob\",\r\n\t\ttimeout: 60 * 4 * 1000,\r\n\t\turl: \"reporting/getpaymentsxls\",\r\n\t\tparams: {\r\n\t\t\tuserid: user.userId,\r\n\t\t\tcliid: user.roleCode !== \"MEMTRADER\" && user.roleCode !== \"MEMMANAGER\" && user.roleCode !== \"MEMCONTACT\" ? filter?.client?.cliId : user.clientId ,\r\n\t\t\tdatefrom: getParamsDateString(filter?.datefrom),\r\n\t\t\tdateto: getParamsDateString(filter?.dateto),\r\n\t\t},\r\n\t});\r\n};\r\n\r\nexport default getPaymentsReportExcel;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadPaymentsReportExcel } from \"../thunks/downloadPaymentsReportExcel\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\n\r\nexport const usePaymentsExcelReportDownloader = () => {\r\n\tconst fetchState = useSelector(\r\n\t\ts => s.data.reports.exchbusiness.clientOverview.fetchState\r\n\t);\r\n\tconst dispatch = useDispatch();\r\n\tconst download = React.useCallback(() => dispatch(downloadPaymentsReportExcel()), [dispatch]);\r\n\r\n\treturn [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { getPaymentsReportExcel } from \"../api/getPaymentsReportExcel\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../clientOverviewDataSlice\";\r\n\r\nexport const downloadPaymentsReportExcel = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst { filter } = store.ux.reports.exchbusiness.clientOverview;\r\n\tconst user = store.data.auth.current.user;\r\n\tdispatch(setFetchState({ type: \"started\" }));\r\n\tconst ordersReport = await dispatch(getPaymentsReportExcel(user, filter));\r\n\tif (ordersReport) {\r\n\t\tfileDownload(\r\n\t\t\tnew Blob([ordersReport as any], { type: \"application/vnd.openxmlformat\" }),\r\n\t\t\t\"Payments.xlsx\"\r\n\t\t);\r\n\t}\r\n\tdispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import React from \"react\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport ExcelIcon from \"@material-ui/icons/TableChartOutlined\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../../../components/common/CustomTooltip\";\r\nimport { usePaymentsReportDownloader } from \"../../../../../data/reports/exchbusiness/clientOverview/hooks/usePaymentsReportDownloader\";\r\nimport { usePaymentsExcelReportDownloader } from \"../../../../../data/reports/exchbusiness/clientOverview/hooks/usePaymentsExcelReportDownloader\";\r\n\r\nexport const DownloadPaymentsButton: React.FunctionComponent = () => {\r\n\tconst [downloader, fetchState] = usePaymentsReportDownloader();\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport const DownloadPaymentsButtonExcel: React.FunctionComponent = () => {\r\n\tconst [downloader, fetchState] = usePaymentsExcelReportDownloader();\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n","import { User } from \"../../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../../core/util/functions\";\r\nimport { ClientOverviewFilter } from \"../types\";\r\n\r\nexport const getDeliveryReport = (user: User, filter?: ClientOverviewFilter) => {\r\n\r\n\treturn httpWebApi({\r\n\t\tmethod: \"GET\",\r\n\t\tresponseType: \"blob\",\r\n\t\ttimeout: 60 * 4 * 1000,\r\n\t\turl: \"reporting/getdlvrgoodsreport\",\r\n\t\tparams: {\r\n\t\t\tuserid: user.userId,\r\n\r\n\t\t\tcliid: user.roleCode !== \"MEMTRADER\" && user.roleCode !== \"MEMMANAGER\" && user.roleCode !== \"MEMCONTACT\" ? filter?.client?.cliId : user.clientId ,\r\n\t\t\tdatefrom: getParamsDateString(filter?.datefrom),\r\n\t\t\tdateto: getParamsDateString(filter?.dateto),\r\n\t\t\tclicard: \"C\",\r\n\t\t},\r\n\t});\r\n};\r\n\r\nexport default getDeliveryReport;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadDeliveryReport } from \"../thunks/downloadDeliveryReport\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\n\r\nexport const useDeliveryReportDownloader = () => {\r\n\tconst fetchState = useSelector(\r\n\t\ts => s.data.reports.exchbusiness.clientOverview.fetchState\r\n\t);\r\n\tconst dispatch = useDispatch();\r\n\tconst download = React.useCallback(() => dispatch(downloadDeliveryReport()), [dispatch]);\r\n\r\n\treturn [download, fetchState] as [typeof download, typeof fetchState]\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { getDeliveryReport } from \"../api/getDeliveryReport\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../clientOverviewDataSlice\"\r\n\r\nexport const downloadDeliveryReport = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst { filter } = store.ux.reports.exchbusiness.clientOverview;\r\n\r\n\tconsole.log(filter)\r\n\tconst user = store.data.auth.current.user;\r\n\tdispatch(setFetchState({ type: \"started\"}))\r\n\tconst ordersReport = await dispatch(getDeliveryReport(user, filter));\r\n\tif (ordersReport) {\r\n\t\tfileDownload(new Blob([ordersReport as any], { type: \"application/pdf\" }), \"Delivery.pdf\");\r\n\t}\r\n\tdispatch(setFetchState({ type: \"not-started\"}))\r\n};\r\n","import { User } from \"../../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../../core/util/functions\";\r\nimport { ClientOverviewFilter } from \"../types\";\r\n\r\nexport const getDeliveryReportExcel = (user: User, filter?: ClientOverviewFilter) => {\r\n\treturn httpWebApi({\r\n\t\tmethod: \"GET\",\r\n\t\tresponseType: \"blob\",\r\n\t\ttimeout: 60 * 4 * 1000,\r\n\t\turl: \"reporting/getdlvrgoodsxls\",\r\n\t\tparams: {\r\n\t\t\tuserid: user.userId,\r\n\t\t\tcliid: user.roleCode !== \"MEMTRADER\" && user.roleCode !== \"MEMMANAGER\" && user.roleCode !== \"MEMCONTACT\" ? filter?.client?.cliId : user.clientId ,\r\n\t\t\tdatefrom: getParamsDateString(filter?.datefrom),\r\n\t\t\tdateto: getParamsDateString(filter?.dateto),\r\n\t\t},\r\n\t});\r\n};\r\n\r\nexport default getDeliveryReportExcel;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadDeliveryReportExcel } from \"../thunks/downloadDeliveryReportExcel\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../../models\";\r\n\r\nexport const useDeliveryExcelReportDownloader = () => {\r\n\tconst fetchState = useSelector(\r\n\t\ts => s.data.reports.exchbusiness.clientOverview.fetchState\r\n\t);\r\n\tconst dispatch = useDispatch();\r\n\tconst download = React.useCallback(() => dispatch(downloadDeliveryReportExcel()), [dispatch]);\r\n\r\n\treturn [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../../core/store/reducers\";\r\nimport { getDeliveryReportExcel } from \"../api/getDeliveryReportExcel\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../clientOverviewDataSlice\"\r\n\r\nexport const downloadDeliveryReportExcel = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst { filter } = store.ux.reports.exchbusiness.clientOverview;\r\n\tconsole.log(filter)\r\n\r\n\tconst user = store.data.auth.current.user;\r\n\tdispatch(setFetchState({ type: \"started\"}))\r\n\tconst ordersReport = await dispatch(getDeliveryReportExcel(user, filter));\r\n\tif (ordersReport) {\r\n\t\tfileDownload(new Blob([ordersReport as any], { type: \"application/vnd.openxmlformat\" }), \"Delivery.xlsx\");\r\n\t}\r\n\tdispatch(setFetchState({ type: \"not-started\"}))\r\n};\r\n","import React from \"react\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport ExcelIcon from \"@material-ui/icons/TableChartOutlined\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../../../components/common/CustomTooltip\";\r\nimport { useDeliveryReportDownloader } from \"../../../../../data/reports/exchbusiness/clientOverview/hooks/useDeliveryReportDownloader\";\r\nimport { useDeliveryExcelReportDownloader } from \"../../../../../data/reports/exchbusiness/clientOverview/hooks/useDeliveryExcelReportDownloader\";\r\n\r\nexport const DownloadDeliveryButton: React.FunctionComponent = () => {\r\n\tconst [downloader, fetchState] = useDeliveryReportDownloader();\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport const DownloadDeliveryButtonExcel: React.FunctionComponent = () => {\r\n\tconst [downloader, fetchState] = useDeliveryExcelReportDownloader();\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport { usePageStyles } from \"../../../pageStyles\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { Card, Grid, CardHeader, Divider, CardContent, Tabs, Tab } from \"@material-ui/core\";\r\nimport ClientOverviewDeliveriesTable from \"./clientOverviewDeliveries/ClientOverviewDeliveriesTable\";\r\nimport ClientOverviewOrdersTable from \"./clientOverviewOrders/ClientOverviewOrdersTable\";\r\nimport ClientOverviewPaymentsTable from \"./clientOverviewPayments/ClientOverviewPaymentsTable\";\r\nimport ClientOverviewTradesTable from \"./clientOverviewTrades/ClientOverviewTradesTable\";\r\nimport { PageTitle } from \"../../../components/common/PageTitle\";\r\nimport { ClientOverviewParts } from \"./Locations\";\r\nimport { ClientOverviewFilterButton } from \"./ClientOverviewFilter\";\r\nimport { PageComponent } from \"../../../../core/navigation/types\";\r\nimport { useCurrentClientOverviewFilter } from \"../../../../data/reports/exchbusiness/clientOverview/hooks/useClientOverviewFilter\";\r\nimport { useInvlidateData } from \"../../../../data/reports/exchbusiness/clientOverview/hooks/useInvlidateData\";\r\nimport { DownloadOrderButton, DownloadOrderButtonExcel } from \"./clientOverviewOrders/DownloadOrderButton\";\r\nimport { DownloadTradesButton, DownloadTradesButtonExcel } from \"./clientOverviewTrades/DownloadTradesButton\";\r\nimport { DownloadPaymentsButton, DownloadPaymentsButtonExcel } from \"./clientOverviewPayments/DownloadPaymentsButton\";\r\nimport { DownloadDeliveryButton, DownloadDeliveryButtonExcel } from \"./clientOverviewDeliveries/DownloadDeliveryButton\";\r\n\r\nexport const ClientOverviewPage: PageComponent = () => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst pageStyles = usePageStyles();\r\n\tconst [tab, setTab] = React.useState(ClientOverviewParts.Orders);\r\n\r\n\tconst [filter] = useCurrentClientOverviewFilter();\r\n\tconst client = filter?.client;\r\n\r\n\tconst handleSideChange = React.useCallback(\r\n\t\t(event: React.ChangeEvent<{}>, newValue: any) => {\r\n\t\t\tsetTab(newValue);\r\n\t\t},\r\n\t\t[setTab]\r\n\t);\r\n\r\n\tconst [invalidate] = useInvlidateData();\r\n\tReact.useEffect(\r\n\t\t() => () => {\r\n\t\t\tinvalidate();\r\n\t\t},\r\n\t\t[]\r\n\t);\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t} action={} />\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\t\t\r\n\t\t\t\t\t\t\t\r\n\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\t
\r\n\t\t\t\t\t\t\t{tab === ClientOverviewParts.Orders && client && client.cliId && (\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\t{tab === ClientOverviewParts.Trades && client && client.cliId && (\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\t{tab === ClientOverviewParts.Payments && client && client.cliId && (\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\t{tab === ClientOverviewParts.Deliveries && client && client.cliId && (\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\t);\r\n};\r\n\r\nexport const ClientOverviewActions: React.FunctionComponent<{tab?: ClientOverviewParts}> = ({ tab }) => (\r\n\t\r\n\t\t{tab === ClientOverviewParts.Orders && (\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t)}\r\n\t\t{tab === ClientOverviewParts.Trades && (\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t)}\r\n\t\t{tab === ClientOverviewParts.Payments && (\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t)}\r\n\t\t{tab === ClientOverviewParts.Deliveries && (\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t)}\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n);\r\n","import { ClientOverviewPage } from \"./ClientOverviewPage\";\r\nimport { NavigationItem } from \"../../../../core/navigation/types\";\r\nimport { clientsOverviewLocation } from \"./Locations\";\r\n\r\nexport const clientOverviewComponents: NavigationItem[] = [\r\n\t{\r\n\t\tComponent: ClientOverviewPage,\r\n\t\tisMenuItem: true,\r\n\t\tpath: clientsOverviewLocation,\r\n\t}\r\n];\r\n","import React from \"react\";\r\nimport { useDispatch } from \"react-redux\";\r\nimport { invalidateData } from \"../clientOverviewDataSlice\";\r\n\r\nexport const useInvlidateData = () => {\r\n\tconst dispatch = useDispatch();\r\n\tconst invalidate = React.useCallback(() => dispatch(invalidateData()), [dispatch]);\r\n\r\n\treturn [invalidate] as [typeof invalidate];\r\n};\r\n","import { TradePricesChartData, ChartPeriod } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { webApi } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const getChartDataHistorical = (user: User, prodid: string, numofdays: ChartPeriod) => {\r\n\treturn webApi({\r\n\t\tmethod: \"GET\",\r\n\t\turl: \"reporting/gettradepriceschartdata\",\r\n\t\tparams: {\r\n\t\t\tuserid: user.userId,\r\n\t\t\tprodid,\r\n\t\t\tnumofdays,\r\n\t\t\thist: \"Y\",\r\n\t\t},\r\n\t});\r\n};\r\n","import React from \"react\";\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { ChartPeriod, TradePricesChartData } from \"../types\";\r\nimport { loadGraphDataHistorical } from \"../thunks/loadGraphDataH\";\r\n\r\nexport const useGraphDataH = (graphId: string) => {\r\n\tconst dispatch = useDispatch();\r\n\tconst period = useSelector(s => s.data.trading.ticker.graphPeriodH[graphId]);\r\n\tconst prodId = useSelector(s => s.ux.trading.ticker.graphProductId[graphId]);\r\n\tconst data = useSelector(\r\n\t\ts => s.data.trading.ticker.graphData[graphId || \"\"]\r\n\t);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (prodId) {\r\n\t\t\tdispatch(loadGraphDataHistorical(graphId, prodId, period || ChartPeriod.Month));\r\n\t\t}\r\n\t}, [graphId, period, prodId, dispatch]);\r\n\r\n\treturn [data];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getChartDataHistorical } from \"../api/getChartDataH\";\r\nimport { setGraphData } from \"../tickerDataSlice\";\r\nimport { ChartPeriod } from \"../types\";\r\n\r\nexport const loadGraphDataHistorical = (graphId: string, prodid: string, period: ChartPeriod): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\" || !prodid) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tconst { user } = store.data.auth.current;\r\n\tprodid = graphId==='0001' ? '00000001' : graphId==='0002' ? '00000002' : '00000003';\r\n\tconst graphData = await dispatch(getChartDataHistorical(user, prodid, period));\r\n\r\n\tdispatch(\r\n\t\tsetGraphData({\r\n\t\t\tgraphId: graphId,\r\n\t\t\tdata: graphData || [],\r\n\t\t})\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport { CardContent, CardHeader, Card, Divider, Typography, Grid } from \"@material-ui/core\";\r\nimport { useGraphDataH } from \"../../../../data/trading/ticker/hooks/useGraphDataH\";\r\nimport { useGraphPeriodH } from \"../../../../data/trading/ticker/hooks/useGraphPeriodH\";\r\nimport { ToggleButton, ToggleButtonGroup } from \"@material-ui/lab\";\r\nimport { ChartPeriod } from \"../../../../data/trading/ticker/types\";\r\nimport { CartesianGrid, Line, LineChart, XAxis, Tooltip, YAxis, ResponsiveContainer } from \"recharts\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { ProductSelect } from \"../../../components/listing/ProductSelect\";\r\nimport { useGraphProduct } from \"../../../../data/trading/ticker/hooks/useGraphProduct\";\r\n\r\nexport interface ProductGraphProps {\r\n\tgraphId: string;\r\n}\r\n\r\nexport const ProductGraph: React.FunctionComponent = ({ graphId }) => {\r\n\tconst { getString, getDateString, getDateTimeString, getFormatedNumberString } = React.useContext(\r\n\t\tLocalizationContext\r\n\t);\r\n\r\n\tconst [prodId, setProdId] = useGraphProduct(graphId);\r\n\tconst [data] = useGraphDataH(graphId);\r\n\tconst [period, setPeriod] = useGraphPeriodH(graphId);\r\n\t\r\nconsole.log(period)\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\t\t\r\n{/*\t\t\t\t\t\t\t{ prodId && prodId==='00000001' ? getString(\"historyProd1\"): prodId==='00000002' ? getString(\"historyProd2\") : getString(\"historyProd3\") } */}\r\n\t\t\t\t\t\t\t{ graphId && graphId==='0001' ? getString(\"historyProd1\"): graphId==='0002' ? getString(\"historyProd2\") : getString(\"historyProd3\") }\r\n\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t setPeriod(v)}\r\n\t\t\t\t\t\t\t\tsize=\"small\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t1M\r\n\t\t\t\t\t\t\t\t3M\r\n\t\t\t\t\t\t\t\t6M\r\n\t\t\t\t\t\t\t\tYTD\r\n\t\t\t\t\t\t\t\t1Y\r\n\t\t\t\t\t\t\t\tAll\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\t\t\r\n\t\t\t\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\t getDateString(date, \"DD.MM.\")} />\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t [\r\n\t\t\t\t\t\t\t\tgetFormatedNumberString(value as any, true),\r\n\t\t\t\t\t\t\t\tgetString(\"orderPrice\"),\r\n\t\t\t\t\t\t\t]}\r\n//\t\t\t\t\t\t\tlabelFormatter={(date: any) => getDateTimeString(date)}\r\n\t\t\t\t\t\t\tlabelFormatter={(date: any) => getDateString(date)}\r\n\t\t\t\t\t\t/>\r\n\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\t);\r\n};\r\n","import React from \"react\";\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { ChartPeriod } from \"../types\";\r\nimport { setGraphPeriodH } from \"../tickerDataSlice\";\r\n\r\nexport const useGraphPeriodH = (graphId: string) => {\r\n\tconst dispatch = useDispatch();\r\n\tconst period = useSelector(s => s.data.trading.ticker.graphPeriodH[graphId || \"\"]);\r\n\r\n\tconsole.log(period)\r\n\t\r\n\tconst dispatchSetPeriod = React.useCallback(\r\n\t\t(newPeriod: ChartPeriod) => {\r\n\t\t\tif (graphId) {\r\n\t\t\t\tdispatch(\r\n\t\t\t\t\tsetGraphPeriodH({\r\n\t\t\t\t\t\tgraphId,\r\n\t\t\t\t\t\tdata: newPeriod,\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\t[dispatch, graphId]\r\n\t);\r\n\r\n\treturn [period || ChartPeriod.Month, dispatchSetPeriod] as [typeof period, typeof dispatchSetPeriod];\r\n};\r\n","export const historicalPricesReportLocation =\r\n \"/reports/exchbusiness/historicalprices\";\r\n","import HistoricalPricesPage from \"./HistoricalPricesPage\";\r\nimport { NavigationItem } from \"../../../../core/navigation/types\";\r\nimport { historicalPricesReportLocation } from \"./Locations\";\r\n\r\nexport const historicalPricesReportComponents: NavigationItem[] = [\r\n {\r\n Component: HistoricalPricesPage,\r\n isMenuItem: true,\r\n path: historicalPricesReportLocation,\r\n },\r\n];\r\n","import { memberContractsReportComponents } from \"./memberContracts/navigationComponents\";\r\nimport { tradeReviewReportComponents } from \"./tradeReview/navigationComponents\";\r\nimport { tradeByProductsReportComponents } from \"./tradeByProducts/navigationComponents\";\r\nimport { tradeByClientsReportComponents } from \"./tradeByClients/navigationComponents\";\r\nimport { tradeByBrokersReportComponents } from \"./tradeByBrokers/navigationComponents\";\r\nimport { weightedPricesReportComponents } from \"./weightedPrices/navigationComponents\";\r\nimport { businessActivitiesReportComponents } from \"./businessActivities/navigationComponents\";\r\nimport { commReviewReportComponents } from \"./commReview/navigationComponents\";\r\nimport { clientOverviewComponents } from \"./clientOverview/navigationComponents\";\r\nimport { historicalPricesReportComponents } from \"./historicalPrices/navigationComponents\";\r\n\r\nexport const exchBusinessComponents = [\r\n ...memberContractsReportComponents,\r\n ...tradeReviewReportComponents,\r\n ...tradeByProductsReportComponents,\r\n ...tradeByClientsReportComponents,\r\n ...tradeByBrokersReportComponents,\r\n ...weightedPricesReportComponents,\r\n ...businessActivitiesReportComponents,\r\n ...commReviewReportComponents,\r\n ...clientOverviewComponents,\r\n ...historicalPricesReportComponents,\r\n];\r\n","import { ExchangeMembersReportData, ExchangeMemebersFilter } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { webApi } from \"../../../../core/http/httpThunks\";\r\n\r\nconst getExchangeMembersData = (\r\n user: User,\r\n filter: ExchangeMemebersFilter\r\n ) => {\r\n return webApi({\r\n method: \"GET\",\r\n url: \"reporting/getexchangememberlist\",\r\n params: {\r\n userid: user.userId,\r\n brokerId: filter?.brokerId,\r\n cliStatus: filter?.cliStatus, \r\n },\r\n });\r\n};\r\n\r\nexport default getExchangeMembersData;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadReport } from \"../thunks/loadReportData\";\r\nimport { ExchangeMembersReportData } from \"../types\";\r\n\r\nexport const useExchangeMembersReportData = () => {\r\n const data = useSelector(\r\n (s) => s.data.reports.exchangeMember.data\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadData = React.useCallback(() => dispatch(loadReport()), [\r\n dispatch,\r\n ]);\r\n\r\n return [data, dispatchLoadData] as [typeof data, typeof dispatchLoadData];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { setData } from \"../exchangeMemberDataSlice\";\r\nimport getExchangeMembersDataApi from \"../api/getExchangeMembersData\";\r\n\r\nexport const loadReport = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const user = store.data.auth.current.user;\r\n const { filter } = store.ux.reports.exchmembers;\r\n\r\n\r\n const pagedTrades = await dispatch(getExchangeMembersDataApi(user, filter));\r\n\r\n dispatch(setData(pagedTrades || []));\r\n};\r\n","import React from \"react\";\r\nimport { useExchangeMemberColumns } from \"./useExchangeMembersReportColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\nimport { ExchangeMembersReportData } from \"../../../data/reports/exmember/types\";\r\nimport { ControledTable } from \"../../components/common/ControledTable\";\r\nimport { useExchangeMembersReportData } from \"../../../data/reports/exmember/hooks/useExchangeMembersReportData\";\r\nimport { useExchangeMembersIndex } from \"../../../data/reports/exmember/hooks/useExchangeMembersIndex\";\r\n\r\nexport interface ExchangeMembersTableProps {\r\n userAccessRights: AccessRights;\r\n}\r\n\r\ntype ExchangeMembersTablePropsType = ExchangeMembersTableProps\r\n\r\nconst ExchangeMembersReportTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n ...tableProps\r\n}) => {\r\n const columns = useExchangeMemberColumns();\r\n const [data, load] = useExchangeMembersReportData();\r\n const [index, setIndex] = useExchangeMembersIndex()\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={load}\r\n pageIndex={index}\r\n onPageIndexChange={setIndex}\r\n immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default ExchangeMembersReportTable;\r\n","import { ExchangeMembersReportData } from \"../../../data/reports/exmember/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\n\r\nexport const useExchangeMemberColumns = () => {\r\n const { getString, getFormatedNumberString } = React.useContext(\r\n LocalizationContext\r\n );\r\n\r\n return React.useMemo(\r\n () => [\r\n {\r\n title: getString(\"exmemMemberName\"),\r\n field: \"memberName\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"exmemMemberId\"),\r\n field: \"memberId\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"exmemTaxCode\"),\r\n field: \"taxCode\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"exmemAdress\"),\r\n field: \"address\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"exmemPhone\"),\r\n field: \"phone\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"exmemManager\"),\r\n field: \"manager\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"exmemTrader\"),\r\n field: \"trader\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"exmemContactPerson\"),\r\n field: \"contactPerson\",\r\n sorting: false,\r\n },\r\n ],\r\n [getString, getFormatedNumberString]\r\n ) as Column[];\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { setIndex } from \"../exchangeMemberUXSlice\";\r\nimport { PageIndex } from \"../../../models\";\r\n\r\nexport const useExchangeMembersIndex = () => {\r\n\tconst pageIndex = useSelector(s => s.ux.reports.exchmembers.index);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchSetIndex = React.useCallback((index: PageIndex) => dispatch(setIndex(index)), [dispatch]);\r\n\r\n\treturn [pageIndex, dispatchSetIndex] as [typeof pageIndex, typeof dispatchSetIndex];\r\n};\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { ExchangeMemebersFilter } from \"../types\";\r\n\r\nexport const getExchangeMembersReport = (\r\n user: User,\r\n filter: ExchangeMemebersFilter\r\n ) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getexchangememberreport\",\r\n params: {\r\n userid: user.userId,\r\n brokerId: filter?.brokerId,\r\n cliStatus: filter?.cliStatus, \r\n },\r\n });\r\n};\r\n\r\nexport default getExchangeMembersReport;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadExchangeMembersReport } from \"../thunks/downloadReport\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useExchangeMemberReportDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.exchangeMember.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadExchangeMembersReport()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getExchangeMembersReport } from \"../api/getExchangeMembersReport\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../exchangeMemberDataSlice\";\r\n\r\nexport const downloadExchangeMembersReport = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.exchmembers;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const ordersReport = await dispatch(getExchangeMembersReport(user,filter));\r\n if (ordersReport) {\r\n fileDownload(\r\n new Blob([ordersReport as any], { type: \"application/pdf\" }),\r\n \"ExchangeMembers.pdf\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\nimport { ExchangeMemebersFilter } from \"../types\";\r\n\r\nexport const getExchangeMembersExcel = (\r\n user: User,\r\n filter: ExchangeMemebersFilter\r\n ) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getexchangememberxls\",\r\n params: {\r\n userid: user.userId,\r\n brokerId: filter?.brokerId,\r\n cliStatus: filter?.cliStatus, \r\n },\r\n });\r\n};\r\n\r\nexport default getExchangeMembersExcel;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadExchangeMemberExcel } from \"../thunks/downloadReportExcel\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\n\r\nexport const useExchangeMemberExcelDownloader = () => {\r\n const fetchState = useSelector(\r\n (s) =>\r\n s.data.reports.securityCommission.annualSecurity.downloadReportFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(\r\n () => dispatch(downloadExchangeMemberExcel()),\r\n [dispatch]\r\n );\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getExchangeMembersExcel } from \"../api/getExchangeMembersExcel\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setFetchState } from \"../exchangeMemberDataSlice\";\r\n\r\nexport const downloadExchangeMemberExcel = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.reports.exchmembers;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const dailyTrading = await dispatch(getExchangeMembersExcel(user, filter));\r\n if (dailyTrading) {\r\n fileDownload(\r\n new Blob([dailyTrading as any], {\r\n type: \"application/vnd.openxmlformat\",\r\n }),\r\n \"ExchangeMembers.xlsx\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n};\r\n","import React from \"react\";\r\nimport { useExchangeMemberReportDownloader } from \"../../../data/reports/exmember/hooks/useExchangeMembersReportDownloader\";\r\nimport { useExchangeMemberExcelDownloader } from \"../../../data/reports/exmember/hooks/useExchangeMembersExcelDownloader\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport ExcelIcon from \"@material-ui/icons/TableChartOutlined\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\n\r\nexport const DownloadButton: React.FunctionComponent = () => {\r\n\tconst [downloader, fetchState] = useExchangeMemberReportDownloader();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\treturn (\r\n\t\t<>\r\n\t\t\t\r\n\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\t{fetchState.type !== \"not-started\" ? getString(\"pleaseWait\") : null}\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport const DownloadExcelButton: React.FunctionComponent = () => {\r\n\tconst [downloader, fetchState] = useExchangeMemberExcelDownloader();\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n","import { setFilter } from \"../exchangeMemberUXSlice\";\r\nimport { setData } from \"../exchangeMemberDataSlice\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport React from \"react\";\r\nimport { ExchangeMemebersFilter } from \"../types\";\r\nimport { useCopiedState } from \"../../../../core/util/hooks\";\r\n\r\nexport const useExchangeMembersReportFilter = () => {\r\n const storeFilter = useSelector(\r\n (store) => store.ux.reports.exchmembers.filter\r\n );\r\n const [filter, editFilter] = useCopiedState(\r\n storeFilter\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetFilter = React.useCallback(() => {\r\n dispatch(setFilter(filter!));\r\n dispatch(setData());\r\n }, [dispatch, filter]);\r\n\r\n return [filter, editFilter, dispatchSetFilter] as [\r\n typeof filter,\r\n typeof editFilter,\r\n typeof dispatchSetFilter\r\n ];\r\n};\r\n","import React from \"react\";\r\nimport { Grid, Paper, Button, Typography } from \"@material-ui/core\";\r\nimport { DateInput } from \"../../components/common/DateInput\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { ExchangeMemebersFilter } from \"../../../data/reports/exmember/types\";\r\nimport { useAuth } from \"../../../data/auth/hooks\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { EmployeeSelect } from \"../../components/listing/EmployeeSelect\";\r\nimport { ActStatusClientsSelect } from \"../../components/common/ActStatusClients\";\r\n\r\ninterface ExchabgeMembersFilterEditorProps {\r\n filter?: ExchangeMemebersFilter;\r\n editFilter: (prop: keyof ExchangeMemebersFilter, value: any) => void;\r\n save: () => void;\r\n}\r\n\r\nexport const ExchangeMembersFilterEditor: React.FunctionComponent = ({\r\n filter,\r\n editFilter,\r\n save,\r\n}) => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const { getString } = React.useContext(LocalizationContext);\r\n\r\n const handleChange = React.useCallback(\r\n (event: React.ChangeEvent) => {\r\n editFilter(event.target.name as any, event.target.value);\r\n },\r\n [editFilter]\r\n );\r\n\r\n if (!filter) {\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\t\t\t\t\t\t employee.empId === filter?.brokerId}\r\n\t\t\t\t\t\t\tonChangeItem={(employee) => {\teditFilter(\"brokerId\", employee ? employee.empId : undefined);\t}}\r\n />\r\n\t\t\t\t\t\r\n \r\n\r\n\r\n \r\n\t\t\t\t\t\t status.ftValue === filter.cliStatus}\r\n\t\t\t\t\t\t\tonChangeItem={status => {\r\n\t\t\t\t\t\t\t\teditFilter(\"cliStatus\", status?.ftValue);\r\n\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t/> \r\n \r\n\r\n \r\n \r\n {\r\n save();\r\n showWithDrawer(undefined);\r\n }}\r\n >\r\n {getString(\"orderFilterConfirm\")}\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport { IconButton, Grid } from \"@material-ui/core\";\r\nimport FilterIcon from \"@material-ui/icons/FilterListOutlined\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { useExchangeMembersReportFilter } from \"../../../data/reports/exmember/hooks/useExchangeMembersReportFilter\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport { ExchangeMembersFilterEditor } from \"./ExchangeMembersFilterEditor\";\r\n\r\nexport const ExchangeMemberReportFilter: React.FunctionComponent = () => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const showFilter = React.useCallback(\r\n () => showWithDrawer(),\r\n [showWithDrawer]\r\n );\r\n\r\n const [filter, editfilter, save] = useExchangeMembersReportFilter();\r\n const { getString } = React.useContext(LocalizationContext);\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\nconst ExchangeMemberFilterEditor: React.FunctionComponent = () => {\r\n const [filter, editFilter, save] = useExchangeMembersReportFilter();\r\n return (\r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport {\r\n Grid,\r\n CardContent,\r\n CardHeader,\r\n Card,\r\n Divider,\r\n} from \"@material-ui/core\";\r\nimport ExchangeMembersReportTable from \"./ExchangeMembersReportTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { PageComponent } from \"../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { DownloadButton, DownloadExcelButton } from \"./DownloadButton\";\r\nimport { ExchangeMemberReportFilter } from \"./ExchangeMemberReportFilter\";\r\n\r\nconst ExchangeMembersReport: PageComponent = ({ userAccessRights }) => {\r\n const pageStyles = usePageStyles();\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n }\r\n action={}\r\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 ExchangeMembersReportActions: React.FunctionComponent = () => (\r\n \r\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 ExchangeMembersReport;\r\n","import ExchangeMembersReport from \"./ExchangeMembersReport\";\r\nimport { NavigationItem } from \"../../../core/navigation/types\";\r\nimport { exchangeMembersReportLocation } from \"./Locations\";\r\n\r\nexport const exchangeMembersReportComponents: NavigationItem[] = [\r\n {\r\n Component: ExchangeMembersReport,\r\n isMenuItem: true,\r\n path: exchangeMembersReportLocation,\r\n },\r\n];\r\n","export const exchangeMembersReportLocation = \"/reports/memberreport\";\r\n","import React from \"react\";\r\nimport { DeliveryData } from \"../../../data/clearing/delivery/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { useDisplaySingleEmementStyles } from \"../../useDisplaySingleEmementStyles\";\r\nimport { DisplayBoolNumber } from \"../../components/common/DisplayBoolNumber\";\r\nimport { Status } from \"../../../data/models\";\r\n\r\nexport interface DisplayDeliveryMainAttributesProps {\r\n delivery: DeliveryData;\r\n}\r\n\r\nexport const DisplayDeliveryMainAttributes: React.FunctionComponent = ({\r\n delivery,\r\n}) => {\r\n const style = useDisplaySingleEmementStyles();\r\n const { getString, getDateString, getFormatedNumberString } = React.useContext(LocalizationContext);\r\n\r\n return (\r\n
\r\n
\r\n {getString(\"dlvrDeliveryDate\")}\r\n {getDateString(delivery.deliveryDate)}\r\n
\r\n
\r\n {getString(\"dlvrTradeNo\")}\r\n {delivery.tradeNo}\r\n
\r\n
\r\n {getString(\"dlvrsellerCode\")}\r\n {delivery.sellerCode}\r\n
\r\n
\r\n {getString(\"dlvrsellerName\")}\r\n {delivery.sellerName}\r\n
\r\n
\r\n {getString(\"dlvrbuyerCode\")}\r\n {delivery.buyerCode}\r\n
\r\n
\r\n {getString(\"dlvrbuyerName\")}\r\n {delivery.buyerName}\r\n
\r\n
\r\n {getString(\"dlvrproductCode\")}\r\n {delivery.productCode}\r\n
\r\n
\r\n {getString(\"dlvrproductName\")}\r\n {delivery.productName}\r\n
\r\n
\r\n {getString(\"dlvrWarehouseCode\")}\r\n {delivery.warehouseCode}\r\n
\r\n
\r\n {getString(\"dlvrWarehouseName\")}\r\n {delivery.warehouseName}\r\n
\r\n
\r\n {getString(\"deliveryTradeQty\")}\r\n {getFormatedNumberString(delivery.tradeQty)}\r\n
\r\n
\r\n {getString(\"dlvrDeliverQty\")}\r\n {getFormatedNumberString(delivery.deliveryQty)}\r\n
\r\n
\r\n {getString(\"deliveryLeftQty\")}\r\n {getFormatedNumberString(delivery.leftQty)}\r\n
\r\n
\r\n {getString(\"orderPrice\")}\r\n {getFormatedNumberString(delivery.price, true)}\r\n
\r\n
\r\n {getString(\"dlvrValue\")}\r\n {getFormatedNumberString(delivery.deliveryAmt, true)}\r\n
\r\n
\r\n {getString(\"dlvrstatus\")}\r\n \r\n \r\n \r\n
\r\n
\r\n );\r\n};\r\n","import React from \"react\";\r\nimport { useDisplayDelivery } from \"../../../data/clearing/delivery/hooks/useDisplayDelivery\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport {\r\n DeliveryData,\r\n DeliveryListData,\r\n} from \"../../../data/clearing/delivery/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { DisplayDeliveryMainAttributes } from \"./DisplayDeliveryMainAttributes\";\r\nimport {\r\n ExpansionPanel,\r\n ExpansionPanelSummary,\r\n Typography,\r\n Grid,IconButton,\r\n} from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport { useDeliveryPrinter } from \"../../../data/clearing/delivery/hooks/useDeliveryPrinter\";\r\n\r\nexport interface DisplayDeliveryGoodsProps {\r\n id?: string;\r\n}\r\n\r\nexport const DisplayDelivery: React.FunctionComponent = ({\r\n id,\r\n}) => {\r\n\r\n const delivery = useDisplayDelivery(id);\r\n const { getString } = React.useContext(LocalizationContext);\r\n\tconst [download, fetchState, setfetch] = useDeliveryPrinter(delivery);\r\n\r\n return !delivery ? (\r\n <>{\"loading placeholder\"}\r\n ) : (\r\n \r\n \r\n \r\n \r\n \r\n {getString(\"tableBasciInfo\")}\r\n \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\r\n\t\t\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\r\n { fetchState.type !== \"not-started\" ? getString(\"pleaseWait\") : null }\r\n\t\t\t\t\t\t\t\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const useViewDelivery = () => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n return React.useCallback(\r\n (delivery: DeliveryListData) =>\r\n showWithDrawer(),\r\n [showWithDrawer]\r\n );\r\n};\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport ViewIcon from \"@material-ui/icons/InputOutlined\";\r\nimport { DeliveryListData } from \"../../../data/clearing/delivery/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { MaterialTableProps } from \"material-table\";\r\nimport { useViewDelivery } from \"./DisplayDelivery\";\r\n\r\nexport function useDeliveriesActions() {\r\n const { getString } = useContext(LocalizationContext);\r\n const onShowDelivery = useViewDelivery();\r\n\r\n return useMemo(() => {\r\n const result: MaterialTableProps[\"actions\"] = [\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"orderActView\"),\r\n onClick: (event, rowData) =>\r\n onShowDelivery(rowData as DeliveryListData),\r\n },\r\n ];\r\n return result;\r\n }, [onShowDelivery, getString]);\r\n}\r\n\r\n","import { DeliveryListData } from \"../../../data/clearing/delivery/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\n\r\nexport const useDeliveriesColumns = () => {\r\n const { getString, getDateString, getFormatedNumberString } = React.useContext(LocalizationContext);\r\n\r\n return React.useMemo(\r\n () => [\r\n {\r\n title: getString(\"dlvrDeliveryDate\"),\r\n render: (delivery) => getDateString(delivery.deliveryDate),\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"dlvrTradeNo\"),\r\n field: \"tradeNo\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"dlvrsellerName\"),\r\n field: \"sellerName\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"dlvrbuyerName\"),\r\n field: \"buyerName\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"dlvrproductName\"),\r\n field: \"productName\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"dlvrDeliverQty\"),\r\n render: (delivery) => getFormatedNumberString(delivery.deliveryQty),\r\n sorting: false,\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n },\r\n {\r\n title: getString(\"dlvrLeftQty\"),\r\n render: (delivery) => getFormatedNumberString(delivery.leftQty),\r\n sorting: false,\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n },\r\n {\r\n title: getString(\"dlvrTradeQty\"),\r\n render: (delivery) => getFormatedNumberString(delivery.tradeQty),\r\n sorting: false,\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n },\r\n {\r\n title: getString(\"dlvrValue\"),\r\n render: (delivery) => getFormatedNumberString(delivery.deliveryAmt,true),\r\n sorting: false,\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n//\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n },\r\n ],\r\n [getString, getDateString, getFormatedNumberString]\r\n ) as Column[];\r\n};\r\n","import React from \"react\";\r\nimport { Grid, Paper, Button, Typography } from \"@material-ui/core\";\r\nimport { DateInput } from \"../../components/common/DateInput\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { DeliveryFilter } from \"../../../data/clearing/delivery/types\";\r\nimport { ClientSelect } from \"../../components/listing/ClientSelect\";\r\nimport { useAuth } from \"../../../data/auth/hooks\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { DeliveryFilterChipsComponent } from \"./DeliveryFilterChips\";\r\nimport { ProductSelect } from \"../../components/listing/ProductSelect\";\r\n\r\nexport enum DeliveryFilterEditorType {\r\n Basic,\r\n Extended,\r\n}\r\n\r\ninterface DeliveryFilterEditorProps {\r\n filter?: DeliveryFilter;\r\n editFilter: (prop: keyof DeliveryFilter, value: any) => void;\r\n save: () => void;\r\n type: DeliveryFilterEditorType;\r\n reset?: () => void;\r\n}\r\n\r\nexport const DeliveryFilterEditor: React.FunctionComponent = ({\r\n filter,\r\n editFilter,\r\n save,\r\n type,\r\n reset,\r\n}) => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const { getString } = React.useContext(LocalizationContext);\r\n const [auth] = useAuth();\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n editFilter(\"datefrom\", date?.toISOString())}\r\n />\r\n \r\n \r\n editFilter(\"dateto\", date?.toISOString())}\r\n />\r\n \r\n \r\n\r\n \r\n prod.prodId === filter?.product?.prodId}\r\n onChangeItem={(prod) => {\r\n editFilter(\"product\", prod);\r\n }}\r\n />\r\n \r\n\r\n \r\n cli.cliId === filter?.buyer?.cliId}\r\n onChangeItem={(cli) => editFilter(\"buyer\", cli)}\r\n />\r\n \r\n\r\n \r\n cli.cliId === filter?.seller?.cliId}\r\n onChangeItem={(cli) => editFilter(\"seller\", cli)}\r\n />\r\n \r\n\r\n \r\n \r\n {\r\n save();\r\n showWithDrawer(undefined);\r\n }}\r\n >\r\n {getString(\"orderFilterConfirm\")}\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 DeliveryFilterChips = DeliveryFilterChipsComponent;\r\n","import React from \"react\";\r\nimport { DeliveryListData } from \"../../../data/clearing/delivery/types\";\r\nimport {\r\n PaginationTable,\r\n PaginationDataProps,\r\n} from \"../../components/common/PagginationTable\";\r\nimport { useDeliveriesActions } from \"./useDeliveriesActions\";\r\nimport { useDeliveriesColumns } from \"./useDeliveriesColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\n\r\nexport interface DeliveryTableProps {\r\n userAccessRights: AccessRights;\r\n getData: () => void;\r\n}\r\n\r\ntype DeliveryTablePropsType = DeliveryTableProps &\r\n PaginationDataProps;\r\n\r\nconst DeliveriesTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n getData,\r\n ...tableProps\r\n}) => {\r\n const actions = useDeliveriesActions();\r\n const columns = useDeliveriesColumns();\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={getData}\r\n // immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n actions={actions}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default DeliveriesTable;\r\n","import React from \"react\";\r\nimport { Chip, Grid } from \"@material-ui/core\";\r\nimport { DeliveryFilter } from \"../../../data/clearing/delivery/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\n\r\nexport const DeliveryFilterChipsComponent: React.FunctionComponent = ({\r\n filter,\r\n removeFilter,\r\n}) => {\r\n const { getDateString, getString } = React.useContext(LocalizationContext);\r\n return (\r\n \r\n {filter.datefrom && (\r\n \r\n removeFilter(\"datefrom\")}\r\n />\r\n \r\n )}\r\n {filter.dateto && (\r\n \r\n removeFilter(\"dateto\")}\r\n />\r\n \r\n )}\r\n {filter.product && (\r\n \r\n removeFilter(\"product\")}\r\n />\r\n \r\n )}\r\n {filter.buyer && (\r\n \r\n removeFilter(\"buyer\")}\r\n />\r\n \r\n )}\r\n {filter.seller && (\r\n \r\n removeFilter(\"seller\")}\r\n />\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\ninterface DeliveryFilterChipsProps {\r\n filter: DeliveryFilter;\r\n removeFilter: (type: keyof DeliveryFilter) => void;\r\n}\r\n","import React from \"react\";\r\nimport FilterIcon from \"@material-ui/icons/FilterListOutlined\";\r\nimport { IconButton, Grid } from \"@material-ui/core\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { useDeliveryFilter, useCurrentDeliveryilter } from \"../../../data/clearing/delivery/hooks/useDeliveryFilter\";\r\nimport { DeliveryFilterEditor, DeliveryFilterEditorType, DeliveryFilterChips,} from \"./DeliveryFilterEditor\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\n\r\nexport const DeliveryFilterButton: React.FunctionComponent = () => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const showFilter = React.useCallback(\r\n () => showWithDrawer(),\r\n [showWithDrawer]\r\n );\r\n\r\n const [filter, removeFilter] = useCurrentDeliveryilter();\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\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\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};\r\n\r\nconst DeliveriesFilterEditor: React.FunctionComponent = () => {\r\n const [filter, editFilter, save, , reset] = useDeliveryFilter();\r\n return (\r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport ExcelIcon from \"@material-ui/icons/TableChartOutlined\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport { useDeliveryReportDownloader } from \"../../../data/reports/exchbusiness/clientOverview/hooks/useDeliveryReportDownloader\";\r\nimport { useDeliveryExcelReportDownloader } from \"../../../data/reports/exchbusiness/clientOverview/hooks/useDeliveryExcelReportDownloader\";\r\n\r\nexport const DownloadDeliveryButton: React.FunctionComponent = () => {\r\n\tconst [downloader, fetchState] = useDeliveryReportDownloader();\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport const DownloadDeliveryButtonExcel: React.FunctionComponent = () => {\r\n\tconst [downloader, fetchState] = useDeliveryExcelReportDownloader();\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport {\r\n Grid,\r\n CardContent,\r\n CardHeader,\r\n Card,\r\n Divider,\r\n Fab,\r\n} from \"@material-ui/core\";\r\nimport DeliveriesTable from \"./DeliveriesTable\";\r\nimport AddIcon from \"@material-ui/icons/Add\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { PageComponent, AccessRights } from \"../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { useDeliveryData } from \"../../../data/clearing/delivery/hooks/useDeliveryData\";\r\nimport { useDeliveryIndex } from \"../../../data/clearing/delivery/hooks/useDeliveryIndex\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { getDeliveriesEditLocation } from \"../delivery/Locations\";\r\nimport { PageDataStatus } from \"../../../data/models\";\r\nimport { DeliveryFilterButton } from \"./DeliveryFilter\";\r\nimport { useAuth } from \"../../../data/auth/hooks\";\r\nimport { DownloadDeliveryButton, DownloadDeliveryButtonExcel } from \"./DownloadDeliveryButton\";\r\n\r\nconst DeliveriesPage: PageComponent = ({ userAccessRights }) => {\r\n const pageStyles = usePageStyles();\r\n\r\n const [pageData, dispatchLoadDelivery] = useDeliveryData();\r\n const [pageIndex, dispatchSetIndex] = useDeliveryIndex();\r\n\r\n React.useEffect(() => {\r\n if (pageData && pageData.status === PageDataStatus.DataInvalidated) {\r\n dispatchLoadDelivery();\r\n }\r\n }, [dispatchLoadDelivery, pageData]);\r\n\r\n const history = useHistory();\r\n\r\n const [auth] = useAuth();\r\n\r\n if (auth.status !== \"successful\") {\r\n return null;\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n }\r\n action={}\r\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 DeliveryAction: React.FunctionComponent = () => (\r\n \r\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 DeliveriesPage;\r\n\r\n","import { NavigationItem } from \"../../../core/navigation/types\";\r\nimport DeliveriesPage from \"./DeliveriesPage\";\r\nimport { deliveriesLocation, editRouter } from \"./Locations\";\r\nexport const deliveryClientComponents: NavigationItem[] = [\r\n {\r\n Component: DeliveriesPage,\r\n isMenuItem: true,\r\n path: deliveriesLocation,\r\n },\r\n];\r\n","import { getEditLocation } from \"../../../core/util/functions\";\r\nexport const deliveriesLocation = \"/reports/deliveries\";\r\nexport const getDeliveriesEditLocation = (id?: string) =>\r\n getEditLocation(deliveriesLocation, undefined, id);\r\n\r\nexport const editRouter = getDeliveriesEditLocation(\":dlvrId?\");\r\n","import React from \"react\";\r\nimport { PaymentData } from \"../../../data/clearing/payments/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { useDisplaySingleEmementStyles } from \"../../useDisplaySingleEmementStyles\";\r\nimport { DisplayBoolNumber } from \"../../components/common/DisplayBoolNumber\";\r\nimport { Status } from \"../../../data/models\";\r\n\r\nexport interface DisplayPaymentMainAttributesProps {\r\n\tpayment: PaymentData;\r\n}\r\n\r\nexport const DisplayPaymentMainAttributes: React.FunctionComponent = ({\r\n\tpayment,\r\n}) => {\r\n\tconst style = useDisplaySingleEmementStyles();\r\n\tconst { getString, getDateString, getFormatedNumberString } = React.useContext(LocalizationContext);\r\n\r\n\treturn (\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"paymentDataTime\")}\r\n\t\t\t\t{getDateString(payment.payDate)}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"paymentClientCode\")}\r\n\t\t\t\t{payment.clientIdNo}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"paymentClientName\")}\r\n\t\t\t\t{payment.clientName}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"paymentPayType\")}\r\n\t\t\t\t{payment.payTypeDescr}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"paymentClmOrdNo\")}\r\n\t\t\t\t{payment.orderNo}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"paymentTranNo\")}\r\n\t\t\t\t{payment.tranNo}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"paymentAmount\")}\r\n\t\t\t\t{getFormatedNumberString(payment.amt, true)}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"paymentCurrCode\")}\r\n\t\t\t\t{payment.currCode}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"paymentAmtBal\")}\r\n\t\t\t\t{getFormatedNumberString(payment.amtBal, true)}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"paymentAmtBalNonAlloc\")}\r\n\t\t\t\t{getFormatedNumberString(payment.amtNonAllocBal, true)}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"paymentAmtOrdersBal\")}\r\n\t\t\t\t{getFormatedNumberString(payment.amtOrdersBal, true)}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"paymentAmtTradesBal\")}\r\n\t\t\t\t{getFormatedNumberString(payment.amtTransBal, true)}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"paymentStatus\")}\r\n\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};\r\n","import React from \"react\";\r\nimport { useDisplayPayment } from \"../../../data/clearing/payments/hooks/useDisplayPayments\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport {\r\n PaymentData,\r\n PaymentListData,\r\n} from \"../../../data/clearing/payments/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { DisplayPaymentMainAttributes } from \"./DisplayPaymentMainAttributes\";\r\nimport {\r\n ExpansionPanel,\r\n ExpansionPanelSummary,\r\n Typography,\r\n Grid,IconButton,\r\n} from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport { usePaymentPrinter } from \"../../../data/clearing/payments/hooks/usePaymentPrinter\";\r\n\r\nexport interface DisplayPaymentProps {\r\n id?: string;\r\n}\r\n\r\nexport const DisplayPayment: React.FunctionComponent = ({\r\n id,\r\n}) => {\r\n \r\n const payment = useDisplayPayment(id);\r\n const { getString } = React.useContext(LocalizationContext);\r\n\tconst [download, fetchState, setfetch] = usePaymentPrinter(payment);\r\n\r\n return !payment ? (\r\n <>{\"loading placeholder\"}\r\n ) : (\r\n \r\n \r\n \r\n \r\n \r\n {getString(\"tableBasciInfo\")}\r\n \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\r\n\t\t\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\r\n { fetchState.type !== \"not-started\" ? getString(\"pleaseWait\") : null }\r\n\t\t\t\t\t\t\t\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const useViewPayment = () => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n return React.useCallback(\r\n (payment: PaymentListData) =>\r\n showWithDrawer(),\r\n [showWithDrawer]\r\n );\r\n};\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport ViewIcon from \"@material-ui/icons/InputOutlined\";\r\nimport { PaymentListData } from \"../../../data/clearing/payments/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { MaterialTableProps } from \"material-table\";\r\nimport { useViewPayment } from \"./DisplayPayment\";\r\n\r\nexport function usePaymentsActions() {\r\n const { getString } = useContext(LocalizationContext);\r\n const onShowPayment = useViewPayment();\r\n\r\n return useMemo(() => {\r\n const result: MaterialTableProps[\"actions\"] = [\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"orderActView\"),\r\n onClick: (event, rowData) => onShowPayment(rowData as PaymentListData),\r\n },\r\n ];\r\n return result;\r\n }, [onShowPayment, getString]);\r\n}\r\n\r\n","import { PaymentListData } from \"../../../data/clearing/payments/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\n\r\nexport const usePaymentsColumns = () => {\r\n\tconst { getString, getDateString, getFormatedNumberString } = React.useContext(LocalizationContext);\r\n\r\n\treturn React.useMemo(\r\n\t\t() => [\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"paymentDataTime\"),\r\n\t\t\t\trender: payment => getDateString(payment.payDate, \"DD.MM.YYYY\"),\r\n\t\t\t\tsorting: false,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"paymentPayType\"),\r\n\t\t\t\tfield: \"payTypeDescr\",\r\n\t\t\t\tsorting: false,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"paymentClmOrdNo\"),\r\n\t\t\t\tfield: \"orderNo\",\r\n\t\t\t\tsorting: false,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"paymentTranNo\"),\r\n\t\t\t\tfield: \"tranNo\",\r\n\t\t\t\tsorting: false,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"paymentAmount\"),\r\n\t\t\t\trender: payment => getFormatedNumberString(payment.amtPay, true),\r\n\t\t\t\tsorting: false,\r\n\t\t\t\twidth: \"140px\",\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\tmaxWidth: \"140px\",\r\n\t\t\t\t\tminWidth: \"140px\",\r\n\t\t\t\t\twidth: \"140px\",\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\tmaxWidth: \"140px\",\r\n\t\t\t\t\tminWidth: \"140px\",\r\n\t\t\t\t\twidth: \"140px\",\r\n//\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"paymentAmtBal\"),\r\n\t\t\t\trender: payment => getFormatedNumberString(payment.amtBal, true),\r\n\t\t\t\tsorting: false,\r\n\t\t\t\twidth: \"140px\",\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\tmaxWidth: \"140px\",\r\n\t\t\t\t\tminWidth: \"140px\",\r\n\t\t\t\t\twidth: \"140px\",\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\tmaxWidth: \"140px\",\r\n\t\t\t\t\tminWidth: \"140px\",\r\n\t\t\t\t\twidth: \"140px\",\r\n//\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"paymentAmtBalNonAlloc\"),\r\n\t\t\t\trender: payment => getFormatedNumberString(payment.amtNonAllocBal, true),\r\n\t\t\t\tsorting: false,\r\n\t\t\t\twidth: \"140px\",\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\tmaxWidth: \"140px\",\r\n\t\t\t\t\tminWidth: \"140px\",\r\n\t\t\t\t\twidth: \"140px\",\r\n\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\tmaxWidth: \"140px\",\r\n\t\t\t\t\tminWidth: \"140px\",\r\n\t\t\t\t\twidth: \"140px\",\r\n//\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t},\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: getString(\"paymentAmtOrdersBal\"),\r\n\t\t\t\trender: (payment) => getFormatedNumberString(payment.amtOrdersBal, true),\r\n\t\t\t\tsorting: false,\r\n\t\t\t\t\t\tcellStyle: {\r\n\t\t\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\theaderStyle: {\r\n\t\t\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t\t\t},\r\n\t\t\t },\r\n\t\t\t {\r\n\t\t\t\t \r\n\t\t\t\ttitle: getString(\"paymentAmtTradesBal\"),\r\n\t\t\t\trender: (payment) => getFormatedNumberString(payment.amtTransBal, true),\r\n\t\t\t\tsorting: false,\r\n\t\t\t\t\t\tcellStyle: {\r\n\t\t\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\theaderStyle: {\r\n\t\t\t\t\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\t\t\t\t\ttextAlign: \"end\",\r\n\t\t\t\t\t\t\tpaddingRight: \"10px\",\r\n\t\t\t\t\t\t},\r\n\t\t\t },\r\n\t\t\t\t],\r\n\t\t[getString, getFormatedNumberString, getDateString]\r\n\t) as Column[];\r\n};\r\n","import React from \"react\";\r\nimport { Grid, Paper, Button, Typography } from \"@material-ui/core\";\r\nimport { PaymentSideSelect } from \"./PaymentSideSelect\";\r\nimport { PaymentDedicationSelect } from \"./PaymentDedicationSelect\";\r\nimport { DateInput } from \"../../components/common/DateInput\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { PaymentFilter } from \"../../../data/clearing/payments/types\";\r\nimport { useAuth } from \"../../../data/auth/hooks\";\r\nimport { PaymentFilterChipsComponent } from \"./PaymentFilterChips\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { FiltredTransactionsSelect } from \"../../components/trading/FiltredTransactionsSelect\";\r\nimport { SimpleTransFilter } from \"../../../data/trading/transactions/types\";\r\nimport { TransSimpleData } from \"../../../data/trading/transactions/types\";\r\nimport { userValidationState } from \"../../../data/listing/users/hooks/useUserValidator\";\r\n\r\nexport enum PaymentFilterEditorType {\r\n Basic,\r\n Extended,\r\n}\r\n\r\ninterface PaymentFilterEditorProps {\r\n filter?: PaymentFilter;\r\n editFilter: (prop: keyof PaymentFilter, value: any) => void;\r\n save: () => void;\r\n type: PaymentFilterEditorType;\r\n reset?: () => void;\r\n}\r\n\r\nexport const PaymentFilterEditor: React.FunctionComponent = ({\r\n filter,\r\n editFilter,\r\n save,\r\n type,\r\n reset,\r\n}) => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const { getString } = React.useContext(LocalizationContext);\r\n const [auth] = useAuth();\r\n\tconst [selectedOrder, setSelectedOrder] = React.useState(null);\r\n\r\n if (auth.status !== \"successful\") {\r\n return null;\r\n }\r\n\r\n/*\tconst [tradesFilter, setTransactionFilter] = React.useState(\r\n\t\tcreateTransactionFilterPayment(filter)\r\n\t); */\r\n\r\n const tradesFilter={ cliid: auth.user.clientId}\r\n\r\n\r\n/* React.useEffect(() => {\r\n\t\tsetTransactionFilter(createTransactionFilterPayment(filter));\r\n\t}, [filter, setTransactionFilter]); */\r\n\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n editFilter(\"datefrom\", date?.toISOString())}\r\n />\r\n \r\n \r\n editFilter(\"dateto\", date?.toISOString())}\r\n />\r\n \r\n\r\n{/* \r\n editFilter(\"inout\", e.target.value)}\r\n side={filter?.inout}\r\n nullable\r\n />\r\n \r\n \r\n editFilter(\"nondedicated\", e.target.value)}\r\n sidededication={filter?.nondedicated}\r\n nullable\r\n />\r\n */}\r\n\r\n \r\n\r\n \r\n\t\t\t\t\t\t\t\t\t trans.ordId === filter?.tranId}\r\n\t\t\t\t\t\t\t\t\t\tonChangeItem={trans => {\r\n\t\t\t\t\t\t\t\t\t\t\tsetSelectedOrder(trans);\r\n\t\t\t\t\t\t\t\t\t\t\teditFilter(\"tranId\", trans ? trans.ordId : undefined);\r\n\t\t\t\t\t\t\t\t\t\t\teditFilter(\"tranDesc\", trans ? trans.ordData : undefined);\r\n\t\t\t\t\t\t\t\t\t\t}}\r\n disabled={false}\r\n\t\t\t\t\t\t\t\t/>\r\n \t\t\t\r\n\r\n\r\n \r\n \r\n {\r\n save();\r\n showWithDrawer(undefined);\r\n }}\r\n >\r\n {getString(\"orderFilterConfirm\")}\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 PaymentFilterChips = PaymentFilterChipsComponent;\r\n","import React from \"react\";\r\nimport { PaymentListData } from \"../../../data/clearing/payments/types\";\r\nimport {\r\n PaginationTable,\r\n PaginationDataProps,\r\n} from \"../../components/common/PagginationTable\";\r\nimport { usePaymentsActions } from \"./usePaymentsActions\";\r\nimport { usePaymentsColumns } from \"./usePaymentsColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\n\r\nexport interface PaymentsTableProps {\r\n userAccessRights: AccessRights;\r\n getData: () => void;\r\n}\r\n\r\ntype PaymentsTablePropsType = PaymentsTableProps &\r\n PaginationDataProps;\r\n\r\nconst PaymentsTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n getData,\r\n ...tableProps\r\n}) => {\r\n const actions = usePaymentsActions();\r\n const columns = usePaymentsColumns();\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={getData}\r\n // immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n actions={actions}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default PaymentsTable;\r\n","import { PaymentFilter, PayGroup } from \"../types\";\r\nimport { PaymentListData, GetPaymentParamsKlijenti } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nconst getPaymentsWebApi = (\r\n user: User,\r\n page: number,\r\n itemsPerPage: number,\r\n filter: PaymentFilter\r\n) => {\r\n const params: GetPaymentParamsKlijenti = {\r\n userid: user.userId,\r\n inout: filter.inout,\r\n fromrow: page * itemsPerPage,\r\n numofrows: itemsPerPage,\r\n cliid: filter?.client?.cliId,\r\n nondedicated: filter.nondedicated,\r\n datefrom: getParamsDateString(filter.datefrom),\r\n dateto: getParamsDateString(filter.dateto),\r\n tranid: filter?.tranId,\r\n };\r\n\r\n return webApiWithResponse({\r\n method: \"GET\",\r\n url: \"clearing/getpaymentlist\",\r\n params,\r\n });\r\n};\r\n\r\nexport default getPaymentsWebApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadAllPayments } from \"../thunks/loadAllPaymentClient\";\r\nimport { PaymentListData } from \"../types\";\r\nimport { PageData } from \"../../../models\";\r\nimport { invalidatePayment } from \"../paymentsDataSlice\";\r\n\r\nexport const usePaymentsData = () => {\r\n const pageData = useSelector<\r\n StoreType,\r\n PageData | undefined\r\n >((s) => s.data.clearing.payments.currentPage);\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadPaymentsPage = React.useCallback(\r\n () => dispatch(loadAllPayments()),\r\n [dispatch]\r\n );\r\n\r\n const invalidate = React.useCallback(() => dispatch(invalidatePayment()), [dispatch]);\r\n\r\n return [pageData, dispatchLoadPaymentsPage, invalidate] as [\r\n typeof pageData,\r\n typeof dispatchLoadPaymentsPage,\r\n typeof invalidate,\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { setPayments, invalidatePayment } from \"../paymentsDataSlice\";\r\nimport { setPaymentIndex } from \"../paymentsUXSlice\";\r\nimport getPayments from \"../api/getPaymentsClient\";\r\nimport { PageIndex, PageDataStatus } from \"../../../models\";\r\n\r\nexport const loadAllPayments = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n const { pageNumber, itemsPerPage } = store.ux.clearing.payments.index;\r\n const { filter } = store.ux.clearing.payments;\r\n const user = store.data.auth.current.user;\r\n\r\n const paymentsResponse = await dispatch(\r\n getPayments(user, pageNumber, itemsPerPage, filter)\r\n );\r\n\r\n if (!paymentsResponse || paymentsResponse.resCode !== \"OK\") {\r\n return;\r\n }\r\n\r\n const payments = {\r\n currentPageData: paymentsResponse.obj,\r\n totalCount: Number(paymentsResponse.resDesc) || 0,\r\n status: PageDataStatus.DataCurrent,\r\n };\r\n\r\n dispatch(setPayments(payments));\r\n};\r\n\r\nexport const setPaymentsIndexThunk = (index: PageIndex): ThunkType => (\r\n dispatch\r\n) => {\r\n dispatch(setPaymentIndex(index));\r\n dispatch(invalidatePayment());\r\n};\r\n","import React from \"react\";\r\nimport { Chip, Grid } from \"@material-ui/core\";\r\nimport { PaymentFilter } from \"../../../data/clearing/payments/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\n\r\nimport { usePaymentSideOptionsTranslator } from \"../../../data/clearing/payments/hooks/usePaymentSideOptions\";\r\nimport { usePaymentDedicationOptionsTranslator } from \"../../../data/clearing/payments/hooks/usePaymentDedicationOptions\";\r\n\r\nexport const PaymentFilterChipsComponent: React.FunctionComponent = ({\r\n filter,\r\n removeFilter,\r\n}) => {\r\n const { getDateString, getString } = React.useContext(LocalizationContext);\r\n const sideTranslator = usePaymentSideOptionsTranslator();\r\n const dedicatedTranslator = usePaymentDedicationOptionsTranslator();\r\n return (\r\n \r\n {filter.inout && (\r\n \r\n removeFilter(\"inout\")}\r\n />\r\n \r\n )}\r\n {filter.nondedicated !== undefined && (\r\n \r\n removeFilter(\"nondedicated\")}\r\n />\r\n \r\n )}\r\n {filter.datefrom && (\r\n \r\n removeFilter(\"datefrom\")}\r\n />\r\n \r\n )}\r\n {filter.dateto && (\r\n \r\n removeFilter(\"dateto\")}\r\n />\r\n \r\n )}\r\n {filter.tranId && (\r\n \r\n removeFilter(\"tranId\")}\r\n />\r\n \r\n )}\r\n\r\n {filter.status && filter.status.ftDescr !== \"\" && (\r\n \r\n removeFilter(\"status\")}\r\n />\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\ninterface PaymentFilterChipsProps {\r\n filter: PaymentFilter;\r\n removeFilter: (type: keyof PaymentFilter) => void;\r\n}\r\n","import React from \"react\";\r\nimport FilterIcon from \"@material-ui/icons/FilterListOutlined\";\r\nimport { IconButton, Grid } from \"@material-ui/core\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport {\r\n\tusePaymentsFilter,\r\n\tuseCurrentPaymentsFilter,\r\n} from \"../../../data/clearing/payments/hooks/usePaymentsFilter\";\r\nimport {\r\n\tPaymentFilterEditor,\r\n\tPaymentFilterEditorType,\r\n\tPaymentFilterChips,\r\n} from \"./PaymentFilterEditor\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\n\r\nexport const PaymentFilterButton: React.FunctionComponent = () => {\r\n\tconst showWithDrawer = React.useContext(DisplayDrawerContext);\r\n\tconst showFilter = React.useCallback(() => showWithDrawer(), [showWithDrawer]);\r\n\r\n\tconst [filter, removeFilter] = useCurrentPaymentsFilter();\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\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\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};\r\n\r\nconst PaymentsFilterEditor: React.FunctionComponent = () => {\r\n\tconst [filter, editFilter, save, , rest] = usePaymentsFilter();\r\n\treturn (\r\n\t\t\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport ExcelIcon from \"@material-ui/icons/TableChartOutlined\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport { usePaymentsReportDownloader } from \"../../../data/reports/exchbusiness/clientOverview/hooks/usePaymentsReportDownloader\";\r\nimport { usePaymentsExcelReportDownloader } from \"../../../data/reports/exchbusiness/clientOverview/hooks/usePaymentsExcelReportDownloader\";\r\n\r\nexport const DownloadPaymentsButton: React.FunctionComponent = () => {\r\n\tconst [downloader, fetchState] = usePaymentsReportDownloader();\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport const DownloadPaymentsButtonExcel: React.FunctionComponent = () => {\r\n\tconst [downloader, fetchState] = usePaymentsExcelReportDownloader();\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport {\r\n Grid,\r\n CardContent,\r\n CardHeader,\r\n Card,\r\n Divider,\r\n} from \"@material-ui/core\";\r\nimport PaymentsTable from \"./PaymentsTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { PageComponent, AccessRights } from \"../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { usePaymentsData } from \"../../../data/clearing/payments/hooks/usePaymentsDataClient\";\r\nimport { usePaymentIndex } from \"../../../data/clearing/payments/hooks/usePaymentsIndex\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { PageDataStatus } from \"../../../data/models\";\r\nimport { PaymentFilterButton } from \"./PaymentFilter\";\r\nimport { useAuth } from \"../../../data/auth/hooks\";\r\nimport { DownloadPaymentsButton, DownloadPaymentsButtonExcel } from \"./DownloadPaymentsButton\";\r\n\r\nconst PaymentsPage: PageComponent = ({ userAccessRights }) => {\r\n const pageStyles = usePageStyles();\r\n\r\n const [pageData, dispatchLoadPayments, invalidate] = usePaymentsData();\r\n const [pageIndex, dispatchSetIndex] = usePaymentIndex();\r\n\r\n React.useEffect(() => {\r\n if (pageData && pageData.status === PageDataStatus.DataInvalidated) {\r\n dispatchLoadPayments();\r\n }\r\n }, [dispatchLoadPayments, pageData]);\r\n React.useEffect(() => () => { invalidate() }, [])\r\n\r\n const history = useHistory();\r\n\r\n const [auth] = useAuth();\r\n\r\n if (auth.status !== \"successful\") {\r\n return null;\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n }\r\n action={}\r\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 PaymentAction: React.FunctionComponent = () => (\r\n \r\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 PaymentsPage;\r\n","import { NavigationItem } from \"../../../core/navigation/types\";\r\nimport PaymentsPage from \"./PaymentsPage\";\r\nimport { paymentLocation } from \"./Locations\";\r\n\r\nexport const paymentClientComponents: NavigationItem[] = [\r\n {\r\n Component: PaymentsPage,\r\n isMenuItem: true,\r\n path: paymentLocation,\r\n },\r\n];\r\n","import { getEditLocation } from \"../../../core/util/functions\";\r\nexport const paymentLocation = \"/reports/payments\";\r\nexport const getPaymentEditLocation = (id?: string) =>\r\n getEditLocation(paymentLocation, undefined, id);\r\n\r\nexport const editRouter = getPaymentEditLocation(\":payId?\");\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { NewsData } from \"../types\";\r\n\r\nexport const getNewsApi = (userId: string, newsid: string) =>\r\n webApi({\r\n method: \"GET\",\r\n url: \"news/getnews\",\r\n params: {\r\n userId,\r\n newsid,\r\n },\r\n });\r\n\r\nexport default getNewsApi;\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getNewsApi from \"../api/getNews\";\r\nimport { setDisplayed } from \"../newsDataReducer\";\r\nimport { NewsData } from \"../types\";\r\n\r\nexport const loadNews = (newsid: string): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n dispatch(setDisplayed());\r\n\r\n const news = await dispatch(getNews(newsid));\r\n\r\n dispatch(setDisplayed(news));\r\n};\r\n\r\nexport const getNews = (\r\n newsid: string\r\n): ThunkType> => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { userId } = store.data.auth.current.user;\r\n return await dispatch(getNewsApi(userId, newsid));\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { NewsData } from \"../types\";\r\nimport { loadNews } from \"../thunks/loadNews\";\r\n\r\nexport const useDisplayNews = (newsid?: string) => {\r\n const storeNews = useSelector(\r\n (store) => store.data.reports.news.displayedNews\r\n );\r\n\r\n const displayedNews =\r\n storeNews && storeNews.newsId === newsid ? storeNews : undefined;\r\n\r\n const displatch = useDispatch();\r\n\r\n React.useEffect(() => {\r\n if (newsid) {\r\n displatch(loadNews(newsid));\r\n }\r\n }, [displatch, newsid]);\r\n\r\n return displayedNews;\r\n};\r\n","import React from \"react\";\r\nimport { NewsData } from \"../../../data/reports/news/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { useDisplaySingleEmementStyles } from \"../../useDisplaySingleEmementStyles\";\r\nimport { DisplayBoolNumber } from \"../../components/common/DisplayBoolNumber\";\r\nimport { Status } from \"../../../data/models\";\r\n\r\nexport interface DisplayNewsMainAttributesProps {\r\n news: NewsData;\r\n}\r\n\r\nexport const DisplayNewsMainAttributes: React.FunctionComponent = ({\r\n news,\r\n}) => {\r\n const style = useDisplaySingleEmementStyles();\r\n const {\r\n getString,\r\n getDateString,\r\n getFormatedNumberString,\r\n } = React.useContext(LocalizationContext);\r\n\r\n return (\r\n
\r\n
\r\n {getString(\"newsTime\")}\r\n {news.newsTime}\r\n
\r\n
\r\n {getString(\"newsTitle\")}\r\n {news.title}\r\n
\r\n
\r\n {getString(\"newsTitleen\")}\r\n {news.titleEn}\r\n
\r\n
\r\n {getString(\"stockFeeStatus\")}\r\n \r\n \r\n \r\n
\r\n
\r\n );\r\n};\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const downloadNews = (user: User, newsid: string) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"news/getnewsreport\",\r\n params: {\r\n userid: user.userId,\r\n newsid,\r\n },\r\n });\r\n};\r\n\r\nexport default downloadNews;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadNewsThunk } from \"../thunks/downloadNewsThunk\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { NewsData } from \"../types\";\r\nimport { setDownloadNewsFetchState } from \"../newsDataReducer\";\r\n\r\nexport const useNewsDownload = (invoice?: NewsData) => {\r\n const fetchState = useSelector(\r\n (s) => s.data.reports.news.downloadNewsFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(() => {\r\n dispatch(downloadNewsThunk(invoice));\r\n }, [dispatch, invoice]);\r\n\r\n const dispatchSetFetch = React.useCallback(() => { \r\n\t\tdispatch(setDownloadNewsFetchState({ type: \"started\" }))\r\n\t},\t[dispatch] );\r\n\r\n return [download, fetchState, dispatchSetFetch] as [typeof download, typeof fetchState, typeof dispatchSetFetch];\r\n};\r\n\r\n\r\n\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { downloadNews } from \"../api/downloadNews\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setDownloadNewsFetchState } from \"../newsDataReducer\";\r\nimport { NewsData } from \"../types\";\r\n\r\nexport const downloadNewsThunk = (news?: NewsData): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (\r\n store.data.auth.current.status !== \"successful\" ||\r\n !news ||\r\n !news.newsId\r\n ) {\r\n return undefined;\r\n }\r\n\r\n //\tconst filename = `TradingOrder${order.side.trim().toUpperCase()}_${lan.trim().toUpperCase()}_${order.ordNo}.pdf`\r\n\r\n const lan = store.ux.localization.language;\r\n const filename = `News_${lan.trim().toUpperCase()}_${\r\n news.newsId\r\n }.pdf`;\r\n const user = store.data.auth.current.user;\r\n dispatch(setDownloadNewsFetchState({ type: \"started\" }));\r\n const newsReport = await dispatch(downloadNews(user, news.newsId));\r\n if (newsReport) {\r\n fileDownload(\r\n new Blob([newsReport as any], { type: \"application/pdf\" }),\r\n filename\r\n );\r\n }\r\n dispatch(setDownloadNewsFetchState({ type: \"not-started\" }));\r\n};\r\n","import React from \"react\";\r\nimport { useDisplayNews } from \"../../../data/reports/news/hooks/useDisplayNews\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { NewsData,} from \"../../../data/reports/news/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { DisplayNewsMainAttributes } from \"./DisplayNewsMainAttributes\";\r\nimport {\r\n ExpansionPanel,\r\n ExpansionPanelSummary,\r\n Typography,\r\n Grid,\r\n IconButton,\r\n} from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport PrintIcon from \"@material-ui/icons/PrintOutlined\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport { useNewsDownload } from \"../../../data/reports/news/hooks/useNewsDownload\";\r\n\r\nexport interface DisplayNewsProps {\r\n id?: string;\r\n enablePrint?: boolean;\r\n}\r\n\r\nexport const DisplayNews: React.FunctionComponent = ({\r\n id,\r\n enablePrint,\r\n}) => {\r\n const news = useDisplayNews(id);\r\n const { getString } = React.useContext(LocalizationContext);\r\n\tconst [download, fetchState, setfetch] = useNewsDownload(news);\r\n\r\n return !news ? (\r\n <>{\"loading placeholder\"}\r\n ) : (\r\n \r\n \r\n \r\n \r\n \r\n {getString(\"tableBasciInfo\")}\r\n \r\n \r\n \r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\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\r\n { fetchState.type !== \"not-started\" ? getString(\"pleaseWait\") : null }\r\n\t\t\t\t\t\t\t\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const useViewNews = (enablePrint?: boolean) => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n return React.useCallback(\r\n (news: NewsData) =>\r\n showWithDrawer(\r\n \r\n ),\r\n [showWithDrawer]\r\n );\r\n};\r\n","\r\nimport { getEditLocation } from \"../../../core/util/functions\";\r\nexport const newsLocation = \"/reports/news\";\r\nexport const getNewsEditLocation = (id?: string) =>\r\n getEditLocation(newsLocation, undefined, id);\r\n\r\n export const editRouter = getNewsEditLocation(\":newsId?\");","import { webApi } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const deleteNewsApi = (userId: string, newsid: string) =>\r\n webApi({\r\n method: \"DELETE\",\r\n url: \"news/delnews\",\r\n params: {\r\n userId,\r\n newsid,\r\n },\r\n });\r\n\r\nexport default deleteNewsApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { deleteNews } from \"../thunks/deleteNews\";\r\nimport { setFetchState } from \"../newsDataReducer\";\r\n\r\nexport const useNewsDelete = () => {\r\n const fetchState = useSelector(\r\n (store) => store.data.reports.news.cancelFetchState\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchDeleteNews = React.useCallback(\r\n (id: string) => dispatch(deleteNews(id)),\r\n [dispatch]\r\n );\r\n\r\n React.useEffect(() => {\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n }, [dispatch]);\r\n\r\n return [fetchState, dispatchDeleteNews] as [\r\n typeof fetchState,\r\n typeof dispatchDeleteNews\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { deleteNewsApi } from \"../api/deleteNews\";\r\nimport { setFetchState, invalidateNews } from \"../newsDataReducer\";\r\n\r\nexport const deleteNews = (newsid: string): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n dispatch(setFetchState({ type: \"started\" }));\r\n\r\n const { userId } = store.data.auth.current.user;\r\n const result = await dispatch(deleteNewsApi(userId, newsid));\r\n\r\n dispatch(\r\n setFetchState(\r\n result !== undefined ? { type: \"successful\" } : { type: \"error\" }\r\n )\r\n );\r\n dispatch(invalidateNews());\r\n};\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport ViewIcon from \"@material-ui/icons/InputOutlined\";\r\nimport EditIcon from \"@material-ui/icons/EditOutlined\";\r\nimport { NewsData } from \"../../../data/reports/news/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { MaterialTableProps } from \"material-table\";\r\nimport { useViewNews } from \"./DisplayNews\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { getNewsEditLocation } from \"./Locations\";\r\nimport { useNewsDelete } from \"../../../data/reports/news/hooks/useNewsDelete\";\r\nimport { useAuth } from \"../../../data/auth/hooks\";\r\n\r\nexport function useNewsActions() {\r\n const { getString } = useContext(LocalizationContext);\r\n const onShowNews = useViewNews();\r\n const onEditNewse = useEditNewsAction();\r\n\r\n const [auth] = useAuth();\r\n\r\n return useMemo(() => {\r\n const result: MaterialTableProps[\"actions\"] = [\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"newsShow\"),\r\n onClick: (event, rowData) => onShowNews(rowData as NewsData),\r\n },\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"tableEdit\"),\r\n onClick: (event, rowData) => onEditNewse(rowData as NewsData),\r\n// hidden: auth.status === \"successful\" && auth.user.roleCode===\"MEMTRADER\"\r\n hidden: auth.status === \"successful\" && (auth.user.roleCode === \"MEMTRADER\" || auth.user.roleCode === \"MEMMANAGER\" || auth.user.roleCode === \"MEMCONTACT\" ) \r\n },\r\n ];\r\n return result;\r\n }, [onShowNews, onEditNewse, getString]);\r\n}\r\n\r\nexport const useDeleteNewsAction = () => {\r\n const [, deleteNews] = useNewsDelete();\r\n return React.useCallback(\r\n async (news: NewsData) => {\r\n if (news.newsId) {\r\n await deleteNews(news.newsId);\r\n }\r\n },\r\n [deleteNews]\r\n );\r\n};\r\n\r\nexport const useEditNewsAction = () => {\r\n const history = useHistory();\r\n return React.useCallback(\r\n (news: NewsData) =>\r\n history.push(getNewsEditLocation(news.newsId)),\r\n [history]\r\n );\r\n};\r\n","\r\nimport React from \"react\";\r\nimport { useNewsColumns } from \"./useNewsColumns\";\r\nimport { NewsData } from \"../../../data/reports/news/types\";\r\nimport { PaginationTable, PaginationDataProps,} from \"../../components/common/PagginationTable\";\r\nimport { useNewsActions, useDeleteNewsAction,} from \"./useNewsActions\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\n\r\nexport interface NewsTableProps {\r\n userAccessRights: AccessRights;\r\n getData: () => void;\r\n}\r\n\r\n\r\ntype NewsTablePropsType = NewsTableProps &\r\n PaginationDataProps;\r\n\r\nconst NewsTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n getData,\r\n ...tableProps\r\n}) => {\r\n const actions = useNewsActions();\r\n const columns = useNewsColumns();\r\n const onDeleteNews = useDeleteNewsAction();\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={getData}\r\n title=\"\"\r\n columns={columns}\r\n actions={actions}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n }}\r\n// editable={{\r\n// onRowDelete: onDeleteNews,\r\n// }}\r\n\r\n />\r\n );\r\n};\r\n\r\nexport default NewsTable;\r\n","import { NewsData } from \"../../../data/reports/news/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\nimport { DisplayBoolNumber } from \"../../components/common/DisplayBoolNumber\";\r\nimport { Status } from \"../../../data/models\";\r\nimport { useAuth } from \"../../../data/auth/hooks\";\r\n\r\nexport const useNewsColumns = () => {\r\n const {\r\n getString,\r\n getDateString,\r\n getFormatedNumberString,\r\n getDateTimeString,\r\n } = React.useContext(LocalizationContext);\r\n\r\n const [auth] = useAuth();\r\n\r\n return React.useMemo(\r\n () => [\r\n {\r\n title: getString(\"newsTime\"),\r\n// render: (news) => getDateString(news.newsTime, \"DD.MM.YYYY\"),\r\n\t\t\t\trender: news => getDateTimeString(news.newsTime),\r\n sorting: false,\r\n },\r\n\r\n {\r\n title: getString(\"newsTitle\"),\r\n field: \"title\",\r\n sorting: false,\r\n },\r\n auth.status===\"successful\" && auth.user.roleCode !== \"MEMTRADER\" && auth.user.roleCode !== \"MEMMANAGER\" && auth.user.roleCode !== \"MEMCONTACT\" ? {\r\n title: getString(\"stockFeeStatus\"),\r\n render: (news) => (\r\n \r\n ),\r\n customSort: (a, b) => a.status - b.status, \r\n } : {},\r\n ],\r\n [getString, getFormatedNumberString]\r\n ) as Column[];\r\n};\r\n","\r\n\r\nimport { NewsData, NewsDataFilter} from \"../types\";\r\nimport { NewsParams } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nconst getAllNewsApi = (\r\n user: User,\r\n page: number,\r\n itemsPerPage: number,\r\n filter: NewsDataFilter\r\n) => {\r\n const params: NewsParams = {\r\n userid: user.userId,\r\n fromrow: page * itemsPerPage,\r\n numofrows: itemsPerPage,\r\n datefrom: getParamsDateString(filter.datefrom),\r\n dateto: getParamsDateString(filter.dateto),\r\n status: filter.status,\r\n };\r\n\r\n return webApiWithResponse({\r\n method: \"GET\",\r\n url: \"news/getnewslist\",\r\n params,\r\n });\r\n};\r\n\r\nexport default getAllNewsApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadAllNews } from \"../thunks/loadAllNews\";\r\nimport { NewsData } from \"../types\";\r\nimport { PageData } from \"../../../models\";\r\n\r\nexport const useNewsData = () => {\r\n const pageData = useSelector<\r\n StoreType,\r\n PageData | undefined\r\n >((s) => s.data.reports.news.currentPage);\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadNewsPage = React.useCallback(\r\n () => dispatch(loadAllNews()),\r\n [dispatch]\r\n );\r\n\r\n return [pageData, dispatchLoadNewsPage] as [\r\n typeof pageData,\r\n typeof dispatchLoadNewsPage\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { setNews, invalidateNews } from \"../newsDataReducer\";\r\nimport { setIndex } from \"../newsUXSlice\";\r\nimport getAllNewsApi from \"../api/getAllNews\";\r\nimport { PageIndex, PageDataStatus } from \"../../../models\";\r\n\r\nexport const loadAllNews = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n const { pageNumber, itemsPerPage } = store.ux.reports.news.index;\r\n const { filter } = store.ux.reports.news;\r\n const user = store.data.auth.current.user;\r\n\r\n const newsResponse = await dispatch(\r\n getAllNewsApi(user, pageNumber, itemsPerPage, filter)\r\n );\r\n\r\n if (!newsResponse || newsResponse.resCode !== \"OK\") {\r\n return;\r\n }\r\n\r\n const news = {\r\n currentPageData: newsResponse.obj,\r\n totalCount: Number(newsResponse.resDesc) || 0,\r\n status: PageDataStatus.DataCurrent,\r\n };\r\n\r\n dispatch(setNews(news));\r\n};\r\n\r\nexport const setNewsIndexThunk = (index: PageIndex): ThunkType => (\r\n dispatch\r\n) => {\r\n dispatch(setIndex(index));\r\n dispatch(invalidateNews());\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { resetNewsIdices } from \"../newsUXSlice\";\r\nimport { PageIndex } from \"../../../models\";\r\nimport { setNewsIndexThunk } from \"../thunks/loadAllNews\";\r\n\r\nexport const useNewsIndex = () => {\r\n const pageIndex = useSelector(\r\n (s) => s.ux.reports.news.index\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetIndex = React.useCallback(\r\n (index: PageIndex) => dispatch(setNewsIndexThunk(index)),\r\n [dispatch]\r\n );\r\n const dispatchResetIndex = React.useCallback(\r\n () => dispatch(resetNewsIdices()),\r\n [dispatch]\r\n );\r\n\r\n return [pageIndex, dispatchSetIndex, dispatchResetIndex] as [\r\n typeof pageIndex,\r\n typeof dispatchSetIndex,\r\n typeof dispatchResetIndex\r\n ];\r\n};\r\n","\r\nimport { useCopiedState } from \"../../../../core/util/hooks\";\r\nimport { setFilter, removeFilter, initialState } from \"../newsUXSlice\";\r\nimport { invalidateNews } from \"../newsDataReducer\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport React from \"react\";\r\nimport { NewsDataFilter } from \"../types\";\r\n\r\nexport const useNewsFilter = () => {\r\n const [storeFilter] = useCurrentNewsFilter();\r\n const [filter, editFilter, changeState, setCurrentFilter] = useCopiedState<\r\n NewsDataFilter\r\n >(storeFilter);\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetFilter = React.useCallback(() => {\r\n dispatch(setFilter(filter!));\r\n dispatch(invalidateNews());\r\n }, [dispatch, filter]);\r\n\r\n const dispatchResetFilter = React.useCallback(() => {\r\n setCurrentFilter(initialState.filter);\r\n }, [setCurrentFilter]);\r\n\r\n return [\r\n filter,\r\n editFilter,\r\n dispatchSetFilter,\r\n changeState,\r\n dispatchResetFilter,\r\n ] as [\r\n typeof filter,\r\n typeof editFilter,\r\n typeof dispatchSetFilter,\r\n typeof changeState,\r\n typeof dispatchResetFilter\r\n ];\r\n};\r\n\r\nexport const useCurrentNewsFilter = () => {\r\n const filter = useSelector(\r\n (store) => store.ux.reports.news.filter\r\n );\r\n const dispatch = useDispatch();\r\n const dispatchRemoveFilter = React.useCallback(\r\n (type: keyof NewsDataFilter) => {\r\n dispatch(removeFilter(type));\r\n dispatch(invalidateNews());\r\n },\r\n [dispatch]\r\n );\r\n\r\n return [filter, dispatchRemoveFilter] as [\r\n typeof filter,\r\n typeof dispatchRemoveFilter\r\n ];\r\n};\r\n","import React from \"react\";\r\nimport { Grid, Paper, Button } from \"@material-ui/core\";\r\nimport { DateInput } from \"../../components/common/DateInput\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { NewsDataFilter } from \"../../../data/reports/news/types\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { isValidDate } from \"../../../core/util/functions\";\r\n\r\ninterface NewsFilterEditorProps {\r\n filter?: NewsDataFilter;\r\n editFilter: (prop: keyof NewsDataFilter, value: any) => void;\r\n save: () => void;\r\n}\r\n\r\nexport const NewsFilterEditor: React.FunctionComponent = ({\r\n filter,\r\n editFilter,\r\n save,\r\n}) => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const { getString } = React.useContext(LocalizationContext);\r\n\r\n const handleChange = React.useCallback(\r\n (event: React.ChangeEvent) => {\r\n editFilter(event.target.name as any, event.target.value);\r\n },\r\n [editFilter]\r\n );\r\n\r\n if (!filter) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n editFilter(\"datefrom\", isValidDate(date) ? date.toISOString() : undefined)}\r\n />\r\n \r\n \r\n editFilter(\"dateto\", isValidDate(date) ? date.toISOString() : undefined)}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n {\r\n save();\r\n showWithDrawer(undefined);\r\n }}\r\n >\r\n {getString(\"orderFilterConfirm\")}\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport { Chip, Grid } from \"@material-ui/core\";\r\nimport { NewsDataFilter } from \"../../../data/reports/news/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\n\r\nexport const NewsFilterChips: React.FunctionComponent = ({\r\n filter,\r\n removefilter,\r\n}) => {\r\n const { getDateString, getString } = React.useContext(LocalizationContext);\r\n\r\n return (\r\n \r\n {filter.datefrom && (\r\n \r\n removefilter(\"datefrom\")}\r\n />\r\n \r\n )}\r\n {filter.dateto && (\r\n \r\n removefilter(\"dateto\")}\r\n />\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\ninterface NewsFilterChipsProps {\r\n filter: NewsDataFilter;\r\n removefilter: (type: keyof NewsDataFilter) => void;\r\n}\r\n","import React from \"react\";\r\nimport { IconButton, Grid } from \"@material-ui/core\";\r\nimport FilterIcon from \"@material-ui/icons/FilterListOutlined\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { useNewsFilter, useCurrentNewsFilter, } from \"../../../data/reports/news/hooks/useNewsFilter\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport { NewsFilterEditor } from \"./NewsEditor\";\r\nimport { NewsFilterChips } from \"./NewsFilterChips\";\r\n\r\nexport const NewsFilterButton: React.FunctionComponent = () => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const showFilter = React.useCallback(\r\n () => showWithDrawer(),\r\n [showWithDrawer]\r\n );\r\n\r\n const [filter, removefilter] = useCurrentNewsFilter();\r\n const { getString } = React.useContext(LocalizationContext);\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\nconst NewsFiltersEditor: React.FunctionComponent = () => {\r\n const [filter, editFilter, save] = useNewsFilter();\r\n return (\r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport { Grid, CardContent, CardHeader, Card, Divider, Fab } from \"@material-ui/core\";\r\nimport NewsTable from \"./NewsTable\";\r\nimport AddIcon from \"@material-ui/icons/Add\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { PageComponent, AccessRights } from \"../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { useNewsData } from \"../../../data/reports/news/hooks/useNewsData\";\r\nimport { useNewsIndex } from \"../../../data/reports/news/hooks/useNewsIndex\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { PageDataStatus } from \"../../../data/models\";\r\nimport { NewsFilterButton } from \"./NewsFilter\";\r\nimport { useAuth } from \"../../../data/auth/hooks\";\r\nimport { getNewsEditLocation } from \"./Locations\";\r\n\r\nconst NewsPage: PageComponent = ({ userAccessRights }) => {\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst [pageData, dispatchLoadNews] = useNewsData();\r\n\tconst [pageIndex, dispatchSetIndex] = useNewsIndex();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (pageData && pageData.status === PageDataStatus.DataInvalidated) {\r\n\t\t\tdispatchLoadNews();\r\n\t\t}\r\n\t}, [dispatchLoadNews, pageData]);\r\n\r\n\tconst history = useHistory();\r\n\r\n\tconst [auth] = useAuth();\r\n\r\n\tif (auth.status !== \"successful\") {\r\n\t\treturn null;\r\n\t}\r\n\r\n\treturn (\r\n\t\t<>\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\t}\r\n\t\t\t\t\t\t\taction={}\r\n\t\t\t\t\t\t/>\r\n\t\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\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t{userAccessRights === AccessRights.All && (\r\n\t\t\t\t\t history.push(getNewsEditLocation())}\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\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport default NewsPage;\r\n\r\n","import React from \"react\";\r\nimport { useDisplayNews } from \"./useDisplayNews\";\r\nimport { NewsData } from \"../types\";\r\nimport { useCopiedState } from \"../../../../core/util/hooks\";\r\nimport { Status } from \"../../../models\";\r\n\r\nconst now = new Date();\r\nexport const defaultNews: NewsData = {\r\n title: '',\r\n status: 1,\r\n};\r\n\r\nexport const useEditNews = (newsid?: string): NewsData | undefined => {\r\n const displayNews = useDisplayNews(newsid);\r\n\r\n return React.useMemo(() => {\r\n if (newsid !== undefined && displayNews === undefined) {\r\n return undefined;\r\n }\r\n\r\n if (newsid === undefined) {\r\n return { ...defaultNews };\r\n }\r\n\r\n return displayNews ? { ...displayNews } : undefined;\r\n }, [newsid, displayNews]);\r\n};\r\n\r\nexport const useEditNewsState = (newsid?: string) => {\r\n const news = useEditNews(newsid);\r\n return useCopiedState(news);\r\n};\r\n","import { NewsData, NewsValidationState } from \"../types\";\r\nimport { createUseValidator } from \"../../../../core/util/hooks\";\r\n\r\nexport const newsValidationState: NewsValidationState = {\r\n title: true,\r\n};\r\n\r\nexport const useNewsValidator = createUseValidator<\r\nNewsData,\r\n NewsValidationState\r\n>(newsValidationState);\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { NewsData } from \"../types\";\r\n\r\nexport const createNewsApi = (userId: string, news: NewsData) =>{\r\n const form = new FormData();\r\n\r\n news.fileName1 && form.append('filesr',news.fileName1);\r\n news.fileName2 && form.append('fileen',news.fileName2);\r\n\r\n return webApiWithResponse({\r\n method: \"POST\",\r\n url: \"news/createnews\",\r\n params: {\r\n userId,\r\n newstime: news.newsTime,\r\n titlesr: news.title,\r\n titleen: news.titleEn,\r\n },\r\n headers: { \"Content-Type\": \"multipart/form-data\" },\r\n data: form,\r\n });\r\n}\r\nexport default createNewsApi;\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { NewsData } from \"../types\";\r\n\r\nexport const updateNewsApi = (userId: string, news: NewsData) =>\r\n webApiWithResponse({\r\n method: \"PUT\",\r\n url: \"news/updnews\",\r\n params: {\r\n userId,\r\n },\r\n data: news,\r\n });\r\n\r\nexport default updateNewsApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { upsertNews } from \"../thunks/upsertNews\";\r\nimport { setFetchState } from \"../newsDataReducer\";\r\nimport { NewsData } from \"../types\";\r\n\r\nexport const useNewsUpsert = () => {\r\n const fetchState = useSelector(\r\n (store) => store.data.reports.news.fetchState\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchUpsertNews = React.useCallback(\r\n (news: NewsData) => dispatch(upsertNews(news)),\r\n [dispatch]\r\n );\r\n\r\n React.useEffect(() => {\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n }, [dispatch]);\r\n\r\n return [fetchState, dispatchUpsertNews] as [\r\n typeof fetchState,\r\n typeof dispatchUpsertNews\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport createNewseApi from \"../api/createNews\";\r\nimport updateNewsApi from \"../api/updateNews\";\r\nimport { NewsData } from \"../types\";\r\nimport { setFetchState, invalidateNews } from \"../newsDataReducer\";\r\n\r\nexport const upsertNews = (news: NewsData ): ThunkType => async ( dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n dispatch(setFetchState({ type: \"started\" }));\r\n\r\n const { userId } = store.data.auth.current.user;\r\n\r\n const result = news.newsId\r\n ? await dispatch(updateNewsApi(userId, news))\r\n : await dispatch(createNewseApi(userId, news))\r\n\r\n console.log(result)\r\n\r\n if (result && result.resCode === \"OK\") {\r\n console.log(\"1\")\r\n dispatch(setFetchState({ type: \"successful\", result: result.resDesc }));\r\n dispatch(invalidateNews());\r\n return result.resDesc;\r\n } else {\r\n dispatch(setFetchState({ type: \"error\", errorCode: result?.resCode }));\r\n }\r\n};\r\n","import { NavigationItem } from \"../../../core/navigation/types\";\r\nimport NewsPage from \"./NewsPage\";\r\nimport { EditNewsPage } from \"./EditNewsPage\";\r\nimport { newsLocation, editRouter } from \"./Locations\";\r\n\r\nexport const newsComponents: NavigationItem[] = [\r\n {\r\n Component: NewsPage,\r\n isMenuItem: true,\r\n path: newsLocation,\r\n },\r\n {\r\n Component: EditNewsPage,\r\n isMenuItem: false,\r\n path: editRouter,\r\n },\r\n];\r\n","import React from \"react\";\r\nimport { useEditNewsState } from \"../../../data/reports/news/hooks/useEditNewsState\";\r\nimport { useNewsValidator } from \"../../../data/reports/news/hooks/useNewsValidator\";\r\nimport { useNewsUpsert } from \"../../../data/reports/news/hooks/useNewsUpsert\";\r\nimport { RouteComponentProps, useHistory } from \"react-router-dom\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Card, Grid, CardHeader, Divider, CardContent, FormControl, Button} from \"@material-ui/core\";\r\nimport { FabSave } from \"../../components/common/FabSave\";\r\nimport { NewsData } from \"../../../data/reports/news/types\";\r\nimport { LeavePrompt } from \"../../components/common/LeavePrompt\";\r\nimport { Status } from \"../../../data/models\";\r\nimport { BoolInput } from \"../../components/common/BoolInput\";\r\nimport { newsLocation } from \"./Locations\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { StringInput } from \"../../components/common/StringInput\";\r\nimport { DateInput } from \"../../components/common/DateInput\";\r\n\r\nexport interface EditNewsInfo {\r\n newsId?: string;\r\n}\r\n\r\nexport interface EditNewsProps\r\n extends RouteComponentProps {}\r\n\r\nexport const EditNewsPage: React.FunctionComponent = (\r\n props\r\n) => {\r\n const { getString } = React.useContext(LocalizationContext);\r\n const pageStyles = usePageStyles();\r\n\r\n const [news, editNews, changed] = useEditNewsState(\r\n props.match.params.newsId\r\n );\r\n const [validationState, validate] = useNewsValidator();\r\n const [fetchState, upsert] = useNewsUpsert();\r\n const history = useHistory();\r\n\r\n const unsavedChanges = fetchState.type === \"not-started\" && changed;\r\n\r\n const handleChange = React.useCallback(\r\n (event: React.ChangeEvent) => {\r\n editNews(event.target.name as any, event.target.value);\r\n },\r\n [editNews]\r\n );\r\n\r\n const save = React.useCallback(() => {\r\n if (fetchState.type === \"successful\") {\r\n history.push(newsLocation);\r\n } else if (fetchState.type !== \"started\") {\r\n const normalized = validate(news);\r\n if (normalized) {\r\n upsert(normalized);\r\n }\r\n }\r\n }, [news, validate, fetchState, history, upsert]);\r\n\r\n const pageTitle = news && news.newsId ? \"newsEditTitle\" : \"newsCreateTitle\";\r\n\r\n if (!news) {\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\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t editNews(\"newsTime\", newsTime)}\r\n\t\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\t\tvalidationState.newsTime !== undefined &&\r\n\t\t\t\t\t\t\t\t\t\t!validationState.newsTime\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\trequired={validationState.newsTime !== undefined}\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\r\n \r\n \r\n \r\n property=\"title\"\r\n item={news}\r\n validationState={validationState}\r\n onChange={handleChange}\r\n label={getString(\"newsTitle\")}\r\n />\r\n \r\n { !news.newsId && (\r\n \r\n {if(e.target.files !== null ) editNews(\"fileName1\",e.target!.files[0]!)}} />\r\n \r\n )}\r\n \r\n\r\n \r\n \r\n \r\n property=\"titleEn\"\r\n item={news}\r\n validationState={validationState}\r\n onChange={handleChange}\r\n label={getString(\"newsTitleen\")}\r\n />\r\n \r\n { !news.newsId && ( \r\n \r\n {if(e.target.files !== null) editNews(\"fileName2\",e.target!.files[0]!)}}/>\r\n \r\n )}\r\n \r\n\r\n \r\n \r\n \r\n property=\"status\"\r\n item={news}\r\n onChange={handleChange}\r\n falsyValue={Status.Inactive}\r\n thrutyValue={Status.Active}\r\n label={getString(\"stockFeeStatus\")}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\n","import { PushNotification } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { webApi } from \"../../../../core/http/httpThunks\";\r\n\r\nconst getPushNotificationsList = (user: User) => {\r\n return webApi({\r\n method: \"GET\",\r\n url: \"common/getpushnotificationslist\",\r\n params: {\r\n userid: user.userId,\r\n },\r\n });\r\n};\r\n\r\nexport default getPushNotificationsList;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadReport } from \"../thunks/loadReportData\";\r\nimport { PushNotification } from \"../types\";\r\n\r\nexport const usePushNotificationsListData = () => {\r\n const data = useSelector(\r\n (s) => s.data.reports.pushnotifications.data\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadData = React.useCallback(() => dispatch(loadReport()), [\r\n dispatch,\r\n ]);\r\n\r\n return [data, dispatchLoadData] as [typeof data, typeof dispatchLoadData];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { setData } from \"../notificationDataSlice\";\r\nimport getPushNotificationsListApi from \"../api/getPushnotificationsList\";\r\n\r\nexport const loadReport = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const user = store.data.auth.current.user;\r\n\r\n const pagedNotifications = await dispatch(getPushNotificationsListApi(user));\r\n\r\n dispatch(setData(pagedNotifications || []));\r\n};\r\n","import React from \"react\";\r\nimport { usePushNotificationsColumns } from \"./usePushNotificationsReportColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\nimport { PushNotification } from \"../../../data/reports/notifications/types\";\r\nimport { ControledTable } from \"../../components/common/ControledTable\";\r\nimport { usePushNotificationsListData } from \"../../../data/reports/notifications/hooks/usePushnotificationsListData\";\r\nimport { usePushnotificationListIndex } from \"../../../data/reports/notifications/hooks/usePushnotificationsListIndex\";\r\n\r\nexport interface PushNotificationsTableProps {\r\n userAccessRights: AccessRights;\r\n}\r\n\r\ntype PushNotificationsTablePropsType = PushNotificationsTableProps\r\n\r\nconst PushNotificationsReportTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n ...tableProps\r\n}) => {\r\n const columns = usePushNotificationsColumns();\r\n const [data, load] = usePushNotificationsListData();\r\n const [index, setIndex] = usePushnotificationListIndex()\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={load}\r\n pageIndex={index}\r\n onPageIndexChange={setIndex}\r\n immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default PushNotificationsReportTable;\r\n","import { PushNotification } from \"../../../data/reports/notifications/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\r\nimport { useTheme } from '@material-ui/core/styles';\r\n\r\nexport const usePushNotificationsColumns = () => {\r\n const { getString, getDateString, getDateTimeString, getFormatedNumberString } = React.useContext(\r\n LocalizationContext\r\n );\r\n\r\n \r\n const theme = useTheme();\r\n const screenExtraSmall = useMediaQuery(theme.breakpoints.only('xs'));\r\n\r\n return React.useMemo(\r\n () => [\r\n {\r\n title: getString(\"contractDate\"),\r\n\t\t\t\trender: (notification) => getDateTimeString(notification.pnTime),\r\n sorting: false,\r\n width: screenExtraSmall ? \"50px\" : \"90px\",\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\tmaxWidth: screenExtraSmall ? \"50px\" : \"90px\",\r\n\t\t\t\t\tminWidth: screenExtraSmall ? \"50px\" : \"90px\",\r\n\t\t\t\t\twidth: screenExtraSmall ? \"50px\" : \"90px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\tmaxWidth: screenExtraSmall ? \"50px\" : \"90px\",\r\n\t\t\t\t\tminWidth: screenExtraSmall ? \"50px\" : \"90px\",\r\n\t\t\t\t\twidth: screenExtraSmall ? \"50px\" : \"90px\",\r\n\t\t\t\t},\r\n },\r\n {\r\n title: getString(\"orderOrdType\") ,\r\n field: \"pnTitle\",\r\n sorting: false,\r\n width: screenExtraSmall ? \"60px\" : \"80px\",\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\tmaxWidth: screenExtraSmall ? \"60px\" : \"80px\",\r\n\t\t\t\t\tminWidth: screenExtraSmall ? \"60px\" : \"80px\",\r\n\t\t\t\t\twidth: screenExtraSmall ? \"60px\" : \"80px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\tmaxWidth: screenExtraSmall ? \"60px\" : \"80px\",\r\n\t\t\t\t\tminWidth: screenExtraSmall ? \"60px\" : \"80px\",\r\n\t\t\t\t\twidth: screenExtraSmall ? \"60px\" : \"80px\",\r\n\t\t\t\t},\r\n },\r\n\r\n {\r\n title: getString(\"pushNotification\"),\r\n field: \"pnText\",\r\n sorting: false,\r\n width: screenExtraSmall ? \"500px\" : \"350px\",\r\n\t\t\t\tcellStyle: {\r\n\t\t\t\t\tmaxWidth: screenExtraSmall ? \"500px\" : \"350px\",\r\n\t\t\t\t\tminWidth: screenExtraSmall ? \"500px\" : \"350px\",\r\n\t\t\t\t\twidth: screenExtraSmall ? \"500px\" : \"350px\",\r\n\t\t\t\t},\r\n\t\t\t\theaderStyle: {\r\n\t\t\t\t\tmaxWidth: screenExtraSmall ? \"500px\" : \"350px\",\r\n\t\t\t\t\tminWidth: screenExtraSmall ? \"500px\" : \"350px\",\r\n\t\t\t\t\twidth: screenExtraSmall ? \"500px\" : \"350px\",\r\n\t\t\t\t},\r\n },\r\n ],\r\n [getString, getFormatedNumberString]\r\n ) as Column[];\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { setIndex } from \"../notificationUXSlice\";\r\nimport { PageIndex } from \"../../../models\";\r\n\r\nexport const usePushnotificationListIndex = () => {\r\n\tconst pageIndex = useSelector(s => s.ux.reports.pushnotifications.index);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchSetIndex = React.useCallback((index: PageIndex) => dispatch(setIndex(index)), [dispatch]);\r\n\r\n\treturn [pageIndex, dispatchSetIndex] as [typeof pageIndex, typeof dispatchSetIndex];\r\n};\r\n","import PushNotificationsReport from \"./PushNotificationsReport\";\r\nimport { NavigationItem } from \"../../../core/navigation/types\";\r\nimport { pushNotificationsReportLocation } from \"./Locations\";\r\n\r\nexport const pushNotificationsComponents: NavigationItem[] = [\r\n {\r\n Component: PushNotificationsReport,\r\n isMenuItem: true,\r\n path: pushNotificationsReportLocation,\r\n },\r\n];\r\n","import React from \"react\";\r\nimport {\r\n Grid,\r\n CardContent,\r\n CardHeader,\r\n Card,\r\n Divider,\r\n} from \"@material-ui/core\";\r\nimport PushNotificationsReportTable from \"./PushNotificationsReportTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { PageComponent } from \"../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { usePushNotificationsListData } from \"../../../data/reports/notifications/hooks/usePushnotificationsListData\";\r\n\r\nconst PushNotificationsReport: PageComponent = ({ userAccessRights }) => {\r\n const pageStyles = usePageStyles();\r\n\r\n const [data, load] = usePushNotificationsListData();\r\n\r\n React.useEffect(()=>{\r\n load();\r\n },[load])\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 PushNotificationsReport;\r\n","export const pushNotificationsReportLocation = \"/reports/notifications\";\r\n","import { ordersReportComponents } from \"./ordersReport/navigationComponents\";\r\nimport { tradesReportComponents } from \"./tradesReport/navigationComponents\";\r\nimport { tradesReportAllComponents } from \"./tradesReportClientAll/navigationComponents\";\r\nimport { dailyTradesReportComponents } from \"./dailyTrades/navigationComponents\";\r\nimport { weeklyTradesReportComponents } from \"./weeklyTrades/navigationComponents\";\r\nimport { monthlyTradesReportComponents } from \"./monthlyTrades/navigationComponents\";\r\nimport { annualTradesReportComponents } from \"./annualTrades/navigationComponents\";\r\nimport { securityCommissionComponents } from \"./securityCommission/securityCommissionComponents\";\r\nimport { antiMnyLndCommReportComponents } from \"./amlaundering/navigationComponents\";\r\nimport { exchBusinessComponents } from \"./exchbusiness/exchBusinessComponents\";\r\nimport { exchangeMembersReportComponents } from \"./exmember/navigationComponents\";\r\nimport { deliveryClientComponents } from \"../clearing/deliveryClient/navigationComponents\";\r\nimport { paymentClientComponents } from \"../clearing/paymentsClient/navigationComponents\";\r\nimport { newsComponents } from \"../reports/news/navigationComponents\";\r\nimport { pushNotificationsComponents } from \"../reports/pushNotifications/navigationComponents\";\r\n\r\nexport const reportsComponents = [\r\n\t...ordersReportComponents,\r\n\t...tradesReportComponents,\r\n\t...tradesReportAllComponents,\r\n\t...dailyTradesReportComponents,\r\n\t...weeklyTradesReportComponents,\r\n\t...monthlyTradesReportComponents,\r\n\t...annualTradesReportComponents,\r\n\t...securityCommissionComponents,\r\n\t...antiMnyLndCommReportComponents,\r\n\t...exchBusinessComponents,\r\n\t...exchangeMembersReportComponents,\r\n\t...deliveryClientComponents,\r\n\t...paymentClientComponents,\r\n\t...newsComponents,\r\n\t...pushNotificationsComponents,\r\n];\r\n","import { CreateInvoicesTranData, CreateInvoicesTranFilter } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nconst getCreateInvoicesData = (\r\n user: User,\r\n filter: CreateInvoicesTranFilter\r\n) => {\r\n return webApi({\r\n method: \"GET\",\r\n url: \"trade/gettranlist\",\r\n params: {\r\n userid: user.userId,\r\n datefrom: getParamsDateString(filter.datefrom),\r\n dateto: getParamsDateString(filter.dateto),\r\n status: 1,\r\n },\r\n });\r\n};\r\n\r\nexport default getCreateInvoicesData;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadReport } from \"../thunks/loadCreateInvoicesData\";\r\nimport { CreateInvoicesTranData } from \"../types\";\r\n\r\nexport const useCreateInvoicesData = () => {\r\n const data = useSelector(\r\n (s) => s.data.accounting.createInvoices.data\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadData = React.useCallback(() => dispatch(loadReport()), [\r\n dispatch,\r\n ]);\r\n\r\n return [data, dispatchLoadData] as [typeof data, typeof dispatchLoadData];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { setData } from \"../createInvoicesDataSlice\";\r\nimport getCreateInvoicesDataApi from \"../api/getCreateInvoicesData\";\r\n\r\nexport const loadReport = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const user = store.data.auth.current.user;\r\n const { filter } = store.ux.accounting.createInvoices;\r\n\r\n const pagedTrades = await dispatch(getCreateInvoicesDataApi(user, filter));\r\n\r\n dispatch(setData(pagedTrades || []));\r\n};\r\n","import React from \"react\";\r\nimport { useCreateInvoicesColumns } from \"./useCreateInvoicesColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\nimport { CreateInvoicesTranData } from \"../../../data/accounting/createInvoices/types\";\r\nimport { ControledTable } from \"../../components/common/ControledTable\";\r\nimport { useCreateInvoicesData } from \"../../../data/accounting/createInvoices/hooks/useCreateInvoicesData\";\r\nimport { useCreateInvoicesIndex } from \"../../../data/accounting/createInvoices/hooks/useCreateInvoicesIndex\";\r\n\r\nexport interface CreateInvoicesTableProps {\r\n userAccessRights: AccessRights;\r\n}\r\n\r\ntype CreateInvoicesTablePropsType = CreateInvoicesTableProps;\r\n\r\nexport const CreateInvoicesTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n ...tableProps\r\n}) => {\r\n const columns = useCreateInvoicesColumns();\r\n const [data, load] = useCreateInvoicesData();\r\n const [index, setIndex] = useCreateInvoicesIndex();\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={load}\r\n onPageIndexChange={setIndex}\r\n pageIndex={index}\r\n immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default CreateInvoicesTable;\r\n","import { CreateInvoicesTranData } from \"../../../data/accounting/createInvoices/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\n\r\nexport const useCreateInvoicesColumns = () => {\r\n const {\r\n getString,\r\n getDateString,\r\n getFormatedNumberString,\r\n } = React.useContext(LocalizationContext);\r\n\r\n return React.useMemo(\r\n () => [\r\n {\r\n title: getString(\"invoiceTranDate\"),\r\n render: (invoices) => getDateString(invoices.tradeTime, \"DD.MM.YYYY\"),\r\n sorting: false,\r\n },\r\n\r\n {\r\n title: getString(\"invoiceTranNo\"),\r\n field: \"tranNo\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"invoiceOrderNo\"),\r\n field: \"orderNo\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"invoiceClientName\"),\r\n field: \"clientName\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"invoiceProductName\"),\r\n field: \"productName\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"invoiceQuantity\"),\r\n render: (row) => `${getFormatedNumberString(row.qty)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"invoiceTradeAmt\"),\r\n render: (row) => `${getFormatedNumberString(row.amt, true)}`,\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n ],\r\n [getString, getFormatedNumberString]\r\n ) as Column[];\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { setIndex } from \"../createInvoicesUXSlice\";\r\nimport { PageIndex } from \"../../../models\";\r\n\r\nexport const useCreateInvoicesIndex = () => {\r\n const pageIndex = useSelector(\r\n (s) => s.ux.accounting.createInvoices.index\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetIndex = React.useCallback(\r\n (index: PageIndex) => dispatch(setIndex(index)),\r\n [dispatch]\r\n );\r\n\r\n return [pageIndex, dispatchSetIndex] as [\r\n typeof pageIndex,\r\n typeof dispatchSetIndex\r\n ];\r\n};\r\n","import React from \"react\";\r\nimport { Grid, Paper, Button } from \"@material-ui/core\";\r\nimport { DateInput } from \"../../components/common/DateInput\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { CreateInvoicesTranFilter } from \"../../../data/accounting/createInvoices/types\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { isValidDate } from \"../../../core/util/functions\";\r\n\r\ninterface CreateInvoicesFilterEditorProps {\r\n filter?: CreateInvoicesTranFilter;\r\n editFilter: (prop: keyof CreateInvoicesTranFilter, value: any) => void;\r\n save: () => void;\r\n}\r\n\r\nexport const CreateInvoicesFilterEditor: React.FunctionComponent = ({\r\n filter,\r\n editFilter,\r\n save,\r\n}) => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const { getString } = React.useContext(LocalizationContext);\r\n\r\n const handleChange = React.useCallback(\r\n (event: React.ChangeEvent) => {\r\n editFilter(event.target.name as any, event.target.value);\r\n },\r\n [editFilter]\r\n );\r\n\r\n if (!filter) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n editFilter(\"datefrom\", isValidDate(date) ? date.toISOString() : undefined)}\r\n />\r\n \r\n \r\n editFilter(\"dateto\", isValidDate(date) ? date.toISOString() : undefined)}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n {\r\n save();\r\n showWithDrawer(undefined);\r\n }}\r\n >\r\n {getString(\"orderFilterConfirm\")}\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport { Chip, Grid } from \"@material-ui/core\";\r\nimport { CreateInvoicesTranFilter } from \"../../../data/accounting/createInvoices/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\n\r\nexport const CreateInvoiceFilterChips: React.FunctionComponent = ({\r\n filter,\r\n removefilter,\r\n}) => {\r\n const { getDateString, getString } = React.useContext(LocalizationContext);\r\n\r\n return (\r\n \r\n {filter.datefrom && (\r\n \r\n removefilter(\"datefrom\")}\r\n />\r\n \r\n )}\r\n {filter.dateto && (\r\n \r\n removefilter(\"dateto\")}\r\n />\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\ninterface CreateInvoicesFilterChipsProps {\r\n filter: CreateInvoicesTranFilter;\r\n removefilter: (type: keyof CreateInvoicesTranFilter) => void;\r\n}\r\n","import React from \"react\";\r\nimport { IconButton, Grid } from \"@material-ui/core\";\r\nimport FilterIcon from \"@material-ui/icons/FilterListOutlined\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport {\r\n useCreateInvoicesFilter,\r\n useCurrentCreateInvoicesFilter,\r\n} from \"../../../data/accounting/createInvoices/hooks/useCreateInvoicesFilter\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport { CreateInvoicesFilterEditor } from \"./CreateInvoicesEditor\";\r\nimport { CreateInvoiceFilterChips } from \"./CreateInvoiceFilterChips\";\r\n\r\nexport const CreateInvoicesFilter: React.FunctionComponent = () => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const showFilter = React.useCallback(\r\n () => showWithDrawer(),\r\n [showWithDrawer]\r\n );\r\n\r\n // const [filter, editfilter, save] = useCreateInvoicesFilter();\r\n const [filter, removefilter] = useCurrentCreateInvoicesFilter();\r\n const { getString } = React.useContext(LocalizationContext);\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\nconst CreateInvoicesFiltersEditor: React.FunctionComponent = () => {\r\n const [filter, editFilter, save] = useCreateInvoicesFilter();\r\n return (\r\n \r\n );\r\n};\r\n","import { setFilter, removeFilter } from \"../createInvoicesUXSlice\";\r\nimport { setData } from \"../createInvoicesDataSlice\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport React from \"react\";\r\nimport { CreateInvoicesTranFilter } from \"../types\";\r\nimport { useCopiedState } from \"../../../../core/util/hooks\";\r\nimport { invalidateCreateInvoice } from \"../createInvoicesDataSlice\";\r\n\r\nexport const useCreateInvoicesFilter = () => {\r\n const storeFilter = useSelector(\r\n (store) => store.ux.accounting.createInvoices.filter\r\n );\r\n const [filter, editFilter] = useCopiedState(\r\n storeFilter\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetFilter = React.useCallback(() => {\r\n dispatch(setFilter(filter!));\r\n dispatch(setData());\r\n }, [dispatch, filter]);\r\n\r\n return [filter, editFilter, dispatchSetFilter] as [\r\n typeof filter,\r\n typeof editFilter,\r\n typeof dispatchSetFilter\r\n ];\r\n};\r\n\r\nexport const useCurrentCreateInvoicesFilter = () => {\r\n const filter = useSelector(\r\n (store) => store.ux.accounting.createInvoices.filter\r\n );\r\n const dispatch = useDispatch();\r\n const dispatchRemoveFilter = React.useCallback(\r\n (type: keyof CreateInvoicesTranFilter) => {\r\n dispatch(removeFilter(type));\r\n dispatch(invalidateCreateInvoice());\r\n },\r\n [dispatch]\r\n );\r\n\r\n return [filter, dispatchRemoveFilter] as [\r\n typeof filter,\r\n typeof dispatchRemoveFilter\r\n ];\r\n};\r\n","import { CreateInvoicesTranData, CreateInvoicesTranFilter } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nconst getCICreateButton = (user: User, filter: CreateInvoicesTranFilter) => {\r\n return webApi({\r\n method: \"PUT\",\r\n url: \"accounting/createinvoices\",\r\n params: {\r\n userid: user.userId,\r\n datefrom: getParamsDateString(filter.datefrom),\r\n dateto: getParamsDateString(filter.dateto),\r\n status: 1,\r\n },\r\n });\r\n};\r\nexport default getCICreateButton;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadCreateInvoicesCreateButton } from \"../thunks/loadCIDataCreateButton\";\r\nimport { resteData } from \"../createInvoicesDataSlice\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { CreateInvoicesTranData } from \"../types\";\r\n\r\nexport const useCICreateButton = () => {\r\n\tconst fetchState = useSelector(\r\n\t\ts => s.data.accounting.createInvoices.downloadReportFetchState\r\n\t);\r\n\r\n\tconst data = useSelector(\r\n\t\ts => s.data.accounting.createInvoices.data\r\n\t);\r\n\r\n\tconst hasData = data !== undefined && data.length > 0;\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst download = React.useCallback(() => dispatch(downloadCreateInvoicesCreateButton()), [dispatch]);\r\n\r\n\tconst dispatchResetData = React.useCallback(() => {\r\n\t\tdispatch(resteData());\r\n\t}, [dispatch]);\r\n\r\n\treturn [download, fetchState, dispatchResetData, hasData] as [\r\n\t\ttypeof download,\r\n\t\ttypeof fetchState,\r\n\t\ttypeof dispatchResetData,\r\n\t\ttypeof hasData\r\n\t];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getCICreateButton from \"../api/getCIDataCreateButton\";\r\nimport { setFetchState } from \"../createInvoicesDataSlice\";\r\n\r\nexport const downloadCreateInvoicesCreateButton = (): ThunkType => async (dispatch, getStore) => {\r\n\tconst store = getStore();\r\n\r\n\tif (store.data.auth.current.status !== \"successful\") {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\tconst { filter } = store.ux.accounting.createInvoices;\r\n\tconst user = store.data.auth.current.user;\r\n\tdispatch(setFetchState({ type: \"started\" }));\r\n\tconst ordersReport = await dispatch(getCICreateButton(user, filter));\r\n\tdispatch(setFetchState({ type: \"successful\" }));\r\n};\r\n","import React from \"react\";\r\nimport { useCICreateButton } from \"../../../data/accounting/createInvoices/hooks/useCICreateButton\";\r\nimport DownloadIcon from \"@material-ui/icons/DoubleArrowOutlined\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { CustomDialog } from \"../../components/common/CustomDialog\";\r\n\r\nexport const CreateButton: React.FunctionComponent = () => {\r\n\tconst [downloader, fetchState, resetData, hasData] = useCICreateButton();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\treturn (\r\n\t\t<>\r\n\t\t\t\r\n\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\t\r\n\t\t\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport {\r\n Button,\r\n Grid,\r\n CardContent,\r\n CardHeader,\r\n Card,\r\n Divider,\r\n} from \"@material-ui/core\";\r\nimport { CreateInvoicesTable } from \"./CreateInvoicesTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { PageComponent } from \"../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { CreateInvoicesFilter } from \"./CreateInvoicesFilter\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { CreateButton } from \"./CreateButton\";\r\n\r\nconst CreateInvoicesPage: PageComponent = ({ userAccessRights }) => {\r\n const pageStyles = usePageStyles();\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n }\r\n action={}\r\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 CreateInvoicesActions: React.FunctionComponent = () => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default CreateInvoicesPage;\r\n","import CreateInvoicesPage from \"./CreateInvoicesPage\";\r\nimport { NavigationItem } from \"../../../core/navigation/types\";\r\nimport { createInvoicesLocation } from \"./Locations\";\r\n\r\nexport const createInvoicesComponents: NavigationItem[] = [\r\n {\r\n Component: CreateInvoicesPage,\r\n isMenuItem: true,\r\n path: createInvoicesLocation,\r\n },\r\n];\r\n","export const createInvoicesLocation = \"/accounting/createinvoices\";\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { InvoiceData } from \"../types\";\r\n\r\nexport const getInvoiceApi = (userId: string, invid: string) =>\r\n webApi({\r\n method: \"GET\",\r\n url: \"accounting/getinvoice\",\r\n params: {\r\n userId,\r\n invid,\r\n },\r\n });\r\n\r\nexport default getInvoiceApi;\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getInvoiceApi from \"../api/getInvoice\";\r\nimport { setDisplayed } from \"../invoicesDataSlice\";\r\nimport { InvoiceData } from \"../types\";\r\n\r\nexport const loadInvoice = (invId: string): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n dispatch(setDisplayed());\r\n\r\n const invoice = await dispatch(getInvoice(invId));\r\n\r\n dispatch(setDisplayed(invoice));\r\n};\r\n\r\nexport const getInvoice = (\r\n invId: string\r\n): ThunkType> => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { userId } = store.data.auth.current.user;\r\n return await dispatch(getInvoiceApi(userId, invId));\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { InvoiceData } from \"../types\";\r\nimport { loadInvoice } from \"../thunks/loadInvoice\";\r\n\r\nexport const useDisplayInvoice = (invId?: string) => {\r\n const storeInvoice = useSelector(\r\n (store) => store.data.accounting.invoices.displayedInvoice\r\n );\r\n\r\n const displayedInvoice =\r\n storeInvoice && storeInvoice.invId === invId ? storeInvoice : undefined;\r\n\r\n const displatch = useDispatch();\r\n\r\n React.useEffect(() => {\r\n if (invId) {\r\n displatch(loadInvoice(invId));\r\n }\r\n }, [displatch, invId]);\r\n\r\n return displayedInvoice;\r\n};\r\n","import React from \"react\";\r\nimport { InvoiceData } from \"../../../data/accounting/invoices/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { useDisplaySingleEmementStyles } from \"../../useDisplaySingleEmementStyles\";\r\nimport { DisplayBoolNumber } from \"../../components/common/DisplayBoolNumber\";\r\nimport { Status } from \"../../../data/models\";\r\n\r\nexport interface DisplayInvoiceMainAttributesProps {\r\n invoice: InvoiceData;\r\n}\r\n\r\nexport const DisplayInvoiceMainAttributes: React.FunctionComponent = ({\r\n invoice,\r\n}) => {\r\n const style = useDisplaySingleEmementStyles();\r\n const {\r\n getString,\r\n getDateString,\r\n getFormatedNumberString,\r\n } = React.useContext(LocalizationContext);\r\n\r\n return (\r\n
\r\n
\r\n {getString(\"invoiceInvNo\")}\r\n {invoice.invNo}\r\n
\r\n
\r\n {getString(\"invoiceInvDate\")}\r\n {getDateString(invoice.invDate)}\r\n
\r\n
\r\n {getString(\"invoiceInvTypeDescr\")}\r\n {invoice.invTypeDescr}\r\n
\r\n
\r\n {getString(\"invoiceTranDate\")}\r\n {getDateString(invoice.tranDate)}\r\n
\r\n
\r\n {getString(\"invoiceDueDate\")}\r\n {getDateString(invoice.dueDate)}\r\n
\r\n
\r\n {getString(\"invoiceDescr\")}\r\n {invoice.descr}\r\n
\r\n
\r\n {getString(\"invoiceTranNo\")}\r\n {invoice.tranNo}\r\n
\r\n
\r\n {getString(\"invoiceClientIdNo\")}\r\n {invoice.clientIdNo}\r\n
\r\n
\r\n {getString(\"invoiceClientName\")}\r\n {invoice.clientName}\r\n
\r\n{/*
\r\n {getString(\"invoiceTradeAmt\")}\r\n \r\n {getFormatedNumberString(invoice.tradeAmt, true)}\r\n \r\n
*/}\r\n
\r\n {getString(\"invoiceTradeAmtWithVat\")}\r\n \r\n {getFormatedNumberString(invoice.tradeAmtWithVat, true)}\r\n \r\n
\r\n
\r\n {getString(\"invoiceCommPerc\")}\r\n \r\n {getFormatedNumberString(invoice.commPerc, true)}\r\n \r\n
\r\n
\r\n {getString(\"invoiceAmt\")}\r\n \r\n {getFormatedNumberString(invoice.amt, true)}\r\n \r\n
\r\n
\r\n {getString(\"invoiceVatPerc\")}\r\n \r\n {getFormatedNumberString(invoice.vatPerc, true)}\r\n \r\n
\r\n
\r\n {getString(\"invoiceVatAmt\")}\r\n \r\n {getFormatedNumberString(invoice.vatAmt, true)}\r\n \r\n
\r\n
\r\n {getString(\"invoiceInvAmt\")}\r\n \r\n {getFormatedNumberString(invoice.invAmt, true)}\r\n \r\n
\r\n
\r\n {getString(\"invoiceCurrCode\")}\r\n {invoice.currCode}\r\n
\r\n
\r\n {getString(\"invoiceBookDate\")}\r\n {getDateString(invoice.bookDate)}\r\n
\r\n
\r\n {getString(\"invoiceCmpAccount\")}\r\n {invoice.cmpAccount}\r\n
\r\n
\r\n {getString(\"invoiceModel\")}\r\n {invoice.model}\r\n
\r\n
\r\n {getString(\"invoiceReffNo\")}\r\n {invoice.reffNo}\r\n
\r\n
\r\n {getString(\"invoiceStatus\")}\r\n \r\n \r\n \r\n
\r\n
\r\n );\r\n};\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const printInvoice = (user: User, invid: string) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"accounting/getinvoicereport\",\r\n params: {\r\n userid: user.userId,\r\n invid,\r\n },\r\n });\r\n};\r\n\r\nexport default printInvoice;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { printInvoiceThunk } from \"../thunks/printInvoiceThunk\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { InvoiceData } from \"../types\";\r\n\r\nexport const useInvoicePrinter = (invoice?: InvoiceData) => {\r\n const fetchState = useSelector(\r\n (s) => s.data.accounting.invoices.printInvoiceFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(() => {\r\n dispatch(printInvoiceThunk(invoice));\r\n }, [dispatch, invoice]);\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { printInvoice } from \"../api/printInvoice\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setPrintInvoiceFetchState } from \"../invoicesDataSlice\";\r\nimport { InvoiceData } from \"../types\";\r\n\r\nexport const printInvoiceThunk = (invoice?: InvoiceData): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (\r\n store.data.auth.current.status !== \"successful\" ||\r\n !invoice ||\r\n !invoice.invId\r\n ) {\r\n return undefined;\r\n }\r\n\r\n //\tconst filename = `TradingOrder${order.side.trim().toUpperCase()}_${lan.trim().toUpperCase()}_${order.ordNo}.pdf`\r\n\r\n const lan = store.ux.localization.language;\r\n const filename = `CommInvoice_${lan.trim().toUpperCase()}_${\r\n invoice.invNo\r\n }.pdf`;\r\n const user = store.data.auth.current.user;\r\n dispatch(setPrintInvoiceFetchState({ type: \"started\" }));\r\n const invoicesReport = await dispatch(printInvoice(user, invoice.invId));\r\n if (invoicesReport) {\r\n fileDownload(\r\n new Blob([invoicesReport as any], { type: \"application/pdf\" }),\r\n filename\r\n );\r\n }\r\n dispatch(setPrintInvoiceFetchState({ type: \"not-started\" }));\r\n};\r\n","import { User } from \"../../../auth/types\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const getInvoiceXml = ( user: User, invid: string) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"accounting/generateinvoicexml\",\r\n params: {\r\n userid: user.userId,\r\n invid,\r\n },\r\n });\r\n};\r\n\r\nexport default getInvoiceXml;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { xmlInvoiceThunk } from \"../thunks/xmlInvoiceThunk\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { InvoiceData } from \"../types\";\r\n\r\nexport const useInvoiceXml = (invoice?: InvoiceData) => {\r\n const fetchState = useSelector(\r\n (s) => s.data.accounting.invoices.xmlInvoiceFetchState\r\n );\r\n const dispatch = useDispatch();\r\n const download = React.useCallback(() => {\r\n dispatch(xmlInvoiceThunk(invoice));\r\n }, [dispatch, invoice]);\r\n\r\n return [download, fetchState] as [typeof download, typeof fetchState];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getInvoiceXml } from \"../api/getInvoiceXml\";\r\nimport fileDownload from \"js-file-download\";\r\nimport { setXmlInvoiceFetchState } from \"../invoicesDataSlice\";\r\nimport { InvoiceData } from \"../types\";\r\n\r\nexport const xmlInvoiceThunk = (invoice?: InvoiceData): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (\r\n store.data.auth.current.status !== \"successful\" ||\r\n !invoice ||\r\n !invoice.invId\r\n ) {\r\n return undefined;\r\n }\r\n\r\n //\tconst filename = `TradingOrder${order.side.trim().toUpperCase()}_${lan.trim().toUpperCase()}_${order.ordNo}.pdf`\r\n\r\n const lan = store.ux.localization.language;\r\n const filename = `XmlInvoice_${lan.trim().toUpperCase()}_${\r\n invoice.invNo\r\n }.xml`;\r\n const user = store.data.auth.current.user;\r\n dispatch(setXmlInvoiceFetchState({ type: \"started\" }));\r\n const invoicesXml = await dispatch(getInvoiceXml(user, invoice.invId));\r\n if (invoicesXml) {\r\n fileDownload(\r\n new Blob([invoicesXml as any], { type: \"application/pdf\" }),\r\n filename\r\n );\r\n }\r\n dispatch(setXmlInvoiceFetchState({ type: \"not-started\" }));\r\n};\r\n","import React from \"react\";\r\nimport { useDisplayInvoice } from \"../../../data/accounting/invoices/hooks/useDisplayInvoice\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport {\r\n InvoiceData,\r\n InvoiceListData,\r\n} from \"../../../data/accounting/invoices/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { DisplayInvoiceMainAttributes } from \"./DisplayInvoiceMainAttributes\";\r\nimport {\r\n ExpansionPanel,\r\n ExpansionPanelSummary,\r\n Typography,\r\n Grid,\r\n IconButton,\r\n} from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport PrintIcon from \"@material-ui/icons/PrintOutlined\";\r\nimport DownloadIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\nimport { useInvoicePrinter } from \"../../../data/accounting/invoices/hooks/useInvoicePrinter\";\r\nimport { useInvoiceXml } from \"../../../data/accounting/invoices/hooks/useInvoiceXml\";\r\n\r\nexport interface DisplayInvoiceProps {\r\n id?: string;\r\n enablePrint?: boolean;\r\n}\r\n\r\nexport const DisplayInvoice: React.FunctionComponent = ({\r\n id,\r\n enablePrint,\r\n}) => {\r\n const invoice = useDisplayInvoice(id);\r\n const { getString } = React.useContext(LocalizationContext);\r\n const [print, fetchState] = useInvoicePrinter(invoice);\r\n const [xml, xmlfetchState] = useInvoiceXml(invoice);\r\n\r\n return !invoice ? (\r\n <>{\"loading placeholder\"}\r\n ) : (\r\n \r\n \r\n \r\n \r\n \r\n {getString(\"tableBasciInfo\")}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\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 useViewInvoice = (enablePrint?: boolean) => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n return React.useCallback(\r\n (invoice: InvoiceListData) =>\r\n showWithDrawer(\r\n \r\n ),\r\n [showWithDrawer]\r\n );\r\n};\r\n","import { getEditLocation } from \"../../../core/util/functions\";\r\nexport const invoicesLocation = \"/accounting/invoices\";\r\nexport const getInvoicesEditLocation = (id?: string) =>\r\n getEditLocation(invoicesLocation, undefined, id);\r\n\r\nexport const editRouter = getInvoicesEditLocation(\":invId?\");\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const deleteInvoiceApi = (userId: string, invid: string) =>\r\n webApi({\r\n method: \"DELETE\",\r\n url: \"accounting/delinvoice\",\r\n params: {\r\n userId,\r\n invid,\r\n },\r\n });\r\n\r\nexport default deleteInvoiceApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { deleteInvoice } from \"../thunks/deleteInvoice\";\r\nimport { setFetchState } from \"../invoicesDataSlice\";\r\n\r\nexport const useInvoiceDelete = () => {\r\n const fetchState = useSelector(\r\n (store) => store.data.accounting.invoices.cancelFetchState\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchDeleteInvoice = React.useCallback(\r\n (id: string) => dispatch(deleteInvoice(id)),\r\n [dispatch]\r\n );\r\n\r\n React.useEffect(() => {\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n }, [dispatch]);\r\n\r\n return [fetchState, dispatchDeleteInvoice] as [\r\n typeof fetchState,\r\n typeof dispatchDeleteInvoice\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { deleteInvoiceApi } from \"../api/deleteInvoice\";\r\nimport { setFetchState, invalidateInvoices } from \"../invoicesDataSlice\";\r\n\r\nexport const deleteInvoice = (invId: string): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n dispatch(setFetchState({ type: \"started\" }));\r\n\r\n const { userId } = store.data.auth.current.user;\r\n const result = await dispatch(deleteInvoiceApi(userId, invId));\r\n\r\n dispatch(\r\n setFetchState(\r\n result !== undefined ? { type: \"successful\" } : { type: \"error\" }\r\n )\r\n );\r\n dispatch(invalidateInvoices());\r\n};\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport ViewIcon from \"@material-ui/icons/InputOutlined\";\r\nimport EditIcon from \"@material-ui/icons/EditOutlined\";\r\nimport { InvoiceListData } from \"../../../data/accounting/invoices/types\";\r\nimport { InvoiceData } from \"../../../data/accounting/invoices/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { MaterialTableProps } from \"material-table\";\r\nimport { useViewInvoice } from \"./DisplayInvoice\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { getInvoicesEditLocation } from \"./Locations\";\r\nimport { DisplayInvoiceMainAttributes } from \"./DisplayInvoiceMainAttributes\";\r\nimport { useInvoiceDelete } from \"../../../data/accounting/invoices/hooks/useInvoiceDelete\";\r\nimport { useNewsDownload } from \"../../../data/reports/news/hooks/useNewsDownload\"\r\n\r\nexport function useInvoiceActions() {\r\n const { getString } = useContext(LocalizationContext);\r\n const onShowInvoice = useViewInvoice();\r\n// const onShowInvoice = useNewsDownload();\r\n const onEditInvoice = useEditInvoiceAction();\r\n\r\n return useMemo(() => {\r\n const result: MaterialTableProps[\"actions\"] = [\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"orderActView\"),\r\n onClick: (event, rowData) => onShowInvoice(rowData as InvoiceListData),\r\n },\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"tableEdit\"),\r\n onClick: (event, rowData) => onEditInvoice(rowData as InvoiceListData),\r\n },\r\n ];\r\n return result;\r\n }, [onShowInvoice, onEditInvoice, getString]);\r\n}\r\n\r\nexport const useDeleteInvoiceAction = () => {\r\n const [, deleteInvoice] = useInvoiceDelete();\r\n return React.useCallback(\r\n async (invoice: InvoiceListData) => {\r\n if (invoice.invId) {\r\n await deleteInvoice(invoice.invId);\r\n }\r\n },\r\n [deleteInvoice]\r\n );\r\n};\r\n\r\nexport const useEditInvoiceAction = () => {\r\n const history = useHistory();\r\n return React.useCallback(\r\n (invoices: InvoiceListData) =>\r\n history.push(getInvoicesEditLocation(invoices.invId)),\r\n [history]\r\n );\r\n};\r\n\r\n\r\n","import React from \"react\";\r\nimport { Grid, Paper, Button } from \"@material-ui/core\";\r\nimport { DateInput } from \"../../components/common/DateInput\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { InvoiceFilter } from \"../../../data/accounting/invoices/types\";\r\nimport { ClientSelect } from \"../../components/listing/ClientSelect\";\r\nimport { useAuth } from \"../../../data/auth/hooks\";\r\nimport { InvoiceFilterChipsComponent } from \"./InvoiceFilterChips\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { isValidDate } from \"../../../core/util/functions\";\r\n\r\nexport enum InvoiceFilterEditorType {\r\n Basic,\r\n Extended,\r\n}\r\n\r\ninterface InvoiceFilterEditorProps {\r\n filter?: InvoiceFilter;\r\n editFilter: (prop: keyof InvoiceFilter, value: any) => void;\r\n save: () => void;\r\n type: InvoiceFilterEditorType;\r\n reset?: () => void;\r\n}\r\n\r\nexport const InvoiceFilterEditor: React.FunctionComponent = ({\r\n filter,\r\n editFilter,\r\n save,\r\n type,\r\n reset,\r\n}) => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const { getString } = React.useContext(LocalizationContext);\r\n const [auth] = useAuth();\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n editFilter(\"datefrom\", isValidDate(date) ? date.toISOString() : undefined)}\r\n />\r\n \r\n \r\n editFilter(\"dateto\", isValidDate(date) ? date.toISOString() : undefined)}\r\n />\r\n \r\n\r\n {type === InvoiceFilterEditorType.Extended &&\r\n auth.status === \"successful\" &&\r\n auth.user.userIsEmployee === 1 && (\r\n \r\n cli.cliId === filter?.client?.cliId}\r\n onChangeItem={(cli) => editFilter(\"client\", cli)}\r\n />\r\n \r\n )}\r\n \r\n\r\n \r\n \r\n {\r\n save();\r\n showWithDrawer(undefined);\r\n }}\r\n >\r\n {getString(\"orderFilterConfirm\")}\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 InvoiceFilterChips = InvoiceFilterChipsComponent;\r\n","import React from \"react\";\r\nimport { InvoiceListData } from \"../../../data/accounting/invoices/types\";\r\nimport {\r\n PaginationTable,\r\n PaginationDataProps,\r\n} from \"../../components/common/PagginationTable\";\r\nimport {\r\n useInvoiceActions,\r\n useDeleteInvoiceAction,\r\n} from \"./useInvoicesActions\";\r\nimport { useInvoicesColumns } from \"./useInvoicesColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\n\r\nexport interface InvoicesTableProps {\r\n userAccessRights: AccessRights;\r\n getData: () => void;\r\n}\r\n\r\ntype InvoicesTablePropsType = InvoicesTableProps &\r\n PaginationDataProps;\r\n\r\nconst InvoicesTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n getData,\r\n ...tableProps\r\n}) => {\r\n const actions = useInvoiceActions();\r\n const columns = useInvoicesColumns();\r\n const onDeleteInvoice = useDeleteInvoiceAction();\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={getData}\r\n // immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n actions={actions}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n }}\r\n editable={{\r\n onRowDelete: onDeleteInvoice,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default InvoicesTable;\r\n","import { InvoiceListData } from \"../../../data/accounting/invoices/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\nimport { DisplayBoolNumber } from \"../../components/common/DisplayBoolNumber\";\r\nimport { Status } from \"../../../data/models\";\r\n\r\nexport const useInvoicesColumns = () => {\r\n const {\r\n getString,\r\n getDateString,\r\n getFormatedNumberString,\r\n } = React.useContext(LocalizationContext);\r\n\r\n return React.useMemo(\r\n () => [\r\n {\r\n title: getString(\"invoiceInvNo\"),\r\n field: \"invNo\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"invoiceInvDate\"),\r\n render: (invoice) => getDateString(invoice.invDate, \"DD.MM.YYYY\"),\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"invoiceInvTypeDescr\"),\r\n field: \"invTypeDescr\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"invoiceTranNo\"),\r\n field: \"tranNo\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"invoiceClientName\"),\r\n field: \"clientName\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"invoiceAmt\"),\r\n render: (invoice) => getFormatedNumberString(invoice.amt, true),\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"invoiceVatAmt\"),\r\n render: (invoice) => getFormatedNumberString(invoice.vatAmt, true),\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"invoiceInvAmt\"),\r\n render: (invoice) => getFormatedNumberString(invoice.invAmt, true),\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"cliStatus\"),\r\n render: (invoice) => (\r\n \r\n ),\r\n customSort: (a, b) => a.status - b.status,\r\n width: \"80px\",\r\n },\r\n ],\r\n [getString, getFormatedNumberString, getDateString]\r\n ) as Column[];\r\n};\r\n","import { InvoiceFilter } from \"../types\";\r\nimport { InvoiceListData, GetInvoiceParams } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nconst getInvoiceWebApi = (\r\n user: User,\r\n page: number,\r\n itemsPerPage: number,\r\n filter: InvoiceFilter\r\n) => {\r\n const params: GetInvoiceParams = {\r\n userid: user.userId,\r\n fromrow: page * itemsPerPage,\r\n numofrows: itemsPerPage,\r\n clientid: filter?.client?.cliId,\r\n datefrom: getParamsDateString(filter.datefrom),\r\n dateto: getParamsDateString(filter.dateto),\r\n };\r\n\r\n return webApiWithResponse({\r\n method: \"GET\",\r\n url: \"accounting/getinvoicelist\",\r\n params,\r\n });\r\n};\r\n\r\nexport default getInvoiceWebApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadAllInvoices } from \"../thunks/loadAllInvoices\";\r\nimport { InvoiceListData } from \"../types\";\r\nimport { PageData } from \"../../../models\";\r\n\r\nexport const useInvoicesData = () => {\r\n const pageData = useSelector<\r\n StoreType,\r\n PageData | undefined\r\n >((s) => s.data.accounting.invoices.currentPage);\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadInvoicesPage = React.useCallback(\r\n () => dispatch(loadAllInvoices()),\r\n [dispatch]\r\n );\r\n\r\n return [pageData, dispatchLoadInvoicesPage] as [\r\n typeof pageData,\r\n typeof dispatchLoadInvoicesPage\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { setInvoices, invalidateInvoices } from \"../invoicesDataSlice\";\r\nimport { setInvoiceIndex } from \"../invoicesUXSlice\";\r\nimport getInvoices from \"../api/getInvoices\";\r\nimport { PageIndex, PageDataStatus } from \"../../../models\";\r\n\r\nexport const loadAllInvoices = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n const { pageNumber, itemsPerPage } = store.ux.accounting.invoices.index;\r\n const { filter } = store.ux.accounting.invoices;\r\n const user = store.data.auth.current.user;\r\n\r\n const invoicesResponse = await dispatch(\r\n getInvoices(user, pageNumber, itemsPerPage, filter)\r\n );\r\n\r\n if (!invoicesResponse || invoicesResponse.resCode !== \"OK\") {\r\n return;\r\n }\r\n\r\n const invoices = {\r\n currentPageData: invoicesResponse.obj,\r\n totalCount: Number(invoicesResponse.resDesc) || 0,\r\n status: PageDataStatus.DataCurrent,\r\n };\r\n\r\n dispatch(setInvoices(invoices));\r\n};\r\n\r\nexport const setInvoicesIndexThunk = (index: PageIndex): ThunkType => (\r\n dispatch\r\n) => {\r\n dispatch(setInvoiceIndex(index));\r\n dispatch(invalidateInvoices());\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { resetInvoiceIdices } from \"../invoicesUXSlice\";\r\nimport { PageIndex } from \"../../../models\";\r\nimport { setInvoicesIndexThunk } from \"../thunks/loadAllInvoices\";\r\n\r\nexport const useInvoiceIndex = () => {\r\n const pageIndex = useSelector(\r\n (s) => s.ux.accounting.invoices.index\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetIndex = React.useCallback(\r\n (index: PageIndex) => dispatch(setInvoicesIndexThunk(index)),\r\n [dispatch]\r\n );\r\n const dispatchResetIndex = React.useCallback(\r\n () => dispatch(resetInvoiceIdices()),\r\n [dispatch]\r\n );\r\n\r\n return [pageIndex, dispatchSetIndex, dispatchResetIndex] as [\r\n typeof pageIndex,\r\n typeof dispatchSetIndex,\r\n typeof dispatchResetIndex\r\n ];\r\n};\r\n","import { useCopiedState } from \"../../../../core/util/hooks\";\r\nimport { setFilter, removeFilter, initialState } from \"../invoicesUXSlice\";\r\nimport { invalidateInvoices } from \"../invoicesDataSlice\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport React from \"react\";\r\nimport { InvoiceFilter } from \"../types\";\r\n\r\nexport const useInvoicesFilter = () => {\r\n const [storeFilter] = useCurrentInvoicesFilter();\r\n const [filter, editFilter, changeState, setCurrentFilter] = useCopiedState<\r\n InvoiceFilter\r\n >(storeFilter);\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetFilter = React.useCallback(() => {\r\n dispatch(setFilter(filter!));\r\n dispatch(invalidateInvoices());\r\n }, [dispatch, filter]);\r\n\r\n const dispatchResetFilter = React.useCallback(() => {\r\n setCurrentFilter(initialState.filter);\r\n }, [setCurrentFilter]);\r\n\r\n return [\r\n filter,\r\n editFilter,\r\n dispatchSetFilter,\r\n changeState,\r\n dispatchResetFilter,\r\n ] as [\r\n typeof filter,\r\n typeof editFilter,\r\n typeof dispatchSetFilter,\r\n typeof changeState,\r\n typeof dispatchResetFilter\r\n ];\r\n};\r\n\r\nexport const useCurrentInvoicesFilter = () => {\r\n const filter = useSelector(\r\n (store) => store.ux.accounting.invoices.filter\r\n );\r\n const dispatch = useDispatch();\r\n const dispatchRemoveFilter = React.useCallback(\r\n (type: keyof InvoiceFilter) => {\r\n dispatch(removeFilter(type));\r\n dispatch(invalidateInvoices());\r\n },\r\n [dispatch]\r\n );\r\n\r\n return [filter, dispatchRemoveFilter] as [\r\n typeof filter,\r\n typeof dispatchRemoveFilter\r\n ];\r\n};\r\n","import React from \"react\";\r\nimport { Chip, Grid } from \"@material-ui/core\";\r\nimport { InvoiceFilter } from \"../../../data/accounting/invoices/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\n\r\nexport const InvoiceFilterChipsComponent: React.FunctionComponent = ({\r\n filter,\r\n removeFilter,\r\n}) => {\r\n const { getDateString, getString } = React.useContext(LocalizationContext);\r\n return (\r\n \r\n {filter.datefrom && (\r\n \r\n removeFilter(\"datefrom\")}\r\n />\r\n \r\n )}\r\n {filter.dateto && (\r\n \r\n removeFilter(\"dateto\")}\r\n />\r\n \r\n )}\r\n {filter.client && (\r\n \r\n removeFilter(\"client\")}\r\n />\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\ninterface InvoiceFilterChipsProps {\r\n filter: InvoiceFilter;\r\n removeFilter: (type: keyof InvoiceFilter) => void;\r\n}\r\n","import React from \"react\";\r\nimport FilterIcon from \"@material-ui/icons/FilterListOutlined\";\r\nimport { IconButton, Grid } from \"@material-ui/core\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport {\r\n useInvoicesFilter,\r\n useCurrentInvoicesFilter,\r\n} from \"../../../data/accounting/invoices/hooks/useInvoicesFilter\";\r\nimport {\r\n InvoiceFilterEditor,\r\n InvoiceFilterEditorType,\r\n InvoiceFilterChips,\r\n} from \"./InvoiceFilterEditor\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\n\r\nexport const InvoiceFilterButton: React.FunctionComponent = () => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const showFilter = React.useCallback(\r\n () => showWithDrawer(),\r\n [showWithDrawer]\r\n );\r\n\r\n const [filter, removeFilter] = useCurrentInvoicesFilter();\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\nconst InvoicesFilterEditor: React.FunctionComponent = () => {\r\n const [filter, editFilter, save, , rest] = useInvoicesFilter();\r\n return (\r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport { Grid, CardContent, CardHeader, Card, Divider, Fab } from \"@material-ui/core\";\r\nimport InvoicesTable from \"./InvoicesTable\";\r\nimport AddIcon from \"@material-ui/icons/Add\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { PageComponent, AccessRights } from \"../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { useInvoicesData } from \"../../../data/accounting/invoices/hooks/useInvoicesData\";\r\nimport { useInvoiceIndex } from \"../../../data/accounting/invoices/hooks/useInvoicesIndex\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { getInvoicesEditLocation } from \"./Locations\";\r\nimport { PageDataStatus } from \"../../../data/models\";\r\nimport { InvoiceFilterButton } from \"./InvoiceFilter\";\r\nimport { useAuth } from \"../../../data/auth/hooks\";\r\n\r\nconst InvoicesPage: PageComponent = ({ userAccessRights }) => {\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst [pageData, dispatchLoadInvoices] = useInvoicesData();\r\n\tconst [pageIndex, dispatchSetIndex] = useInvoiceIndex();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tif (pageData && pageData.status === PageDataStatus.DataInvalidated) {\r\n\t\t\tdispatchLoadInvoices();\r\n\t\t}\r\n\t}, [dispatchLoadInvoices, pageData]);\r\n\r\n\tconst history = useHistory();\r\n\r\n\tconst [auth] = useAuth();\r\n\r\n\tif (auth.status !== \"successful\") {\r\n\t\treturn null;\r\n\t}\r\n\r\n\treturn (\r\n\t\t<>\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\t}\r\n\t\t\t\t\t\t\taction={}\r\n\t\t\t\t\t\t/>\r\n\t\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\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t{userAccessRights === AccessRights.All && (\r\n\t\t\t\t\t history.push(getInvoicesEditLocation())}\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\r\n\t);\r\n};\r\n\r\nexport default InvoicesPage;\r\n","import React from \"react\";\r\nimport { useDisplayInvoice } from \"./useDisplayInvoice\";\r\nimport { InvoiceData } from \"../types\";\r\nimport { useCopiedState } from \"../../../../core/util/hooks\";\r\nimport { Status } from \"../../../models\";\r\n\r\nconst now = new Date();\r\nexport const defaultInvoice: InvoiceData = {\r\n invId: \"\",\r\n invNo: \"\",\r\n clientId: \"\",\r\n currId: \"00000001\",\r\n};\r\n\r\nexport const useEditInvoice = (invId?: string): InvoiceData | undefined => {\r\n const displayInvoice = useDisplayInvoice(invId);\r\n\r\n return React.useMemo(() => {\r\n if (invId !== undefined && displayInvoice === undefined) {\r\n return undefined;\r\n }\r\n\r\n if (invId === undefined) {\r\n return { ...defaultInvoice };\r\n }\r\n\r\n return displayInvoice ? { ...displayInvoice } : undefined;\r\n }, [invId, displayInvoice]);\r\n};\r\n\r\nexport const useEditInvoiceState = (invId?: string) => {\r\n const invoice = useEditInvoice(invId);\r\n return useCopiedState(invoice);\r\n};\r\n","import { InvoiceData, InvoiceValidationState } from \"../types\";\r\nimport { createUseValidator } from \"../../../../core/util/hooks\";\r\n\r\nexport const invoiceValidationState: InvoiceValidationState = {\r\n invDate: true,\r\n clientId: true,\r\n invNo: true,\r\n invType: true,\r\n tranDate: true,\r\n dueDate: true,\r\n tranId: true,\r\n tradeAmt: true,\r\n currId: true,\r\n commPerc: true,\r\n amt: true,\r\n vatPerc: true,\r\n vatAmt: true,\r\n invAmt: true,\r\n status: true,\r\n};\r\n\r\nexport const useInvoiceValidator = createUseValidator<\r\n InvoiceData,\r\n InvoiceValidationState\r\n>(invoiceValidationState);\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { InvoiceData } from \"../types\";\r\n\r\nexport const createInvoiceApi = (userId: string, invoice: InvoiceData) =>\r\n webApiWithResponse({\r\n method: \"PUT\",\r\n url: \"accounting/newinvoice\",\r\n params: {\r\n userId,\r\n },\r\n data: invoice,\r\n });\r\n\r\nexport default createInvoiceApi;\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { InvoiceData } from \"../types\";\r\n\r\nexport const updateInvoiceApi = (userId: string, invoice: InvoiceData) =>\r\n webApiWithResponse({\r\n method: \"PUT\",\r\n url: \"accounting/updinvoice\",\r\n params: {\r\n userId,\r\n },\r\n data: invoice,\r\n });\r\n\r\nexport default updateInvoiceApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { upsertInvoice } from \"../thunks/upsertInvoice\";\r\nimport { setFetchState } from \"../invoicesDataSlice\";\r\nimport { InvoiceData } from \"../types\";\r\n\r\nexport const useInvoiceUpsert = () => {\r\n const fetchState = useSelector(\r\n (store) => store.data.accounting.invoices.fetchState\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchUpsertInvoice = React.useCallback(\r\n (invoice: InvoiceData) => dispatch(upsertInvoice(invoice)),\r\n [dispatch]\r\n );\r\n\r\n React.useEffect(() => {\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n }, [dispatch]);\r\n\r\n return [fetchState, dispatchUpsertInvoice] as [\r\n typeof fetchState,\r\n typeof dispatchUpsertInvoice\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport createInvoiceApi from \"../api/createInvoice\";\r\nimport updateInvoiceApi from \"../api/updateInvoice\";\r\nimport { InvoiceData } from \"../types\";\r\nimport { setFetchState, invalidateInvoices } from \"../invoicesDataSlice\";\r\n\r\nexport const upsertInvoice = (invoice: InvoiceData): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n dispatch(setFetchState({ type: \"started\" }));\r\n\r\n const { userId } = store.data.auth.current.user;\r\n const result = invoice.invId\r\n ? await dispatch(updateInvoiceApi(userId, invoice))\r\n : await dispatch(createInvoiceApi(userId, invoice));\r\n\r\n if (result && result.resCode === \"OK\") {\r\n dispatch(setFetchState({ type: \"successful\", result: result.resDesc }));\r\n dispatch(invalidateInvoices());\r\n return result.resDesc;\r\n } else {\r\n dispatch(setFetchState({ type: \"error\", errorCode: result?.resCode }));\r\n }\r\n};\r\n","import { useSelector } from \"react-redux\";\r\nimport { StoreType } from \"../../../core/store/reducers\";\r\nimport { InvTypes } from \"../../models\";\r\n\r\nconst getTypeLabel = (type?: InvTypes) => (type ? type.ftDescr : \"\");\r\n\r\nexport const useInvoiceType = () => {\r\n const types = useSelector(\r\n (store) => store.data.initialData.invTypes\r\n );\r\n\r\n return [types, getTypeLabel] as [typeof types, typeof getTypeLabel];\r\n};\r\n","import React from \"react\";\r\nimport { useInvoiceType } from \"../../../data/initialData/hooks/useInvoiceType\";\r\nimport { InvTypes } from \"../../../data/models\";\r\nimport {\r\n AutocompleteSelect,\r\n AutocompleteSelectType,\r\n} from \"./AutocompleteSelect\";\r\n\r\ntype InvoiceTypeSelectPropsType = Omit<\r\n AutocompleteSelectType,\r\n \"data\" | \"getLabel\"\r\n>;\r\n\r\nexport const InvoiceTypeSelect: React.FunctionComponent = (\r\n props\r\n) => {\r\n const [invtypes, renderInvTypeLabel] = useInvoiceType();\r\n\r\n return (\r\n \r\n data={invtypes}\r\n getLabel={renderInvTypeLabel}\r\n {...(props as any)}\r\n />\r\n );\r\n};\r\n","import React from \"react\";\r\nimport { useEditInvoiceState } from \"../../../data/accounting/invoices/hooks/useEditInvoiceState\";\r\nimport { useInvoiceValidator } from \"../../../data/accounting/invoices/hooks/useInvoiceValidator\";\r\nimport { useInvoiceUpsert } from \"../../../data/accounting/invoices/hooks/useInvoicesUpsert\";\r\nimport { RouteComponentProps, useHistory } from \"react-router-dom\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport {\r\n Card,\r\n Grid,\r\n CardHeader,\r\n Divider,\r\n CardContent,\r\n} from \"@material-ui/core\";\r\nimport { FabSave } from \"../../components/common/FabSave\";\r\nimport { InvoiceData } from \"../../../data/accounting/invoices/types\";\r\nimport { LeavePrompt } from \"../../components/common/LeavePrompt\";\r\nimport { Status, OrderFilter } from \"../../../data/models\";\r\nimport { BoolInput } from \"../../components/common/BoolInput\";\r\nimport { invoicesLocation } from \"./Locations\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { ClientSelect } from \"../../components/listing/ClientSelect\";\r\nimport { NumberInput } from \"../../components/common/NumberInput\";\r\nimport { DateInput } from \"../../components/common/DateInput\";\r\nimport { CurrencySelect } from \"../../components/common/CurrencySelect\";\r\nimport { SimpleTransFilter } from \"../../../data/trading/transactions/types\";\r\nimport { StringInput } from \"../../components/common/StringInput\";\r\nimport { FiltredTransactionsSelect } from \"../../components/trading/FiltredTransactionsSelect\";\r\nimport { InvoiceTypeSelect } from \"../../components/common/InvoiceTypeSelect\";\r\n\r\nexport interface EditInvoiceInfo {\r\n invId?: string;\r\n}\r\n\r\nexport interface EditInvoiceProps\r\n extends RouteComponentProps {}\r\n\r\nexport const EditInvoicePage: React.FunctionComponent = (\r\n props\r\n) => {\r\n const { getString } = React.useContext(LocalizationContext);\r\n const pageStyles = usePageStyles();\r\n\r\n const [invoice, editInvoice, changed] = useEditInvoiceState(\r\n props.match.params.invId\r\n );\r\n const [validationState, validate] = useInvoiceValidator();\r\n const [fetchState, upsert] = useInvoiceUpsert();\r\n const history = useHistory();\r\n const [tradesFilter, setTransactionFilter] = React.useState<\r\n SimpleTransFilter | undefined\r\n >(createInvoiceFilter(invoice));\r\n\r\n React.useEffect(() => {\r\n setTransactionFilter(createInvoiceFilter(invoice));\r\n }, [invoice, setTransactionFilter]);\r\n\r\n const unsavedChanges = fetchState.type === \"not-started\" && changed;\r\n\r\n const handleChange = React.useCallback(\r\n (event: React.ChangeEvent) => {\r\n editInvoice(event.target.name as any, event.target.value);\r\n },\r\n [editInvoice]\r\n );\r\n\r\n const save = React.useCallback(() => {\r\n if (fetchState.type === \"successful\") {\r\n history.push(invoicesLocation);\r\n } else if (fetchState.type !== \"started\") {\r\n const normalized = validate(invoice);\r\n\r\n if (normalized) {\r\n upsert(normalized);\r\n }\r\n }\r\n }, [invoice, validate, fetchState, history, upsert]);\r\n\r\n const pageTitle = invoice && invoice.invId ? \"invoiceEdit\" : \"invoiceCreate\";\r\n\r\n if (!invoice) {\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 editInvoice(\"invDate\", date)}\r\n error={\r\n validationState.invDate !== undefined &&\r\n !validationState.invDate\r\n }\r\n required={validationState.invDate !== undefined}\r\n />\r\n \r\n \r\n editInvoice(\"tranDate\", date)}\r\n error={\r\n validationState.tranDate !== undefined &&\r\n !validationState.tranDate\r\n }\r\n required={validationState.tranDate !== undefined}\r\n />\r\n \r\n \r\n editInvoice(\"dueDate\", date)}\r\n error={\r\n validationState.dueDate !== undefined &&\r\n !validationState.dueDate\r\n }\r\n required={validationState.dueDate !== undefined}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n \r\n property=\"invNo\"\r\n item={invoice}\r\n validationState={validationState}\r\n onChange={handleChange}\r\n label={getString(\"invoiceInvNo\")}\r\n />\r\n \r\n \r\n type.ftValue === invoice.invType}\r\n onChangeItem={(type) => editInvoice(\"invType\", type?.ftValue)}\r\n required={validationState.invType !== undefined}\r\n error={\r\n validationState.invType !== undefined &&\r\n !validationState.invType\r\n }\r\n />\r\n \r\n\r\n \r\n \r\n property=\"descr\"\r\n item={invoice}\r\n validationState={validationState}\r\n onChange={handleChange}\r\n label={getString(\"invoiceDescr\")}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n client.cliId === invoice.clientId}\r\n onChangeItem={(client) => {\r\n editInvoice(\"clientId\", client ? client.cliId : undefined);\r\n }}\r\n required={validationState.clientId !== undefined}\r\n error={\r\n validationState.clientId !== undefined &&\r\n !validationState.clientId\r\n }\r\n />\r\n \r\n\r\n \r\n trans.ordId === invoice.tranId}\r\n onChangeItem={(trans) => {\r\n editInvoice(\"tranId\", trans ? trans.ordId : undefined);\r\n }}\r\n required={validationState.tranId !== undefined}\r\n error={\r\n validationState.tranId !== undefined &&\r\n !validationState.tranId\r\n }\r\n />\r\n \r\n\r\n \r\n \r\n \r\n property=\"tradeAmtWithVat\"\r\n item={invoice}\r\n validationState={validationState}\r\n onChange={handleChange}\r\n label={getString(\"invoiceTradeAmtWithVat\")}\r\n money\r\n />\r\n \r\n{/* \r\n \r\n property=\"tradeAmt\"\r\n item={invoice}\r\n validationState={validationState}\r\n onChange={handleChange}\r\n label={getString(\"invoiceTradeAmt\")}\r\n money\r\n />\r\n */}\r\n \r\n currency.currId === invoice.currId}\r\n onChangeItem={(currency) =>\r\n editInvoice(\"currId\", currency?.currId)\r\n }\r\n required={validationState.currId !== undefined}\r\n error={\r\n validationState.currId !== undefined &&\r\n !validationState.currId\r\n }\r\n fullWidth\r\n />\r\n \r\n \r\n\r\n \r\n \r\n \r\n property=\"commPerc\"\r\n item={invoice}\r\n validationState={validationState}\r\n onChange={handleChange}\r\n label={getString(\"invoiceCommPerc\")}\r\n money\r\n />\r\n \r\n \r\n \r\n property=\"amt\"\r\n item={invoice}\r\n validationState={validationState}\r\n onChange={handleChange}\r\n label={getString(\"invoiceAmt\")}\r\n money\r\n />\r\n \r\n \r\n \r\n property=\"vatPerc\"\r\n item={invoice}\r\n validationState={validationState}\r\n onChange={handleChange}\r\n label={getString(\"invoiceVatPerc\")}\r\n money\r\n />\r\n \r\n \r\n \r\n property=\"vatAmt\"\r\n item={invoice}\r\n validationState={validationState}\r\n onChange={handleChange}\r\n label={getString(\"invoiceVatAmt\")}\r\n money\r\n />\r\n \r\n \r\n \r\n property=\"invAmt\"\r\n item={invoice}\r\n validationState={validationState}\r\n onChange={handleChange}\r\n label={getString(\"invoiceInvAmt\")}\r\n money\r\n />\r\n \r\n \r\n\r\n \r\n \r\n \r\n property=\"cmpAccount\"\r\n item={invoice}\r\n validationState={validationState}\r\n onChange={handleChange}\r\n label={getString(\"invoiceCmpAccount\")}\r\n />\r\n \r\n \r\n \r\n property=\"model\"\r\n item={invoice}\r\n validationState={validationState}\r\n onChange={handleChange}\r\n label={getString(\"invoiceModel\")}\r\n />\r\n \r\n \r\n \r\n property=\"reffNo\"\r\n item={invoice}\r\n validationState={validationState}\r\n onChange={handleChange}\r\n label={getString(\"invoiceReffNo\")}\r\n />\r\n \r\n \r\n editInvoice(\"bookDate\", date)}\r\n error={\r\n validationState.bookDate !== undefined &&\r\n !validationState.bookDate\r\n }\r\n required={validationState.bookDate !== undefined}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n \r\n property=\"status\"\r\n item={invoice}\r\n onChange={handleChange}\r\n falsyValue={Status.Inactive}\r\n thrutyValue={Status.Active}\r\n label={getString(\"paymentStatus\")}\r\n />\r\n \r\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 createInvoiceFilter = (invoice?: InvoiceData) => {\r\n return invoice && invoice.clientId\r\n ? {\r\n cliid: invoice.clientId,\r\n }\r\n : undefined;\r\n};\r\n","import { NavigationItem } from \"../../../core/navigation/types\";\r\nimport InvoicesPage from \"./InvoicesPage\";\r\nimport { EditInvoicePage } from \"./EditInvoicePage\";\r\nimport { invoicesLocation, editRouter } from \"./Locations\";\r\nexport const invoicesComponents: NavigationItem[] = [\r\n {\r\n Component: InvoicesPage,\r\n isMenuItem: true,\r\n path: invoicesLocation,\r\n },\r\n {\r\n Component: EditInvoicePage,\r\n isMenuItem: false,\r\n path: editRouter,\r\n },\r\n];\r\n","import { InvoiceFilter } from \"../types\";\r\nimport { InvoiceListData, GetInvoiceParams } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\n\r\nconst getAccountingOrdereWebApi = (user: User, filter: InvoiceFilter) => {\r\n return webApi({\r\n method: \"GET\",\r\n url: \"accounting/getinvoicelist\",\r\n params: {\r\n userid: user.userId,\r\n datefrom: getParamsDateString(filter.datefrom),\r\n dateto: getParamsDateString(filter.dateto),\r\n status: 1,\r\n },\r\n });\r\n};\r\n\r\nexport default getAccountingOrdereWebApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadReport } from \"../thunks/loadAccountingOrderData\";\r\nimport { InvoiceListData } from \"../types\";\r\n\r\nexport const useAccountingOrderData = () => {\r\n const data = useSelector(\r\n (s) => s.data.accounting.accountingOrder.data\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadData = React.useCallback(() => dispatch(loadReport()), [\r\n dispatch,\r\n ]);\r\n\r\n return [data, dispatchLoadData] as [typeof data, typeof dispatchLoadData];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { setData } from \"../accountingOrderDataSlice\";\r\nimport getAccountingOrdereWebApi from \"../api/getAccountingOrderData\";\r\n\r\nexport const loadReport = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const user = store.data.auth.current.user;\r\n const { filter } = store.ux.accounting.accountingOrder;\r\n\r\n const pagedTrades = await dispatch(getAccountingOrdereWebApi(user, filter));\r\n\r\n dispatch(setData(pagedTrades || []));\r\n};\r\n","import React from \"react\";\r\nimport { useAccountingOrderColumns } from \"./useAccountingOrderColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\nimport { InvoiceListData } from \"../../../data/accounting/accountingOrder/types\";\r\nimport { ControledTable } from \"../../components/common/ControledTable\";\r\nimport { useAccountingOrderData } from \"../../../data/accounting/accountingOrder/hooks/useAccountingOrderData\";\r\nimport { useAccountingOrderIndex } from \"../../../data/accounting/accountingOrder/hooks/useAccountingOrderIndex\";\r\n\r\nexport interface AccountingOrderTableProps {\r\n userAccessRights: AccessRights;\r\n}\r\n\r\ntype AccountingOrderTablePropsType = AccountingOrderTableProps;\r\n\r\nexport const AccountingOrderTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n ...tableProps\r\n}) => {\r\n const columns = useAccountingOrderColumns();\r\n const [data, load] = useAccountingOrderData();\r\n const [index, setIndex] = useAccountingOrderIndex();\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={load}\r\n onPageIndexChange={setIndex}\r\n pageIndex={index}\r\n immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default AccountingOrderTable;\r\n","import { InvoiceListData } from \"../../../data/accounting/invoices/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\nimport { DisplayBoolNumber } from \"../../components/common/DisplayBoolNumber\";\r\nimport { Status } from \"../../../data/models\";\r\n\r\nexport const useAccountingOrderColumns = () => {\r\n const {\r\n getString,\r\n getDateString,\r\n getFormatedNumberString,\r\n } = React.useContext(LocalizationContext);\r\n\r\n return React.useMemo(\r\n () => [\r\n {\r\n title: getString(\"invoiceInvNo\"),\r\n field: \"invNo\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"invoiceInvDate\"),\r\n render: (invoice) => getDateString(invoice.invDate, \"DD.MM.YYYY\"),\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"invoiceInvTypeDescr\"),\r\n field: \"invTypeDescr\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"invoiceTranNo\"),\r\n field: \"tranNo\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"invoiceClientName\"),\r\n field: \"clientName\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"invoiceAmt\"),\r\n render: (invoice) => getFormatedNumberString(invoice.amt, true),\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"invoiceVatAmt\"),\r\n render: (invoice) => getFormatedNumberString(invoice.vatAmt, true),\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"invoiceInvAmt\"),\r\n render: (invoice) => getFormatedNumberString(invoice.invAmt, true),\r\n sorting: false,\r\n cellStyle: {\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"end\",\r\n },\r\n headerStyle: {\r\n textAlign: \"end\",\r\n },\r\n },\r\n {\r\n title: getString(\"cliStatus\"),\r\n render: (invoice) => (\r\n \r\n ),\r\n customSort: (a, b) => a.status - b.status,\r\n width: \"80px\",\r\n },\r\n ],\r\n [getString, getFormatedNumberString, getDateString]\r\n ) as Column[];\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { setIndex } from \"../accountingOrderUXSlice\";\r\nimport { PageIndex } from \"../../../models\";\r\n\r\nexport const useAccountingOrderIndex = () => {\r\n const pageIndex = useSelector(\r\n (s) => s.ux.accounting.accountingOrder.index\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetIndex = React.useCallback(\r\n (index: PageIndex) => dispatch(setIndex(index)),\r\n [dispatch]\r\n );\r\n\r\n return [pageIndex, dispatchSetIndex] as [\r\n typeof pageIndex,\r\n typeof dispatchSetIndex\r\n ];\r\n};\r\n","import React from \"react\";\r\nimport { Grid, Paper, Button } from \"@material-ui/core\";\r\nimport { DateInput } from \"../../components/common/DateInput\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { InvoiceFilter } from \"../../../data/accounting/accountingOrder/types\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { isValidDate } from \"../../../core/util/functions\";\r\n\r\ninterface AccountingOrderFilterEditorProps {\r\n filter?: InvoiceFilter;\r\n editFilter: (prop: keyof InvoiceFilter, value: any) => void;\r\n save: () => void;\r\n}\r\n\r\nexport const AccountingOrderFilterEditor: React.FunctionComponent = ({\r\n filter,\r\n editFilter,\r\n save,\r\n}) => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const { getString } = React.useContext(LocalizationContext);\r\n\r\n const handleChange = React.useCallback(\r\n (event: React.ChangeEvent) => {\r\n editFilter(event.target.name as any, event.target.value);\r\n },\r\n [editFilter]\r\n );\r\n\r\n if (!filter) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n editFilter(\"datefrom\", isValidDate(date) ? date.toISOString() : undefined)}\r\n />\r\n \r\n \r\n editFilter(\"dateto\", isValidDate(date) ? date.toISOString() : undefined)}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n {\r\n save();\r\n showWithDrawer(undefined);\r\n }}\r\n >\r\n {getString(\"orderFilterConfirm\")}\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport { Chip, Grid } from \"@material-ui/core\";\r\nimport { InvoiceFilter } from \"../../../data/accounting/accountingOrder/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\n\r\nexport const AccountingOrderFilterChips: React.FunctionComponent = ({\r\n filter,\r\n removefilter,\r\n}) => {\r\n const { getDateString, getString } = React.useContext(LocalizationContext);\r\n\r\n return (\r\n \r\n {filter.datefrom && (\r\n \r\n removefilter(\"datefrom\")}\r\n />\r\n \r\n )}\r\n {filter.dateto && (\r\n \r\n removefilter(\"dateto\")}\r\n />\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\ninterface AccountingOrderFilterChipsProps {\r\n filter: InvoiceFilter;\r\n removefilter: (type: keyof InvoiceFilter) => void;\r\n}\r\n","import React from \"react\";\r\nimport { IconButton, Grid } from \"@material-ui/core\";\r\nimport FilterIcon from \"@material-ui/icons/FilterListOutlined\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport {\r\n useAccountingOrderFilter,\r\n useCurrentAccountingOrderFilter,\r\n} from \"../../../data/accounting/accountingOrder/hooks/useAccountingOrderFilter\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport { AccountingOrderFilterEditor } from \"./AccountingOrderEditor\";\r\nimport { AccountingOrderFilterChips } from \"./AccountingOrderFilterChips\";\r\n\r\nexport const AccountingOrderFilter: React.FunctionComponent = () => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const showFilter = React.useCallback(\r\n () => showWithDrawer(),\r\n [showWithDrawer]\r\n );\r\n\r\n // const [filter, editfilter, save] = useCurrentAccountingOrderFilter();\r\n const [filter, removefilter] = useCurrentAccountingOrderFilter();\r\n\r\n const { getString } = React.useContext(LocalizationContext);\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\nconst AcountingOrdersFiltersEditor: React.FunctionComponent = () => {\r\n const [filter, editFilter, save] = useAccountingOrderFilter();\r\n return (\r\n \r\n );\r\n};\r\n","import { setFilter, removeFilter } from \"../accountingOrderUXSlice\";\r\nimport { setData } from \"../accountingOrderDataSlice\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport React from \"react\";\r\nimport { InvoiceFilter } from \"../types\";\r\nimport { useCopiedState } from \"../../../../core/util/hooks\";\r\nimport { invalidateAccOrder } from \"../accountingOrderDataSlice\";\r\n\r\nexport const useAccountingOrderFilter = () => {\r\n const storeFilter = useSelector(\r\n (store) => store.ux.accounting.accountingOrder.filter\r\n );\r\n const [filter, editFilter] = useCopiedState(storeFilter);\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetFilter = React.useCallback(() => {\r\n dispatch(setFilter(filter!));\r\n dispatch(setData());\r\n }, [dispatch, filter]);\r\n\r\n return [filter, editFilter, dispatchSetFilter] as [\r\n typeof filter,\r\n typeof editFilter,\r\n typeof dispatchSetFilter\r\n ];\r\n};\r\n\r\nexport const useCurrentAccountingOrderFilter = () => {\r\n const filter = useSelector(\r\n (store) => store.ux.accounting.accountingOrder.filter\r\n );\r\n const dispatch = useDispatch();\r\n const dispatchRemoveFilter = React.useCallback(\r\n (type: keyof InvoiceFilter) => {\r\n dispatch(removeFilter(type));\r\n dispatch(invalidateAccOrder());\r\n },\r\n [dispatch]\r\n );\r\n\r\n return [filter, dispatchRemoveFilter] as [\r\n typeof filter,\r\n typeof dispatchRemoveFilter\r\n ];\r\n};\r\n","import { InvoiceFilter } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { getParamsDateString } from \"../../../../core/util/functions\";\r\nimport { httpWebApi } from \"../../../../core/http/httpThunks\";\r\n\r\nconst getAccountingOrderButton = (user: User, filter: InvoiceFilter) => {\r\n return httpWebApi({\r\n method: \"GET\",\r\n responseType: \"blob\",\r\n timeout: 60 * 4 * 1000,\r\n url: \"reporting/getaccountingorderxls\",\r\n params: {\r\n userid: user.userId,\r\n datefrom: getParamsDateString(filter.datefrom),\r\n dateto: getParamsDateString(filter.dateto),\r\n accordtype: 1,\r\n },\r\n });\r\n};\r\n\r\nexport default getAccountingOrderButton;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { downloadAccountingOrderButton } from \"../thunks/loadAccountingOrderButton\";\r\nimport { resteData } from \"../accountingOrderDataSlice\";\r\nimport React from \"react\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { InvoiceListData } from \"../types\";\r\n\r\nexport const useAccountingOrderButton = () => {\r\n\tconst fetchState = useSelector(\r\n\t\ts => s.data.accounting.accountingOrder.downloadReportFetchState\r\n\t);\r\n\r\n\tconst data = useSelector(\r\n\t\ts => s.data.accounting.accountingOrder.data\r\n\t);\r\n\r\n\tconst hasData = data !== undefined && data.length > 0;\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst download = React.useCallback(() => dispatch(downloadAccountingOrderButton()), [dispatch]);\r\n\r\n\tconst dispatchResetData = React.useCallback(() => {\r\n\t\tdispatch(resteData());\r\n\t}, [dispatch]);\r\n\r\n\treturn [download, fetchState, dispatchResetData, hasData] as [\r\n\t\ttypeof download,\r\n\t\ttypeof fetchState,\r\n\t\ttypeof dispatchResetData,\r\n\t\ttypeof hasData\r\n\t];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport getAccountingOrderButton from \"../api/getAccountingOrderButton\";\r\nimport { setFetchState } from \"../accountingOrderDataSlice\";\r\nimport fileDownload from \"js-file-download\";\r\nimport moment from \"moment\";\r\n\r\nexport const downloadAccountingOrderButton = (): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { filter } = store.ux.accounting.accountingOrder;\r\n const user = store.data.auth.current.user;\r\n dispatch(setFetchState({ type: \"started\" }));\r\n const accountingOrdersReport = await dispatch(\r\n getAccountingOrderButton(user, filter)\r\n );\r\n\r\n if (accountingOrdersReport) {\r\n fileDownload(\r\n new Blob([accountingOrdersReport as any], {\r\n type: \"application/vnd.openxmlformat\",\r\n }),\r\n \"AccountingOrder_\" + moment().format(\"YYYYMMDDhhmmss\") + \".xlsx\"\r\n );\r\n }\r\n dispatch(setFetchState({ type: \"successful\" }));\r\n};\r\n","import React from \"react\";\r\nimport { useAccountingOrderButton } from \"../../../data/accounting/accountingOrder/hooks/useAccountingOrderButton\";\r\nimport ExcelIcon from \"@material-ui/icons/TableChartOutlined\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\n\r\nexport const AccountingOrderButton: React.FunctionComponent = () => {\r\n const [\r\n downloader,\r\n fetchState,\r\n resetData,\r\n hasData,\r\n ] = useAccountingOrderButton();\r\n const { getString } = React.useContext(LocalizationContext);\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport {\r\n Button,\r\n Grid,\r\n CardContent,\r\n CardHeader,\r\n Card,\r\n Divider,\r\n} from \"@material-ui/core\";\r\nimport { AccountingOrderTable } from \"./AccountingOrderTable\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { PageComponent } from \"../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { AccountingOrderFilter } from \"./AccountingOrderFilter\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { AccountingOrderButton } from \"./AccountingOrderButton\";\r\n\r\nconst AccountingOrderPage: PageComponent = ({ userAccessRights }) => {\r\n const pageStyles = usePageStyles();\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n }\r\n action={}\r\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 AccountingOrderActions: React.FunctionComponent = () => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default AccountingOrderPage;\r\n","import AccountingOrderPage from \"./AccountingOrderPage\";\r\nimport { NavigationItem } from \"../../../core/navigation/types\";\r\nimport { accountingOrderLocation } from \"./Locations\";\r\n\r\nexport const accountingOrderComponents: NavigationItem[] = [\r\n {\r\n Component: AccountingOrderPage,\r\n isMenuItem: true,\r\n path: accountingOrderLocation,\r\n },\r\n];\r\n","export const accountingOrderLocation = \"/accounting/accexport\";\r\n","import { createInvoicesComponents } from \"./createInvoices/navigationComponents\";\r\nimport { invoicesComponents } from \"./invoices/navigationComponents\";\r\nimport { accountingOrderComponents } from \"./accountingOrder/navigationComponents\";\r\n\r\nexport const accountingComponents = [\r\n\t...createInvoicesComponents,\r\n\t...invoicesComponents,\r\n\t...accountingOrderComponents,\r\n];\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\nimport { AlarmData } from \"../types\";\r\n\r\nexport const getAlarmApi = (userId: string, almid: string) =>\r\n webApi({\r\n method: \"GET\",\r\n url: \"surveillance/getalarmdef\",\r\n params: {\r\n userId,\r\n almid,\r\n },\r\n });\r\n\r\nexport default getAlarmApi;\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { getAlarmApi } from \"../api/getAlarm\";\r\nimport { setDisplayed } from \"../alarmDataSlice\";\r\nimport { AlarmData } from \"../types\";\r\n\r\nexport const loadAlarm = (alarmId: string): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n dispatch(setDisplayed());\r\n\r\n const alarm = await dispatch(getAlarm(alarmId));\r\n\r\n dispatch(setDisplayed(alarm));\r\n};\r\n\r\nexport const getAlarm = (\r\n alarmId: string\r\n): ThunkType> => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return undefined;\r\n }\r\n\r\n const { userId } = store.data.auth.current.user;\r\n return await dispatch(getAlarmApi(userId, alarmId));\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { AlarmData } from \"../types\";\r\nimport { loadAlarm } from \"../thunks/loadAlarm\";\r\n\r\nexport const useDisplayAlarm = (almID?: string) => {\r\n const storeAlarm = useSelector(\r\n (store) => store.data.surveillance.alarms.displayedAlarm\r\n );\r\n\r\n const displayedAlarm =\r\n storeAlarm && storeAlarm.almId === almID\r\n ? storeAlarm\r\n : undefined;\r\n\r\n const displatch = useDispatch();\r\n\r\n React.useEffect(() => {\r\n if (almID) {\r\n displatch(loadAlarm(almID));\r\n }\r\n }, [displatch, almID]);\r\n\r\n return displayedAlarm;\r\n};\r\n","import React from \"react\";\r\nimport { AlarmType } from \"../../../../data/models\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\n\r\nexport const useAlarmTypeTranslator = () => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\treturn React.useCallback(\r\n\t\t(type: AlarmType) => {\r\n\t\t\tswitch (type.toUpperCase()) {\r\n\t\t\t\tcase AlarmType.Client.toUpperCase():\r\n\t\t\t\t\treturn getString(\"alarmTypeUser\");\r\n\t\t\t\tcase AlarmType.Product.toUpperCase():\r\n\t\t\t\t\treturn getString(\"alarmTypeProduct\");\r\n\t\t\t\tcase AlarmType.ProductClient.toUpperCase():\r\n\t\t\t\t\treturn getString(\"alarmTypeUserProduct\");\r\n\t\t\t}\r\n\t\t},\r\n\t\t[getString]\r\n\t);\r\n};\r\n\r\ninterface AlarmTypeOption {\r\n\tlabel: string;\r\n\tvalue: AlarmType;\r\n}\r\n\r\nexport const useAlarmType = (): AlarmTypeOption[] => {\r\n\tconst translator = useAlarmTypeTranslator();\r\n\treturn React.useMemo(\r\n\t\t() => [\r\n\t\t\t{\r\n\t\t\t\tlabel: translator(AlarmType.Client) as string,\r\n\t\t\t\tvalue: AlarmType.Client,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tlabel: translator(AlarmType.Product) as string,\r\n\t\t\t\tvalue: AlarmType.Product,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tlabel: translator(AlarmType.ProductClient) as string,\r\n\t\t\t\tvalue: AlarmType.ProductClient,\r\n\t\t\t},\r\n\t\t],\r\n\t\t[translator]\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport { AlarmData } from \"../../../data/surveillance/alarmParameters/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { useDisplaySingleEmementStyles } from \"../../useDisplaySingleEmementStyles\";\r\nimport { DisplayBoolNumber } from \"../../components/common/DisplayBoolNumber\";\r\nimport { AlarmType, Status } from \"../../../data/models\";\r\nimport { useAlarmTypeTranslator } from \"../../../data/surveillance/alarmParameters/hooks/useAlarmType\";\r\n\r\nexport interface DisplayAlarmMainAttributesProps {\r\n\talarm: AlarmData;\r\n}\r\n\r\nexport const DisplayAlarmMainAttributes: React.FunctionComponent = ({\r\n\talarm,\r\n}) => {\r\n\tconst style = useDisplaySingleEmementStyles();\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst translator = useAlarmTypeTranslator();\r\n\r\n\treturn (\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t{getString(\"alarmAlmType\")}\r\n\t\t\t\t{translator(alarm.almType as any)}\r\n\t\t\t
\r\n\t\t\t{alarm.almType === AlarmType.Client && (\r\n\t\t\t\t
\r\n\t\t\t\t\t{getString(\"alarmClient\")}\r\n\t\t\t\t\t{alarm.clientName}\r\n\t\t\t\t
\r\n\t\t\t)}\r\n\t\t\t{alarm.almType === AlarmType.Product && (\r\n\t\t\t\t<>\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t{getString(\"alarmProductCode\")}\r\n\t\t\t\t\t\t{alarm.productCode}\r\n\t\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t{getString(\"alarmProduct\")}\r\n\t\t\t\t\t\t{alarm.productName}\r\n\t\t\t\t\t
\r\n\t\t\t\t\r\n\t\t\t)}\r\n\t\t\t
\r\n\t\t\t\t{getString(\"dlvrstatus\")}\r\n\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};\r\n","import React from \"react\";\r\nimport { useDisplayAlarm } from \"../../../data/surveillance/alarmParameters/hooks/useDisplayAlarm\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { AlarmData } from \"../../../data/surveillance/alarmParameters/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { DisplayAlarmMainAttributes } from \"./DisplayAlarmMainAttributes\";\r\nimport {\r\n ExpansionPanel,\r\n ExpansionPanelSummary,\r\n Typography,\r\n Grid,\r\n} from \"@material-ui/core\";\r\n\r\nexport interface DisplayAlarmGoodsProps {\r\n id?: string;\r\n}\r\n\r\nexport const DisplayAlarm: React.FunctionComponent = ({\r\n id,\r\n}) => {\r\n const alarm = useDisplayAlarm(id);\r\n\r\n const { getString } = React.useContext(LocalizationContext);\r\n\r\n return !alarm ? (\r\n <>{\"loading placeholder\"}\r\n ) : (\r\n \r\n \r\n \r\n {getString(\"tableBasciInfo\")}\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const useViewAlarm = () => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n return React.useCallback(\r\n (alarm: AlarmData) =>\r\n showWithDrawer(),\r\n [showWithDrawer]\r\n );\r\n};\r\n","import { getEditLocation } from \"../../../core/util/functions\";\r\nexport const alarmsLocation = \"/surveilance/alarmsetup\";\r\nexport const getAlarmsEditLocation = (id?: string) =>\r\n getEditLocation(alarmsLocation, undefined, id);\r\n\r\nexport const editRouter = getAlarmsEditLocation(\":almId?\");\r\n","import { webApi } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const deleteAlarmApi = (userId: string, almid: string) =>\r\n webApi({\r\n method: \"DELETE\",\r\n url: \"surveillance/delalarmdef\",\r\n params: {\r\n userId,\r\n almid,\r\n },\r\n });\r\n\r\nexport default deleteAlarmApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { deleteAlarm } from \"../thunks/deleteAlarm\";\r\nimport { setFetchState } from \"../alarmDataSlice\";\r\n\r\nexport const useAlarmDelete = () => {\r\n const fetchState = useSelector(\r\n (store) => store.data.surveillance.alarms.cancelFetchState\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchDeleteAlarm = React.useCallback(\r\n (id: string) => dispatch(deleteAlarm(id)),\r\n [dispatch]\r\n );\r\n\r\n React.useEffect(() => {\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n }, [dispatch]);\r\n\r\n return [fetchState, dispatchDeleteAlarm] as [\r\n typeof fetchState,\r\n typeof dispatchDeleteAlarm\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { deleteAlarmApi } from \"../api/deleteAlarm\";\r\nimport { setFetchState, invalidateAlarm } from \"../alarmDataSlice\";\r\n\r\nexport const deleteAlarm = (dalarmId: string): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n dispatch(setFetchState({ type: \"started\" }));\r\n\r\n const { userId } = store.data.auth.current.user;\r\n const result = await dispatch(deleteAlarmApi(userId, dalarmId));\r\n\r\n dispatch(\r\n setFetchState(\r\n result !== undefined ? { type: \"successful\" } : { type: \"error\" }\r\n )\r\n );\r\n dispatch(invalidateAlarm())\r\n};\r\n","import React, { useContext, useMemo } from \"react\";\r\nimport ViewIcon from \"@material-ui/icons/InputOutlined\";\r\nimport EditIcon from \"@material-ui/icons/EditOutlined\";\r\nimport { AlarmData } from \"../../../data/surveillance/alarmParameters/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { MaterialTableProps } from \"material-table\";\r\nimport { useViewAlarm } from \"./DisplayAlarm\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { getAlarmsEditLocation } from \"./Locations\";\r\nimport { DisplayAlarmMainAttributes } from \"./DisplayAlarmMainAttributes\";\r\nimport { useAlarmDelete } from \"../../../data/surveillance/alarmParameters/hooks/useAlarmDelete\";\r\n\r\nexport function useAlarmsActions() {\r\n const { getString } = useContext(LocalizationContext);\r\n const onShowAlarm = useViewAlarm();\r\n\r\n return useMemo(() => {\r\n const result: MaterialTableProps[\"actions\"] = [\r\n {\r\n icon: () => ,\r\n tooltip: getString(\"orderActView\"),\r\n onClick: (event, rowData) =>\r\n onShowAlarm(rowData as AlarmData),\r\n },\r\n ];\r\n return result;\r\n }, [onShowAlarm, getString]);\r\n}\r\n\r\nexport const useDeleteAlarmAction = () => {\r\n const [, deleteAlarm] = useAlarmDelete();\r\n return React.useCallback(\r\n async (alarm: AlarmData) => {\r\n if (alarm.almId) {\r\n await deleteAlarm(alarm.almId);\r\n }\r\n },\r\n [deleteAlarm]\r\n );\r\n};\r\n\r\nexport const useEditAlarmsAction = () => {\r\n const history = useHistory();\r\n return React.useCallback(\r\n (alarm: AlarmData) =>\r\n history.push(getAlarmsEditLocation(alarm.almId)),\r\n [history]\r\n );\r\n};\r\n","import React from \"react\";\r\nimport { Grid, Paper, Button, Typography } from \"@material-ui/core\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { AlarmFilter } from \"../../../data/surveillance/alarmParameters/types\";\r\nimport { ClientSelect } from \"../../components/listing/ClientSelect\";\r\nimport { useAuth } from \"../../../data/auth/hooks\";\r\nimport { ProductSelect } from \"../../components/listing/ProductSelect\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { AlarmTypeSelect } from \"./AlarmTypeSelect\";\r\n\r\nexport enum AlarmFilterEditorType {\r\n Basic,\r\n Extended,\r\n}\r\n\r\ninterface AlarmFilterEditorProps {\r\n filter?: AlarmFilter;\r\n editFilter: (prop: keyof AlarmFilter, value: any) => void;\r\n save: () => void;\r\n type: AlarmFilterEditorType;\r\n\treset?: () => void;\r\n}\r\n\r\nexport const AlarmFilterEditor: React.FunctionComponent = ({\r\n filter,\r\n editFilter,\r\n save,\r\n type,\r\n reset,\r\n}) => {\r\n\tconst showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const { getString } = React.useContext(LocalizationContext);\r\n const [auth] = useAuth();\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n prod.prodId === filter?.product?.prodId}\r\n onChangeItem={(prod) => {\r\n editFilter(\"product\", prod);\r\n }}\r\n />\r\n \r\n \r\n \r\n client.cliId === filter?.client?.cliId}\r\n onChangeItem={(client) => editFilter(\"client\", client)}\r\n />\r\n \r\n\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\tsave();\r\n\t\t\t\t\t\t\t\tshowWithDrawer(undefined);\r\n\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t{getString(\"orderFilterConfirm\")}\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 \r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport { AlarmData } from \"../../../data/surveillance/alarmParameters/types\";\r\nimport { PaginationTable,PaginationDataProps,} from \"../../components/common/PagginationTable\";\r\nimport {\r\n useAlarmsActions,\r\n useDeleteAlarmAction,\r\n} from \"./useAlarmsActions\";\r\nimport { useAlarmsColumns } from \"./usealarmsColumns\";\r\nimport { AccessRights } from \"../../../core/navigation/types\";\r\n\r\nexport interface AlarmsTableProps {\r\n userAccessRights: AccessRights;\r\n getData: () => void;\r\n}\r\n\r\ntype AlarmsTablePropsType = AlarmsTableProps &\r\n PaginationDataProps;\r\n\r\nconst AlarmsTable: React.FunctionComponent = ({\r\n userAccessRights,\r\n getData,\r\n ...tableProps\r\n}) => {\r\n const actions = useAlarmsActions();\r\n const columns = useAlarmsColumns();\r\n const onDeleteAlarm = useDeleteAlarmAction();\r\n\r\n return (\r\n \r\n {...tableProps}\r\n getData={getData}\r\n // immutableData={data}\r\n title=\"\"\r\n columns={columns}\r\n actions={actions}\r\n options={{\r\n actionsColumnIndex: -1,\r\n search: false,\r\n toolbar: false,\r\n }}\r\n editable={{\r\n onRowDelete: onDeleteAlarm,\r\n }}\r\n />\r\n );\r\n};\r\n\r\nexport default AlarmsTable;\r\n","import { AlarmData } from \"../../../data/surveillance/alarmParameters/types\";\r\nimport React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Column } from \"material-table\";\r\nimport { DisplayBoolNumber } from \"../../components/common/DisplayBoolNumber\";\r\nimport { Status } from \"../../../data/models\";\r\nimport { useAlarmTypeTranslator } from \"../../../data/surveillance/alarmParameters/hooks/useAlarmType\";\r\n\r\nexport const useAlarmsColumns = () => {\r\n const { getString } = React.useContext(LocalizationContext);\r\n const translator = useAlarmTypeTranslator();\r\n\r\n return React.useMemo(\r\n () => [\r\n {\r\n title: getString(\"alarmAlmType\"),\r\n sorting: false,\r\n render: alarm => translator(alarm.almType as any),\r\n },\r\n {\r\n title: getString(\"alarmClient\"),\r\n field: \"clientName\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"alarmProductCode\"),\r\n field: \"productCode\",\r\n sorting: false,\r\n },\r\n {\r\n title: getString(\"alarmProduct\"),\r\n field: \"productName\",\r\n sorting: false,\r\n },\r\n ],\r\n [getString, translator]\r\n ) as Column[];\r\n};\r\n","import { AlarmFilter } from \"../types\";\r\nimport { AlarmData, GetAlarmParams } from \"../types\";\r\nimport { User } from \"../../../auth/types\";\r\nimport { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\n\r\nexport const getAlarmsWebApi = (\r\n user: User,\r\n page: number,\r\n itemsPerPage: number,\r\n filter: AlarmFilter\r\n) => {\r\n const params: GetAlarmParams = {\r\n userid: user.userId,\r\n usrid: filter.user?.userId,\r\n clientid: filter.client?.cliId,\r\n prodid: filter.product?.prodId,\r\n fromrow: page * itemsPerPage,\r\n numofrows: itemsPerPage,\r\n active: 1\r\n };\r\n\r\n return webApiWithResponse({\r\n method: \"GET\",\r\n url: \"surveillance/getalarmdeflist\",\r\n params,\r\n });\r\n};\r\n\r\nexport default getAlarmsWebApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { loadAlarms } from \"../thunks/loadAlarms\";\r\nimport { AlarmData } from \"../types\";\r\nimport { PageData } from \"../../../models\";\r\n\r\nexport const useAlarmData = () => {\r\n const pageData = useSelector<\r\n StoreType,\r\n PageData | undefined\r\n >((s) => s.data.surveillance.alarms.currentPage);\r\n\r\n const dispatch = useDispatch();\r\n const dispatchLoadAlarmPage = React.useCallback(\r\n () => dispatch(loadAlarms()),\r\n [dispatch]\r\n );\r\n\r\n return [pageData, dispatchLoadAlarmPage] as [\r\n typeof pageData,\r\n typeof dispatchLoadAlarmPage\r\n ];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport { setAlarm, invalidateAlarm } from \"../alarmDataSlice\";\r\nimport { setAlarmIndex } from \"../alarmUXSlice\";\r\nimport { getAlarmsWebApi } from \"../api/getAlarms\";\r\nimport { PageIndex, PageDataStatus } from \"../../../models\";\r\n\r\nexport const loadAlarms = (): ThunkType => async (dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n const { pageNumber, itemsPerPage } = store.ux.surveillance.alarms.index;\r\n const { filter } = store.ux.surveillance.alarms;\r\n const user = store.data.auth.current.user;\r\n\r\n const alarmResponse = await dispatch(\r\n getAlarmsWebApi(user, pageNumber, itemsPerPage, filter)\r\n );\r\n\r\n if (!alarmResponse || alarmResponse.resCode !== \"OK\") {\r\n return;\r\n }\r\n\r\n const alarm = {\r\n currentPageData: alarmResponse.obj,\r\n totalCount: Number(alarmResponse.resDesc) || 0,\r\n status: PageDataStatus.DataCurrent,\r\n };\r\n\r\n dispatch(setAlarm(alarm));\r\n};\r\n\r\nexport const setAlarmIndexThunk = (index: PageIndex): ThunkType => (\r\n dispatch\r\n) => {\r\n dispatch(setAlarmIndex(index));\r\n dispatch(invalidateAlarm());\r\n};\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { resetAlarmIdices } from \"../alarmUXSlice\";\r\nimport { PageIndex } from \"../../../models\";\r\nimport { setAlarmIndexThunk } from \"../thunks/loadAlarms\";\r\n\r\nexport const useAlarmIndex = () => {\r\n const pageIndex = useSelector(\r\n (s) => s.ux.surveillance.alarms.index\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetIndex = React.useCallback(\r\n (index: PageIndex) => dispatch(setAlarmIndexThunk(index)),\r\n [dispatch]\r\n );\r\n const dispatchResetIndex = React.useCallback(\r\n () => dispatch(resetAlarmIdices()),\r\n [dispatch]\r\n );\r\n\r\n return [pageIndex, dispatchSetIndex, dispatchResetIndex] as [\r\n typeof pageIndex,\r\n typeof dispatchSetIndex,\r\n typeof dispatchResetIndex\r\n ];\r\n};\r\n","import { useCopiedState } from \"../../../../core/util/hooks\";\r\nimport { setFilter, removeFilter, initialState } from \"../alarmUXSlice\";\r\nimport { invalidateAlarm } from \"../alarmDataSlice\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport React from \"react\";\r\nimport { AlarmFilter } from \"../types\";\r\n\r\nexport const useAlarmFilter = () => {\r\n const [storeFilter] = useCurrentAlarmFilter();\r\n const [filter, editFilter, changeState, setCurrentFilter] = useCopiedState<\r\n AlarmFilter\r\n >(storeFilter);\r\n\r\n\r\n const dispatch = useDispatch();\r\n const dispatchSetFilter = React.useCallback(() => {\r\n dispatch(setFilter(filter!));\r\n dispatch(invalidateAlarm());\r\n }, [dispatch, filter]);\r\n\r\n const dispatchResetFilter = React.useCallback(() => {\r\n setCurrentFilter(initialState.filter);\r\n }, [setCurrentFilter]);\r\n\r\n\r\n return [filter, editFilter, dispatchSetFilter, changeState, dispatchResetFilter ] as [\r\n typeof filter,\r\n typeof editFilter,\r\n typeof dispatchSetFilter,\r\n typeof changeState,\r\n typeof dispatchResetFilter ];\r\n};\r\n\r\nexport const useCurrentAlarmFilter = () => {\r\n const filter = useSelector(\r\n (store) => store.ux.surveillance.alarms.filter\r\n );\r\n const dispatch = useDispatch();\r\n const dispatchRemoveFilter = React.useCallback(\r\n (type: keyof AlarmFilter) => {\r\n dispatch(removeFilter(type));\r\n dispatch(invalidateAlarm());\r\n },\r\n [dispatch]\r\n );\r\n\r\n return [filter, dispatchRemoveFilter ] as [\r\n typeof filter,\r\n typeof dispatchRemoveFilter,\r\n ];\r\n};\r\n","import React from \"react\";\r\nimport { Chip, Grid } from \"@material-ui/core\";\r\nimport { AlarmFilter } from \"../../../data/surveillance/alarmParameters/types\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\n\r\n\r\nexport const AlarmFilterChipsComponent: React.FunctionComponent = ({\r\n filter,\r\n removeFilter,\r\n}) => {\r\n const { getDateString, getString } = React.useContext(LocalizationContext);\r\n \r\n\r\n return (\r\n \r\n {filter.client && (\r\n \r\n removeFilter(\"client\")}\r\n />\r\n \r\n )}\r\n\r\n {filter.product && (\r\n \r\n removeFilter(\"product\")}\r\n />\r\n \r\n )}\r\n {filter.user && (\r\n \r\n removeFilter(\"user\")}\r\n />\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\ninterface AlarmsDataFilterChipsProps {\r\n filter: AlarmFilter;\r\n removeFilter: (type: keyof AlarmFilter) => void;\r\n}\r\n","import React from \"react\";\r\nimport FilterIcon from \"@material-ui/icons/FilterListOutlined\";\r\nimport { IconButton, Grid } from \"@material-ui/core\";\r\nimport { DisplayDrawerContext } from \"../../../layout/DisplayDrawerContext\";\r\nimport { useAlarmFilter, useCurrentAlarmFilter } from \"../../../data/surveillance/alarmParameters/hooks/useAlarmFilter\";\r\nimport {\r\n AlarmFilterEditor,\r\n AlarmFilterEditorType,\r\n} from \"./AlarmsFilterEditor\";\r\nimport { AlarmFilterChipsComponent } from \"./AlarmsFilterChips\";\r\nimport { CustomTooltip } from \"../../components/common/CustomTooltip\";\r\n\r\nexport const AlarmFilterButton: React.FunctionComponent = () => {\r\n const showWithDrawer = React.useContext(DisplayDrawerContext);\r\n const showFilter = React.useCallback(\r\n () => showWithDrawer(),\r\n [showWithDrawer]\r\n );\r\n\r\n\tconst [filter, removeFilter] = useCurrentAlarmFilter();\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\nconst AlarmsFilterEditor: React.FunctionComponent = () => {\r\n const [filter, editFilter, save, ,rest] = useAlarmFilter();\r\n return (\r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport {\r\n Grid,\r\n CardContent,\r\n CardHeader,\r\n Card,\r\n Divider,\r\n Fab,\r\n} from \"@material-ui/core\";\r\nimport AlarmsTable from \"./AlarmsTable\";\r\nimport AddIcon from \"@material-ui/icons/Add\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { PageComponent, AccessRights } from \"../../../core/navigation/types\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { useAlarmData } from \"../../../data/surveillance/alarmParameters/hooks/useAlarmData\";\r\nimport { useAlarmIndex } from \"../../../data/surveillance/alarmParameters/hooks/useAlarmIndex\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { getAlarmsEditLocation } from \"./Locations\";\r\nimport { PageDataStatus } from \"../../../data/models\";\r\nimport { AlarmFilterButton } from \"./AlarmsFilter\";\r\nimport { useAuth } from \"../../../data/auth/hooks\";\r\n\r\nconst AlarmsPage: PageComponent = ({ userAccessRights }) => {\r\n const pageStyles = usePageStyles();\r\n\r\n const [pageData, dispatchLoadAlarm] = useAlarmData();\r\n const [pageIndex, dispatchSetIndex] = useAlarmIndex();\r\n\r\n React.useEffect(() => {\r\n if (pageData && pageData.status === PageDataStatus.DataInvalidated) {\r\n dispatchLoadAlarm();\r\n }\r\n }, [dispatchLoadAlarm, pageData]);\r\n\r\n const history = useHistory();\r\n\r\n const [auth] = useAuth();\r\n\r\n if (auth.status !== \"successful\") {\r\n return null;\r\n }\r\n\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n }\r\n action={}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {userAccessRights === AccessRights.All && (\r\n history.push(getAlarmsEditLocation())}\r\n >\r\n \r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nexport default AlarmsPage;\r\n","import React from \"react\";\r\nimport { useDisplayAlarm } from \"./useDisplayAlarm\";\r\nimport { AlarmData } from \"../types\";\r\nimport { useCopiedState } from \"../../../../core/util/hooks\";\r\nimport { AlarmType } from \"../../../../data/models\";\r\nimport { Status } from \"../../../models\";\r\n\r\nexport const defaultAlarm: AlarmData = {\r\n userId: \"\",\r\n almType: AlarmType.Product,\r\n active: Status.Active,\r\n};\r\n\r\nexport const useEditAlarm = (almID?: string) => {\r\n const displayAlarm = useDisplayAlarm(almID);\r\n\r\n return React.useMemo(() => {\r\n if (almID !== undefined && displayAlarm === undefined) {\r\n return undefined;\r\n }\r\n\r\n if (almID === undefined) {\r\n return { ...defaultAlarm };\r\n }\r\n\r\n return displayAlarm ? { ...displayAlarm } : undefined;\r\n }, [almID, displayAlarm]);\r\n};\r\n\r\nexport const useEditAlarmState = (almID?: string) => {\r\n const alarm = useEditAlarm(almID);\r\n return useCopiedState(alarm);\r\n};\r\n","import { AlarmData, AlarmValidationState } from \"../types\";\r\nimport { createUseValidator } from \"../../../../core/util/hooks\";\r\n\r\nexport const alarmValidationState: AlarmValidationState = {\r\n almType: true,\r\n};\r\n\r\nexport const useAlarmValidator = createUseValidator<\r\nAlarmData,\r\n AlarmValidationState\r\n>(alarmValidationState);\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { ApiErrorResponse } from \"../../../../core/http/types\";\r\nimport { AlarmData } from \"../types\";\r\n\r\nexport const createAlarmApi = (\r\n\tuserId: string,\r\n\talarm: AlarmData,\r\n\tgetError: (error: ApiErrorResponse) => string\r\n) =>\r\n\twebApiWithResponse(\r\n\t\t{\r\n\t\t\tmethod: \"PUT\",\r\n\t\t\turl: \"surveillance/newalarmdef\",\r\n\t\t\tparams: {\r\n\t\t\t\tuserId,\r\n\t\t\t},\r\n\t\t\tdata: {\r\n\t\t\t\t...alarm,\r\n\t\t\t\tuserId,\r\n\t\t\t},\r\n\t\t},\r\n\t\tgetError\r\n\t);\r\n\r\nexport default createAlarmApi;\r\n","import { webApiWithResponse } from \"../../../../core/http/httpThunks\";\r\nimport { ApiErrorResponse } from \"../../../../core/http/types\";\r\nimport { AlarmData } from \"../types\";\r\n\r\nexport const updateAlarmApi = (\r\n\tuserId: string,\r\n\talarm: AlarmData,\r\n\tgetError: (error: ApiErrorResponse) => string\r\n) =>\r\n\twebApiWithResponse(\r\n\t\t{\r\n\t\t\tmethod: \"PUT\",\r\n\t\t\turl: \"surveillance/updalarmdef\",\r\n\t\t\tparams: {\r\n\t\t\t\tuserId,\r\n\t\t\t},\r\n\t\t\tdata: alarm,\r\n\t\t},\r\n\t\tgetError\r\n\t);\r\n\r\nexport default updateAlarmApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../../core/store/reducers\";\r\nimport { FetchStateType } from \"../../../models\";\r\nimport { upsertAlarm } from \"../thunks/upsertAlarm\";\r\nimport { setFetchState } from \"../alarmDataSlice\";\r\nimport { AlarmData } from \"../types\";\r\nimport { LocalizationContext } from \"../../../../core/localization/Localization\";\r\nimport { ErrorCodes } from \"../../../../core/http/types\";\r\n\r\nexport const useAlarmUpsert = () => {\r\n\tconst fetchState = useSelector(\r\n\t\tstore => store.data.surveillance.alarms.fetchState\r\n\t);\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dispatchUpsertAlarm = React.useCallback(\r\n\t\t(alarm: AlarmData) =>\r\n\t\t\tdispatch(\r\n\t\t\t\tupsertAlarm(alarm, error =>\r\n\t\t\t\t\terror.resCode === ErrorCodes.UniqueConstraint\r\n\t\t\t\t\t\t? getString(\"alarmUniqueMessage\")\r\n\t\t\t\t\t\t: error.resDesc\r\n\t\t\t\t)\r\n\t\t\t),\r\n\t\t[dispatch, getString]\r\n\t);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tdispatch(setFetchState({ type: \"not-started\" }));\r\n\t}, [dispatch]);\r\n\r\n\treturn [fetchState, dispatchUpsertAlarm] as [typeof fetchState, typeof dispatchUpsertAlarm];\r\n};\r\n","import { ThunkType } from \"../../../../core/store/reducers\";\r\nimport createAlarmApi from \"../api/createAlarm\";\r\nimport updateAlarmApi from \"../api/updateAlarm\";\r\nimport { AlarmData } from \"../types\";\r\nimport { setFetchState, invalidateAlarm } from \"../alarmDataSlice\";\r\nimport { ApiErrorResponse } from \"../../../../core/http/types\";\r\n\r\nexport const upsertAlarm = (alarm: AlarmData, getError: (error: ApiErrorResponse) => string): ThunkType => async (\r\n dispatch,\r\n getStore\r\n) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n dispatch(setFetchState({ type: \"started\" }));\r\n\r\n const { userId } = store.data.auth.current.user;\r\n const result = alarm.almId\r\n ? await dispatch(updateAlarmApi(userId, alarm, getError))\r\n : await dispatch(createAlarmApi(userId, alarm, getError));\r\n\r\n if (result && result.resCode === \"OK\") {\r\n dispatch(setFetchState({ type: \"successful\", result: result.resDesc }));\r\n dispatch(invalidateAlarm());\r\n return result.resDesc;\r\n } else {\r\n dispatch(setFetchState({ type: \"error\", errorCode: result?.resCode }));\r\n }\r\n};\r\n","import React from \"react\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { useAlarmType } from \"../../../data/surveillance/alarmParameters/hooks/useAlarmType\";\r\nimport { TextField, MenuItem } from \"@material-ui/core\";\r\nimport { AlarmType } from \"../../../data/models\";\r\n\r\ninterface AlarmTypeSelectProps {\r\n\talarmType: AlarmType;\r\n\thandleChange: (event: React.ChangeEvent) => void;\r\n}\r\n\r\n\r\nexport const AlarmTypeSelect: React.FunctionComponent = ({\r\n\talarmType,\r\n\thandleChange,\r\n}) => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n const options = useAlarmType();\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t{options.map(option => (\r\n\t\t\t\t\r\n\t\t\t\t\t{option.label}\r\n\t\t\t\t\r\n\t\t\t))}\r\n\t\t\r\n\t);\r\n};\r\n","import { NavigationItem } from \"../../../core/navigation/types\";\r\nimport AlarmsPage from \"./AlarmsPage\";\r\nimport { EditAlarmsPage } from \"./EditAlarmsPage\";\r\nimport { alarmsLocation, editRouter } from \"./Locations\";\r\nexport const alarmsComponents: NavigationItem[] = [\r\n {\r\n Component: AlarmsPage,\r\n isMenuItem: true,\r\n path: alarmsLocation,\r\n },\r\n {\r\n Component: EditAlarmsPage,\r\n isMenuItem: false,\r\n path: editRouter,\r\n },\r\n];\r\n","import React from \"react\";\r\nimport { useEditAlarmState } from \"../../../data/surveillance/alarmParameters/hooks/useEditAlarmState\";\r\nimport { useAlarmValidator } from \"../../../data/surveillance/alarmParameters/hooks/useAlarmValidator\";\r\nimport { useAlarmUpsert } from \"../../../data/surveillance/alarmParameters/hooks/useAlarmUpsert\";\r\nimport { RouteComponentProps, useHistory } from \"react-router-dom\";\r\nimport { usePageStyles } from \"../../pageStyles\";\r\nimport { LocalizationContext } from \"../../../core/localization/Localization\";\r\nimport { Card, Grid, CardHeader, Divider, CardContent } from \"@material-ui/core\";\r\nimport { FabSave } from \"../../components/common/FabSave\";\r\nimport { LeavePrompt } from \"../../components/common/LeavePrompt\";\r\nimport { AlarmType } from \"../../../data/models\";\r\nimport { alarmsLocation } from \"./Locations\";\r\nimport { PageTitle } from \"../../components/common/PageTitle\";\r\nimport { ClientSelect } from \"../../components/listing/ClientSelect\";\r\nimport { ProductSelect } from \"../../components/listing/ProductSelect\";\r\nimport { AlarmTypeSelect } from \"./AlarmTypeSelect\";\r\n\r\nexport interface EditAlarmyInfo {\r\n\talmId?: string;\r\n}\r\n\r\nexport interface EditAlarmProps extends RouteComponentProps {}\r\n\r\nexport const EditAlarmsPage: React.FunctionComponent = props => {\r\n\tconst { getString } = React.useContext(LocalizationContext);\r\n\tconst pageStyles = usePageStyles();\r\n\r\n\tconst [alarm, editAlarm, changed] = useEditAlarmState(props.match.params.almId);\r\n\tconst [validationState, validate] = useAlarmValidator();\r\n\tconst [fetchState, upsert] = useAlarmUpsert();\r\n\tconst history = useHistory();\r\n\r\n\tconst unsavedChanges = fetchState.type === \"not-started\" && changed;\r\n\r\n\tconst handleChange = React.useCallback(\r\n\t\t(event: React.ChangeEvent) => {\r\n\t\t\teditAlarm(event.target.name as any, event.target.value);\r\n\t\t},\r\n\t\t[editAlarm]\r\n\t);\r\n\r\n\tconst save = React.useCallback(() => {\r\n\t\tif (fetchState.type === \"successful\") {\r\n\t\t\thistory.push(alarmsLocation);\r\n\t\t} else if (fetchState.type !== \"started\") {\r\n\t\t\tconst normalized = validate(alarm);\r\n\r\n\t\t\tif (normalized) {\r\n\t\t\t\tupsert(normalized);\r\n\t\t\t}\r\n\t\t}\r\n\t}, [alarm, validate, fetchState, history, upsert]);\r\n\r\n\tconst pageTitle = alarm && alarm.almId ? \"alarmEdit\" : \"alarmCreate\";\r\n\r\n\tif (!alarm) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\treturn (\r\n\t\t\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\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\r\n\t\t\t\t\t\t\t{(alarm.almType === AlarmType.Client ||\r\n\t\t\t\t\t\t\t\talarm.almType === AlarmType.ProductClient) && (\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t client.cliId === alarm.clientId}\r\n\t\t\t\t\t\t\t\t\t\tonChangeItem={client =>\r\n\t\t\t\t\t\t\t\t\t\t\teditAlarm(\"clientId\", client ? client.cliId : undefined)\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\trequired={validationState.clientId !== undefined}\r\n\t\t\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\t\t\tvalidationState.clientId !== undefined &&\r\n\t\t\t\t\t\t\t\t\t\t\t!validationState.clientId\r\n\t\t\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\r\n\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t{(alarm.almType === AlarmType.Product ||\r\n\t\t\t\t\t\t\t\talarm.almType === AlarmType.ProductClient) && (\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t prod.prodId === alarm.productId}\r\n\t\t\t\t\t\t\t\t\t\tonChangeItem={prod => {\r\n\t\t\t\t\t\t\t\t\t\t\teditAlarm(\"productId\", prod ? prod.prodId : undefined);\r\n\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\trequired={validationState.productId !== undefined}\r\n\t\t\t\t\t\t\t\t\t\terror={\r\n\t\t\t\t\t\t\t\t\t\t\tvalidationState.productId !== undefined &&\r\n\t\t\t\t\t\t\t\t\t\t\t!validationState.productId\r\n\t\t\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\r\n\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\r\n\r\n\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\t);\r\n};\r\n","import { alarmsComponents } from \"./alarmParameters/navigationComponents\";\r\n\r\nexport const surveillanceComponents = [\r\n\t...alarmsComponents,\r\n];\r\n","import { listingComponents } from \"../listing/listingNavigationItems\";\r\nimport { tradingComponents } from \"../trading/tradingNavigationItems\";\r\nimport { clearingComponents } from \"../clearing/clearingNavigationItems\";\r\nimport { reportsComponents } from \"../reports/reportsNavigationItems\";\r\nimport { accountingComponents } from \"../accounting/accountingNavigationItems\";\r\nimport { surveillanceComponents } from \"../surveillance/surveillanceNavigationItems\";\r\n\r\n\r\nexport const appComponents = [\r\n ...listingComponents,\r\n ...tradingComponents,\r\n ...clearingComponents,\r\n ...reportsComponents,\r\n ...accountingComponents,\r\n ...surveillanceComponents,\r\n]","import { useSelector } from \"react-redux\";\r\nimport { StoreType } from \"../../../core/store/reducers\";\r\nimport { UserMenuItem } from \"../../models\";\r\n\r\nexport const useUserMenuItems = () => {\r\n\tconst menuItems = useSelector(store => store.data.initialData.userMenu);\r\n\r\n\treturn [menuItems] as [typeof menuItems];\r\n};\r\n","import React from \"react\";\r\nimport { PageComponent } from \"../../core/navigation/types\";\r\n\r\nexport const UnderConstruction: PageComponent = ({ userAccessRights }) => {\r\n\treturn (\r\n\t\t<>\r\n\t\t\t
{`Under construction`}
\r\n\t\t\t
{`User access rights: ${userAccessRights}`}
\r\n\t\t\r\n\t);\r\n};\r\n","import React from \"react\"\r\nimport AccountingIcon from \"@material-ui/icons/AssignmentOutlined\";\r\nimport CliringIcon from \"@material-ui/icons/AccountBalanceOutlined\";\r\nimport BusinessIcon from \"@material-ui/icons/BusinessOutlined\";\r\nimport ReportIcon from \"@material-ui/icons/AssessmentOutlined\";\r\nimport SurveillanceIcon from \"@material-ui/icons/DvrOutlined\";\r\nimport DashboardIcon from \"@material-ui/icons/DashboardOutlined\";\r\nimport Notifications from '@material-ui/icons/NotificationsActiveOutlined';\r\n\r\nexport type IconDictionary = {\r\n [k: string]: React.FunctionComponent\r\n}\r\n\r\nexport const iconDictionary: IconDictionary = {\r\n \"00000001\": BusinessIcon,\r\n \"00000002\": DashboardIcon,\r\n \"00000003\": CliringIcon,\r\n \"00000004\": SurveillanceIcon,\r\n \"00000005\": ReportIcon,\r\n \"00000006\": AccountingIcon,\r\n \"00000007\": Notifications,\r\n}","import { appComponents } from \"../appNavigationItems\";\r\nimport React from \"react\";\r\nimport { MenuItemType, SubmenuMenuItemType, LinkMenuItemType } from \"../../../core/navigation/types\";\r\nimport { useUserMenuItems } from \"../../../data/initialData/hooks/useUserMenuItems\";\r\nimport { UnderConstruction } from \"../../underConstruction/UnderConstruction\";\r\nimport { iconDictionary } from \"../menuIcons\";\r\nimport { AuthorizationState } from \"../../../data/auth/types\";\r\n\r\nexport const useNavigationItems = (onMenu?: boolean) =>\r\n\tReact.useMemo(() => [...appComponents.filter(c => onMenu === undefined || c.isMenuItem === onMenu)], [\r\n\t\tonMenu,\r\n\t]);\r\n\r\nexport const useMenuItems = (): MenuItemType[] => {\r\n\tconst [userMenuItems] = useUserMenuItems();\r\n\tconst navigationItems = useNavigationItems(true);\r\n\r\n\tconst sortedUserItems = React.useMemo(() => {\r\n\t\tconst sorted = [...userMenuItems];\r\n\t\tsorted.sort((a, b) => a.level - b.level);\r\n\t\treturn sorted;\r\n\t}, [userMenuItems]);\r\n\r\n\treturn React.useMemo(\r\n\t\t() =>\r\n\t\t\tsortedUserItems.reduce((acc, item) => {\r\n\t\t\t\tconst menuItem: MenuItemType = {\r\n\t\t\t\t\tkey: item.miId,\r\n\t\t\t\t\ttitle: item.miName,\r\n\t\t\t\t\taccessRights: item.readOnly,\r\n\t\t\t\t\tpath: item.path,\r\n\t\t\t\t\tComponent:\r\n\t\t\t\t\t\tnavigationItems.find(i => i.path === item.path)?.Component || UnderConstruction,\r\n\t\t\t\t\titems: [],\r\n\t\t\t\t\ttype: item.path ? \"Link\" : \"Menu\",\r\n\t\t\t\t\ticon: iconDictionary[item.miId],\r\n\t\t\t\t};\r\n\r\n\t\t\t\tconst parrent = findMenuItem(acc, i => i.key === item.parentId);\r\n\t\t\t\tif (parrent && parrent.type === \"Menu\") {\r\n\t\t\t\t\tparrent.items.push(menuItem);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tacc.push(menuItem);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn acc;\r\n\t\t\t}, []),\r\n\t\t[sortedUserItems, navigationItems]\r\n\t);\r\n};\r\n\r\nexport const useLinkMenuItems = (): LinkMenuItemType[] => {\r\n\tconst menuItems = useMenuItems();\r\n\treturn React.useMemo(() => filterdMenuItem(menuItems, item => item.type === \"Link\"), [\r\n\t\tmenuItems,\r\n\t]) as LinkMenuItemType[];\r\n};\r\n\r\nconst findMenuItem = (\r\n\titems: MenuItemType[],\r\n\tpredicate: (item: MenuItemType) => boolean\r\n): MenuItemType | undefined => {\r\n\tconst submenues = items.filter(i => i.type === \"Menu\") as SubmenuMenuItemType[];\r\n\tlet found = submenues.find(predicate) as MenuItemType | undefined;\r\n\r\n\tif (found !== undefined) {\r\n\t\treturn found;\r\n\t}\r\n\r\n\tfor (let submenu of submenues) {\r\n\t\tfound = findMenuItem(submenu.items, predicate);\r\n\t\tif (found) {\r\n\t\t\treturn found;\r\n\t\t}\r\n\t}\r\n\r\n\treturn undefined;\r\n};\r\n\r\nconst filterdMenuItem = (\r\n\titems: MenuItemType[],\r\n\tpredicate: (item: MenuItemType) => boolean,\r\n\tstart: MenuItemType[] = []\r\n) => {\r\n\tlet result = start.concat(items.filter(predicate));\r\n\tconst submenues = items.filter(i => i.type === \"Menu\") as SubmenuMenuItemType[];\r\n\r\n\tfor (let submenu of submenues) {\r\n\t\tresult = filterdMenuItem(submenu.items, predicate, result);\r\n\t}\r\n\r\n\treturn result;\r\n};\r\n\r\nexport const useShouldConnectNotifications = () => {\r\n\tconst navigationItems = useNavigationItems();\r\n\tconst notificationItems = React.useMemo(() => navigationItems.filter(n => n.notifications), [\r\n\t\tnavigationItems,\r\n\t]);\r\n\tconst [menuItems] = useUserMenuItems();\r\n\treturn React.useMemo(() => menuItems.some(mi => notificationItems.some(n => n.path === mi.path)), [\r\n\t\tmenuItems,\r\n\t\tnotificationItems,\r\n\t]);\r\n};\r\n","import React from \"react\";\r\nimport { MenuList } from \"../core/navigation/MenuItemComponents\";\r\nimport { useMenuItems } from \"../views/navigation/hooks/useNavigationItems\";\r\n\r\nexport const NavList: React.FunctionComponent = () => {\r\n const menuItems = useMenuItems();\r\n return (\r\n
\r\n \r\n
\r\n );\r\n};\r\n","import { makeStyles, Theme, createStyles } from \"@material-ui/core\";\r\n\r\nexport const useNavDrawerStyles = makeStyles((theme: Theme) => {\r\n\tconst { permanentBreakpoint, fullWidth } = theme.navDrawer;\r\n\r\n\treturn createStyles({\r\n\t\tdrawer: {\r\n\t\t\t[permanentBreakpoint]: {\r\n\t\t\t\t// width: hiddenWidth,\r\n\t\t\t\t// \"&:hover\": {\r\n\t\t\t\t// \twidth: fullWidth,\r\n\t\t\t\t// \ttransition: theme.transitions.create(\"width\", {\r\n\t\t\t\t// \t\teasing: theme.transitions.easing.sharp,\r\n\t\t\t\t// \t\tduration: theme.transitions.duration.enteringScreen,\r\n\t\t\t\t// \t}),\r\n\t\t\t\t// },\r\n\t\t\t\t// \"&:not(:hover)\": {\r\n\t\t\t\t// \ttransition: theme.transitions.create(\"width\", {\r\n\t\t\t\t// \t\teasing: theme.transitions.easing.sharp,\r\n\t\t\t\t// \t\tduration: theme.transitions.duration.leavingScreen,\r\n\t\t\t\t// \t}),\r\n\t\t\t\t// },\r\n\t\t\t\twidth: fullWidth,\r\n\r\n\t\t\t\tflexShrink: 0,\r\n\t\t\t\toverflowX: \"hidden\",\r\n\t\t\t\t// \"& + main\": {\r\n\t\t\t\t// \twidth: `calc(100% - ${hiddenWidth}px)`,\r\n\t\t\t\t// \ttransition: theme.transitions.create(\"width\", {\r\n\t\t\t\t// \t\teasing: theme.transitions.easing.sharp,\r\n\t\t\t\t// \t\tduration: theme.transitions.duration.leavingScreen,\r\n\t\t\t\t// \t}),\r\n\t\t\t\t// },\r\n\t\t\t\t// \"&:hover + main\": {\r\n\t\t\t\t// \twidth: `calc(100% - ${fullWidth}px)`,\r\n\t\t\t\t// \ttransition: theme.transitions.create(\"width\", {\r\n\t\t\t\t// \t\teasing: theme.transitions.easing.sharp,\r\n\t\t\t\t// \t\tduration: theme.transitions.duration.enteringScreen,\r\n\t\t\t\t// \t}),\r\n\t\t\t\t// },\r\n\t\t\t\t// \"&:not(:hover) .MuiCollapse-container\": {\r\n\t\t\t\t// \tdisplay: \"none\",\r\n\t\t\t\t// }\r\n\t\t\t\t\"& + main\": {\r\n\t\t\t\t\twidth: `calc(100% - ${fullWidth}px)`,\r\n\t\t\t\t},\r\n\t\t\t},\r\n\t\t},\r\n\t\tdrawerPaper: {\r\n\t\t\twidth: fullWidth,\r\n\t\t\t// \"&:hover\": {\r\n\t\t\t// \twidth: fullWidth,\r\n\t\t\t// \ttransition: theme.transitions.create(\"width\", {\r\n\t\t\t// \t\teasing: theme.transitions.easing.sharp,\r\n\t\t\t// \t\tduration: theme.transitions.duration.enteringScreen,\r\n\t\t\t// \t}),\r\n\t\t\t// },\r\n\t\t\t// \"&:not(:hover)\": {\r\n\t\t\t// \ttransition: theme.transitions.create(\"width\", {\r\n\t\t\t// \t\teasing: theme.transitions.easing.sharp,\r\n\t\t\t// \t\tduration: theme.transitions.duration.leavingScreen,\r\n\t\t\t// \t}),\r\n\t\t\t// },\r\n\t\t\t// [permanentBreakpoint]: {\r\n\t\t\t// \twidth: hiddenWidth,\r\n\t\t\t// },\r\n\t\t\toverflowX: \"hidden\",\r\n\t\t},\r\n\t\tmenuItem: {\r\n\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\tpaddingLeft: theme.spacing(2),\r\n\t\t},\r\n\t\tnestedMenuItem: {\r\n\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\tpaddingLeft: theme.spacing(4),\r\n\t\t},\r\n\t\tnestedMenuItem2: {\r\n\t\t\twhiteSpace: \"nowrap\",\r\n\t\t\tpaddingLeft: theme.spacing(6),\r\n\t\t},\r\n\t});\r\n});\r\n","import React from \"react\";\r\nimport { Drawer, useTheme, useMediaQuery } from \"@material-ui/core\";\r\nimport { NavList } from \"./NavList\";\r\nimport { useNavDrawerStyles } from \"./NavDrawerStyles\";\r\n\r\ninterface NavDrawerProps {\r\n open: boolean;\r\n toggleOpen: () => void;\r\n setToogle: (flag: boolean) => void;\r\n}\r\n\r\nexport const NavDrawer: React.FunctionComponent = (props) => {\r\n const { open, toggleOpen, setToogle } = props;\r\n const styles = useNavDrawerStyles();\r\n const theme = useTheme();\r\n const permanentDrawer = useMediaQuery(theme.navDrawer.permanentBreakpoint);\r\n\r\n window.addEventListener(\"popstate\", function (event) {\r\n setToogle(false);\r\n return true;\r\n });\r\n\r\n return (\r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport { createMuiTheme, ThemeProvider } from \"@material-ui/core\";\r\n\r\ndeclare module \"@material-ui/core/styles/createMuiTheme\" {\r\n\tinterface Theme {\r\n\t\tnavDrawer: {\r\n\t\t\tfullWidth: number;\r\n\t\t\thiddenWidth: number;\r\n\t\t\tpermanentBreakpoint: string;\r\n\t\t};\r\n\t}\r\n\tinterface ThemeOptions {\r\n\t\tnavDrawer?: {\r\n\t\t\tfullWidth: number;\r\n\t\t};\r\n\t}\r\n}\r\n\r\nconst theme = createMuiTheme({\r\n\tpalette: {\r\n\t\tprimary: {\r\n\t\t\tmain: \"#0091d1\",\r\n\t\t},\r\n\t\tsecondary: {\r\n\t\t\tmain: \"#f58345\",\r\n\t\t},\r\n\t\taction:{\r\n\t\t\thover: \"#0091d1\",\r\n\t\t},\r\n\t\tbackground:{\r\n\t\t\tdefault:\"#0091d1\"\r\n\t\t},\r\n\t},\r\n\tnavDrawer: {\r\n\t\tfullWidth: 240,\r\n\t},\r\n});\r\n\r\nexport const ThemeComponent: React.FunctionComponent = props => {\r\n\ttheme.navDrawer.permanentBreakpoint = theme.breakpoints.up(\"md\");\r\n\ttheme.navDrawer.hiddenWidth = theme.spacing(7);\r\n\r\n\treturn {props.children};\r\n};\r\n","import React from \"react\";\r\nimport { DisplayDrawerContext } from \"./DisplayDrawerContext\";\r\nimport { Drawer } from \"@material-ui/core\";\r\nimport { Theme, makeStyles, createStyles } from \"@material-ui/core\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport CloseIcon from \"@material-ui/icons/CloseOutlined\";\r\n\r\nexport const useDisplayDrawerStyles = makeStyles((theme: Theme) => {\r\n return createStyles({\r\n drawerPaper: {\r\n //\t\t\twidth: \"40vw\",\r\n width: \"100vw\",\r\n [theme.breakpoints.only(\"sm\")]: {\r\n width: \"60vw\",\r\n },\r\n [theme.breakpoints.up(\"sm\")]: {\r\n width: \"50vw\",\r\n },\r\n [theme.breakpoints.up(\"lg\")]: {\r\n width: \"30vw\",\r\n },\r\n paddingTop: \"40px\",\r\n paddingLeft: \"10px\",\r\n paddingRight: \"10px\",\r\n paddingBottom: \"10px\",\r\n overflowX: \"hidden\",\r\n // display: \"flex\",\r\n // flexDirection: \"column\",\r\n // justifyContent: \"center\",\r\n },\r\n header: {\r\n display: \"flex\",\r\n justifyContent: \"flex-end\",\r\n //padding: \"10px\",\r\n position: \"fixed\",\r\n top: \"5px\",\r\n right: \"10px\",\r\n },\r\n closeButton: {\r\n padding: \"5px\",\r\n },\r\n closeIcon: {\r\n height: \"1.2rem\",\r\n width: \"1.2rem\",\r\n },\r\n });\r\n});\r\n\r\nexport const DisplayDrawer: React.FunctionComponent = ({ children }) => {\r\n const [displayContent, setDisplayContext] = React.useState<\r\n React.ReactNode | undefined\r\n >();\r\n const styles = useDisplayDrawerStyles();\r\n const close = React.useCallback(\r\n () => setDisplayContext(undefined),\r\n [setDisplayContext]\r\n );\r\n\r\n return (\r\n \r\n {children}\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n {displayContent}\r\n \r\n
\r\n );\r\n};\r\n","import React from \"react\";\r\nimport {\r\n CssBaseline,\r\n makeStyles,\r\n createStyles,\r\n Theme,\r\n} from \"@material-ui/core\";\r\nimport { useToggleState } from \"../core/util/hooks\";\r\nimport { MainBar } from \"./MainBar\";\r\nimport { NavDrawer } from \"./NavDrawer\";\r\nimport { ThemeComponent } from \"./Theme\";\r\nimport { DisplayDrawer } from \"./DisplayDrawer\";\r\n\r\nconst useStyles = makeStyles((theme: Theme) => {\r\n return createStyles({\r\n root: {\r\n display: \"flex\",\r\n },\r\n mainContent: {\r\n width: \"100%\",\r\n },\r\n });\r\n});\r\n\r\nexport const ContentLayout: React.FunctionComponent = (props) => {\r\n const styles = useStyles();\r\n const [drawerOpen, toggleDrawerOpen, setToogleDrawer] = useToggleState(false);\r\n\r\n return (\r\n <>\r\n \r\n \r\n
\r\n \r\n \r\n
{props.children}
\r\n
\r\n
\r\n \r\n );\r\n};\r\n\r\nconst ThemedContentLayout: React.FunctionComponent = (props) => (\r\n \r\n {props.children}\r\n \r\n);\r\n\r\nexport default ThemedContentLayout;\r\n","import { makeStyles, Theme, createStyles } from \"@material-ui/core\";\r\nexport const useLoginStyles = makeStyles((theme: Theme) => {\r\n\t\r\n\treturn createStyles({\r\n\t\tloginDrawerPaper: {\r\n\t\t\twidth: \"100%\",\r\n\t\t\t[theme.breakpoints.only(\"xs\")]: {\r\n\t\t\t\twidth: \"100vw\",\r\n\t\t\t\theight: \"100vh\",\r\n\t\t\t},\r\n\t\t\t[theme.breakpoints.only(\"sm\")]: {\r\n\t\t\t\twidth: \"60vw\",\r\n\t\t\t},\r\n\t\t\t[theme.breakpoints.up(\"sm\")]: {\r\n\t\t\t\twidth: \"50vw\",\r\n\t\t\t},\r\n\t\t\t[theme.breakpoints.up(\"lg\")]: {\r\n\t\t\t\twidth: \"30vw\",\r\n\t\t\t},\r\n\t\t},\r\n\r\n\t\twraper: {\r\n\t\t\tbackgroundImage: `url(./login-register.jpg)`,\r\n\t\t\theight: \"100vh\",\r\n\t\t\toverflow: \"hidden\",\r\n\t\t},\r\n\t\tformWrpaer: {\r\n\t\t\theight: \"100%\",\r\n\t\t},\r\n\t\tformItem: {\r\n\t\t\t\"&:not(:first-child)\": {\r\n\t\t\t\tmarginTop: theme.spacing(2),\r\n\t\t\t},\r\n\t\t\twidth: \"60%\",\r\n\t\t\tdisplay: \"flex\",\r\n\t\t\tjustifyContent: \"center\",\r\n\t\t\talignItems: \"center\",\r\n\t\t},\r\n\t\ttextField: {\r\n\t\t\twidth: \"100%\",\r\n\t\t},\r\n\t\tformContainer: {\r\n\t\t\theight: \"100%\",\r\n\t\t\tpadding: \"20px\",\r\n\t\t},\r\n\t\tlocaleSelection: {\r\n\t\t\twidth: \"60%\",\r\n\t\t\tdisplay: \"flex\",\r\n\t\t\tjustifyContent: \"flex-end\",\r\n\t\t\talignItems: \"center\",\r\n\t\t},\r\n\t\talert: {\r\n\t\t\tposition: \"absolute\",\r\n\t\t\ttop: theme.spacing(2),\r\n\t\t\twidth: \"100%\",\r\n\t\t},\r\n\t\tfooter: {\r\n\t\t\tposition: \"absolute\",\r\n\t\t\tbottom: theme.spacing(2),\r\n\t\t\twidth: \"100%\",\r\n\t },\r\n\t});\r\n});\r\n","import React from \"react\";\r\nimport { AuthorizationState } from \"../../data/auth/types\";\r\nimport { LocalizationContext } from \"../../core/localization/Localization\";\r\nimport { Alert } from \"@material-ui/lab\";\r\n\r\nexport interface LoginErrorProps {\r\n\tauth: AuthorizationState;\r\n\tclassName?: string;\r\n}\r\n\r\nexport const LoginError: React.FunctionComponent = ({ auth, className }) => {\r\n const { getErrorString } = React.useContext(LocalizationContext);\r\n\r\n\tif (auth.status !== \"failed\") {\r\n\t\treturn null;\r\n\t}\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t{getErrorString(auth.error)}\r\n\t\t\r\n\t);\r\n};\r\n","import React, { useState, useContext, useEffect } from \"react\";\r\nimport { useLocalizationStore } from \"../../data/localization/hooks\";\r\nimport { useAuth, useLastLoginUsername } from \"../../data/auth/hooks\";\r\nimport { LocalizationContext } from \"../../core/localization/Localization\";\r\nimport { LocalizationLanguage } from \"../../core/localization/types\";\r\nimport { TextField, Grid, Button } from \"@material-ui/core\";\r\nimport { ToggleButtonGroup, ToggleButton } from \"@material-ui/lab\";\r\nimport { useLoginStyles } from \"./useLoginStyles\";\r\nimport { LoginError } from \"./LoginError\";\r\nimport useMediaQuery from \"@material-ui/core/useMediaQuery\";\r\nimport { useTheme } from \"@material-ui/core/styles\";\r\nimport FormControlLabel from \"@material-ui/core/FormControlLabel\";\r\nimport Checkbox from \"@material-ui/core/Checkbox\";\r\n\r\nconst handleTBChange =\r\n (setter: (value: string) => void) =>\r\n (event: React.ChangeEvent) =>\r\n setter(event.target.value);\r\n\r\nconst onEnter =\r\n (action: () => void) => (e: React.KeyboardEvent) =>\r\n e.key === \"Enter\" && action();\r\n\r\n\r\nexport const LoginForm: React.FunctionComponent = (props) => {\r\n const styles = useLoginStyles();\r\n const { getString } = useContext(LocalizationContext);\r\n // const lastUsername = useLastLoginUsername();\r\n const [local, setLocal] = useLocalizationStore();\r\n const [username, setUsername] = useState(\"\");\r\n const [password, setPassword] = useState(\"\");\r\n const [authState, sendLogin] = useAuth();\r\n const [checked, setChecked] = useState(false);\r\n\r\n const handleChangeChk = (event: any) => {\r\n setChecked(event.target.checked);\r\n };\r\n\r\n const remembered = localStorage.getItem(\"username\") // da li ima zapamćen username\r\n const upis = remembered !== null && remembered !== undefined && remembered.length > 0 ? 1 : 0;\r\n\r\n const theme = useTheme();\r\n const source = useMediaQuery(theme.breakpoints.only(\"xs\")) ? \"M\" : \"\";\r\n const screenExtraSmall = useMediaQuery(theme.breakpoints.only('xs'));\r\n\r\n const loading = authState.status === \"pending\";\r\n const error = authState.status === \"failed\";\r\n\r\n const login = () => {\r\n if (upis === 0 && checked === true) {\r\n localStorage.setItem(\"username\", username);\r\n localStorage.setItem(\"password\", password);\r\n } // ne postoji upisan username u lokalnoj memoriji i hoćemo za da zapamtimo\r\n\r\n if (upis === 1 && checked === true) {\r\n delete localStorage.username;\r\n delete localStorage.password;\r\n } // postoji upisan username u lokalnoj memoriji i hoćemo da obrišemo\r\n\r\n sendLogin(username, password, local, source);\r\n };\r\n\r\n //\tconst donations = require(`url(/donation.jpg)`)\r\n\r\n\r\n useEffect(() => {\r\n const cookieUsername = localStorage.getItem(\"username\");\r\n const cookiePassword = localStorage.getItem(\"password\");\r\n\r\n if (\r\n cookieUsername !== null &&\r\n cookieUsername !== undefined &&\r\n cookieUsername.length > 0\r\n ) {\r\n setUsername(cookieUsername);\r\n console.log(\"USLO1\");\r\n }\r\n\r\n if (\r\n cookiePassword !== null &&\r\n cookiePassword !== undefined &&\r\n cookiePassword.length > 0\r\n ) {\r\n setPassword(cookiePassword);\r\n console.log(\"USLO2\");\r\n }\r\n console.log(cookieUsername)\r\n console.log(cookiePassword)\r\n\r\n }, []);\r\n\r\n return (\r\n \r\n \r\n setLocal(v)}\r\n size=\"small\"\r\n >\r\n EN\r\n SR\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {/*screenExtraSmall && (}\r\n label={upis === 1 ? getString(\"loginForget\") : getString(\"loginRemember\")}\r\n />)*/}\r\n\r\n }\r\n label={upis === 1 ? getString(\"loginForget\") : getString(\"loginRemember\")}\r\n />\r\n\r\n \r\n \r\n {getString(\"login\")}\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport { CssBaseline, Paper, Grid, Typography, Hidden } from \"@material-ui/core\";\r\nimport { LoginForm } from \"./LoginForm\";\r\nimport { useLoginStyles } from \"./useLoginStyles\";\r\nimport { useHistory } from 'react-router-dom';\r\n\r\nconst donations = require(\"'../../../public/donation2.png\");\r\nconst logo = require(\"'../../../public/NSCOMEX-LOGO-front.png\");\r\n\r\nexport const LoginPage: React.FunctionComponent = () => {\r\n\r\n\tconst styles = useLoginStyles();\r\n\r\n\tconst history = useHistory();\r\n\r\n\tReact.useEffect(() => {\r\n\t\thistory.push('/')\r\n\t}, []);\r\n\t\r\n\treturn (\r\n\t\t<>\r\n\t\t\t\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\t\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\"Error\"\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\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\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\t\t\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\tFunded by:{\" \"}\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\"Error\"\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\tWe are grateful to KfW and BFC for providing financial and technical support.{\" \"}\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\t);\r\n};\r\n","import React from \"react\";\r\nimport { Switch, Route, useHistory } from \"react-router-dom\";\r\nimport {\r\n useNavigationItems,\r\n useLinkMenuItems,\r\n} from \"./hooks/useNavigationItems\";\r\nimport MainBoard from \"../trading/mainBoard/MainBoard\"\r\nimport MainBoardM from \"../trading/mainpanelm/MainBoard\"\r\nimport { useAuth } from \"../../data/auth/hooks\";\r\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\r\nimport { useTheme } from '@material-ui/core/styles';\r\n\r\nexport const PageRouterSwitch = () => {\r\n const linkMenuItems = useLinkMenuItems();\r\n const editComponents = useNavigationItems(false);\r\n const [auth] = useAuth();\r\n\r\n const theme = useTheme();\r\n\tconst source = useMediaQuery(theme.breakpoints.only('xs')) ? \"M\" : \"\";\r\n\r\n if (auth.status !== \"successful\") {\r\n\t\treturn null;\r\n\t}\r\n\r\n\r\n return (\r\n \r\n {editComponents.map((Item) => (\r\n \r\n ))}\r\n {linkMenuItems.map((Link) => (\r\n \r\n \r\n \r\n ))}\r\n {(auth.user.roleCode === \"MEMTRADER\" || auth.user.roleCode === \"MEMMANAGER\" || auth.user.roleCode === \"MEMCONTACT\" ) && source!==\"M\" && (\r\n \r\n )}\r\n {(auth.user.roleCode === \"MEMTRADER\" || auth.user.roleCode === \"MEMMANAGER\" || auth.user.roleCode === \"MEMCONTACT\" ) && source===\"M\" && (\r\n \r\n )}\r\n\r\n \r\n );\r\n};\r\n","import React, { useState } from \"react\";\r\nimport { makeStyles } from \"@material-ui/core/styles\";\r\nimport { useSnackbar } from \"notistack\";\r\nimport Collapse from \"@material-ui/core/Collapse\";\r\nimport Paper from \"@material-ui/core/Paper\";\r\nimport Typography from \"@material-ui/core/Typography\";\r\nimport Card from \"@material-ui/core/Card\";\r\nimport CardActions from \"@material-ui/core/CardActions\";\r\nimport IconButton from \"@material-ui/core/IconButton\";\r\nimport CloseIcon from \"@material-ui/icons/Close\";\r\nimport ExpandMoreIcon from \"@material-ui/icons/ExpandMore\";\r\nimport { SnackbarContent } from \"@material-ui/core\";\r\nimport { useSnackbarMessage } from \"../../data/snackbar/hooks/useSnackbarMessage\";\r\nimport { NotificationManager } from \"../../core/notifications/NotificationsManager\";\r\n\r\nconst useStyles = makeStyles(theme => ({\r\n\troot: {\r\n\t\t[theme.breakpoints.up(\"sm\")]: {\r\n\t\t\tminWidth: \"344px !important\",\r\n\t\t},\r\n\t\twidth: \"100%\",\r\n\t},\r\n\twarning: {\r\n\t\tbackgroundColor: theme.palette.warning.light,\r\n\t},\r\n\tinfo: {\r\n\t\tbackgroundColor: theme.palette.success.light,\r\n\t},\r\n\terror: {\r\n\t\tbackgroundColor: theme.palette.error.main,\r\n\t},\r\n\ttypography: {\r\n\t\tfontWeight: \"bold\",\r\n\t},\r\n\tactionRoot: {\r\n\t\tpadding: \"8px 8px 8px 16px\",\r\n\t\tjustifyContent: \"space-between\",\r\n\t},\r\n\ticons: {\r\n\t\tmarginLeft: \"auto\",\r\n\t},\r\n\texpand: {\r\n\t\tpadding: \"8px 8px\",\r\n\t\ttransform: \"rotate(0deg)\",\r\n\t\ttransition: theme.transitions.create(\"transform\", {\r\n\t\t\tduration: theme.transitions.duration.shortest,\r\n\t\t}),\r\n\t},\r\n\texpandOpen: {\r\n\t\ttransform: \"rotate(180deg)\",\r\n\t},\r\n\tcollapse: {\r\n\t\tpadding: 16,\r\n\t},\r\n\tcheckIcon: {\r\n\t\tfontSize: 20,\r\n\t\tcolor: \"#b3b3b3\",\r\n\t\tpaddingRight: 4,\r\n\t},\r\n\tbutton: {\r\n\t\tpadding: 0,\r\n\t\ttextTransform: \"none\",\r\n\t},\r\n\tbackground: {\r\n\t\tpadding: 0,\r\n\t},\r\n\tmessage: {\r\n\t\twidth: \"100%\",\r\n\t\tpadding: 0,\r\n\t},\r\n}));\r\n\r\nexport const CollapsableMessage = React.forwardRef((props: any, ref) => {\r\n\tconst classes = useStyles();\r\n\tconst { closeSnackbar } = useSnackbar();\r\n\tconst [expanded, setExpanded] = useState(false);\r\n\tconst [snackbarMessage, dismiss, setShoenId] = useSnackbarMessage(props.message);\r\n\r\n\tReact.useEffect(() => {\r\n\t\tsetShoenId(props.id);\r\n\t\tif (NotificationManager.permission === \"granted\" && snackbarMessage) {\r\n\t\t\t// new Notification(snackbarMessage.title, {\r\n\t\t\t// \ticon: process.env.PUBLIC_URL + \"favicon.ico\",\r\n\t\t\t// \tbody: snackbarMessage.message.join(\"\\r\\n\")\r\n\t\t\t// });\r\n\r\n\t\t\tNotificationManager.schedule({\r\n\t\t\t\ttitle: snackbarMessage.title,\r\n\t\t\t\tbody: snackbarMessage.message.join(\"\\r\\n\"),\r\n\t\t\t\ticonPath: process.env.PUBLIC_URL + \"favicon.ico\",\r\n\t\t\t});\r\n\t\t}\r\n\t}, []);\r\n\r\n\tconst handleExpandClick = () => {\r\n\t\tsetExpanded(!expanded);\r\n\t};\r\n\r\n\tconst handleDismiss = () => {\r\n\t\tdismiss();\r\n\t\tcloseSnackbar(props.id);\r\n\t};\r\n\r\n\r\n\tconst expandClassName = expanded ? `${classes.expand} ${classes.expandOpen}` : classes.expand;\r\n\t//const cardClassName = React.useMemo(() => snackbarMessage?.type === \"error\" ? classes.error : classes.warning, [])\r\n\tconst cardClassName = React.useMemo(() => snackbarMessage?.type === \"error\" ? classes.error : snackbarMessage?.type === \"warning\" ? classes.info : classes.warning, [])\r\n\r\n\treturn (\r\n\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{snackbarMessage?.title}\r\n\t\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\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\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\t\t{snackbarMessage?.message.map((line, i) => (\r\n\t\t\t\t\t\t\t\t{line}\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\t);\r\n});\r\n","import React from \"react\";\r\nimport { SnackbarMessage } from \"../types\";\r\nimport { dismiss, setShownId } from \"../snackbarDataSlice\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../../core/store/reducers\";\r\n\r\nexport const useNextMessage = (max: number) => {\r\n\tconst messages = useSelector(store => store.data.snackbar.messages);\r\n\r\n\tconst shownMessage = React.useMemo(() => {\r\n\t\tfor (let i = 0; i < messages.length && i < max; i++) {\r\n\t\t\tif (!messages[i].shownId) {\r\n\t\t\t\treturn messages[i];\r\n\t\t\t}\r\n }\r\n return undefined;\r\n\t}, [messages, max]);\r\n\r\n\treturn [shownMessage] as [typeof shownMessage];\r\n};\r\n\r\nexport const useSnackbarMessage = (id: string) => {\r\n\tconst messages = useSelector(store => store.data.snackbar.messages);\r\n\tconst message = messages.find(m => m.id === id);\r\n\r\n\tconst dispatch = useDispatch();\r\n\tconst dismissMessage = React.useCallback(() => {\r\n\t\tif (message) {\r\n\t\t\tdispatch(dismiss(message.id));\r\n\t\t}\r\n }, [message, dispatch]);\r\n\r\n\tconst dispatchSetShownId = React.useCallback((shownId: string) => {\r\n\t\tif (message) {\r\n\t\t\tdispatch(setShownId({\r\n messageId: message.id,\r\n shownId: shownId\r\n }));\r\n\t\t}\r\n\t}, [message, dispatch]);\r\n\r\n\treturn [message, dismissMessage, dispatchSetShownId] as [typeof message, typeof dismissMessage, typeof dispatchSetShownId];\r\n};\r\n","import React from \"react\";\r\nimport { useNextMessage } from \"../../data/snackbar/hooks/useSnackbarMessage\";\r\nimport { SnackbarProvider, useSnackbar } from \"notistack\";\r\nimport { CollapsableMessage } from \"./CollapsableMessage\";\r\n\r\nexport const SnackbarMessages: React.FunctionComponent = ({ children }) => (\r\n\t }\r\n\t>\r\n\t\t<>\r\n\t\t\t\r\n\t\t\t{children}\r\n\t\t\r\n\t\r\n);\r\n\r\nexport const MessageQueueManager: React.FunctionComponent = () => {\r\n\tconst [message] = useNextMessage(3);\r\n\r\n\tconst { enqueueSnackbar } = useSnackbar();\r\n\tReact.useEffect(() => {\r\n\t\tif (message !== undefined) {\r\n\t\t\tenqueueSnackbar(message.id, {\r\n\t\t\t\tpersist: true,\r\n\t\t\t});\r\n\t\t}\r\n\t}, [message, enqueueSnackbar]);\r\n\treturn null;\r\n};\r\n","import React from \"react\";\nimport { App } from '@capacitor/app';\nimport { Capacitor } from '@capacitor/core';\nimport { LocalizationContext } from \"../../core/localization/Localization\";\nimport { useAlarmsChangedHandler, useNotificationHandler } from \"../../core/notifications/hooks\";\nimport { useSnackbarMessageSender } from \"../../data/snackbar/hooks/useSnackbarMessageSender\";\nimport { NotificationManager } from '../../core/notifications/NotificationsManager';\n\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\nimport { useTheme } from '@material-ui/core/styles';\n\nexport interface IProductAlarmNotification {\n\tproductName: string;\n\tclientName: string;\n\torderNumber: string;\n}\n\nexport interface IProductClientAlarmNotification {\n\tproductName: string;\n\tclientName: string;\n\torderNumber: string;\n}\n\nexport interface IClientAlarmNotification {\n\tproductName: string;\n\tclientName: string;\n\torderNumber: string;\n}\n\nexport interface ICrossAlarmNotification {\n\tproductCode: string;\n\tclientName: string;\n\tbuyOrderNumber: string;\n\tsellOrderNumber: string;\n\tprice: number;\n\tqty: number;\n\tqtyMatched: number;\n\tdate: Date;\n}\n\nexport interface IMobileOrderNotification {\n\ttitle: string;\n\tproduct: string;\n\tqty: number;\n\tunit: string;\n\tprice: number;\n\tfrancoDescr : string; \n\tdistrictName : string;\n\tquality: string;\n\tguaranteeDescr : string;\n\tpayType : string;\n\tgoodsReadyFrom : string;\n\tgoodsReadyTo : string;\n\tpacking : string;\n\torigin : string;\n\tdirectorate : string;\n}\n\nexport const SurveillanceNotificationHandlers: React.FunctionComponent = () => {\n\tconst [pushInfo, pushWarning] = useSnackbarMessageSender();\n\tconst { getString, getDateTimeString } = React.useContext(LocalizationContext);\n\n\tconst theme = useTheme();\n\tconst screenExtraSmall = useMediaQuery(theme.breakpoints.only('xs'));\n\n\tconsole.log(screenExtraSmall)\n\n\tuseAlarmsChangedHandler();\n\n\tuseNotificationHandler(\n\t\t\"OrderProduct\",\n\t\te => {\n\t\t\tconsole.log(\"OrderProduct\", e);\n\t\t\tpushInfo(`${getString(\"alarmProductName\")}`, [\n\t\t\t\t`${getString(\"exchOrderNumber\")}: ${e.orderNumber}`,\n\t\t\t\t`${getString(\"orderClientName\")}: ${e.clientName}`,\n\t\t\t\t`${getString(\"orderProduct\")}: ${e.productName}`,\n\t\t\t]);\n\t\t},\n\t\t[pushInfo]\n\t);\n\tuseNotificationHandler(\n\t\t\"OrderProductClient\",\n\t\te => {\n\t\t\tconsole.log(\"OrderProductClient\", e);\n\t\t\tpushInfo(`${getString(\"alarmProductClientName\")}`, [\n\t\t\t\t`${getString(\"exchOrderNumber\")}: ${e.orderNumber}`,\n\t\t\t\t`${getString(\"orderClientName\")}: ${e.clientName}`,\n\t\t\t\t`${getString(\"orderProduct\")}: ${e.productName}`,\n\t\t\t]);\n\t\t},\n\t\t[pushInfo]\n\t);\n\tuseNotificationHandler(\n\t\t\"OrderClient\",\n\t\te => {\n\t\t\tconsole.log(\"OrderClient\", e);\n\t\t\tpushInfo(`${getString(\"alarmClientName\")}`, [\n\t\t\t\t`${getString(\"exchOrderNumber\")}: ${e.orderNumber}`,\n\t\t\t\t`${getString(\"orderClientName\")}: ${e.clientName}`,\n\t\t\t\t`${getString(\"orderProduct\")}: ${e.productName}`,\n\t\t\t]);\n\t\t},\n\t\t[pushInfo]\n\t);\n\tuseNotificationHandler(\n\t\t\"OrderCross\",\n\t\te => {\n\t\t\tconsole.log(\"OrderCross\", e);\n\t\t\tpushInfo(`${getString(\"alarmCrossName\")}`, [\n\t\t\t\t`${getString(\"alarmBuyOrderNumber\")}: ${e.buyOrderNumber}`,\n\t\t\t\t`${getString(\"alarmSellOrderNumber\")}: ${e.sellOrderNumber}`,\n\t\t\t\t`${getString(\"orderClientName\")}: ${e.clientName}`,\n\t\t\t\t`${getString(\"orderProduct\")}: ${e.productCode}`,\n\t\t\t\t`${getString(\"orderPrice\")}/${getString(\"orderQty\")}: ${e.price}/${e.qty}`,\n\t\t\t\t`${getString(\"orderQtyMatched\")}: ${e.qtyMatched}`,\n\t\t\t\t`${getString(\"alarmTime\")}: ${getDateTimeString(e.date)}`,\n\t\t\t]);\n\t\t},\n\t\t[pushInfo]\n\t);\n\n\tconst notifyIfNecessary = (title: string, messages: Array, id?: number) => {\n\t\tif (Capacitor.getPlatform() === 'web') return;\n\t\tApp.getState()\n\t\t\t.then((state) => {\n\t\t\t\tif (state.isActive) return;\n\t\t\t\t// NotificationManager.schedule({\n\t\t\t\t// \tid,\n\t\t\t\t// \ttitle,\n\t\t\t\t// \tbody: messages.join('\\r\\n'),\n\t\t\t\t// \ticonPath: process.env.PUBLIC_URL + \"favicon.ico\",\n\t\t\t\t// });\n\n\t\t\t\t// we don't notify anymore from app like before\n\t\t\t\t// because we gonna install push notifications\n\t\t\t});\n\t}\n\n\tuseNotificationHandler(\n\t\t\"MobileOrder\",\n\t\te => {\n\t\t\tif (!screenExtraSmall) return;\n\n\t\t\tconst title = getString(\"notificationNewOrder\");\n\t\t\tconst messages = [\n\t\t\t\t`${getString(\"orderSide\")}: ${e.title}`,\n\t\t\t\t`${getString(\"orderProduct\")}: ${e.product}`,\n\t\t\t\t`${getString(\"orderQty\")}: ${e.qty}`,\n\t\t\t\t`${getString(\"orderUnit\")}: ${e.unit}`,\n\t\t\t\t`${getString(\"orderPrice\")}: ${e.price}`,\n\t\t\t\t`${getString(\"regNameDistrict\")}: ${e.districtName}`,\n\t\t\t\t`${getString(\"orderQuality\")}: ${e.quality}`,\n\t\t\t\t`${getString(\"orderFranco\")}: ${e.francoDescr}`,\n\t\t\t\t`${getString(\"orderBankGuarantee\")}: ${e.guaranteeDescr}`,\n\t\t\t\t`${getString(\"orderPayType\")}: ${e.payType}`,\n\t\t\t\t`${getString(\"orderGoodsReadyFrom\")}: ${e.goodsReadyFrom}`,\n\t\t\t\t`${getString(\"orderGoodsReadyTo\")}: ${e.goodsReadyTo}`,\n\t\t\t\t`${getString(\"notifPacking\")}: ${e.packing}`,\n\t\t\t\t`${getString(\"notifOrigin\")}: ${e.origin}`,\n\t\t\t\t`${getString(\"notifDirectorate\")}: ${e.directorate}`,\n\t\t\t];\n\n\t\t\tconsole.log(\"MobileOrder\", e);\n\t\t\t//\t\t\tpushInfo(title, messages);\n\t\t\tpushWarning(title, messages);\n\t\t\tnotifyIfNecessary(title, messages); //, -1\n\t\t},\n\t\t[pushInfo, screenExtraSmall]\n\t);\n\n\tuseNotificationHandler(\n\t\t\"MobileTrade\",\n\t\te => {\n\t\t\tif (!screenExtraSmall) return;\n\n\t\t\tconsole.log(\"MobileTrade\", e);\n\t\t\tconst title = getString(\"notificationNewTrade\")\n\t\t\tconst messages = [\n\t\t\t\t`${getString(\"orderSide\")}: ${e.title}`,\n\t\t\t\t`${getString(\"orderProduct\")}: ${e.product}`,\n\t\t\t\t`${getString(\"orderQty\")}: ${e.qty}`,\n\t\t\t\t`${getString(\"orderUnit\")}: ${e.unit}`,\n\t\t\t\t`${getString(\"orderPrice\")}: ${e.price}`,\n\t\t\t\t`${getString(\"regNameDistrict\")}: ${e.districtName}`,\n\t\t\t\t`${getString(\"orderQuality\")}: ${e.quality}`,\n\t\t\t\t`${getString(\"orderFranco\")}: ${e.francoDescr}`,\n\t\t\t\t`${getString(\"orderBankGuarantee\")}: ${e.guaranteeDescr}`,\n\t\t\t\t`${getString(\"orderPayType\")}: ${e.payType}`,\n\t\t\t\t`${getString(\"orderGoodsReadyFrom\")}: ${e.goodsReadyFrom}`,\n\t\t\t\t`${getString(\"orderGoodsReadyTo\")}: ${e.goodsReadyTo}`,\n\t\t\t\t`${getString(\"notifPacking\")}: ${e.packing}`,\n\t\t\t\t`${getString(\"notifOrigin\")}: ${e.origin}`,\n\t\t\t\t`${getString(\"notifDirectorate\")}: ${e.directorate}`,\n\t\t\t]\n//\t\t\tpushInfo(title, messages);\n\t\t\tpushWarning(title, messages);\n\t\t\tnotifyIfNecessary(title, messages); //,-2\n\t\t},\n\t\t[pushInfo, screenExtraSmall]\n\t);\n\n\t{/*\tuseNotificationHandler(\n\t\t\"MobileTrade\",\n\t\te => {\n\t\t\tconsole.log(\"MobileTrade\", e);\n\t\t\tpushInfo(`${getString(\"notificationNewTrade\")}`, [\n\t\t\t\t`${getString(\"orderSide\")}: ${e.title}`,\n\t\t\t\t`${getString(\"orderProduct\")}: ${e.product}`,\n\t\t\t\t`${getString(\"orderQty\")}: ${e.qty}`,\n\t\t\t\t`${getString(\"orderUnit\")}: ${e.unit}`,\n\t\t\t\t`${getString(\"orderPrice\")}: ${e.price}`,\n\t\t\t]);\n\t\t},\n\t\t[pushInfo]\n\t); */}\n\n\t{/*\tuseNotificationHandler(\n\t\t\"MobileOrder\",\n\t\te => {\n\t\t\tconsole.log(\"MobileOrder\", e);\n\t\t\tpushInfo(`${getString(\"notificationNewOrder\")}`, [\n\t\t\t\t`${getString(\"orderSide\")}: ${e.title}`,\n\t\t\t\t`${getString(\"orderProduct\")}: ${e.product}`,\n\t\t\t\t`${getString(\"orderQty\")}: ${e.qty}`,\n\t\t\t\t`${getString(\"orderUnit\")}: ${e.unit}`,\n\t\t\t\t`${getString(\"orderPrice\")}: ${e.price}`,\n\t\t\t]) ;\n\t\t},\n\t\t[pushInfo]\n\t); */}\n\n\treturn null;\n};\n","import React from \"react\"\r\nimport { pushInfo, pushwarning } from \"../snackbarDataSlice\"\r\nimport { useDispatch } from \"react-redux\"\r\nimport { v4 } from \"uuid\";\r\n\r\nexport const useSnackbarMessageSender = () => {\r\n const dispatch = useDispatch()\r\n const dispatchPushInfo = React.useCallback((title: string, message: string[]) => {\r\n dispatch(pushInfo({\r\n id: v4(),\r\n message,\r\n title \r\n }))\r\n }, [dispatch])\r\n\r\n const dispatchPushWarning = React.useCallback((title: string, message: string[]) => {\r\n dispatch(pushwarning({\r\n id: v4(),\r\n message,\r\n title \r\n }))\r\n}, [dispatch])\r\n\r\nreturn [dispatchPushInfo,dispatchPushWarning] as [typeof dispatchPushInfo,typeof dispatchPushWarning]\r\n}","import { webApiWithResponse } from \"../../../core/http/httpThunks\";\r\n\r\nexport const storepushnotiftokenApi = (userId: string, pushToken: string) =>{\r\n\r\n return webApiWithResponse({\r\n method: \"POST\",\r\n url: \"user/storepushnotiftoken\",\r\n params: {\r\n userId,\r\n pushToken,\r\n },\r\n });\r\n}\r\nexport default storepushnotiftokenApi;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { StoreType } from \"../../core/store/reducers\";\r\nimport { FetchStateType } from \"../models\";\r\nimport { storepushnotiftokenThunks } from \"./storetokenthunks\";\r\nimport { setFetchState } from \"./authDataSlice\";\r\n\r\nexport const useStoreTokenHooks = () => {\r\n const fetchState = useSelector(\r\n (store) => store.data.auth.fetchState\r\n );\r\n\r\n const dispatch = useDispatch();\r\n const dispatcStoreToken = React.useCallback(\r\n (pushToken: string) => dispatch(storepushnotiftokenThunks(pushToken)),\r\n [dispatch]\r\n );\r\n\r\n React.useEffect(() => {\r\n dispatch(setFetchState({ type: \"not-started\" }));\r\n }, [dispatch]);\r\n\r\n return [fetchState, dispatcStoreToken] as [\r\n typeof fetchState,\r\n typeof dispatcStoreToken\r\n ];\r\n};\r\n","import { ThunkType } from \"../../core/store/reducers\";\r\nimport storepushnotiftokenApi from \"./api/storetoken\";\r\nimport { setFetchState } from \"./authDataSlice\";\r\n\r\nexport const storepushnotiftokenThunks = (pushToken: string ): ThunkType => async ( dispatch, getStore) => {\r\n const store = getStore();\r\n\r\n if (store.data.auth.current.status !== \"successful\") {\r\n return;\r\n }\r\n\r\n dispatch(setFetchState({ type: \"started\" }));\r\n\r\n const { userId } = store.data.auth.current.user;\r\n\r\n const result = await dispatch(storepushnotiftokenApi(userId, pushToken))\r\n\r\n console.log(result)\r\n\r\n if (result && result.resCode === \"OK\") {\r\n dispatch(setFetchState({ type: \"successful\", result: result.resDesc }));\r\n return result.resDesc;\r\n } else {\r\n dispatch(setFetchState({ type: \"error\", errorCode: result?.resCode }));\r\n }\r\n};\r\n","import { memo, useEffect } from \"react\";\r\nimport { Capacitor } from \"@capacitor/core\";\r\nimport {\r\n ActionPerformed,\r\n PushNotifications,\r\n} from \"@capacitor/push-notifications\";\r\nimport { useStoreTokenHooks } from \"../../data/auth/useStoreTokenHooks\";\r\n\r\nconst PUSH_NOTIFICATIONS_TOKEN_STORAGE_KEY = \"PUSH-NOTIFICATION:TOKEN\";\r\n\r\ntype Props = {\r\n isAuth: boolean;\r\n authToken: string;\r\n};\r\n\r\nexport const PushNotificationProvider = memo((props: Props) => {\r\n const { isAuth, authToken } = props;\r\n\r\n console.log(\"PushNotificationProvider\", isAuth, authToken);\r\n\r\n const [, dispatcheStoreToken] = useStoreTokenHooks();\r\n\r\n useEffect(() => {\r\n if (Capacitor.getPlatform() === \"web\") return;\r\n if (!isAuth || !authToken) return;\r\n\r\n const registrationListener = async () => {\r\n await PushNotifications.addListener(\"registrationError\", (err) => {\r\n console.error(\"Registration error: \", err.error);\r\n });\r\n await PushNotifications.addListener(\"registration\", (pushToken) => {\r\n console.info(\"Registration token: \", pushToken.value);\r\n if (\r\n localStorage.getItem(PUSH_NOTIFICATIONS_TOKEN_STORAGE_KEY) !==\r\n pushToken.value\r\n ) {\r\n localStorage.setItem(\r\n PUSH_NOTIFICATIONS_TOKEN_STORAGE_KEY,\r\n pushToken.value\r\n );\r\n console.log(\"Token isn't same\");\r\n\r\n // Store token on backend\r\n // httpWebApi({\r\n // \tmethod: \"POST\",\r\n // \turl: \"user/pushnotificationtoken\",\r\n // \tdata: {\r\n // \t\ttoken: pushToken.value,\r\n // \t},\r\n // }, authToken);\r\n\r\n dispatcheStoreToken(pushToken.value);\r\n }\r\n });\r\n PushNotifications.addListener(\r\n \"pushNotificationActionPerformed\",\r\n (notification: ActionPerformed) => {\r\n try {\r\n console.log(\"Push received: \" + JSON.stringify(notification));\r\n } catch (error) {\r\n console.log(\r\n \"error from subscribing notification \" + JSON.stringify(error)\r\n );\r\n }\r\n }\r\n );\r\n };\r\n\r\n registrationListener();\r\n\r\n /// TODO: add event listener on notification received, so i can turn it off if app is active ?\r\n // or prevent it maybe even?\r\n\r\n const check = async () => {\r\n let perm = await PushNotifications.checkPermissions();\r\n if (perm.receive !== \"granted\") {\r\n perm = await PushNotifications.requestPermissions();\r\n }\r\n\r\n if (perm.receive !== \"granted\") {\r\n console.log(\"User denied permissions!\");\r\n return;\r\n }\r\n\r\n await PushNotifications.register();\r\n };\r\n\r\n check();\r\n\r\n // dispose\r\n return () => {\r\n PushNotifications.removeAllListeners();\r\n };\r\n },\r\n [isAuth, authToken]);\r\n\r\n return null;\r\n});\r\n\r\n\r\n","import React from \"react\";\r\nimport { ContentLayout } from \"../layout/ContentLayout\";\r\nimport { LoginPage } from \"./login/LoginPage\";\r\nimport { PageRouterSwitch } from \"./navigation/PageRouterSwitch\";\r\nimport { useAuth } from \"../data/auth/hooks\";\r\nimport { ThemeComponent } from \"../layout/Theme\";\r\nimport { SnackbarMessages } from \"./snackbar/SnackbarMessages\";\r\nimport { NotificationContextProvider } from \"../core/notifications/NotificationContext\";\r\nimport { appConfig } from \"../core/config/config\";\r\nimport { SurveillanceNotificationHandlers } from \"./surveillance/SurveillanceNotificationHandlers\";\r\nimport { canRecieveNotifications } from \"../core/notifications/hooks\";\r\nimport { useShouldConnectNotifications } from \"./navigation/hooks/useNavigationItems\";\r\nimport { PushNotificationProvider } from \"../core/notifications/PushNotifications\";\r\n\r\nexport const ContentRoot: React.FunctionComponent = props => {\r\n\tconst [auth, , , token] = useAuth();\r\n\tconst shouldUseNotifications = useShouldConnectNotifications();\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t{auth.status === \"successful\" && token ? (\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\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\t\t\r\n\t\t\t\t)}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n","import React from \"react\";\r\nimport StoreProvider from \"./core/store/StoreProvider\";\r\nimport { HashRouter as Router } from \"react-router-dom\";\r\nimport { LocalizationContextProvider } from \"./core/localization/Localization\";\r\nimport { ContentRoot } from \"./views/ContentRoot\";\r\nimport { appConfig } from \"./core/config/config\"\r\n\r\nexport default () => (\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n);\r\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.0/8 are considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\ntype Config = {\n onSuccess?: (registration: ServiceWorkerRegistration) => void;\n onUpdate?: (registration: ServiceWorkerRegistration) => void;\n};\n\nexport function register(config?: Config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(\n process.env.PUBLIC_URL,\n window.location.href\n );\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl: string, config?: Config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl: string, config?: Config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl, {\n headers: { 'Service-Worker': 'script' }\n })\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready\n .then(registration => {\n registration.unregister();\n })\n .catch(error => {\n console.error(error.message);\n });\n }\n}\n","import React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport App from \"./App\";\nimport * as serviceWorker from \"./serviceWorker\";\nimport \"./main.css\"\n\nReactDOM.render(, document.getElementById(\"root\"));\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();\n"],"sourceRoot":""}