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Aa,oC","sources":["actions/profile.actions.js","actions/entities/rejected-trades.actions.ts","actions/edit-news.actions.ts","actions/entities/awaitingTrades.actions.ts","actions/manage-email-preferences.actions.ts","actions/push.bwic.actions.ts","actions/clients-companies.actions.ts","actions/manage-companies-filter.actions.ts","actions/search.securities.actions.js","actions/help-resources.actions.ts","actions/manage-email.actions.ts","actions/portfolio-agreement-disclaimer.actions.ts","actions/sales-representative.actions.ts","actions/push.user.actions.js.ts","actions/inventory-edit.actions.ts","actions/clearing-bank.actions.ts","actions/seller.bidding.actions.js","actions/entities/parties.actions.ts","actions/release.actions.ts","actions/bwic-log.actions.ts","actions/entities/live-bidding.actions.ts","actions/subscription-biling-history.actions.ts","actions/edit.parsed.bwic.actions.js","actions/new-bwic-dealers.actions.ts","actions/edit.company.actions.js","actions/seller-admin-users.actions.ts","actions/rules.actions.js","actions/brokerDealer.bidding.actions.js","actions/seller-admin-limit.actions.ts","actions/companies.actions.js","actions/entities/trustee.actions.ts","actions/favorite-broker-dealers.actions.ts","actions/manage-members-filter.actions.ts","actions/notification.actions.ts","actions/seller-admin-dealers.actions.ts","actions/manage-tokens.actions.ts","actions/entities/arrangers-pipeline.actions.ts","actions/blast-message.actions.ts","actions/direct-bidding-agreement-disclaimer.actions.ts","actions/settlement-agent-agreement-push.actions.ts","actions/clo-managers.actions.ts","actions/company-members.actions.ts","actions/email-preferences.actions.ts","actions/entities/availableBrokerDealers.actions.ts","actions/change-subscription.actions.ts","actions/portfolio-list.actions.ts","actions/deals.actions.ts","actions/control-panel.actions.js","actions/process.actions.js","actions/entities/cloSystemInfrastructure.ts","actions/news.actions.ts","actions/grid.actions.js","actions/error.actions.js","actions/table.actions.ts","actions/security.details.actions.ts","actions/settlement-agent-agreements.actions.ts","actions/dealer-list.actions.ts","actions/portfolio.actions.js","actions/page-config.actions.ts","actions/entities/push-history.actions.ts","actions/broker-dealer-user-list.actions.ts","actions/company-details.actions.ts","actions/inventory.actions.ts","actions/filter.actions.ts","actions/broker-dealer-contact-list.actions.ts","actions/blotter-trade-allocation-template.actions.ts","actions/search-transactions.actions.ts","actions/dealer-list-panel.actions.ts","actions/signup.actions.ts","actions/securities.actions.js","actions/forms.actions.js","actions/newBWIC.actions.js","actions/documents.actions.js","actions/submit.actions.js","actions/edit.portfolio.actions.js","actions/manage.parsed.bwics.actions.js","actions/change.pxTalk.actions.js","actions/change.color.actions.js","actions/contacts.save.actions.js","actions/portfolio.documents.actions.js","actions/otherSeller.bidding.actions.js","actions/dealers.actions.js","actions/push.invitation.actions.js","actions/color.distribution.actions.js","actions/onBoarding.tooltip.actions.js","actions/inviteToJoin.actions.js","actions/bwic-history.actions.js","actions/pxTalk-list.actions.js","actions/seller-buyside-actions.ts","actions/im-details-deals.actions.ts","actions/subscriptions.actions.ts","actions/contact-sales.actions.ts","actions/dealers-stats.actions.ts","actions/settlement-account.actions.ts","actions/im-user-config.actions.ts","actions/blotter.actions.js","actions/blotter-trade-allocation.actions.ts","actions/broker-dealer-list.actions.ts","actions/dashboard.actions.js","actions/entities/collateralManagers.action.ts","actions/price-talks.actions.ts","actions/entities/latest-transaction.actions.ts"],"sourcesContent":["import { profileActions as actionTypes } from '../constants';\r\nimport { accountActions, errorActions } from '.';\r\nimport { accountService } from '../services';\r\nimport { userProfilePhotoActions } from './user-profile-photo.actions';\r\nimport { user } from '../user';\r\nimport { sellerAdminUsersActions } from './seller-admin-users.actions';\r\nimport { sellerAdminDealerActions } from './seller-admin-dealers.actions';\r\nimport { sellerAdminLimitActions } from './seller-admin-limit.actions';\r\nimport { RequestState } from '../constants/request-state';\r\n\r\nexport const profileActions = {\r\n init,\r\n toggleEditPhoneMode,\r\n toggleEditBloombergEmail,\r\n savePhoneNumber,\r\n savePhoneNumberFailure,\r\n changeContactPopupVisible,\r\n changePasswordFormVisible,\r\n personalInfoReset,\r\n passwordSettingsReset,\r\n reset,\r\n addNewCompanyTraderToStore,\r\n editNewCompanyTraderInStore,\r\n editCompanyContact,\r\n enableCompanyTrader,\r\n disableCompanyTrader,\r\n setVisibleUploadImagePopup,\r\n uploadUserImage,\r\n deleteUserImage,\r\n saveBloombergEmail,\r\n changeBwicAnnouncementNotifications\r\n};\r\n\r\nfunction init() {\r\n return async dispatch => {\r\n dispatch({ type: actionTypes.PROFILE_INIT, requestState: RequestState.request });\r\n try {\r\n const profilePromise = accountService.getProfile();\r\n const companyPromise = accountService.getProfileCompany();\r\n const profile = await profilePromise;\r\n const company = await companyPromise;\r\n dispatch({ type: actionTypes.GET_PROFILE_SUCCESS, profile });\r\n dispatch({ type: actionTypes.GET_PROFILE_COMPANY_SUCCESS, payload: { company } });\r\n dispatch({ type: actionTypes.PROFILE_INIT, requestState: RequestState.success });\r\n\r\n } catch (e) {\r\n dispatch({ type: actionTypes.PROFILE_INIT, requestState: RequestState.failure });\r\n dispatch(errorActions.criticalError(e));\r\n }\r\n };\r\n}\r\n\r\nfunction toggleEditPhoneMode(changePhoneVisible) {\r\n return {\r\n type: actionTypes.CHANGE_PHONE_VISIBLE,\r\n changePhoneVisible\r\n };\r\n}\r\n\r\nfunction toggleEditBloombergEmail() {\r\n return { type: actionTypes.TOGGLE_VISIBILITY_FORM_BLOOMBERG_EMAIL }\r\n}\r\n\r\nfunction saveBloombergEmail(bloombergEmail) {\r\n return async dispatch => {\r\n try {\r\n dispatch(setRequestStatusSaveBloombergEmail(true));\r\n await accountService.saveBloombergEmail(bloombergEmail);\r\n user.setBloombergEmail(bloombergEmail);\r\n } catch (e) {\r\n dispatch(errorActions.unexpectedError(e));\r\n } finally {\r\n dispatch(setRequestStatusSaveBloombergEmail(false));\r\n }\r\n }\r\n}\r\n\r\nfunction setRequestStatusSaveBloombergEmail(status) {\r\n return { type: actionTypes.IS_REQUEST_SAVE_BLOOMBERG_EMAIL, payload: { status } }\r\n}\r\n\r\nfunction savePhoneNumber(phone) {\r\n return (dispatch, getState) => {\r\n const profile = getState().profile.profile;\r\n profile.phone = phone;\r\n\r\n dispatch({\r\n type: actionTypes.SAVE_PHONE_NUMBER,\r\n profile: {\r\n ...profile\r\n }\r\n });\r\n };\r\n}\r\n\r\nfunction savePhoneNumberFailure(errorMessage) {\r\n return {\r\n type: actionTypes.CHANGE_PHONE_NUMBER_FAILURE,\r\n error: { errorMessage: errorMessage }\r\n };\r\n}\r\n\r\nfunction changeContactPopupVisible(changeContactPopupVisible, contactId) {\r\n return {\r\n type: actionTypes.CHANGE_CONTACT_POPUP_VISIBLE,\r\n contact: {\r\n changeContactPopupVisible,\r\n contactId\r\n }\r\n };\r\n}\r\n\r\nfunction changePasswordFormVisible(changePasswordVisible) {\r\n return {\r\n type: actionTypes.CHANGE_PASSWORD_FORM_VISIBLE,\r\n changePasswordVisible\r\n };\r\n}\r\n\r\nfunction personalInfoReset() {\r\n return dispatch => {\r\n dispatch(toggleEditPhoneMode(false));\r\n };\r\n}\r\n\r\nfunction passwordSettingsReset() {\r\n return dispatch => {\r\n dispatch(accountActions.changePasswordReset());\r\n dispatch(changePasswordFormVisible(false));\r\n };\r\n}\r\n\r\nfunction reset() {\r\n return dispatch => {\r\n dispatch({ type: actionTypes.ACCOUNT_SETTINGS_RESET });\r\n dispatch(sellerAdminUsersActions.reset());\r\n dispatch(sellerAdminDealerActions.reset());\r\n dispatch(sellerAdminLimitActions.reset());\r\n };\r\n}\r\n\r\nfunction addNewCompanyTraderToStore(trader) {\r\n return (dispatch, getState) => {\r\n const profile = getState().profile;\r\n if (profile.company && profile.company.traders) {\r\n const company = { ...profile.company };\r\n company.traders.push(trader);\r\n dispatch({ type: actionTypes.PROFILE_COMPANY_ADD_NEW_TRADER, payload: { company } })\r\n }\r\n }\r\n}\r\n\r\nfunction editNewCompanyTraderInStore(trader, traderId) {\r\n return (dispatch, getState) => {\r\n const profile = getState().profile;\r\n if (profile.company && profile.company.traders) {\r\n const company = { ...profile.company };\r\n company.traders = company.traders.map((item) => {\r\n if (item.id === traderId) {\r\n return { ...trader }\r\n }\r\n return item\r\n });\r\n dispatch({ type: actionTypes.PROFILE_COMPANY_EDIT_TRADER, payload: { company } })\r\n }\r\n }\r\n}\r\n\r\nfunction editCompanyContact(submitModel, departmentValue) {\r\n return (dispatch) => {\r\n accountService.editCompanyContact(submitModel, departmentValue)\r\n .then(() => {\r\n dispatch({ type: actionTypes.PROFILE_COMPANY_CONTACT_CHANGED, payload: { submitModel, departmentValue } });\r\n })\r\n .catch((e) => {\r\n dispatch(errorActions.unexpectedError(e));\r\n });\r\n };\r\n}\r\n\r\nfunction enableCompanyTrader(contact) {\r\n return async (dispatch) => {\r\n dispatch({ type: actionTypes.ENABLE_COMPANY_TRADER_REQUEST });\r\n try {\r\n const { id, status } = await accountService.enableCompanyTrader(contact.id);\r\n\r\n dispatch({ type: actionTypes.ENABLE_COMPANY_TRADER_SUCCESS });\r\n dispatch(editNewCompanyTraderInStore({ ...contact, status }, id));\r\n } catch (e) {\r\n dispatch(errorActions.unexpectedError(e));\r\n dispatch({ type: actionTypes.ENABLE_COMPANY_TRADER_FAIL });\r\n }\r\n };\r\n}\r\n\r\nfunction disableCompanyTrader(contact) {\r\n return async (dispatch) => {\r\n dispatch({ type: actionTypes.DISABLE_COMPANY_TRADER_REQUEST });\r\n try {\r\n const { id, status } = await accountService.disableCompanyTrader(contact.id);\r\n\r\n dispatch({ type: actionTypes.DISABLE_COMPANY_TRADER_SUCCESS });\r\n dispatch(editNewCompanyTraderInStore({ ...contact, status }, id));\r\n } catch (e) {\r\n dispatch(errorActions.unexpectedError(e));\r\n dispatch({ type: actionTypes.DISABLE_COMPANY_TRADER_FAIL });\r\n }\r\n };\r\n}\r\n\r\nfunction setVisibleUploadImagePopup(visible) {\r\n return {\r\n type: actionTypes.PROFILE_SET_VISIBLE_UPLOAD_USER_IMAGE_POPUP,\r\n payload: { visible }\r\n };\r\n}\r\n\r\nfunction requestStateUploadUserImage(requestState) {\r\n return {\r\n type: actionTypes.PROFILE_SET_REQUEST_STATE_UPLOAD_USER_IMAGE,\r\n payload: { requestState }\r\n };\r\n}\r\n\r\nfunction requestStateDeleteUserImage(requestState) {\r\n return {\r\n type: actionTypes.PROFILE_SET_REQUEST_STATE_DELETE_USER_IMAGE,\r\n payload: { requestState }\r\n }\r\n}\r\n\r\nfunction uploadUserImage(file) {\r\n return dispatch => {\r\n dispatch(requestStateUploadUserImage(true));\r\n accountService.uploadUserImage(file)\r\n .then(() => {\r\n const currentUser = user.current();\r\n dispatch(userProfilePhotoActions.fetchUserImage(currentUser.id));\r\n dispatch(setVisibleUploadImagePopup(false));\r\n })\r\n .catch(e => dispatch(errorActions.unexpectedError(e)))\r\n .finally(() => dispatch(requestStateUploadUserImage(false)));\r\n };\r\n}\r\n\r\nfunction deleteUserImage() {\r\n return dispatch => {\r\n dispatch(requestStateDeleteUserImage(true));\r\n accountService.deleteUserImage()\r\n .then(() => {\r\n const currentUser = user.current();\r\n dispatch(userProfilePhotoActions.fetchUserImage(currentUser.id));\r\n dispatch(setVisibleUploadImagePopup(false));\r\n })\r\n .catch(e => dispatch(errorActions.unexpectedError(e)))\r\n .finally(() => dispatch(requestStateDeleteUserImage(false)))\r\n };\r\n}\r\n\r\nfunction changeBwicAnnouncementNotifications(bwicAnnouncementNotifications) {\r\n return dispatch => {\r\n dispatch(sellerAdminUsersActions.changeBwicAnnouncementNotificationsRequest(RequestState.request));\r\n accountService.saveBwicAnnouncementNotifications(bwicAnnouncementNotifications)\r\n .then((bwicAnnouncementNotifications) => {\r\n dispatch(sellerAdminUsersActions.changeBwicAnnouncementNotificationsRequest(RequestState.success));\r\n dispatch(sellerAdminUsersActions.changeBwicAnnouncementNotifications({\r\n bwicCreateNotifyAdmins: bwicAnnouncementNotifications.bwicCreateNotifyAdmins,\r\n bwicCreateNotifyViewers: bwicAnnouncementNotifications.bwicCreateNotifyViewers\r\n }));\r\n })\r\n .catch(e => {\r\n dispatch(errorActions.unexpectedError(e));\r\n dispatch(sellerAdminUsersActions.changeBwicAnnouncementNotificationsRequest(RequestState.failure));\r\n })\r\n }\r\n}","import { ActionType, createAction } from \"typesafe-actions\";\r\nimport { RequestState } from \"../../constants/request-state\";\r\nimport { RejectedTrade } from '../../types/trades/RejectedTrade';\r\n\r\nconst request = createAction('entities/rejected-trades/REQUEST');\r\nconst requestResult = createAction('entities/rejected-trades/REQUEST_RESULT',\r\n resolve => (requestState: RequestState, trades: RejectedTrade[] = []) =>\r\n resolve({ requestState, trades })\r\n);\r\nconst setTradesAsResolved = createAction('entities/rejected-trades/SET_AS_RESOLVED',\r\n resolve => (tradeIds: string[]) => resolve({ tradeIds })\r\n);\r\nconst pushBuyerRejectTrade = createAction(\r\n 'entities/rejected-trades/PUSH_BUYER_REJECT_TRADE',\r\n resolve => (trade: RejectedTrade) => resolve({ trade })\r\n);\r\n\r\nexport type TRejectedTradesActionType = ActionType;\r\n\r\nexport const rejectedTradeActions = {\r\n request,\r\n requestResult,\r\n setTradesAsResolved,\r\n pushBuyerRejectTrade,\r\n}\r\n","import { ActionType, createAction } from \"typesafe-actions\";\r\nimport { News } from \"../types/news/News\";\r\nimport { Company } from \"../types/amr-pipeline/models/Company\";\r\n\r\nconst init = createAction(\r\n \"editNews/init/REQUEST\",\r\n (resolve) => (initialReferenceName?: string) =>\r\n resolve({ initialReferenceName })\r\n);\r\n\r\nconst getInitResult = createAction(\r\n \"editNews/init/REQUEST_RESULT\",\r\n (resolve) =>\r\n (newsList: News[], managers: Company[], arrangers: Company[]) =>\r\n resolve({ newsList, managers, arrangers })\r\n);\r\n\r\nconst getTotalCountResult = createAction(\r\n \"editNews/getTotalCount/REQUEST_RESULT\",\r\n (resolve) => (totalCount: number) => resolve({ totalCount })\r\n);\r\n\r\nconst loadMoreNewsList = createAction(\r\n \"editNews/getList/REQUEST\",\r\n (resolve) => (searchTerm?: string) => resolve({ searchTerm })\r\n);\r\n\r\nconst loadMoreNewsListResult = createAction(\r\n \"editNews/getList/REQUEST_RESULT\",\r\n (resolve) => (newsList: News[]) => resolve({ newsList })\r\n);\r\n\r\nconst searchNewsList = createAction(\r\n \"editNews/searchList/REQUEST\",\r\n (resolve) => (searchTerm: string) => resolve({ searchTerm })\r\n);\r\n\r\nconst searchNewsListResult = createAction(\r\n \"editNews/searchList/REQUEST_RESULT\",\r\n (resolve) => (newsList: News[]) => resolve({ newsList })\r\n);\r\n\r\nconst setInitialNews = createAction(\r\n \"editNews/setInitial/STATE\",\r\n (resolve) => (initialNews?: News) => resolve({ initialNews })\r\n);\r\n\r\nconst updateNewsList = createAction(\r\n \"editNews/updateList/STATE\",\r\n (resolve) => (newsList: News[]) => resolve({ newsList })\r\n);\r\n\r\nconst setSearchTerm = createAction(\r\n \"editNews/setSearchTerm/STATE\",\r\n (resolve) => (searchTerm: string) => resolve({ searchTerm })\r\n);\r\n\r\nconst getNewsDetails = createAction(\r\n \"editNews/getOne/REQUEST\",\r\n (resolve) => (referenceName: string) => resolve({ referenceName })\r\n);\r\n\r\nconst getNewsDetailsResult = createAction(\r\n \"editNews/getOne/REQUEST_RESULT\",\r\n (resolve) => (newsData: News) => resolve({ newsData })\r\n);\r\n\r\nconst createOrUpdateNews = createAction(\r\n \"editNews/createOrUpdate/REQUEST\",\r\n (resolve) => (newsData: News) => resolve({ newsData })\r\n);\r\n\r\nconst deleteNews = createAction(\r\n \"editNews/delete/REQUEST\",\r\n (resolve) => (referenceName: string) => resolve({ referenceName })\r\n);\r\n\r\nconst resetNewsDetails = createAction(\"editNews/newsDetails/RESET\");\r\n\r\nconst reset = createAction(\"editNews/RESET\");\r\n\r\nexport type TEditNewsActions = ActionType<\r\n (typeof editNewsActions)[keyof typeof editNewsActions]\r\n>;\r\n\r\nexport const editNewsActions = {\r\n init,\r\n getInitResult,\r\n getTotalCountResult,\r\n loadMoreNewsList,\r\n loadMoreNewsListResult,\r\n searchNewsList,\r\n searchNewsListResult,\r\n getNewsDetails,\r\n getNewsDetailsResult,\r\n createOrUpdateNews,\r\n setInitialNews,\r\n updateNewsList,\r\n setSearchTerm,\r\n deleteNews,\r\n resetNewsDetails,\r\n reset,\r\n};\r\n","import { ActionType, createAction } from 'typesafe-actions';\r\nimport { RequestState } from '../../constants/request-state';\r\nimport { AwaitingTrade } from '../../types/trades/AwaitingTrade';\r\nimport { TradeSettlementStatus } from '../../types/settlement/TradeSettlementStatus';\r\n\r\nconst requestTrades = createAction('entities/awaitingTrades/REQUEST');\r\nconst requestTradesResult = createAction(\r\n 'entities/awaitingTrades/REQUEST_RESULT',\r\n resolve => (requestStatus: RequestState, awaitingTrades: AwaitingTrade[] = []) => resolve({ requestStatus, awaitingTrades })\r\n);\r\nconst trade = createAction(\r\n 'entities/awaitingTrades/TRADE',\r\n resolve => (trade: AwaitingTrade) => resolve({ trade })\r\n);\r\nconst tradeAllocationCreated = createAction(\r\n 'entities/awaitingTrades/TRADE_ALLOCATION_CREATED',\r\n resolve =>\r\n (tradeId: string, buyerSettlementStatus: TradeSettlementStatus, sellerSettlementStatus: TradeSettlementStatus) =>\r\n resolve({ tradeId, buyerSettlementStatus, sellerSettlementStatus })\r\n);\r\n\r\nexport type AwaitingTradesActionTypes =\r\n ActionType\r\n\r\nexport const awaitingTradesActions = {\r\n requestTrades,\r\n requestTradesResult,\r\n trade,\r\n tradeAllocationCreated,\r\n}\r\n","import { createAction } from 'typesafe-actions';\r\nimport { Currency } from '../types/enums/Currency';\r\nimport { AlertOption, EmailPreferences } from '../types/email-preferences/EmailPreferences';\r\nimport { Rating } from '../types/enums/Rating';\r\nimport { DailyStatsAlertsConfig, CompanyAlertsConfig, ImUserConfig, SecondaryStatsAlertsConfig } from '../types/user-config/UserConfig';\r\nimport { UserConfigFilter } from '../types/user-config/UserConfigFilter';\r\nimport { StatisticsAlertOption } from '../types/amr-pipeline/enums/AlertOption';\r\nimport { AlertEnabledState } from '../types/enums/AlertEnabledState';\r\nimport { CloManager } from '../types/clo-managers/CloManager';\r\nimport { SavedFiltersPreferencesState } from '../types/state/ManageEmailPreferencesState';\r\nimport { Bank } from '../types/banks/Bank';\r\n\r\nconst getInitialDataRequest = createAction(\r\n 'manageEmailPreferences/GET_INITIAL_DATA_REQUEST',\r\n resolve => (withIssuanceMonitorAccess: boolean = false) => resolve({ withIssuanceMonitorAccess })\r\n);\r\nconst getInitialDataSuccess = createAction(\r\n 'manageEmailPreferences/GET_INITIAL_DATA_SUCCESS',\r\n resolve => (\r\n preferences: EmailPreferences,\r\n userConfig?: ImUserConfig[],\r\n managers?: CloManager[],\r\n banks?: Bank[],\r\n ) => resolve({ preferences, userConfig, managers, banks })\r\n);\r\nconst setRatingCheckedState = createAction(\r\n 'manageEmailPreferences/SET_RATING_CHECKED_STATE',\r\n resolve => (rating: Rating, currency: Currency, checked: boolean) => resolve({ rating, currency, checked })\r\n);\r\nconst setRatingInCurrencyCheckedState = createAction(\r\n 'manageEmailPreferences/SET_RATING_IN_CURRENCY_CHECKED_STATE',\r\n resolve => (currency: Currency, checked: boolean) => resolve({ currency, checked })\r\n);\r\nconst setAllRatingCheckedState = createAction(\r\n 'manageEmailPreferences/SET_ALL_RATING_CHECKED_STATE',\r\n resolve => (checked: boolean) => resolve({ checked })\r\n);\r\nconst setRatingSize = createAction(\r\n 'manageEmailPreferences/SET_RATING_MIN_SIZE',\r\n resolve => (rating: Rating, size: number, type: 'minSize' | 'maxSize') => resolve({ rating, size, type })\r\n);\r\nconst setCheckedDailyDashboardEmail = createAction(\r\n 'manageEmailPreferences/SET_CHECKED_DAILY_DASHBOARD_EMAIL',\r\n resolve => (alertOption: AlertOption) => resolve({ alertOption })\r\n);\r\nconst setPortfolioBwicAlerts = createAction(\r\n 'manageEmailPreferences/SET_PORTFOLIO_BWIC_ALERTS',\r\n resolve => (status: AlertEnabledState) => resolve({ status })\r\n);\r\nconst setPortfolioCleansingNoticeAlerts = createAction(\r\n 'manageEmailPreferences/SET_PORTFOLIO_CLEANSING_NOTICE_ALERTS',\r\n resolve => (status: AlertEnabledState) => resolve({ status })\r\n);\r\nconst setPortfolioIssuanceMonitorAlerts = createAction(\r\n 'manageEmailPreferences/SET_PORTFOLIO_ISSUANCE_MONITOR_ALERTS',\r\n resolve => (status: AlertEnabledState) => resolve({ status })\r\n);\r\n\r\nconst setPortfolioRiAlerts = createAction(\r\n 'manageEmailPreferences/SET_PORTFOLIO_RI_ALERTS',\r\n resolve => (status: AlertEnabledState) => resolve({ status })\r\n);\r\n\r\nconst setPortfolioNcAlerts = createAction(\r\n 'manageEmailPreferences/SET_PORTFOLIO_NC_ALERTS',\r\n resolve => (status: AlertEnabledState) => resolve({ status })\r\n);\r\n\r\nconst setPortfolioRollerDeadlineAlerts = createAction(\r\n 'manageEmailPreferences/SET_PORTFOLIO_ROLLER_DEADLINE_ALERTS',\r\n resolve => (status: AlertEnabledState) => resolve({ status })\r\n);\r\n\r\nconst setNewBiwicAlerts = createAction(\r\n 'manageEmailPreferences/SET_NEW_BIWIC_ALERTS',\r\n resolve => (status: AlertEnabledState) => resolve({ status })\r\n);\r\nconst setBiwicReminderAlerts = createAction(\r\n 'manageEmailPreferences/SET_BIWIC_REMINDER_ALERTS',\r\n resolve => (status: AlertEnabledState) => resolve({ status })\r\n);\r\nconst setPortfolioInventoryAlerts = createAction(\r\n 'manageEmailPreferences/SET_PORTFOLIO_INVENTORY_ALERTS',\r\n resolve => (status: AlertEnabledState) => resolve({ status })\r\n);\r\nconst setBwicByRatingPreferences = createAction(\r\n 'manageEmailPreferences/SET_BWIC_BY_RATING_PREFERENCES',\r\n resolve => (bwicByRatingAlertState: AlertOption) => resolve({ bwicByRatingAlertState })\r\n)\r\nconst setDealerInventoryAlertState = createAction(\r\n 'manageEmailPreferences/SET_DEALER_INVENTORY_ALERTS',\r\n resolve => (dealerInventoryAlertState: AlertOption) => resolve({ dealerInventoryAlertState })\r\n)\r\nconst setIssuanceMonitorSingleAlert = createAction(\r\n 'manageEmailPreferences/SET_ISSUANCE_MONITOR_SINGLE_ALERT',\r\n resolve => (singleAlertState: AlertOption) => resolve({ singleAlertState })\r\n);\r\nconst setIssuanceMonitorNewTransactionAlert = createAction(\r\n 'manageEmailPreferences/SET_ISSUANCE_MONITOR_NEW_TRANSACTION_ALERT',\r\n resolve => (transactionAlertState: AlertOption) => resolve({ transactionAlertState })\r\n);\r\nconst setIssuanceMonitorStatisticsAlert = createAction(\r\n 'manageEmailPreferences/SET_ISSUANCE_MONITOR_STATISTICS_ALERT',\r\n resolve => (statisticAlertState: StatisticsAlertOption) => resolve({ statisticAlertState })\r\n);\r\nconst setIssuanceMonitorFiltersAlert = createAction(\r\n 'manageEmailPreferences/SET_ISSUANCE_MONITOR_FILTERS_ALERT',\r\n resolve => (filtersAlertState: UserConfigFilter[]) => resolve({ filtersAlertState })\r\n);\r\n\r\nconst setArrangerPipelineAlert = createAction(\r\n 'manageEmailPreferences/SET_ARRANGER_PIPELINE_ALERT',\r\n resolve => (apAlertOption: AlertOption) => resolve({ apAlertOption }),\r\n);\r\n\r\nconst setCloManagersAnalyticsAlert = createAction(\r\n 'manageEmailPreferences/SET_CLO_MANAGERS_ANALYTICS_ALERT',\r\n resolve => (cloManagerAnalyticsAlert: CompanyAlertsConfig) => resolve({ cloManagerAnalyticsAlert }),\r\n);\r\n\r\nconst setCloManagersIssuanceMonitorAlert = createAction(\r\n 'manageEmailPreferences/SET_CLO_MANAGERS_ISSUANCE_MONITOR_ALERT',\r\n resolve => (cloManagerImAlertsConfig: CompanyAlertsConfig) => resolve({ cloManagerImAlertsConfig }),\r\n);\r\n\r\nconst setCloManagersArrangerPipelineAlert = createAction(\r\n 'manageEmailPreferences/SET_CLO_MANAGERS_ARRANGER_PIPELINE_ALERT',\r\n resolve => (cloManagerImAlertsConfig: CompanyAlertsConfig) => resolve({ cloManagerImAlertsConfig }),\r\n);\r\n\r\nconst setCloManagersBwicAlert = createAction(\r\n 'manageEmailPreferences/SET_CLO_MANAGERS_BWIC_ALERT',\r\n resolve => (cloManagerBwicAlert: SecondaryStatsAlertsConfig) => resolve({ cloManagerBwicAlert }),\r\n);\r\n\r\nconst setCloManagersDealerInventoryAlert = createAction(\r\n 'manageEmailPreferences/SET_CLO_MANAGERS_DEALER_INVENTORY_ALERT',\r\n resolve => (cloManagerDealerInventoryAlert: SecondaryStatsAlertsConfig) => resolve({ cloManagerDealerInventoryAlert }),\r\n);\r\n\r\nconst setBanksAnalyticsAlert = createAction(\r\n 'manageEmailPreferences/SET_BANKS_ANALYTICS_ALERT',\r\n resolve => (bankAnalyticsAlertConfig: DailyStatsAlertsConfig) => resolve({ bankAnalyticsAlertConfig }),\r\n);\r\n\r\nconst setBanksDealerInventoryAlert = createAction(\r\n 'manageEmailPreferences/SET_BANKS_DEALER_INVENTORY_ALERT',\r\n resolve => (bankDiAlertConfig: SecondaryStatsAlertsConfig) => resolve({ bankDiAlertConfig }),\r\n);\r\n\r\nconst setBanksIssuanceMonitorAlert = createAction(\r\n 'manageEmailPreferences/SET_BANKS_ISSUANCE_MONITOR_ALERT',\r\n resolve => (bankImAlertsConfig: CompanyAlertsConfig) => resolve({ bankImAlertsConfig }),\r\n);\r\n\r\nconst setBanksArrangerPipelineAlert = createAction(\r\n 'manageEmailPreferences/SET_BANKS_ARRANGER_PIPELINE_ALERT',\r\n resolve => (bankApAlertsConfig: CompanyAlertsConfig) => resolve({ bankApAlertsConfig }),\r\n);\r\nconst setSecondaryWeeklySummaryAlert = createAction(\r\n 'manageEmailPreferences/SET_SECONDARY_WEEKLY_SUMMARY_ALERT',\r\n resolve => (alertOption: AlertOption.Never | AlertOption.Weekly) => resolve({ alertOption }),\r\n);\r\nconst unsubscribeAllBWICsNotifications = createAction('manageEmailPreferences/UNSUBSCRIBE_ALL_BWIC_NOTIFICATIONS');\r\nconst unsubscribeAllIssuanceMonitor = createAction('manageEmailPreferences/UNSUBSCRIBE_ALL_ISSUANCE_MONITOR');\r\nconst unsubscribeAllCloManagers = createAction(\r\n 'manageEmailPreferences/UNSUBSCRIBE_ALL_CLO_MANAGERS',\r\n resolve => (userCompanyReferenceName?: string) => resolve({ userCompanyReferenceName }),\r\n);\r\nconst unsubscribeAllBanks = createAction(\r\n 'manageEmailPreferences/UNSUBSCRIBE_ALL_BANKS',\r\n resolve => (userCompanyReferenceName?: string) => resolve({ userCompanyReferenceName }),\r\n);\r\n\r\nconst unsubscribeAllPortfolio = createAction('manageEmailPreferences/UNSUBSCRIBE_ALL_PORTFOLIO');\r\nconst rollbackDashboardEmails = createAction('manageEmailPreferences/ROLLBACK_DASHBOARD_EMAILS');\r\nconst rollbackBWICPipelines = createAction('manageEmailPreferences/ROLLBACK_BWIC_PIPELINES');\r\nconst rollbackBWICNotifications = createAction('manageEmailPreferences/ROLLBACK_BWIC_NOTIFICATIONS');\r\nconst rollbackIssuanceMonitor = createAction('manageEmailPreferences/ROLLBACK_ISSUANCE_MONITOR');\r\nconst rollbackArrangerPipeline = createAction('manageEmailPreferences/ROLLBACK_ARRANGER_PIPELINE');\r\nconst rollbackCloManagers = createAction('manageEmailPreferences/ROLLBACK_CLO_MANAGERS');\r\nconst rollbackPortfolio = createAction('manageEmailPreferences/ROLLBACK_PORTFOLIO');\r\nconst rollbackInventory = createAction('manageEmailPreferences/ROLLBACK_INVENTORY');\r\nconst rollbackBanks = createAction('manageEmailPreferences/ROLLBACK_BANKS');\r\nconst saveRequest = createAction('manageEmailPreferences/SAVE_REQUEST');\r\nconst saveArrangerPipelineRequest = createAction('manageEmailPreferences/SAVE_ARRANGER_PIPELINE_REQUEST');\r\nconst saveBanksRequest = createAction('manageEmailPreferences/SAVE_BANKS_REQUEST');\r\nconst saveSuccess = createAction('manageEmailPreferences/SAVE_SUCCESS');\r\nconst saveFailure = createAction('manageEmailPreferences/SAVE_FAILURE');\r\nconst saveEmailPreferencesRequest = createAction('manageEmailPreferences/SAVE_EMAIL_PREFERENCES_REQUEST');\r\nconst saveEmailPreferencesSuccess = createAction(\r\n 'manageEmailPreferences/SAVE_EMAIL_PREFERENCES_SUCCESS',\r\n resolve => (emailPreferences: EmailPreferences) => resolve({ emailPreferences })\r\n);\r\nconst saveEmailPreferencesFailure = createAction('manageEmailPreferences/SAVE_EMAIL_PREFERENCES_FAILURE');\r\nconst savedFilterAlertOptionChange = createAction('manageEmailPreferences/SAVED_FILTER_ALERT_OPTION_CHANGE',\r\n resolve => (updated: SavedFiltersPreferencesState) => resolve({ updated })\r\n);\r\nconst savedFilterAlertOptionsReset = createAction('manageEmailPreferences/SAVED_FILTER_ALERT_OPTION_RESET');\r\nconst reset = createAction('manageEmailPreferences/RESET');\r\nconst initPortfolioFilterAlerts = createAction('manageEmailPreferences/INIT_PORTFOLIO_FILTER_ALERTS',\r\n resolve => (portfolioFilterAlerts: UserConfigFilter[]) => resolve({ portfolioFilterAlerts })\r\n);\r\nconst resetPortfolioFilterAlerts = createAction('manageEmailPreferences/RESET_PORTFOLIO_FILTER_ALERTS');\r\nconst portfolioSavedFilterAlertChange = createAction(\"manageEmailPreferences/SAVED_FILTER_ALERT_CHHANGE\",\r\n resolve => (filterReferenceName: string, bwicAlert: AlertOption | null, inventoryAlert: AlertOption | null) =>\r\n resolve({ filterReferenceName, bwicAlert, inventoryAlert }));\r\nconst portfolioSavedFilterGlobalAlertChange = createAction(\"manageEmailPreferences/SAVED_FILTER_GLOBAL_ALERT_CHANGE\",\r\n resolve => (bwicAlert?: AlertOption, inventoryAlert?: AlertOption) =>\r\n resolve({ bwicAlert, inventoryAlert }));\r\nconst portfolioGlobalAlertsChange = createAction(\r\n 'manageEmailPreferences/PORTFOLIO_GLOBAL_ALERTS_CHANGE',\r\n resolve =>\r\n (\r\n bwicGlobalAlertEnabled?: boolean,\r\n inventoryGlobalAlertEnabled?: boolean,\r\n cleansingNoticeAlertEnabled?: boolean,\r\n issuanceMonitorAlertEnabled?: boolean,\r\n outOfRiAlertEnabled?: boolean,\r\n outOfNcAlertEnabled?: boolean,\r\n rollerDeadlineAlertEnabled?: boolean,\r\n ) =>\r\n resolve({\r\n bwicGlobalAlertEnabled,\r\n inventoryGlobalAlertEnabled,\r\n cleansingNoticeAlertEnabled,\r\n issuanceMonitorAlertEnabled,\r\n outOfRiAlertEnabled,\r\n outOfNcAlertEnabled,\r\n rollerDeadlineAlertEnabled,\r\n }),\r\n);\r\n\r\nexport const manageEmailPreferencesActions = {\r\n getInitialDataRequest,\r\n getInitialDataSuccess,\r\n setRatingCheckedState,\r\n setRatingInCurrencyCheckedState,\r\n setAllRatingCheckedState,\r\n setRatingSize,\r\n setCheckedDailyDashboardEmail,\r\n setPortfolioBwicAlerts,\r\n setPortfolioCleansingNoticeAlerts,\r\n setPortfolioInventoryAlerts,\r\n setBwicByRatingPreferences,\r\n setDealerInventoryAlertState,\r\n setIssuanceMonitorSingleAlert,\r\n setIssuanceMonitorNewTransactionAlert,\r\n setIssuanceMonitorStatisticsAlert,\r\n setIssuanceMonitorFiltersAlert,\r\n setArrangerPipelineAlert,\r\n setCloManagersAnalyticsAlert,\r\n setCloManagersIssuanceMonitorAlert,\r\n setCloManagersArrangerPipelineAlert,\r\n setCloManagersBwicAlert,\r\n setCloManagersDealerInventoryAlert,\r\n setBanksAnalyticsAlert,\r\n setBanksDealerInventoryAlert,\r\n setBanksIssuanceMonitorAlert,\r\n setBanksArrangerPipelineAlert,\r\n setNewBiwicAlerts,\r\n setBiwicReminderAlerts,\r\n setPortfolioIssuanceMonitorAlerts,\r\n setPortfolioRiAlerts,\r\n setPortfolioNcAlerts,\r\n setPortfolioRollerDeadlineAlerts,\r\n setSecondaryWeeklySummaryAlert,\r\n unsubscribeAllBWICsNotifications,\r\n unsubscribeAllIssuanceMonitor,\r\n unsubscribeAllCloManagers,\r\n unsubscribeAllPortfolio,\r\n unsubscribeAllBanks,\r\n rollbackDashboardEmails,\r\n rollbackBWICPipelines,\r\n rollbackBWICNotifications,\r\n rollbackIssuanceMonitor,\r\n rollbackArrangerPipeline,\r\n rollbackPortfolio,\r\n rollbackInventory,\r\n rollbackCloManagers,\r\n rollbackBanks,\r\n saveRequest,\r\n saveArrangerPipelineRequest,\r\n saveBanksRequest,\r\n saveSuccess,\r\n saveFailure,\r\n saveEmailPreferencesRequest,\r\n saveEmailPreferencesSuccess,\r\n saveEmailPreferencesFailure,\r\n savedFilterAlertOptionChange,\r\n savedFilterAlertOptionsReset,\r\n reset,\r\n initPortfolioFilterAlerts,\r\n resetPortfolioFilterAlerts,\r\n portfolioSavedFilterAlertChange,\r\n portfolioSavedFilterGlobalAlertChange,\r\n portfolioGlobalAlertsChange\r\n};\r\n","import { AnyAction } from 'redux';\r\nimport { ThunkDispatch } from 'redux-thunk';\r\nimport { createCustomAction } from 'typesafe-actions';\r\nimport { biddingActions, notificationActions, sellerBiddingActions, tradeConfirmActions } from '.';\r\nimport { pushDataActions as actionTypes, roles } from '../constants';\r\nimport { logger } from '../logging/logger';\r\nimport { getSecuritiesWithLatestBids } from '../selectors';\r\nimport { BidRequest as BidAsDealerRequest } from '../types/bid-as-dealer/BidRequest';\r\nimport { SellerBuysideSearchResult } from '../types/bid-as-dealer/SellerBuysideSearchResult';\r\nimport { Bid } from '../types/bidding/Bid';\r\nimport { BidRequest, BidRequestType } from '../types/bidding/BidRequest';\r\nimport { Feedback } from '../types/bidding/Feedback';\r\nimport { BwicHistoryAction } from '../types/bwic-history/BwicHistoryAction';\r\nimport { Color } from '../types/bwic/Color';\r\nimport { PxTalk } from '../types/bwic/PxTalk';\r\nimport { BwicStatus } from '../types/enums/BwicStatus';\r\nimport { AutoFeedbackSettings } from '../types/models/AutoFeedbackSettings';\r\nimport { AppState } from '../types/state/AppState';\r\nimport { PushHistoryStateItemType } from '../types/state/PushHistoryState';\r\nimport { Trade } from '../types/trades/Trade';\r\nimport { user } from '../user';\r\nimport { biddingUtils, formatUtils, moneyUtils } from '../utils';\r\nimport { pushHistoryActions } from './entities/push-history.actions';\r\nimport { rejectedTradeActions } from './entities/rejected-trades.actions';\r\nimport { BwicHistoryActionType } from '../types/bwic-history/BwicHisoryActionType';\r\nimport { BidLevel } from '../types/bidding/BidLevel';\r\nimport { liveBiddingActions } from './entities/live-bidding.actions';\r\nimport { CanBidOnPosition } from '../types/live-bidding/LiveBiddingPosition';\r\nimport { CompanySlim } from '../types/company/CompanySlim';\r\n\r\ntype TDispatch = ThunkDispatch;\r\n\r\ninterface PushData {\r\n bwicReferenceName: string;\r\n action: BwicHistoryAction;\r\n}\r\nexport function dataPushReceived(data: any) {\r\n return (dispatch: TDispatch) => {\r\n switch (data.action.actionType) {\r\n case BwicHistoryActionType.NewBid:\r\n case BwicHistoryActionType.DirectBid:\r\n dispatch(handleNewBid(data));\r\n break;\r\n case BwicHistoryActionType.AxedFinalChanged:\r\n dispatch(handleAxedFinalChange(data));\r\n break;\r\n case BwicHistoryActionType.PriceTalk:\r\n dispatch(newPriceTalk(data));\r\n break;\r\n case BwicHistoryActionType.QuickFeedback:\r\n case BwicHistoryActionType.DirectFeedback:\r\n dispatch(handleQuickFeedback(data));\r\n break;\r\n case BwicHistoryActionType.TargetLevel:\r\n dispatch(targetLevel(data));\r\n break;\r\n case BwicHistoryActionType.TradedAway:\r\n dispatch(handleTradedAway(data));\r\n break;\r\n case BwicHistoryActionType.TradeSubmitted:\r\n dispatch(trade(data));\r\n break;\r\n case BwicHistoryActionType.TradeAffirmed:\r\n dispatch(tradeStatus(data));\r\n break;\r\n case BwicHistoryActionType.TradeRejected:\r\n dispatch(tradeStatus(data));\r\n break;\r\n case BwicHistoryActionType.ColorDistribution:\r\n dispatch(handleColorDistribution(data));\r\n break;\r\n case BwicHistoryActionType.ColorDistributionSend:\r\n dispatch(handleColorDistributionSend(data));\r\n break;\r\n case BwicHistoryActionType.Bidding:\r\n dispatch(handleBwicStatusChanged(data, BwicStatus.bidding));\r\n break;\r\n case BwicHistoryActionType.Finished:\r\n dispatch(handleBwicStatusChanged(data, BwicStatus.finished));\r\n break;\r\n case BwicHistoryActionType.Canceled:\r\n dispatch(handleBwicStatusChanged(data, BwicStatus.canceled));\r\n break;\r\n // TO DO: nothing is happen ON FE when stage 1 is started\r\n //case BwicHistoryActionType.OpenBiddingStage1Started:\r\n // dispatch(stagedBiddingStatusChange(data));\r\n // break;\r\n case BwicHistoryActionType.OpenBiddingStage1Ended:\r\n dispatch(handleStagedBiddingStartStage2(data));\r\n break;\r\n case BwicHistoryActionType.OpenBiddingStage2Ended:\r\n dispatch(handleStagedBiddingFinishStage2(data));\r\n break;\r\n case BwicHistoryActionType.OpenBiddingStage2Level:\r\n dispatch(handleLiveBiddingStage2Level(data));\r\n break;\r\n case BwicHistoryActionType.ModifyAutoFeedbackConfig:\r\n dispatch(handleAutoFeedbackSettingsChanged(data));\r\n break;\r\n case BwicHistoryActionType.BidAsDealerRequest:\r\n dispatch(handleBidAsDealerRequest(data));\r\n break;\r\n case BwicHistoryActionType.BuyerRejectedTrade:\r\n dispatch(rejectedTradeActions.pushBuyerRejectTrade(data.trade))\r\n break;\r\n case BwicHistoryActionType.BiddingCompleteReminder:\r\n dispatch(handleBwicCompleteReminder(data));\r\n break;\r\n default:\r\n return null;\r\n };\r\n };\r\n}\r\n\r\nconst newBid = createCustomAction('push/bwic/NEW_BID', type =>\r\n (bwicReferenceName: string, positionId: number, historyAction: BwicHistoryAction, bid: Bid) =>\r\n ({ type, bwicReferenceName, positionId, historyAction, bid })\r\n);\r\ntype TNewBidPushData = { bwicReferenceName: string; action: BwicHistoryAction; bid: Bid, bwicName: string; };\r\n\r\nfunction handleNewBid({ bwicReferenceName, action, bid, bwicName }: TNewBidPushData) {\r\n logger.trace(`Push: New Bid: ${bid.value}`);\r\n\r\n return (dispatch: TDispatch, getState: () => AppState) => {\r\n dispatch(newBid(bwicReferenceName, action.positionId!, action, bid));\r\n dispatch(pushHistoryActions.add(\r\n { receivedDate: new Date(), positionId: action.positionId, bwicReferenceName },\r\n PushHistoryStateItemType.NewBid\r\n ))\r\n if (user.hasRoles(roles.SellerTrader) && action.positionId != null) {\r\n const { securities, tradingPositions } = getState().sellerBidding;\r\n const isPositionTrading = !!(tradingPositions && Object.keys(tradingPositions).length && tradingPositions[action.positionId]);\r\n\r\n if (isPositionTrading) {\r\n const position = securities.find(p => p.id === action.positionId);\r\n if (position) {\r\n const [positionWithActualBids] = getSecuritiesWithLatestBids({ securities: [position] });\r\n const [best] = biddingUtils.getBidsByLevel(positionWithActualBids.bids, BidLevel.Best);\r\n if (best && +best.value <= +bid.value) {\r\n dispatch(sellerBiddingActions.tradingPositionCompanyChange(action.positionId, biddingUtils.getBidCompanyIdentifier(bid)));\r\n dispatch(sellerBiddingActions.tradeConfirm(false));\r\n dispatch(notificationActions.warningModal(\r\n 'New Bid Notification',\r\n `
The Best level changed. Please review bids and re-submit the trade.
New bid from ${bid.company.name}.\r\n ${bwicName}\r\n ${position.ticker} ${moneyUtils.amountToMM(position.size, true)} @${formatUtils.formatBid(bid.value)}`\r\n ));\r\n }\r\n }\r\n }\r\n }\r\n };\r\n}\r\n\r\nconst axedFinalChange = createCustomAction('push/bwic/AXED_FINAL_CHANGE', type => (\r\n bwicReferenceName: string,\r\n positionId: number,\r\n historyAction: BwicHistoryAction,\r\n modifiedDate: Date,\r\n bidId: number,\r\n axed: boolean,\r\n final: boolean,\r\n createdBy: string,\r\n company: CompanySlim) => ({\r\n type,\r\n bwicReferenceName,\r\n positionId,\r\n historyAction,\r\n modifiedDate,\r\n bidId,\r\n axed,\r\n final,\r\n createdBy,\r\n company\r\n }));\r\ninterface TAxedFinalChangePushData extends PushData {\r\n modifiedDate: Date;\r\n bidId: number;\r\n axed: boolean;\r\n final: boolean;\r\n createdBy: string;\r\n company: CompanySlim;\r\n}\r\nfunction handleAxedFinalChange({ bwicReferenceName, action, bidId, axed, final, modifiedDate, createdBy, company }: TAxedFinalChangePushData) {\r\n logger.trace(`Push: Axed Final Change for Bid ${bidId} axed=${axed} final=${final}`);\r\n return axedFinalChange(bwicReferenceName, action.positionId!, action, modifiedDate, bidId, axed, final, createdBy, company);\r\n}\r\n\r\ninterface PriceTalkPushData extends PushData {\r\n priceTalk: PxTalk;\r\n}\r\nfunction newPriceTalk({ bwicReferenceName, action, priceTalk }: PriceTalkPushData) {\r\n logger.trace(`Push: New Price Talk: ${priceTalk.talk}`);\r\n\r\n return {\r\n type: actionTypes.PUSH_DATA_NEW_PX_TALK,\r\n bwicReferenceName,\r\n positionId: action.positionId,\r\n priceTalk,\r\n historyAction: action\r\n }\r\n}\r\n\r\nconst quickFeedback = createCustomAction('push/bwic/QUICK_FEEDBACK', type =>\r\n (bwicReferenceName: string, feedback: Feedback, historyAction: BwicHistoryAction, positionId?: number) =>\r\n ({ type, bwicReferenceName, feedback, historyAction, positionId })\r\n);\r\nconst bidRequest = createCustomAction('push/bwic/BID_REQUEST_FEEDBACK', type =>\r\n (bwicReferenceName: string, bidRequest: BidRequest, historyAction: BwicHistoryAction, positionId?: number) =>\r\n ({ type, bwicReferenceName, bidRequest, historyAction, positionId })\r\n);\r\ninterface QuickFeedbackPushData extends PushData {\r\n feedback: Feedback;\r\n}\r\nfunction handleQuickFeedback({ bwicReferenceName, action, feedback }: QuickFeedbackPushData) {\r\n logger.trace(`Push: Quick Feedback: ${feedback.feedback}`);\r\n return (dispatch: TDispatch) => {\r\n dispatch(pushHistoryActions.add(\r\n { receivedDate: new Date(), positionId: action.positionId, bwicReferenceName },\r\n PushHistoryStateItemType.Feedback\r\n ))\r\n\r\n if (feedback.bidId) {\r\n return dispatch(quickFeedback(bwicReferenceName, feedback, action, action.positionId));\r\n }\r\n\r\n const request: BidRequest = {\r\n bidRequestType: BidRequestType.BidOrPass,\r\n created: new Date()\r\n }\r\n\r\n dispatch(bidRequest(bwicReferenceName, request, action, action.positionId));\r\n }\r\n}\r\ninterface TradeLevelPushData extends PushData {\r\n targetLevel?: number;\r\n}\r\n\r\nfunction targetLevel({ bwicReferenceName, action, targetLevel }: TradeLevelPushData) {\r\n logger.trace(`Push: Target Level: ${targetLevel}`);\r\n\r\n return {\r\n type: actionTypes.PUSH_DATA_TARGET_LEVEL,\r\n bwicReferenceName,\r\n positionId: action.positionId,\r\n targetLevel\r\n };\r\n}\r\n\r\nconst tradedAway = createCustomAction('push/bwic/TRADED_AWAY', type =>\r\n (bwicReferenceName: string, positionId: number, historyAction: BwicHistoryAction, isTradedAway: boolean) =>\r\n ({ type, bwicReferenceName, positionId, historyAction, isTradedAway })\r\n);\r\ninterface TradedAwayPushData extends PushData {\r\n isTradedAway: boolean;\r\n}\r\nfunction handleTradedAway({ bwicReferenceName, action, isTradedAway }: TradedAwayPushData) {\r\n logger.trace(`Push: Traded away ${bwicReferenceName}: ${isTradedAway}`);\r\n return tradedAway(bwicReferenceName, action.positionId!, action, isTradedAway);\r\n}\r\n\r\ninterface TradePushData extends PushData {\r\n trade: Trade;\r\n}\r\nfunction trade({ bwicReferenceName, action, trade }: TradePushData) {\r\n logger.trace('Push: Trade');\r\n return (dispatch: TDispatch) => {\r\n dispatch(tradeAction(bwicReferenceName, action.positionId!, action, trade));\r\n dispatch(checkAwaitingTrades());\r\n };\r\n}\r\n\r\nfunction checkAwaitingTrades() {\r\n return (dispatch: TDispatch) => {\r\n if (user.hasRoles(roles.BrokerDealerTrader, roles.SellerTrader)) {\r\n dispatch(tradeConfirmActions.checkAwaitingTrades());\r\n }\r\n };\r\n}\r\n\r\ninterface TradeStatusPushData extends PushData {\r\n trade: Trade;\r\n}\r\nfunction tradeStatus({ bwicReferenceName, action, trade }: TradeStatusPushData) {\r\n logger.trace(`Push: Trade Status: ${trade.status}`);\r\n\r\n return (dispatch: TDispatch) => {\r\n dispatch(tradeAction(bwicReferenceName, action.positionId!, action, trade));\r\n\r\n if (user.hasRoles(roles.BrokerDealerTrader, roles.SellerTrader)) {\r\n dispatch(tradeConfirmActions.setAwaitingBwicTradeStatus(\r\n [action.positionId],\r\n trade.status,\r\n trade.rejectReason\r\n ));\r\n }\r\n };\r\n}\r\n\r\nconst tradeAction = createCustomAction('push/bwic/TRADE', type =>\r\n (bwicReferenceName: string, positionId: number, historyAction: BwicHistoryAction, trade: Trade) =>\r\n ({ type, bwicReferenceName, historyAction, trade, positionId })\r\n);\r\n\r\nconst colorDistribution = createCustomAction('push/bwic/COLOR_DISTRIBUTION', type =>\r\n (bwicReferenceName: string, historyAction: BwicHistoryAction, isColorDistribution: boolean) =>\r\n ({ type, bwicReferenceName, isColorDistribution, historyAction })\r\n);\r\ninterface ColorDistributionPushData extends PushData {\r\n isColorDistribution: boolean;\r\n}\r\nfunction handleColorDistribution({ bwicReferenceName, action, isColorDistribution }: ColorDistributionPushData) {\r\n logger.trace(`Push: Color Distribution ${bwicReferenceName}: ${isColorDistribution}`);\r\n return colorDistribution(bwicReferenceName, action, isColorDistribution);\r\n}\r\n\r\nexport type TPositionColor = { positionId: number; color: Color };\r\n\r\ninterface ColorDistributionSendPushData extends PushData {\r\n colors: TPositionColor[]\r\n}\r\n\r\nconst publicColors = createCustomAction('push/bwic/PUBLIC_COLORS', type =>\r\n (bwicReferenceName: string, historyAction: BwicHistoryAction, colors: TPositionColor[]) =>\r\n ({ type, bwicReferenceName, colors, historyAction })\r\n);\r\n\r\nfunction handleColorDistributionSend({ bwicReferenceName, action, colors }: ColorDistributionSendPushData) {\r\n logger.trace('Push: Colors Sent');\r\n return publicColors(bwicReferenceName, action, colors);\r\n}\r\n\r\nconst bwicStatusChanged = createCustomAction('push/bwic/BWIC_STATUS_CHANGE', type =>\r\n (bwicReferenceName: string, historyAction: BwicHistoryAction, bwicStatus: BwicStatus) =>\r\n ({ type, bwicReferenceName, historyAction, bwicStatus })\r\n);\r\n\r\nfunction handleBwicStatusChanged({ bwicReferenceName, action }: PushData, bwicStatus: BwicStatus) {\r\n logger.trace(`Push: BWIC Status Changed: ${bwicStatus}`);\r\n\r\n return (dispatch: TDispatch) => {\r\n dispatch(liveBiddingActions.reset(bwicReferenceName));\r\n dispatch(bwicStatusChanged(bwicReferenceName, action, bwicStatus));\r\n dispatch(pushHistoryActions.add(\r\n { receivedDate: new Date(), bwicReferenceName },\r\n PushHistoryStateItemType.BwicStatusChanged\r\n ));\r\n dispatch(biddingActions.bwicStatusChange(bwicReferenceName, bwicStatus));\r\n if (bwicStatus === BwicStatus.finished) {\r\n dispatch(checkAwaitingTrades());\r\n }\r\n };\r\n}\r\n\r\ninterface StartStage2PushData extends PushData {\r\n bwicName: string;\r\n stage1EndDateUtc?: Date;\r\n canDealerBidOnPositions?: CanBidOnPosition[];\r\n}\r\n\r\nconst stagedBiddingStartStage2 = createCustomAction('push/bwic/STAGED_BIDDING_START_STAGE2', type => (\r\n bwicReferenceName: string,\r\n historyAction: BwicHistoryAction,\r\n canDealerBidOnPositions?: CanBidOnPosition[],\r\n stage1EndDateUtc?: Date) =>\r\n ({ type, bwicReferenceName, historyAction, canDealerBidOnPositions, stage1EndDateUtc })\r\n);\r\nfunction handleStagedBiddingStartStage2({ bwicReferenceName, stage1EndDateUtc, canDealerBidOnPositions, action }: StartStage2PushData) {\r\n logger.trace('Push: Open Bidding Start Stage 2');\r\n return (dispatch: TDispatch) => {\r\n dispatch(liveBiddingActions.stage2Start(bwicReferenceName, canDealerBidOnPositions, stage1EndDateUtc));\r\n dispatch(stagedBiddingStartStage2(bwicReferenceName, action, canDealerBidOnPositions, stage1EndDateUtc));\r\n dispatch(pushHistoryActions.add(\r\n { receivedDate: new Date(), positionId: action.positionId, bwicReferenceName },\r\n PushHistoryStateItemType.BwicStage1Ended\r\n ));\r\n };\r\n}\r\n\r\nconst stagedBiddingFinishStage2 = createCustomAction('push/bwic/STAGED_BIDDING_FINISH_STAGE2', type =>\r\n (bwicReferenceName: string, historyAction: BwicHistoryAction) =>\r\n ({ type, bwicReferenceName, historyAction })\r\n);\r\n\r\nfunction handleStagedBiddingFinishStage2({ bwicReferenceName, action }: PushData) {\r\n logger.trace(`Push: Finish Stage 2 ${bwicReferenceName}`);\r\n return (dispatch: TDispatch) => {\r\n dispatch(liveBiddingActions.reset(bwicReferenceName));\r\n dispatch(stagedBiddingFinishStage2(bwicReferenceName, action));\r\n dispatch(pushHistoryActions.add(\r\n { receivedDate: new Date(), positionId: action.positionId, bwicReferenceName },\r\n PushHistoryStateItemType.BwicStage2Ended\r\n ));\r\n };\r\n}\r\n\r\ninterface LiveBiddingStage2LevelPushData extends PushData {\r\n level: number;\r\n tiedForBest: boolean;\r\n}\r\n\r\nconst liveBiddingStage2Level = createCustomAction('push/bwic/LIVE_BIDDING_STAGE2_LEVEL', type =>\r\n (bwicReferenceName: string, positionId: number, level: number, tiedForBest: boolean, sentDateUtc: Date) =>\r\n ({ type, bwicReferenceName, positionId, level, tiedForBest, sentDateUtc })\r\n);\r\n\r\nfunction handleLiveBiddingStage2Level({ bwicReferenceName, level, tiedForBest, action }: LiveBiddingStage2LevelPushData) {\r\n logger.trace(`Push: Open Bidding Feedback: ${level}`);\r\n\r\n return (dispatch: TDispatch) => {\r\n dispatch(liveBiddingActions.stage2LevelChange(bwicReferenceName, action.positionId!, level, tiedForBest, action.sentDateUtc));\r\n dispatch(liveBiddingStage2Level(bwicReferenceName, action.positionId!, level, tiedForBest, action.sentDateUtc));\r\n }\r\n}\r\n\r\ninterface AutoFeedbackSettingsChangedPushData extends PushData {\r\n autoFeedbackConfiguration: AutoFeedbackSettings;\r\n}\r\nfunction handleAutoFeedbackSettingsChanged({ bwicReferenceName, autoFeedbackConfiguration }: AutoFeedbackSettingsChangedPushData) {\r\n logger.trace('Push: Auto-Feedback config update');\r\n\r\n return {\r\n type: actionTypes.PUSH_DATA_AUTO_FEEDBACK_CONFIG,\r\n bwicReferenceName,\r\n settings: autoFeedbackConfiguration\r\n };\r\n}\r\n\r\nconst bidAsDealerRequest = createCustomAction('push/bwic/BID_REQUEST',\r\n type => (bwicReferenceName: string, bidAsDealerRequest: BidAsDealerRequest | SellerBuysideSearchResult) =>\r\n ({ type, bwicReferenceName, bidAsDealerRequest })\r\n);\r\n\r\ninterface TBidAsDealerRequestPushData {\r\n bwicReferenceName: string;\r\n bidAsDealerRequest?: BidAsDealerRequest;\r\n sellerBidAsDealerRequest?: SellerBuysideSearchResult;\r\n}\r\n\r\nfunction handleBidAsDealerRequest(data: TBidAsDealerRequestPushData) {\r\n logger.trace(`Push: Bid as dealer request.`);\r\n return (dispatch: TDispatch) => {\r\n const bidRequest = data.bidAsDealerRequest ?? data.sellerBidAsDealerRequest;\r\n if (bidRequest != null) {\r\n dispatch(bidAsDealerRequest(data.bwicReferenceName, bidRequest));\r\n }\r\n }\r\n}\r\n\r\ninterface TBwicCompleteReminderData extends PushData {\r\n bwicName: string;\r\n}\r\nfunction handleBwicCompleteReminder({ bwicReferenceName, bwicName, action }: TBwicCompleteReminderData) {\r\n return pushHistoryActions.add(\r\n { receivedDate: new Date(), bwicReferenceName, payload: { bwicName, remainingMinutes: Number(action.payload) } },\r\n PushHistoryStateItemType.BiddingCompleteReminder\r\n );\r\n}\r\n\r\nexport const pushBwicActions = {\r\n newBid,\r\n axedFinalChange,\r\n bidAsDealerRequest,\r\n quickFeedback,\r\n bidRequest,\r\n publicColors,\r\n colorDistribution,\r\n bwicStatusChanged,\r\n tradeAction,\r\n tradedAway,\r\n stagedBiddingStartStage2,\r\n stagedBiddingFinishStage2,\r\n liveBiddingStage2Level\r\n}\r\n","import { createAction } from 'typesafe-actions';\r\nimport { SettlementAgentClientAgreement } from '../types/bid-as-dealer/SettlementAgentClientAgreement';\r\nimport { UpdateSettlementAgentAgreementStatus } from '../types/bid-as-dealer/UpdateSettlementAgentAgreementStatus';\r\nimport { RequestState } from '../constants/request-state';\r\nimport { CurrencyRate } from '../types/currency/CurrencyRate';\r\n\r\nconst fetchListRequest = createAction(\r\n 'clientCompanies/FETCH_LIST_REQUEST',\r\n);\r\n\r\nconst fetchListSuccess = createAction(\r\n 'clientCompanies/FETCH_LIST_SUCCESS',\r\n resolve => (data: SettlementAgentClientAgreement[]) => resolve({ data })\r\n);\r\n\r\nconst fetchListFailure = createAction(\r\n 'clientCompanies/FETCH_LIST_FAILURE'\r\n);\r\n\r\nconst setSelectedAgreement = createAction(\r\n 'clientCompanies/ON_SELECTED_COMPANY_FOR_AFFIRM',\r\n resolve => (companyId: number) => resolve({ companyId })\r\n);\r\n\r\nconst resetSelectedAgreement = createAction(\r\n 'clientCompanies/ON_UN_SELECT_COMPANY_FOR_AFFIRM'\r\n);\r\n\r\nconst updateAgreementRequest = createAction(\r\n 'clientCompanies/UPDATE_REQUEST_STATUS_REQUEST',\r\n resolve => (requestData: UpdateSettlementAgentAgreementStatus) => resolve({ requestData })\r\n);\r\n\r\nconst updateAgreementSuccess = createAction(\r\n 'clientCompanies/UPDATE_REQUEST_STATUS_SUCCESS',\r\n resolve => (assetManagerId: number) => resolve( { assetManagerId })\r\n);\r\n\r\nconst updateAgreementFailure = createAction(\r\n 'clientCompanies/UPDATE_REQUEST_STATUS_FAILURE',\r\n resolve => (assetManagerId: number) => resolve( { assetManagerId })\r\n);\r\n\r\nconst setSearchString = createAction(\r\n 'clientCompanies/SET_SEARCH_STRING',\r\n resolve => (searchString: string) => resolve({ searchString })\r\n);\r\n\r\nconst fetchPendingAgreementCountRequest = createAction(\r\n 'clientCompanies/FETCH_PENDING_REQUESTS_COUNT_REQUEST'\r\n);\r\n\r\nconst fetchPendingAgreementsCountSuccess = createAction(\r\n 'clientCompanies/FETCH_PENDING_REQUESTS_COUNT_SUCCESS',\r\n resolve => (count: number) => resolve({ count })\r\n);\r\n\r\nconst fetchPendingAgreementsCountFailure = createAction('clientCompanies/FETCH_PENDING_REQUESTS_COUNT_FAILURE');\r\n\r\nconst hideActivePanels = createAction('clientCompanies/HIDE_ACTIVE_PANELS');\r\n\r\nconst setVisibleUpdateRatePopup = createAction(\r\n 'clientCompanies/SET_VISIBLE_UPDATE_RATE_POPUP',\r\n resolve => (visible: boolean) => resolve({ visible })\r\n);\r\nconst getCurrencyRate = createAction('clientCompanies/GET_CURRENCY_RATE');\r\nconst setResultGetCurrencyRate = createAction(\r\n 'clientCompanies/SET_RESULT_GET_CURRENCY_RATE',\r\n resolve => (requestState: RequestState, rate: CurrencyRate[]) => resolve({ requestState, rate })\r\n);\r\n\r\nconst updateCurrencyRate = createAction(\r\n 'clientCompanies/UPDATE_CURRENCY_RATE',\r\n resolve => (rate: CurrencyRate) => resolve({ rate })\r\n);\r\nconst setResultUpdateCurrencyRate = createAction(\r\n 'clientCompanies/SET_RESULT_UPDATE_CURRENCY_RATE',\r\n resolve => (requestState: RequestState, rate?: CurrencyRate) => resolve({ requestState, rate })\r\n);\r\n\r\nconst reset = createAction(\r\n 'clientCompanies/RESET'\r\n);\r\n\r\nexport const clientsCompaniesActions = {\r\n fetchListRequest,\r\n fetchListSuccess,\r\n fetchListFailure,\r\n setSelectedAgreement,\r\n resetSelectedAgreement,\r\n updateAgreementRequest,\r\n updateAgreementSuccess,\r\n updateAgreementFailure,\r\n setSearchString,\r\n fetchPendingAgreementCountRequest,\r\n fetchPendingAgreementsCountSuccess,\r\n fetchPendingAgreementsCountFailure,\r\n hideActivePanels,\r\n setVisibleUpdateRatePopup,\r\n getCurrencyRate,\r\n setResultGetCurrencyRate,\r\n updateCurrencyRate,\r\n setResultUpdateCurrencyRate,\r\n reset,\r\n};\r\n","import { createAction } from 'typesafe-actions';\r\nimport { DateFilterOption } from '../types/filters/DateFilterOption';\r\nimport { DateRange } from '../types/filters/DateRange';\r\n\r\nconst toogleFilterSalesRepresentative = createAction('manage-companies/COMPANY_FILTER_TOOGLE_SALES_REPS',\r\n resolve => (salesRepresentatives: number[]) => resolve({ salesRepresentatives })\r\n)\r\n\r\nconst setFilterSalesRepresentative = createAction('manage-companies/COMPANY_FILTER_SET_SALES_REPS',\r\n resolve => (salesRepresentatives: number[]) => resolve({ salesRepresentatives })\r\n)\r\n\r\nconst toogleFilterRegBy = createAction('manage-companies/COMPANY_FILTER_TOOGLE_REG_BY',\r\n resolve => (regBy: number[]) => resolve({ regBy })\r\n)\r\n\r\nconst setFilterRegBy = createAction('manage-companies/COMPANY_FILTER_SET_REG_BY',\r\n resolve => (regBy: number[]) => resolve({ regBy })\r\n)\r\n\r\nconst toogleFilterStatusActive = createAction('manage-companies/COMPANY_FILTER_TOOGLE_STATUS_ACTIVE');\r\nconst toogleFilterStatusBlocked = createAction('manage-companies/COMPANY_FILTER_TOOGLE_STATUS_BLOCKED');\r\nconst toogleFilterStatusOffPlatform = createAction('manage-companies/COMPANY_FILTER_TOOGLE_STATUS_OFF_PLATFORM');\r\n\r\nconst toogleFilterRoleAdministrator = createAction('manage-companies/COMPANY_FILTER_TOOGLE_ROLE_ADMINISTRATOR')\r\nconst toogleFilterRoleBrokerDealer = createAction('manage-companies/COMPANY_FILTER_TOOGLE_ROLE_BROKER_DEALER')\r\nconst toogleFilterRoleSeller = createAction('manage-companies/COMPANY_FILTER_TOOGLE_ROLE_SELLER')\r\nconst toogleFilterRoleViewer = createAction('manage-companies/COMPANY_FILTER_TOOGLE_ROLE_VIEWER')\r\nconst toogleFilterRoleMedia = createAction('manage-companies/COMPANY_FILTER_TOOGLE_ROLE_MEDIA')\r\n\r\nconst setDateFilterChange = createAction('manage-companies/COMPANY_FILTER_DATE_CHANGED',\r\n resolve => (dateOption: DateFilterOption) => resolve({ dateOption })\r\n)\r\n\r\nconst setDateFilterRangeChange = createAction('manage-companies/COMPANY_FILTER_DATE_RANGE_CHANGED',\r\n resolve => (dateRange: DateRange) => resolve({ dateRange })\r\n)\r\n\r\nexport const manageCompaniesFiltersActions = {\r\n toogleFilterSalesRepresentative,\r\n setFilterSalesRepresentative,\r\n toogleFilterRegBy,\r\n setFilterRegBy,\r\n toogleFilterStatusActive,\r\n toogleFilterStatusBlocked,\r\n toogleFilterStatusOffPlatform,\r\n toogleFilterRoleAdministrator,\r\n toogleFilterRoleBrokerDealer,\r\n toogleFilterRoleSeller,\r\n toogleFilterRoleViewer,\r\n toogleFilterRoleMedia,\r\n setDateFilterChange,\r\n setDateFilterRangeChange\r\n}","import { searchSecuritiesActions as actionTypes, constants } from '../constants';\r\nimport { errorActions } from '../actions';\r\nimport { bwicService } from '../services';\r\n\r\nexport const searchSecuritiesActions = {\r\n searchTermChange,\r\n resetSearchLookup,\r\n applyLookupItem,\r\n removeSearchItem,\r\n moveBack,\r\n moveForward,\r\n removeCurrentItem,\r\n addSearchItem,\r\n reset\r\n};\r\n\r\nlet loadSearchLookupTimeout = null;\r\n\r\nfunction searchTermChange(searchTerm = '', showLookup = true) {\r\n return (dispatch, getState) => {\r\n dispatch({ type: actionTypes.SEARCH_TERM_CHANGE, search: { searchTerm } });\r\n\r\n const trimmedSearchTerm = searchTerm.trim();\r\n\r\n if (trimmedSearchTerm && trimmedSearchTerm.length > constants.searchTermAcceptedLength) {\r\n const { searchTermCache, lookupCache } = getState().searchSecurities;\r\n const searchTermLowerCase = trimmedSearchTerm.toLowerCase();\r\n\r\n if (searchTermCache &&\r\n searchTermLowerCase.startsWith(searchTermCache.toLowerCase())) {\r\n dispatch(searchInLookupCache(searchTermLowerCase, lookupCache));\r\n } else if (showLookup) {\r\n if (loadSearchLookupTimeout) {\r\n clearTimeout(loadSearchLookupTimeout)\r\n }\r\n loadSearchLookupTimeout = setTimeout(() => dispatch(loadSearchLookup(trimmedSearchTerm)), 400);\r\n }\r\n } else {\r\n dispatch(resetSearchLookup());\r\n }\r\n };\r\n}\r\n\r\nfunction searchInLookupCache(searchTerm, lookupCache) {\r\n return {\r\n type: actionTypes.SEARCH_LOOKUP,\r\n lookupData: lookupCache.filter(l =>\r\n (l.isin && l.isin.toLowerCase().startsWith(searchTerm)) ||\r\n (l.cusip && l.cusip.toLowerCase().startsWith(searchTerm)) ||\r\n (l.ticker && l.ticker.toLowerCase().startsWith(searchTerm))\r\n )\r\n };\r\n}\r\n\r\nfunction loadSearchLookup(searchTerm) {\r\n return dispatch => {\r\n bwicService\r\n .searchSecurities(searchTerm, true)\r\n .then(success)\r\n .catch(e => dispatch(errorActions.error(e)));\r\n\r\n function success(securities) {\r\n dispatch({\r\n type: actionTypes.SEARCH_LOOKUP_CACHE,\r\n lookupData: securities.map(s => ({\r\n id: s.id,\r\n isin: s.isin,\r\n cusip: s.cusip,\r\n isinCusip: s.isinCusip,\r\n ticker: s.ticker\r\n })),\r\n searchTerm\r\n });\r\n }\r\n };\r\n}\r\n\r\nfunction applyLookupItem(lookupItem) {\r\n return (dispatch, getState) => {\r\n const { searchSecurities } = getState();\r\n let searchTerm;\r\n if (typeof lookupItem === 'object') {\r\n const stateSearchTerm = searchSecurities.searchTerm.toLowerCase();\r\n if (lookupItem.isin && lookupItem.isin.toLowerCase().startsWith(stateSearchTerm)) {\r\n searchTerm = lookupItem.isin;\r\n } else if (lookupItem.cusip && lookupItem.cusip.toLowerCase().startsWith(stateSearchTerm)) {\r\n searchTerm = lookupItem.cusip;\r\n } else {\r\n searchTerm = lookupItem.ticker;\r\n }\r\n } else {\r\n searchTerm = lookupItem.trim();\r\n }\r\n\r\n if (searchTerm && !searchSecurities.searchTermItems.includes(searchTerm)) {\r\n dispatch(addSearchItem(searchTerm));\r\n }\r\n dispatch(searchTermChange(''));\r\n dispatch(resetSearchLookup());\r\n };\r\n}\r\n\r\nfunction moveBack() {\r\n return {\r\n type: actionTypes.SECURITY_SEARCH_MOVE_BACK,\r\n };\r\n}\r\n\r\nfunction moveForward() {\r\n return {\r\n type: actionTypes.SECURITY_SEARCH_MOVE_FORWARD,\r\n };\r\n}\r\nfunction addSearchItem(item) {\r\n return {\r\n type: actionTypes.SECURITY_SEARCH_ITEM_ADD,\r\n payload: { item }\r\n };\r\n}\r\n\r\nfunction removeSearchItem(index) {\r\n return {\r\n type: actionTypes.SECURITY_SEARCH_ITEM_REMOVE,\r\n payload: { index }\r\n };\r\n}\r\n\r\nfunction removeCurrentItem() {\r\n return {\r\n type: actionTypes.SECURITY_SEARCH_REMOVE_CURRENT_ITEM,\r\n };\r\n}\r\n\r\nfunction resetSearchLookup() {\r\n return {\r\n type: actionTypes.SEARCH_LOOKUP,\r\n lookupData: [],\r\n classesLookup: [],\r\n };\r\n}\r\n\r\nfunction reset() {\r\n return {\r\n type: actionTypes.RESET\r\n };\r\n}\r\n","import { createAsyncAction, ActionType, createAction } from 'typesafe-actions';\r\nimport { HelpResourceCategory } from '../types/help-resources/HelpResourceCategory';\r\nimport { HelpResourceArticle } from '../types/help-resources/HelpResourceArticle';\r\nimport { HelpResourceSearchItem } from '../types/help-resources/HelpResourceSearch';\r\n\r\nexport type TResourcesActions = ActionType<\r\n typeof fetchCategories |\r\n typeof fetchSection |\r\n typeof fetchBySearch |\r\n typeof loadMoreSearch |\r\n typeof resetSection |\r\n typeof resetSearch\r\n>;\r\n\r\ninterface SuccessSectionDetails {\r\n categoryName: string;\r\n sectionName: string;\r\n articles: HelpResourceArticle[];\r\n}\r\n\r\nconst fetchSection = createAsyncAction(\r\n 'help-resources/REQUEST_SECTION_DETAILS',\r\n 'help-resources/SUCCESS_SECTION_DETAILS',\r\n 'help-resources/FAILURE_SECTION_DETAILS'\r\n)<{ sectionId: number }, SuccessSectionDetails, Error>()\r\n\r\nconst fetchCategories = createAsyncAction(\r\n 'help-resources/REQUEST_CATEGORIES',\r\n 'help-resources/SUCCESS_CATEGORIES',\r\n 'help-resources/FAILURE_CATEGORIES'\r\n)()\r\n\r\nconst fetchBySearch = createAsyncAction(\r\n 'help-resources/REQUEST_SEARCH',\r\n 'help-resources/SUCCESS_SEARCH',\r\n 'help-resources/FAILURE_SEARCH'\r\n)<{ search: string, categoryId: number | null }, { results: HelpResourceSearchItem[], totalRecordNumber: number }, Error>()\r\n\r\nconst loadMoreSearch = createAsyncAction(\r\n 'help-resources/REQUEST_LOAD_MORE_SEARCH',\r\n 'help-resources/SUCCESS_LOAD_MORE_SEARCH',\r\n 'help-resources/FAILURE_LOAD_MORE_SEARCH'\r\n)<{ search: string, categoryId: number | null, page: number }, { results: HelpResourceSearchItem[], totalRecordNumber: number }, Error>()\r\n\r\nconst resetSection = createAction('help-resources/RESET_SECTION');\r\nconst resetSearch = createAction('help-resources/RESET_SEARCH');\r\n\r\nexport const helpResourcesActions = {\r\n fetchCategories,\r\n fetchSection,\r\n fetchBySearch,\r\n loadMoreSearch,\r\n resetSection,\r\n resetSearch\r\n}","import { ActionType, createAction } from 'typesafe-actions';\r\nimport { ManageEmailFilterState } from '../types/state/ManageEmailState';\r\n\r\nconst setFilter = createAction(\r\n 'manageEmail/UPDATE_FILTER',\r\n resolve => (filter: ManageEmailFilterState) => resolve({ filter })\r\n)\r\n\r\nexport type manageEmailActionsType = ActionType\r\n\r\nexport const manageEmailActions = {\r\n setFilter,\r\n}\r\n","import { createAction } from 'typesafe-actions';\r\n\r\nconst confirmRequest = createAction(\r\n 'portfolioAgreementDisclaimer/CONFIRM_REQUEST',\r\n resolve => (onConfirm?: () => void) => resolve({ onConfirm })\r\n);\r\nconst confirmSuccess = createAction('portfolioAgreementDisclaimer/CONFIRM_SUCCESS');\r\nconst confirmFailure = createAction('portfolioAgreementDisclaimer/CONFIRM_FAILURE');\r\n\r\nconst downloadFileRequest = createAction('portfolioAgreementDisclaimer/DOWNLOAD_FILE_REQUEST');\r\nconst downloadFileSuccess = createAction('portfolioAgreementDisclaimer/DOWNLOAD_FILE_SUCCESS');\r\nconst downloadFileFailure = createAction('portfolioAgreementDisclaimer/DOWNLOAD_FILE_FAILURE');\r\n\r\nconst show = createAction(\r\n 'portfolioAgreementDisclaimer/SHOW',\r\n resolve => (blockerId: string, text?:string) => resolve({ blockerId, text })\r\n);\r\nconst hide = createAction(\r\n 'portfolioAgreementDisclaimer/HIDE',\r\n resolve => (confirmed: boolean) => resolve({ confirmed })\r\n);\r\n\r\nconst reset = createAction('portfolioAgreementDisclaimer/RESET');\r\n\r\nexport const portfolioAgreementDisclaimerActions = {\r\n show,\r\n hide,\r\n confirmRequest,\r\n confirmSuccess,\r\n confirmFailure,\r\n downloadFileRequest,\r\n downloadFileSuccess,\r\n downloadFileFailure,\r\n reset\r\n};\r\n","import { createAction } from \"typesafe-actions\"\r\nimport { SalesRepresentative } from \"../types/sales-representative/SalesRepresentative\";\r\n\r\nconst loadUserSalesRepresentatives = createAction('salesRepresentatives/LOAD');\r\nconst storeSalesRepresentatives = createAction('salesRepresentatives/STORE',\r\n resolve => (salesRepresentatives: SalesRepresentative[]) => resolve({ salesRepresentatives})\r\n);\r\nconst reset = createAction('salesRepresentatives/RESET');\r\n\r\nexport const salesRepresentativeActions = {\r\n loadUserSalesRepresentatives,\r\n storeSalesRepresentatives,\r\n reset\r\n}\r\n","import { createAction } from 'typesafe-actions';\r\nimport { User } from '../types/account/User';\r\n\r\nconst user = createAction(\r\n 'PUSH_USER_ACTION_USER',\r\n resolve => (user: User) => resolve({ user })\r\n);\r\n\r\nexport const pushUserActions = {\r\n user\r\n};\r\n\r\n","import { AnyAction } from \"redux\";\r\nimport { entries, isUndefined, omitBy } from \"lodash\";\r\nimport { ThunkDispatch } from \"redux-thunk\";\r\nimport { createAction } from \"typesafe-actions\"\r\nimport { constants, errorMessages, uploadStatus } from \"../constants\";\r\nimport { inventoryService } from \"../services/inventory.service\";\r\nimport { InventoryFloatingIndex, inventoryFloatingIndexTitles } from '../types/inventory/InventoryFloatingIndex';\r\nimport { AppState } from \"../types/state/AppState\";\r\nimport { dateTimeUtils, formatUtils, moneyUtils, numericUtils, stringUtils } from \"../utils\";\r\nimport { gridActions, errorActions } from \".\";\r\nimport { ParsedInventoryPosition } from '../types/inventory/ParsedInventoryPosition';\r\nimport { GridDataItem } from \"../types/state/GridState\";\r\nimport { InventoryPosition } from \"../types/inventory/InventoryPosition\";\r\nimport { EditingInventoryPosition } from \"../types/state/InventoryEditState\";\r\nimport { RequestState } from '../constants/request-state';\r\n\r\nconst setSavingState = createAction('inventoryEdit/IS_SAVING',\r\n resolve => (requestState: RequestState) => resolve({ requestState })\r\n);\r\nconst save = createAction(\r\n 'inventoryEdit/SAVE',\r\n resolve => (lockModifiedDate?: Date, companyId?: number) => resolve({ lockModifiedDate, companyId })\r\n);\r\nconst setConflictsPopupVisible = createAction(\r\n 'inventoryEdit/SET_VISIBLE_WARNING_POPUP',\r\n resolve => (visible: boolean) => resolve({ visible })\r\n);\r\nconst setTradedStatus = createAction(\r\n 'inventoryEdit/SET_TRADED_STATUS',\r\n resolve => (inventoryPositionId: number, lockModifiedDate: Date, tradeDate: Date) => resolve({ inventoryPositionId, lockModifiedDate, tradeDate })\r\n);\r\nconst setTradedRequestStatus = createAction('inventoryEdit/SET_TRADED_REQUEST_STATUS',\r\n resolve => (inventoryId: number, status: boolean) => resolve({ inventoryId, status })\r\n);\r\nconst reset = createAction('inventoryEdit/RESET');\r\n\r\nconst setFlaggedModal = createAction(\r\n 'inventoryEdit/SET_FLAGGED_MODAL',\r\n resolve => (isFlaggedModalVisible: boolean) => resolve(isFlaggedModalVisible)\r\n)\r\n\r\nconst updateCoupon = (rowIndex: number) => {\r\n // use thunk because gridActions.deleteRow && gridActions.insertDataItems cannot be dispatched from saga\r\n return (dispatch: ThunkDispatch, getState: () => AppState) => {\r\n const dataItems: GridDataItem[] = getState().grid.dataItems;\r\n const dataItem = dataItems[rowIndex] && { ...dataItems[rowIndex] };\r\n\r\n if (dataItem) {\r\n dataItem.coupon = formatUtils.formatInventoryCoupon({\r\n floaterIndex: dataItem.floaterIndex ? dataItem.floaterIndex as unknown as InventoryFloatingIndex : undefined,\r\n spread: numericUtils.isNumber(dataItem.spread) ? Number(dataItem.spread) : undefined\r\n });\r\n\r\n dispatch(gridActions.deleteRow(rowIndex));\r\n dispatch(gridActions.insertDataItems([dataItem], rowIndex));\r\n }\r\n };\r\n}\r\n\r\nconst uploadSecurities = (file: File) => {\r\n return (dispatch: ThunkDispatch, getState: () => AppState) => {\r\n const { position, upload, mountedKey } = getState().grid;\r\n\r\n if (upload.status === uploadStatus.uploading) {\r\n return;\r\n }\r\n\r\n const extension = (file.name.split('.').pop() || '').toLowerCase();\r\n\r\n if (extension !== 'csv' && extension !== 'xlsx') {\r\n dispatch(errorActions.error(\r\n null,\r\n errorMessages.invalidFileType,\r\n 'Invalid file type.'\r\n ));\r\n return;\r\n\r\n } else if (file.size > constants.gridFileUploadMaximumSize * 1024 * 1024) {\r\n dispatch(errorActions.error(\r\n null,\r\n errorMessages.fileSizeLimitExceeded(constants.gridFileUploadMaximumSize),\r\n 'The file is too big.'\r\n ));\r\n return;\r\n }\r\n\r\n if (position?.editing) {\r\n dispatch(gridActions.applyOrCancelEdit());\r\n }\r\n\r\n inventoryService\r\n .uploadSecurities(file, progress)\r\n .then(success, failure)\r\n .finally(() => dispatch(gridActions.setUploadState(uploadStatus.none)));\r\n\r\n dispatch(gridActions.setUploadState(uploadStatus.uploading, 0, file.name));\r\n\r\n function success(positions: ParsedInventoryPosition[]) {\r\n const currentMountedKey = getState().grid.mountedKey;\r\n if (mountedKey === currentMountedKey) {\r\n const dataItems = getState().grid.dataItems.filter((i: GridDataItem) => !i.draft);\r\n const parsed: EditingInventoryPosition[] = positions.map(p => normalizeParsedInventoryPosition(p));\r\n const merged = mergeDataItems(dataItems, parsed);\r\n dispatch(gridActions.setUploadState(uploadStatus.ready))\r\n dispatch(gridActions.clear());\r\n dispatch(gridActions.addDataItems(merged));\r\n dispatch(ensureFlaggedModalShown(merged));\r\n dispatch(gridActions.validate());\r\n }\r\n }\r\n\r\n function failure(e: Error) {\r\n const currentMountedKey = getState().grid.mountedKey;\r\n if (mountedKey === currentMountedKey) {\r\n dispatch(errorActions.unexpectedError(e));\r\n }\r\n dispatch(gridActions.setUploadState(uploadStatus.ready))\r\n }\r\n\r\n function progress(e: ProgressEvent) {\r\n const currentMountedKey = getState().grid.mountedKey;\r\n if (e.lengthComputable && mountedKey === currentMountedKey) {\r\n const percentComplete = (e.loaded / e.total) * 100;\r\n dispatch(gridActions.setUploadState(uploadStatus.uploading, percentComplete, file.name));\r\n }\r\n }\r\n };\r\n};\r\n\r\nconst handleClipboardData = (clipboardData: string) => {\r\n return (dispatch: ThunkDispatch, getState: () => AppState) => {\r\n const { mountedKey } = getState().grid;\r\n dispatch(gridActions.dataProcessing(true));\r\n\r\n inventoryService\r\n .parseSecuritiesStirng(clipboardData)\r\n .then(success)\r\n .catch(e => dispatch(errorActions.unexpectedError(e)))\r\n .finally(() => dispatch(gridActions.dataProcessing(false)));\r\n\r\n function success(securities: ParsedInventoryPosition[]) {\r\n const currentMountedKey = getState().grid.mountedKey;\r\n if (mountedKey === currentMountedKey) {\r\n const dataItems = getState().grid.dataItems.filter((i: GridDataItem) => !i.draft);\r\n const parsed: any[] = securities.map(p => normalizeParsedInventoryPosition(p));\r\n const merged = mergeDataItems(dataItems, parsed);\r\n dispatch(gridActions.clear());\r\n dispatch(gridActions.addDataItems(merged));\r\n dispatch(ensureFlaggedModalShown(merged));\r\n dispatch(gridActions.validate());\r\n }\r\n }\r\n };\r\n};\r\n\r\nconst ensureFlaggedModalShown = (merged: GridDataItem[]) => {\r\n return (dispatch: ThunkDispatch) => {\r\n const isFlaggedExists = merged.some((item => item.isFlagged));\r\n if (isFlaggedExists) {\r\n dispatch(setFlaggedModal(true));\r\n }\r\n }\r\n}\r\n\r\nconst excludeComputedProps = (source: EditingInventoryPosition) => {\r\n const withoutComputedProps = {\r\n ...source,\r\n coupon: undefined,\r\n cusip: undefined,\r\n draft: undefined,\r\n errors: undefined,\r\n isin: undefined,\r\n securityId: undefined,\r\n currency: undefined,\r\n ncEndMonth: undefined,\r\n ncEndYear: undefined,\r\n riEndMonth: undefined,\r\n riEndYear: undefined,\r\n size: source.size ? Number(source.size) : undefined,\r\n offer: source.offer ? Number(source.offer) : undefined,\r\n floaterIndex: source.floaterIndex ? Number(source.floaterIndex) : undefined\r\n };\r\n return omitBy(withoutComputedProps, isUndefined);\r\n}\r\n\r\nfunction mergeDataItems(\r\n actualItems: GridDataItem[],\r\n updatedItems: EditingInventoryPosition[]) {\r\n if (!actualItems.length) {\r\n return updatedItems.map(i => ({ ...i, isNew: true }));\r\n }\r\n\r\n const actualItemsCopy: GridDataItem[] = [...actualItems].map(el => ({ ...el, isFlagged: true }));\r\n const newItems: GridDataItem[] = [];\r\n\r\n updatedItems.forEach(u => {\r\n const actualIndex = actualItems.findIndex(a => a.securityId && a.securityId === u.securityId);\r\n if (actualIndex < 0) {\r\n newItems.push({ ...u, isNew: true });\r\n } else if (!isEqual(excludeComputedProps(actualItems[actualIndex]), excludeComputedProps(u))) {\r\n actualItemsCopy[actualIndex] = { ...u, isUpdate: true };\r\n } else {\r\n actualItemsCopy[actualIndex] = { ...actualItems[actualIndex], isUpdate: false, isNew: false, isFlagged: false };\r\n }\r\n });\r\n\r\n return actualItemsCopy.concat(newItems);\r\n}\r\n\r\nfunction isEqual(actual: GridDataItem, update: GridDataItem) {\r\n const valueOrEmpty = (value?: T | null) => value ?? '';\r\n\r\n return (\r\n actual.securityId === update.securityId &&\r\n actual.isinCusip === update.isinCusip &&\r\n actual.ticker === update.ticker &&\r\n valueOrEmpty(actual.rating) === valueOrEmpty(update.rating) &&\r\n valueOrEmpty(actual.offer) === valueOrEmpty(update.offer) &&\r\n valueOrEmpty(actual.size) === valueOrEmpty(update.size) &&\r\n valueOrEmpty(actual.offerDmBps) === valueOrEmpty(update.offerDmBps) &&\r\n valueOrEmpty(actual.offerYield) === valueOrEmpty(update.offerYield) &&\r\n valueOrEmpty(actual.spread) === valueOrEmpty(update.spread) &&\r\n valueOrEmpty(actual.walYears) === valueOrEmpty(update.walYears) &&\r\n valueOrEmpty(actual.mvoc) === valueOrEmpty(update.mvoc) &&\r\n valueOrEmpty(actual.manager) === valueOrEmpty(update.manager) &&\r\n valueOrEmpty(actual.description) === valueOrEmpty(update.description) &&\r\n valueOrEmpty(actual.ncEnd) === valueOrEmpty(update.ncEnd) &&\r\n valueOrEmpty(actual.riEnd) === valueOrEmpty(update.riEnd) &&\r\n valueOrEmpty(actual.floaterIndex) === valueOrEmpty(update.floaterIndex) &&\r\n valueOrEmpty(actual.creditEnhancement) === valueOrEmpty(update.creditEnhancement)\r\n );\r\n}\r\n\r\nfunction normalizeParsedInventoryPosition(position: ParsedInventoryPosition): EditingInventoryPosition {\r\n const dataItem: EditingInventoryPosition = {};\r\n\r\n if (position.floaterIndex) {\r\n const key = entries(inventoryFloatingIndexTitles)\r\n .find(([, title]) => title.localeCompare(position.floaterIndex || '', undefined, { sensitivity: 'accent' }) === 0)\r\n ?.[0];\r\n\r\n const floaterIndexEnumKey = InventoryFloatingIndex[key as keyof typeof InventoryFloatingIndex];\r\n\r\n dataItem.floaterIndex = floaterIndexEnumKey ? InventoryFloatingIndex[floaterIndexEnumKey] : undefined;\r\n }\r\n\r\n dataItem.securityId = position.securityId;\r\n dataItem.isinCusip = position.isinCusip;\r\n dataItem.ticker = position.ticker;\r\n dataItem.rating = position.rating;\r\n dataItem.spread = normalizeNumeric(position.spread);\r\n dataItem.coupon = formatUtils.formatInventoryCoupon({\r\n floaterIndex: dataItem.floaterIndex ? dataItem.floaterIndex as unknown as InventoryFloatingIndex : undefined,\r\n spread: numericUtils.isNumber(dataItem.spread) ? Number(dataItem.spread) : undefined\r\n });\r\n dataItem.bid = position.bid ? normalizeNumeric(position.bid): undefined;\r\n dataItem.offer = normalizeNumeric(position.offer); \r\n dataItem.bidSize = numericUtils.isNumber(position.bidSize) ? moneyUtils.amountToMM(+position.bidSize) : position.bidSize; \r\n dataItem.size = numericUtils.isNumber(position.size) ? moneyUtils.amountToMM(+position.size) : position.size;\r\n dataItem.bidDmBps = position.bidDmBps ? normalizeNumeric(position.bidDmBps) : undefined;\r\n dataItem.offerDmBps = normalizeNumeric(position.offerDmBps);\r\n dataItem.offerYield = normalizeNumeric(position.offerYield);\r\n dataItem.walYears = normalizeNumeric(position.walYears);\r\n dataItem.mvoc = normalizeNumeric(position.mvoc);\r\n dataItem.ncEnd = stringUtils.isNullOrWhiteSpace(position.ncEnd) ? undefined : formatUtils.formatMonthAndYear(position.ncEnd, position.ncEnd);\r\n dataItem.riEnd = stringUtils.isNullOrWhiteSpace(position.riEnd) ? undefined : formatUtils.formatMonthAndYear(position.riEnd, position.riEnd);\r\n const ncEndParseResult = dateTimeUtils.parseMonthAndYearStamp(position.ncEnd);\r\n const riEndParseResult = dateTimeUtils.parseMonthAndYearStamp(position.riEnd);\r\n if (ncEndParseResult.isMonthValid && ncEndParseResult.isYearValid) {\r\n dataItem.ncEndYear = ncEndParseResult.year;\r\n dataItem.ncEndMonth = ncEndParseResult.month;\r\n }\r\n if (riEndParseResult.isMonthValid && riEndParseResult.isYearValid) {\r\n dataItem.riEndYear = riEndParseResult.year;\r\n dataItem.riEndMonth = riEndParseResult.month;\r\n }\r\n dataItem.manager = stringUtils.isNullOrWhiteSpace(position.manager) ? undefined : position.manager.trim();\r\n dataItem.description = stringUtils.isNullOrWhiteSpace(position.description) ? undefined : position.description.trim();\r\n dataItem.creditEnhancement = normalizeNumeric(position.creditEnhancement);\r\n return dataItem;\r\n}\r\n\r\nfunction normalizeNumeric(raw?: string | null, defaultValue?: number): number | string | undefined {\r\n if (raw == null || stringUtils.isNullOrWhiteSpace(raw)) {\r\n return defaultValue;\r\n }\r\n\r\n const trimmed = raw.trim();\r\n\r\n return numericUtils.isNumber(trimmed) ? +trimmed : raw;\r\n}\r\n\r\nexport const inventoryEditActions = {\r\n save,\r\n setSavingState,\r\n updateCoupon,\r\n uploadSecurities,\r\n handleClipboardData,\r\n setConflictsPopupVisible,\r\n setTradedStatus,\r\n setTradedRequestStatus,\r\n reset,\r\n setFlaggedModal,\r\n};\r\n","import { ActionType, createAction } from \"typesafe-actions\";\r\nimport { RequestState } from \"../constants/request-state\";\r\nimport { SettlementAgentCommissionByRating } from \"../types/bid-as-dealer/SettlementAgentCommissionByRating\";\r\n\r\nexport type TSettlementAgentCommissionActionType = ActionType<\r\n typeof settlementAgentCommissionRequest |\r\n typeof settlementAgentCommissionResponse\r\n>;\r\n\r\nconst saveClearingBankSettings = createAction('clearingBank/SAVE_SETTINGS',\r\n resolve => (companyId: number, isClearingBank: boolean, commission?: SettlementAgentCommissionByRating) =>\r\n resolve({ companyId, isClearingBank, commission })\r\n);\r\nconst settlementAgentCommissionRequest = createAction('entities/settlement-agent-commission/SETTLEMENT-AGENT-COMMISSION-REQUEST',\r\n resolve => (companyId: number) => resolve({ companyId })\r\n);\r\nconst settlementAgentCommissionResponse = createAction('entities/settlement-agent-commission/SETTLEMENT-AGENT-COMMISSION-RESPONSE',\r\n resolve => (requestState: RequestState, companyId: number, commission?: SettlementAgentCommissionByRating) =>\r\n resolve({ requestState, companyId, commission })\r\n);\r\n\r\nexport const clearingBankActions = {\r\n saveClearingBankSettings,\r\n settlementAgentCommissionRequest,\r\n settlementAgentCommissionResponse\r\n}\r\n","import moment from 'moment';\r\nimport { sellerBiddingActions as actionTypes, errorMessages, constants, roles } from '../constants';\r\nimport { bwicService, biddingService, daysService } from '../services';\r\nimport { biddingActions, errorActions, colorDistributionActions, notificationActions } from '.';\r\nimport { biddingUtils, numericUtils } from '../utils';\r\nimport { feedbackTypes } from '../constants/bidding';\r\nimport { controlPanelActions } from './control-panel.actions';\r\nimport { dealerListPanelActions } from './dealer-list-panel.actions';\r\nimport { bidOnBehalfActions } from './bid-on-behalf.actions';\r\nimport { BwicStatus } from '../types/enums/BwicStatus';\r\nimport { apiOperationActions } from './api-operation.actions';\r\nimport { ApiOperationType } from '../types/api-operation/ApiOperationType';\r\nimport { user } from '../user';\r\nimport { favoriteBrokerDealersActions } from './favorite-broker-dealers.actions';\r\nimport { getSecuritiesWithLatestBids } from '../selectors';\r\nimport { dealerListActions } from './dealer-list.actions';\r\nimport { BwicProcessType } from '../types/models/Process';\r\nimport { OpenBiddingStatus } from \"../types/enums/OpenBiddingStatus\";\r\nimport { BidLevel } from '../types/bidding/BidLevel';\r\n\r\nexport const sellerBiddingActions = {\r\n init,\r\n cancelBwic,\r\n reset,\r\n tradeAll,\r\n completeBwic,\r\n setTargetLevel,\r\n sendTargetLevel,\r\n trade,\r\n tradeConfirm,\r\n sendQuickFeedback,\r\n tradingPositionSelectionChange,\r\n tradeAllSelectionChange,\r\n tradingPositionSettleDateChange,\r\n tradingPositionCommentChange,\r\n tradingPositionCompanyChange,\r\n tradingPositionBidChange,\r\n submitTrade,\r\n cancelTrade,\r\n showBidList,\r\n toggleBidList,\r\n sendBidRequest,\r\n markBidsShown\r\n}\r\n\r\nfunction init(bwic) {\r\n return async dispatch => {\r\n const year = new Date().getFullYear();\r\n\r\n try {\r\n const nextBusinessDayPromise = daysService.getNextBusinessDate();\r\n const todayIsBusinessDayPromise = daysService.isBusinessDay(new Date());\r\n const currentYearHolidaysPromise = daysService.getHolidays(year);\r\n const nextYearHolidaysPromise = daysService.getHolidays(year + 1);\r\n const isBidingOrFinished = (bwic.status === BwicStatus.bidding || bwic.status === BwicStatus.finished);\r\n if (!bwic.isAllToAll && isBidingOrFinished && bwic.process.type !== BwicProcessType.Live) {\r\n dispatch(bidOnBehalfActions.requestCompanies());\r\n }\r\n if (!bwic.isAllToAll && user.hasRoles(roles.SellerTrader)) {\r\n dispatch(favoriteBrokerDealersActions.fetchFavoriteBrokerDealersRequest());\r\n }\r\n\r\n const nextBusinessDay = await nextBusinessDayPromise;\r\n const todayIsBusinessDay = await todayIsBusinessDayPromise;\r\n const currentYearHolidays = await currentYearHolidaysPromise;\r\n const nextYearHolidays = await nextYearHolidaysPromise;\r\n\r\n const minDate = todayIsBusinessDay\r\n ? moment().startOf('day').toDate()\r\n : moment(nextBusinessDay).startOf('day').toDate();\r\n\r\n const holidays = [...currentYearHolidays, ...nextYearHolidays];\r\n\r\n dispatch(storeMinSettleDate(minDate));\r\n dispatch(storeHolidays(holidays));\r\n dispatch(storeSecurities(bwic.securities));\r\n } catch (e) {\r\n dispatch(errorActions.criticalError(e));\r\n }\r\n };\r\n}\r\n\r\nfunction storeMinSettleDate(minimumDate) {\r\n return {\r\n type: actionTypes.STORE_MIN_SETTLE_DATE,\r\n minimumDate\r\n };\r\n}\r\n\r\nfunction storeSecurities(securities) {\r\n return {\r\n type: actionTypes.SELLER_BIDDING_STORE_SECURITIES,\r\n securities\r\n };\r\n}\r\n\r\nfunction storeHolidays(holidays) {\r\n return {\r\n type: actionTypes.SELLER_BIDDING_STORE_HOLIDAYS,\r\n holidays\r\n };\r\n}\r\n\r\nfunction cancelBwic(referenceName, reason) {\r\n return dispatch => {\r\n bwicService\r\n .cancel(referenceName, reason ? reason.trim() : reason)\r\n .then(\r\n () => dispatch(biddingActions.init(referenceName)),\r\n e => dispatch(errorActions.unexpectedError(e))\r\n );\r\n };\r\n}\r\n\r\nfunction reset() {\r\n return dispatch => {\r\n dispatch(dealerListPanelActions.reset());\r\n dispatch({ type: actionTypes.SELLER_BIDDING_RESET });\r\n dispatch(apiOperationActions.resetEvent(ApiOperationType.submitBidsOnBehalf));\r\n dispatch(bidOnBehalfActions.resetEdit());\r\n dispatch(dealerListActions.reset());\r\n };\r\n}\r\n\r\nfunction tradeAll() {\r\n return (dispatch, getState) => {\r\n const { securities } = getState().sellerBidding;\r\n const tradingPositions = securities.filter(s => biddingUtils.canTradePosition(s));\r\n\r\n dispatch(storeTradingPositions(tradingPositions));\r\n }\r\n}\r\n\r\nfunction trade(positionId) {\r\n return (dispatch, getState) => {\r\n const { securities } = getState().sellerBidding;\r\n const tradingPosition = securities.find(s => s.id === positionId);\r\n\r\n dispatch(storeTradingPositions([tradingPosition]));\r\n };\r\n}\r\n\r\nfunction tradeConfirm(visible) {\r\n return (dispatch, getState) => {\r\n let hasErrors = false;\r\n\r\n if (visible) {\r\n const { tradingPositions, holidays, minimumSettleDate } = getState().sellerBidding;\r\n const validationResult = validateTradingPositions(tradingPositions, minimumSettleDate, holidays);\r\n hasErrors = validationResult.some(r => r.errors);\r\n\r\n if (hasErrors) {\r\n dispatch({\r\n type: actionTypes.SELLER_BIDING_STORE_TRADING_POSITIONS_VALIDATION_RESULT,\r\n validationResult\r\n });\r\n }\r\n }\r\n\r\n if (!hasErrors) {\r\n dispatch({\r\n type: actionTypes.SELLER_BIDDING_TRADING_CONFIRMATION_VISIBLE,\r\n visible\r\n });\r\n }\r\n }\r\n}\r\n\r\nfunction storeTradingPositions(positions) {\r\n return (dispatch, getState) => {\r\n const { bwic } = getState().bidding;\r\n const tradingPositions = positions && positions.map(p => {\r\n const [positionWithActualBids] = getSecuritiesWithLatestBids({ securities: [p] });\r\n const [best] = biddingUtils.getBidsByLevel(positionWithActualBids.bids, BidLevel.Best);\r\n\r\n return {\r\n id: p.id,\r\n selected: true,\r\n tradingCompanyId: best.company.id,\r\n tradingCompanyIdentifier: biddingUtils.getBidCompanyIdentifier(best),\r\n tradingBidId: best.id,\r\n settleDate: bwic.defaultSettleDate,\r\n comment: '',\r\n errors: null\r\n };\r\n });\r\n\r\n dispatch({\r\n type: actionTypes.SELLER_BIDDING_STORE_TRADING_POSITIONS,\r\n tradingPositions\r\n });\r\n };\r\n}\r\n\r\nfunction completeBwic(bwicReferenceName) {\r\n return dispatch => {\r\n bwicService\r\n .setColorDistribution(bwicReferenceName, true)\r\n .then(\r\n () => dispatch(colorDistributionActions.setBwicColorDistribution(true)),\r\n e => dispatch(errorActions.unexpectedError(e))\r\n );\r\n };\r\n}\r\n\r\nfunction sendQuickFeedback(positionId, bidsList, feedbackType) {\r\n return (dispatch, getState) => {\r\n const { bwic } = getState().bidding;\r\n sendOnBehalfFeedback();\r\n sendRegularFeedback();\r\n\r\n function excludeJumpBallStage2Bids(bids){\r\n if (\r\n bwic.process.type === BwicProcessType.JumpBall &&\r\n bwic.process.stagedBiddingStatus === OpenBiddingStatus.stage1Ended &&\r\n feedbackType === feedbackTypes.submitFinal &&\r\n bids?.some(b => b.stagedBiddingStatus === OpenBiddingStatus.stage1Ended)\r\n ) {\r\n return bids.filter(b => b.stagedBiddingStatus == null) // Take Stage1 bids only\r\n }\r\n return bids;\r\n }\r\n\r\n function sendOnBehalfFeedback() {\r\n const onBehalfBids = excludeJumpBallStage2Bids(bidsList.filter(b => b.onBehalf));\r\n if (onBehalfBids.length) {\r\n const bidIdList = onBehalfBids.map((b) => b.id);\r\n return biddingService\r\n .sendOnBehalfQuickFeedback(bwic.referenceName, positionId, bidIdList, feedbackType)\r\n .then(() => dispatch(feedbackSent(positionId, onBehalfBids, feedbackType)))\r\n .catch(e => dispatch(errorActions.unexpectedError(e)));\r\n }\r\n }\r\n function sendRegularFeedback() {\r\n const bids = excludeJumpBallStage2Bids(bidsList.filter(b => !b.onBehalf));\r\n if (bids.length) {\r\n const bidIdList = bids.map((b) => b.id);\r\n return biddingService\r\n .sendQuickFeedback(bwic.referenceName, positionId, bidIdList, feedbackType)\r\n .then(() => dispatch(feedbackSent(positionId, bids, feedbackType)))\r\n .catch(e => dispatch(errorActions.unexpectedError(e)));\r\n }\r\n }\r\n };\r\n}\r\n\r\nfunction sendBidRequest(positionId, companies, requestType) {\r\n return (dispatch, getState) => {\r\n const { bwic } = getState().bidding;\r\n\r\n biddingService\r\n .sendBidRequest(bwic.referenceName, positionId, companies.map(c => c.id), requestType)\r\n .catch(e => dispatch(errorActions.unexpectedError(e)));\r\n };\r\n}\r\n\r\nfunction feedbackSent(positionId, bids, feedbackType) {\r\n return {\r\n type: actionTypes.SELLER_BIDDING_QUICK_FEEDBACK_SENT,\r\n positionId,\r\n bids,\r\n feedbackType\r\n };\r\n}\r\n\r\nfunction tradingPositionSelectionChange(positionId, selected) {\r\n return (dispatch, getState) => {\r\n dispatch({\r\n type: actionTypes.SELLER_BIDDING_TRADING_POSITION_SELECTION_CHANGE,\r\n positionId,\r\n selected\r\n });\r\n\r\n const { tradeAllChecked } = getState().sellerBidding;\r\n\r\n if (tradeAllChecked !== selected) {\r\n const { tradingPositions } = getState().sellerBidding;\r\n const tradingPositionIdList = Object.keys(tradingPositions).map(key => +key);\r\n\r\n if (tradingPositionIdList.every(id => tradingPositions[id].selected)) {\r\n dispatch(tradeAllSelectionChange(true));\r\n } else if (tradingPositionIdList.every(id => !tradingPositions[id].selected)) {\r\n dispatch(tradeAllSelectionChange(false));\r\n }\r\n }\r\n };\r\n}\r\n\r\nfunction tradeAllSelectionChange(tradeAllChecked) {\r\n return {\r\n type: actionTypes.SELLER_BIDDING_TRADING_TRADE_ALL_SELECTION_CHANGE,\r\n tradeAllChecked\r\n };\r\n}\r\n\r\nfunction submitTrade() {\r\n return (dispatch, getState) => {\r\n const { securities, tradingPositions } = getState().sellerBidding;\r\n const { bwic } = getState().bidding;\r\n\r\n const positions = Object\r\n .keys(tradingPositions)\r\n .map(positionId => +positionId)\r\n .filter(positionId => tradingPositions[positionId].selected)\r\n .map(positionId => {\r\n const p = tradingPositions[positionId];\r\n const position = securities.find(s => s.id === positionId);\r\n const bid = position.bids.find(b => b.id === p.tradingBidId && biddingUtils.getBidCompanyIdentifier(b) === p.tradingCompanyIdentifier);\r\n const companyBidLock = position.bidLocks && position.bidLocks.find(l => l.companyId === p.tradingCompanyId);\r\n\r\n return {\r\n positionId,\r\n buyerCompany: {\r\n id: p.tradingCompanyId,\r\n },\r\n settleDate: moment(p.settleDate).toISOString(true),\r\n bidId: bid.id,\r\n bidLock: companyBidLock && companyBidLock.bidLock,\r\n comment: p.comment\r\n };\r\n });\r\n\r\n dispatch(cancelTrade());\r\n\r\n biddingService\r\n .trade(bwic.referenceName, positions)\r\n .catch(e => {\r\n if (e.status === 409) {\r\n dispatch(notificationActions.warningModal(\r\n 'New Bid Notification',\r\n 'New bids were received. Please try again or refresh the page.'\r\n ));\r\n } else {\r\n dispatch(errorActions.unexpectedError(e));\r\n }\r\n });\r\n };\r\n}\r\n\r\nfunction validateTradingPositions(tradingPositions, minimumSettleDate, holidays) {\r\n const minimumDate = moment(minimumSettleDate);\r\n const momentHolidays = holidays.map(h => moment(h).startOf('day'));\r\n\r\n return Object\r\n .keys(tradingPositions)\r\n .map(positionId => +positionId)\r\n .map(positionId => {\r\n if (!tradingPositions[positionId].selected) {\r\n return { positionId, errors: null };\r\n }\r\n\r\n const settleDate = validateTradingPositionSettleDate(tradingPositions[positionId].settleDate, minimumDate, momentHolidays);\r\n const errors = settleDate ? { settleDate } : null;\r\n\r\n return { positionId, errors };\r\n });\r\n}\r\n\r\nfunction validateTradingPositionSettleDate(settleDate, minimumDate, holidays) {\r\n\r\n if (settleDate === '') {\r\n return errorMessages.empty;\r\n } else if (typeof settleDate === 'undefined') {\r\n return errorMessages.invalidValue;\r\n } else if (minimumDate.diff(settleDate, 'days') > 0) {\r\n return errorMessages.dateShouldNotBeInPast;\r\n }\r\n\r\n const momentSettleDate = moment(settleDate);\r\n const weekday = momentSettleDate.weekday();\r\n\r\n \r\n\r\n if ([0, 6].some(d => d === weekday)) {\r\n return errorMessages.bwicDateShouldNotBeWeekend;\r\n } else if (holidays.some(h => h.isSame(momentSettleDate, 'day'))) {\r\n return errorMessages.bwicDateShouldNotBeHoliday;\r\n }\r\n\r\n return null;\r\n}\r\n\r\nfunction cancelTrade() {\r\n return dispatch => {\r\n dispatch(tradeConfirm(false));\r\n dispatch(storeTradingPositions(null));\r\n }\r\n}\r\n\r\nfunction tradingPositionCompanyChange(positionId, tradingCompanyIdentifier) {\r\n return {\r\n type: actionTypes.SELLER_BIDDING_TRADING_COMPANY_CHANGE,\r\n positionId,\r\n tradingCompanyIdentifier\r\n }\r\n}\r\n\r\nfunction tradingPositionBidChange(positionId, bidId) {\r\n return {\r\n type: actionTypes.SELLER_BIDDING_TRADING_BID_CHANGE,\r\n positionId,\r\n bidId\r\n };\r\n}\r\n\r\nfunction tradingPositionSettleDateChange(positionId, date) {\r\n return (dispatch, getState) => {\r\n const { tradingPositions } = getState().sellerBidding;\r\n const position = tradingPositions[positionId];\r\n\r\n let settleDateError = null;\r\n if (position.errors && position.errors.settleDate) {\r\n const { holidays, minimumSettleDate } = getState().sellerBidding;\r\n const minimumDate = moment(minimumSettleDate);\r\n const momentHolidays = holidays.map(h => moment(h).startOf('day'));\r\n\r\n settleDateError = validateTradingPositionSettleDate(date, minimumDate, momentHolidays);\r\n }\r\n\r\n dispatch({\r\n type: actionTypes.SELLER_BIDDING_TRADING_SETTLE_DATE_CHANGE,\r\n positionId,\r\n date,\r\n settleDateError\r\n });\r\n };\r\n}\r\n\r\nfunction tradingPositionCommentChange(positionId, comment) {\r\n return {\r\n type: actionTypes.SELLER_BIDDING_TADING_COMMENT_CHANGE,\r\n positionId,\r\n comment\r\n };\r\n}\r\n\r\nfunction setTargetLevel(securityId, value) {\r\n return {\r\n type: actionTypes.SELLER_BIDDING_SET_TARGET_LEVEL,\r\n payload: { securityId, value }\r\n }\r\n}\r\n\r\nfunction targetLevelRequest(securityId) {\r\n return {\r\n type: actionTypes.SELLER_BIDDING_TARGET_LEVEL_REQUEST,\r\n payload: { securityId }\r\n }\r\n}\r\n\r\nfunction targetLevelSuccess(securityId) {\r\n return {\r\n type: actionTypes.SELLER_BIDDING_TARGET_LEVEL_SUCCESS,\r\n payload: { securityId }\r\n }\r\n}\r\n\r\nfunction targetLevelFailure(securityId, error) {\r\n return {\r\n type: actionTypes.SELLER_BIDDING_TARGET_LEVEL_FAILURE,\r\n payload: { securityId, error }\r\n }\r\n}\r\n\r\nfunction sendTargetLevel(securityId) {\r\n return (dispatch, getState) => {\r\n const { bwic } = getState().bidding;\r\n const { securities, editTargetLevel } = getState().sellerBidding;\r\n const security = securities.find(s => s.id === securityId);\r\n const edit = editTargetLevel[securityId];\r\n const targetLevel = edit && numericUtils.isNumber(edit.targetLevel) && +edit.targetLevel;\r\n\r\n if (targetLevel != null && security) {\r\n if (targetLevel < constants.targetLevelRange.min || targetLevel > constants.targetLevelRange.max) {\r\n dispatch(setTargetLevel(securityId, undefined));\r\n } else if (security.targetLevel !== targetLevel) {\r\n dispatch(setTargetLevel(securityId, targetLevel.toFixed(4)));\r\n dispatch(targetLevelRequest(securityId));\r\n biddingService\r\n .saveTargetLevel(bwic.referenceName, securityId, targetLevel)\r\n .then(() => dispatch(targetLevelSuccess(securityId)))\r\n .catch(e => dispatch(targetLevelFailure(securityId, e)));\r\n }\r\n }\r\n }\r\n}\r\n\r\nfunction showBidList(visible, positionId) {\r\n return dispatch => {\r\n if (visible) {\r\n dispatch(controlPanelActions.hide());\r\n }\r\n\r\n dispatch({\r\n type: actionTypes.SELLER_BIDDING_SHOW_BID_LIST,\r\n payload: {\r\n visible,\r\n positionId: visible ? positionId : undefined\r\n }\r\n });\r\n };\r\n}\r\n\r\nfunction toggleBidList(positionId) {\r\n return (dispatch, getState) => {\r\n const { bidList } = getState().sellerBidding;\r\n\r\n const visible = positionId !== bidList.positionId;\r\n dispatch(showBidList(visible, positionId));\r\n };\r\n}\r\n\r\nfunction markBidsShown(bidList, positionId, bwicReferenceName) {\r\n return {\r\n type: actionTypes.MARK_BIDS_SHOWN,\r\n bwicReferenceName,\r\n positionId,\r\n bidList\r\n };\r\n}\r\n\r\n","import { ActionType, createAction } from \"typesafe-actions\";\r\nimport { RequestState } from \"../../constants/request-state\";\r\nimport { PartiesCompanies } from \"../../types/state/entities/PartiesState\";\r\n\r\nconst request = createAction(\"entities/parties/REQUEST\");\r\nconst requestResult = createAction(\r\n \"entities/parties/REQUEST_RESULT\",\r\n (resolve) => (requestState: RequestState, items?: PartiesCompanies) =>\r\n resolve({\r\n requestState,\r\n items,\r\n })\r\n);\r\n\r\nexport type TPartiesActionType = ActionType<\r\n (typeof partiesActions)[keyof typeof partiesActions]\r\n>;\r\n\r\nexport const partiesActions = {\r\n request,\r\n requestResult,\r\n};\r\n\r\n","import { createAction } from 'typesafe-actions';\r\nimport { RequestState } from '../constants/request-state';\r\nimport { Releases } from '../types/marketing/Release';\r\n\r\nconst fetchReleases = createAction('release/FETCH_RELEASES');\r\nconst getReleaseRequest = createAction('release/GET_RELEASE_REQUEST');\r\nconst getReleaseResponse = createAction('release/GET_RELEASE_RESPONSE',\r\n resolve => (requestStatus: RequestState, releases?: Releases) => resolve({ requestStatus, releases })\r\n);\r\n\r\nconst markAsReadRequest = createAction('release/MARK_AS_READ_REQUEST');\r\nconst markAsReadResponse = createAction('release/MARK_AS_READ_RESPONSE');\r\n\r\nexport const releaseActions = {\r\n fetchReleases,\r\n getReleaseRequest,\r\n getReleaseResponse,\r\n markAsReadRequest,\r\n markAsReadResponse\r\n};\r\n","import { createAction } from 'typesafe-actions';\r\nimport { BwicPositionBase } from '../types/bwic/BwicPositionBase';\r\nimport { InventoryPosition } from '../types/inventory/InventoryPosition';\r\nimport { SecurityBwicStatisticsSummary } from '../types/security/SecurityBwicStatisticsSummary';\r\n\r\nconst bwicLogReset = createAction('bwic-log/RESET');\r\nconst bwicLogInitRequest = createAction('bwic-log/INIT_REQUEST',\r\n resolve => (security: BwicPositionBase | InventoryPosition) =>\r\n resolve({ security })\r\n);\r\nconst bwicLogInitSuccess = createAction('bwic-log/INIT_SUCCESS',\r\n resolve => (statistics: SecurityBwicStatisticsSummary) =>\r\n resolve({ statistics })\r\n);\r\nconst bwicLogInitFailure = createAction('bwic-log/INIT_FAILURE',\r\n resolve => (error: string) => resolve({ error })\r\n);\r\nconst bwicLogExportDataRequest = createAction('bwic-log/EXPORT_DATA_REQUEST',\r\n resolve => (securityId: number) => resolve({ securityId })\r\n);\r\nconst bwicLogExportDataSuccess = createAction('bwic-log/EXPORT_DATA_SUCCESS');\r\nconst bwicLogExportDataFailure = createAction('bwic-log/EXPORT_DATA_FAILURE',\r\n resolve => (error: string) => resolve({ error })\r\n);\r\n\r\nexport const bwicLogActions = {\r\n bwicLogInitRequest,\r\n bwicLogInitFailure,\r\n bwicLogInitSuccess,\r\n bwicLogReset,\r\n bwicLogExportDataRequest,\r\n bwicLogExportDataSuccess,\r\n bwicLogExportDataFailure\r\n}\r\n","import { ActionType, createAction } from \"typesafe-actions\";\r\nimport { CanBidOnPosition, LiveBiddingPosition } from \"../../types/live-bidding/LiveBiddingPosition\";\r\nimport { RequestState } from \"../../constants/request-state\";\r\n\r\nconst request = createAction('entities/live-bidding/REQUEST');\r\nconst response = createAction('entities/live-bidding/RESPONSE',\r\n resolve => (positions: LiveBiddingPosition[], requestState: RequestState) =>\r\n resolve({ positions, requestState })\r\n);\r\nconst reset = createAction('entities/live-bidding/RESET',\r\n resolve => (bwicReferenceName: string) => resolve({ bwicReferenceName })\r\n);\r\nconst stage2LevelChange = createAction('entities/live-bidding/STAGE_2_LEVEL',\r\n resolve => (bwicReferenceName: string, positionId: number, level: number, tiedForBest: boolean, sentDateUtc: Date) =>\r\n resolve({ bwicReferenceName, positionId, level, tiedForBest, sentDateUtc })\r\n);\r\nconst stage2Start = createAction('entities/live-bidding/STAGE_2_START',\r\n resolve => (\r\n bwicReferenceName: string,\r\n canDealerBidOnPositions?: CanBidOnPosition[],\r\n stage1EndDateUtc?: Date) =>\r\n resolve({ bwicReferenceName, canDealerBidOnPositions, stage1EndDateUtc }))\r\n\r\nexport const liveBiddingActions = {\r\n request,\r\n response,\r\n reset,\r\n stage2LevelChange,\r\n stage2Start\r\n};\r\n\r\nexport type TLiveBiddingAction = ActionType;","import { createAction } from 'typesafe-actions';\r\nimport { SubscriptionBillingHistoryFilterState } from '../types/state/SubscriptionsState';\r\nimport { BillingHistory } from '../types/billing/BillingHistory';\r\nimport { FilterOption } from '../types/filters/FilterOption';\r\nimport { RequestState } from '../constants/request-state';\r\n\r\nconst fetchBillingHistory = createAction(\r\n 'subscriptionBillingHistory/FETCH_HISTORY',\r\n resolve =>\r\n (requestState: RequestState, billingHistory?: BillingHistory[]) =>\r\n resolve({ requestState, billingHistory})\r\n)\r\n\r\nconst updateFilter = createAction(\r\n 'subscriptionBillingHistory/UPDATE_FILTER',\r\n resolve =>\r\n (filterField: keyof SubscriptionBillingHistoryFilterState, filterOption: FilterOption) =>\r\n resolve({ filterField, filterOption })\r\n);\r\n\r\nconst applyFilter = createAction('subscriptionBillingHistory/APPLY_FILTER');\r\nconst setApplyFilter = createAction('subscriptionBillingHistory/SET_APPLY_FILTER');\r\nconst applyReset = createAction('subscriptionBillingHistory/RESET');\r\nconst resetFilter = createAction('subscriptionBillingHistory/RESET_FILTER');\r\n\r\n\r\nexport const billingHistoryActions = {\r\n updateFilter,\r\n applyFilter,\r\n resetFilter,\r\n setApplyFilter,\r\n fetchBillingHistory,\r\n applyReset\r\n};\r\n","import moment from 'moment';\r\nimport {\r\n editParsedBwicActions as actionTypes,\r\n errorMessages,\r\n routes,\r\n gridColumns,\r\n\r\n constants\r\n} from '../constants';\r\nimport { parsedBwicsService, daysService, bwicService } from '../services';\r\nimport { errorActions, notificationActions, securitiesActions } from '.';\r\nimport { dateTimeUtils, numericUtils } from '../utils';\r\nimport { history } from '../history';\r\nimport { gridActions } from './grid.actions';\r\nimport { priceTalksActions } from './price-talks.actions';\r\nimport { BwicProcessType } from '../types/models/Process';\r\nimport { values } from 'lodash';\r\nimport { Stage2Participants } from '../types/models/ParsedBwicProcess';\r\n\r\nexport const editParsedBwicActions = {\r\n init,\r\n reset,\r\n changeDate,\r\n changeDaysToSettle,\r\n changeTimeZone,\r\n changeBidsDueTime,\r\n changeGoodUntilTime,\r\n changeCustomRules,\r\n changeReserveLevelsApply,\r\n changeCanTradeEarly,\r\n changeCanBidEarly,\r\n changePartialBidsAccepted,\r\n changeBwicProcessType,\r\n changeHardCutOffNumber,\r\n changeStage1EndTime,\r\n changeStage2EndTime,\r\n changeBidsGoodForHours,\r\n changeBidsGoodForMinutes,\r\n changeStage2Participants,\r\n showManageParsedBwics,\r\n save,\r\n saveAndPublish,\r\n saveOnExit,\r\n changeEmailReceivedDate,\r\n storeOriginalBwic,\r\n cancelDialog,\r\n cancelBwic\r\n}\r\n\r\nexport const getProcessSpecificSettings = parsedProcess => {\r\n switch (parsedProcess?.processType) {\r\n case BwicProcessType.JumpBall: return parsedProcess.jumpBall;\r\n case BwicProcessType.TopX: return parsedProcess.topX;\r\n case BwicProcessType.BestFootForward: return parsedProcess.bff;\r\n case BwicProcessType.Unknown: return parsedProcess.unknown;\r\n default: return {};\r\n }\r\n}\r\n\r\n\r\nfunction init(bwicReferenceName) {\r\n return async (dispatch, getState) => {\r\n try {\r\n const day = await daysService.getNextBusinessDate();\r\n\r\n const bwicPromise = bwicReferenceName\r\n ? bwicService.getByReferenceName(bwicReferenceName)\r\n : Promise.resolve(getState().editParsedBwic.bwic || { securities: [] });\r\n\r\n const bwic = await bwicPromise;\r\n\r\n if (bwic.referenceName) {\r\n dispatch(changeDate(bwic.date));\r\n dispatch(changeBidsDueTime(bwic.bidsDue));\r\n dispatch(changeGoodUntilTime(bwic.goodUntil));\r\n dispatch(changeTimeZone(bwic.timeZone.id));\r\n dispatch(changeDaysToSettle(bwic.daysToSettle));\r\n dispatch(changeCustomRules((bwic.process && bwic.process.rulesText) || ''));\r\n dispatch(securitiesActions.init(bwic.securities, gridColumns.securities()));\r\n dispatch(storeOriginalBwic(bwic));\r\n dispatch(changeEmailReceivedDate(bwic.emailReceivedDate))\r\n\r\n if (bwic.parsedProcess) {\r\n const processSettings = getProcessSpecificSettings(bwic.parsedProcess);\r\n dispatch(changeReserveLevelsApply(bwic.parsedProcess.reserveLevelsApply))\r\n dispatch(changeCanTradeEarly(bwic.parsedProcess.canTradeEarly))\r\n dispatch(changeCanBidEarly(bwic.parsedProcess.canBidEarly))\r\n dispatch(changePartialBidsAccepted(bwic.parsedProcess.partialBidsAccepted))\r\n dispatch(changeBwicProcessType(bwic.parsedProcess.processType))\r\n dispatch(changeHardCutOffNumber(processSettings.hardCutOff))\r\n dispatch(changeStage1EndTime(processSettings.stage1EndDateUtc))\r\n dispatch(changeStage2EndTime(processSettings.stage2EndDateUtc))\r\n dispatch(changeStage2Participants(processSettings.improverCount))\r\n if (bwic.parsedProcess.bidsGoodFor) {\r\n const timeSpan = dateTimeUtils.parseTimeSpan(bwic.parsedProcess.bidsGoodFor);\r\n if (timeSpan) {\r\n dispatch(changeBidsGoodForHours(timeSpan.hours || ''))\r\n dispatch(changeBidsGoodForMinutes(timeSpan.minutes || ''))\r\n }\r\n }\r\n }\r\n } else {\r\n dispatch(changeDate(day));\r\n dispatch(changeBidsDueTime(dateTimeUtils.timestampToUtcString('10:00 AM')));\r\n dispatch(changeGoodUntilTime(dateTimeUtils.timestampToUtcString('12:00 PM')));\r\n dispatch(changeDaysToSettle(constants.daysToSettleDefault));\r\n dispatch(changeReserveLevelsApply(true));\r\n dispatch(changeBwicProcessType(BwicProcessType.TopX));\r\n dispatch(changeCustomRules(''));\r\n dispatch(securitiesActions.init(bwic.securities, gridColumns.securities()));\r\n dispatch(storeOriginalBwic(bwic));\r\n }\r\n } catch (e) {\r\n dispatch(errorActions.criticalError(e));\r\n } finally {\r\n dispatch({ type: actionTypes.INIT_COMPLETED })\r\n }\r\n }\r\n}\r\n\r\nfunction storeOriginalBwic(bwic) {\r\n return {\r\n type: actionTypes.STORE_ORIGINAL_BWIC,\r\n bwic\r\n };\r\n}\r\n\r\nfunction reset() {\r\n return dispatch => {\r\n dispatch({ type: actionTypes.RESET });\r\n dispatch(securitiesActions.reset());\r\n dispatch(errorActions.resetError());\r\n }\r\n}\r\n\r\nfunction changeEmailReceivedDate(date) {\r\n return (dispatch, getState) => {\r\n const { errors = {} } = getState().editParsedBwic;\r\n\r\n dispatch({\r\n type: actionTypes.SET_EMAIL_RECEIVED_DATE,\r\n payload: { date }\r\n });\r\n\r\n if (errors && errors.emailReceivedDate) {\r\n dispatch(validate());\r\n }\r\n };\r\n}\r\n\r\nfunction changeDate(date) {\r\n return (dispatch, getState) => {\r\n const { errors = {} } = getState().editParsedBwic;\r\n\r\n dispatch({ type: actionTypes.CHANGE_DATE, date });\r\n if (errors && errors.date) {\r\n dispatch(validate());\r\n }\r\n }\r\n}\r\n\r\nfunction changeDaysToSettle(days) {\r\n return {\r\n type: actionTypes.DAYS_TO_SETTLE,\r\n days\r\n };\r\n}\r\n\r\nfunction changeTimeZone(timeZone) {\r\n return {\r\n type: actionTypes.TIME_ZONE,\r\n timeZone\r\n };\r\n}\r\n\r\nfunction changeBidsDueTime(time) {\r\n return (dispatch, getState) => {\r\n const { errors = {} } = getState().editParsedBwic;\r\n\r\n dispatch({ type: actionTypes.BIDS_DUE, time });\r\n if (hasTimeErrors(errors)) {\r\n dispatch(validate());\r\n }\r\n\r\n const bidsDueTime = moment.utc(time);\r\n const goodUntilTime = moment.utc(time).add(2, 'hour');\r\n\r\n const goodUntil = goodUntilTime.isSame(bidsDueTime, 'day')\r\n ? goodUntilTime.format(constants.dateTimeFormatUtc)\r\n : dateTimeUtils.timestampToUtcString('11:59 PM');\r\n\r\n dispatch(changeGoodUntilTime(goodUntil));\r\n }\r\n}\r\n\r\nfunction changeGoodUntilTime(time) {\r\n return (dispatch, getState) => {\r\n const { errors = {} } = getState().editParsedBwic;\r\n\r\n dispatch({ type: actionTypes.GOOD_UNTIL, time });\r\n if (hasTimeErrors(errors)) {\r\n dispatch(validate());\r\n }\r\n }\r\n}\r\n\r\nfunction hasTimeErrors(errors = {}) {\r\n return errors.time || errors.bidsGoodFor || errors.stage1EndDateUtc || errors.stage2EndDateUtc;\r\n}\r\n\r\nfunction changeCustomRules(rulesText) {\r\n return {\r\n type: actionTypes.RULES_TEXT,\r\n rulesText\r\n };\r\n}\r\n\r\nfunction changeReserveLevelsApply(value) {\r\n return {\r\n type: actionTypes.RESERVE_LEVELS_APPLY_CHANHE,\r\n value\r\n };\r\n}\r\nfunction changeCanTradeEarly(value) {\r\n return {\r\n type: actionTypes.CAN_TRADE_EARLY_CHANGE,\r\n value\r\n };\r\n}\r\nfunction changeCanBidEarly(value) {\r\n return {\r\n type: actionTypes.CAN_BID_EARLY_CHANGE,\r\n value\r\n };\r\n}\r\nfunction changePartialBidsAccepted(value) {\r\n return {\r\n type: actionTypes.PARTIAL_BIDS_ACCEPTED_CHANHE,\r\n value\r\n };\r\n}\r\nfunction getDefaultStage1EndTimeUtc(processType) {\r\n const defaultValue = '10:30 AM';\r\n return processType === BwicProcessType.TopX ||\r\n processType === BwicProcessType.JumpBall ||\r\n processType === BwicProcessType.BestFootForward ||\r\n processType === BwicProcessType.Unknown\r\n ? dateTimeUtils.timestampToUtcString(defaultValue)\r\n : null;\r\n}\r\nfunction getDefaultStage2EndTimeUtc(processType) {\r\n const defaultValue = '12:00 PM';\r\n return processType === BwicProcessType.TopX ||\r\n processType === BwicProcessType.JumpBall ||\r\n processType === BwicProcessType.Unknown\r\n ? dateTimeUtils.timestampToUtcString(defaultValue)\r\n : null;\r\n}\r\nfunction getDefaultStage2Participants(processType) {\r\n return processType === BwicProcessType.JumpBall ||\r\n processType === BwicProcessType.TopX ||\r\n processType === BwicProcessType.Unknown\r\n ? Stage2Participants.Top3\r\n : null;\r\n}\r\nfunction changeBwicProcessType(value) {\r\n return (dispatch, getState) => {\r\n dispatch({\r\n type: actionTypes.BWIC_PROCESS_TYPE_CHANGE,\r\n value\r\n });\r\n\r\n const hardCutOff = value === BwicProcessType.Standard ? null : 1;\r\n dispatch(changeHardCutOffNumber(hardCutOff));\r\n dispatch(changeStage1EndTime(getDefaultStage1EndTimeUtc(value)));\r\n dispatch(changeStage2EndTime(null))\r\n dispatch(changeStage2Participants(getDefaultStage2Participants(value)));\r\n\r\n if (hasTimeErrors(getState().editParsedBwic.errors)) {\r\n dispatch(validate());\r\n }\r\n };\r\n}\r\nfunction changeHardCutOffNumber(value) {\r\n return (dispatch, getState) => {\r\n dispatch({\r\n type: actionTypes.HARD_CUT_OFF_NUMBER_CHANGE,\r\n value\r\n });\r\n\r\n const processType = getState().editParsedBwic.bwicProcessType;\r\n\r\n dispatch(changeStage1EndTime(getDefaultStage1EndTimeUtc(processType)));\r\n dispatch(changeStage2EndTime(+value === 2 ? getDefaultStage2EndTimeUtc(processType) : null))\r\n dispatch(changeStage2Participants(getDefaultStage2Participants(processType)));\r\n\r\n if (hasTimeErrors(getState().editParsedBwic.errors)) {\r\n dispatch(validate());\r\n }\r\n }\r\n}\r\nfunction changeStage1EndTime(value) {\r\n return (dispatch, getState) => {\r\n dispatch({\r\n type: actionTypes.STAGE_1_TIME_CHANGE,\r\n value\r\n });\r\n\r\n const { errors } = getState().editParsedBwic;\r\n if (errors?.stage1EndDateUtc || errors.stage2EndDateUtc) {\r\n dispatch(validate());\r\n }\r\n }\r\n}\r\nfunction changeStage2EndTime(value) {\r\n return (dispatch, getState) => {\r\n\r\n dispatch({\r\n type: actionTypes.STAGE_2_TIME_CHANGE,\r\n value\r\n });\r\n\r\n const { errors } = getState().editParsedBwic;\r\n if (errors?.stage1EndDateUtc || errors.stage2EndDateUtc) {\r\n dispatch(validate());\r\n }\r\n };\r\n}\r\nfunction changeBidsGoodForHours(value) {\r\n return (dispatch, getState) => {\r\n const { errors } = getState().editParsedBwic;\r\n\r\n dispatch({\r\n type: actionTypes.BIDS_GOOD_FOR_HOURS_CHANGE,\r\n value\r\n });\r\n\r\n if (errors?.bidsGoodFor) {\r\n dispatch(validate());\r\n }\r\n };\r\n}\r\nfunction changeBidsGoodForMinutes(value) {\r\n return (dispatch, getState) => {\r\n const { errors } = getState().editParsedBwic;\r\n\r\n dispatch({\r\n type: actionTypes.BIDS_GOOD_FOR_MINUTES_CHANGE,\r\n value\r\n });\r\n\r\n if (errors?.bidsGoodFor) {\r\n dispatch(validate());\r\n }\r\n };\r\n}\r\nfunction changeStage2Participants(value) {\r\n return {\r\n type: actionTypes.STAGE_2_PARTICIPANTS_CHANGE,\r\n value\r\n };\r\n}\r\nfunction validate() {\r\n return (dispatch, getState) => {\r\n const { date, emailReceivedDate, bidsGoodForHours, bidsGoodForMinutes, ...state } =\r\n getState().editParsedBwic;\r\n\r\n const bidsDue = moment.utc(setBwicDate(date, adjustTime(state.bidsDue)));\r\n const goodUntil = moment.utc(setBwicDate(date, adjustTime(state.goodUntil)));\r\n const stage1EndDateUtc = state.stage1EndDateUtc ? moment.utc(setBwicDate(date, state.stage1EndDateUtc)) : null;\r\n const stage2EndDateUtc = state.stage2EndDateUtc ? moment.utc(setBwicDate(date, state.stage2EndDateUtc)) : null;\r\n\r\n const errors = {};\r\n errors.date = validateDate(date);\r\n errors.time = validateTime(bidsDue, goodUntil);\r\n errors.emailReceivedDate = validateEmailReceivedDate(emailReceivedDate);\r\n errors.bidsGoodFor = validateBidsGoodFor(bidsGoodForHours, bidsGoodForMinutes);\r\n errors.stage1EndDateUtc = validateStage1End(stage1EndDateUtc, stage2EndDateUtc, bidsDue, goodUntil);\r\n errors.stage2EndDateUtc = validateStage2End(stage1EndDateUtc, stage2EndDateUtc, bidsDue, goodUntil);\r\n\r\n const isValid = !values(errors).some(x => !!x);\r\n\r\n dispatch({\r\n type: actionTypes.VALIDATE,\r\n validation: {\r\n errors,\r\n isValid\r\n }\r\n })\r\n };\r\n}\r\n\r\nfunction validateDate(date) {\r\n if (date === '') {\r\n return errorMessages.empty;\r\n } else if (typeof date === 'undefined') {\r\n return errorMessages.invalidValue;\r\n }\r\n\r\n const momentDate = moment(date)\r\n const weekday = momentDate.isoWeekday();\r\n\r\n if ([6, 7].some(d => d === weekday)) {\r\n return errorMessages.bwicDateShouldNotBeWeekend;\r\n }\r\n\r\n return undefined;\r\n}\r\n\r\nfunction validateEmailReceivedDate(date) {\r\n if (date === '') {\r\n return errorMessages.empty;\r\n } else if (typeof date === 'undefined') {\r\n return errorMessages.invalidValue;\r\n }\r\n\r\n const min = moment().subtract(1, 'year');\r\n const max = moment().add(1, 'year');\r\n\r\n if (min.isAfter(date, 'd') || max.isBefore(date, 'd')) {\r\n return errorMessages.dateRange(\r\n min.format(constants.dateFormat),\r\n max.format(constants.dateFormat)\r\n );\r\n }\r\n\r\n return undefined;\r\n}\r\n\r\nfunction validateTime(bidsDue, goodUntil) {\r\n if (bidsDue >= goodUntil) {\r\n return errorMessages.bidsDueShoulbBeLessThanGoodUntil;\r\n }\r\n}\r\n\r\nfunction validateBidsGoodFor(hours, minutes) {\r\n if ((!Number(hours) && !Number(minutes))) return undefined;\r\n\r\n const totalMinutes = numericUtils.numberOrDefault(hours) * 60 + numericUtils.numberOrDefault(minutes)\r\n\r\n const min = 30; // minutes\r\n const maxHours = 12;\r\n\r\n if (totalMinutes < min || totalMinutes > (maxHours * 60)) {\r\n return errorMessages.shouldBeBetween(`${30} minutes`, `${maxHours} hours`)\r\n }\r\n\r\n return undefined;\r\n}\r\n\r\nfunction validateStage1End(stage1End, stage2End, start, end) {\r\n if (!stage1End) return undefined;\r\n if (start && end && (stage1End.isBefore(start) || stage1End.isAfter(end))) {\r\n return \"The time should be between start time and end time\";\r\n }\r\n if (stage2End && stage1End.isSameOrAfter(stage2End)) {\r\n return \"The value cannot be greater then the 2nd Stage Hard Cut Off (UTC)\"\r\n }\r\n\r\n return undefined;\r\n}\r\n\r\nfunction validateStage2End(stage1End, stage2End, start, end) {\r\n if (!stage2End) return undefined;\r\n if (start && end && (stage2End.isBefore(start) || stage2End.isAfter(end))) {\r\n return \"The time should be between start time and end time\";\r\n }\r\n if (stage1End && stage2End.isSameOrBefore(stage1End)) {\r\n return \"The value cannot be less then the 1st Stage Hard Cut Off (UTC)\"\r\n }\r\n\r\n return undefined;\r\n}\r\n\r\nfunction adjustTime(utcTime) {\r\n const time = dateTimeUtils.timestampFromUtcString(utcTime);\r\n\r\n if (time === '12:00 AM') {\r\n return dateTimeUtils.timestampToUtcString('11:59:59 PM');\r\n }\r\n\r\n return utcTime;\r\n}\r\n\r\nexport function setBwicDate(bwicDate, time) {\r\n if (!time) return undefined;\r\n\r\n return (bwicDate ? moment.utc(bwicDate) : moment.utc())\r\n .set('hour', moment.utc(time).hours())\r\n .set('minute', moment.utc(time).minute());\r\n}\r\n\r\nfunction showManageParsedBwics() {\r\n return () => {\r\n history.push(routes.manageParsedBwics);\r\n };\r\n}\r\n\r\nfunction save() {\r\n return (dispatch, getState) => {\r\n dispatch(validate());\r\n dispatch(gridActions.validate());\r\n\r\n const { isValid } = getState().editParsedBwic;\r\n const isPositionsValid = getState().grid.isValid;\r\n\r\n if (isValid && isPositionsValid) {\r\n dispatch(setSaveProgressState(true));\r\n doSave(getState())\r\n .then(() => {\r\n dispatch(saved());\r\n })\r\n .catch(e => {\r\n if (e.status === 409) {\r\n dispatch(\r\n notificationActions.notificationAddErrorMessageModal(\r\n errorMessages.refreshPage,\r\n errorMessages.cantSavePxTalk409,\r\n true\r\n )\r\n );\r\n } else {\r\n dispatch(errorActions.error(e, errorMessages.unexpectedError))\r\n }\r\n })\r\n .finally(() => dispatch(setSaveProgressState(false)));\r\n }\r\n };\r\n}\r\n\r\nfunction setSaveProgressState(isSaving) {\r\n return {\r\n type: actionTypes.SAVING_STATE,\r\n isSaving\r\n };\r\n}\r\n\r\nfunction saveOnExit(pathname, beforeNavigateCallback) {\r\n return async (dispatch, getState) => {\r\n dispatch(validate());\r\n dispatch(gridActions.validate());\r\n\r\n const { isValid } = getState().editParsedBwic;\r\n const isPositionsValid = getState().grid.isValid;\r\n\r\n if (isValid && isPositionsValid) {\r\n dispatch(setSaveProgressState(true));\r\n try {\r\n await doSave(getState());\r\n history.push(pathname);\r\n } catch (e) {\r\n beforeNavigateCallback(false);\r\n dispatch(errorActions.unexpectedError(e));\r\n } finally {\r\n dispatch(setSaveProgressState(false));\r\n }\r\n } else if (beforeNavigateCallback) {\r\n beforeNavigateCallback(false);\r\n }\r\n };\r\n}\r\n\r\nfunction saveAndPublish() {\r\n return async (dispatch, getState) => {\r\n dispatch(validate());\r\n dispatch(gridActions.validate());\r\n\r\n const { isValid } = getState().editParsedBwic;\r\n const isPositionsValid = getState().grid.isValid;\r\n\r\n if (isValid && isPositionsValid) {\r\n dispatch(setSaveProgressState(true));\r\n try {\r\n const referenceName = await doSave(getState());\r\n await parsedBwicsService.publish(referenceName);\r\n dispatch(saved());\r\n } catch (e) {\r\n dispatch(errorActions.unexpectedError(e));\r\n } finally {\r\n dispatch(setSaveProgressState(false));\r\n }\r\n }\r\n };\r\n}\r\n\r\nfunction saved() {\r\n return (dispatch, getState) => {\r\n getState().grid.dataItems\r\n .filter(s => !s.draft && s.pxTalks && s.id)\r\n .forEach(s => {\r\n dispatch(priceTalksActions.replacePriceTalks(s.id, s.pxTalks))\r\n });\r\n dispatch({ type: actionTypes.BWIC_SAVED })\r\n }\r\n}\r\n\r\nfunction doSave(state) {\r\n const positions = state.grid.dataItems.filter(s => !s.draft);\r\n const { bwic, date, bidsDue, goodUntil, timeZone, daysToSettle, rulesText, emailReceivedDate,\r\n reserveLevelsApply, canTradeEarly, canBidEarly, partialBidsAccepted, bidsGoodForHours, bidsGoodForMinutes,\r\n bwicProcessType, hardCutOff, stage1EndDateUtc, stage2EndDateUtc, improverCount } = state.editParsedBwic;\r\n\r\n const payload = {\r\n referenceName: bwic.referenceName,\r\n date: moment(date).startOf('day').utcOffset(0, true).toISOString(),\r\n bidsDue: moment.utc(bidsDue).utcOffset(0, true).toISOString(),\r\n goodUntil: moment.utc(goodUntil).utcOffset(0, true).toISOString(),\r\n timeZone,\r\n daysToSettle,\r\n emailReceivedDate,\r\n rulesText: rulesText == null ? rulesText.trim() : rulesText,\r\n reserveLevelsApply,\r\n canTradeEarly,\r\n canBidEarly,\r\n partialBidsAccepted,\r\n bidsGoodFor: bidsGoodForHours || bidsGoodForMinutes\r\n ? dateTimeUtils.timeSpan(\r\n numericUtils.numberOrDefault(bidsGoodForHours),\r\n numericUtils.numberOrDefault(bidsGoodForMinutes),\r\n 0)\r\n : undefined,\r\n processType: bwicProcessType,\r\n hardCutOff,\r\n stage1EndDateUtc: setBwicDate(date, stage1EndDateUtc)?.toISOString(),\r\n stage2EndDateUtc: setBwicDate(date, stage2EndDateUtc)?.toISOString(),\r\n improverCount,\r\n positions\r\n }\r\n\r\n return parsedBwicsService.save(payload);\r\n}\r\n\r\nfunction cancelDialog(visible) {\r\n return {\r\n type: actionTypes.CANCEL_DIALOG,\r\n cancelDialog: { visible }\r\n };\r\n}\r\n\r\nfunction cancelBwic(referenceName) {\r\n return dispatch => {\r\n dispatch(cancelDialog(false));\r\n\r\n parsedBwicsService\r\n .cancel(referenceName)\r\n .then(\r\n () => history.push(routes.manageParsedBwics),\r\n e => dispatch(errorActions.unexpectedError())\r\n );\r\n };\r\n}\r\n\r\n\r\n","import { createAction } from 'typesafe-actions';\r\nimport { BrokerDealerCompanySlim } from '../types/company/BrokerDealerCompanySlim';\r\nimport { SettlementAgentAgreement } from '../types/bid-as-dealer/SettlementAgentAgreement';\r\nimport { DealerListFilterOption } from '../types/state/DealerListState';\r\n\r\nconst selectDealers = createAction(\r\n 'newBwicDealers/SET_SELECTED_DEALER',\r\n resolve => (selectedDealers: { [dealerId: number]: boolean }) => resolve({ selectedDealers })\r\n);\r\n\r\nconst selectDealer = createAction(\r\n 'newBwicDealers/SET_DEALER_SELECTED',\r\n resolve => (dealerId: number) => resolve({ dealerId })\r\n);\r\n\r\nconst selectDealersByDefault = createAction(\r\n 'newBwicDealers/SELECT_DEALERS_BY_DEFAULT',\r\n resolve => (dealers: BrokerDealerCompanySlim[]) => resolve({ dealers })\r\n);\r\n\r\nconst resetSelectedByDefaultFlag = createAction('newBwicDealers/SELECT_DEALERS_BY_DEFAULT_RESET');\r\n\r\nconst sellerBidAsDealerAgreementsPushDataReceived = createAction(\r\n 'newBwicDealers/BID_AS_DEALER_AGREEMENT_PUSH_DATA_RECEIVED',\r\n resolve => (agreement: SettlementAgentAgreement) => resolve({ agreement })\r\n);\r\n\r\nconst updateFilterOptions = createAction(\r\n 'newBwicDealers/UPDATE_FILTER_OPTIONS',\r\n resolve => (filterOption: DealerListFilterOption) => resolve({ filterOption })\r\n);\r\n\r\nconst clearFilterOptions = createAction('newBwicDealers/CLEAR_FILTER_OPTIONS');\r\n\r\nconst setSearchTerm = createAction(\r\n 'newBwicDealers/SET_SEARCH_TERM',\r\n resolve => (searchTerm: string) => resolve({ searchTerm })\r\n);\r\n\r\nconst reset = createAction('newBwicDealers/RESET');\r\n\r\nconst setSelectPlatformDealersPopupVisible = createAction(\r\n 'newBwicDealers/SET_SELECT_PLATFORM_DEALERS_POPUP_VISIBLE',\r\n resolve => (visible: boolean) => resolve({ visible })\r\n);\r\n\r\nexport const newBwicDealersActions = {\r\n selectDealersByDefault,\r\n selectDealers,\r\n selectDealer,\r\n sellerBidAsDealerAgreementsPushDataReceived,\r\n updateFilterOptions,\r\n clearFilterOptions,\r\n setSearchTerm,\r\n resetSelectedByDefaultFlag,\r\n reset,\r\n setSelectPlatformDealersPopupVisible\r\n};\r\n","import {\r\n companyRoles,\r\n constants,\r\n editCompanyActions as actionTypes,\r\n errorMessages,\r\n RegistrationType,\r\n} from '../constants';\r\nimport { errorActions } from '.';\r\nimport { companiesService, locationService, salesRepresentativesService } from '../services';\r\n\r\nexport const editCompanyActions = {\r\n init,\r\n reset,\r\n save,\r\n loadCities,\r\n};\r\n\r\nfunction init(referenceName) {\r\n return async dispatch => {\r\n try {\r\n dispatch(setLoadingCompanyStatus(true));\r\n const companyPromise = referenceName != null\r\n ? companiesService.getCompany(referenceName)\r\n : new Promise(resolve => resolve(undefined));\r\n const countriesPromise = locationService.getCountries();\r\n const statesPromise = locationService.getStates(constants.USCountryCode);\r\n const salesRepresentativesPromise = salesRepresentativesService.getList();\r\n\r\n const company = await companyPromise;\r\n const countries = await countriesPromise;\r\n const states = await statesPromise;\r\n const salesRepresentatives = await salesRepresentativesPromise;\r\n\r\n dispatch(loadCountries(countries));\r\n dispatch(loadStates(states));\r\n dispatch(storeSalesRepresentatives(salesRepresentatives.map(s => (\r\n { ...s, selected: company && company.salesRepresentatives.some(с => с.id === s.id) })))\r\n );\r\n\r\n if (referenceName != null && company) {\r\n if (!company.id) {\r\n throw new Error({ status: 404, message: 'Company not found' });\r\n }\r\n if (company.countryCode === constants.USCountryCode) {\r\n dispatch(loadCities(company.stateId));\r\n }\r\n company.registrationType = company.manualRegistration ? RegistrationType.manual : RegistrationType.sendLink;\r\n if (company.mpid) {\r\n company.mpid = company.mpid.trim();\r\n }\r\n if (company.headOfTrading == null) {\r\n company.headOfTrading = {}\r\n }\r\n }\r\n dispatch(loadCompany(company));\r\n }\r\n catch (e) {\r\n dispatch(errorActions.criticalError(e));\r\n }\r\n finally {\r\n dispatch(setLoadingCompanyStatus(false));\r\n }\r\n };\r\n}\r\n\r\nfunction storeSalesRepresentatives(salesRepresentatives) {\r\n return {\r\n type: actionTypes.SALES_REPRESENTATIVES,\r\n salesRepresentatives\r\n }\r\n}\r\n\r\nfunction loadCities(stateId) {\r\n return dispatch => {\r\n if (stateId) {\r\n locationService\r\n .getCities(stateId)\r\n .then(\r\n cities => dispatch({ type: actionTypes.CITIES, cities }),\r\n e => dispatch(errorActions.error(e))\r\n );\r\n } else {\r\n dispatch({ type: actionTypes.CITIES, cities: [] });\r\n }\r\n };\r\n}\r\n\r\nfunction loadStates(states) {\r\n return {\r\n type: actionTypes.STATES,\r\n states\r\n };\r\n}\r\n\r\nfunction loadCountries(countries) {\r\n return {\r\n type: actionTypes.COUNTRIES,\r\n countries\r\n };\r\n}\r\n\r\nfunction loadCompany(company) {\r\n return { type: actionTypes.COMPANY, company };\r\n}\r\n\r\nfunction save(values) {\r\n return async (dispatch, getState) => {\r\n dispatch(saving(true));\r\n\r\n const { salesRepresentatives, company } = getState().editCompany;\r\n const isBrokerDealer = values.role === companyRoles.BrokerDealer;\r\n const model = {\r\n id: values.id,\r\n name: values.name.trim(),\r\n phone: values.phone ? values.phone.trim() : null,\r\n website: values.website ? values.website.trim() : null,\r\n countryCode: values.countryCode,\r\n stateId: values.stateId,\r\n state: values.stateId ? null : values.state.trim(),\r\n cityId: values.cityId,\r\n city: values.cityId ? null : values.city.trim(),\r\n zipCode: values.zipCode ? values.zipCode.trim() : '',\r\n address: values.address.trim(),\r\n role: values.role,\r\n code: values.code ? values.code.trim().toUpperCase() : '',\r\n distributionList: isBrokerDealer && values.distributionList ? values.distributionList.trim() : null,\r\n mpid: isBrokerDealer && values.mpid ? values.mpid.trim().toUpperCase() : null,\r\n manualRegistration: company ? company.registrationType === RegistrationType.manual : true,\r\n headOfTrading: {\r\n firstName: values.headOfTradingFirstName,\r\n lastName: values.headOfTradingLastName,\r\n email: values.headOfTradingEmail,\r\n office: values.headOfTradingOffice ? values.headOfTradingOffice.trim() : null,\r\n mobile: values.headOfTradingMobile ? values.headOfTradingMobile.trim() : null,\r\n }\r\n };\r\n\r\n const salesRepresentativesToAssign = salesRepresentatives\r\n .filter(s => values.salesRepresentatives.some(v => v === s.id) && (company ? !company.salesRepresentatives.some(c => c.id === s.id) : true))\r\n .map(s => s.id);\r\n const salesRepresentativesToUnassign = salesRepresentatives\r\n .filter(s => !values.salesRepresentatives.some(v => v === s.id) && company && company.salesRepresentatives.some(c => c.id === s.id))\r\n .map(s => s.id);\r\n\r\n try {\r\n const companyId = await companiesService.save(model);\r\n\r\n const assignPromise = salesRepresentativesToAssign.length\r\n ? salesRepresentativesService.assign({ companyId, representativeUserIdList: salesRepresentativesToAssign })\r\n : Promise.resolve();\r\n\r\n const unassignPromise = salesRepresentativesToUnassign.length\r\n ? salesRepresentativesService.unassign({ companyId, representativeUserIdList: salesRepresentativesToUnassign })\r\n : Promise.resolve();\r\n\r\n await assignPromise;\r\n await unassignPromise;\r\n\r\n dispatch(saved());\r\n } catch (e) {\r\n dispatch(errorActions.error(\r\n e,\r\n errorMessages.unexpectedError,\r\n errorMessages.companyInformationCanNotBeChanged\r\n ));\r\n } finally {\r\n dispatch(saving(false))\r\n }\r\n };\r\n}\r\n\r\nfunction setLoadingCompanyStatus(status) {\r\n return {\r\n type: actionTypes.EDIT_COMPANY_LOADING_STATUS,\r\n payload: { status }\r\n }\r\n}\r\n\r\nfunction saving(isSaving) {\r\n return {\r\n type: actionTypes.SAVING,\r\n isSaving\r\n };\r\n}\r\n\r\nfunction saved() {\r\n return {\r\n type: actionTypes.SAVED,\r\n };\r\n}\r\n\r\nfunction reset() {\r\n return dispatch => {\r\n dispatch({ type: actionTypes.RESET });\r\n dispatch(errorActions.resetError());\r\n };\r\n}\r\n","import { createAction } from 'typesafe-actions';\r\nimport { SellerAdminEditFormModel } from '../types/seller-admin/SellerAdminEditFormModel';\r\nimport { CompanyUser } from '../types/management/CompanyUser';\r\nimport { UserCreationRequest } from '../types/management/UserCreationRequest';\r\nimport { RequestState } from '../constants/request-state';\r\nimport { UserStatus } from '../types/account/UserStatus';\r\nimport { UpdateBwicAnnouncementNotifications } from '../types/profile/UpdateBwicAnnouncementNotifications';\r\n\r\nconst getUserListRequest = createAction('sellerAdminUsers/GET_USERS_LIST/REQUEST');\r\nconst getUserListSuccess = createAction(\r\n 'sellerAdminUsers/GET_USERS_LIST/SUCCESS',\r\n resolve => (users: CompanyUser[], requestUsers: UserCreationRequest[]) => resolve({ users, requestUsers })\r\n);\r\nconst getUserListFailure = createAction('sellerAdminUsers/GET_USERS_LIST/FAILURE');\r\n\r\nconst saveUser = createAction(\r\n 'sellerAdminUsers/SAVE_USER',\r\n resolve => (data: SellerAdminEditFormModel, userId: number) => resolve({ data, userId })\r\n);\r\nconst setUserUpdateState = createAction(\r\n 'sellerAdminUsers/DET_UPDATE_USER_STATE',\r\n resolve => (requestState: RequestState, user?: CompanyUser) => resolve({ requestState, user })\r\n);\r\nconst userSaved = createAction(\r\n 'sellerAdminUsers/SET_USER_SAVED',\r\n resolve => (user: CompanyUser) => resolve({ user })\r\n);\r\n\r\nconst saveUserRequest = createAction(\r\n 'sellerAdminUsers/SAVE_USER_REQUEST',\r\n resolve =>\r\n (data: SellerAdminEditFormModel, userRequestId: number, concurrencyStamp?: Date | undefined) =>\r\n resolve({ data, userRequestId, concurrencyStamp })\r\n);\r\nconst setUserRequestUpdateState = createAction(\r\n 'sellerAdminUsers/SET_USER_REQUEST_UPDATE_STATE',\r\n resolve => (requestState: RequestState) => resolve({ requestState })\r\n);\r\nconst userRequestSaved = createAction(\r\n 'sellerAdminUsers/SET_USER_REQUEST_SAVED',\r\n resolve => (userRequest: UserCreationRequest) => resolve({ userRequest })\r\n);\r\n\r\nconst disableUser = createAction(\r\n 'sellerAdminUsers/DISABLE_USER',\r\n resolve => (userId: number, blockReason: string) => resolve({ userId, blockReason })\r\n);\r\nconst enableUser = createAction(\r\n 'sellerAdminUsers/ENABLE_USER',\r\n resolve => (userId: number) => resolve({ userId })\r\n);\r\nconst setUserOperationState = createAction(\r\n 'sellerAdminUsers/SET_USER_OPERATION_STATE',\r\n resolve => (requestState: RequestState, userId: number) => resolve({ requestState, userId, })\r\n);\r\nconst setUserEnabled = createAction(\r\n 'sellerAdminUsers/SET_ENABLED_USER',\r\n resolve => (userId: number, status: UserStatus) => resolve({ userId, status })\r\n);\r\nconst setUserDisable = createAction(\r\n 'sellerAdminUsers/SET_DISABLED_USER',\r\n resolve => (userId: number, blockReason: string) => resolve({ userId, blockReason })\r\n);\r\n\r\nconst disableUserRequest = createAction(\r\n 'sellerAdminUsers/DISABLE_USER_REQUEST',\r\n resolve => (userRequestId: number, concurrencyStamp: Date, blockReason: string,) => resolve({\r\n userRequestId,\r\n concurrencyStamp,\r\n blockReason\r\n })\r\n);\r\nconst enableUserRequest = createAction(\r\n 'sellerAdminUsers/ENABLE_USER_REQUEST',\r\n resolve => (userRequestId: number, concurrencyStamp: Date) => resolve({ userRequestId, concurrencyStamp })\r\n);\r\nconst setUserRequestOperationState = createAction(\r\n 'sellerAdminUsers/SET_USER_REQUEST_OPERATION_STATE',\r\n resolve => (requestState: RequestState, userId: number) => resolve({\r\n requestState,\r\n userId\r\n })\r\n);\r\nconst userRequestEnabled = createAction(\r\n 'sellerAdminUsers/SET_USER_REQUEST_ENABLED',\r\n resolve => (userRequest: UserCreationRequest) => resolve({ userRequest })\r\n);\r\nconst userRequestDisabled = createAction(\r\n 'sellerAdminUsers/SET_USER_REQUEST_DISABLED',\r\n resolve => (userRequest: UserCreationRequest) => resolve({ userRequest })\r\n);\r\n\r\nconst exportUsersRequest = createAction('sellerAdminUsers/EXPORT_REQUEST');\r\nconst exportUsersResponse = createAction('sellerAdminUsers/EXPORT_RESPONSE');\r\n\r\nconst reset = createAction('sellerAdminUsers/RESET');\r\n\r\nconst changeBwicAnnouncementNotificationsRequest = createAction(\r\n 'sellerAdminUsers/CHANGE_BWIC_ANNOUNCMENT_NOTIFICATIONS_REQUEST',\r\n resolve => (requestState: RequestState) => resolve({ requestState })\r\n)\r\n\r\nconst changeBwicAnnouncementNotifications = createAction(\r\n 'sellerAdminUsers/CHANGE_BWIC_ANNOUNCMENT_NOTIFICATIONS',\r\n resolve => (bwicAnnouncementNotifications: UpdateBwicAnnouncementNotifications) =>\r\n resolve({\r\n bwicCreateNotifyAdmins: bwicAnnouncementNotifications.bwicCreateNotifyAdmins,\r\n bwicCreateNotifyViewers: bwicAnnouncementNotifications.bwicCreateNotifyViewers\r\n })\r\n)\r\n\r\nexport const sellerAdminUsersActions = {\r\n getUserListRequest,\r\n getUserListSuccess,\r\n getUserListFailure,\r\n saveUserRequest,\r\n setUserRequestUpdateState,\r\n userRequestSaved,\r\n saveUser,\r\n setUserUpdateState,\r\n userSaved,\r\n disableUser,\r\n enableUser,\r\n setUserOperationState,\r\n setUserEnabled,\r\n setUserDisable,\r\n disableUserRequest,\r\n enableUserRequest,\r\n reset,\r\n setUserRequestOperationState,\r\n userRequestEnabled,\r\n userRequestDisabled,\r\n exportUsersRequest,\r\n exportUsersResponse,\r\n changeBwicAnnouncementNotificationsRequest,\r\n changeBwicAnnouncementNotifications\r\n};\r\n","import { rulesActions as actionTypes } from '../constants';\r\nimport { controlPanelActions } from './control-panel.actions';\r\n\r\nexport const rulesActions = {\r\n show,\r\n hide\r\n}\r\n\r\nfunction show(positionId, separatePanel) {\r\n return dispatch => {\r\n dispatch(controlPanelActions.hide());\r\n dispatch({ type: actionTypes.RULES_SHOW, positionId, separatePanel });\r\n };\r\n}\r\n\r\nfunction hide() {\r\n return (dispatch, getState) => {\r\n if (getState().rules.show) {\r\n dispatch({ type: actionTypes.RULES_HIDE });\r\n }\r\n };\r\n}\r\n","import { keys } from 'lodash';\r\nimport {\r\n brokerDealerBiddingActions as actionTypes,\r\n bwicStatuses\r\n} from '../constants';\r\nimport { biddingService } from '../services';\r\nimport { brokerDealerAccessState } from '../constants/bidding';\r\nimport { errorActions, bidPlacementActions } from '.';\r\nimport { createAction } from 'typesafe-actions';\r\nimport { bidConfirmationActions } from './bid-confirmation.actions';\r\nimport { priceTalksActions } from './price-talks.actions';\r\nimport { RequestState } from '../constants/request-state';\r\n\r\n\r\nconst submitBids = createAction('brokerDealerBidding/SUBMIT_CONFIRMED',\r\n resolve => (positionId, bids) => resolve({ positionId, bids })\r\n);\r\n\r\nexport const brokerDealerBiddingActions = {\r\n init,\r\n reset,\r\n sendInviteRequest,\r\n bidAll,\r\n bidSingle,\r\n submitBids\r\n}\r\n\r\nfunction init(bwic) {\r\n return async dispatch => {\r\n try {\r\n if (!bwic.isParsed) {\r\n const accessState = await biddingService.getAccessState(bwic.referenceName);\r\n dispatch(storeAccessState(accessState));\r\n }\r\n\r\n if (bwic.status === bwicStatuses.scheduled.key) {\r\n dispatch(initScheduled(bwic.securities));\r\n } else {\r\n dispatch(storeSecurities([...bwic.securities]));\r\n }\r\n\r\n dispatch(initPriceTalks(bwic.securities));\r\n } catch (e) {\r\n dispatch(errorActions.criticalError(e));\r\n }\r\n };\r\n}\r\n\r\nfunction storeSecurities(securities) {\r\n return {\r\n type: actionTypes.BROKER_DEALER_BIDDING_STORE_SECURITIES,\r\n securities\r\n };\r\n}\r\n\r\nfunction initScheduled(securities) {\r\n return storeSecurities(securities);\r\n}\r\n\r\nfunction initPriceTalks(securities) {\r\n return dispatch =>\r\n securities\r\n .filter(s => s.pxTalks?.length)\r\n .forEach(s => dispatch(priceTalksActions.requestResult(s.id, RequestState.success, s.pxTalks)));\r\n}\r\n\r\nfunction reset() {\r\n return { type: actionTypes.BROKER_DEALER_BIDDING_RESET };\r\n}\r\n\r\nfunction storeAccessState(accessState) {\r\n return {\r\n type: actionTypes.BROKER_DEALER_ACCESS_STATE,\r\n accessState\r\n };\r\n}\r\n\r\nfunction sendInviteRequest(comment = '') {\r\n return (dispatch, getState) => {\r\n const { bwic } = getState().bidding;\r\n\r\n biddingService\r\n .requestAccess(bwic.referenceName, comment.trim())\r\n .then(() => dispatch(storeAccessState(brokerDealerAccessState.accessRequested)))\r\n .catch(e => dispatch(errorActions.unexpectedError(e)));\r\n };\r\n}\r\n\r\nfunction bidSingle(positionId) {\r\n return (dispatch, getState) => {\r\n dispatch(bidPlacementActions.validateSingle(positionId));\r\n\r\n const { securities, editBid } = getState().brokerDealerBidding;\r\n const position =\r\n securities &&\r\n securities.length &&\r\n securities.find(s => s.id === positionId);\r\n\r\n if (position && !hasBidErrors([positionId], editBid)) {\r\n dispatch(bidConfirmationActions.confirmation([position.id]));\r\n }\r\n };\r\n}\r\n\r\nfunction bidAll() {\r\n return (dispatch, getState) => {\r\n dispatch(bidPlacementActions.validate());\r\n\r\n const { securities, editBid } = getState().brokerDealerBidding;\r\n const biddingSecurities = securities\r\n .filter(s => editBid[s.id] && editBid[s.id].canSubmit)\r\n .map(s => s.id);\r\n\r\n if (!hasBidErrors(biddingSecurities, editBid)) {\r\n dispatch(bidConfirmationActions.confirmation(biddingSecurities));\r\n }\r\n };\r\n}\r\n\r\nfunction hasBidErrors(securities, editState) {\r\n return securities.some(id => {\r\n const edit = editState[id];\r\n return edit && edit.errors && keys(edit.errors).length\r\n });\r\n}\r\n","import { createAction } from 'typesafe-actions';\r\nimport { SellerAdminTradingLimitValuesState } from '../types/seller-admin/SellerAdminTradingLimitValuesState';\r\n\r\nconst setEditModeStatus = createAction(\r\n 'sellerAdminLimit/SET_EDIT_MODE_STATUS',\r\n resolve => (status: boolean) => resolve({ status })\r\n);\r\n\r\nconst getTradeLimitsRequest = createAction('sellerAdminLimit/GET_TRADING_LIMITS_REQUEST');\r\nconst getTradeLimitsSuccess = createAction(\r\n 'sellerAdminLimit/GET_TRADING_LIMITS_SUCCESS',\r\n resolve => (limits: { currency: string, type: number, size: number | null }[]) => resolve({ limits})\r\n);\r\n\r\nconst updateTradeLimitsRequest = createAction(\r\n 'sellerAdminLimit/UPDATE_TRADE_LIMITS_REQUEST',\r\n resolve => (limits: SellerAdminTradingLimitValuesState) => resolve({ limits })\r\n);\r\nconst updateTradeLimitsSuccess = createAction('sellerAdminLimit/UPDATE_TRADE_LIMITS_SUCCESS');\r\nconst updateTradeLimitsFailure = createAction('sellerAdminLimit/UPDATE_TRADE_LIMITS_FAILURE');\r\n\r\nconst reset = createAction('sellerAdminLimit/RESET');\r\n\r\nexport const sellerAdminLimitActions = {\r\n setEditModeStatus,\r\n getTradeLimitsRequest,\r\n getTradeLimitsSuccess,\r\n updateTradeLimitsRequest,\r\n updateTradeLimitsSuccess,\r\n updateTradeLimitsFailure,\r\n reset\r\n};\r\n","import { saveAs } from 'file-saver';\r\nimport {\r\n companiesActions as actionTypes,\r\n companyColumnsExportValues,\r\n companyRoles,\r\n companyStatuses,\r\n errorMessages,\r\n routes,\r\n roles,\r\n userStatuses\r\n} from '../constants';\r\nimport { errorActions, notificationActions } from '.';\r\nimport { companiesService, locationService, salesRepresentativesService, usersService } from '../services';\r\nimport { RequestState } from \"../constants/request-state\";\r\nimport { history } from '../history';\r\nimport { logger } from '../logging/logger';\r\nimport { CompanyStatus } from '../types/company/CompanyStatus';\r\nimport { getSearchDateRange } from '../utils';\r\nimport { UserStatus } from '../types/account/UserStatus';\r\nimport { companyFilterInitialState, memberFilterInitialState } from '../reducers/companies.reducer';\r\nimport { amrPipelineService } from '../services/amr-pipeline.service';\r\nimport { isNil } from 'lodash';\r\n\r\nexport const companiesActions = {\r\n init,\r\n initCreateEditUser,\r\n reset,\r\n resetEditMember,\r\n orderCompaniesBy,\r\n orderMembersBy,\r\n approveCompany,\r\n rejectCompany,\r\n companyRejectReasonSet,\r\n companyApprovalConfirmationShow,\r\n companyApprovalConfirmationHide,\r\n companyRejectionConfirmationShow,\r\n companyRejectionConfirmationHide,\r\n companyStatusChangeConfirmation,\r\n memberStatusChangeConfirmation,\r\n resendInviteConfirmation,\r\n resetPasswordConfirmation,\r\n chnageTfaEnabledStatusConfirmation,\r\n chnageTfaEnabledStatus,\r\n resendInvite,\r\n resetPassword,\r\n changeCompanyStatus,\r\n changeMemberBlockedStatus,\r\n filterCompanies,\r\n filterMembers,\r\n showCompanyMembers,\r\n showMemberCompany,\r\n saveMember,\r\n setMemberOfacStatus,\r\n setCompanyOfacStatus,\r\n exportUsers,\r\n storeUsers,\r\n getUserLoginHistory,\r\n resetUserLoginHistory,\r\n memberSubscriptionChange,\r\n companySubscriptionChange,\r\n changeClearingBankSettings,\r\n setTempPassword,\r\n deleteUser,\r\n exportCompanies,\r\n companyPushDataReceived,\r\n applyCompanyFilters,\r\n applyMemberFilters,\r\n resetCompanyFilters,\r\n resetMemberFilters\r\n};\r\n\r\nfunction init() {\r\n return async (dispatch, getState) => {\r\n try {\r\n const companiesPromise = companiesService.getCompanies();\r\n const usersPromise = usersService.getUsers();\r\n const userRequestsPromise = usersService.getUserCreationRequests();\r\n const countriesPromise = locationService.getCountries();\r\n const salesRepresentativesPromise = salesRepresentativesService.getList();\r\n\r\n const companyList = await companiesPromise;\r\n const users = await usersPromise;\r\n const userRequests = await userRequestsPromise;\r\n const countries = await countriesPromise;\r\n const salesRepresentatives = await salesRepresentativesPromise;\r\n\r\n dispatch(storeCompanies(companyList));\r\n dispatch(storeUsers(users));\r\n dispatch(storeUserRequests(userRequests));\r\n dispatch({ type: actionTypes.COUNTRIES, countries });\r\n dispatch({ type: actionTypes.STORE_SALES_REPRESENTATIVES, salesRepresentatives });\r\n\r\n const { isInitCompleted, companyFilter, memberFilter } = getState().companies;\r\n\r\n if (isInitCompleted) {\r\n dispatch(filterCompanies(companyFilter));\r\n dispatch(filterMembers(memberFilter));\r\n } else {\r\n dispatch(initCompleted());\r\n }\r\n } catch (e) {\r\n dispatch(errorActions.criticalError(e));\r\n }\r\n };\r\n}\r\n\r\nfunction initCreateEditUser(userId, companyId = 0) {\r\n return async (dispatch) => {\r\n try {\r\n const companiesPromise = companiesService.getCompanies();\r\n const userPromise = userId\r\n ? usersService.getUser(userId)\r\n : Promise.resolve({\r\n companyId,\r\n firstName: '',\r\n lastName: '',\r\n jobTitle: '',\r\n email: '',\r\n phone: '',\r\n roles: [],\r\n primaryContact: false,\r\n });\r\n const [companies, user] = await Promise.all([companiesPromise, userPromise]);\r\n\r\n if(!userId && companyId){\r\n const company = companies.find(c => c.id === companyId);\r\n if(company?.role === companyRoles.Media){\r\n user.roles = [roles.Media, roles.Viewer];\r\n }\r\n }\r\n\r\n dispatch(storeCompanies(companies));\r\n dispatch(setEditingUser(user))\r\n } catch (e) {\r\n dispatch(errorActions.criticalError(e));\r\n } finally {\r\n dispatch(updateStateEditUserInit(true));\r\n }\r\n }\r\n}\r\n\r\nfunction setEditingUser(user) {\r\n return { type: actionTypes.COMPANY_SET_EDITING_USER, payload: { user } }\r\n}\r\n\r\nfunction updateStateEditUserInit(status) {\r\n return { type: actionTypes.COMPANY_UPDATE_INIT_STATUS_EDIT_USER, payload: { status } }\r\n}\r\n\r\nfunction initCompleted() {\r\n return {\r\n type: actionTypes.INIT_COMPLETED\r\n };\r\n}\r\n\r\nfunction storeUsers(users) {\r\n return { type: actionTypes.USERS, users };\r\n}\r\n\r\nfunction storeCompanies(companies) {\r\n return {\r\n type: actionTypes.COMPANIES,\r\n companies\r\n };\r\n}\r\n\r\nfunction storeUserRequests(userRequests) {\r\n return {\r\n type: actionTypes.USER_REQUESTS,\r\n userRequests\r\n };\r\n}\r\n\r\nfunction orderCompaniesBy(column) {\r\n return (dispatch, getState) => {\r\n const { companyOrderBy } = getState().companies;\r\n\r\n let direction = 'asc';\r\n if (companyOrderBy.column === column) {\r\n direction = companyOrderBy.direction === 'asc' ? 'desc' : 'asc';\r\n }\r\n\r\n dispatch({\r\n type: actionTypes.ORDER_BY,\r\n orderBy: { column, direction }\r\n });\r\n };\r\n}\r\n\r\nfunction orderMembersBy(column) {\r\n return (dispatch, getState) => {\r\n const { memberOrderBy } = getState().companies;\r\n\r\n let direction = 'asc';\r\n if (memberOrderBy.column === column) {\r\n direction = memberOrderBy.direction === 'asc' ? 'desc' : 'asc';\r\n }\r\n\r\n dispatch({\r\n type: actionTypes.MEMBERS_ORDER_BY,\r\n orderBy: { column, direction }\r\n });\r\n };\r\n}\r\n\r\nfunction companyApprovalConfirmationShow(company) {\r\n return {\r\n type: actionTypes.COMPANY_APPROVAL_CONFIRMATION_SHOW,\r\n company,\r\n }\r\n}\r\n\r\nfunction companyApprovalConfirmationHide() {\r\n return {\r\n type: actionTypes.COMPANY_APPROVAL_CONFIRMATION_SHOW,\r\n }\r\n}\r\n\r\nfunction companyRejectionConfirmationShow(company) {\r\n return {\r\n type: actionTypes.COMPANY_REJECTION_CONFIRMATION_SHOW,\r\n company,\r\n }\r\n}\r\n\r\nfunction companyRejectionConfirmationHide() {\r\n return {\r\n type: actionTypes.COMPANY_REJECTION_CONFIRMATION_HIDE,\r\n }\r\n}\r\n\r\nfunction companyStatusChangeConfirmation(visible, company) {\r\n return {\r\n type: actionTypes.COMPANY_STATUS_CHANGE_CONFIRMATION,\r\n confirmation: { visible, company }\r\n };\r\n}\r\n\r\nfunction memberStatusChangeConfirmation(visible, member) {\r\n return {\r\n type: actionTypes.MEMBER_STATUS_CHANGE_CONFIRMATION,\r\n confirmation: { visible, member }\r\n };\r\n}\r\n\r\nfunction companyApproveRequest(companyId) {\r\n return {\r\n type: actionTypes.COMPANY_APPROVE_REQUEST,\r\n companyId,\r\n }\r\n}\r\n\r\nfunction companyApproveSuccess(companyId) {\r\n return {\r\n type: actionTypes.COMPANY_APPROVE_SUCCESS,\r\n companyId,\r\n }\r\n}\r\n\r\nfunction companyApproveFailure(companyId, error) {\r\n return {\r\n type: actionTypes.COMPANY_APPROVE_FAILURE,\r\n companyId,\r\n error,\r\n }\r\n}\r\n\r\nfunction companyRejectReasonSet(value) {\r\n return {\r\n type: actionTypes.COMPANY_REJECT_REASON_SET,\r\n value\r\n }\r\n}\r\n\r\nfunction approveCompany(companyId) {\r\n return (dispatch) => {\r\n dispatch(companyApproveRequest(companyId));\r\n companiesService.postCompanyApprove(companyId)\r\n .then(() => {\r\n dispatch(companyApproveSuccess(companyId));\r\n })\r\n .catch(e => {\r\n dispatch(companyApproveFailure(companyId, e));\r\n dispatch(notificationActions.notificationAddErrorMessage('Company approval failed'));\r\n })\r\n }\r\n}\r\n\r\nfunction rejectCompany(companyId) {\r\n return (dispatch, getState) => {\r\n dispatch(companyApproveRequest(companyId));\r\n companiesService.postCompanyReject(companyId, getState().companies.rejectionReason)\r\n .then(() => {\r\n dispatch(companyApproveSuccess(companyId));\r\n })\r\n .catch(e => {\r\n dispatch(companyApproveFailure(companyId, e));\r\n dispatch(notificationActions.notificationAddErrorMessage('Company rejection failed'));\r\n });\r\n }\r\n}\r\n\r\nfunction changeCompanyStatus(company, message = '') {\r\n return (dispatch) => {\r\n dispatch(companyStatusChangeConfirmation(false));\r\n\r\n const status =\r\n company.status === companyStatuses.offPlatform.statusCode ||\r\n company.status === companyStatuses.active.statusCode\r\n ? companyStatuses.blocked.statusCode : companyStatuses.active.statusCode;\r\n\r\n companiesService\r\n .changeCompanyStatus(company.id, status, message)\r\n .catch((e) => {\r\n dispatch(errorActions.unexpectedError(e))\r\n });\r\n };\r\n}\r\n\r\nfunction resendInviteConfirmation(visible, member) {\r\n return {\r\n type: actionTypes.RESEND_INVITE_CONFIRMATION,\r\n confirmation: { visible, member }\r\n };\r\n}\r\n\r\nfunction resetPasswordConfirmation(visible, member) {\r\n return {\r\n type: actionTypes.RESET_PASSWORD_CONFIRMATION,\r\n confirmation: { visible, member }\r\n };\r\n}\r\n\r\nfunction resetPassword(member) {\r\n return dispatch => {\r\n dispatch(resetPasswordConfirmation(false));\r\n\r\n usersService\r\n .resetPassword(member.id)\r\n .then(\r\n () => dispatch(notificationActions.warningModal(\r\n 'Password reset',\r\n `Password setup link has been sent to ${member.fullName()}.`)),\r\n e => dispatch(errorActions.unexpectedError(e))\r\n );\r\n };\r\n}\r\n\r\nfunction resendInvite(member) {\r\n return (dispatch, getState) => {\r\n dispatch(resendInviteConfirmation(false));\r\n\r\n usersService\r\n .resendInvite(member.id)\r\n .then(\r\n invited,\r\n e => dispatch(errorActions.unexpectedError(e))\r\n );\r\n\r\n function invited(status) {\r\n dispatch(invitedAlert(`${member.firstName} ${member.lastName}`));\r\n\r\n const users = getState().companies.users.map(u =>\r\n u.id === member.id ? { ...u, status } : u);\r\n dispatch(storeUsers(users));\r\n }\r\n };\r\n}\r\n\r\nfunction invitedAlert(name) {\r\n return dispatch => {\r\n dispatch(\r\n notificationActions.warningModal(\r\n 'Re-Send Invite',\r\n `The invitation email has been sent to ${name}.`\r\n )\r\n )\r\n };\r\n}\r\n\r\nfunction changeMemberBlockedStatus(member, message) {\r\n return (dispatch, getState) => {\r\n dispatch(memberStatusChangeConfirmation(false));\r\n\r\n if (member.status !== userStatuses.blocked.statusCode) {\r\n if (isUserPrimaryContact()) {\r\n dispatch(\r\n notificationActions.notificationAddError(\r\n 'User can\\'t be blocked', 'Primary Contact User can\\'t be blocked. Please update User information.'\r\n )\r\n );\r\n return;\r\n }\r\n\r\n Promise.all([\r\n usersService.disableUser(member.id, message).then(disabled, error),\r\n amrPipelineService.blockUserRequest(member.email, message),\r\n ]);\r\n } else {\r\n Promise.all([\r\n usersService.enableUser(member.id).then(enabled, error),\r\n amrPipelineService.unblockUserRequest(member.email),\r\n ]);\r\n }\r\n\r\n function isUserPrimaryContact() {\r\n const { users } = getState().companies;\r\n const user = users.find(u => u.id === member.id);\r\n\r\n return user && user.primaryContact;\r\n }\r\n\r\n function disabled() {\r\n const users = getState().companies.users.map(u =>\r\n u.id === member.id ? { ...u, status: userStatuses.blocked.statusCode, blockReason: message } : u);\r\n\r\n dispatch(storeUsers(users));\r\n }\r\n\r\n function enabled(user) {\r\n const users = getState().companies.users.map(u =>\r\n u.id === member.id ? { ...u, status: user.status, blockReason: '' } : u);\r\n\r\n dispatch(storeUsers(users));\r\n }\r\n\r\n function error(e) {\r\n dispatch(errorActions.unexpectedError(e));\r\n }\r\n };\r\n}\r\n\r\nfunction filterCompanies(filter) {\r\n return {\r\n type: actionTypes.COMPANY_FILTER_CHNAGED,\r\n filter\r\n };\r\n}\r\n\r\nfunction applyCompanyFilters() {\r\n return {\r\n type: actionTypes.COMPANY_FILTER_APPLY\r\n };\r\n}\r\n\r\nfunction applyMemberFilters() {\r\n return {\r\n type: actionTypes.MEMBER_FILTER_APPLY\r\n }\r\n}\r\n\r\nfunction resetCompanyFilters() {\r\n return {\r\n type: actionTypes.COMPANY_FILTER_RESET\r\n };\r\n}\r\n\r\nfunction resetMemberFilters() {\r\n return {\r\n type: actionTypes.MEMBER_FILTER_RESET\r\n }\r\n}\r\n\r\nfunction filterMembers(filter) {\r\n return {\r\n type: actionTypes.MEMBERS_FILTER_CHNAGED,\r\n filter\r\n };\r\n}\r\n\r\nfunction showCompanyMembers(company) {\r\n return (dispatch) => {\r\n const filter = {\r\n ...memberFilterInitialState,\r\n companies: [company.id]\r\n };\r\n dispatch(filterMembers(filter));\r\n dispatch(applyMemberFilters());\r\n history.replace(routes.manageCompanyMembers);\r\n }\r\n}\r\n\r\nfunction showMemberCompany(user) {\r\n return (dispatch) => {\r\n const filter = {\r\n ...companyFilterInitialState,\r\n searchTerm: user.companyName\r\n };\r\n\r\n dispatch(filterCompanies(filter));\r\n history.replace(routes.manageCompanies);\r\n }\r\n}\r\n\r\nfunction reset() {\r\n return dispatch => {\r\n dispatch({ type: actionTypes.RESET });\r\n dispatch(errorActions.resetError());\r\n };\r\n}\r\n\r\nfunction resetEditMember() {\r\n return { type: actionTypes.RESET_EDIT_MEMBER }\r\n}\r\n\r\nfunction saveMember(user) {\r\n return async (dispatch, getState) => {\r\n const { editMember } = getState().companies;\r\n const isEdit = !!user.id;\r\n const initialUser = editMember.initialUser;\r\n const isPrimaryContactAndCompanyChanged =\r\n isEdit &&\r\n user.primaryContact &&\r\n initialUser.primaryContact &&\r\n initialUser.companyId !== user.companyId;\r\n\r\n const userToSave = {\r\n ...user,\r\n phone: user.phone == null ? user.phone : user.phone.trim(),\r\n primaryContact: !!user.primaryContact,\r\n desk: isNil(user.desk) ? null : user.desk,\r\n };\r\n\r\n if (isPrimaryContactAndCompanyChanged) {\r\n dispatch(notificationActions.notificationAddError(\r\n errorMessages.userInformationCanNotBeChanged,\r\n errorMessages.primaryContactUserCanNotBeMovedToAnotherCompany)\r\n );\r\n return;\r\n }\r\n dispatch(savingUser(true));\r\n try {\r\n await usersService.saveUser(userToSave, editMember.sendInvite);\r\n history.replace(routes.manageCompanyMembers);\r\n } catch (e) {\r\n dispatch(errorActions.error(\r\n e,\r\n errorMessages.unexpectedError,\r\n errorMessages.userInformationCanNotBeChanged)\r\n );\r\n } finally {\r\n dispatch(savingUser(false));\r\n await amrPipelineService.saveUser({\r\n firstName: userToSave.firstName,\r\n lastName: userToSave.lastName,\r\n position: userToSave.jobTitle,\r\n phoneNumber: userToSave.phone,\r\n userEmail: userToSave.email,\r\n linkedIn: userToSave.linkedIn,\r\n location: userToSave.location\r\n })\r\n }\r\n }\r\n}\r\n\r\nfunction savingUser(savingUserFlag) {\r\n return {\r\n type: actionTypes.SAVING_USER,\r\n savingUserFlag\r\n };\r\n}\r\n\r\nfunction setMemberOfacStatus(memberId, status) {\r\n return dispatch => {\r\n dispatch(setMemberOfacRequest(memberId));\r\n companiesService.setMemberOfacStatus(memberId, status)\r\n .then((res) => {\r\n if (res && Number(res.id)) {\r\n dispatch(setMemberOfacSuccess(Number(res.id), res.ofac))\r\n } else {\r\n dispatch(setMemberOfacFailure(memberId))\r\n }\r\n })\r\n .catch((e) => {\r\n dispatch(errorActions.unexpectedError(e));\r\n dispatch(setMemberOfacFailure(memberId));\r\n })\r\n }\r\n}\r\n\r\nfunction setMemberOfacRequest(memberId) {\r\n return (dispatch, getState) => {\r\n const { membersOfacRequestStatus } = getState().companies;\r\n const newStatusList = { ...membersOfacRequestStatus };\r\n newStatusList[memberId] = RequestState.request;\r\n dispatch({\r\n type: actionTypes.COMPANY_MEMBER_SET_OFAC_REQUEST,\r\n payload: { membersOfacRequestStatus: newStatusList }\r\n })\r\n }\r\n}\r\n\r\nfunction setMemberOfacSuccess(memberId, ofac) {\r\n return (dispatch, getState) => {\r\n let { users, membersOfacRequestStatus } = getState().companies;\r\n const newUsers = [...users].map((member) => {\r\n if (member.id === memberId) {\r\n member.ofac = ofac\r\n }\r\n return member\r\n });\r\n\r\n const newStatusList = { ...membersOfacRequestStatus };\r\n if (newStatusList[memberId]) delete newStatusList[memberId];\r\n\r\n dispatch({\r\n type: actionTypes.COMPANY_MEMBER_SET_OFAC_SUCCESS,\r\n payload: { membersOfacRequestStatus: newStatusList, users: newUsers }\r\n })\r\n }\r\n}\r\n\r\nfunction setMemberOfacFailure(memberId) {\r\n return (dispatch, getState) => {\r\n const { membersOfacRequestStatus } = getState().companies;\r\n const newStatusList = { ...membersOfacRequestStatus };\r\n if (newStatusList[memberId]) delete newStatusList[memberId];\r\n dispatch({\r\n type: actionTypes.COMPANY_MEMBER_SET_OFAC_FAILURE,\r\n payload: { membersOfacRequestStatus: newStatusList }\r\n })\r\n }\r\n}\r\n\r\nfunction setCompanyOfacStatus(companyId, status) {\r\n return dispatch => {\r\n dispatch(setCompanyOfacRequest(companyId));\r\n companiesService.setCompanyOfacStatus(companyId, status)\r\n .then((res) => {\r\n if (res && Number(res.id)) {\r\n dispatch(setCompanyOfacSuccess(Number(res.id), res.ofac))\r\n } else {\r\n dispatch(setCompanyOfacFailure(companyId))\r\n }\r\n })\r\n .catch(() => {\r\n dispatch(setCompanyOfacFailure(companyId))\r\n })\r\n }\r\n}\r\n\r\nfunction setCompanyOfacRequest(companyId) {\r\n return (dispatch, getState) => {\r\n const { companiesOfacRequestStatus } = getState().companies;\r\n const newStatusList = { ...companiesOfacRequestStatus };\r\n newStatusList[companyId] = RequestState.request;\r\n dispatch({\r\n type: actionTypes.COMPANY_SET_OFAC_REQUEST,\r\n payload: { companiesOfacRequestStatus: newStatusList }\r\n })\r\n }\r\n}\r\n\r\nfunction setCompanyOfacSuccess(companyId, ofac) {\r\n return (dispatch, getState) => {\r\n let { companies, companiesOfacRequestStatus } = getState().companies;\r\n const newCompanies = [...companies].map((company) => {\r\n if (company.id === companyId) {\r\n company.ofac = ofac\r\n }\r\n return company\r\n });\r\n\r\n const newStatusList = { ...companiesOfacRequestStatus };\r\n if (newStatusList[companyId]) delete newStatusList[companyId];\r\n\r\n dispatch({\r\n type: actionTypes.COMPANY_SET_OFAC_SUCCESS,\r\n payload: { companiesOfacRequestStatus: newStatusList, companies: newCompanies }\r\n })\r\n }\r\n}\r\n\r\nfunction setCompanyOfacFailure(companyId) {\r\n return (dispatch, getState) => {\r\n const { companiesOfacRequestStatus } = getState().companies;\r\n const newStatusList = { ...companiesOfacRequestStatus };\r\n if (newStatusList[companyId]) delete newStatusList[companyId];\r\n dispatch({\r\n type: actionTypes.COMPANY_SET_OFAC_FAILURE,\r\n payload: { companiesOfacRequestStatus: newStatusList }\r\n })\r\n }\r\n}\r\n\r\nfunction getFilterCriteria(filter) {\r\n\r\n const statuses = [\r\n filter.active && UserStatus.Active,\r\n filter.blocked && UserStatus.Blocked,\r\n filter.invited && UserStatus.Invited,\r\n filter.notInvited && UserStatus.NotInvited,\r\n filter.pendingApproval && 'pending-approval'\r\n ].filter(status => status);\r\n\r\n const rolesArray = [\r\n filter.administrator && roles.Administrator,\r\n filter.arrangersClient && roles.ArrangersClient,\r\n filter.brokerDealerTrader && roles.BrokerDealerTrader,\r\n filter.brokerDealerViewer && roles.BrokerDealerViewer,\r\n filter.dataEntry && roles.DataEntry,\r\n filter.sellerAdmin && roles.SellerAdministrator,\r\n filter.sellerTrader && roles.SellerTrader,\r\n filter.sellerViewer && roles.SellerViewer,\r\n filter.subscriptionManager && roles.SubscriptionManager,\r\n filter.viewer && roles.Viewer,\r\n filter.collateralManager && roles.CollateralManager,\r\n filter.media && roles.Media\r\n ].filter(status => status);\r\n\r\n const dateFilter = getSearchDateRange(filter);\r\n const regByFrom = dateFilter.dateFrom;\r\n const regByTo = dateFilter.dateTo;\r\n\r\n return {\r\n searchTerms: filter.searchTerm,\r\n statuses,\r\n roles: rolesArray,\r\n companyIds: filter.companies,\r\n regByIds: filter.regBy,\r\n regByFrom,\r\n regByTo\r\n };\r\n}\r\n\r\nfunction exportUsers() {\r\n return (dispatch, getState) => {\r\n const { exportUsersRequestState } = getState().companies;\r\n const filter = getState().companies.memberFilter;\r\n const filterOptions = getFilterCriteria(filter);\r\n\r\n if (exportUsersRequestState !== RequestState.request) {\r\n dispatch({ type: actionTypes.MANAGE_EXPORT_USERS_REQUEST });\r\n usersService.exportUsers(filterOptions)\r\n .then(file => {\r\n saveAs(file.blob, file.name || 'kopenTech_BWIC_users.xlsx');\r\n dispatch({ type: actionTypes.MANAGE_EXPORT_USERS_SUCCESS });\r\n })\r\n .catch(() => {\r\n dispatch({ type: actionTypes.MANAGE_EXPORT_USERS_FAILURE })\r\n });\r\n }\r\n }\r\n}\r\n\r\nfunction chnageTfaEnabledStatusConfirmation(visible, member) {\r\n return {\r\n type: actionTypes.TFA_STATUS_CHANGE_CONFIRMATION,\r\n confirmation: { visible, member }\r\n };\r\n}\r\n\r\nfunction chnageTfaEnabledStatus(member) {\r\n return dispatch => {\r\n dispatch(chnageTfaEnabledStatusConfirmation(false));\r\n\r\n usersService\r\n .updateTfaEnabledState(member.id, !member.tfaEnabled)\r\n .then(() => dispatch({ type: actionTypes.TFA_ENABLED_STATE_CHANGED, userId: member.id }))\r\n .catch(e => dispatch(errorActions.unexpectedError(e)));\r\n };\r\n}\r\n\r\nfunction getUserLoginHistory(user) {\r\n return dispatch => {\r\n usersService.getUserLoginHistory(user.id)\r\n .then((history) => dispatch({\r\n type: actionTypes.COMPANY_MEMBER_SET_USER_LAST_LOGIN_HISTORY,\r\n payload: { history, user }\r\n }))\r\n .catch(e => dispatch(errorActions.unexpectedError(e)))\r\n }\r\n}\r\n\r\nfunction resetUserLoginHistory() {\r\n return dispatch => dispatch({ type: actionTypes.COMPANY_MEMBER_RESET_USER_LAST_LOGIN_HISTORY })\r\n}\r\n\r\nfunction memberSubscriptionChange(userId, subscriptionType, trialPeriodEnd) {\r\n return {\r\n type: actionTypes.COMPANY_MEMBER_SUBSCRIPTION_CHANGE,\r\n userId,\r\n subscriptionType,\r\n trialPeriodEnd\r\n };\r\n}\r\n\r\nfunction companySubscriptionChange(companyId, subscriptionType, subscriptionPeriodEnd) {\r\n return {\r\n type: actionTypes.COMPANY_SUBSCRIPTION_CHANGE,\r\n companyId,\r\n subscriptionType,\r\n subscriptionPeriodEnd,\r\n };\r\n}\r\n\r\nfunction changeClearingBankSettings(companyId, isClearingBank) {\r\n return {\r\n type: actionTypes.COMPANY_SET_CLEARING_BANK,\r\n companyId,\r\n isClearingBank\r\n };\r\n}\r\n\r\nfunction deleteUser(userId) {\r\n return async (dispatch, getState) => {\r\n const user = getState().companies.users.find(u => u.id === userId);\r\n const companyUserCount = getState().companies.users.filter(u => u.companyId === user.companyId).length;\r\n try {\r\n await usersService.deleteUser(userId);\r\n dispatch({ type: actionTypes.COMPANY_MEMBER_DELETED, payload: { userId } });\r\n if(companyUserCount === 1) { // Last one deleted\r\n dispatch(resetSubscription(user.companyId));\r\n }\r\n } catch (e) {\r\n dispatch(errorActions.unexpectedError(e));\r\n }\r\n }\r\n}\r\n\r\nfunction resetSubscription(companyId) {\r\n return { type: actionTypes.RESET_SUBSCRIPTION, payload: { companyId } }\r\n}\r\n\r\nfunction setTempPassword(userId) {\r\n return dispatch => {\r\n usersService.setTempPassword(userId)\r\n .catch(e => dispatch(errorActions.unexpectedError(e)));\r\n }\r\n}\r\n\r\nfunction getUserListRequestStatus(status) {\r\n return { type: actionTypes.COMPANY_GET_USER_LIST_REQUEST_STATUS, payload: { status } }\r\n}\r\n\r\nfunction getUserList() {\r\n return async (dispatch) => {\r\n dispatch(getUserListRequestStatus(true));\r\n try {\r\n const users = await usersService.getUsers();\r\n dispatch(companiesActions.storeUsers(users));\r\n } catch (e) {\r\n logger.exception(e, 'Failed to load company users');\r\n } finally {\r\n dispatch(getUserListRequestStatus(false));\r\n }\r\n }\r\n}\r\n\r\nfunction companyPushDataReceived(company) {\r\n return async (dispatch, getState) => {\r\n const { companies } = getState().companies;\r\n const targetCompany = companies.find(c => c.id === company.id);\r\n\r\n if (targetCompany && (targetCompany.status !== company.status || targetCompany.role !== company.role)) {\r\n dispatch(getUserList());\r\n }\r\n dispatch({ type: actionTypes.COMPANY_PUSH_DATA_RECEIVED, payload: { company } })\r\n }\r\n}\r\n\r\nfunction exportCompanies() {\r\n return async (dispatch, getState) => {\r\n dispatch(setIsRequestingExportCompany(true))\r\n try {\r\n const filter = getState().companies.companyFilter;\r\n const order = getState().companies.companyOrderBy;\r\n\r\n const searchTerm = filter.searchTerm;\r\n const regByIds = filter.regBy;\r\n const status = [\r\n filter.active && CompanyStatus.active,\r\n filter.blocked && CompanyStatus.blocked,\r\n filter.offPlatform && CompanyStatus.offPlatform\r\n ].filter(status => status);\r\n\r\n const role = [\r\n filter.administrator && companyRoles.Administrator,\r\n filter.brokerDealer && companyRoles.BrokerDealer,\r\n filter.seller && companyRoles.Seller,\r\n filter.viewer && companyRoles.Viewer,\r\n filter.media && companyRoles.Media\r\n ].filter(status => status);\r\n\r\n const dateFilter = getSearchDateRange(filter);\r\n const regByFrom = dateFilter.dateFrom;\r\n const regByTo = dateFilter.dateTo;\r\n const salesRepresentative = filter.salesRepresentatives;\r\n\r\n const orderBy = order.direction;\r\n const orderByColumn = companyColumnsExportValues[order.column];\r\n\r\n const file = await companiesService.exportCompanies(searchTerm, status, role, regByFrom, regByTo, salesRepresentative, regByIds, orderByColumn, orderBy)\r\n\r\n saveAs(file.blob, file.name);\r\n } catch (e) {\r\n dispatch(errorActions.unexpectedError(e))\r\n } finally {\r\n dispatch(setIsRequestingExportCompany(false))\r\n }\r\n }\r\n}\r\n\r\nfunction setIsRequestingExportCompany(status) {\r\n return { type: actionTypes.MANAGE_SET_REQUEST_STATE_EXPORT_COMPANIES, payload: { status } }\r\n}\r\n","import { ActionType, createAction } from 'typesafe-actions';\r\nimport { RequestState } from '../../constants/request-state';\r\nimport { Company } from '../../types/amr-pipeline/models/Company';\r\n\r\nconst request = createAction('entities/trustee/REQUEST');\r\nconst requestResult = createAction('entities/trustee/REQUEST_RESULT',\r\n resolve => (requestState: RequestState, trustee: Company[] = []) =>\r\n resolve({ requestState, trustee })\r\n);\r\n\r\nexport type TTrusteeActionType = ActionType<\r\n typeof trusteeActions[keyof typeof trusteeActions]\r\n>;\r\n\r\nexport const trusteeActions = {\r\n request,\r\n requestResult\r\n}\r\n","import { createAction } from 'typesafe-actions';\r\n\r\nconst fetchFavoriteBrokerDealersRequest = createAction(\r\n 'favoriteBd/FETCH_REQUEST'\r\n);\r\n\r\nconst fetchFavoriteBrokerDealersSuccess = createAction(\r\n 'favoriteBd/FETCH_SUCCESS',\r\n resolve => (favorites: {[key: number]: boolean}) => resolve({ favorites })\r\n);\r\n\r\nconst fetchFavoriteBrokerDealersFailure = createAction(\r\n 'favoriteBd/FETCH_FAILURE'\r\n);\r\n\r\nconst updateFavoriteBrokerDealerRequest = createAction(\r\n 'favoriteBd/UPDATE_REQUEST',\r\n resolve => (dealerId: number, isFavorite: boolean) => resolve({ dealerId, isFavorite })\r\n);\r\n\r\nconst updateFavoriteBrokerDealerSuccess = createAction(\r\n 'favoriteBd/UPDATE_SUCCESS',\r\n resolve => (favorites: number[], dealerId: number) => resolve({ favorites, dealerId })\r\n);\r\n\r\nconst updateFavoriteBrokerDealerFailure = createAction(\r\n 'favoriteBd/UPDATE_FAILURE',\r\n resolve => (dealerId: number) => resolve({ dealerId })\r\n);\r\n\r\nconst reset = createAction('favoriteBd/RESET');\r\n\r\nexport const favoriteBrokerDealersActions = {\r\n fetchFavoriteBrokerDealersRequest,\r\n fetchFavoriteBrokerDealersSuccess,\r\n fetchFavoriteBrokerDealersFailure,\r\n updateFavoriteBrokerDealerRequest,\r\n updateFavoriteBrokerDealerSuccess,\r\n updateFavoriteBrokerDealerFailure,\r\n reset,\r\n};\r\n","import { createAction } from 'typesafe-actions';\r\nimport { DateFilterOption } from '../types/filters/DateFilterOption';\r\nimport { DateRange } from '../types/filters/DateRange';\r\n\r\nconst toogleFilterRegBy = createAction('manage-members/MEMBER_FILTER_TOOGLE_REG_BY',\r\n resolve => (regBy: number[]) => resolve({ regBy })\r\n)\r\n\r\nconst setFilterRegBy = createAction('manage-members/MEMBER_FILTER_SET_REG_BY',\r\n resolve => (regBy: number[]) => resolve({ regBy })\r\n)\r\n\r\nconst toogleFilterCompanies = createAction('manage-members/MEMBER_FILTER_TOOGLE_COMPANIES',\r\n resolve => (companies: number[]) => resolve({ companies })\r\n)\r\n\r\nconst setFilterCompanies = createAction('manage-members/MEMBER_FILTER_SET_COMPANIES',\r\n resolve => (companies: number[]) => resolve({ companies })\r\n)\r\n\r\nconst toogleFilterStatusActive = createAction('manage-members/MEMBER_FILTER_TOOGLE_STATUS_ACTIVE');\r\nconst toogleFilterStatusBlocked = createAction('manage-members/MEMBER_FILTER_TOOGLE_STATUS_BLOCKED');\r\nconst toogleFilterStatusInvited = createAction('manage-members/MEMBER_FILTER_TOOGLE_STATUS_INVITED');\r\nconst toogleFilterStatusNotInvited = createAction('manage-members/MEMBER_FILTER_TOOGLE_STATUS_NOT_INVITED');\r\nconst toogleFilterStatusPendingApproval = createAction('manage-members/MEMBER_FILTER_TOOGLE_STATUS_PENDING_APPROVAL');\r\n\r\nconst toogleFilterRoleAdministrator = createAction('manage-members/MEMBER_FILTER_TOOGLE_ROLE_ADMINISTRATOR');\r\nconst toggleFilterRoleArrangersClient = createAction('manage-members/MEMBER_FILTER_TOGGLE_ROLE_ARRANGERSCLIENT')\r\nconst toogleFilterRoleBrokerDealerTrader = createAction('manage-members/MEMBER_FILTER_TOOGLE_ROLE_BROKER_DEALER_TRADER');\r\nconst toogleFilterRoleBrokerDealerViewer = createAction('manage-members/MEMBER_FILTER_TOOGLE_ROLE_BROKER_DEALER_VIEWER');\r\nconst toogleFilterRolesDataEntry = createAction('manage-members/MEMBER_FILTER_TOOGLE_ROLE_DATA_ENTRY')\r\nconst toogleFilterRoleSellerAdministrator = createAction('manage-members/MEMBER_FILTER_TOOGLE_ROLE_SELLER_AMINISTARTOR');\r\nconst toogleFilterRoleSellerTrader = createAction('manage-members/MEMBER_FILTER_TOOGLE_ROLE_SELLER_TRADER');\r\nconst toogleFilterRoleSellerViewer = createAction('manage-members/MEMBER_FILTER_TOOGLE_ROLE_SELLER_VIEWER');\r\nconst toogleFilterRolesSubscriptionManager = createAction('manage-members/MEMBER_FILTER_TOOGLE_ROLE_SUBSCRIPTION_MANAGER')\r\nconst toogleFilterRoleViewer = createAction('manage-members/MEMBER_FILTER_TOOGLE_ROLE_VIEWER');\r\nconst toogleFilterCollateralManager = createAction('manage-members/MEMBER_FILTER_TOOGLE_ROLE_COLLATERAL_MANAGER');\r\nconst toogleFilterRoleMedia = createAction('manage-members/MEMBER_FILTER_TOOGLE_ROLE_MEDIA');\r\n\r\nconst setDateFilterChange = createAction('manage-members/MEMBER_FILTER_DATE_CHANGED',\r\n resolve => (dateOption: DateFilterOption) => resolve({ dateOption })\r\n)\r\n\r\nconst setDateFilterRangeChange = createAction('manage-members/MEMBER_FILTER_DATE_RANGE_CHANGED',\r\n resolve => (dateRange: DateRange) => resolve({ dateRange })\r\n)\r\n\r\nexport const manageMembersFiltersActions = {\r\n toogleFilterRegBy,\r\n setFilterRegBy,\r\n toogleFilterCompanies,\r\n setFilterCompanies,\r\n toogleFilterStatusActive,\r\n toogleFilterStatusBlocked,\r\n toogleFilterStatusInvited,\r\n toogleFilterStatusNotInvited,\r\n toogleFilterStatusPendingApproval,\r\n toogleFilterRoleAdministrator,\r\n toggleFilterRoleArrangersClient,\r\n toogleFilterRoleBrokerDealerTrader,\r\n toogleFilterRoleBrokerDealerViewer,\r\n toogleFilterRolesDataEntry,\r\n toogleFilterRoleSellerAdministrator,\r\n toogleFilterRoleSellerTrader,\r\n toogleFilterRoleSellerViewer,\r\n toogleFilterRolesSubscriptionManager,\r\n toogleFilterRoleViewer,\r\n toogleFilterCollateralManager,\r\n toogleFilterRoleMedia,\r\n setDateFilterChange,\r\n setDateFilterRangeChange\r\n}\r\n","import { createAction } from 'typesafe-actions';\r\nimport { v4 as uuidv4 } from 'uuid';\r\nimport moment from 'moment';\r\nimport { NotificationType } from '../types/notifications/NotificationType';\r\nimport { Notification } from '../types/notifications/Notification';\r\nimport { NotificationAttributes } from '../types/notifications/NotificationAttributes';\r\nimport { StatusMessageSectionType } from '../types/state/NotificationState';\r\nimport { ModalNotification } from '../types/notifications/ModalNotification';\r\n\r\nconst notificationReset = createAction('notification/RESET');\r\nconst notificationPushReceived = createAction('notification/PUSH_RECEIVED',\r\n resolve => (notification: Notification) => resolve({ notification, type: NotificationType.PushNotification })\r\n);\r\nconst notificationAddInfo = createAction('notification/ADD_INFO',\r\n resolve => (title: string, message: string, date: Date | null = null) => resolve({\r\n notification: createNotificationModel(\r\n uuidv4(),\r\n false,\r\n title || '',\r\n message || '',\r\n date || moment.utc().toDate(),\r\n ),\r\n type: NotificationType.Info\r\n })\r\n);\r\nconst notificationAddInfoMessage = createAction('notification/ADD_INFO_MESSAGE',\r\n resolve => (message: string) => resolve({\r\n notification: createNotificationModel(\r\n uuidv4(),\r\n false,\r\n 'Notification',\r\n message || '',\r\n moment.utc().toDate(),\r\n ),\r\n type: NotificationType.Info\r\n })\r\n);\r\nconst notificationAddError = createAction('notification/ADD_ERROR',\r\n resolve => (title: string, message: string, date: Date) => resolve({\r\n notification: createNotificationModel(\r\n uuidv4(),\r\n false,\r\n title,\r\n message || '',\r\n date || moment.utc().toDate(),\r\n ),\r\n type: NotificationType.Error\r\n })\r\n);\r\nconst notificationAddErrorMessage = createAction('notification/ADD_ERROR_MESSAGE',\r\n resolve => (message: string, title?: string) => resolve({\r\n notification: createNotificationModel(\r\n uuidv4(),\r\n false,\r\n title || 'Error',\r\n message || '',\r\n moment.utc().toDate(),\r\n ),\r\n type: NotificationType.Error\r\n })\r\n);\r\nconst notificationAddErrorMessageModal = createAction('notification/ADD_ERROR_MESSAGE_MODAL',\r\n resolve => (message: string, title: string, refreshButtonVisible?: boolean) =>\r\n resolve({ notification: createModalNotificationModel(title, message, StatusMessageSectionType.Error, refreshButtonVisible, undefined, undefined, undefined) })\r\n);\r\nconst infoModal = createAction('notification/INFO_MODAL',\r\n resolve => (message: string, title: string, blinkBrowserTabText?: string[], popupClassName?: string) =>\r\n resolve({ notification: createModalNotificationModel(title, message, StatusMessageSectionType.Info, false, blinkBrowserTabText, popupClassName) })\r\n);\r\nconst infoModalReplace = createAction('notification/INFO_MODAL',\r\n resolve => (modalKey: string, message: string, title: string, blinkBrowserTabText?: string[], popupClassName?: string) =>\r\n resolve({ notification: createModalNotificationModel(title, message, StatusMessageSectionType.Info, false, blinkBrowserTabText, popupClassName, modalKey) })\r\n);\r\nconst warningModal = createAction('notification/WARN_MODAL',\r\n resolve => (title: string, message: string) =>\r\n resolve({ notification: createModalNotificationModel(title, message, StatusMessageSectionType.Alert) })\r\n);\r\nconst notificationListHideToast = createAction('notification/LIST_REMOVE_ITEM',\r\n resolve => (referenceName: string) => resolve({ referenceName })\r\n);\r\nconst notificationListRemoveModalItem = createAction('notification/LIST_REMOVE_MODAL_ITEM',\r\n resolve => (index: number) => resolve({ index })\r\n);\r\nconst notificationListToastExpired = createAction('notification/LIST_SHIFT',\r\n resolve => (referenceName: string) => resolve({ referenceName })\r\n);\r\nconst modalNotificationListReset = createAction('notification/RESET_MODAL');\r\nconst notificationServiceConnect = createAction('notification/SERVICE_CONNECT');\r\nconst notificationServiceConnected = createAction('notification/SERVICE_CONNECTED');\r\nconst notificationServiceDisconnected = createAction('notification/SERVICE_DISCONNECTED');\r\nconst notificationServiceReconnecting = createAction('notification/SERVICE_RECONNECTING');\r\nconst notificationServiceReconnected = createAction('notification/SERVICE_RECONNECTED');\r\nconst notificationGetList = createAction('notification/GET_LIST');\r\nconst appendNotifications = createAction('notification/SET_LIST',\r\n resolve =>\r\n (notificationList: Notification[], notificationAttributes: NotificationAttributes) =>\r\n resolve({ notificationList, notificationAttributes })\r\n);\r\nconst notificationGetListFailure = createAction('notification/GET_LIST_FAILURE');\r\nconst notificationsGetCountUnread = createAction('notification/GET_COUNT_UNREAD');\r\nconst notificationsGetCountUnreadFailure = createAction('notification/GET_COUNT_UNREAD_FAILURE');\r\nconst notificationsSetCountUnread = createAction('notification/SET_COUNT_UNREAD',\r\n resolve => (count: number) => resolve({ count })\r\n);\r\nconst notificationSetReadRequest = createAction('notification/SET_READ_REQUEST',\r\n resolve => (referenceName: string) => resolve({ referenceName })\r\n);\r\nconst notificationSetReadSuccess = createAction('notification/SET_READ_SUCCESS',\r\n resolve => (referenceName: string) => resolve({ referenceName })\r\n);\r\nconst notificationSetReadFailure = createAction('notification/SET_READ_SUCCESS',\r\n resolve => (referenceName: string) => resolve({ referenceName })\r\n);\r\nconst notificationsReadAllRequest = createAction('notification/READ_ALL_REQUEST');\r\nconst notificationsReadAllSuccess = createAction('notification/READ_ALL_SUCCESS');\r\nconst notificationsReadAllFailure = createAction('notification/READ_ALL_FAILURE');\r\nconst notificationRead = createAction('notification/PUSH_READ',\r\n resolve => (referenceName: string) => resolve({ referenceName })\r\n);\r\nconst notificationReadAll = createAction('notification/PUSH_READ_ALL');\r\n\r\nexport const notificationActions = {\r\n notificationReset,\r\n notificationPushReceived,\r\n notificationRead,\r\n notificationReadAll,\r\n notificationAddInfo,\r\n notificationAddInfoMessage,\r\n notificationAddError,\r\n notificationAddErrorMessage,\r\n notificationAddErrorMessageModal,\r\n infoModal,\r\n infoModalReplace,\r\n warningModal,\r\n notificationListHideToast,\r\n notificationListRemoveModalItem,\r\n notificationListToastExpired,\r\n modalNotificationListReset,\r\n notificationServiceConnect,\r\n notificationServiceConnected,\r\n notificationServiceDisconnected,\r\n notificationServiceReconnecting,\r\n notificationServiceReconnected,\r\n notificationGetList,\r\n appendNotifications,\r\n notificationGetListFailure,\r\n notificationsGetCountUnread,\r\n notificationsGetCountUnreadFailure,\r\n notificationsSetCountUnread,\r\n notificationSetReadRequest,\r\n notificationSetReadSuccess,\r\n notificationSetReadFailure,\r\n notificationsReadAllRequest,\r\n notificationsReadAllSuccess,\r\n notificationsReadAllFailure\r\n};\r\n\r\nconst createNotificationModel = (\r\n referenceName: string,\r\n isReadByUser: boolean,\r\n subject: string,\r\n message: string,\r\n sentDateUtc: Date,\r\n): Notification => (\r\n { isReadByUser, subject, message, sentDateUtc, referenceName }\r\n);\r\n\r\nconst createModalNotificationModel = (\r\n title: string,\r\n message: string,\r\n type: StatusMessageSectionType = StatusMessageSectionType.Error,\r\n refreshButtonVisible: boolean = false,\r\n blinkBrowserTabText?: string[],\r\n popupClassName?: string,\r\n modalKey?: string\r\n\r\n): ModalNotification => ({\r\n title,\r\n message,\r\n type,\r\n refreshButtonVisible,\r\n blinkBrowserTabText,\r\n popupClassName,\r\n modalKey\r\n})","import { createAction } from 'typesafe-actions';\r\nimport { BrokerDealerCompanySlim } from '../types/company/BrokerDealerCompanySlim';\r\n\r\nconst setEditModeStatus = createAction(\r\n 'sellerAdminDealers/SET_EDIT_MODE_STATUS',\r\n resolve => (status: boolean) => resolve({ status })\r\n);\r\nconst getExcludedDealersRequest = createAction('sellerAdminDealers/GET_EXCLUDED_REQUEST');\r\nconst getExcludedDealersSuccess = createAction(\r\n 'sellerAdminDealers/GET_EXCLUDED_SUCCESS',\r\n resolve => (excludeNewCompany: boolean, dealers: BrokerDealerCompanySlim[]) => resolve({ excludeNewCompany, dealers })\r\n);\r\nconst getExcludedDealersFailure = createAction('sellerAdminDealers/GET_EXCLUDED_FAILURE');\r\n\r\nconst saveExcludedDealersRequest = createAction(\r\n 'sellerAdminDealers/SAVE_EXCLUDED_REQUEST',\r\n resolve => (dealerIds: number[], excludeNewCompany: boolean) => resolve({ dealerIds, excludeNewCompany })\r\n);\r\nconst saveExcludedDealersSuccess = createAction('sellerAdminDealers/SAVE_EXCLUDED_SUCCESS');\r\nconst saveExcludedDealersFailure = createAction('sellerAdminDealers/SAVE_EXCLUDED_FAILURE');\r\nconst reset = createAction('sellerAdminDealers/RESET');\r\n\r\nexport const sellerAdminDealerActions = {\r\n setEditModeStatus,\r\n getExcludedDealersRequest,\r\n getExcludedDealersSuccess,\r\n getExcludedDealersFailure,\r\n saveExcludedDealersRequest,\r\n saveExcludedDealersSuccess,\r\n saveExcludedDealersFailure,\r\n reset\r\n};\r\n","import { ActionType, createAction } from 'typesafe-actions';\r\nimport { RequestState } from '../constants/request-state';\r\nimport { DateFilterOption } from '../types/filters/DateFilterOption';\r\nimport { DateRange } from '../types/filters/DateRange';\r\nimport { AccessToken, AccessTokenApi } from '../types/management/AccessToken';\r\nimport { Company } from '../types/management/Company';\r\n\r\nconst requestTokens = createAction('manageToken/REQUEST_TOKENS');\r\nconst storeTokens = createAction('manageToken/GET_TOKENS',\r\n resolve => (tokens: AccessToken[]) => resolve({ tokens })\r\n);\r\nconst requestCompanies = createAction('manageToken/REQUEST_COMPANIES');\r\nconst storeCompanies = createAction('manageToken/COMPANIESS',\r\n resolve => (companies: Company[]) => resolve({ companies })\r\n);\r\nconst setSearchTerm = createAction('manageToken/SET_SEARCH_TERM',\r\n resolve => (searchTerm: string) => resolve({ searchTerm })\r\n);\r\nconst setTokenRequestStatus = createAction('manageToken/TOKENS_REQUEST_STATUS',\r\n resolve => (requestStatus: RequestState) => resolve({ requestStatus })\r\n);\r\nconst setCompanyRequestStatus = createAction('manageToken/COMPANIES_REQUEST_STATUS',\r\n resolve => (requestStatus: RequestState) => resolve({ requestStatus })\r\n);\r\nconst setGenerateRequestStatus = createAction('manageToken/GENERATE_REQUEST_STATUS',\r\n resolve => (requestStatus: RequestState) => resolve({ requestStatus })\r\n);\r\nconst setUpdateTokenRequestStatus = createAction('manageToken/UPDATE_REQUEST_STATUS',\r\n resolve => (requestStatus: RequestState) => resolve({ requestStatus })\r\n);\r\nconst storeGeneratedToken = createAction('manageToken/STORE_GENERATED_TOKEN',\r\n resolve => (token?: AccessToken) => resolve({ token })\r\n);\r\nconst generate = createAction('manageToken/GENERATE',\r\n resolve => (companyId: number, apis: AccessTokenApi[]) => resolve({ companyId, apis })\r\n);\r\nconst update = createAction('manageToken/UPDATE',\r\n resolve => (tokenId: number, companyId: number, apis: AccessTokenApi[]) => resolve({ tokenId, companyId, apis })\r\n);\r\nconst tokenUpdated = createAction('manageToken/UPDATED',\r\n resolve => (token: AccessToken) => resolve({ token })\r\n);\r\nconst revoke = createAction('manageToken/REVOKE', resolve => (tokenId: number) => resolve({ tokenId }));\r\nconst tokenRevoked = createAction('manageToken/REVOKED', resolve => (tokenId: number) => resolve({ tokenId }));\r\nconst setRevokeTokenRequestStatus = createAction(\r\n 'manageToken/SER_REVOKE_TOKEN_REQUEST_STATUS',\r\n resolve => (tokenId: number, status: RequestState) => resolve({tokenId, status})\r\n);\r\nconst toogleFilterStatusActive = createAction('manageToken/filter/TOOGLE_STATUS_ACTIVE');\r\nconst toogleFilterStatusExpired = createAction('manageToken/filter/TOOGLE_STATUS_EXPIRED');\r\nconst toogleFilterStatusRevoked = createAction('manageToken/filter/TOOGLE_STATUS_REVOKED');\r\nconst toogleFilterApiBlotterApiReader = createAction('manageToken/filter/TOOGLE_API_BLOTTER');\r\nconst toogleFilterApiBwicMonitorApiReader = createAction('manageToken/filter/TOOGLE_API_BWIC_MONITOR');\r\nconst toogleFilterApiIssuanceMonitorApiReader = createAction('manageToken/filter/TOOGLE_API_ISSUANCE_MONITOR');\r\nconst toogleFilterApiPortfolioApi = createAction('manageToken/filter/TOOGLE_API_PORTFOLIO');\r\nconst toogleFilterApiEvalApiReader = createAction('manageToken/filter/TOOGLE_API_EVAL');\r\nconst toogleFilterApiDashboardApiReader = createAction('manageToken/filter/TOOGLE_API_DASHBOARD');\r\nconst toogleFilterCompanies = createAction('manageToken/filter/_TOOGLE_COMPANIES',\r\n resolve => (companies: number[]) => resolve({ companies })\r\n);\r\nconst setFilterCompanies = createAction('manageToken/filter/SET_COMPANIES',\r\n resolve => (companies: number[]) => resolve({ companies })\r\n);\r\nconst setDateFilterChange = createAction('manageToken/filter/DATE_CHANGED',\r\n resolve => (dateOption: DateFilterOption) => resolve({ dateOption })\r\n);\r\nconst setDateFilterRangeChange = createAction('manageToken/filter/DATE_RANGE_CHANGED',\r\n resolve => (dateRange: DateRange) => resolve({ dateRange })\r\n);\r\nconst resetTokenFilters = createAction('manageToken/filter/RESET');\r\nconst applyTokenFilters = createAction('manageToken/filter/APPLY');\r\n\r\nconst reset = createAction('manageToken/RESET');\r\n\r\nexport type ManageTokenActionsType = ActionType\r\n\r\nexport const manageTokenActions = {\r\n storeTokens,\r\n toogleFilterStatusActive,\r\n toogleFilterStatusExpired,\r\n toogleFilterStatusRevoked,\r\n toogleFilterApiBlotterApiReader,\r\n toogleFilterApiBwicMonitorApiReader,\r\n toogleFilterApiIssuanceMonitorApiReader,\r\n toogleFilterApiPortfolioApi,\r\n toogleFilterApiEvalApiReader,\r\n toogleFilterApiDashboardApiReader,\r\n applyTokenFilters,\r\n resetTokenFilters,\r\n setSearchTerm,\r\n toogleFilterCompanies,\r\n setFilterCompanies,\r\n setDateFilterChange,\r\n setDateFilterRangeChange,\r\n setTokenRequestStatus,\r\n requestTokens,\r\n requestCompanies,\r\n storeCompanies,\r\n setCompanyRequestStatus,\r\n generate,\r\n update,\r\n tokenUpdated,\r\n revoke,\r\n tokenRevoked,\r\n setRevokeTokenRequestStatus,\r\n setGenerateRequestStatus,\r\n storeGeneratedToken,\r\n setUpdateTokenRequestStatus,\r\n reset\r\n}\r\n","import { ActionType, createAction } from \"typesafe-actions\"\r\nimport { RequestState } from \"../../constants/request-state\";\r\nimport { ArrangerPipeline } from \"../../types/amr-pipeline/models/ArrangerPipeline\";\r\n\r\nconst request = createAction('entities/arrangersPipeline/REQUEST',\r\n resolve => (tickers: string[]) => resolve({ tickers })\r\n);\r\nconst response = createAction('entities/arrangersPipeline/RESPONSE',\r\n resolve => (requestState: RequestState, pipeline: ArrangerPipeline[] = []) =>\r\n resolve({ requestState, pipeline })\r\n);\r\nconst reset = createAction('entities/arrangersPipeline/RESET');\r\n\r\nexport const arrangersPipelineActions = {\r\n request,\r\n response,\r\n reset\r\n}\r\n\r\nexport type TArrangersPipelineActionType =\r\n ActionType\r\n","import { createAction } from \"typesafe-actions\";\r\nimport { BwicPosition } from \"../types/bwic/BwicPosition\";\r\nimport { CompanySlim } from \"../types/company/CompanySlim\";\r\nimport { TimeSpan } from \"../types/primitives/TimeSpan\";\r\nimport { BlastMessageRecipientLevelState, BlastMessageRecipientsState } from \"../types/state/BlastMessageState\";\r\n\r\nconst show = createAction('blastMessage/SHOW_PANEL');\r\nconst hide = createAction('blastMessage/HIDE_PANEL');\r\nconst messageTypeChange = createAction('blastMessage/MESSAGE_TYPE_CHANGE',\r\n resolve => (messageType: number) => resolve({ messageType })\r\n);\r\nconst recipientLevelChange = createAction('blastMessage/RECIPIENT_LEVEL_CHANGE',\r\n resolve => (recipientLevel: BlastMessageRecipientLevelState) => resolve({ recipientLevel })\r\n);\r\n\r\nconst editMinutesAboutToEnd = createAction('blastMessage/EDIT_MINUTES_ABOUT_TO_END',\r\n resolve => (stage1AboutToEndTimeout: TimeSpan) => resolve({ stage1AboutToEndTimeout })\r\n);\r\n\r\nconst setError = createAction('blastMessage/SET_ERROR',\r\n resolve => (error: string) => resolve({ error })\r\n);\r\nconst storeRecipients = createAction('blastMessage/STORE_RECIPIENTS',\r\n resolve => (recipients: BlastMessageRecipientsState) => resolve({ recipients })\r\n);\r\nconst recipientSelectedChange = createAction('blastMessage/RECIPIENT_SELECTED_CHANGE',\r\n resolve => (companyIdentifier: string) => resolve({ companyIdentifier })\r\n);\r\nconst send = createAction('blastMessage/SEND',\r\n resolve => (\r\n blastMessageRecipients: BlastMessageRecipientsState,\r\n bwicParticipants: CompanySlim[],\r\n securities: BwicPosition[],\r\n ) => resolve({ blastMessageRecipients, bwicParticipants, securities })\r\n);\r\nconst sending = createAction('blastMessage/SEND_STATE',\r\n resolve => (isSending: boolean) => resolve({ isSending })\r\n);\r\nconst selectAllRecipientsChange = createAction('blastMessage/SELECT_ALL_RECIPIENTS',\r\n resolve => (isSelectAllRecipients: boolean) => resolve({ isSelectAllRecipients })\r\n);\r\nconst toggleSelectAllParticipantsFlag = createAction('blastMessage/TPGGLE_SELECT_ALL_FLAG');\r\n\r\nexport const blastMessageActions = {\r\n show,\r\n hide,\r\n messageTypeChange,\r\n recipientLevelChange,\r\n storeRecipients,\r\n recipientSelectedChange,\r\n send,\r\n sending,\r\n selectAllRecipientsChange,\r\n toggleSelectAllParticipantsFlag,\r\n editMinutesAboutToEnd,\r\n setError\r\n};\r\n","import { createAction } from 'typesafe-actions';\r\n\r\nconst confirmRequest = createAction(\r\n 'directBiddingDisclaimer/CONFIRM_REQUEST',\r\n resolve => (onConfirm?: () => void) => resolve({ onConfirm })\r\n);\r\nconst confirmSuccess = createAction('directBiddingDisclaimer/CONFIRM_SUCCESS');\r\nconst confirmFailure = createAction('directBiddingDisclaimer/CONFIRM_FAILURE');\r\n\r\nconst downloadPdfRequest = createAction('directBiddingDisclaimer/DOWNLOAD_PDF_REQUEST');\r\nconst downloadPdfSuccess = createAction('directBiddingDisclaimer/DOWNLOAD_PDF_SUCCESS');\r\nconst downloadPdfFailure = createAction('directBiddingDisclaimer/DOWNLOAD_PDF_FAILURE');\r\n\r\nconst show = createAction(\r\n 'directBiddingDisclaimer/SHOW',\r\n resolve => (blockerId: string) => resolve({ blockerId })\r\n);\r\nconst hide = createAction(\r\n 'directBiddingDisclaimer/HIDE',\r\n resolve => (confirmed: boolean) => resolve({ confirmed })\r\n);\r\n\r\nconst reset = createAction('directBiddingDisclaimer/RESET');\r\n\r\nexport const directBiddingDisclaimerActions = {\r\n show,\r\n hide,\r\n confirmRequest,\r\n confirmSuccess,\r\n confirmFailure,\r\n downloadPdfRequest,\r\n downloadPdfSuccess,\r\n downloadPdfFailure,\r\n reset\r\n};\r\n","import { createAction } from 'typesafe-actions';\r\nimport { SettlementAgentClientAgreement } from '../types/bid-as-dealer/SettlementAgentClientAgreement';\r\nimport { SettlementAgentAgreement } from '../types/bid-as-dealer/SettlementAgentAgreement';\r\nimport { BidRequest } from '../types/bid-as-dealer/BidRequest';\r\n\r\nconst settlementAgentAgreementPushReceived = createAction(\r\n 'push/settlement-agent-agreement/AGREEMENT_DATA_RECEIVED',\r\n resolve => (data: SettlementAgentClientAgreement | SettlementAgentAgreement) => resolve({data})\r\n);\r\n\r\nconst settlementAgentRequestPushReceived = createAction(\r\n 'push/settlement-agent-agreement/REQUEST_DATA_RECEIVED',\r\n resolve => (data: BidRequest) => resolve({ data })\r\n);\r\n\r\n\r\nexport const settlementAgentAgeementPushActions = {\r\n settlementAgentAgreementPushReceived,\r\n settlementAgentRequestPushReceived\r\n};\r\n","import { ActionType, createAction } from 'typesafe-actions';\r\nimport { CloManager } from '../types/clo-managers/CloManager';\r\nimport { CloManagerDetailed } from '../types/clo-managers/CloManagerDetailed';\r\nimport { CloManagerSave } from '../types/clo-managers/CloManagerSave';\r\nimport { CloManagerAccessType } from '../types/amr-pipeline/enums/CloManagerAccessType';\r\nimport { CloManagerAnalytics } from '../types/clo-managers/CloManagerAnalytics';\r\nimport { InvestmentTeamMember } from '../types/amr-pipeline/models/InvestmentTeamMember';\r\nimport { CloManagerAnalyticsFilter } from '../types/analytics/AnalyticsFilter';\r\nimport { TreeSelectOption } from '../components/controls/TreeSelect';\r\nimport { CloManagerClientActivity, CloManagerProfileView } from '../types/amr-pipeline/models/CloManagerSession';\r\nimport { DealSecurity } from '../types/security/DealSecurityStatistics';\r\n\r\nconst getCloManagers = createAction(\r\n 'cloManagers/get/REQUEST',\r\n resolve => (companyReferenceName?: string) => resolve({ companyReferenceName })\r\n);\r\n\r\nconst getCloManagersResult = createAction('cloManagers/get/REQUEST_RESULT',\r\n resolve => (cloManagers: CloManager[]) => resolve({ cloManagers })\r\n);\r\n\r\nconst getCloManager = createAction(\r\n 'cloManagers/getOne/REQUEST',\r\n resolve => (referenceName: string) => resolve({ referenceName }),\r\n);\r\n\r\nconst getCloManagerResult = createAction(\r\n 'cloManagers/getOne/REQUEST_RESULT',\r\n resolve => (\r\n referenceName: string,\r\n cloManager: CloManagerDetailed,\r\n bwicCloManagers: InvestmentTeamMember[],\r\n ) => resolve({\r\n referenceName,\r\n cloManager,\r\n bwicCloManagers,\r\n }),\r\n);\r\n\r\nconst createOrUpdateCloManager = createAction(\r\n 'cloManagers/createOrUpdate/REQUEST',\r\n resolve => (referenceName: string, cloManager: CloManagerSave) => resolve({ referenceName, cloManager }),\r\n);\r\n\r\nconst setCloManagerSaveState = createAction(\r\n 'cloManagers/createOrUpdate/STATE',\r\n resolve => (isUpdating: boolean) => resolve({ isUpdating }),\r\n);\r\n\r\nconst logUserActivity = createAction(\r\n 'cloManagers/logUserActivity/REQUEST',\r\n resolve => (companyReferenceName: string, accessType: CloManagerAccessType) =>\r\n resolve({ companyReferenceName, accessType })\r\n);\r\n\r\nconst switchFavoriteRequest = createAction(\r\n 'cloManagers/favorite/REQUEST',\r\n resolve => (companyReferenceName: string, favorite: boolean) => resolve({ companyReferenceName, favorite })\r\n);\r\n\r\nconst switchFavoriteResponse = createAction(\r\n 'cloManagers/favorite/RESPONSE',\r\n resolve => (companyReferenceName: string, favorite: boolean) => resolve({ companyReferenceName, favorite })\r\n);\r\n\r\nconst analyticsInit = createAction(\r\n 'cloManagers/analytics/INIT',\r\n (resolve) => (companyReferenceName: string) => resolve({ companyReferenceName })\r\n);\r\n\r\nconst analyticsInitResponse = createAction(\r\n 'cloManagers/analytics/INIT/RESPONSE',\r\n (resolve) =>\r\n (data: {\r\n users: TreeSelectOption[];\r\n analytics: CloManagerAnalytics;\r\n numberOfHiddenItems: number;\r\n }) =>\r\n resolve(data)\r\n);\r\n\r\nconst analyticsReset = createAction('cloManagers/analytics/RESET');\r\n\r\nconst clientsActivityRequest = createAction(\r\n 'cloManagers/clientsActivity/REQUEST',\r\n resolve => (\r\n companyReferenceName: string,\r\n startDate?: Date,\r\n endDate?: Date,\r\n ) => resolve({\r\n companyReferenceName,\r\n startDate,\r\n endDate,\r\n })\r\n);\r\n\r\nconst clientsActivityResponse = createAction(\r\n 'cloManagers/clientsActivity/RESPONSE',\r\n resolve => (data: CloManagerClientActivity[], numberOfHiddenItems: number) => resolve({ data, numberOfHiddenItems })\r\n);\r\n\r\nconst clientsActivityFilterChange = createAction(\r\n 'cloManagers/clientsActivity/FILTER_CHANGE',\r\n resolve => (filter: CloManagerAnalyticsFilter) => resolve(filter),\r\n);\r\n\r\nconst profileViewHistoryRequest = createAction(\r\n 'cloManagers/profileViewHistory/REQUEST',\r\n resolve => (companyReferenceName: string, startDate?: Date | null, endDate?: Date | null) =>\r\n resolve({\r\n companyReferenceName,\r\n startDate,\r\n endDate,\r\n }),\r\n);\r\n\r\nconst profileViewHistoryResponse = createAction(\r\n 'cloManagers/profileViewHistory/RESPONSE',\r\n resolve => (data: CloManagerProfileView[], numberOfHiddenItems: number) => resolve({ data, numberOfHiddenItems }),\r\n);\r\n\r\nconst setManagerForAlertPopup = createAction(\r\n 'cloManagers/profileViewHistory/SET_MANAGER_FOR_ALERT_POPUP',\r\n resolve => (referenceName?: string) => resolve({ referenceName }),\r\n);\r\n\r\nconst profileViewHistoryFilterChange = createAction(\r\n 'cloManagers/profileViewHistory/FILTER_CHANGE',\r\n resolve => (filter: CloManagerAnalyticsFilter) => resolve(filter),\r\n);\r\n\r\nconst profileViewHistoryFilterByBar = createAction(\r\n 'cloManagers/profileViewHistory/FILTER_BY_BAR',\r\n resolve => (\r\n companyReferenceName: string,\r\n accessType: CloManagerAccessType,\r\n date: Date\r\n ) => resolve({\r\n companyReferenceName,\r\n accessType,\r\n date\r\n }),\r\n);\r\n\r\nconst reset = createAction('cloManagers/RESET');\r\n\r\nconst selectedSecurityChange = createAction(\r\n 'cloManagers/SELECTED_SECURITY_CHANGE',\r\n resolve => (security?: DealSecurity) => resolve({ security })\r\n);\r\n\r\nconst editPlatformUsers = createAction(\r\n 'cloManagers/editPlatformUsers',\r\n resolve => (email: string) => resolve({ email })\r\n);\r\n\r\nconst resetEditPlatformUsers = createAction('cloManagers/resetEditPlatformUsers');\r\n\r\nexport type TCloManagersActions = ActionType;\r\n\r\nexport const cloManagersActions = {\r\n getCloManagers,\r\n getCloManagersResult,\r\n getCloManager,\r\n getCloManagerResult,\r\n setManagerForAlertPopup,\r\n createOrUpdateCloManager,\r\n setCloManagerSaveState,\r\n logUserActivity,\r\n switchFavoriteRequest,\r\n switchFavoriteResponse,\r\n analyticsInit,\r\n analyticsInitResponse,\r\n analyticsReset,\r\n clientsActivityRequest,\r\n clientsActivityResponse,\r\n clientsActivityFilterChange,\r\n profileViewHistoryRequest,\r\n profileViewHistoryResponse,\r\n profileViewHistoryFilterChange,\r\n profileViewHistoryFilterByBar,\r\n reset,\r\n selectedSecurityChange,\r\n editPlatformUsers,\r\n resetEditPlatformUsers,\r\n};\r\n","import { ActionType, createAsyncAction } from 'typesafe-actions';\r\nimport { CompanyMember } from '../types/company/CompanyMember';\r\n\r\nconst fetchCompanyMembers = createAsyncAction(\r\n 'company-members/COMPANY_MEMBERS_REQUEST',\r\n 'company-members/COMPANY_MEMBERS_SUCCESS',\r\n 'company-members/COMPANY_MEMBERS_FAILURE'\r\n)<{ companyId: number }, { companyId: number, members: CompanyMember[] }, { companyId: number, error: Error }>()\r\n\r\nexport type TCompanyMembersActions = ActionType\r\n\r\nexport const companyMembersActions = {\r\n fetchCompanyMembers\r\n}\r\n","import { createAction, ActionType } from \"typesafe-actions\";\r\nimport { RequestState } from \"../constants/request-state\";\r\nimport { EmailPreferences } from \"../types/email-preferences/EmailPreferences\";\r\nimport { AlertEnabledState } from \"../types/enums/AlertEnabledState\";\r\n\r\nconst request = createAction('entities/email-preferences/REQUEST');\r\nconst requestResult = createAction('entities/email-preferences/REQUEST_RESULT',\r\n resolve => (requestState: RequestState, preferences?: EmailPreferences) => resolve({ preferences, requestState })\r\n);\r\nconst reset = createAction('entities/email-preferences/RESET');\r\nconst inventoryAlertChange = createAction('entities/email-preferences/INVENTORY_ALERT_CHANGE',\r\n resolve => (enabled: AlertEnabledState) => resolve({ enabled })\r\n);\r\nconst bwicAlertChange = createAction('entities/email-preferences/BWIC_ALERT_CHANGE',\r\n resolve => (enabled: AlertEnabledState) => resolve({ enabled })\r\n);\r\n\r\nexport type TEmailPreferecnesActionTypes = ActionType<\r\n typeof request |\r\n typeof requestResult |\r\n typeof reset |\r\n typeof inventoryAlertChange |\r\n typeof bwicAlertChange\r\n>;\r\n\r\nexport const emailPreferencesActions = {\r\n request,\r\n requestResult,\r\n reset,\r\n bwicAlertChange,\r\n inventoryAlertChange\r\n};\r\n","import { ActionType, createAction } from 'typesafe-actions';\r\nimport { RequestState } from '../../constants/request-state';\r\nimport { Company } from '../../types/amr-pipeline/models/Company';\r\n\r\nconst request = createAction('entities/availableBrokerDealers/REQUEST');\r\nconst requestResult = createAction(\r\n 'entities/availableBrokerDealers/REQUEST_RESULT',\r\n resolve =>\r\n (requestState: RequestState, companies: Company[] = []) =>\r\n resolve({ requestState, companies }),\r\n);\r\n\r\nexport type TAvailableBrokerDealersActionType = ActionType<(typeof availableBrokerDealersActions)[keyof typeof availableBrokerDealersActions]>;\r\n\r\nexport const availableBrokerDealersActions = {\r\n request,\r\n requestResult,\r\n};\r\n","import { createAction } from 'typesafe-actions';\r\nimport { Company } from '../types/management/Company';\r\n\r\nconst show = createAction('changeSubscriptionActions/SHOW', resolve => (company: Company) => resolve({ company }));\r\nconst hide = createAction('changeSubscriptionActions/HIDE');\r\nconst setSubscriptionSavingFlag = createAction(\r\n 'changeSubscriptionActions/SAVING_FLAG',\r\n resolve => (isSubscriptionSavingFlag: boolean) => resolve({ isSubscriptionSavingFlag }),\r\n);\r\nconst saveSubscription = createAction(\r\n 'changeSubscriptionActions/SAVE_SUBSCRIPTION',\r\n resolve => (companyId: number, subscriptionType: string, subscriptionExpiration?: Date) =>\r\n resolve({ companyId, subscriptionType, subscriptionExpiration }),\r\n);\r\n\r\nexport const changeSubscriptionActions = {\r\n show,\r\n hide,\r\n setSubscriptionSavingFlag,\r\n saveSubscription,\r\n};\r\n","import { createAction } from \"typesafe-actions\";\r\nimport { RequestState } from \"../constants/request-state\";\r\nimport { Portfolio } from \"../types/portfolio/Portfolio\";\r\nimport { Color } from \"../types/bwic/Color\";\r\n\r\nconst request = createAction('entities/portfolio-list/Request');\r\nconst requestResult = createAction('entities/portfolio-list/RequestResult',\r\n resolve => (requestResult: RequestState, result: Portfolio[] = []) =>\r\n resolve({ requestResult, result })\r\n);\r\nconst resetEntities = createAction('entities/portfolio-list/Reset');\r\nconst colorDistributionSend = createAction('entities/portfolios-list/PublicColors',\r\n resolve => (data: { colors: { positionId: number, color: Color[] }, bwicReferenceName: string, historyAction: {} }) => resolve({ data })\r\n);\r\nconst bwicStatusChanged = createAction('entities/portfolio-list/BwicStatusChange',\r\n resolve => (data: { bwicStatus: string, bwicReferenceName: string, historyAction: {} }) => resolve({ data })\r\n);\r\nconst updateSendAlertState = createAction(\r\n 'entities/portfolio-list/UpdateSendAlertState',\r\n resolve =>\r\n (\r\n sendAlertState: {\r\n portfolioId: number;\r\n bwicAlert?: boolean;\r\n dealersInventoryAlert?: boolean;\r\n cleansingNoticeAlert?: boolean;\r\n issuanceMonitorAlert?: boolean;\r\n outOfRiPeriodAlert?: boolean;\r\n outOfNcPeriodAlert?: boolean;\r\n rollerDeadlineAlert?: boolean;\r\n }[],\r\n ) =>\r\n resolve({ sendAlertState }),\r\n);\r\n\r\nconst deletePortfolio = createAction('entities/portfolio-list/DeletePortfolio',\r\n resolve => (portfolioId: number) => resolve({ portfolioId }));\r\n\r\nconst reset = createAction('entities/portfolio-list/Reset');\r\n\r\nexport const portfolioListActions = {\r\n request,\r\n requestResult,\r\n resetEntities,\r\n colorDistributionSend,\r\n bwicStatusChanged,\r\n updateSendAlertState,\r\n deletePortfolio,\r\n reset\r\n}\r\n","import { createAction, ActionType } from 'typesafe-actions';\r\nimport { RequestState } from '../constants/request-state';\r\nimport { Deal, DealShortInfo } from '../types/amr-pipeline/models/Deal';\r\nimport { DealDetails } from '../types/amr-pipeline/models/DealDetails';\r\nimport { DealSave } from '../types/deals/DealSave';\r\nimport { Tranche } from '../types/amr-pipeline/models/Tranche';\r\nimport { Security } from '../types/security/Security';\r\nimport { SecurityBwicStatisticsSummary } from '../types/security/SecurityBwicStatisticsSummary';\r\nimport { ThunkDispatch } from 'redux-thunk';\r\nimport { AppState } from '../types/state/AppState';\r\nimport { AnyAction } from 'redux-saga';\r\nimport { GridDataItem } from '../types/state/GridState';\r\nimport { gridActions } from '.';\r\nimport { clone, isNil } from 'lodash';\r\nimport { TrancheStatus } from '../types/amr-pipeline/enums/TrancheStatus';\r\nimport { SettlementInstructions } from '../types/amr-pipeline/models/SettlementInstructions';\r\nimport { AmrClass } from '../types/amr-pipeline/models/AmrClass';\r\nimport { AmrInfoSaveForm } from '../types/deals/AmrInfoSaveForm';\r\nimport { amrFormatUtils, formatUtils } from '../utils';\r\nimport { Rating } from '../types/enums/Rating';\r\nimport { DealDocumentsWithPattern } from '../types/amr-pipeline/models/DealDocumentsWithPattern';\r\n\r\nconst getDeals = createAction('deals/get/REQUEST', resolve => (searchTerm?: string) => resolve({ searchTerm }));\r\n\r\nconst getDealsResult = createAction(\r\n 'deals/get/REQUEST_RESULT',\r\n resolve => (deals: DealShortInfo[]) => resolve({ deals }),\r\n);\r\n\r\nconst getDealDetails = createAction(\r\n 'deals/getOne/REQUEST',\r\n resolve => (referenceName: string) => resolve({ referenceName }),\r\n);\r\n\r\nconst getDealDetailsResult = createAction(\r\n 'deals/getOne/REQUEST_RESULT',\r\n resolve => (referenceName: string, dealDetails: DealDetails) =>\r\n resolve({\r\n referenceName,\r\n dealDetails,\r\n }),\r\n);\r\n\r\nconst getClassSecondaryInfo = createAction(\r\n 'deals/GET_CLASS_SECONDARY_INFO',\r\n resolve => (selectedClass: Tranche) => resolve({ selectedClass }),\r\n);\r\n\r\nconst getClassSecondaryInfoResult = createAction(\r\n 'deals/GET_CLASS_SECONDARY_INFO_RESULT',\r\n resolve => (security?: Security, securityStatistics?: SecurityBwicStatisticsSummary) =>\r\n resolve({ security, securityStatistics }),\r\n);\r\n\r\nconst resetDeals = createAction('deals/RESET_DEALS');\r\n\r\nconst editDeal = createAction('deals/EDIT');\r\nconst editDealReset = createAction('deals/EDIT_RESET');\r\n\r\nconst updateDeal = createAction(\r\n 'deals/update/REQUEST',\r\n resolve => (referenceName: string, formData: DealSave) =>\r\n resolve({\r\n referenceName,\r\n formData,\r\n }),\r\n);\r\n\r\nconst updateDealResult = createAction(\r\n 'deals/update/RESULT',\r\n resolve => (requestState: RequestState) =>\r\n resolve({\r\n requestState,\r\n }),\r\n);\r\n\r\nconst deleteDealRequest = createAction(\r\n 'deals/delete/REQUEST',\r\n resolve => (referenceName: string) => resolve({ referenceName }),\r\n);\r\n\r\nconst deleteDealResult = createAction(\r\n 'deals/delete/RESULT',\r\n resolve => (requestState: RequestState, referenceName: string) =>\r\n resolve({\r\n requestState,\r\n referenceName,\r\n }),\r\n);\r\n\r\nconst allClassesEdit = createAction('deals/allClasses/edit', resolve => (classes: Tranche[]) => resolve({ classes }));\r\n\r\nconst allClassesEditInit = createAction('deals/allClasses/edit/init', resolve => (deal: Deal) => resolve({ deal }));\r\n\r\nconst allClassesUpdate = createAction(\r\n 'deals/allClasses/update/REQUEST',\r\n resolve => (dealReferenceName: string) => resolve({ dealReferenceName }),\r\n);\r\n\r\nconst allClassesUpdateResponse = createAction('deals/allClasses/update/RESPONSE');\r\n\r\nconst allClassesCacheTranche = createAction(\r\n 'deals/allClasses/edit/CACHE_TRANCHE',\r\n resolve => (rowIndex: number, tranche: Tranche) => resolve({ rowIndex, tranche }),\r\n);\r\n\r\nconst allClassesInvalidateTranceCache = createAction(\r\n 'deals/allClasses/edit/INVALIDATE_TRANCHE_CACHE',\r\n resolve => (rowIndex?: number) => resolve({ rowIndex }),\r\n);\r\n\r\nconst updateGridRow = (rowIndex: number, tranche: Tranche) => {\r\n return (dispatch: ThunkDispatch, getState: () => AppState) => {\r\n dispatch(gridActions.deleteRow(rowIndex));\r\n dispatch(gridActions.insertDataItems([tranche], rowIndex));\r\n };\r\n};\r\n\r\nconst allClassesUpdateTickers = (rowIndex: number) => {\r\n return (dispatch: ThunkDispatch, getState: () => AppState) => {\r\n const dataItems: GridDataItem[] = getState().grid.dataItems;\r\n const selectedDeal = getState().deals.selectedDeal;\r\n const dataItem = dataItems[rowIndex];\r\n\r\n if (isNil(dataItem) || isNil(selectedDeal)) {\r\n return;\r\n }\r\n\r\n const updatedDataItem = {\r\n ...dataItem,\r\n ticker144A: formatUtils.formatTickerRule144a(selectedDeal.ticker, dataItem.name, dataItem.rating as Rating),\r\n tickerRegS: formatUtils.formatTickerRuleRegS(selectedDeal.ticker, dataItem.name, dataItem.rating as Rating),\r\n tickerAccdInvCertif: formatUtils.formatTickerRuleAccInvCertif(selectedDeal.ticker, dataItem.name, dataItem.rating as Rating),\r\n }\r\n\r\n dispatch(updateGridRow(rowIndex, updatedDataItem));\r\n dispatch(allClassesInvalidateTranceCache(rowIndex));\r\n };\r\n}\r\n\r\nconst allClassesUpdateStatus = (rowIndex: number) => {\r\n return (dispatch: ThunkDispatch, getState: () => AppState) => {\r\n const dataItems: GridDataItem[] = getState().grid.dataItems;\r\n\r\n if (isNil(dataItems[rowIndex])) {\r\n return;\r\n }\r\n\r\n const dataItem = clone(dataItems[rowIndex]);\r\n\r\n if (dataItem.status === TrancheStatus.Inactive) {\r\n dispatch(allClassesCacheTranche(rowIndex, dataItem));\r\n\r\n const updatedTranche: Tranche = {\r\n ...dataItem,\r\n balance: 0,\r\n margin: 0,\r\n redeemed: true,\r\n floaterIndex: undefined,\r\n coupon: undefined,\r\n ratingDbrs: undefined,\r\n ratingFitch: undefined,\r\n ratingKbra: undefined,\r\n ratingMoodys: undefined,\r\n ratingSnP: undefined,\r\n };\r\n\r\n dispatch(updateGridRow(rowIndex, updatedTranche));\r\n } else {\r\n const { hasHistoryData } = dataItem;\r\n let updatedTranche: Tranche;\r\n\r\n if (hasHistoryData) {\r\n const {\r\n historyBalance,\r\n historyMargin,\r\n historyFloaterIndex,\r\n historyRatingDbrs,\r\n historyRatingFitch,\r\n historyRatingKbra,\r\n historyRatingMoodys,\r\n historyRatingSnP,\r\n } = dataItem;\r\n\r\n updatedTranche = {\r\n ...dataItem,\r\n balance: historyBalance,\r\n margin: historyMargin,\r\n floaterIndex: historyFloaterIndex,\r\n ratingDbrs: historyRatingDbrs,\r\n ratingFitch: historyRatingFitch,\r\n ratingKbra: historyRatingKbra,\r\n ratingMoodys: historyRatingMoodys,\r\n ratingSnP: historyRatingSnP,\r\n ...(dataItem.status === TrancheStatus.Active && {\r\n redeemed: false,\r\n }),\r\n };\r\n } else {\r\n const cachedItem = getState().deals.allClasses.cachedInactiveClasses[rowIndex];\r\n\r\n if (!cachedItem && dataItem.status === TrancheStatus.Draft) {\r\n return;\r\n }\r\n\r\n let cachedData;\r\n\r\n if (cachedItem) {\r\n const {\r\n balance,\r\n margin,\r\n redeemed,\r\n floaterIndex,\r\n coupon,\r\n ratingDbrs,\r\n ratingFitch,\r\n ratingKbra,\r\n ratingMoodys,\r\n ratingSnP,\r\n } = cachedItem;\r\n\r\n cachedData = {\r\n balance,\r\n margin,\r\n redeemed,\r\n floaterIndex,\r\n coupon,\r\n ratingDbrs,\r\n ratingFitch,\r\n ratingKbra,\r\n ratingMoodys,\r\n ratingSnP,\r\n };\r\n }\r\n\r\n updatedTranche = {\r\n ...dataItem,\r\n ...cachedData,\r\n ...(dataItem.status === TrancheStatus.Active && {\r\n redeemed: false,\r\n }),\r\n };\r\n }\r\n\r\n dispatch(updateGridRow(rowIndex, updatedTranche));\r\n dispatch(allClassesInvalidateTranceCache(rowIndex));\r\n }\r\n };\r\n};\r\n\r\nconst allClassesUpdateCoupon = (rowIndex: number) => {\r\n return (dispatch: ThunkDispatch, getState: () => AppState) => {\r\n const dataItems: GridDataItem[] = getState().grid.dataItems;\r\n\r\n if (isNil(dataItems[rowIndex])) {\r\n return;\r\n }\r\n\r\n const dataItem = clone(dataItems[rowIndex]);\r\n const {\r\n floaterIndex,\r\n margin,\r\n originalFloaterIndex,\r\n originalMargin\r\n } = dataItem;\r\n\r\n const updatedTrahcne: Tranche = {\r\n ...dataItem,\r\n coupon: amrFormatUtils.formatInventoryCoupon(floaterIndex, margin),\r\n originalCoupon: amrFormatUtils.formatInventoryCoupon(originalFloaterIndex, originalMargin),\r\n };\r\n\r\n dispatch(updateGridRow(rowIndex, updatedTrahcne));\r\n };\r\n};\r\n\r\nconst updateDealDocuments = createAction(\r\n 'deals/documents/update/REQUEST',\r\n resolve => (referenceName: string, documentsWithPattern: DealDocumentsWithPattern) =>\r\n resolve({\r\n referenceName,\r\n documentsWithPattern,\r\n }),\r\n);\r\n\r\nconst updateDealDocumentsResult = createAction(\r\n 'deals/documents/update/RESULT',\r\n resolve => (requestState: RequestState) =>\r\n resolve({\r\n requestState,\r\n }),\r\n);\r\n\r\nconst amrInfoClassesEdit = createAction('deals/amrInfo/edit', resolve => (classes: AmrClass[]) => resolve({ classes }));\r\n\r\nconst amrInfoSave = createAction(\r\n 'deals/amrInfo/save',\r\n resolve => (dealReferenceName: string, transactionReferenceName: string, amrInfo: AmrInfoSaveForm) =>\r\n resolve({ dealReferenceName, transactionReferenceName, amrInfo }),\r\n);\r\n\r\nconst saveAmrInfoResponse = createAction('deals/amrInfo/save/RESPONSE');\r\nconst deleteAmrTransaction = createAction(\r\n 'deals/amrInfo/delete',\r\n resolve => (dealReferenceName: string, transactionReferenceName: string) =>\r\n resolve({ dealReferenceName, transactionReferenceName }),\r\n);\r\n\r\nconst saveExcludedDealersRequest = createAction(\r\n 'deals/saveExcludedDealers/REQUEST',\r\n resolve =>\r\n (\r\n dealReferenceName: string,\r\n transactionReferenceName: string,\r\n classReferenceName: string,\r\n excludedDealersReferenceNames: string[],\r\n ) =>\r\n resolve({ dealReferenceName, transactionReferenceName, classReferenceName, excludedDealersReferenceNames }),\r\n);\r\n\r\nconst saveExcludedDealersResponse = createAction('deals/saveExcludedDealers/RESPONSE');\r\n\r\nconst saveSettlementInstructionsRequest = createAction(\r\n 'deals/saveSettlementInstructions/REQUEST',\r\n resolve =>\r\n (dealReferenceName: string, classReferenceName: string, settlementInstructions: SettlementInstructions) =>\r\n resolve({ dealReferenceName, classReferenceName, settlementInstructions }),\r\n);\r\n\r\nconst saveSettlementInstructionsResponse = createAction('deals/saveSettlementInstructions/RESPONSE');\r\n\r\nconst exportSettlementInstructions = createAction(\r\n 'deals/exportSettlementInstructions/REQUEST',\r\n resolve =>\r\n (\r\n dealReferenceName: string,\r\n dealLegalName: string,\r\n transactionReferenceName: string,\r\n classReferenceName: string,\r\n classLegalName: string,\r\n ) =>\r\n resolve({ dealReferenceName, dealLegalName, transactionReferenceName, classReferenceName, classLegalName }),\r\n);\r\n\r\nconst openFigiErrorTickersResponse = createAction(\r\n 'deals/openFigiErrorTickers/RESPONSE',\r\n resolve => (errorTickers: string[]) => resolve({ errorTickers }),\r\n)\r\n\r\nconst reset = createAction('deals/RESET');\r\n\r\nexport type TDealsActions = ActionType<(typeof dealsActions)[keyof typeof dealsActions]>;\r\n\r\nexport const dealsActions = {\r\n getDeals,\r\n getDealsResult,\r\n getDealDetails,\r\n resetDeals,\r\n getDealDetailsResult,\r\n getClassSecondaryInfo,\r\n getClassSecondaryInfoResult,\r\n editDeal,\r\n editDealReset,\r\n updateDeal,\r\n updateDealResult,\r\n deleteDealRequest,\r\n deleteDealResult,\r\n allClassesEdit,\r\n allClassesEditInit,\r\n allClassesUpdate,\r\n allClassesUpdateResponse,\r\n allClassesCacheTranche,\r\n allClassesInvalidateTranceCache,\r\n allClassesUpdateStatus,\r\n allClassesUpdateCoupon,\r\n allClassesUpdateTickers,\r\n updateDealDocuments,\r\n updateDealDocumentsResult,\r\n saveExcludedDealersRequest,\r\n saveExcludedDealersResponse,\r\n saveSettlementInstructionsResponse,\r\n saveSettlementInstructionsRequest,\r\n amrInfoClassesEdit,\r\n amrInfoSave,\r\n saveAmrInfoResponse,\r\n deleteAmrTransaction,\r\n exportSettlementInstructions,\r\n openFigiErrorTickersResponse,\r\n reset,\r\n};\r\n","import {\r\n bwicHistoryActions,\r\n autoFeedbackSettingsActions,\r\n securityDetailsActions,\r\n sellerBiddingActions,\r\n pxTalkListActions,\r\n rulesActions\r\n} from \".\";\r\nimport { blastMessageActions } from \"./blast-message.actions\";\r\nimport { dealerListPanelActions } from \"./dealer-list-panel.actions\";\r\nimport { companyDetailsActions } from './company-details.actions';\r\nimport { textRulesPanelActions } from \"./text-rules-panel.actions\"\r\nimport { bwicLogActions } from \"./bwic-log.actions\";\r\nimport { history } from \"../history\";\r\n\r\n\r\nexport const controlPanelActions = {\r\n hide\r\n};\r\n\r\nfunction hide() {\r\n return dispatch => {\r\n dispatch(securityDetailsActions.securityDetailsReset());\r\n dispatch(bwicLogActions.bwicLogReset());\r\n dispatch(sellerBiddingActions.showBidList(false));\r\n dispatch(autoFeedbackSettingsActions.showAutoFeedbackSettingsPanel(false));\r\n dispatch(bwicHistoryActions.showHistory(false));\r\n dispatch(rulesActions.hide());\r\n dispatch(pxTalkListActions.hide());\r\n dispatch(dealerListPanelActions.hide());\r\n dispatch(blastMessageActions.hide());\r\n dispatch(companyDetailsActions.hide());\r\n dispatch(textRulesPanelActions.hide());\r\n\r\n if (history.location?.state?.panel) {\r\n history.replace({ ...history.location, state: undefined });\r\n }\r\n };\r\n}\r\n","import moment from 'moment';\r\nimport { values, isEqual } from 'lodash';\r\nimport {\r\n processActions as actionTypes,\r\n errorMessages,\r\n constants\r\n} from '../constants';\r\nimport { bwicProcessService as processService } from '../services';\r\nimport { errorActions } from '.';\r\nimport { dateTimeUtils, arrayUtils, numericUtils, formatUtils } from '../utils';\r\nimport { LevelSpecificationType } from '../types/enums/LevelSpecificationType';\r\nimport { BwicProcessType } from '../types/models/Process';\r\nimport { JumpBallStage2Participants } from '../types/bwic-process/JumpBallSettings';\r\nimport { TopXStage2Participants } from '../types/bwic-process/TopXSettings';\r\nimport { appConfig } from '../app-config';\r\nimport { OpenBiddingImproverCount } from '../types/enums/OpenBiddingImproverCount';\r\n\r\nexport const processActions = {\r\n init,\r\n reset,\r\n changeDate,\r\n changeDaysToSettle,\r\n changeTimeZone,\r\n changeBidsDueTime,\r\n changeGoodUntilTime,\r\n validate,\r\n\r\n storeNextBusiessDay,\r\n selectTemplate,\r\n reserveLevelsApplyEnabled,\r\n earlyTradesEnabled,\r\n rulesText,\r\n setStage1Deadline,\r\n setImprovementRound,\r\n setMinBidIncrement,\r\n setLevelSpecificationType,\r\n setOpenBiddingImproverCount,\r\n resetStage1DeadlineError,\r\n resetImprovementRoundError,\r\n resetMinBidIncrementError,\r\n resetJumpBallStage2DurationMinutes,\r\n resetBestFootForwardDurationMinutes,\r\n resetJumpBallStage1AutomaticMinutes,\r\n resetTopXStage1AutomaticMinutes,\r\n resetTopXStage2DurationMinutes,\r\n titleChange,\r\n descriptionChange,\r\n setMinDate,\r\n setHolidays,\r\n resetChanges,\r\n\r\n jumpBallStage1EndManual,\r\n jumpBallStage1EndAuto,\r\n jumpBallStage1EndAutomaticMinutesChange,\r\n jumpBallStage2ParticipantsChange,\r\n jumpBallStage2DurationUnspecified,\r\n jumpBallStage2DurationPreset,\r\n jumpBallStage2DurationMinutesChange,\r\n\r\n autoFeedbackDelayChange,\r\n autoFeedbackDelayEnabled,\r\n autoFeedbackDelayDisabled,\r\n minBidIncrementChange,\r\n minBidIncrementEnabled,\r\n minBidIncrementDisabled,\r\n\r\n cutOffReminderChange,\r\n\r\n topXStage1EndManual,\r\n topXStage1EndAuto,\r\n topXStage1EndAutomaticMinutesChange,\r\n topXStage2ParticipantsChange,\r\n topXStage2DurationUnspecified,\r\n topXStage2DurationPreset,\r\n topXStage2DurationMinutesChange,\r\n\r\n bestFootForwardDurationMinutesChange,\r\n setAllToAllProtocol\r\n}\r\n\r\nfunction init() {\r\n return async (dispatch, getState) => {\r\n const { process } = getState();\r\n\r\n if (process.templates.all?.length) {\r\n return; // already initialized\r\n }\r\n\r\n try {\r\n const templates = await processService.getTemplates();\r\n dispatch(addTemplates(templates));\r\n dispatch(selectTemplate(0));\r\n } catch (e) {\r\n dispatch(errorActions.criticalError(e));\r\n }\r\n }\r\n}\r\n\r\nfunction setMinDate(minimumDate) {\r\n return {\r\n type: actionTypes.MIN_DATE,\r\n minimumDate\r\n };\r\n}\r\n\r\nfunction setBwicDisabledTime() {\r\n return (dispatch, getState) => {\r\n const { bidsDue, goodUntil, timeZone, timeZones } = getState().process;\r\n const { fromTime, toTime } = getBwicAllowedTimeRange(timeZone, timeZones);\r\n const all = arrayUtils.arrayFromRange(0, 23);\r\n const allowed = arrayUtils.arrayFromRange(fromTime.hour(), toTime.hour());\r\n const disabledHours = all.filter(h => !allowed.some(a => a === h));\r\n\r\n const selectedTimeZone = timeZones.find(t => t.id === timeZone);\r\n const frameEndHour = toTime.hour();\r\n const isBidsDueMinutesDisabled = shouldDisableMinutes(bidsDue, selectedTimeZone, frameEndHour);\r\n const isGoodUntilMinutesDisabled = shouldDisableMinutes(goodUntil, selectedTimeZone, frameEndHour);\r\n\r\n dispatch({\r\n type: actionTypes.SET_DISABLED_TIME,\r\n disabledHours,\r\n isBidsDueMinutesDisabled,\r\n isGoodUntilMinutesDisabled\r\n });\r\n };\r\n}\r\n\r\nfunction shouldDisableMinutes(time, timeZone, frameEndHour) {\r\n const hour = moment\r\n .utc(time)\r\n .utcOffset(timeZone.utcOffsetMinutes, true)\r\n .hour();\r\n\r\n return hour === frameEndHour;\r\n}\r\n\r\nfunction getBwicAllowedTimeRange(timeZoneId, timeZones) {\r\n const est = timeZones.find(t => t.abbreviation === 'EST');\r\n const selected = timeZones.find(t => t.id === timeZoneId);\r\n const { from, to } = constants.bwicAllowedTimeRange;\r\n const fromTime = moment.utc(dateTimeUtils.timestampToUtcString(from)).utcOffset(est.utcOffsetMinutes, true).utcOffset(selected.utcOffsetMinutes);\r\n const toTime = moment.utc(dateTimeUtils.timestampToUtcString(to)).utcOffset(est.utcOffsetMinutes, true).utcOffset(selected.utcOffsetMinutes);\r\n\r\n return { fromTime, toTime };\r\n}\r\n\r\nfunction storeNextBusiessDay(date) {\r\n return {\r\n type: actionTypes.NEXT_BUSINESS_DAY,\r\n date\r\n };\r\n}\r\n\r\nfunction changeDate(date) {\r\n return (dispatch, getState) => {\r\n const { process } = getState();\r\n if (process.date !== date) {\r\n dispatch({ type: actionTypes.CHANGE_DATE, date });\r\n if (process.errors) {\r\n dispatch(validate());\r\n }\r\n }\r\n }\r\n}\r\n\r\nfunction setHolidays(holidays) {\r\n return {\r\n type: actionTypes.HOLIDAYS,\r\n holidays\r\n }\r\n}\r\n\r\nfunction changeDaysToSettle(days) {\r\n return {\r\n type: actionTypes.DAYS_TO_SETTLE,\r\n days\r\n };\r\n}\r\n\r\nfunction changeTimeZone(timeZone) {\r\n return (dispatch, getState) => {\r\n dispatch({\r\n type: actionTypes.TIME_ZONE,\r\n timeZone\r\n });\r\n dispatch(setBwicDisabledTime());\r\n\r\n const { errors = {} } = getState().process;\r\n if (errors.time) {\r\n dispatch(validate());\r\n }\r\n };\r\n}\r\n\r\nfunction changeBidsDueTime(time) {\r\n return (dispatch, getState) => {\r\n const { errors = {}, goodUntil } = getState().process;\r\n\r\n dispatch({ type: actionTypes.BIDS_DUE, time });\r\n\r\n if (errors.time || hasTemplateErrors(errors)) {\r\n dispatch(validate());\r\n }\r\n\r\n if (time) {\r\n const bidsDueTime = moment.utc(time);\r\n const goodUntilCurrentTime = moment.utc(goodUntil);\r\n const frameEnd = dateTimeUtils.timestampToUtcString(constants.bwicAllowedTimeRange.to);\r\n\r\n const goodUntilNewTime = goodUntilCurrentTime.isSame(bidsDueTime, 'day') && goodUntilCurrentTime <= moment.utc(frameEnd)\r\n ? goodUntilCurrentTime.format(constants.dateTimeFormatUtc)\r\n : frameEnd;\r\n\r\n dispatch(changeGoodUntilTime(goodUntilNewTime));\r\n }\r\n }\r\n}\r\n\r\nfunction changeGoodUntilTime(time) {\r\n return (dispatch, getState) => {\r\n const { errors = {} } = getState().process;\r\n\r\n dispatch({ type: actionTypes.GOOD_UNTIL, time });\r\n if (errors.time || hasTemplateErrors(errors)) {\r\n dispatch(validate());\r\n }\r\n\r\n if (time) {\r\n dispatch(setBwicDisabledTime());\r\n }\r\n }\r\n}\r\n\r\nfunction hasTemplateErrors(errors) {\r\n return errors.templates && Object.values(errors.templates).some(e => e);\r\n}\r\n\r\nfunction validate() {\r\n return (dispatch, getState) => {\r\n const { process } = getState();\r\n const errors = {};\r\n errors.date = validateDate(process.date, process.holidays);\r\n errors.time = validateTime(!errors.date && process.date, process.bidsDue, process.goodUntil, process.timeZone, process.timeZones);\r\n errors.templates = validateTemplate(process.bidsDue, process.goodUntil, process.templates.current || {});\r\n const isDateValid = !(errors.date || errors.time);\r\n const isTemplateValid = !hasTemplateErrors(errors);\r\n const isValid = !(errors.date || errors.time || !isTemplateValid);\r\n\r\n dispatch({\r\n type: actionTypes.VALIDATE,\r\n validation: {\r\n errors,\r\n isValid,\r\n isTemplateValid,\r\n isDateValid\r\n }\r\n })\r\n }\r\n}\r\n\r\nfunction validateDate(date, holidays) {\r\n if (date === '') {\r\n return errorMessages.empty;\r\n } else if (typeof date === 'undefined') {\r\n return errorMessages.invalidValue;\r\n }\r\n\r\n const momentDate = moment(date);\r\n\r\n if (momentDate.diff(new Date(), 'days') < 0) {\r\n return errorMessages.dateShouldNotBeInPast;\r\n }\r\n\r\n const weekday = momentDate.isoWeekday();\r\n\r\n if ([6, 7].some(d => d === weekday)) {\r\n return errorMessages.bwicDateShouldNotBeWeekend;\r\n }\r\n\r\n if (holidays.some(h => moment(h).isSame(momentDate, 'day'))) {\r\n return errorMessages.bwicDateShouldNotBeHoliday;\r\n }\r\n}\r\n\r\nfunction validateTime(date, start, end, timeZoneId, timeZones) {\r\n const bidsDueUtc = moment.utc(start);\r\n const goodUntilUtc = moment.utc(end);\r\n\r\n if (bidsDueUtc >= goodUntilUtc) {\r\n return errorMessages.bidsDueShoulbBeLessThanGoodUntil;\r\n }\r\n\r\n const timeZone = timeZones.find(t => t.id === timeZoneId)\r\n const bidsDue = bidsDueUtc.utcOffset(timeZone.utcOffsetMinutes, true);\r\n const goodUntil = goodUntilUtc.utcOffset(timeZone.utcOffsetMinutes, true);\r\n\r\n if (!appConfig.enableAnyTimeNewBwic) { // for testing purposes\r\n const { fromTime, toTime } = getBwicAllowedTimeRange(timeZoneId, timeZones);\r\n\r\n if (bidsDue < fromTime || bidsDue > toTime || goodUntil < fromTime || goodUntil > toTime) {\r\n return errorMessages.bwicTimeInvalidRange(moment(fromTime).format(constants.timeFormat3), moment(toTime).format(constants.timeFormat3), timeZone.abbreviation);\r\n }\r\n }\r\n\r\n if (date) {\r\n const bwicDate = moment(date).utcOffset(timeZone.utcOffsetMinutes, true);\r\n const now = moment.utc().utcOffset(timeZone.utcOffsetMinutes);\r\n\r\n if (now.isSame(bwicDate, 'day')) {\r\n const bidsDueDateTime = bidsDue.set({ date: bwicDate.date(), month: bwicDate.month(), year: bwicDate.year() });\r\n if (bidsDueDateTime < now) {\r\n return errorMessages.bwicTimeShouldNotBeInPast;\r\n }\r\n }\r\n }\r\n\r\n return undefined;\r\n}\r\n\r\nfunction validateTemplate(start, end, template) {\r\n const bidsDueTimestamp = dateTimeUtils.timestampFromUtcString(start);\r\n const goodUntilTimestamp = dateTimeUtils.timestampFromUtcString(end);\r\n\r\n const bidsDue = moment.utc(bidsDueTimestamp, constants.timeFormat);\r\n const goodUntil = moment.utc(goodUntilTimestamp, constants.timeFormat);\r\n\r\n const bwicDuration = goodUntil.diff(bidsDue, 'minutes');\r\n\r\n return {\r\n ...validateMinBidIncrementTemplate(template),\r\n ...validateAutoFeedbackDelay(template, bwicDuration),\r\n ...validateCutOffReminder(template, bwicDuration),\r\n ...validateLive(template, bwicDuration),\r\n ...validateJumpBall(template, bwicDuration),\r\n ...validateTopX(template, bwicDuration),\r\n ...validateBestFootForward(template, bwicDuration)\r\n };\r\n}\r\n\r\nfunction validateLive(template, bwicDurationMinutes) {\r\n const result = {};\r\n\r\n if (template.type === BwicProcessType.Live) {\r\n const stage1Max = template.liveBidding.improvementRound\r\n ? bwicDurationMinutes - template.liveBidding.improvementRound\r\n : bwicDurationMinutes - constants.openBiddingMinStage2Duration\r\n\r\n result.stage1Deadline = validateNumber(\r\n template.liveBidding.stage1Deadline, {\r\n min: constants.openBiddingMinStage1Duration,\r\n max: Math.max(constants.openBiddingMinStage1Duration, stage1Max)\r\n });\r\n\r\n if (bwicDurationMinutes < (template.liveBidding.improvementRound + template.liveBidding.stage1Deadline)) {\r\n result.improvementRound = errorMessages.setMoreThanTotalDuration(bwicDurationMinutes);\r\n result.stage1Deadline = errorMessages.setMoreThanTotalDuration(bwicDurationMinutes);\r\n }\r\n else {\r\n result.improvementRound = validateNumber(\r\n template.liveBidding.improvementRound, {\r\n min: constants.openBiddingMinStage2Duration,\r\n max: constants.openBiddingMaxStage2Duration\r\n });\r\n }\r\n\r\n result.minBidIncrement = validateMinBidIncrement(template.liveBidding.minBidIncrement);\r\n }\r\n\r\n return result;\r\n}\r\n\r\nfunction validateCutOffReminder(template, bwicDuration) {\r\n const result = {};\r\n\r\n let processRange = {\r\n range: {},\r\n lessThanErrorMessage: '',\r\n greaterThenErrorMessage: ''\r\n };\r\n\r\n function getBestFootForwardCutOffReminderRange(stageDuration) {\r\n\r\n const stageDurationMinutes =\r\n stageDuration > constants.minBwicDuration\r\n ? stageDuration\r\n : constants.minBwicDuration\r\n\r\n return processRange = {\r\n range: {\r\n min: constants.cutOffReminderRange.min,\r\n max: stageDurationMinutes - constants.differenceBetweenStageAndCutOffReminder,\r\n }\r\n }\r\n }\r\n\r\n function getRangeWithStage1Deadline(stage1Deadline) {\r\n const stage1DeadlineMinutes =\r\n stage1Deadline > constants.minBwicDuration\r\n ? stage1Deadline\r\n : constants.minBwicDuration\r\n\r\n return processRange = {\r\n range: stage1Deadline\r\n ? {\r\n min: constants.cutOffReminderRange.min,\r\n max: stage1DeadlineMinutes - constants.differenceBetweenStageAndCutOffReminder,\r\n }\r\n : {\r\n min: constants.cutOffReminderRange.min,\r\n max: constants.cutOffReminderRange.max,\r\n }\r\n }\r\n }\r\n\r\n switch (template.type) {\r\n case BwicProcessType.JumpBall: getRangeWithStage1Deadline(dateTimeUtils.parseTimeSpan(template.jumpBall.automaticStage1Deadline).totalMinutes); break;\r\n case BwicProcessType.TopX: getRangeWithStage1Deadline(dateTimeUtils.parseTimeSpan(template.topX.automaticStage1Deadline).totalMinutes); break;\r\n case BwicProcessType.Live: getRangeWithStage1Deadline(template.liveBidding.stage1Deadline); break;\r\n case BwicProcessType.BestFootForward: getBestFootForwardCutOffReminderRange(\r\n dateTimeUtils.parseTimeSpan(template.bff.stage1Deadline).totalMinutes,\r\n dateTimeUtils.parseTimeSpan(template.cutOffReminder).totalMinutes); break;\r\n default: processRange = { range: constants.cutOffReminderRange };\r\n }\r\n result.cutOffReminder = validateNumber(\r\n dateTimeUtils.parseTimeSpan(template.cutOffReminder).totalMinutes,\r\n processRange.range,\r\n processRange.lessThanErrorMessage,\r\n processRange.greaterThenErrorMessage\r\n );\r\n\r\n return result\r\n}\r\nfunction validateAutoFeedbackDelay(template, bwicDuration) {\r\n const result = {};\r\n\r\n if (template.autoFeedbackDelay != null) {\r\n result.autoFeedbackDelay = validateNumber(\r\n dateTimeUtils.parseTimeSpan(template.autoFeedbackDelay).totalMinutes, {\r\n min: constants.autoFeedbackDelayRange.min,\r\n max: Math.min(constants.autoFeedbackDelayRange.max, bwicDuration)\r\n }\r\n );\r\n }\r\n return result;\r\n}\r\nfunction validateMinBidIncrementTemplate(template) {\r\n const result = {};\r\n\r\n if (template.minBidIncrement != null) {\r\n result.minBidIncrement = validateNumber(\r\n template.minBidIncrement, {\r\n min: constants.minBidIncrementRange.min,\r\n max: constants.minBidIncrementRange.max\r\n }\r\n );\r\n }\r\n return result;\r\n}\r\n\r\nfunction validateJumpBall(template, bwicDuration) {\r\n const result = {};\r\n\r\n if (template.type === BwicProcessType.JumpBall) {\r\n const settings = template.jumpBall ?? {};\r\n\r\n if (settings.automaticStage1Deadline != null) {\r\n result.jumpBallStage1AutomaticMinutes = validateNumber(\r\n dateTimeUtils.parseTimeSpan(settings.automaticStage1Deadline).totalMinutes,\r\n constants.jumpBall.stage1EndAutoRange\r\n );\r\n }\r\n\r\n if (settings.improvementRound != null) {\r\n result.jumpBallStage2DurationMinutes = validateNumber(\r\n dateTimeUtils.parseTimeSpan(settings.improvementRound).totalMinutes,\r\n constants.jumpBall.stage2DurationRange\r\n );\r\n }\r\n\r\n const stagesDuration = (\r\n dateTimeUtils.parseTimeSpan(settings.automaticStage1Deadline).totalMinutes + dateTimeUtils.parseTimeSpan(settings.improvementRound).totalMinutes);\r\n if (stagesDuration > 0 && bwicDuration < stagesDuration && !values(result).some(r => r)) {\r\n result.jumpBallStage1AutomaticMinutes = result.jumpBallStage2DurationMinutes =\r\n `Total of first and second stages should not be greater than ${bwicDuration}`;\r\n }\r\n\r\n }\r\n\r\n return result;\r\n}\r\n\r\nfunction validateTopX(template, bwicDuration) {\r\n const result = {};\r\n\r\n if (template.type === BwicProcessType.TopX) {\r\n const settings = template.topX ?? {};\r\n\r\n if (settings.automaticStage1Deadline != null) {\r\n result.topXStage1AutomaticMinutes = validateNumber(\r\n dateTimeUtils.parseTimeSpan(settings.automaticStage1Deadline).totalMinutes,\r\n constants.topX.stage1EndAutoRange\r\n );\r\n }\r\n\r\n if (settings.improvementRound != null) {\r\n result.topXStage2DurationMinutes = validateNumber(\r\n dateTimeUtils.parseTimeSpan(settings.improvementRound).totalMinutes,\r\n constants.topX.stage2DurationRange\r\n );\r\n }\r\n\r\n const stagesDuration = (\r\n dateTimeUtils.parseTimeSpan(settings.automaticStage1Deadline).totalMinutes + dateTimeUtils.parseTimeSpan(settings.improvementRound).totalMinutes);\r\n if (stagesDuration > 0 && bwicDuration < stagesDuration && !values(result).some(r => r)) {\r\n result.topXStage1AutomaticMinutes = result.topXStage2DurationMinutes =\r\n `Total of first and second stages should not be greater than ${bwicDuration}`;\r\n }\r\n\r\n }\r\n\r\n return result;\r\n}\r\n\r\nfunction validateBestFootForward(template, bwicDuration) {\r\n const result = {};\r\n\r\n if (template.type === BwicProcessType.BestFootForward) {\r\n const settings = template.bff ?? {};\r\n\r\n if (settings.stage1Deadline != null) {\r\n result.bestFootForwardDurationMinutes = validateNumber(\r\n dateTimeUtils.parseTimeSpan(settings.stage1Deadline).totalMinutes,\r\n constants.bestFootForward.stage1DeadlineRange\r\n );\r\n }\r\n\r\n if (dateTimeUtils.parseTimeSpan(settings.stage1Deadline).totalMinutes > 0 &&\r\n bwicDuration < dateTimeUtils.parseTimeSpan(settings.stage1Deadline).totalMinutes &&\r\n !values(result).some(r => r)) {\r\n result.bestFootForwardDurationMinutes = `Bidding period should not be greater than ${bwicDuration}`;\r\n }\r\n }\r\n\r\n return result;\r\n}\r\n\r\nfunction validateNumber(value, range, lessThanErrorMessage = '', greaterThenErrorMessage = '') {\r\n if (!value || !String(value).trim()) {\r\n return errorMessages.empty;\r\n } else if (!numericUtils.isNumber(value)) {\r\n return errorMessages.invalidValue;\r\n } else if (+value < range.min && lessThanErrorMessage) {\r\n return lessThanErrorMessage;\r\n } else if (+value > range.max && greaterThenErrorMessage) {\r\n return greaterThenErrorMessage;\r\n } else if (+value < range.min || +value > range.max) {\r\n return errorMessages.invalidRange(range.min, range.max);\r\n }\r\n return '';\r\n}\r\n\r\nfunction validateMinBidIncrement(minBidIncrement) {\r\n return validateNumber(minBidIncrement, { min: constants.openBiddingMinBidIncrement, max: constants.openBiddingMaxBidIncrement });\r\n}\r\n\r\nfunction addTemplates(templates) {\r\n return {\r\n type: actionTypes.ADD_TEMPLATES,\r\n templates: templates.map(t => ({ // add defaults\r\n ...t,\r\n cutOffReminder: dateTimeUtils.timeSpan(0, constants.cutOffReminderRangeDefaultMinutes),\r\n autoFeedbackDelay: dateTimeUtils.timeSpan(0, constants.autoFeedbackDelayDefaultMinutes),\r\n\r\n //Live Bidding\r\n liveBidding: {\r\n levelSpecificationType: t.levelSpecificationType || LevelSpecificationType.best,\r\n openBiddingImproverCount: t.openBiddingImproverCount || OpenBiddingImproverCount.top3,\r\n stage1Deadline: t.stage1Deadline || constants.openBiddingDefaultStage1Deadline,\r\n improvementRound: t.improvementRound || constants.openBiddingMinStage2Duration,\r\n minBidIncrement: formatUtils.formatBid(t.minBidIncrement || constants.defaultMinBidIncrement),\r\n },\r\n\r\n // JumpBall\r\n jumpBall: {\r\n improverCount: JumpBallStage2Participants.Top3,\r\n improvementRound: dateTimeUtils.timeSpan(0, constants.jumpBall.stage2DurationDefaultMinutes),\r\n automaticStage1Deadline: dateTimeUtils.timeSpan(0, constants.jumpBall.stage1EndAutoDefaultMinutes),\r\n },\r\n\r\n // TopX\r\n topX: {\r\n improverCount: TopXStage2Participants.Top3,\r\n improvementRound: dateTimeUtils.timeSpan(0, constants.topX.stage2DurationDefaultMinutes),\r\n automaticStage1Deadline: dateTimeUtils.timeSpan(0, constants.topX.stage1EndAutoDefaultMinutes),\r\n },\r\n // BestFootForward\r\n bff: {\r\n stage1Deadline: dateTimeUtils.timeSpan(0, constants.bestFootForward.stage1DeadlineDefaultMinutes),\r\n }\r\n }))\r\n };\r\n}\r\n\r\nfunction selectTemplate(index) {\r\n return (dispatch, getState) => {\r\n const { isValid } = getState().process;\r\n\r\n dispatch({\r\n type: actionTypes.SELECT_TEMPLATE,\r\n index\r\n });\r\n\r\n if (!isValid) {\r\n dispatch(validate());\r\n }\r\n };\r\n}\r\n\r\nfunction reserveLevelsApplyEnabled(enabled) {\r\n return dispatch => {\r\n dispatch({ type: actionTypes.RESERVE_LEVELS_APPLY_ENABLED, enabled });\r\n dispatch(updateTemplateDirty());\r\n };\r\n}\r\n\r\nfunction earlyTradesEnabled(enabled) {\r\n return dispatch => {\r\n dispatch({ type: actionTypes.EARLY_TRADES_ENABLED, enabled });\r\n dispatch(updateTemplateDirty());\r\n };\r\n}\r\n\r\nfunction rulesText(text) {\r\n return dispatch => {\r\n dispatch({ type: actionTypes.RULES_TEXT, text });\r\n dispatch(updateTemplateDirty());\r\n }\r\n}\r\n\r\nfunction setStage1Deadline(value) {\r\n return (dispatch, getState) => {\r\n const {\r\n cutOffReminder,\r\n stage1Deadline\r\n } = getState().process.errors.templates;\r\n\r\n dispatch({ type: actionTypes.SET_STAGE1_DEADLINE, payload: { value } });\r\n dispatch(updateTemplateDirty());\r\n\r\n if (cutOffReminder || stage1Deadline) {\r\n dispatch(validate());\r\n }\r\n }\r\n}\r\n\r\nfunction setImprovementRound(value) {\r\n return dispatch => {\r\n dispatch({ type: actionTypes.SET_IMPROVEMENT_ROUND, payload: { value } });\r\n dispatch(updateTemplateDirty());\r\n }\r\n}\r\n\r\nfunction setMinBidIncrement(value) {\r\n return dispatch => {\r\n dispatch({ type: actionTypes.SET_MIN_BID_INCREMENT, payload: { value } });\r\n dispatch(updateTemplateDirty());\r\n }\r\n}\r\n\r\nfunction setLevelSpecificationType(value) {\r\n return dispatch => {\r\n dispatch({ type: actionTypes.SET_LEVEL_SPECIFICATION_TYPE, payload: { value } });\r\n dispatch(updateTemplateDirty());\r\n }\r\n}\r\n\r\nfunction setOpenBiddingImproverCount(value) {\r\n return dispatch => {\r\n dispatch({ type: actionTypes.SET_OPEN_BIDDING_IMPROVER_COUNT, payload: { value } });\r\n dispatch(updateTemplateDirty());\r\n }\r\n}\r\n\r\nfunction resetStage1DeadlineError() {\r\n return (dispatch, getState) => {\r\n const { errors = {} } = getState().process;\r\n if (errors.templates.stage1Deadline) {\r\n dispatch(validate());\r\n }\r\n\r\n };\r\n}\r\n\r\nfunction resetImprovementRoundError() {\r\n return (dispatch, getState) => {\r\n const { errors = {} } = getState().process;\r\n if (errors.templates.improvementRound) {\r\n dispatch(validate());\r\n }\r\n\r\n };\r\n}\r\n\r\nfunction resetMinBidIncrementError() {\r\n return (dispatch, getState) => {\r\n const { errors = {} } = getState().process;\r\n if (errors.templates.minBidIncrement) {\r\n dispatch(validate());\r\n }\r\n };\r\n}\r\n\r\nfunction resetJumpBallStage2DurationMinutes() {\r\n return (dispatch, getState) => {\r\n const { errors = {} } = getState().process;\r\n if (errors.templates.jumpBallStage2DurationMinutes) {\r\n dispatch(validate());\r\n }\r\n\r\n };\r\n}\r\n\r\nfunction resetTopXStage1AutomaticMinutes() {\r\n return (dispatch, getState) => {\r\n const { errors = {} } = getState().process;\r\n if (errors.templates.topXStage1AutomaticMinutes) {\r\n dispatch(validate());\r\n }\r\n\r\n };\r\n}\r\n\r\nfunction resetTopXStage2DurationMinutes() {\r\n return (dispatch, getState) => {\r\n const { errors = {} } = getState().process;\r\n if (errors.templates.topXStage2DurationMinutes) {\r\n dispatch(validate());\r\n }\r\n\r\n };\r\n}\r\n\r\nfunction resetJumpBallStage1AutomaticMinutes() {\r\n return (dispatch, getState) => {\r\n const { errors = {} } = getState().process;\r\n if (errors.templates.jumpBallStage1AutomaticMinutes) {\r\n dispatch(validate());\r\n }\r\n\r\n };\r\n}\r\n\r\nfunction updateTemplateDirty() {\r\n return (dispatch, getState) => {\r\n const { all, current } = getState().process.templates;\r\n const original = all.find(t => t.id === current.id);\r\n const dirty = !isEqual(original, current)\r\n\r\n dispatch({\r\n type: actionTypes.SET_TEMPLATE_DIRTY_STATE,\r\n dirty\r\n })\r\n }\r\n}\r\n\r\nfunction titleChange(title) {\r\n return { type: actionTypes.TITLE_CHANGE, title };\r\n}\r\n\r\nfunction descriptionChange(description) {\r\n return { type: actionTypes.DESCRIPTION_CHANGE, description };\r\n}\r\n\r\nfunction resetChanges() {\r\n return dispatch => {\r\n dispatch({ type: actionTypes.RESET_CHANGES });\r\n dispatch(validate());\r\n }\r\n}\r\n\r\nfunction reset() {\r\n return { type: actionTypes.RESET };\r\n}\r\n\r\nfunction jumpBallStage1EndManual() {\r\n return dispatch => {\r\n dispatch({ type: actionTypes.JUMP_BALL_STAGE_1_END_MANUAL });\r\n dispatch({ type: actionTypes.RESET_CUT_OFF_REMINDER_MINS });\r\n dispatch(updateTemplateDirty());\r\n dispatch(validate());\r\n }\r\n}\r\n\r\nfunction autoFeedbackDelayChange(minutes) {\r\n return (dispatch, getState) => {\r\n const { autoFeedbackDelay } = getState().process.errors.templates;\r\n\r\n dispatch({ type: actionTypes.AUTO_FEEDBACK_DELAY_MINS, payload: { minutes } });\r\n dispatch(updateTemplateDirty());\r\n\r\n if (autoFeedbackDelay) {\r\n dispatch(validate());\r\n }\r\n };\r\n}\r\n\r\nfunction minBidIncrementChange(value) {\r\n return (dispatch, getState) => {\r\n const { minBidIncrement } = getState().process.errors.templates;\r\n\r\n dispatch({ type: actionTypes.MIN_BID_INCREMENT_CHANGED, payload: { value } });\r\n dispatch(updateTemplateDirty());\r\n\r\n if (minBidIncrement) {\r\n dispatch(validate());\r\n }\r\n };\r\n}\r\n\r\nfunction autoFeedbackDelayEnabled() {\r\n return dispatch => {\r\n dispatch({ type: actionTypes.AUTO_FEEDBACK_DELAY_ENABLED });\r\n dispatch(updateTemplateDirty());\r\n }\r\n\r\n}\r\n\r\nfunction autoFeedbackDelayDisabled() {\r\n return dispatch => {\r\n dispatch({ type: actionTypes.AUTO_FEEDBACK_DELAY_DISABLED });\r\n dispatch(resetAutoFeedbackDelay());\r\n dispatch(updateTemplateDirty());\r\n }\r\n}\r\n\r\nfunction minBidIncrementEnabled() {\r\n return dispatch => {\r\n dispatch({ type: actionTypes.MIN_BID_INCREMENT_ENABLED });\r\n dispatch(updateTemplateDirty());\r\n }\r\n\r\n}\r\n\r\nfunction minBidIncrementDisabled() {\r\n return dispatch => {\r\n dispatch({ type: actionTypes.MIN_BID_INCREMENT_DISABLED });\r\n dispatch(resetMinimumBidIncrement());\r\n dispatch(updateTemplateDirty());\r\n }\r\n}\r\n\r\nfunction cutOffReminderChange(minutes) {\r\n return (dispatch, getState) => {\r\n const {\r\n cutOffReminder,\r\n jumpBallStage1AutomaticMinutes,\r\n topXStage1AutomaticMinutes,\r\n bestFootForwardDurationMinutes\r\n } = getState().process.errors.templates;\r\n\r\n dispatch({ type: actionTypes.CUT_OFF_REMINDER_MINS, payload: { minutes } });\r\n dispatch(updateTemplateDirty());\r\n\r\n if (cutOffReminder ||\r\n jumpBallStage1AutomaticMinutes ||\r\n topXStage1AutomaticMinutes ||\r\n bestFootForwardDurationMinutes) {\r\n dispatch(validate());\r\n }\r\n };\r\n}\r\n\r\nfunction jumpBallStage1EndAuto() {\r\n return dispatch => {\r\n dispatch({ type: actionTypes.JUMP_BALL_STAGE_1_END_AUTO });\r\n dispatch(updateTemplateDirty());\r\n }\r\n}\r\n\r\n\r\nfunction jumpBallStage1EndAutomaticMinutesChange(minutes) {\r\n return (dispatch, getState) => {\r\n const { jumpBallStage1AutomaticMinutes, cutOffReminder, jumpBallStage2DurationMinutes } = getState().process.errors.templates;\r\n dispatch({ type: actionTypes.JUMP_BALL_STAGE_1_END_AUTO_MINS, payload: { minutes } });\r\n dispatch(updateTemplateDirty());\r\n\r\n if (jumpBallStage1AutomaticMinutes || cutOffReminder || jumpBallStage2DurationMinutes) {\r\n dispatch(validate());\r\n }\r\n }\r\n}\r\n\r\nfunction jumpBallStage2ParticipantsChange(participants) {\r\n return dispatch => {\r\n dispatch({ type: actionTypes.JUMP_BALL_STAGE_2_PARTICIPANTS_CHANGE, payload: { participants } });\r\n dispatch(updateTemplateDirty());\r\n }\r\n}\r\n\r\nfunction jumpBallStage2DurationUnspecified() {\r\n return dispatch => {\r\n dispatch({ type: actionTypes.JUMP_BALL_STAGE_2_DURATION_UNSPECIFIED });\r\n dispatch(updateTemplateDirty());\r\n }\r\n}\r\n\r\nfunction jumpBallStage2DurationPreset() {\r\n return dispatch => {\r\n dispatch({ type: actionTypes.JUMP_BALL_STAGE_2_DURATION_PRESET });\r\n dispatch(updateTemplateDirty());\r\n }\r\n}\r\n\r\nfunction jumpBallStage2DurationMinutesChange(minutes) {\r\n return (dispatch, getState) => {\r\n const { jumpBallStage2DurationMinutes, jumpBallStage1AutomaticMinutes } = getState().process.errors.templates;\r\n\r\n dispatch({ type: actionTypes.JUMP_BALL_STAGE_2_DURATION_MINS, payload: { minutes } });\r\n dispatch(updateTemplateDirty());\r\n\r\n if (jumpBallStage2DurationMinutes || jumpBallStage1AutomaticMinutes) {\r\n dispatch(validate());\r\n }\r\n }\r\n}\r\n\r\nfunction resetAutoFeedbackDelay() {\r\n return (dispatch, getState) => {\r\n const { errors = {} } = getState().process;\r\n if (errors.templates.autoFeedbackDelay) {\r\n dispatch(validate());\r\n }\r\n\r\n };\r\n}\r\n\r\nfunction resetMinimumBidIncrement() {\r\n return (dispatch, getState) => {\r\n const { errors = {} } = getState().process;\r\n if (errors.templates.minBidIncrement) {\r\n dispatch(validate());\r\n }\r\n\r\n };\r\n}\r\n\r\n\r\nfunction topXStage1EndManual() {\r\n return dispatch => {\r\n dispatch({ type: actionTypes.TOP_X_STAGE_1_END_MANUAL });\r\n dispatch({ type: actionTypes.RESET_CUT_OFF_REMINDER_MINS });\r\n dispatch(updateTemplateDirty());\r\n dispatch(validate());\r\n }\r\n}\r\n\r\nfunction topXStage1EndAuto() {\r\n return dispatch => {\r\n dispatch({ type: actionTypes.TOP_X_STAGE_1_END_AUTO });\r\n dispatch(updateTemplateDirty());\r\n }\r\n}\r\n\r\nfunction topXStage1EndAutomaticMinutesChange(minutes) {\r\n return (dispatch, getState) => {\r\n const { topXStage1AutomaticMinutes, cutOffReminder, topXStage2DurationMinutes } = getState().process.errors.templates;\r\n dispatch({ type: actionTypes.TOP_X_STAGE_1_END_AUTO_MINS, payload: { minutes } });\r\n dispatch(updateTemplateDirty());\r\n\r\n if (topXStage1AutomaticMinutes || cutOffReminder || topXStage2DurationMinutes) {\r\n dispatch(validate());\r\n }\r\n }\r\n}\r\n\r\nfunction topXStage2ParticipantsChange(participants) {\r\n return dispatch => {\r\n dispatch({ type: actionTypes.TOP_X_STAGE_2_PARTICIPANTS_CHANGE, payload: { participants } });\r\n dispatch(updateTemplateDirty());\r\n }\r\n}\r\n\r\nfunction topXStage2DurationUnspecified() {\r\n return dispatch => {\r\n dispatch({ type: actionTypes.TOP_X_STAGE_2_DURATION_UNSPECIFIED });\r\n dispatch(updateTemplateDirty());\r\n }\r\n}\r\n\r\nfunction topXStage2DurationPreset() {\r\n return dispatch => {\r\n dispatch({ type: actionTypes.TOP_X_STAGE_2_DURATION_PRESET });\r\n dispatch(updateTemplateDirty());\r\n }\r\n}\r\n\r\nfunction topXStage2DurationMinutesChange(minutes) {\r\n return (dispatch, getState) => {\r\n const { topXStage2DurationMinutes, topXStage1AutomaticMinutes } = getState().process.errors.templates;\r\n\r\n dispatch({ type: actionTypes.TOP_X_STAGE_2_DURATION_MINS, payload: { minutes } });\r\n dispatch(updateTemplateDirty());\r\n\r\n if (topXStage2DurationMinutes || topXStage1AutomaticMinutes) {\r\n dispatch(validate());\r\n }\r\n }\r\n}\r\n\r\n\r\n\r\nfunction bestFootForwardDurationMinutesChange(minutes) {\r\n return (dispatch, getState) => {\r\n const { cutOffReminder, bestFootForwardDurationMinutes } = getState().process.errors.templates;\r\n\r\n dispatch({ type: actionTypes.BEST_FOOT_FORWARD_DURATION_MINS, payload: { minutes } });\r\n dispatch(updateTemplateDirty());\r\n\r\n if (cutOffReminder || bestFootForwardDurationMinutes) {\r\n dispatch(validate());\r\n }\r\n }\r\n\r\n\r\n}\r\nfunction resetBestFootForwardDurationMinutes() {\r\n return (dispatch, getState) => {\r\n const { errors = {} } = getState().process;\r\n if (errors.templates.bestFootForwardDurationMinutes) {\r\n dispatch(validate());\r\n }\r\n\r\n };\r\n}\r\n\r\nfunction setAllToAllProtocol(isAllToAll) {\r\n return dispatch => {\r\n dispatch({ type: actionTypes.SET_ALL_TO_ALL_PROTOCOL, payload: isAllToAll });\r\n }\r\n}\r\n\r\n","import { createAction } from 'typesafe-actions';\r\nimport { RequestState } from '../../constants/request-state';\r\nimport { CloSystemInfrastructures } from '../../types/clo-managers/CloSystemInfrastructures';\r\n\r\nconst requestData = createAction(\r\n 'entities/cloSystemInfrastructure/REQUEST',\r\n resolve => (requestState: RequestState) => resolve({ requestState }),\r\n);\r\n\r\nconst responseData = createAction(\r\n 'entities/cloSystemInfrastructure/RESPONSE',\r\n resolve => (requestState: RequestState, cloSystemInfrastructure: CloSystemInfrastructures[]) =>\r\n resolve({ requestState, cloSystemInfrastructure}),\r\n);\r\n\r\nexport const cloSystemInfrastructureActions = {\r\n requestData,\r\n responseData\r\n};\r\n","import { ActionType, createAction } from 'typesafe-actions';\r\nimport { MarketingEvent } from '../types/marketing/MarketingEvent';\r\nimport { News } from '../types/news/News';\r\nimport { NewsQueryParams } from '../types/news/NewsQueryParams';\r\nimport { NewsTabCategory } from '../types/news/enums/NewsTabCategory';\r\nimport { NewsAccessType } from '../types/amr-pipeline/enums/NewsAccessType';\r\n\r\nconst fetchMarketingEventsRequest = createAction('news/FETCH_MARKETING_EVENTS_REQUEST');\r\nconst fetchMarketingEventsResponse = createAction(\r\n 'news/FETCH_MARKETING_EVENTS_RESPONSE',\r\n resolve => (events: MarketingEvent[]) => resolve({ events }),\r\n);\r\n\r\n\r\nconst fetchNewsRequest = createAction('news/FETCH_REQUEST', resolve => (page: number, tab: NewsTabCategory) => resolve({ page, tab }));\r\nconst fetchNewsResponse = createAction(\r\n 'news/FETCH_RESPONSE',\r\n resolve => (news: News[], page: number, tab: NewsTabCategory) => resolve({ news, page, tab }),\r\n);\r\n\r\nconst fetchNewsDetails = createAction(\r\n 'news/FETCH_DETAILS',\r\n resolve => (newsReferenceName: string, queryParams?: NewsQueryParams) =>\r\n resolve({ newsReferenceName, queryParams }),\r\n);\r\n\r\nconst fetchNewsDetailsResponse = createAction(\r\n 'news/FETCH_DETAILS_RESPONSE',\r\n resolve => (news: News) => resolve({ news }),\r\n);\r\n\r\nconst fetchTotalNewsCountRequest = createAction('news/FETCH_TOTAL_NEWS_COUNT_REQUEST');\r\nconst fetchTotalNewsCountResponse = createAction(\r\n 'news/FETCH_TOTAL_NEWS_COUNT_RESPONSE',\r\n resolve => (totalNews: {\r\n [NewsTabCategory.All]: number,\r\n [NewsTabCategory.Primary]: number,\r\n [NewsTabCategory.Secondary]: number,\r\n [NewsTabCategory.Research]: number,\r\n }) => resolve({ totalNews }),\r\n);\r\n\r\nconst deleteNews = createAction(\r\n 'news/DELETE',\r\n resolve => (referenceName: string, page: number, tab: NewsTabCategory) => resolve({ referenceName, page, tab }),\r\n);\r\n\r\nconst deleteSingleNews = createAction(\r\n 'news/DELETE_SINGLE_NEWS',\r\n resolve => (referenceName: string) => resolve({ referenceName }),\r\n);\r\n\r\nconst resetNewsList = createAction('news/RESET_NEWS_LIST');\r\nconst reset = createAction('news/RESET');\r\n\r\nconst logUserActivity = createAction('news/LOG_USER_ACTIVITY', resolve => (accessType: NewsAccessType, link?: string) => resolve({ accessType, link }));\r\n\r\nconst downloadDocument = createAction(\r\n 'news/DOWNLOAD_DOCUMENT',\r\n resolve => (newsReferenceName: string, documentReferenceName: string, fileName: string) =>\r\n resolve({ newsReferenceName, documentReferenceName, fileName })\r\n);\r\n\r\nconst downloadDocuments = createAction(\r\n 'news/DOWNLOAD_DOCUMENTS',\r\n resolve => (newsItem: News) => resolve({ newsItem })\r\n);\r\n\r\nexport type TNewsActions = ActionType<\r\n typeof newsActions[keyof typeof newsActions]\r\n>;\r\n\r\nexport const newsActions = {\r\n fetchNewsRequest,\r\n fetchNewsResponse,\r\n fetchMarketingEventsRequest,\r\n fetchMarketingEventsResponse,\r\n fetchTotalNewsCountRequest,\r\n fetchTotalNewsCountResponse,\r\n fetchNewsDetails,\r\n fetchNewsDetailsResponse,\r\n deleteNews,\r\n deleteSingleNews,\r\n reset,\r\n resetNewsList,\r\n logUserActivity,\r\n downloadDocument,\r\n downloadDocuments,\r\n};\r\n","import { store } from '../store';\r\nimport {\r\n gridActions as actionTypes,\r\n uploadStatus,\r\n constants,\r\n errorMessages,\r\n} from \"../constants\";\r\nimport { arrayUtils, numericUtils, moneyUtils, formatUtils, stringUtils } from '../utils';\r\nimport { gridColumns as columns } from '../constants';\r\nimport * as compareUtils from '../utils/compare.utils';\r\nimport { changeColorActions, changePxTalkActions, errorActions } from './';\r\nimport { Ratings } from '../types/enums/Rating';\r\nimport { requestCancelationController } from '../services/request-cancelation-controller';\r\nimport { history } from '../history';\r\n\r\nexport const gridActions = {\r\n init,\r\n setColumns,\r\n addColumn,\r\n removeColumn,\r\n moveColumnData,\r\n clearCell,\r\n setFocus,\r\n edit,\r\n cancelEdit,\r\n setInitialPosition,\r\n applyEdit,\r\n applyOrCancelEdit,\r\n orderBy,\r\n deleteRow,\r\n deleteDataItemsWithErrors,\r\n deleteFlaggedDataItems,\r\n editing,\r\n addDataItems,\r\n replaceDataItem,\r\n addFileToDataItem,\r\n insertDataItems,\r\n processKeyCode,\r\n selectRow,\r\n showHelp,\r\n hideHelp,\r\n validate,\r\n setUploadState,\r\n reset,\r\n blockInput,\r\n dataProcessing,\r\n parseValue,\r\n addRow,\r\n moveRowUp,\r\n moveRowDown,\r\n clear,\r\n updateDataItemDraftStatus,\r\n updateRowsLimit\r\n}\r\n\r\nfunction init(dataItems, headers, rowsLimit = constants.gridRowsLimit, minDrafts, autoFocus = true) {\r\n return dispatch => {\r\n dispatch(setMountedKey());\r\n dispatch(setColumns(headers));\r\n dispatch(updateRowsLimit(rowsLimit, minDrafts));\r\n\r\n if (dataItems && dataItems.length) {\r\n dispatch(insertDataItems(dataItems));\r\n }\r\n\r\n dispatch(appendDrafts());\r\n\r\n if (autoFocus) {\r\n dispatch(setInitialPosition(dataItems && dataItems.length));\r\n }\r\n\r\n dispatch(showHelp());\r\n }\r\n}\r\n\r\nfunction updateRowsLimit(rowsLimit, minDrafts) {\r\n return {\r\n type: actionTypes.ROWS_LIMIT,\r\n rowsLimit,\r\n minDrafts\r\n };\r\n}\r\n\r\nfunction setMountedKey() {\r\n return {\r\n type: actionTypes.GRID_SET_MOUNTED_KEY,\r\n payload: { key: new Date().getTime() }\r\n }\r\n}\r\n\r\nfunction setColumns(headers) {\r\n return {\r\n type: actionTypes.SETUP_HEADERS,\r\n headers\r\n };\r\n}\r\n\r\nfunction addColumn(column, positionIndex) {\r\n return {\r\n type: actionTypes.ADD_COLUMN,\r\n column,\r\n positionIndex\r\n };\r\n}\r\n\r\nfunction removeColumn(name) {\r\n return {\r\n type: actionTypes.REMOVE_COLUMN,\r\n name\r\n }\r\n}\r\n\r\nfunction replaceDataItem(dataItem, index) {\r\n return {\r\n type: actionTypes.REPLACE_DATA_ITEM,\r\n payload: {\r\n dataItem,\r\n index\r\n }\r\n };\r\n};\r\n\r\nfunction dataItemsLimitError(rowsLimit) {\r\n return errorActions.error(\r\n null,\r\n errorMessages.gridDataItemsLimitExceeded(rowsLimit || constants.gridRowsLimit),\r\n errorMessages.gridDataItemsLimitExceededTitle\r\n );\r\n}\r\n\r\nfunction addDataItems(newItems) {\r\n return (dispatch, getState) => {\r\n const { dataItems = [], rowsLimit } = getState().grid;\r\n const currentItems = dataItems.filter(item => !item.draft);\r\n\r\n if (currentItems.length + newItems.length > rowsLimit) {\r\n return dispatch(dataItemsLimitError(rowsLimit));\r\n }\r\n\r\n dispatch({\r\n type: actionTypes.ADD_DATA_ITEMS,\r\n payload: {\r\n currentItems,\r\n newItems\r\n }\r\n })\r\n };\r\n}\r\n\r\nfunction moveColumnData(fromColumnName, toColumnName) {\r\n return dispatch => {\r\n dispatch(applyOrCancelEdit());\r\n dispatch({\r\n type: actionTypes.MOVE_COLUMN_DATA,\r\n fromColumnName,\r\n toColumnName\r\n });\r\n }\r\n}\r\n\r\nfunction insertDataItems(newItems, index = 0) {\r\n return (dispatch, getState) => {\r\n const { dataItems, rowsLimit } = getState().grid;\r\n const currentItems = dataItems.filter(item => !item.draft);\r\n\r\n if ((currentItems.length + newItems.length) > rowsLimit) {\r\n return dispatch(dataItemsLimitError(rowsLimit));\r\n }\r\n\r\n dispatch({\r\n type: actionTypes.INSERT_DATA_ITEMS,\r\n payload: {\r\n newItems,\r\n index\r\n }\r\n });\r\n };\r\n}\r\n\r\nfunction appendDataItems(dataItems) {\r\n return dispatch => {\r\n dispatch(hideHelp());\r\n dispatch({ type: actionTypes.APPEND_DATA_ITEMS, dataItems });\r\n }\r\n}\r\n\r\nfunction addRow(index) {\r\n return (dispatch, getState) => {\r\n const { headers } = getState().grid;\r\n const empty = createDraftDataItem(headers);\r\n\r\n dispatch(applyOrCancelEdit());\r\n dispatch(insertDataItems([empty], index));\r\n };\r\n}\r\n\r\nfunction moveRowUp(index) {\r\n return dispatch => {\r\n const newIndex = index - 1;\r\n\r\n if (newIndex >= 0) {\r\n dispatch(applyOrCancelEdit());\r\n\r\n dispatch({\r\n type: actionTypes.CHANGE_ROW_ORDER,\r\n payload: {\r\n index,\r\n newIndex\r\n }\r\n });\r\n }\r\n };\r\n}\r\n\r\nfunction moveRowDown(index) {\r\n return (dispatch, getState) => {\r\n const newIndex = index + 1;\r\n if (newIndex < getState().grid.rowsLimit) {\r\n dispatch(applyOrCancelEdit());\r\n\r\n dispatch({\r\n type: actionTypes.CHANGE_ROW_ORDER,\r\n payload: { index, newIndex }\r\n });\r\n }\r\n };\r\n}\r\n\r\nfunction clearCell() {\r\n return (dispatch, getState) => {\r\n const { position, headers, dataItems } = getState().grid;\r\n const header = headers.find(h => h.name === position.columnName);\r\n const dataItem = dataItems[position.index];\r\n\r\n if (canEdit(header, dataItem)) {\r\n if (header.type === 'file') {\r\n dispatch(addFileToDataItem(null, position));\r\n requestCancelationController.abort(history.location.pathname);\r\n }\r\n\r\n dispatch({\r\n type: actionTypes.POSITION_CHANGE,\r\n position: { ...position, editing: true, editingValue: header.initialValue || '' }\r\n });\r\n }\r\n };\r\n}\r\n\r\nfunction setFocus(index, columnName) {\r\n return (dispatch, getState) => {\r\n const { position } = getState().grid;\r\n\r\n if (index !== position.index || columnName !== position.columnName) {\r\n if (position.editing) {\r\n dispatch(applyOrCancelEdit());\r\n }\r\n\r\n dispatch(hideHelp());\r\n dispatch({\r\n type: actionTypes.POSITION_CHANGE,\r\n position: { index, columnName }\r\n });\r\n }\r\n }\r\n}\r\n\r\nfunction edit() {\r\n return (dispatch, getState) => {\r\n const { position, dataItems, headers } = getState().grid;\r\n const header = headers.find(h => h.name === position.columnName);\r\n const dataItem = dataItems[position.index];\r\n\r\n if (canEdit(header, dataItem)) {\r\n const value = dataItem[position.columnName];\r\n const error = dataItem.errors && dataItem.errors.find(e => e.columnName === position.columnName);\r\n\r\n dispatch({\r\n type: actionTypes.POSITION_CHANGE,\r\n position: {\r\n ...position,\r\n editing: true,\r\n editingValue: value,\r\n editingError: error && error.message\r\n }\r\n });\r\n\r\n if (header.pattern) {\r\n const normalized = parseValue(String(value), header);\r\n if (header.pattern && !header.pattern.test(normalized)) {\r\n dispatch(editing(header.defaultValue || ''));\r\n }\r\n }\r\n\r\n if (position.columnName === columns.pxTalks.name) {\r\n dispatch(blockInput(true));\r\n dispatch(changePxTalkActions.init('', dataItem.id, dataItem[columns.ticker.name], value));\r\n } else if (position.columnName === columns.color.name) {\r\n dispatch(blockInput(true));\r\n dispatch(changeColorActions.init(dataItem[columns.ticker.name], value));\r\n }\r\n }\r\n };\r\n}\r\n\r\nfunction canEdit(header, dataItem) {\r\n if (typeof header.readonlyCallback === 'function') {\r\n return !header.readonlyCallback(dataItem);\r\n }\r\n\r\n return !header.readonly;\r\n}\r\n\r\nfunction moveUp() {\r\n return (dispatch, getState) => {\r\n const { position } = getState().grid;\r\n const index = position.index;\r\n\r\n if (index > 0) {\r\n dispatch({\r\n type: actionTypes.POSITION_CHANGE,\r\n position: { index: index - 1, columnName: position.columnName }\r\n });\r\n }\r\n };\r\n}\r\n\r\nfunction moveDown() {\r\n return (dispatch, getState) => {\r\n const { dataItems, position } = getState().grid;\r\n const index = position.index;\r\n\r\n if (index < dataItems.length - 1) {\r\n dispatch({\r\n type: actionTypes.POSITION_CHANGE,\r\n position: { index: index + 1, columnName: position.columnName }\r\n });\r\n }\r\n };\r\n}\r\n\r\nfunction moveLeft(moveNextRow) {\r\n return (dispatch, getState) => {\r\n let { headers, position } = getState().grid;\r\n const index = headers.findIndex(h => h.name === position.columnName);\r\n\r\n if (index > 0) {\r\n dispatch({\r\n type: actionTypes.POSITION_CHANGE,\r\n position: { index: position.index, columnName: headers[index - 1].name }\r\n });\r\n } else if (moveNextRow && position.index > 0) {\r\n dispatch(moveUp());\r\n let { headers, position } = getState().grid;\r\n dispatch({\r\n type: actionTypes.POSITION_CHANGE,\r\n position: { index: position.index, columnName: headers[headers.length - 1].name }\r\n });\r\n }\r\n };\r\n}\r\n\r\nfunction moveRight(moveNextRow) {\r\n return (dispatch, getState) => {\r\n let { headers, position } = getState().grid;\r\n const index = headers.findIndex(h => h.name === position.columnName);\r\n\r\n if (index < headers.length - 1) {\r\n dispatch({\r\n type: actionTypes.POSITION_CHANGE,\r\n position: { index: position.index, columnName: headers[index + 1].name }\r\n });\r\n } else if (moveNextRow) {\r\n dispatch(moveDown());\r\n let { headers, position } = getState().grid;\r\n dispatch({\r\n type: actionTypes.POSITION_CHANGE,\r\n position: { index: position.index, columnName: headers[0].name }\r\n });\r\n\r\n }\r\n };\r\n}\r\n\r\nfunction cancelEdit() {\r\n return (dispatch, getState) => {\r\n const { position } = getState().grid;\r\n\r\n dispatch({\r\n type: actionTypes.POSITION_CHANGE,\r\n position: { index: position.index, columnName: position.columnName }\r\n });\r\n }\r\n}\r\n\r\nfunction setInitialPosition(rowIndex = 0, headerIndex = 0) {\r\n return (dispatch, getState) => {\r\n const { headers } = getState().grid;\r\n\r\n dispatch({\r\n type: actionTypes.POSITION_CHANGE,\r\n position: { index: rowIndex, columnName: headers[headerIndex].name }\r\n });\r\n };\r\n}\r\n\r\nfunction clear() {\r\n return dispatch => {\r\n dispatch(applyOrCancelEdit());\r\n dispatch({ type: actionTypes.CLEAR });\r\n dispatch(appendDrafts());\r\n dispatch(setInitialPosition());\r\n dispatch(validate());\r\n };\r\n}\r\n\r\nfunction updateDataItemDraftStatus(rowIndex) {\r\n return (dispatch, getState) => {\r\n const { dataItems, headers } = getState().grid;\r\n const dataItem = dataItems[rowIndex];\r\n\r\n if (dataItem) {\r\n const draft = headers\r\n .every(h => {\r\n const value = dataItem[h.name];\r\n\r\n if (Array.isArray(h.initialValue)) {\r\n return Array.isArray(value) && value.length === 0;\r\n }\r\n\r\n return (value ?? '') === (h.initialValue ?? '');\r\n });\r\n\r\n dispatch({\r\n type: actionTypes.UPDATE_DRAFT,\r\n rowIndex,\r\n draft\r\n });\r\n }\r\n }\r\n\r\n}\r\n\r\nfunction applyEdit() {\r\n return (dispatch, getState) => {\r\n const { dataItems, position, headers } = getState().grid;\r\n\r\n if (!position || !position.editing) {\r\n return;\r\n }\r\n\r\n const editingHeader = headers.find(h => h.name === position.columnName);\r\n const dataItem = dataItems[position.index];\r\n const editingValue = parseValue(editingHeader.type === 'file' ? dataItem[editingHeader.name] : position.editingValue, editingHeader);\r\n let errors = (dataItem.errors && dataItem.errors.filter(e => e.columnName !== position.columnName)) || [];\r\n\r\n if (position.editingError) {\r\n errors.push({\r\n columnName: position.columnName,\r\n message: position.editingError\r\n });\r\n }\r\n\r\n dispatch({ type: actionTypes.APPLY_EDIT, editingValue, errors });\r\n dispatch(updateDataItemDraftStatus(position.index));\r\n dispatch(appendDrafts());\r\n\r\n const hasColumnDependencies = typeof editingHeader.updateDependencyColumnsCallback === 'function';\r\n if (hasColumnDependencies) {\r\n dispatch(editingHeader.updateDependencyColumnsCallback(position.index));\r\n }\r\n\r\n if (((editingHeader.unique || hasColumnDependencies) &&\r\n dataItem.errors?.find(e => e.columnName === position.columnName)) || editingHeader.headerError) {\r\n dispatch(validate());\r\n }\r\n }\r\n}\r\n\r\nfunction applyOrCancelEdit() {\r\n return (dispatch, getState) => {\r\n const { position, headers } = getState().grid;\r\n const header = headers.find(c => c.name === position.columnName);\r\n\r\n if (position.editing) {\r\n if (header.cancelOnLeave) {\r\n dispatch(cancelEdit());\r\n } else {\r\n dispatch(applyEdit());\r\n }\r\n }\r\n };\r\n}\r\n\r\nfunction parseValue(value, column) {\r\n if (typeof column.parse === 'function') {\r\n return column.parse(value) || value;\r\n } else if (column.type === 'number' || column.type === 'integer') {\r\n if (value === '') {\r\n return undefined;\r\n }\r\n return numericUtils.numberOrDefault(value, value === undefined ? null : value);\r\n } else if (column.type === 'money') {\r\n return moneyUtils.parse(String(value)) || value;\r\n }\r\n\r\n return typeof value === 'string'\r\n ? value.trim()\r\n : value;\r\n}\r\n\r\nfunction orderBy(targetColumnName) {\r\n return (dispatch, getState) => {\r\n if (getState().grid.position.editing) {\r\n dispatch(applyOrCancelEdit());\r\n }\r\n\r\n const { dataItems, orderBy, position, headers } = getState().grid;\r\n\r\n const orderByUpdate = {\r\n columnName: targetColumnName,\r\n direction: orderBy && orderBy.columnName === targetColumnName\r\n ? !orderBy.direction || orderBy.direction === 'asc' ? 'desc' : 'asc'\r\n : 'asc'\r\n };\r\n\r\n const { columnName, direction } = orderByUpdate;\r\n\r\n const column = headers.find(x => x.name === columnName);\r\n\r\n const isNumber = column.type === 'number' || column.type === 'integer';\r\n const isMoney = column.type === 'money';\r\n\r\n const nonDrafts = dataItems.filter(i => !i.draft);\r\n const drafts = dataItems.filter(i => i.draft);\r\n const allSorted = [...getSortedDataItems(nonDrafts), ...drafts];\r\n\r\n dispatch({\r\n type: actionTypes.ORDER_BY,\r\n ordering: { orderBy: orderByUpdate, dataItems: allSorted }\r\n });\r\n\r\n dispatch({\r\n type: actionTypes.POSITION_CHANGE,\r\n position: { ...position, index: 0, columnName: headers[0].name }\r\n });\r\n\r\n function getSortedDataItems(dataItems) {\r\n if (isNumber || isMoney) {\r\n return dataItems.sort(compareNumbers)\r\n } else if (column.name === columns.pxTalks.name) {\r\n return dataItems.sort(comparePxTalks);\r\n } else if (column.name === columns.color.name) {\r\n return dataItems.sort(compareColors);\r\n } else if (column.name === columns.rating.name) {\r\n return dataItems.sort(compareRatings)\r\n }\r\n return dataItems.sort(compareStrings);\r\n }\r\n\r\n function compareNumbers(a, b) {\r\n const valueA = a[columnName];\r\n const valueB = b[columnName];\r\n\r\n return direction === 'asc'\r\n ? compareUtils.compareNumbersWithNullAcs(valueA, valueB)\r\n : compareUtils.compareNumbersWithNullAcs(valueB, valueA);\r\n }\r\n\r\n function compareStrings(a, b) {\r\n const valueA = a[columnName];\r\n const valueB = b[columnName];\r\n\r\n return direction === 'asc'\r\n ? compareUtils.compareStrings(valueA, valueB)\r\n : compareUtils.compareStrings(valueB, valueA);\r\n }\r\n\r\n function comparePxTalks(a, b) {\r\n const valueA = a[columnName];\r\n const valueB = b[columnName];\r\n\r\n if (direction === 'asc') {\r\n const numberA = valueA && valueA.length ? Math.min(...valueA.map(p => p.normalizedLevel)) : Number.MAX_VALUE;\r\n const numberB = valueB && valueB.length ? Math.min(...valueB.map(p => p.normalizedLevel)) : Number.MAX_VALUE;\r\n\r\n return numberA - numberB;\r\n } else {\r\n const numberA = valueA && valueA.length ? Math.max(...valueA.map(p => p.normalizedLevel)) : -1;\r\n const numberB = valueB && valueB.length ? Math.max(...valueB.map(p => p.normalizedLevel)) : -1;\r\n\r\n return numberB - numberA;\r\n }\r\n }\r\n\r\n function compareColors(a, b) {\r\n const valueA = a[columnName] ? formatUtils.formatColor(a[columnName]) : '';\r\n const valueB = b[columnName] ? formatUtils.formatColor(b[columnName]) : '';\r\n\r\n if (direction === 'asc') {\r\n if (valueA && valueB) {\r\n return valueA.localeCompare(valueB);\r\n } else if (valueA && !valueB) {\r\n return Number.MAX_VALUE;\r\n } else {\r\n return Number.MIN_VALUE;\r\n }\r\n }\r\n\r\n return valueB.localeCompare(valueA);\r\n }\r\n\r\n function compareRatings(a, b) {\r\n const valueA = a[columnName];\r\n const valueB = b[columnName];\r\n\r\n if (!Ratings.includes(valueA)) {\r\n return 1;\r\n }\r\n if (!Ratings.includes(valueB)) {\r\n return -1;\r\n }\r\n if (direction === 'asc') {\r\n return compareUtils.compareRating(valueA, valueB);\r\n }\r\n return compareUtils.compareRating(valueB, valueA);\r\n }\r\n }\r\n}\r\n\r\nfunction deleteRow(index) {\r\n return (dispatch, getState) => {\r\n\r\n const { position, dataItems, headers } = getState().grid;\r\n const dataItem = dataItems[index];\r\n\r\n if (position &&\r\n position.index > index &&\r\n position.editing) {\r\n dispatch({\r\n type: actionTypes.POSITION_CHANGE,\r\n position: { ...position, index: position.index - 1 }\r\n });\r\n }\r\n\r\n dispatch({\r\n type: actionTypes.DELETE_ROW,\r\n index\r\n });\r\n\r\n const empty = createDraftDataItem(headers);\r\n dispatch(appendDataItems([empty]));\r\n\r\n if (dataItem.errors &&\r\n dataItem.errors.some(e => headers.some(h => h.unique && h.name === e.columnName))) {\r\n dispatch(validate());\r\n }\r\n };\r\n}\r\n\r\nfunction addFileToDataItem(file, position) {\r\n return (dispatch, getState) => {\r\n const { dataItems } = getState().grid;\r\n\r\n const editingDataItem = dataItems[position.index];\r\n\r\n dispatch(replaceDataItem({...editingDataItem, [position.columnName]: file}, position.index));\r\n dispatch(applyEdit());\r\n }\r\n}\r\n\r\n\r\nfunction editing(value) {\r\n return (dispatch, getState) => {\r\n const { position, dataItems, headers } = getState().grid;\r\n\r\n const editingDataItem = dataItems[position.index];\r\n const error = editingDataItem.errors && editingDataItem.errors.find(e => e.columnName === position.columnName);\r\n\r\n let errorMessage = '';\r\n if (error) { //invalidated\r\n const column = headers.find(h => h.name === position.columnName);\r\n errorMessage =\r\n value === editingDataItem[position.columnName]\r\n ? error.message\r\n : validatePropertyValue(value, column, editingDataItem, dataItems).title;\r\n }\r\n\r\n dispatch({\r\n type: actionTypes.EDITING,\r\n editing: { value, errorMessage }\r\n });\r\n }\r\n}\r\n\r\nfunction createDraftDataItem(headers) {\r\n const draft = { draft: true };\r\n for (const header of headers) {\r\n draft[header.name] = header.initialValue;\r\n }\r\n\r\n return draft;\r\n}\r\n\r\nfunction processKeyCode(keyCode, ctrl, meta, shift, deleteDisabled) {\r\n return (dispatch, getState) => {\r\n const { position, selection, dataItems, inputBlocked, headers } = getState().grid;\r\n\r\n if (inputBlocked) {\r\n return;\r\n }\r\n\r\n const isMovement = !shift && ((keyCode >= 37 && keyCode <= 40) || keyCode === 9);\r\n const moveUpOrDown = isMovement && (keyCode === 38 || keyCode === 40);\r\n const isEnteringValue = !ctrl && !meta && keyCode >= 48 && keyCode <= 90; //0-9, A-Z\r\n dispatch(hideHelp());\r\n\r\n const column = headers.find(h => h.name === position.columnName);\r\n const dataItem = position?.index == null ? undefined : dataItems[position.index];\r\n const readonly = column.readonly || dataItem?.readonly;\r\n\r\n if (!(position && column) && isMovement) {\r\n dispatch(setInitialPosition());\r\n } else {\r\n if ((isMovement || shift) && position.editing) {\r\n if (column.type === 'select' || moveUpOrDown || keyCode === 9) {\r\n dispatch(applyOrCancelEdit());\r\n } else {\r\n return;\r\n }\r\n } else if (isEnteringValue && !position.editing && !readonly) {\r\n dispatch(clearCell());\r\n }\r\n\r\n switch (keyCode) {\r\n case 13: position.editing\r\n ? !column.cancelOnLeave && dispatch(applyEdit())\r\n : !readonly && dispatch(edit());\r\n break;\r\n case 27: dispatch(cancelEdit()); break;\r\n case 37: dispatch(moveLeft()); break;\r\n case 38: shift\r\n ? dispatch(selectTop(selection, position))\r\n : dispatch(moveUp()); break;\r\n case 9: shift\r\n ? dispatch(moveLeft(true))\r\n : dispatch(moveRight(true));\r\n break;\r\n case 39: dispatch(moveRight()); break;\r\n case 40: shift\r\n ? dispatch(selectBottom(selection, position, dataItems.length))\r\n : dispatch(moveDown()); break;\r\n case 8:\r\n case 46: {\r\n if (selection.length && !deleteDisabled) {\r\n dispatch(deleteSelected());\r\n } else if (!readonly && position && !position.editing) {\r\n dispatch(clearCell());\r\n }\r\n break;\r\n }\r\n default:\r\n dispatch({ type: actionTypes.SAME_POSITION });\r\n };\r\n }\r\n }\r\n}\r\n\r\nfunction selectRow(index, ctrl, shift) {\r\n const { selection, position } = store.getState().grid;\r\n if (ctrl) {\r\n const selectedIndex = selection.indexOf(index);\r\n\r\n return selectedIndex >= 0\r\n ? setSelection(arrayUtils.removeAt(selection, selectedIndex))\r\n : setSelection([...new Set([...selection, index])]);\r\n } else if (shift) {\r\n const start = Math.min(index, position.index);\r\n const end = Math.max(index, position.index);\r\n const indexes = arrayUtils.arrayFromRange(start, end);\r\n\r\n return setSelection([...arrayUtils.removeMany(selection, indexes), ...indexes]);\r\n }\r\n\r\n return setSelection([index]);\r\n}\r\n\r\nfunction selectTop(selection, position) {\r\n if (selection.length > 0) {\r\n const lastSelectedIndex = selection[selection.length - 1];\r\n if (lastSelectedIndex > 0) {\r\n const nextIndex = lastSelectedIndex - 1;\r\n const reverse =\r\n selection.indexOf(nextIndex) >= 0 &&\r\n selection.indexOf(lastSelectedIndex + 1) < 0;\r\n\r\n return reverse\r\n ? setSelection(arrayUtils.removeRight(selection)) // reset selection of last selected row\r\n : setSelection([...selection.filter(i => i !== nextIndex), nextIndex]);\r\n }\r\n } else if (position && position.index) {\r\n return setSelection([position.index]);\r\n }\r\n\r\n return { type: actionTypes.SAME_POSITION };\r\n}\r\n\r\nfunction selectBottom(selection, position, limit) {\r\n if (selection.length > 0) {\r\n const lastSelectedIndex = selection[selection.length - 1];\r\n if (lastSelectedIndex < limit - 1) {\r\n const nextIndex = lastSelectedIndex + 1;\r\n const reverse =\r\n selection.indexOf(nextIndex) >= 0 &&\r\n selection.indexOf(lastSelectedIndex - 1) < 0;\r\n\r\n return reverse\r\n ? setSelection(arrayUtils.removeRight(selection)) // reset selection of last selected row\r\n : setSelection([...selection.filter(i => i !== nextIndex), nextIndex]);\r\n }\r\n } else if (position) {\r\n return setSelection([position.index]);\r\n }\r\n\r\n return { type: actionTypes.SAME_POSITION };\r\n}\r\n\r\nfunction setSelection(selection) {\r\n return (dispatch, getState) => {\r\n const { headers, position } = getState().grid;\r\n\r\n if (position.editing) {\r\n dispatch(applyOrCancelEdit());\r\n }\r\n\r\n dispatch({\r\n type: actionTypes.POSITION_CHANGE,\r\n position: {\r\n index: selection.length ? selection[selection.length - 1] : 0,\r\n columnName: headers[0].name\r\n }\r\n });\r\n\r\n dispatch({\r\n type: actionTypes.SET_SELECTION,\r\n selection\r\n });\r\n }\r\n}\r\n\r\nfunction appendDrafts() {\r\n return (dispatch, getState) => {\r\n const { dataItems, headers, rowsLimit, minDrafts } = getState().grid;\r\n\r\n if (dataItems.length < rowsLimit) {\r\n const draftCountToAdd = minDrafts ? calculateMinDraftToAdd(dataItems, minDrafts) : calculateFixedGridDraftToAdd(dataItems, rowsLimit);\r\n\r\n if (draftCountToAdd > 0) {\r\n const draft = createDraftDataItem(headers);\r\n const drafts = Array(draftCountToAdd).fill(draft);\r\n dispatch(appendDataItems(drafts));\r\n }\r\n }\r\n }\r\n\r\n function calculateMinDraftToAdd(dataItems, minDrafts) {\r\n const nonDraftCount = dataItems.filter((i) => !i.draft).length;\r\n\r\n return minDrafts - nonDraftCount;\r\n }\r\n\r\n function calculateFixedGridDraftToAdd(dataItems, rowsLimit) {\r\n return rowsLimit - dataItems.length;\r\n }\r\n}\r\n\r\nfunction deleteSelected() {\r\n return dispatch => {\r\n dispatch({ type: actionTypes.DELETE_SELECTED });\r\n dispatch(setInitialPosition());\r\n dispatch(validate());\r\n }\r\n}\r\n\r\nfunction deleteDataItemsWithErrors() {\r\n return dispatch => {\r\n dispatch(validate());\r\n dispatch({ type: actionTypes.DELETE_INVALID });\r\n dispatch(appendDrafts());\r\n dispatch(validate());\r\n }\r\n}\r\n\r\nfunction deleteFlaggedDataItems() {\r\n return dispatch => {\r\n dispatch({ type: actionTypes.DELETE_FLAGGED });\r\n dispatch(appendDrafts());\r\n dispatch(validate());\r\n }\r\n}\r\n\r\nfunction validate() {\r\n return (dispatch, getState) => {\r\n const { position } = getState().grid;\r\n\r\n if (position.editing) {\r\n dispatch(applyOrCancelEdit());\r\n }\r\n\r\n const { dataItems, headers } = getState().grid;\r\n\r\n const drafts = dataItems.filter(s => s.draft);\r\n const dirty = dataItems.filter(s => !s.draft);\r\n\r\n const validationResult = dirty.map(s =>\r\n validateDataItem(\r\n headers,\r\n { ...s },\r\n dirty)\r\n );\r\n\r\n const validatedHeaders = validateHeaders(headers, dataItems);\r\n\r\n const isValid =\r\n validatedHeaders.every(h => !h.headerError) &&\r\n validationResult.length > 0 &&\r\n validationResult.every(s => s.errors.length === 0);\r\n\r\n validationResult.push(...drafts);\r\n\r\n dispatch({\r\n type: actionTypes.VALIDATE,\r\n validation: {\r\n headers: validatedHeaders,\r\n dataItems: validationResult,\r\n isValid\r\n }\r\n });\r\n };\r\n}\r\n\r\nfunction validateHeaders(headers, dataItems) {\r\n return headers.map(column => {\r\n if (typeof column.validateHeader === 'function') {\r\n return { ...column, headerError: column.validateHeader(dataItems) }\r\n }\r\n return column;\r\n })\r\n}\r\n\r\nfunction validateDataItem(headers, dataItem, dataItems) {\r\n dataItem.errors = headers\r\n .map(h => {\r\n const message = validatePropertyValue(dataItem[h.name], h, dataItem, dataItems);\r\n return message.title ? { columnName: h.name, message: message.title, isDuplicated: message.isDuplicated } : null;\r\n })\r\n .filter(e => e);\r\n\r\n return dataItem;\r\n}\r\n\r\nfunction validatePropertyValue(value, column, dataItem, dataItems) {\r\n const title = column.titleForError || column.title;\r\n if (column.required && (value == null || value.length === 0)) {\r\n const { required = '' } = column.errorMessages || {};\r\n return { title: required || `${title} is required` };\r\n }\r\n\r\n if (typeof column.validate === 'function') {\r\n const error = column.validate(value, dataItem, dataItems);\r\n if (error) {\r\n return { title: error };\r\n }\r\n }\r\n\r\n if (!stringUtils.isNullOrEmpty(value)) {\r\n if (column.type === 'number' || column.type === 'money' || column.type === 'integer') {\r\n const number = parseValue(value, column);\r\n if (!numericUtils.isNumber(number)) {\r\n return { title: `${title} should be a number` };\r\n }\r\n\r\n if (column.type === 'integer' && !/^[0-9]*$/.test(number)) {\r\n return { title: `${title} should be an integer number` };\r\n }\r\n\r\n const min = typeof column.min === 'function' ? column.min(dataItem) : column.min;\r\n const max = typeof column.max === 'function' ? column.max(dataItem) : column.max;\r\n\r\n if (min != null && max != null) {\r\n if (number < min || number > max) {\r\n return { title: `${title} should be in the range of ${column.format(min)} to ${column.format(max)}` };\r\n }\r\n } else if (min != null && number < min) {\r\n return { title: `${title} should be greater than or equal to ${column.format(min)}` };\r\n } else if (max != null && number > max) {\r\n return { title: `${title} should be less than or equal to ${column.format(max)}` };\r\n }\r\n }\r\n\r\n if (column.length && value.length > column.length) {\r\n return { title: `${title} can be ${column.length} characters max` };\r\n }\r\n\r\n if (column.pattern && !column.pattern.test(String(parseValue(value, column)))) {\r\n return { title: `${title} is invalid` };\r\n }\r\n\r\n if (column.unique) {\r\n const duplicates =\r\n dataItems.filter(item =>\r\n String(value).localeCompare(\r\n item[column.name] || '',\r\n undefined,\r\n { sensitivity: 'accent' }) === 0);\r\n\r\n if (duplicates.length > 1) {\r\n return { title: `${title} is not unique`, isDuplicated: true };\r\n }\r\n }\r\n\r\n let source = column.selectSourceItemsCallback ? column.selectSourceItemsCallback() : [];\r\n const { contactsSave } = store.getState();\r\n if (column.name === columns.company.name) {\r\n source = contactsSave.companies.map(c => c.name);\r\n } else if (column.name === columns.ticker.name) {\r\n if (value.length > columns.ticker.length || !isTickerValid(value)) {\r\n return { title: `${title} is invalid` };\r\n }\r\n }\r\n\r\n if (source.length) {\r\n const errorMessage = validateRange(column.name, value, source);\r\n if (errorMessage) {\r\n return { title: errorMessage };\r\n }\r\n }\r\n }\r\n\r\n return { title: '' };\r\n}\r\n\r\nfunction isTickerValid(ticker) {\r\n const index = ticker.lastIndexOf(' ');\r\n return index > 0 && index < ticker.length - 1;\r\n}\r\n\r\nfunction validateRange(columnName, value, allowedValues) {\r\n const isValid = allowedValues.some(a =>\r\n String(a.key ?? a).localeCompare(value, undefined, { sensitivity: 'accent' }) === 0);\r\n\r\n if (!isValid) {\r\n return `${columnName} is not valid`;\r\n }\r\n}\r\n\r\nfunction showHelp() {\r\n return { type: actionTypes.SHOW_HELP };\r\n}\r\n\r\nfunction hideHelp() {\r\n return (dispatch, getState) => {\r\n const { showHelp } = getState().grid;\r\n\r\n if (showHelp) {\r\n dispatch({ type: actionTypes.HIDE_HELP });\r\n }\r\n }\r\n}\r\n\r\nfunction setUploadState(status, progress = 0, filename) {\r\n return (dispatch, getState) => {\r\n const { upload } = getState().grid;\r\n\r\n if (upload.status !== uploadStatus.uploading ||\r\n upload.progress === 100 ||\r\n status === uploadStatus.uploading) {\r\n dispatch({\r\n type: actionTypes.DATA_ITEMS_UPLOAD_STATE,\r\n state: { status, progress: Math.floor(progress), filename }\r\n });\r\n }\r\n };\r\n}\r\n\r\nfunction reset() {\r\n return { type: actionTypes.RESET };\r\n}\r\n\r\nfunction blockInput(block) {\r\n return (dispatch, getState) => {\r\n const { inputBlocked } = getState().grid;\r\n\r\n if (inputBlocked !== block) {\r\n dispatch({\r\n type: actionTypes.BLOCK_INPUT,\r\n block\r\n })\r\n }\r\n };\r\n}\r\n\r\nfunction dataProcessing(isDataProcessing) {\r\n return {\r\n type: actionTypes.DATA_PROCESSING,\r\n isDataProcessing\r\n };\r\n}\r\n","import { errorActions as actionTypes, errorMessages } from '../constants';\r\nimport { logger } from '../logging/logger';\r\nimport { jsonUtils } from '../utils';\r\nimport { notificationActions } from './notification.actions';\r\n\r\nexport const errorActions = {\r\n criticalError,\r\n error,\r\n unexpectedError,\r\n resetError,\r\n isRequestCancelationError\r\n};\r\n\r\nfunction criticalError(error) {\r\n if (isRequestCancelationError(error)) {\r\n return {\r\n type: actionTypes.REQUEST_CANCELATION_ERROR,\r\n error\r\n };\r\n }\r\n\r\n return {\r\n type: actionTypes.CRITICAL_ERROR,\r\n error\r\n };\r\n}\r\n\r\nexport function isRequestCancelationError(error) {\r\n return error && error.name === 'AbortError';\r\n}\r\n\r\nfunction error(error, message, caption) {\r\n if (isRequestCancelationError(error)) {\r\n return {\r\n type: actionTypes.REQUEST_CANCELATION_ERROR,\r\n error\r\n };\r\n } else if (error && +error.status === 401) {\r\n return criticalError(error);\r\n }\r\n\r\n const errorJson = error && error.message && jsonUtils.tryParse(error.message);\r\n message = (errorJson && errorJson.error) || (error && error.message) || message;\r\n caption = (errorJson && errorJson.title) || caption;\r\n\r\n const isModal = (errorJson && errorJson.displayInModal) || false;\r\n const refreshButtonVisible = Boolean(errorJson && errorJson.refreshButtonVisible);\r\n\r\n logger.exception(message, error);\r\n\r\n return isModal\r\n ? notificationActions.notificationAddErrorMessageModal(message, caption || errorMessages.error, refreshButtonVisible)\r\n : notificationActions.notificationAddErrorMessage(message, caption || errorMessages.error);\r\n}\r\n\r\nfunction unexpectedError(err) {\r\n return error(err, errorMessages.unexpectedError);\r\n}\r\n\r\nfunction resetError() {\r\n return { type: actionTypes.ERROR_RESET }\r\n}\r\n","import { createAction } from 'typesafe-actions';\r\n\r\nconst reset = createAction('ui/table/RESET');\r\nconst hoverChange = createAction('ui/table/HOVER',\r\n resolve => (rowKey: string, hover: boolean) => resolve({ rowKey, hover })\r\n);\r\nconst expandedChange = createAction('ui/table/EXPANDED',\r\n resolve => (rowKey: string, expanded: boolean) => resolve({ rowKey, expanded })\r\n);\r\nconst resetExpanded = createAction('ui/table/RESET_EXPANDED');\r\n\r\nconst sortByChange = createAction('ui/table/SORT_BY',\r\n resolve => (tableKey: string, sortBy: string, sortDirection: string, sortingType: string) =>\r\n resolve({ tableKey, sortBy, sortDirection, sortingType })\r\n);\r\n\r\nexport const tableActions = {\r\n hoverChange,\r\n expandedChange,\r\n resetExpanded,\r\n sortByChange,\r\n reset\r\n};\r\n","import { createAction } from 'typesafe-actions';\r\nimport { AgencyRatings } from '../types/models/rating/AgencyRatings';\r\nimport { RatingMap } from '../types/models/rating/RatingMap';\r\nimport { BwicPositionBase } from '../types/bwic/BwicPositionBase';\r\nimport { InventoryPosition } from '../types/inventory/InventoryPosition';\r\n\r\nconst securityDetailsReset = createAction('securityDetails/RESET');\r\nconst securityDetailsInitRequest = createAction('securityDetails/INIT_REQUEST',\r\n resolve => (security: BwicPositionBase | InventoryPosition, fetchAgencyRatings?: boolean) =>\r\n resolve({ security, fetchAgencyRatings })\r\n);\r\nconst securityDetailsInitSuccess = createAction('securityDetails/INIT_SUCCESS',\r\n resolve => (ratings: AgencyRatings, mappings: RatingMap[]) =>\r\n resolve({ ratings, mappings })\r\n);\r\nconst securityDetailsInitFailure = createAction('securityDetails/INIT_FAILURE',\r\n resolve => (error: string) => resolve({ error })\r\n);\r\n\r\nexport const securityDetailsActions = {\r\n securityDetailsInitRequest,\r\n securityDetailsInitFailure,\r\n securityDetailsInitSuccess,\r\n securityDetailsReset\r\n}\r\n","import { createAction } from 'typesafe-actions';\r\nimport { RequestState } from '../constants/request-state';\r\nimport { SettlementAgentAgreement } from '../types/bid-as-dealer/SettlementAgentAgreement';\r\n\r\nconst request = createAction('entities/settlement-agent-agreements/REQUEST');\r\nconst requestResult = createAction('entities/settlement-agent-agreements/REQUEST_RESULT',\r\n resolve => (requestState: RequestState, result: SettlementAgentAgreement[] = []) =>\r\n resolve({ requestState, result })\r\n);\r\nconst pushDataReceived = createAction(\r\n 'entities/settlement-agent-agreements/PUSH_DATA_RECEIVED',\r\n resolve => (agreement: SettlementAgentAgreement) => resolve({ agreement })\r\n);\r\nconst resetEntities = createAction('entities/settlement-agent-agreements/RESET');\r\n\r\nexport const settlementAgentAgreementActions = {\r\n request,\r\n requestResult,\r\n pushDataReceived,\r\n resetEntities\r\n};\r\n","import { createAction } from \"typesafe-actions\";\r\nimport { Contact } from '../types/company/Contact';\r\nimport { SaveContactModel } from '../types/company/Contact';\r\n\r\nconst setDealerExpanded = createAction(\r\n 'dealer-list/SET_DEALER_EXPANDED',\r\n resolve => (dealerId: number) => resolve({ dealerId })\r\n);\r\nconst expandDealers = createAction(\r\n 'dealer-list/SET_DEALER_EXPANDED_ALL',\r\n resolve => (dealers: { [key: number]: boolean }, expandedAll: boolean) => resolve({ dealers, expandedAll })\r\n);\r\nconst toggleExpandedAllDealers = createAction('dealer-list/TOGGLE_EXPAND_ALL_DEALERS');\r\nconst setExpandAllDealers = createAction('dealer-list/SET_EXPAND_ALL_DEALERS',\r\n resolve => (expandedAll: boolean) => resolve(expandedAll)\r\n);\r\nconst setEditableContact = createAction(\r\n 'dealer-list/SET_EDITABLE_CONTACT',\r\n resolve => (contact: Contact, dealerName?: string) => resolve({ contact, dealerName })\r\n);\r\nconst editableContactUpdateDealer = createAction(\r\n 'dealer-list/EDITABLE_CONTACT_UPDATE_DEALER',\r\n resolve => (dealerName: string) => resolve({ dealerName })\r\n);\r\nconst editableContactSave = createAction(\r\n 'dealer-list/EDITABLE_CONTACT_SAVE',\r\n resolve => (contact: SaveContactModel) => resolve({ contact })\r\n);\r\nconst editableContactSetRequestStatus = createAction(\r\n 'dealer-list/EDITABLE_CONTACT_SET_REQUEST_STATUS',\r\n resolve => (requestStatus: boolean) => resolve({ requestStatus })\r\n);\r\nconst deleteContact = createAction(\r\n 'dealer-list/DELETE_CONTACT',\r\n resolve => (contactId: number) => resolve({ contactId })\r\n);\r\nconst contactInviteToJoin = createAction(\r\n 'dealer-list/CONTACT_INVITE_TO_JOIN',\r\n resolve => (contactId: number) => resolve({ contactId })\r\n);\r\nconst distributionListInviteToJoin = createAction(\r\n 'dealer-list/DISTRIBUTION_LIST_INVITE_TO_JOIN',\r\n resolve => (dealerId: number) => resolve({ dealerId })\r\n);\r\nconst headOfTradingInviteToJoin = createAction(\r\n 'dealer-list/HEAD_OF_TRADING_INVITE_TO_JOIN',\r\n resolve => (dealerId: number) => resolve({ dealerId })\r\n);\r\nconst contactInviteToJoinSetRequestStatus = createAction(\r\n 'dealer-list/CONTACT_INVITE_TO_JOIN_SET_REQUEST_STATUS',\r\n resolve => (contactId: number, requestStatus: boolean) => resolve({ contactId, requestStatus })\r\n);\r\nconst resetEditableContact = createAction('dealer-list/RESET_EDITABLE_CONTACT');\r\nconst reset = createAction('dealer-list/RESET');\r\n\r\nexport const dealerListActions = {\r\n setDealerExpanded,\r\n expandDealers,\r\n toggleExpandedAllDealers,\r\n setExpandAllDealers,\r\n setEditableContact,\r\n editableContactUpdateDealer,\r\n editableContactSave,\r\n editableContactSetRequestStatus,\r\n resetEditableContact,\r\n deleteContact,\r\n contactInviteToJoin,\r\n distributionListInviteToJoin,\r\n headOfTradingInviteToJoin,\r\n contactInviteToJoinSetRequestStatus,\r\n reset\r\n};\r\n","import { saveAs } from 'file-saver';\r\nimport { cloneDeep, noop } from 'lodash';\r\nimport { portfolioActions as actionTypes, routes } from '../constants';\r\nimport { controlPanelActions, errorActions, rulesActions, searchSecuritiesActions } from '.';\r\nimport { portfolioService } from '../services/portfolio.service';\r\nimport { apiUtils } from '../utils';\r\nimport { securityDetailsActions } from './security.details.actions';\r\nimport { portfolioListActions } from './portfolio-list.actions';\r\nimport { getPortfolios } from '../selectors/portfolio.selector';\r\nimport { createFilterActions } from \"./filter.actions\";\r\nimport { BwicFilterType } from \"../types/filters/FilterState\";\r\nimport {\r\n identifiers, multipleCurrencies, ratings, dealsLegalNames, collateralTypes, collateralManagers, esg, euCompliance,\r\n staticDeals, nonCallEndFrom, nonCallEndTo, reinvestmentEndFrom, reinvestmentEndTo, dateFrom, dateTo, trustees, amr, outOfRI, outOfNC\r\n} from \"../utils/filtering/serializers/serializer.definitions\";\r\nimport { queryStringSerializer } from \"../utils/filtering\";\r\nimport { convertToApiCriteria, getYearsRange } from '../utils/filtering/filter.utils';\r\nimport { selectedDateOptions } from \"../utils/amr-pipeline-filter.utils\";\r\nimport { bwicLogActions } from './bwic-log.actions';\r\nimport { history } from '../history';\r\nimport { emailPreferencesActions } from './email-preferences.actions';\r\nimport { latestTransactionActions } from './entities/latest-transaction.actions';\r\nimport { arrangersPipelineActions } from './entities/arrangers-pipeline.actions';\r\n\r\nconst filterActions = createFilterActions(BwicFilterType.Portfolio);\r\n\r\nexport const portfolioActions = {\r\n applyFilter,\r\n reset,\r\n togglePortfolioExpanded,\r\n portfolioSelectionChange,\r\n deletePortfolioConfirmation,\r\n deletePortfolio,\r\n portfolioSecuritySelectionChange,\r\n showBwicDetails,\r\n resetRowSelection,\r\n newPortfolioDialog,\r\n newPortfolio,\r\n exportAll,\r\n createBwicConfirmed,\r\n expandAllChange,\r\n updatePortfoliosAlertStatus,\r\n hideActivePanels,\r\n applySearchInput,\r\n resetFilter,\r\n advancedFilterBlocked\r\n}\r\n\r\nfunction applyFilter() {\r\n return (dispatch) => {\r\n dispatch(filterActions.applyFilter());\r\n dispatch(redirectWithFilterArguments());\r\n }\r\n}\r\n\r\nfunction applySearchInput() {\r\n return dispatch => {\r\n dispatch(hideActivePanels());\r\n dispatch(redirectWithFilterArguments());\r\n }\r\n}\r\n\r\nfunction resetFilter() {\r\n return dispatch => {\r\n dispatch(filterActions.resetFiltersAndUnselectSavedFilter());\r\n dispatch(redirectWithFilterArguments());\r\n dispatch(filterActions.applyFilter());\r\n }\r\n}\r\n\r\nfunction redirectWithFilterArguments() {\r\n return (dispatch, getState) => {\r\n const { filters, searchSecurities } = getState();\r\n const filterCriteria = getFilterCriteria(filters.portfolio.filter, searchSecurities?.searchTermItems);\r\n const serializers = [\r\n identifiers(),\r\n ratings(),\r\n multipleCurrencies(),\r\n dealsLegalNames(),\r\n collateralTypes(),\r\n collateralManagers(),\r\n esg(),\r\n euCompliance(),\r\n staticDeals(),\r\n nonCallEndFrom(),\r\n nonCallEndTo(),\r\n reinvestmentEndFrom(),\r\n reinvestmentEndTo(),\r\n dateFrom(noop, 'maturityFrom'),\r\n dateTo(noop, 'maturityTo'),\r\n dateFrom(noop, 'vintageFrom'),\r\n dateTo(noop, 'vintageTo'),\r\n dateFrom(noop, 'closingFrom'),\r\n dateTo(noop, 'closingTo'),\r\n trustees(),\r\n amr(),\r\n outOfNC(),\r\n outOfRI(),\r\n ];\r\n const queryString = queryStringSerializer.serialize(filterCriteria, serializers);\r\n history.replace(`${history.location.pathname}${queryString ? '?' : ''}${queryString}`);\r\n };\r\n}\r\n\r\nfunction getFilterCriteria(filter, searchTermItems) {\r\n const nonCallEndYears = getYearsRange(filter.nonCallEnd);\r\n const reinvestmentEndYears = getYearsRange(filter.reinvestmentEnd);\r\n\r\n const nonCallEndDateRange = selectedDateOptions(filter.nonCallEnd);\r\n const reinvestmentEndDateRange = selectedDateOptions(filter.reinvestmentEnd);\r\n\r\n const defaultDateRange = { dateFrom: undefined, dateTo: undefined };\r\n\r\n const maturityRange = filter.maturity.filter.selectedOption\r\n ? convertToApiCriteria(filter.maturity.filter.selectedOption, filter.maturity.filter.options)\r\n : defaultDateRange;\r\n const vintageRange = filter.vintage.filter.selectedOption\r\n ? convertToApiCriteria(filter.vintage.filter.selectedOption, filter.vintage.filter.options)\r\n : defaultDateRange;\r\n const closingRange = filter.closing.filter.selectedOption\r\n ? convertToApiCriteria(filter.closing.filter.selectedOption, filter.closing.filter.options)\r\n : defaultDateRange;\r\n\r\n return {\r\n isinCusipsAndTickers: searchTermItems,\r\n currency: filter.currency?.filter.filter(f => f.selected).map(f => f.value),\r\n ratings: filter.ratings?.filter.filter(f => f.selected).map(f => f.value),\r\n dealsLegalNames: filter.dealName?.filter.filter(f => f.selected).map(f => f.value),\r\n collateralTypes: filter.collateralType?.filter.filter(f => f.selected).map(f => f.value),\r\n collateralManagers: filter.managers?.filter.filter(f => f.selected).map(f => f.value),\r\n esg: filter.esg?.filter.selectedOption,\r\n euCompliance: filter.euCompliance?.filter.selectedOption,\r\n staticDeals: filter.staticDeal?.filter.selectedOption,\r\n nonCallEndFrom: nonCallEndYears.from ?? nonCallEndDateRange.from,\r\n nonCallEndTo: nonCallEndYears.to ?? nonCallEndDateRange.to,\r\n nonCallEndFromDate: nonCallEndDateRange.from,\r\n nonCallEndToDate: nonCallEndDateRange.to,\r\n reinvestmentEndFrom: reinvestmentEndYears.from ?? reinvestmentEndDateRange.from,\r\n reinvestmentEndTo: reinvestmentEndYears.to ?? reinvestmentEndDateRange.to,\r\n reinvestmentEndFromDate: reinvestmentEndDateRange.from,\r\n reinvestmentEndToDate: reinvestmentEndDateRange.to,\r\n maturityFrom: maturityRange.dateFrom,\r\n maturityTo: maturityRange.dateTo,\r\n vintageFrom: vintageRange.dateFrom,\r\n vintageTo: vintageRange.dateTo,\r\n closingFrom: closingRange.dateFrom,\r\n closingTo: closingRange.dateTo,\r\n trustees: filter.trustees?.filter.filter(f => f.selected).map(f => f.value),\r\n amr: filter.amr?.filter.selectedOption,\r\n outOfNC: filter.outOfNC?.filter.selectedOption,\r\n outOfRI: filter.outOfRI?.filter.selectedOption,\r\n }\r\n}\r\n\r\nfunction reset() {\r\n return dispatch => {\r\n dispatch(filterActions.resetFiltersAndUnselectSavedFilter());\r\n dispatch({ type: actionTypes.RESET });\r\n dispatch(searchSecuritiesActions.reset());\r\n dispatch(errorActions.resetError());\r\n dispatch(controlPanelActions.hide());\r\n dispatch(latestTransactionActions.reset());\r\n dispatch(arrangersPipelineActions.reset());\r\n };\r\n}\r\n\r\nfunction togglePortfolioExpanded(portfolioId) {\r\n return (dispatch, getState) => {\r\n dispatch({\r\n type: actionTypes.EXPANDED_CHANGE,\r\n portfolioId\r\n });\r\n\r\n const { expandedState, expandAll } = getState().portfolio;\r\n const filteredPortfolios = getPortfolios(getState());\r\n\r\n if (filteredPortfolios.every(p => getExpandedState(p.id) !== expandAll)) {\r\n dispatch(expandAllChange(!expandAll, expandedState));\r\n }\r\n\r\n function getExpandedState(portfolioId) {\r\n return expandedState[portfolioId] == null ? true : expandedState[portfolioId];\r\n }\r\n };\r\n}\r\n\r\nfunction portfolioSelectionChange(portfolioId, selectAll) {\r\n return (dispatch, getState) => {\r\n const portfolio = getPortfolios(getState()).find(p => p.id === portfolioId);\r\n\r\n if (!portfolio) return;\r\n\r\n const selectedState = {\r\n ...getState().portfolio.selectedState,\r\n [portfolioId]: {\r\n selectAll,\r\n securitiesSelectedState: selectAll\r\n ? apiUtils.normalize(portfolio.securities, p => p.id, () => true)\r\n : {}\r\n }\r\n };\r\n\r\n dispatch({\r\n type: actionTypes.PORTFOLIO_SELECTED_CHANGE,\r\n selectedState\r\n });\r\n }\r\n}\r\n\r\nfunction portfolioSecuritySelectionChange(portfolioId, portfolioSecurityId, selected) {\r\n return (dispatch, getState) => {\r\n const portfolio = getState().entities.portfolios.items.find(p => p.id === portfolioId);\r\n\r\n if (!portfolio) return;\r\n\r\n const currentSelectedState = getState().portfolio.selectedState;\r\n const portfolioSelectedState = currentSelectedState[portfolioId]\r\n ? { ...currentSelectedState[portfolioId] }\r\n : { securitiesSelectedState: {} };\r\n\r\n const checkSelectedState = selected =>\r\n portfolio.securities.every(s => Boolean(portfolioSelectedState.securitiesSelectedState[s.id]) === selected)\r\n\r\n portfolioSelectedState.securitiesSelectedState[portfolioSecurityId] = selected;\r\n portfolioSelectedState.selectAll = checkSelectedState(true)\r\n ? true\r\n : checkSelectedState(false) ? false : !!portfolioSelectedState.selectAll;\r\n\r\n const selectedState = {\r\n ...currentSelectedState,\r\n [portfolioId]: portfolioSelectedState\r\n };\r\n\r\n dispatch({\r\n type: actionTypes.PORTFOLIO_SELECTED_CHANGE,\r\n selectedState\r\n });\r\n }\r\n}\r\n\r\nfunction deletePortfolioConfirmation(visible, portfolio) {\r\n if (visible) {\r\n return {\r\n type: actionTypes.DELETE_PORTFOLIO_CONFIRMATION,\r\n confirmation: {\r\n visible,\r\n portfolio\r\n }\r\n };\r\n }\r\n\r\n return {\r\n type: actionTypes.DELETE_PORTFOLIO_CONFIRMATION,\r\n confirmation: {}\r\n };\r\n}\r\n\r\nfunction deletePortfolio(portfolioId) {\r\n return (dispatch, getState) => {\r\n dispatch(deletePortfolioConfirmation());\r\n portfolioService\r\n .deletePortfolio(portfolioId)\r\n .then(deleted)\r\n .catch(e => dispatch(errorActions.unexpectedError(e)));\r\n\r\n function deleted() {\r\n dispatch(portfolioListActions.deletePortfolio(portfolioId));\r\n const { securityDetails, entities } = getState();\r\n\r\n if (securityDetails.security &&\r\n !entities.portfolios.items.some(p => p.securities.some(s => s.id === securityDetails.security.id))) {\r\n dispatch(securityDetailsActions.securityDetailsReset());\r\n }\r\n\r\n if (securityDetails.security &&\r\n !entities.portfolios.items.some(p => p.securities.some(s => s.id === bwicLogActions.security.id))) {\r\n dispatch(bwicLogActions.bwicLogReset());\r\n }\r\n }\r\n }\r\n}\r\n\r\nfunction showBwicDetails(selectedSecurity, currentBwicHistoryItem) {\r\n return {\r\n type: actionTypes.SHOW_BWIC_DETAILS,\r\n currentBwicHistoryItem,\r\n selectedSecurity\r\n };\r\n}\r\n\r\nfunction resetRowSelection() {\r\n return { type: actionTypes.SHOW_BWIC_DETAILS }\r\n}\r\n\r\nfunction newPortfolioDialog(visible) {\r\n return {\r\n type: actionTypes.NEW_PORTFOLIO_DIALOG,\r\n newPortfolio: { visible }\r\n };\r\n}\r\n\r\nfunction newPortfolio(title) {\r\n return dispatch => {\r\n dispatch(newPortfolioDialog(false));\r\n portfolioService\r\n .createPortfolio(title)\r\n .then(({ referenceName }) => history.push(routes.editPortfolioUrl(referenceName)))\r\n .catch(e => dispatch(errorActions.unexpectedError(e)));\r\n };\r\n}\r\n\r\nfunction setPortfolioExportingStatus(status) {\r\n return { type: actionTypes.PORTFOLIO_SET_IS_REQUESTING_EXPORT, payload: { status } }\r\n}\r\n\r\nfunction exportAll() {\r\n return (dispatch, getState) => {\r\n const { filters, searchSecurities } = getState();\r\n const filterCriteria = getFilterCriteria(filters.portfolio.filter, searchSecurities?.searchTermItems);\r\n filterCriteria.identifiers = filterCriteria.isinCusipsAndTickers;\r\n filterCriteria.currency = filterCriteria.currency.length === 1 ? filterCriteria.currency[0] : undefined;\r\n filterCriteria.nonCallEndFromYear = filterCriteria.nonCallEndFromDate ? undefined : filterCriteria.nonCallEndFrom;\r\n filterCriteria.nonCallEndToYear = filterCriteria.nonCallEndToDate ? undefined : filterCriteria.nonCallEndTo;\r\n filterCriteria.reinvestmentEndFromYear = filterCriteria.reinvestmentEndFromDate ? undefined : filterCriteria.reinvestmentEndFrom;\r\n filterCriteria.reinvestmentEndToYear = filterCriteria.reinvestmentEndToDate ? undefined : filterCriteria.reinvestmentEndTo;\r\n\r\n dispatch(setPortfolioExportingStatus(true));\r\n portfolioService\r\n .exportPortfolios(filterCriteria)\r\n .then(file => saveAs(file.blob, file.name || 'portfolios.csv'))\r\n .catch((e) => errorActions.unexpectedError(e))\r\n .finally(() => dispatch(setPortfolioExportingStatus(false)));\r\n };\r\n}\r\n\r\nfunction createBwicConfirmed() {\r\n return (dispatch, getState) => {\r\n const portfolios = getState().entities.portfolios.items;\r\n const selectedState = getState().portfolio.selectedState;\r\n\r\n const securities = getSelectedSecurities(portfolios, selectedState);\r\n history.push(routes.newBWIC, { securities: cloneDeep(groupSecurities(securities)) });\r\n };\r\n}\r\n\r\nfunction groupSecurities(securities) {\r\n const grouped = [];\r\n\r\n securities.forEach(s => {\r\n const duplicate = grouped.find(g => g.securityId === s.securityId);\r\n if (duplicate) {\r\n duplicate.size += +s.size;\r\n } else {\r\n grouped.push(s);\r\n }\r\n });\r\n\r\n return grouped;\r\n}\r\n\r\nfunction getSelectedSecurities(portfolios, selectedState) {\r\n return portfolios\r\n .map(p => p.securities.filter(s =>\r\n selectedState[p.id] &&\r\n selectedState[p.id].securitiesSelectedState &&\r\n selectedState[p.id].securitiesSelectedState[s.id]))\r\n .flat();\r\n}\r\n\r\nfunction expandAllChange(expandAll, expandedState) {\r\n return {\r\n type: actionTypes.EXPAND_ALL,\r\n expandAll,\r\n expandedState\r\n };\r\n}\r\n\r\n//BWIC Alerts\r\nfunction updatePortfoliosAlertStatus(list) { // list: [{ portfolioId: number, bwicAlert?: boolean, dealersInventoryAlert?: boolean, issuanceMonitorAlert?: boolean, outOfRiPeriodAlert?: boolean, outOfNcPeriodAlert?: boolean rollerDeadlineAlert?: boolean}]\r\n return (dispatch, getState) => {\r\n const portfolios = apiUtils.normalize(\r\n getState().entities.portfolios.items,\r\n portfolio => portfolio.id,\r\n portfolio => portfolio\r\n );\r\n\r\n const dataToSend = list.map(x => ({\r\n ...x,\r\n bwicAlert: x.bwicAlert ?? portfolios[x.portfolioId].bwicAlert,\r\n dealersInventoryAlert: x.dealersInventoryAlert ?? portfolios[x.portfolioId].dealersInventoryAlert,\r\n cleansingNoticeAlert: x.cleansingNoticeAlert ?? portfolios[x.portfolioId].cleansingNoticeAlert,\r\n issuanceMonitorAlert: x.issuanceMonitorAlert ?? portfolios[x.portfolioId].issuanceMonitorAlert,\r\n outOfRiPeriodAlert: x.outOfRiPeriodAlert ?? portfolios[x.portfolioId].outOfRiPeriodAlert,\r\n outOfNcPeriodAlert: x.outOfNcPeriodAlert ?? portfolios[x.portfolioId].outOfNcPeriodAlert,\r\n rollerDeadlineAlert: x.rollerDeadlineAlert ?? portfolios[x.portfolioId].rollerDeadlineAlert\r\n }));\r\n\r\n const bwicAlertChanges = list.filter(x => x.bwicAlert != null).map(x => x.portfolioId);\r\n const inventoryAlertChanges = list.filter(x => x.dealersInventoryAlert != null).map(x => x.portfolioId);\r\n const cleansingNoticeAlertChanges = list.filter(x => x.cleansingNoticeAlert != null).map(x => x.portfolioId);\r\n const issuanceMonitorAlertChanges = list.filter(x => x.issuanceMonitorAlert != null).map(x => x.portfolioId);\r\n const outOfRiPeriodAlertChanges = list.filter(x => x.outOfRiPeriodAlert != null).map(x => x.portfolioId);\r\n const outOfNcPeriodAlertChanges = list.filter(x => x.outOfNcPeriodAlert != null).map(x => x.portfolioId);\r\n const rollerDeadlineAlertChanges = list.filter(x => x.rollerDeadlineAlert != null).map(x => x.portfolioId);\r\n\r\n dispatch(updateBwicAlertStatusRequest(bwicAlertChanges));\r\n dispatch(updateInventoryAlertStatusRequest(inventoryAlertChanges));\r\n dispatch(updateCleansingNoticeAlertStatusRequest(cleansingNoticeAlertChanges));\r\n dispatch(updateIssuanceMonitorAlertStatusRequest(issuanceMonitorAlertChanges));\r\n dispatch(updateOutOfRiAlertStatusRequest(outOfRiPeriodAlertChanges));\r\n dispatch(updateOutOfNcAlertStatusRequest(outOfNcPeriodAlertChanges));\r\n dispatch(updateRollerDeadlineAlertStatusRequest(rollerDeadlineAlertChanges));\r\n\r\n\r\n portfolioService.updatePortfoliosAlert(dataToSend)\r\n .then(() => {\r\n dispatch(portfolioListActions.updateSendAlertState(list));\r\n dispatch(updateBwicAlertStatusSuccess(bwicAlertChanges));\r\n dispatch(updateInventoryAlertStatusSuccess(inventoryAlertChanges));\r\n dispatch(updateCleansingNoticeAlertStatusSuccess(cleansingNoticeAlertChanges));\r\n dispatch(updateIssuanceMonitorAlertStatusSuccess(issuanceMonitorAlertChanges));\r\n dispatch(updateOutOfRiAlertStatusSuccess(outOfRiPeriodAlertChanges));\r\n dispatch(updateOutOfNcAlertStatusSuccess(outOfNcPeriodAlertChanges));\r\n dispatch(updateRollerDeadlineAlertStatusSuccess(rollerDeadlineAlertChanges));\r\n dispatch(emailPreferencesActions.request());\r\n })\r\n .catch(e => {\r\n dispatch(updateBwicAlertStatusFailure(bwicAlertChanges));\r\n dispatch(updateInventoryAlertStatusFailure(inventoryAlertChanges));\r\n dispatch(updateCleansingNoticeAlertStatusFailure(cleansingNoticeAlertChanges));\r\n dispatch(updateIssuanceMonitorAlertStatusFailure(issuanceMonitorAlertChanges));\r\n dispatch(updateOutOfRiAlertStatusFailure(outOfRiPeriodAlertChanges));\r\n dispatch(updateOutOfNcAlertStatusFailure(outOfNcPeriodAlertChanges));\r\n dispatch(updateRollerDeadlineAlertStatusFailure(rollerDeadlineAlertChanges));\r\n dispatch(errorActions.unexpectedError(e));\r\n });\r\n };\r\n}\r\n\r\nfunction updateBwicAlertStatusRequest(list) {\r\n return {\r\n type: actionTypes.PORTFOLIO_UPDATE_ALERT_STATUS_REQUEST,\r\n payload: { list }\r\n };\r\n}\r\n\r\nfunction updateBwicAlertStatusSuccess(list) {\r\n return {\r\n type: actionTypes.PORTFOLIO_UPDATE_ALERT_STATUS_SUCCESS,\r\n payload: { list }\r\n };\r\n}\r\n\r\n\r\nfunction updateBwicAlertStatusFailure(list) {\r\n return {\r\n type: actionTypes.PORTFOLIO_UPDATE_ALERT_STATUS_FAILURE,\r\n payload: { list }\r\n };\r\n}\r\n\r\nfunction updateInventoryAlertStatusRequest(list) {\r\n return {\r\n type: actionTypes.UPDATE_INVENTORY_ALERT_STATUS_REQUEST,\r\n payload: { list }\r\n };\r\n}\r\n\r\nfunction updateInventoryAlertStatusSuccess(list) {\r\n return {\r\n type: actionTypes.UPDATE_INVENTORY_ALERT_STATUS_SUCCESS,\r\n payload: { list }\r\n };\r\n};\r\n\r\nfunction updateInventoryAlertStatusFailure(list) {\r\n return {\r\n type: actionTypes.UPDATE_INVENTORY_ALERT_STATUS_FAILURE,\r\n payload: { list }\r\n };\r\n};\r\n\r\nfunction updateIssuanceMonitorAlertStatusRequest(list) {\r\n return {\r\n type: actionTypes.UPDATE_ISSUANCE_MONITOR_ALERT_STATUS_REQUEST,\r\n payload: { list }\r\n };\r\n};\r\n\r\nfunction updateIssuanceMonitorAlertStatusSuccess(list) {\r\n return {\r\n type: actionTypes.UPDATE_ISSUANCE_MONITOR_ALERT_STATUS_SUCCESS,\r\n payload: { list }\r\n };\r\n};\r\n\r\nfunction updateIssuanceMonitorAlertStatusFailure(list) {\r\n return {\r\n type: actionTypes.UPDATE_ISSUANCE_MONITOR_ALERT_STATUS_FAILURE,\r\n payload: { list }\r\n };\r\n};\r\n\r\nfunction updateCleansingNoticeAlertStatusRequest(list) {\r\n return {\r\n type: actionTypes.UPDATE_CLEANSING_NOTICE_ALERT_STATUS_REQUEST,\r\n payload: { list }\r\n };\r\n};\r\n\r\nfunction updateCleansingNoticeAlertStatusSuccess(list) {\r\n return {\r\n type: actionTypes.UPDATE_CLEANSING_NOTICE_ALERT_STATUS_SUCCESS,\r\n payload: { list }\r\n };\r\n};\r\n\r\nfunction updateCleansingNoticeAlertStatusFailure(list) {\r\n return {\r\n type: actionTypes.UPDATE_CLEANSING_NOTICE_ALERT_STATUS_FAILURE,\r\n payload: { list }\r\n };\r\n};\r\n\r\nfunction updateOutOfRiAlertStatusRequest(list) {\r\n return {\r\n type: actionTypes.UPDATE_OUT_OF_RI_PERIOD_ALERT_STATUS_REQUEST,\r\n payload: { list }\r\n };\r\n};\r\n\r\nfunction updateOutOfRiAlertStatusSuccess(list) {\r\n return {\r\n type: actionTypes.UPDATE_OUT_OF_RI_PERIOD_ALERT_STATUS_SUCCESS,\r\n payload: { list }\r\n };\r\n};\r\n\r\nfunction updateOutOfRiAlertStatusFailure(list) {\r\n return {\r\n type: actionTypes.UPDATE_OUT_OF_RI_PERIOD_ALERT_STATUS_FAILURE,\r\n payload: { list }\r\n };\r\n};\r\n\r\nfunction updateOutOfNcAlertStatusRequest(list) {\r\n return {\r\n type: actionTypes.UPDATE_OUT_OF_NC_PERIOD_ALERT_STATUS_REQUEST,\r\n payload: { list }\r\n };\r\n};\r\n\r\nfunction updateOutOfNcAlertStatusSuccess(list) {\r\n return {\r\n type: actionTypes.UPDATE_OUT_OF_NC_PERIOD_ALERT_STATUS_SUCCESS,\r\n payload: { list }\r\n };\r\n};\r\n\r\nfunction updateOutOfNcAlertStatusFailure(list) {\r\n return {\r\n type: actionTypes.UPDATE_OUT_OF_NC_PERIOD_ALERT_STATUS_FAILURE,\r\n payload: { list }\r\n };\r\n};\r\n\r\nfunction updateRollerDeadlineAlertStatusRequest(list) {\r\n return {\r\n type: actionTypes.UPDATE_ROLLER_DEADLINE_ALERT_STATUS_REQUEST,\r\n payload: { list }\r\n };\r\n}\r\n\r\nfunction updateRollerDeadlineAlertStatusSuccess(list) {\r\n return {\r\n type: actionTypes.UPDATE_ROLLER_DEADLINE_ALERT_STATUS_SUCCESS,\r\n payload: { list }\r\n };\r\n}\r\n\r\nfunction updateRollerDeadlineAlertStatusFailure(list) {\r\n return {\r\n type: actionTypes.UPDATE_ROLLER_DEADLINE_ALERT_STATUS_FAILURE,\r\n payload: { list }\r\n };\r\n}\r\n\r\n\r\n\r\n\r\nfunction hideActivePanels() {\r\n return dispatch => {\r\n dispatch(resetRowSelection());\r\n dispatch(rulesActions.hide());\r\n dispatch(securityDetailsActions.securityDetailsReset());\r\n dispatch(bwicLogActions.bwicLogReset());\r\n }\r\n}\r\n\r\nfunction advancedFilterBlocked(blocked) {\r\n return {\r\n type: actionTypes.ADVANCED_FILTER_BLOCKED,\r\n payload: { blocked }\r\n }\r\n}\r\n","import { ActionType, createAsyncAction } from 'typesafe-actions';\r\nimport { PageConfigType } from \"../types/page-config/PageConfigType\";\r\nimport { PageConfig } from \"../types/page-config/PageConfig\";\r\nimport { PageConfigList } from \"../types/state/entities/PageConfigState\";\r\nimport { UserConfigColumn } from '../types/user-config/UserConfigColumn';\r\n\r\nconst getConfigs = createAsyncAction(\r\n 'entities/page-config/REQUEST_CONFIG',\r\n 'entities/page-config/SUCCESS_CONFIG',\r\n 'entities/page-config/FAILURE_CONFIG'\r\n)();\r\n\r\nconst getDefaultConfig = createAsyncAction(\r\n 'entities/page-config/REQUEST_DEFAULT_CONFIG',\r\n 'entities/page-config/SUCCESS_DEFAULT_CONFIG',\r\n 'entities/page-config/FAILURE_DEFAULT_CONFIG'\r\n)<{ configType: PageConfigType }, { configType: PageConfigType, config: PageConfig }, { configType: PageConfigType }>();\r\n\r\nconst saveColumns = createAsyncAction(\r\n 'entities/page-config/REQUEST_SAVE_CONFIG',\r\n 'entities/page-config/SUCCESS_SAVE_CONFIG',\r\n 'entities/page-config/FAILURE_SAVE_CONFIG'\r\n)<{ configType: PageConfigType }, { configType: PageConfigType, columns: UserConfigColumn[] }, { configType: PageConfigType }>();\r\n\r\nexport type TPageConfigActions = ActionType\r\n\r\nexport const pageConfigActions = {\r\n getConfigs,\r\n getDefaultConfig,\r\n saveColumns\r\n}\r\n","import { createAction } from 'typesafe-actions';\r\nimport { PushHistoryStateItem, PushHistoryStateItemType } from '../../types/state/PushHistoryState';\r\n\r\nconst add = createAction(\r\n 'push-history/add',\r\n resolve => (item: PushHistoryStateItem, type: PushHistoryStateItemType) => resolve({ item, type })\r\n);\r\nconst reset = createAction('push-history/reset');\r\nconst resetForType = createAction(\r\n 'push-history/resetHistoryForType',\r\n resolve => (...types: PushHistoryStateItemType[]) => resolve({ types: [...types] })\r\n);\r\n\r\nexport const pushHistoryActions = {\r\n add,\r\n reset,\r\n resetForType,\r\n}\r\n","import { createAction } from 'typesafe-actions';\r\nimport { RequestState } from \"../constants/request-state\";\r\nimport { UserSlim } from '../types/account/UserSlim';\r\n\r\nconst request = createAction('entities/broker-dealer-user-list/REQUEST');\r\nconst requestResult = createAction('entities/broker-dealer-user-list/REQUEST_RESULT',\r\n resolve => (requestState: RequestState, result: UserSlim[] = []) =>\r\n resolve({ requestState, result })\r\n);\r\n\r\nconst resetEntities = createAction('entities/broker-dealer-user-list/RESET');\r\n\r\nexport const brokerDealerUserListActions = {\r\n request,\r\n requestResult,\r\n resetEntities\r\n};\r\n","import { createAction } from 'typesafe-actions';\r\nimport { CompanySlim } from '../types/company/CompanySlim';\r\nimport { Company } from '../types/company/Company';\r\n\r\nconst show = createAction(\r\n 'companyDetails/SET_VISIBLE',\r\n resolve => (company: CompanySlim, isBrokerDealer?: boolean, rowKey?: number) => resolve({ company, isBrokerDealer, rowKey })\r\n);\r\n\r\nconst hide = createAction(\r\n 'companyDetails/HIDE'\r\n);\r\n\r\nconst fetchCompanyDetailsRequest = createAction(\r\n 'companyDetails/FETCH_COMPANY_DETAILS_REQUEST',\r\n resolve => (companyId: number, companyReferenceName: string) => resolve({ companyId, companyReferenceName })\r\n);\r\n\r\nconst fetchCompanyDetailsResponse = createAction(\r\n 'companyDetails/FETCH_COMPANY_DETAILS_RESPONSE',\r\n resolve => (companyId: number) => resolve({ companyId })\r\n);\r\n\r\nconst setCompanyDetails = createAction(\r\n 'companyDetails/SET_COMPANY_DETAILS',\r\n resolve => (companyId: number, company: Company) => resolve({ companyId, company })\r\n);\r\n\r\nconst reset = createAction('companyDetails/RESET');\r\n\r\nexport const companyDetailsActions = {\r\n show,\r\n hide,\r\n fetchCompanyDetailsRequest,\r\n fetchCompanyDetailsResponse,\r\n setCompanyDetails,\r\n reset\r\n};\r\n","import { createAction } from 'typesafe-actions';\r\nimport { RequestState } from '../constants/request-state';\r\nimport { InventoryPosition } from '../types/inventory/InventoryPosition';\r\nimport { InventoryPositionStatus } from '../types/inventory/InventoryPositionStatus';\r\nimport { InventorySecurityOrderByColumn, InventorySecuritySortOrder } from '../types/inventory/InventorySecurityOrderByColumn';\r\nimport { InventoryResultSummary } from '../types/inventory/InventoryResultSummary';\r\n\r\nconst request = createAction('entities/inventory/REQUEST');\r\nconst requestResult = createAction('entities/inventory/REQUEST_RESULT',\r\n resolve => (requestState: RequestState, result: InventoryPosition[] = [], totalRecordNumber: number = 0, summary?: InventoryResultSummary) =>\r\n resolve({ requestState, result, totalRecordNumber, summary })\r\n);\r\nconst resetEntities = createAction('entities/inventory/RESET');\r\nconst reset = createAction('inventory/RESET');\r\nconst resetSummary = createAction('inventory/RESET_SUMMARY');\r\nconst loadNextPage = createAction('entities/inventory/LOAD_NEXT_PAGE');\r\nconst init = createAction(\r\n 'inventory/INIT',\r\n resolve => (sortField: InventorySecurityOrderByColumn, sortDirection: InventorySecuritySortOrder) => resolve({ sortField, sortDirection })\r\n);\r\nconst requestInventoryExistFlag = createAction('invetory/INVENTORY_EXIST_FLAG_REQUEST');\r\nconst inventoryExistFlag = createAction(\r\n 'inventory/INVENTORY_EXIST_FLAG',\r\n resolve => (exist: boolean) => resolve({ exist })\r\n);\r\nconst loadSellerInventory = createAction(\r\n 'inventory/LOAD_SELLER_INVENTORY',\r\n resolve => (sortField: InventorySecurityOrderByColumn, sortDirection: InventorySecuritySortOrder, loadSummary: boolean, applyFilter: boolean = true) => resolve({ sortField, sortDirection, loadSummary, applyFilter })\r\n);\r\n\r\nconst exportInventoryRequest = createAction(\r\n 'inventory/EXPORT_INVENTORY_REQUEST',\r\n resolve => (sortField: string, sortDirection: string) => resolve({ sortField, sortDirection })\r\n);\r\nconst exportInventoryResponse = createAction('inventory/EXPORT_INVENTORY_RESPONSE');\r\nconst pushInventory = createAction(\r\n 'entities/inventory/PUSH_INVENTORY',\r\n resolve => (inventories: InventoryPosition[], lockModifiedDate?: Date) => resolve({ inventories, lockModifiedDate })\r\n);\r\nconst inventoryStatusChange = createAction(\r\n 'entities/inventory/INVENTORY_STATUS_CHANGE',\r\n resolve => (inventoryPositionId: number, status: InventoryPositionStatus) => resolve({ inventoryPositionId, status })\r\n);\r\nconst advancedFilterBlocked = createAction('inventory/ADVANCED_FILTER_BLOCKED', resolve => (blocked: boolean) => resolve({ blocked }));\r\n\r\nexport const inventoryActions = {\r\n init,\r\n requestInventoryExistFlag,\r\n inventoryExistFlag,\r\n loadNextPage,\r\n request,\r\n resetEntities,\r\n requestResult,\r\n reset,\r\n loadSellerInventory,\r\n exportInventoryRequest,\r\n exportInventoryResponse,\r\n pushInventory,\r\n inventoryStatusChange,\r\n advancedFilterBlocked,\r\n resetSummary\r\n};\r\n","import { DateTimeRange } from '../types/filters/DateTimeRange';\r\nimport { DateFilterOption } from '../types/filters/DateFilterOption';\r\nimport { DateRange } from '../types/filters/DateRange';\r\nimport { DateTimeFilterOption } from '../types/filters/DateTimeFilterOption';\r\nimport { FilterRangeOption } from '../types/filters/FilterRangeOption';\r\nimport { RedirectFilterOption } from '../types/filters/RedirectFilterOption';\r\nimport { CommonFilter, TFilterType } from '../types/filters/FilterState';\r\nimport { createAction, createAsyncAction } from 'typesafe-actions';\r\nimport { Primitive } from '../utils/differ/types';\r\nimport { UserConfigFilter } from '../types/user-config/UserConfigFilter';\r\nimport { RadioOption } from '../types/filters/RadioOption';\r\nimport { TDeserializeRange } from '../utils/filtering/serializers/serializer.definitions';\r\n\r\nexport const createFilterActions = (filterType?: TFilterType) => {\r\n const init = createAction('filter/INIT', resolve => (filter: CommonFilter) => resolve({ filterType, filter }));\r\n\r\n const selectFilterFromConfig = createAction(\r\n 'filter/SELECT_FILTER_FROM_CONFIG',\r\n resolve => (selectedFilter?: UserConfigFilter, referenceName?: string) =>\r\n resolve({ filterType, selectedFilter, referenceName }),\r\n );\r\n\r\n const filterSelectChange = createAction(\r\n 'filter/SELECT_CHANGE',\r\n resolve => (option: Primitive, filterName: string) => resolve({ filterType, option, filterName }),\r\n );\r\n\r\n const resetFiltersAndUnselectSavedFilter = createAction(\r\n 'filter/RESET_FILTERS_AND_UNSELECT_SAVED_FILTER',\r\n resolve => () => resolve({ filterType }),\r\n );\r\n\r\n const filterSelectSelectAll = createAction(\r\n 'filter/SELECT_SELECT_ALL',\r\n resolve => (filterName: string, searchTerm: string) => resolve({ filterType, filterName, searchTerm }),\r\n );\r\n\r\n const filterSelectClearAll = createAction(\r\n 'filter/SELECT_CLEAR_ALL',\r\n resolve => (filterName: string) => resolve({ filterName, filterType }),\r\n );\r\n\r\n const makeFilterVisible = createAction(\r\n 'filter/MAKE_FILTER_VISIBLE',\r\n resolve => (filterName: string) => resolve({ filterType, filterName }),\r\n );\r\n\r\n const updateFilterState = createAction('filter/UPDATE_FILTER_STATE', resolve => () => resolve({ filterType }));\r\n\r\n const applyFilter = createAction('filter/APPLY_FILTER', resolve => () => resolve({ filterType }));\r\n\r\n const resetFilter = createAction('filter/RESET_FILTER', resolve => () => resolve({ filterType }));\r\n\r\n const resetFilterState = createAction('filter/RESET_FILTER_STATE', resolve => () => resolve({ filterType }));\r\n\r\n const resetFiltersVisibility = createAction(\r\n 'filter/RESET_FILTERS_VISIBILITY',\r\n resolve => () => resolve({ filterType }),\r\n );\r\n\r\n const filterVisibilityChange = createAction(\r\n 'filter/VISIBILITY_CHANGE',\r\n resolve => (filterName: string) => resolve({ filterType, filterName }),\r\n );\r\n\r\n const storeFilterData = createAsyncAction(\r\n 'filter/STORE_FILTER_DATA_REQUEST',\r\n 'filter/STORE_FILTER_DATA_SUCCESS',\r\n 'filter/STORE_FILTER_DATA_FAILURE',\r\n )<\r\n { filterType: TFilterType; filterName: string },\r\n { filterType: TFilterType; filterName: string; data: unknown[] },\r\n { filterType: TFilterType; filterName: string }\r\n >();\r\n\r\n const changeRangeFilter = createAction(\r\n 'filter/CHANGE_RANGE_FILTER',\r\n resolve => (value: FilterRangeOption, filterName: string) => resolve({ filterType, filterName, value }),\r\n );\r\n\r\n const filterRadioChange = createAction(\r\n 'filter/RADIO_CHANGE',\r\n resolve => (option: string | boolean | RadioOption, filterName: string) => resolve({ filterType, option, filterName }),\r\n );\r\n\r\n const filterRadioClearOption = createAction(\r\n 'filter/RADIO_CLEAR_OPTION',\r\n resolve => (filterName: string) => resolve({ filterType, filterName }),\r\n );\r\n\r\n const filterRangeClearSelectedOptions = createAction(\r\n 'filter/RANGE_CLEAR_SELECTED_OPTIONS',\r\n resolve => (filterName: string) => resolve({ filterType, filterName }),\r\n );\r\n\r\n const setFilterByReferenceName = createAction(\r\n 'filter/SET_FILTER_BY_REFERENCE_NAME',\r\n resolve => (selectedFilterReferenceName: string, selectedFilter?: CommonFilter) =>\r\n resolve({ filterType, selectedFilter, selectedFilterReferenceName }),\r\n );\r\n\r\n const filterDateClearSelectedOptions = createAction(\r\n 'filter/DATE_CLEAR_SELECTED_OPTIONS',\r\n resolve => (filterName: string) => resolve({ filterType, filterName }),\r\n );\r\n\r\n const filterDateSelectOption = createAction(\r\n 'filter/FILTER_DATE_SELECT_OPTION',\r\n resolve => (option: DateFilterOption, filterName: string) => resolve({ filterType, option, filterName }),\r\n );\r\n\r\n const filterDateTimeOptionSelected = createAction(\r\n 'filter/FILTER_DATE_TIME_SELECT_OPTION',\r\n resolve => (option: DateTimeFilterOption, filterName: string) => resolve({ filterType, option, filterName }),\r\n );\r\n\r\n const filterDateSelectCustomRange = createAction(\r\n 'filter/FILTER_DATE_SELECT_CUSTOM_RANGE',\r\n resolve => (option: DateRange, filterName: string) => resolve({ filterType, option, filterName }),\r\n );\r\n\r\n const filterDateTimeSelectCustomRange = createAction(\r\n 'filter/FILTER_DATE_TIME_SELECT_CUSTOM_RANGE',\r\n resolve => (option: DateTimeRange, filterName: string) => resolve({ filterType, option, filterName }),\r\n );\r\n\r\n const filterDateSelectYearsRange = createAction(\r\n 'filter/FILTER_DATE_SELECT_YEARS_RANGE',\r\n resolve => (option: FilterRangeOption, filterName: string) => resolve({ filterType, option, filterName }),\r\n );\r\n\r\n const setRedirectFilters = createAction(\r\n 'filter/SET_REDIRECT_FILTERS',\r\n resolve => (filter: RedirectFilterOption) => resolve({ filterType, filter }),\r\n );\r\n\r\n const redirectWithNoFilter = createAction(\r\n 'filter/REDIRECT_WITH_NO_FILTER',\r\n resolve => () => resolve({ filterType }),\r\n );\r\n\r\n const filterDateQueryStringDeserialized = createAction(\r\n 'filter/FILTER_DATE_QUERY_STRING_DESERIALIZED',\r\n resolve => (filterName: string, deserializeResult: TDeserializeRange) => resolve({ filterType, filterName, deserializeResult }),\r\n );\r\n\r\n const resetSelectedFilter = createAction(\r\n 'filter/RESET_SELECTED_FILTER',\r\n resolve => () => resolve({ filterType })\r\n );\r\n\r\n return {\r\n init,\r\n selectFilterFromConfig,\r\n filterSelectChange,\r\n filterSelectSelectAll,\r\n filterSelectClearAll,\r\n makeFilterVisible,\r\n updateFilterState,\r\n applyFilter,\r\n resetFilter,\r\n resetFiltersVisibility,\r\n storeFilterData,\r\n changeRangeFilter,\r\n filterRadioChange,\r\n filterRadioClearOption,\r\n filterRangeClearSelectedOptions,\r\n setFilterByReferenceName,\r\n filterDateClearSelectedOptions,\r\n filterDateSelectOption,\r\n filterDateTimeOptionSelected,\r\n filterDateSelectCustomRange,\r\n filterDateTimeSelectCustomRange,\r\n filterDateSelectYearsRange,\r\n setRedirectFilters,\r\n resetFilterState,\r\n filterVisibilityChange,\r\n resetFiltersAndUnselectSavedFilter,\r\n redirectWithNoFilter,\r\n filterDateQueryStringDeserialized,\r\n resetSelectedFilter\r\n };\r\n};\r\n","import { createAction } from 'typesafe-actions';\r\nimport { RequestState } from \"../constants/request-state\";\r\nimport { Contact } from '../types/company/Contact';\r\n\r\nconst request = createAction('entities/broker-dealer-contact-list/REQUEST');\r\nconst requestResult = createAction('entities/broker-dealer-contact-list/REQUEST_RESULT',\r\n resolve => (requestState: RequestState, result: Contact[] = []) =>\r\n resolve({ requestState, result })\r\n);\r\nconst pushUpdateList = createAction(\r\n 'entities/broker-dealer-contact-list/PUSH_UPDATE_LIST',\r\n resolve => (contacts: Contact[] = []) => resolve({ contacts })\r\n);\r\nconst setContactInvitationSent = createAction(\r\n 'entities/broker-dealer-contact-list/PUSH_CONTACT_INVITATION',\r\n resolve => (contactId: number) => resolve({ contactId })\r\n);\r\nconst resetEntities = createAction('entities/broker-dealer-contact-list/RESET');\r\n\r\nexport const brokerDealerContactListActions = {\r\n request,\r\n requestResult,\r\n pushUpdateList,\r\n setContactInvitationSent,\r\n resetEntities\r\n};\r\n","import { ThunkDispatch } from 'redux-thunk';\r\nimport { history } from '../history';\r\nimport { AnyAction } from \"redux\";\r\nimport { createAction } from 'typesafe-actions';\r\nimport { AppState } from '../types/state/AppState';\r\nimport { gridActions } from './grid.actions';\r\nimport { notificationActions } from './notification.actions';\r\nimport { errorActions } from './error.actions';\r\nimport { errorMessages } from '../constants/error.messages';\r\nimport { TradeAllocationType } from '../types/trade-allocation/TradeAllocationType';\r\nimport { tradeAllocationTemplateService } from '../services/trade-allocation-template.service';\r\nimport { SaveTradeAllocationTemplate } from '../types/trade-allocation/template/SaveTradeAllocationTemplate';\r\nimport { user } from '../user';\r\nimport { GridDataItem } from '../types/state/GridState';\r\nimport { EditTradeAllocationTemplateItem } from '../types/trade-allocation/template/TradeAllocationTemplateItem';\r\nimport { tradeAllocationTemplateActions } from './trade-allocation-template.actions';\r\nimport { LocationStateBuilder, PanelType } from '../types/state/ui/LocationState';\r\n\r\nconst resetPanelState = createAction('blotter/trade-allocation-template/RESET');\r\nconst saveRequest = createAction('blotter/trade-allocation-template/SAVE_REQUEST');\r\nconst saveSuccess = createAction('blotter/trade-allocation-template/SAVE_SUCCESS');\r\nconst saveFailure = createAction('blotter/trade-allocation-template/SAVE_FAILURE');\r\n\r\nexport const blotterTradeAllocationTemplateActions = {\r\n resetPanelState,\r\n save,\r\n saveRequest,\r\n saveSuccess,\r\n saveFailure\r\n}\r\n\r\nfunction save(templateId: number, name: string, type: TradeAllocationType, activate: boolean, lock?: Date) {\r\n return async (dispatch: ThunkDispatch, getState: () => AppState) => {\r\n dispatch(gridActions.validate());\r\n\r\n if (!getState().grid.isValid) return;\r\n\r\n dispatch(saveRequest());\r\n\r\n const items: GridDataItem[] =\r\n getState().grid.dataItems.filter((i: GridDataItem) => !i.draft && i.settlementAccountId);\r\n const saveModel: SaveTradeAllocationTemplate = {\r\n id: templateId || undefined,\r\n name,\r\n assetManager: { id: user.current()!.companyId },\r\n lock,\r\n type,\r\n items: items.map(i => ({\r\n id: i.id,\r\n settlementAccountId: Number(i.settlementAccountId),\r\n percent: type === TradeAllocationType.PercentOfTrade ? Number(i.percent) : undefined,\r\n rating: type === TradeAllocationType.CreditRatings ? i.rating : undefined\r\n }))\r\n };\r\n\r\n try {\r\n const template = await tradeAllocationTemplateService.saveTemplate(saveModel);\r\n dispatch(tradeAllocationTemplateActions.update(template));\r\n\r\n if (activate) {\r\n try {\r\n const updates = await tradeAllocationTemplateService.setTemplateActive(template.id, true, template.lock);\r\n const activated = updates.find(t => t.active);\r\n const deactivated = updates.find(t => !t.active);\r\n\r\n dispatch(tradeAllocationTemplateActions.activeChange(activated, deactivated));\r\n } catch (e) {\r\n dispatch(errorActions.unexpectedError(e));\r\n }\r\n }\r\n \r\n dispatch(blotterTradeAllocationTemplateActions.saveSuccess());\r\n history.replace({\r\n ...history.location,\r\n state: new LocationStateBuilder()\r\n .resetPanel()\r\n .panel(PanelType.Templates)\r\n .result()\r\n });\r\n } catch (e) {\r\n dispatch(saveFailure());\r\n if (e.status === 409) {\r\n dispatch(\r\n notificationActions.notificationAddErrorMessageModal(\r\n errorMessages.refreshPage,\r\n \"Can't save Trade Allocation Template\",\r\n true\r\n )\r\n );\r\n } else {\r\n dispatch(errorActions.unexpectedError(e));\r\n }\r\n }\r\n };\r\n}\r\n","import { AppState } from \"../types/state/AppState\";\r\nimport {\r\n searchTransactionsActions as actionTypes,\r\n constants,\r\n} from \"../constants\";\r\nimport { errorActions } from \"./error.actions\";\r\nimport { Deal } from \"../types/amr-pipeline/models/Deal\";\r\nimport { SearchTermItem } from \"../components/amrPipeline/types/SearchTermItem\";\r\nimport { ThunkDispatch } from \"redux-thunk\";\r\nimport { AnyAction } from \"redux\";\r\nimport { PipelineType } from '../types/amr-pipeline/enums/PipelineType';\r\nimport { amrPipelineSelector } from '../selectors/amr-pipeline.selector';\r\nimport { dealsService } from \"../services/deals.service\";\r\n\r\ntype TDispatch = ThunkDispatch;\r\n\r\nlet loadSearchLookupTimeout: number | null = null;\r\n\r\nexport const createSearchTransactionActions = (pipelineType: PipelineType) => {\r\n function searchTermChange(searchTerm = '', showLookup = true) {\r\n return (dispatch: TDispatch) => {\r\n dispatch({\r\n type: actionTypes.SEARCH_TERM_CHANGE,\r\n pipelineType,\r\n searchTerm,\r\n });\r\n\r\n const trimmedSearchTerm = searchTerm.trim();\r\n\r\n if (showLookup && trimmedSearchTerm.length > constants.searchTermAcceptedLength) {\r\n dispatch(requestSearchLookup(trimmedSearchTerm));\r\n } else {\r\n dispatch(resetSearchLookup());\r\n }\r\n };\r\n }\r\n\r\n function requestSearchLookup(searchTerm: string) {\r\n return (dispatch: TDispatch) => {\r\n if (loadSearchLookupTimeout) {\r\n clearTimeout(loadSearchLookupTimeout);\r\n }\r\n dispatch(resetLookupCache());\r\n dispatch(searchItemsRequesting(true));\r\n loadSearchLookupTimeout = window.setTimeout(\r\n () => dispatch(loadSearchLookup(searchTerm)),\r\n 400\r\n );\r\n }\r\n }\r\n\r\n function loadSearchLookup(searchTerm: string, isLoadMore: boolean = false) {\r\n return async (dispatch: TDispatch, getState: () => AppState) => {\r\n dispatch(searchItemsRequesting(true));\r\n try {\r\n const {\r\n searchTransactions: {\r\n dealsOffset,\r\n classesOffset\r\n },\r\n } = amrPipelineSelector(pipelineType)(getState());\r\n const deals = await dealsService.getDealsList(searchTerm, dealsOffset);\r\n const dealsWithClasses = await dealsService.getDealsClassesList(searchTerm, classesOffset);\r\n\r\n const lookupData = deals.map((deal: Deal) => ({\r\n ...deal,\r\n isDeal: true,\r\n }));\r\n\r\n dispatch({\r\n type: actionTypes.SEARCH_LOOKUP_CACHE,\r\n pipelineType,\r\n classesLookup: dealsWithClasses,\r\n lookupData,\r\n searchTerm,\r\n isLoadMore,\r\n });\r\n } catch (e) {\r\n dispatch(errorActions.criticalError(e));\r\n } finally {\r\n dispatch(searchItemsRequesting(false))\r\n }\r\n };\r\n }\r\n\r\n function loadDealsLookup(searchTerm: string, isLoadMore: boolean = false) {\r\n return async (dispatch: TDispatch, getState: () => AppState) => {\r\n dispatch(searchItemsRequesting(true));\r\n try {\r\n const {\r\n searchTransactions: {\r\n dealsOffset,\r\n },\r\n } = amrPipelineSelector(pipelineType)(getState());\r\n const deals = await dealsService.getDealsList(searchTerm, dealsOffset);\r\n\r\n const lookupData = deals.map((deal: Deal) => ({\r\n ...deal,\r\n isDeal: true,\r\n }));\r\n\r\n dispatch({\r\n type: actionTypes.SEARCH_ADD_DEALS,\r\n pipelineType,\r\n lookupData,\r\n searchTerm,\r\n isLoadMore,\r\n });\r\n } catch (e) {\r\n dispatch(errorActions.criticalError(e));\r\n } finally {\r\n dispatch(searchItemsRequesting(false))\r\n }\r\n };\r\n }\r\n\r\n function loadClassesLookup(searchTerm: string, isLoadMore: boolean = false) {\r\n return async (dispatch: TDispatch, getState: () => AppState) => {\r\n dispatch(searchItemsRequesting(true));\r\n try {\r\n const {\r\n searchTransactions: {\r\n classesOffset\r\n },\r\n } = amrPipelineSelector(pipelineType)(getState());\r\n const dealsWithClasses = await dealsService.getDealsClassesList(searchTerm, classesOffset);\r\n\r\n const lookupData = dealsWithClasses.map((deal: Deal) => ({\r\n ...deal,\r\n isDeal: true,\r\n }));\r\n\r\n dispatch({\r\n type: actionTypes.SEARCH_ADD_CLASSES,\r\n pipelineType,\r\n lookupData,\r\n searchTerm,\r\n isLoadMore,\r\n });\r\n } catch (e) {\r\n dispatch(errorActions.criticalError(e));\r\n } finally {\r\n dispatch(searchItemsRequesting(false))\r\n }\r\n };\r\n }\r\n\r\n function applyLookupItem(\r\n label: string,\r\n dealReferenceName: string,\r\n classNames?: string[],\r\n ) {\r\n return (\r\n dispatch: TDispatch,\r\n getState: () => AppState\r\n ) => {\r\n const { searchTransactions } = amrPipelineSelector(pipelineType)(getState());\r\n\r\n if (\r\n label &&\r\n !searchTransactions.searchTermItems.map(i => i.label).includes(label)\r\n ) {\r\n dispatch(addSearchItem({\r\n label,\r\n referenceName: dealReferenceName,\r\n classNames,\r\n }));\r\n\r\n }\r\n dispatch(searchTermChange(\"\"));\r\n dispatch(resetSearchLookup());\r\n };\r\n }\r\n\r\n function moveBack() {\r\n return {\r\n type: actionTypes.SEARCH_MOVE_BACK,\r\n pipelineType,\r\n };\r\n }\r\n\r\n function moveForward() {\r\n return {\r\n type: actionTypes.SEARCH_MOVE_FORWARD,\r\n pipelineType,\r\n };\r\n }\r\n\r\n function addSearchItem(item: SearchTermItem) {\r\n return {\r\n type: actionTypes.SEARCH_ITEM_ADD,\r\n pipelineType,\r\n item,\r\n };\r\n }\r\n\r\n function removeSearchItem(index: number) {\r\n return {\r\n type: actionTypes.SEARCH_ITEM_REMOVE,\r\n pipelineType,\r\n index,\r\n };\r\n }\r\n\r\n function removeCurrentItem() {\r\n return {\r\n type: actionTypes.SEARCH_REMOVE_CURRENT_ITEM,\r\n pipelineType,\r\n };\r\n }\r\n\r\n function resetSearchLookup() {\r\n return {\r\n type: actionTypes.SEARCH_LOOKUP,\r\n pipelineType,\r\n lookupData: [],\r\n classesLookup: [],\r\n };\r\n }\r\n\r\n function searchItemsRequesting(isSearching: boolean) {\r\n return {\r\n type: actionTypes.SEARCH_ITEMS_REQUESTING,\r\n pipelineType,\r\n isSearching\r\n }\r\n }\r\n\r\n function reset() {\r\n return {\r\n type: actionTypes.SEARCH_RESET,\r\n pipelineType,\r\n };\r\n }\r\n\r\n function resetLookupCache() {\r\n return {\r\n type: actionTypes.SEARCH_RESET_LOOKUP_CACHE,\r\n pipelineType,\r\n };\r\n }\r\n\r\n return {\r\n searchTermChange,\r\n applyLookupItem,\r\n loadSearchLookup,\r\n moveBack,\r\n moveForward,\r\n addSearchItem,\r\n removeCurrentItem,\r\n removeSearchItem,\r\n resetSearchLookup,\r\n reset,\r\n resetLookupCache,\r\n loadDealsLookup,\r\n loadClassesLookup,\r\n };\r\n};\r\n","import { createAction } from \"typesafe-actions\";\r\nimport { BidCompanyIdentifier } from \"../types/bidding/BidCompanyIdentifier\";\r\nimport { BidderCompanySlim } from \"../types/company/BidderCompanySlim\";\r\n\r\nconst show = createAction('dealerListPanel/SHOW');\r\nconst hide = createAction('dealerListPanel/HIDE');\r\nconst toggleCompanyVisible = createAction(\r\n 'dealerListPanel/TOGGLE_COMPANY_VISIBLE',\r\n resolve => (identifier: BidCompanyIdentifier, setLastSelectedCompanyIdentifier?: boolean) => resolve({ identifier, setLastSelectedCompanyIdentifier })\r\n);\r\nconst toggleAllFavoriteCompaniesVisible = createAction(\r\n 'dealerListPanel/TOGGLE_ALL_FAVORITE_COMPANIES_VISIBLE',\r\n resolve => (companies: BidderCompanySlim[]) => resolve({ companies })\r\n);\r\nconst toggleAllPlatformVisible = createAction(\r\n 'dealerListPanel/TOGGLE_ALL_PLATFORM_VISIBLE',\r\n resolve => (companies: BidderCompanySlim[], visible?: boolean) => resolve({ companies, visible })\r\n);\r\nconst toggleAllOffPlatformVisible = createAction(\r\n 'dealerListPanel/TOGGLE_ALL_OFF_PLATFORM_VISIBLE',\r\n resolve => (companies: BidderCompanySlim[], visible?: boolean) => resolve({ companies, visible })\r\n);\r\nconst toggleAllSettlmentsClientsVisible = createAction(\r\n 'dealerListPanel/TOGGLE_ALL_SETTLMENTS_CLIENTS_VISIBLE',\r\n resolve => (companies: BidderCompanySlim[], visible?: boolean) => resolve({ companies, visible })\r\n);\r\nconst toggleAllFavoriteVisibleFlagOnly = createAction('dealerListPanel/TOGGLE_ALL_FAVORITE_VISIBLE_FLAG_ONLY');\r\nconst toggleAllPlatformVisibleFlagOnly = createAction('dealerListPanel/TOGGLE_ALL_PLATFORM_VISIBLE_FLAG_ONLY');\r\nconst toggleAllSettlmentsClientsFlagOnly = createAction('dealerListPanel/TOGGLE_ALL_SETTLMENTS_CLIENTS_FLAG_ONLY');\r\nconst toggleAllOffPlatformVisibleFlagOnly = createAction('dealerListPanel/TOGGLE_ALL_OFF_PLATFORM_VISIBLE_FLAG_ONLY');\r\nconst setDefaultVisibility = createAction(\r\n 'dealerListPanel/SET_DEFAULTS',\r\n resolve => (companiesToHide: BidderCompanySlim[]) => resolve({ companiesToHide })\r\n);\r\nconst setDisabledCompanies = createAction(\r\n 'dealerListPanel/SET_DISABLED_COMPANIES',\r\n resolve => (disabledCompanies: BidderCompanySlim[]) => resolve({ disabledCompanies })\r\n);\r\nconst setBidOnlyFlag = createAction(\r\n 'dealerListPanel/SET_BID_ONLY_FLAG',\r\n resolve => (bidOnlyFlag: boolean) => resolve({ bidOnlyFlag })\r\n);\r\nconst stage2ParticipantsFlagChange = createAction('dealerListPanel/STAGE_2_PARTICIPANTS_FLAG_CHANGE',\r\n resolve => (isStage2participantsOnly: boolean, showAllEnabled?: boolean) => resolve({ isStage2participantsOnly, showAllEnabled })\r\n);\r\nconst showBwicParticipantsOnly = createAction('dealerListPanel/SHOW_BWIC_PARTICIPANTS_ONLY')\r\nconst reset = createAction('dealerListPanel/RESET');\r\n\r\nexport const dealerListPanelActions = {\r\n show,\r\n hide,\r\n toggleCompanyVisible,\r\n toggleAllFavoriteCompaniesVisible,\r\n toggleAllPlatformVisible,\r\n toggleAllOffPlatformVisible,\r\n toggleAllFavoriteVisibleFlagOnly,\r\n toggleAllPlatformVisibleFlagOnly,\r\n toggleAllSettlmentsClientsFlagOnly,\r\n toggleAllOffPlatformVisibleFlagOnly,\r\n toggleAllSettlmentsClientsVisible,\r\n setDefaultVisibility,\r\n setDisabledCompanies,\r\n reset,\r\n setBidOnlyFlag,\r\n stage2ParticipantsFlagChange,\r\n showBwicParticipantsOnly\r\n};\r\n","import { ActionType, createAction } from 'typesafe-actions';\r\nimport { SignupRequest } from '../types/account/SignupRequest';\r\n\r\nconst submit = createAction(\"signup/SUBMIT\", resolve => (request: SignupRequest) => resolve({ request }));\r\nconst submitSuccess = createAction(\"signup/SUBMIT_SUCCESS\");\r\nconst submitError = createAction(\"signup/SUBMIT_ERROR\");\r\n\r\nexport type TSignupAction = ActionType<\r\n typeof submit |\r\n typeof submitSuccess |\r\n typeof submitError\r\n>;\r\n\r\nexport const signupActions = {\r\n submit,\r\n submitSuccess,\r\n submitError\r\n}\r\n","import * as moment from 'moment';\r\nimport { constants, errorMessages, gridColumns, securitiesActions as actionTypes, uploadStatus } from '../constants';\r\nimport { bwicService, daysService } from '../services';\r\nimport { changeColorActions, changePxTalkActions, errorActions, gridActions } from '.';\r\nimport { processActions } from './process.actions';\r\nimport { dateTimeUtils } from '../utils';\r\nimport { history } from '../history';\r\nimport { appConfig } from '../app-config';\r\n\r\nexport const securitiesActions = {\r\n init,\r\n reset,\r\n uploadSecurities,\r\n insertSelectedSecurity,\r\n handleClipboardData,\r\n savePxTalks,\r\n saveColor,\r\n validateTradeLimits,\r\n setFlaggedModal,\r\n insertSecurityFromQueryParams\r\n};\r\n\r\nfunction init(positions, headers, rowsLimit = constants.gridRowsLimit, loadBwicDates = false, queryParams = '') {\r\n return async (dispatch, getState) => {\r\n const { securities, grid } = getState();\r\n\r\n if (securities.isInitializing || grid.headers) {\r\n return;\r\n }\r\n\r\n try {\r\n dispatch(initializing(true));\r\n if (loadBwicDates) {\r\n const day = await daysService.getNextBusinessDate();\r\n const year = new Date(day).getFullYear();\r\n\r\n const currentYearHolidaysPromise = appConfig.canCreateBwicOnUSFederalHolidays\r\n ? Promise.resolve([])\r\n : daysService.getHolidays(year);\r\n const nextYearHolidaysPromise = appConfig.canCreateBwicOnUSFederalHolidays\r\n ? Promise.resolve([])\r\n : daysService.getHolidays(year + 1);\r\n\r\n const todayIsBusinessDayPromise = daysService.isBusinessDay(new Date());\r\n\r\n const currentYearHolidays = await currentYearHolidaysPromise;\r\n const nextYearHolidays = await nextYearHolidaysPromise;\r\n const todayIsBusinessDay = await todayIsBusinessDayPromise;\r\n\r\n const holidays = [...currentYearHolidays, ...nextYearHolidays];\r\n\r\n const minDate = todayIsBusinessDay\r\n ? moment().startOf('day').toDate()\r\n : moment.utc(day).startOf('day').toDate();\r\n\r\n dispatch(processActions.setMinDate(minDate));\r\n dispatch(processActions.setHolidays(holidays));\r\n\r\n dispatch(processActions.storeNextBusiessDay(day));\r\n dispatch(processActions.changeDate(day));\r\n dispatch(processActions.changeBidsDueTime(dateTimeUtils.timestampToUtcString(constants.bidDueDefaultTimestamp)));\r\n dispatch(processActions.changeGoodUntilTime(dateTimeUtils.timestampToUtcString(constants.goodUntilDefaultTimestamp)));\r\n\r\n const { state = {} } = history.location;\r\n const { dateTime } = state;\r\n\r\n if (dateTime) {\r\n const date = moment(dateTime, constants.dateTimeFormatUtc).format('YYYY-MM-DD[T]00:00:00');\r\n const time = moment(dateTime, constants.formatTimeStringWithoutTimeZone).format('hh A');\r\n const dueTime = dateTimeUtils.timestampToUtcString(time);\r\n dispatch(processActions.changeDate(date));\r\n dispatch(processActions.changeBidsDueTime(dueTime));\r\n }\r\n }\r\n\r\n const columns = (headers || gridColumns.securitiesWithoutPxTalkAndColor())\r\n .map(c => {\r\n if (c.name === gridColumns.isinCusip.name) {\r\n return {\r\n ...c,\r\n type: 'lookup',\r\n lookup: {\r\n compareCallback: (searchTerm, lookupItem) => {\r\n const security = lookupItem.payload;\r\n return (\r\n security.isin?.toLowerCase().startsWith(searchTerm) ||\r\n security.cusip?.toLowerCase().startsWith(searchTerm)\r\n );\r\n },\r\n fetchCallback: async (searchTerm, abortSignal) => {\r\n const securities = await bwicService.searchSecuritiesGlobal(searchTerm, false, abortSignal);\r\n return securities.map(s => ({\r\n text: s.isinCusip,\r\n description: s.ticker,\r\n payload: s\r\n }))\r\n },\r\n onLookupItemSelected: lookupItem => dispatch(insertSelectedSecurity(lookupItem.payload))\r\n }\r\n };\r\n } else if (c.name === gridColumns.ticker.name) {\r\n return {\r\n ...c,\r\n type: 'lookup',\r\n lookup: {\r\n fetchCallback: async (searchTerm, abortSignal) => {\r\n const securities = await bwicService.searchSecuritiesGlobal(searchTerm, true, abortSignal);\r\n return securities.map(s => ({\r\n text: s.ticker,\r\n description: s.isinCusip,\r\n payload: s\r\n }))\r\n },\r\n onLookupItemSelected: lookupItem => dispatch(insertSelectedSecurity(lookupItem.payload))\r\n }\r\n };\r\n }\r\n\r\n return c;\r\n })\r\n\r\n if (queryParams.toString().length > 0) {\r\n dispatch(securitiesActions.insertSecurityFromQueryParams(queryParams))\r\n }\r\n\r\n dispatch(gridActions.init(positions, columns, rowsLimit));\r\n } catch (e) {\r\n dispatch(errorActions.criticalError(e));\r\n } finally {\r\n dispatch(initializing(false));\r\n }\r\n }\r\n}\r\n\r\nfunction insertSecurityFromQueryParams(queryParams) {\r\n return dispatch => {\r\n const tickers = queryParams.get('tickers');\r\n const isins = queryParams.get('isins');\r\n const cusips = queryParams.get('cusips');\r\n\r\n const tickersQueryParams = tickers ? tickers.split(',') : [];\r\n const isinsQueryParams = isins ? isins.split(',') : [];\r\n const cusipsQueryParams = cusips ? cusips.split(',') : [];\r\n\r\n const securityFromQueryParams = [...tickersQueryParams, ...isinsQueryParams, ...cusipsQueryParams].join('\\n');\r\n\r\n dispatch(securitiesActions.handleClipboardData(securityFromQueryParams))\r\n };\r\n}\r\n\r\nfunction initializing(isInitializing) {\r\n return {\r\n type: actionTypes.INITIALIZING,\r\n isInitializing\r\n };\r\n}\r\n\r\nfunction uploadSecurities(file, mergeWithPrevious) {\r\n return (dispatch, getState) => {\r\n const { position, upload, mountedKey } = getState().grid;\r\n\r\n if (upload.status === uploadStatus.uploading) {\r\n return;\r\n }\r\n\r\n const extension = (file.name.split('.').pop() || '').toLowerCase();\r\n\r\n if (extension !== 'csv' && extension !== 'xlsx') {\r\n dispatch(errorActions.error(\r\n null,\r\n errorMessages.invalidFileType,\r\n 'Invalid file type.'\r\n ));\r\n return;\r\n\r\n } else if (file.size > constants.gridFileUploadMaximumSize * 1024 * 1024) {\r\n dispatch(errorActions.error(\r\n null,\r\n errorMessages.fileSizeLimitExceeded(constants.gridFileUploadMaximumSize),\r\n 'The file is too big.'\r\n ));\r\n return;\r\n }\r\n\r\n if (position.editing) {\r\n dispatch(gridActions.applyOrCancelEdit());\r\n }\r\n\r\n bwicService\r\n .uploadSecurities(file, progress)\r\n .then(success, failure);\r\n\r\n dispatch(gridActions.setUploadState(uploadStatus.uploading, 0, file.name));\r\n\r\n function success(positions) {\r\n const currentMountedKey = getState().grid.mountedKey;\r\n if (mountedKey === currentMountedKey) {\r\n if (mergeWithPrevious) {\r\n positions.forEach(s => normalizeParsedInventoryPosition(s));\r\n const dataItems = getState().grid.dataItems.filter((i) => !i.draft);\r\n const merged = mergeDataItems(dataItems, positions);\r\n dispatch(gridActions.clear());\r\n dispatch(gridActions.addDataItems(merged));\r\n dispatch(ensureFlaggedModalShown(merged));\r\n } else {\r\n positions.forEach(s => setSecurityNew(s));\r\n dispatch(gridActions.addDataItems(positions));\r\n }\r\n dispatch(gridActions.validate());\r\n setTimeout(\r\n () => dispatch(gridActions.setUploadState(uploadStatus.none)),\r\n 500\r\n );\r\n }\r\n }\r\n\r\n function failure(e) {\r\n dispatch(gridActions.setUploadState(uploadStatus.none));\r\n const currentMountedKey = getState().grid.mountedKey;\r\n if (mountedKey === currentMountedKey) {\r\n dispatch(errorActions.unexpectedError(e));\r\n }\r\n }\r\n\r\n function progress(e) {\r\n const currentMountedKey = getState().grid.mountedKey;\r\n if (e.lengthComputable && mountedKey === currentMountedKey) {\r\n var percentComplete = (e.loaded / e.total) * 100;\r\n dispatch(gridActions.setUploadState(uploadStatus.uploading, percentComplete, file.name));\r\n }\r\n }\r\n }\r\n}\r\n\r\nfunction reset() {\r\n return dispatch => {\r\n dispatch(gridActions.reset());\r\n dispatch({ type: actionTypes.RESET });\r\n };\r\n}\r\n\r\nfunction insertSelectedSecurity(security) {\r\n return (dispatch, getState) => {\r\n const { position, dataItems } = getState().grid;\r\n const { size, errors } = dataItems[position.index] || {};\r\n\r\n const dataItem = {\r\n ...security,\r\n id: undefined,\r\n securityId: security.id,\r\n size\r\n };\r\n\r\n dispatch(gridActions.cancelEdit());\r\n dispatch(gridActions.replaceDataItem(dataItem, position.index));\r\n\r\n if (errors && errors.length) {\r\n // trigger validation to resolve duplicate errors\r\n dispatch(gridActions.validate());\r\n }\r\n }\r\n}\r\n\r\nfunction handleClipboardData(clipboardData, mergeWithPrevious) {\r\n return (dispatch, getState) => {\r\n const { position = { index: 0 } } = getState().grid;\r\n\r\n dispatch(gridActions.dataProcessing(true));\r\n\r\n bwicService\r\n .parseSecuritiesStirng(clipboardData)\r\n .then(success, e => dispatch(errorActions.unexpectedError(e)))\r\n .finally(() => dispatch(gridActions.dataProcessing(false)));\r\n\r\n function success(securities) {\r\n if (mergeWithPrevious) {\r\n securities.forEach(s => normalizeParsedInventoryPosition(s));\r\n const dataItems = getState().grid.dataItems.filter((i) => !i.draft);\r\n const merged = mergeDataItems(dataItems, securities);\r\n dispatch(gridActions.clear());\r\n dispatch(gridActions.addDataItems(merged));\r\n dispatch(ensureFlaggedModalShown(merged));\r\n } else {\r\n securities.forEach(s => setSecurityNew(s));\r\n dispatch(gridActions.insertDataItems(securities, position.index));\r\n }\r\n dispatch(gridActions.validate());\r\n }\r\n };\r\n}\r\n\r\nfunction mergeDataItems(\r\n actualItems,\r\n updatedItems) {\r\n if (!actualItems.length) {\r\n return updatedItems.map(i => ({ ...i, isNew: true }));\r\n }\r\n\r\n const actualItemsCopy = [...actualItems].map(el => ({ ...el, isFlagged: true }));\r\n const newItems = [];\r\n\r\n updatedItems.forEach(u => {\r\n const actualIndex = actualItems.findIndex(a => a.securityId && a.securityId === u.securityId);\r\n if (actualIndex < 0) {\r\n newItems.push({ ...u, isNew: true });\r\n } else if (!isEqual(actualItems[actualIndex], u)) {\r\n actualItemsCopy[actualIndex] = { ...u, isUpdate: true };\r\n } else {\r\n actualItemsCopy[actualIndex] = { ...actualItems[actualIndex], isUpdate: false, isNew: false, isFlagged: false };\r\n }\r\n });\r\n\r\n return actualItemsCopy.concat(newItems);\r\n}\r\n\r\nfunction isEqual(actual, update) {\r\n const valueOrEmpty = (value) => value ?? '';\r\n\r\n return (\r\n actual.securityId === update.securityId &&\r\n actual.isinCusip === update.isinCusip &&\r\n valueOrEmpty(actual.size) === valueOrEmpty(update.size) &&\r\n actual.ticker === update.ticker &&\r\n valueOrEmpty(actual.currency) === valueOrEmpty(update.currency) &&\r\n valueOrEmpty(actual.rating) === valueOrEmpty(update.rating)\r\n );\r\n}\r\n\r\nfunction setSecurityNew(security) {\r\n security.isNew = true;\r\n security.securityId = security.id;\r\n security.id = undefined;\r\n}\r\n\r\nfunction normalizeParsedInventoryPosition(security) {\r\n security.securityId = security.id;\r\n security.id = undefined;\r\n}\r\n\r\nfunction setFlaggedModal(isFlaggedModalVisible) {\r\n return {\r\n type: actionTypes.SECURITIES_SET_FLAGGED_MODAL,\r\n isFlaggedModalVisible\r\n };\r\n}\r\n\r\nconst ensureFlaggedModalShown = (merged) => {\r\n return (dispatch) => {\r\n const isFlaggedExists = merged.some((item => item.isFlagged));\r\n if (isFlaggedExists) {\r\n dispatch(setFlaggedModal(true));\r\n }\r\n }\r\n}\r\n\r\nfunction savePxTalks() {\r\n return (dispatch, getState) => {\r\n const { pxTalks } = getState().changePxTalk;\r\n if (pxTalks.every(p => !p.error)) {\r\n dispatch(gridActions.editing(pxTalks));\r\n dispatch(gridActions.applyEdit());\r\n dispatch(changePxTalkActions.reset());\r\n dispatch(gridActions.blockInput(false));\r\n }\r\n };\r\n}\r\n\r\nfunction saveColor() {\r\n return (dispatch, getState) => {\r\n const { color, errors } = getState().changeColor;\r\n if (errors.isValid) {\r\n dispatch(gridActions.editing(color));\r\n dispatch(gridActions.applyEdit());\r\n dispatch(changeColorActions.reset());\r\n dispatch(gridActions.blockInput(false));\r\n }\r\n };\r\n}\r\n\r\nfunction validateTradeLimits() {\r\n return async (dispatch, getState) => {\r\n const { process, grid } = getState();\r\n const positions = grid.dataItems.filter(item => !item.draft);\r\n\r\n if (!process.date && !positions.length) return;\r\n\r\n dispatch({ type: actionTypes.VALIDATE_TRADE_LIMITS_REQUEST });\r\n\r\n try {\r\n await bwicService.validateTradeLimits(process.date, process.bidsDue, process.timeZone, positions);\r\n dispatch({ type: actionTypes.VALIDATE_TRADE_LIMITS_SUCCESS });\r\n } catch (e) {\r\n dispatch(errorActions.unexpectedError(e));\r\n dispatch({ type: actionTypes.VALIDATE_TRADE_LIMITS_ERROR });\r\n }\r\n }\r\n\r\n}\r\n","import { formsActions as actionTypes } from '../constants';\r\n\r\nexport const formsActions = {\r\n activateValidation,\r\n reset\r\n}\r\n\r\nfunction activateValidation() {\r\n return { type: actionTypes.DISPLAY_VALIDATION_ERRORS, activate: true }\r\n}\r\n\r\nfunction reset() {\r\n return { type: actionTypes.DISPLAY_VALIDATION_ERRORS, activate: false }\r\n}\r\n","import moment from 'moment';\r\nimport { size } from 'lodash';\r\nimport { store } from '../store';\r\nimport {\r\n newBWICActions as actionTypes,\r\n newBWICSteps as steps,\r\n roles,\r\n routes\r\n} from '../constants';\r\nimport { bwicService } from '../services/bwic.service';\r\nimport {\r\n securitiesActions,\r\n gridActions,\r\n processActions,\r\n documentsActions,\r\n submitActions,\r\n errorActions\r\n} from './';\r\nimport { formsActions } from './forms.actions';\r\nimport { dealerListActions } from './dealer-list.actions';\r\nimport { newBwicDealersActions } from './new-bwic-dealers.actions';\r\nimport { isRequesting, isRequestSuccess } from '../utils/request-state.utils';\r\nimport { RequestState } from '../constants/request-state';\r\nimport { dateTimeUtils } from '../utils';\r\nimport { newBwicDealersSelector } from '../selectors/new-bwic-dealers.selector';\r\nimport { BwicProcessType } from '../types/models/Process';\r\nimport { CompanyStatus } from '../types/company/CompanyStatus';\r\nimport { user } from '../user';\r\nimport { history } from '../history';\r\n\r\nexport const newBWICActions = {\r\n init,\r\n nextStep,\r\n previousStep,\r\n submit,\r\n setSearchTerm,\r\n updateFilterOption,\r\n clearFilterOptions,\r\n reset\r\n};\r\n\r\nfunction init(referenceName) {\r\n return async dispatch => {\r\n if (referenceName) {\r\n try {\r\n const bwic = await bwicService.getByReferenceName(referenceName);\r\n dispatch({\r\n type: actionTypes.EDIT_BWIC,\r\n bwic\r\n });\r\n } catch (e) {\r\n dispatch(errorActions.criticalError(e));\r\n }\r\n }\r\n dispatch(changeStep(steps.securities));\r\n };\r\n}\r\n\r\nfunction reset() {\r\n return dispatch => {\r\n dispatch(securitiesActions.reset());\r\n dispatch(processActions.reset());\r\n dispatch(dealerListActions.reset());\r\n dispatch(newBwicDealersActions.reset());\r\n dispatch(documentsActions.reset());\r\n dispatch(submitActions.reset());\r\n dispatch({ type: actionTypes.RESET_WIZARD });\r\n }\r\n}\r\n\r\nfunction nextStep() {\r\n return async (dispatch, getState) => {\r\n let isValid = true;\r\n const { activeStep } = getState().newBWIC;\r\n\r\n if (activeStep === steps.securities) {\r\n dispatch(gridActions.validate());\r\n dispatch(processActions.validate());\r\n const { grid, process } = getState();\r\n isValid = grid.isValid && !process.errors.date && !process.errors.time;\r\n if (isValid) {\r\n await dispatch(securitiesActions.validateTradeLimits());\r\n isValid = isRequestSuccess(getState().securities.validateTradeLimitsRequestState);\r\n }\r\n\r\n } else if (activeStep === steps.process) {\r\n dispatch(processActions.validate());\r\n const { process } = getState();\r\n isValid = process.isValid;\r\n\r\n } else if (activeStep === steps.participants) {\r\n const selectedDealers = getState().newBwicDealers.selectedDealers;\r\n const selectPlatformDealersPopupVisible = getState().newBwicDealers.selectPlatformDealersPopupVisible;\r\n const notSelectedPlatformDealers = newBwicDealersSelector(getState())\r\n .filter(c => !selectedDealers[c.id] && c.status === CompanyStatus.active);\r\n\r\n if (notSelectedPlatformDealers.length !== 0 && !selectPlatformDealersPopupVisible) {\r\n dispatch(newBwicDealersActions.setSelectPlatformDealersPopupVisible(true));\r\n isValid = false;\r\n } else {\r\n isValid = !!size(selectedDealers);\r\n }\r\n } else {\r\n isValid = true;\r\n }\r\n\r\n if (isValid) {\r\n const { newBWIC } = getState();\r\n\r\n const stepKeys = Object.keys(steps);\r\n\r\n const activeStepIndex = stepKeys.findIndex(key => newBWIC.activeStep === steps[key]);\r\n const nextStepKey = stepKeys[activeStepIndex + 1];\r\n\r\n dispatch(changeStep(steps[nextStepKey]));\r\n }\r\n }\r\n}\r\n\r\nfunction previousStep() {\r\n const { newBWIC } = store.getState();\r\n\r\n const stepKeys = Object.keys(steps);\r\n\r\n const activeStepIndex = stepKeys.findIndex(key => newBWIC.activeStep === steps[key]);\r\n const previousStepKey = stepKeys[activeStepIndex - 1];\r\n\r\n return changeStep(steps[previousStepKey]);\r\n}\r\n\r\nfunction changeStep(step) {\r\n return dispatch => {\r\n dispatch(formsActions.reset());\r\n dispatch({\r\n type: actionTypes.CHANGE_STEP,\r\n step\r\n });\r\n }\r\n}\r\n\r\nfunction submit() {\r\n return (dispatch, getState) => {\r\n const requestState = getState().submit.requestState;\r\n\r\n if (isRequesting(requestState) || isRequestSuccess(requestState)) return null;\r\n\r\n const { grid, process, newBwicDealers } = getState();\r\n\r\n const companies = newBwicDealersSelector(getState())\r\n .filter(c => newBwicDealers.selectedDealers[c.id])\r\n .map(c => ({ id: c.id }));\r\n const template = process.templates.current;\r\n\r\n const getLiveBiddingSettings = () => template.type === BwicProcessType.Live\r\n ? {\r\n stage1Deadline: template.liveBidding.stage1Deadline,\r\n improvementRound: template.liveBidding.improvementRound,\r\n minBidIncrement: template.liveBidding.minBidIncrement,\r\n levelSpecificationType: template.liveBidding.levelSpecificationType,\r\n openBiddingImproverCount: template.liveBidding.openBiddingImproverCount\r\n }\r\n : {};\r\n\r\n const getJumpBallSettings = () => template.type === BwicProcessType.JumpBall\r\n ? {\r\n jumpBallAutomaticStage1Deadline: template.jumpBall.automaticStage1Deadline,\r\n jumpBallImproverCount: template.jumpBall.improverCount,\r\n jumpBallImprovementRound: template.jumpBall.improvementRound\r\n }\r\n : {};\r\n\r\n const getTopXSettings = () => template.type === BwicProcessType.TopX\r\n ? {\r\n topXAutomaticStage1Deadline: template.topX.automaticStage1Deadline,\r\n topXImproverCount: template.topX.improverCount,\r\n topXImprovementRound: template.topX.improvementRound\r\n }\r\n : {};\r\n\r\n const getBestFootForwardSettings = () => template.type === BwicProcessType.BestFootForward\r\n ? {\r\n BffStage1Deadline: template.bff.stage1Deadline\r\n }\r\n : {};\r\n\r\n const getAutoFeedbackDelay = () =>\r\n template.type === BwicProcessType.Standard ||\r\n template.type === BwicProcessType.TopX ||\r\n template.type === BwicProcessType.JumpBall\r\n ? template.autoFeedbackDelay\r\n : undefined\r\n\r\n const getMinBidIncrement = () => template.minBidIncrement && (\r\n template.type === BwicProcessType.Standard ||\r\n template.type === BwicProcessType.TopX ||\r\n template.type === BwicProcessType.JumpBall ||\r\n template.type === BwicProcessType.BestFootForward)\r\n ? Number(template.minBidIncrement)\r\n : undefined\r\n\r\n const getIsAlltoAllProtocol = () =>\r\n process.isAllToAll ?? user.hasRoles(roles.BrokerDealerTrader)\r\n ? true\r\n : false\r\n\r\n const bwic = {\r\n bidsDue: dateTimeUtils.setTime(process.date, moment.utc(process.bidsDue)).utcOffset(0, true).toISOString(),\r\n goodUntil: dateTimeUtils.setTime(process.date, moment.utc(process.goodUntil)).utcOffset(0, true).toISOString(),\r\n daysToSettle: process.daysToSettle,\r\n timeZone: process.timeZone,\r\n securities: grid.dataItems.filter(s => !s.draft),\r\n process: {\r\n type: template.type,\r\n reserveLevelsApply: template.reserveLevelsApply,\r\n earlyTrades: template.earlyTrades,\r\n rulesText: template.rulesText,\r\n processTemplateId: template.id,\r\n autoFeedbackDelay: getAutoFeedbackDelay(),\r\n minBidIncrement: getMinBidIncrement(),\r\n cutOffReminder: template.cutOffReminder,\r\n ...getLiveBiddingSettings(),\r\n ...getJumpBallSettings(),\r\n ...getTopXSettings(),\r\n ...getBestFootForwardSettings()\r\n },\r\n companies,\r\n isAllToAll: getIsAlltoAllProtocol()\r\n };\r\n\r\n dispatch(submitActions.submitState(RequestState.request));\r\n\r\n bwicService\r\n .submit(bwic)\r\n .then((bwicReferenceName) => {\r\n dispatch(submitActions.submitState(RequestState.success, bwicReferenceName))\r\n history.replace({\r\n pathname: routes.newBWICCreated,\r\n state: {\r\n date: process.date,\r\n bidsDue: process.bidsDue,\r\n timeZone: process.timeZone,\r\n bwicReferenceName,\r\n }\r\n })\r\n })\r\n .catch(e => {\r\n dispatch(submitActions.submitState(RequestState.failure));\r\n dispatch(errorActions.unexpectedError(e));\r\n });\r\n }\r\n}\r\n\r\nfunction setSearchTerm(searchTerm) {\r\n return {\r\n type: actionTypes.DEALERS_SET_SEARCH_TERM,\r\n payload: { searchTerm }\r\n };\r\n}\r\n\r\nfunction updateFilterOption(filterOption) {\r\n return {\r\n type: actionTypes.DEALERS_UPDATE_FILTER_OPTION,\r\n payload: { filterOption }\r\n };\r\n}\r\n\r\nfunction clearFilterOptions() {\r\n return { type: actionTypes.DEALERS_CLEAR_FILTER_OPTIONS }\r\n}\r\n","import { uploadDocumentsActions } from '.';\r\n\r\nexport const documentsActions = {\r\n init,\r\n reset,\r\n}\r\n\r\nfunction init() {\r\n return (dispatch, getState) => {\r\n const { grid } = getState();\r\n\r\n const securityIdList = grid.dataItems\r\n .filter(s => !s.draft)\r\n .map(s => s.securityId);\r\n\r\n dispatch(uploadDocumentsActions.init(securityIdList));\r\n }\r\n}\r\n\r\nfunction reset() {\r\n return dispatch => {\r\n dispatch(uploadDocumentsActions.reset());\r\n };\r\n}\r\n","import { submitActions as actionTypes } from '../constants';\r\nimport { errorActions } from '.';\r\nimport { companiesService } from '../services';\r\n\r\nexport const submitActions = {\r\n submitState,\r\n init,\r\n reset\r\n}\r\n\r\nfunction init() {\r\n return async (dispatch, getState) => {\r\n const { userCompany } = getState().submit;\r\n\r\n if (userCompany) return;\r\n\r\n try {\r\n const company = await companiesService.getCurrentUserCompany();\r\n\r\n dispatch({\r\n type: actionTypes.STORE_USER_COMPANY,\r\n company\r\n });\r\n }\r\n catch (e) {\r\n dispatch(errorActions.criticalError(e));\r\n }\r\n };\r\n}\r\n\r\nfunction submitState(state, bwicReferenceName) {\r\n return { type: actionTypes.SUBMIT_STATE, state, bwicReferenceName };\r\n}\r\n\r\nfunction reset() {\r\n return { type: actionTypes.RESET };\r\n}\r\n","import { saveAs } from 'file-saver';\r\nimport { errorActions, notificationActions } from './';\r\nimport { portfolioService } from '../services';\r\nimport { editPortfolioActions as actionTypes, errorMessages, routes } from '../constants';\r\nimport { securitiesActions, gridActions } from '.';\r\nimport { activeInventorySecurityActions } from './active-inventory-security.actions';\r\nimport { history } from '../history';\r\nimport { portfolioListActions } from './portfolio-list.actions';\r\n\r\nexport const editPortfolioActions = {\r\n init,\r\n reset,\r\n createNewPortfolio,\r\n renamePortfolioDialog,\r\n updatePortfolioSecurities,\r\n deletePortfolioDialog,\r\n deletePortfolio,\r\n exportPortfolio\r\n}\r\n\r\nfunction init(portfolioReferenceName) {\r\n return dispatch => {\r\n dispatch(loading(true));\r\n portfolioService\r\n .getPortfolio(portfolioReferenceName)\r\n .then(success, e => dispatch(errorActions.criticalError(e)))\r\n .then(() => dispatch(loading(false)));\r\n\r\n function success(portfolio) {\r\n dispatch({ type: actionTypes.PORTFOLIO_LOADED, portfolio });\r\n dispatch(securitiesActions.init(portfolio.securities));\r\n }\r\n };\r\n}\r\n\r\nfunction loading(isLoading) {\r\n return {\r\n type: actionTypes.EDIT_PORTFOLIO_LOADING,\r\n isLoading\r\n };\r\n}\r\n\r\nfunction renamePortfolioDialog(visible) {\r\n return dispatch => {\r\n dispatch({\r\n type: actionTypes.RENAME_DIALOG_VISIBLE,\r\n dialog: { visible }\r\n })\r\n\r\n dispatch(gridActions.blockInput(visible));\r\n };\r\n}\r\n\r\nfunction createNewPortfolio(portfolioName) {\r\n return (dispatch, getState) => {\r\n dispatch(gridActions.validate());\r\n const { grid } = getState();\r\n const securities = grid.dataItems.filter(s => !s.draft);\r\n\r\n if (!grid.isValid && securities.length) {\r\n return dispatch(notificationActions.notificationAddErrorMessage(errorMessages.portfolioSaveSecuritiesMessage, errorMessages.portfolioSaveSecuritiesTitle))\r\n }\r\n dispatch({type: actionTypes.PORTFOLIO_UPDATE_REQUEST});\r\n portfolioService.createNewPortfolio(portfolioName, securities)\r\n .then(() => {\r\n dispatch({type: actionTypes.PORTFOLIO_UPDATE_SUCCESS});\r\n dispatch({ type: actionTypes.PORTFOLIO_SAVED });\r\n dispatch(activeInventorySecurityActions.reset());\r\n dispatch(portfolioListActions.reset());\r\n history.replace(routes.portfolio);\r\n })\r\n .catch((e) => {\r\n dispatch({ type: actionTypes.PORTFOLIO_UPDATE_FAILURE });\r\n dispatch(errorActions.unexpectedError(e));\r\n })\r\n }\r\n}\r\n\r\nfunction updatePortfolioSecurities(updatedPortfolioName) {\r\n return async (dispatch, getState) => {\r\n dispatch(gridActions.validate());\r\n const { editPortfolio, grid } = getState();\r\n const securities = grid.dataItems.filter(s => !s.draft);\r\n\r\n if (!grid.isValid && securities.length) {\r\n return dispatch(notificationActions.notificationAddErrorMessage(errorMessages.portfolioSaveSecuritiesMessage, errorMessages.portfolioSaveSecuritiesTitle))\r\n }\r\n dispatch({type: actionTypes.PORTFOLIO_UPDATE_REQUEST});\r\n\r\n if (updatedPortfolioName) {\r\n try {\r\n await portfolioService.renamePortfolio(editPortfolio.portfolio.id, updatedPortfolioName)\r\n } catch (e) {\r\n dispatch(errorActions.unexpectedError(e))\r\n dispatch({ type: actionTypes.PORTFOLIO_UPDATE_FAILURE });\r\n return;\r\n }\r\n }\r\n try {\r\n await portfolioService.savePositions(editPortfolio.portfolio.id, securities)\r\n dispatch({type: actionTypes.PORTFOLIO_UPDATE_SUCCESS});\r\n dispatch({ type: actionTypes.PORTFOLIO_SAVED });\r\n dispatch(activeInventorySecurityActions.reset());\r\n dispatch(portfolioListActions.reset());\r\n history.replace(routes.portfolio);\r\n } catch (e) {\r\n dispatch({ type: actionTypes.PORTFOLIO_UPDATE_FAILURE });\r\n dispatch(errorActions.unexpectedError(e));\r\n }\r\n\r\n }\r\n}\r\n\r\nfunction deletePortfolioDialog(visible) {\r\n return {\r\n type: actionTypes.DELETE_PORTFOLIO_DIALOG,\r\n dialog: { visible }\r\n };\r\n}\r\n\r\nfunction deletePortfolio(portfolioId) {\r\n return dispatch => {\r\n portfolioService\r\n .deletePortfolio(portfolioId)\r\n .then(success)\r\n .catch(e => dispatch(errorActions.unexpectedError(e)));\r\n\r\n function success() {\r\n dispatch({ type: actionTypes.PORTFOLIO_DELETED });\r\n history.replace(routes.portfolio);\r\n }\r\n }\r\n}\r\n\r\nfunction setRequestingExportState(status) {\r\n return { type: actionTypes.PORTFOLIO_SET_REQUESTING_EXPORT_STATE, payload: { status }}\r\n}\r\n\r\nfunction exportPortfolio(id){\r\n return (dispatch) => {\r\n dispatch(setRequestingExportState(true));\r\n portfolioService\r\n .exportPortfolio(id)\r\n .then(file => saveAs(file.blob, file.name || 'portfolio.csv'))\r\n .catch(e => dispatch(errorActions.unexpectedError(e)))\r\n .finally(() => dispatch(setRequestingExportState(false)));\r\n };\r\n}\r\n\r\nfunction reset() {\r\n return dispatch => {\r\n dispatch({ type: actionTypes.RESET });\r\n dispatch(securitiesActions.reset());\r\n dispatch(errorActions.resetError());\r\n }\r\n}\r\n","import {\r\n manageParsedBwicsActions as actionTypes,\r\n bwicDateFilterOptions,\r\n errorMessages,\r\n routes\r\n} from \"../constants\";\r\nimport { parsedBwicsService, pxTalkService, colorService } from \"../services\";\r\nimport {\r\n changePxTalkActions,\r\n changeColorActions,\r\n errorActions,\r\n editParsedBwicActions as editActions,\r\n searchSecuritiesActions,\r\n notificationActions\r\n} from \".\";\r\nimport { getSearchDateRange, getDateRangeOption } from '../utils';\r\nimport { identifiers, dateFrom, dateTo, statuses, published } from '../utils/filtering/serializers/serializer.definitions';\r\nimport { queryStringSerializer } from '../utils/filtering';\r\nimport { priceTalksActions } from './price-talks.actions';\r\nimport { history } from \"../history\";\r\nimport { textRulesPanelActions } from \"./text-rules-panel.actions\";\r\n\r\nexport const manageParsedBwicsActions = {\r\n init,\r\n reset,\r\n search,\r\n refreshLastUpdatedDate,\r\n resetFilters,\r\n filterDateChange,\r\n filterCustomDateChange,\r\n filterStatusChange,\r\n filterPublishedChange,\r\n setBwicCollapsedState,\r\n setCollapseAll,\r\n securitySelectionChange,\r\n publishDialog,\r\n unpublishDialog,\r\n deleteBwicDialog,\r\n publish,\r\n unpublish,\r\n editPxTalk,\r\n savePxTalk,\r\n editColor,\r\n saveColor,\r\n deleteColor,\r\n showNewBwic,\r\n deleteBwic,\r\n changeAmrFlag,\r\n loadNextPage\r\n}\r\n\r\nfunction init(filterQueryString) {\r\n return async (dispatch) => {\r\n dispatch(loading(true));\r\n dispatch(searchSecuritiesActions.reset());\r\n try {\r\n const queryString = filterQueryString && filterQueryString.trim();\r\n\r\n if (queryString) {\r\n dispatch(resetFilters(false));\r\n dispatch(loadFilterFromQueryString(queryString));\r\n }\r\n\r\n dispatch(search());\r\n } catch (e) {\r\n dispatch(errorActions.criticalError(e));\r\n }\r\n finally {\r\n dispatch(loading(false));\r\n }\r\n }\r\n}\r\n\r\nfunction loadFilterFromQueryString(queryString) {\r\n return dispatch => {\r\n let from, to;\r\n\r\n const serializers = [\r\n identifiers(handleIdentifiersDeserialized),\r\n dateFrom(date => from = date),\r\n dateTo(date => to = date),\r\n statuses(handleStatusDeserialized),\r\n published(published => dispatch(filterPublishedChange(published)))\r\n ];\r\n\r\n queryStringSerializer.deserialize(queryString, serializers);\r\n\r\n dispatch(initFilterDateRange(from, to));\r\n\r\n function handleIdentifiersDeserialized(identifiers) {\r\n identifiers.forEach(i => dispatch(searchSecuritiesActions.addSearchItem(i)));\r\n }\r\n\r\n function handleStatusDeserialized(statuses) {\r\n const statusKeys = statuses.map(s => Number(s))\r\n dispatch(filterStatusChange(...statusKeys));\r\n }\r\n };\r\n}\r\n\r\nfunction initFilterDateRange(dateFrom, dateTo) {\r\n return dispatch => {\r\n const { option, customRange } = getDateRangeOption(dateFrom, dateTo);\r\n\r\n dispatch(filterDateChange(option));\r\n if (option.key === bwicDateFilterOptions.custom.key) {\r\n dispatch(filterCustomDateChange(customRange));\r\n }\r\n };\r\n}\r\n\r\n\r\nfunction reset(hardReset = false) {\r\n return (dispatch, getState) => {\r\n const { lastAppliedSearchTerm } = getState().searchSecurities;\r\n\r\n dispatch(searchSecuritiesActions.reset());\r\n dispatch(errorActions.resetError());\r\n dispatch({\r\n type: actionTypes.RESET,\r\n searchTerm: lastAppliedSearchTerm,\r\n hardReset\r\n });\r\n };\r\n}\r\n\r\nfunction resetFilters(shouldSearch = true) {\r\n return dispatch => {\r\n dispatch({ type: actionTypes.RESET_FILTERS });\r\n if (shouldSearch) {\r\n dispatch(search());\r\n }\r\n };\r\n}\r\n\r\nfunction refreshLastUpdatedDate() {\r\n return { type: actionTypes.REFRESH_LAST_UPDATED_DATE }\r\n}\r\n\r\nfunction loading(isLoading) {\r\n return {\r\n type: actionTypes.LOADING,\r\n isLoading\r\n };\r\n}\r\n\r\nfunction search() {\r\n return (dispatch, getState) => {\r\n const firstPageNumber = 1;\r\n const { isNextPageRequesting } = getState().manageParsedBwics;\r\n if (!isNextPageRequesting) {\r\n dispatch(resetPaging());\r\n dispatch(searchInProgress());\r\n dispatch(textRulesPanelActions.hide());\r\n }\r\n\r\n const state = getState();\r\n const searchCriteria = getSearchCriteria(state);\r\n const { currentPageNumber, pageSize } = state.manageParsedBwics;\r\n\r\n const nextPageNumber = isNextPageRequesting ? currentPageNumber + 1 : firstPageNumber;\r\n parsedBwicsService\r\n .search(searchCriteria, nextPageNumber, pageSize)\r\n .then(success)\r\n .catch(failure)\r\n .finally(() => dispatch(nextPageRequesting(false)));\r\n\r\n function success({ totalRecordNumber, result }) {\r\n dispatch(redirectWithFilterArguments(searchCriteria));\r\n dispatch({\r\n type: actionTypes.SEARCH_COMPLETE,\r\n bwics: result,\r\n totalRecordNumber,\r\n isNextPageRequesting,\r\n nextPageNumber\r\n });\r\n }\r\n\r\n function failure(e) {\r\n dispatch(resetFilters(false));\r\n dispatch(errorActions.criticalError(e));\r\n }\r\n }\r\n}\r\n\r\nfunction redirectWithFilterArguments(filter) {\r\n return () => {\r\n const serializers = [identifiers(), statuses(), dateFrom(), dateTo(), published()];\r\n const queryString = queryStringSerializer.serialize(filter, serializers);\r\n\r\n if (queryString) {\r\n history.replace(history.location.pathname + '?' + queryString);\r\n }\r\n }\r\n}\r\n\r\nfunction getPublishedOption(options) {\r\n if (options[0] && options[0].selected && !options[1].selected) return true;\r\n if (options[0] && options[1].selected && !options[0].selected) return false;\r\n return null;\r\n}\r\n\r\nfunction getSearchCriteria({ manageParsedBwics, searchSecurities }) {\r\n const { isNextPageRequesting, filter, lastAppliedFilter } = manageParsedBwics;\r\n const { searchTermItems } = searchSecurities;\r\n const theFilter = isNextPageRequesting ? lastAppliedFilter : filter;\r\n\r\n return {\r\n isinCusipsAndTickers: searchTermItems,\r\n statuses: theFilter.statuses.filter(s => s.selected).map(s => s.value),\r\n published: getPublishedOption(theFilter.stateOptions),\r\n ...getSearchDateRange(theFilter)\r\n };\r\n}\r\n\r\nfunction searchInProgress() {\r\n return { type: actionTypes.SEARCH_PROGRESS };\r\n}\r\n\r\nfunction filterDateChange(option) {\r\n return (dispatch, getState) => {\r\n const { filter } = getState().manageParsedBwics;\r\n\r\n dispatch({\r\n type: actionTypes.FILTER_DATE_CHANGE,\r\n option\r\n });\r\n\r\n if (option.key !== bwicDateFilterOptions.custom.key &&\r\n filter.customDateRange &&\r\n filter.customDateRange.from) {\r\n dispatch(filterCustomDateChange({}));\r\n }\r\n }\r\n}\r\n\r\nfunction filterCustomDateChange(dateRange) {\r\n return {\r\n type: actionTypes.FILTER_CUSTOM_DATE_CHANGE,\r\n dateRange\r\n };\r\n}\r\n\r\nfunction filterStatusChange(...statuses) {\r\n return dispatch => {\r\n dispatch({\r\n type: actionTypes.FILTER_STATUS_SELECTION_CHANGE,\r\n statuses\r\n });\r\n };\r\n}\r\n\r\nfunction filterPublishedChange(published) {\r\n return dispatch => {\r\n dispatch({\r\n type: actionTypes.FILTER_PUBLISHED_STATE_SELECTION_CHANGE,\r\n published\r\n });\r\n }\r\n}\r\n\r\nfunction setBwicCollapsedState(referenceName, collapsed) {\r\n return (dispatch, getState) => {\r\n dispatch({\r\n type: actionTypes.SET_BWIC_COLLAPSED_STATE,\r\n bwic: { referenceName, collapsed }\r\n });\r\n\r\n const { bwics, collapseAll } = getState().manageParsedBwics;\r\n const collapsedCount = bwics.filter(b => b.collapsed).length;\r\n if (collapsedCount === bwics.length && !collapseAll) {\r\n dispatch(setCollapseAll(true));\r\n } else if (collapsedCount === 0 && collapseAll) {\r\n dispatch(setCollapseAll(false));\r\n }\r\n };\r\n}\r\n\r\nfunction setCollapseAll(collapseAll) {\r\n return {\r\n type: actionTypes.SET_COLLAPSE_ALL,\r\n collapseAll\r\n };\r\n}\r\n\r\nfunction securitySelectionChange(bwicReferenceName, positionId, selected) {\r\n return {\r\n type: actionTypes.POSITION_SELECTION_CHANGE,\r\n selection: { bwicReferenceName, positionId, selected }\r\n };\r\n\r\n}\r\n\r\nfunction publishDialog(visible, bwic) {\r\n return {\r\n type: actionTypes.PUBLISH_DIALOG,\r\n dialog: visible ? { visible, bwic } : {}\r\n };\r\n}\r\n\r\nfunction unpublishDialog(visible, bwic) {\r\n return {\r\n type: actionTypes.UNPUBLISH_DIALOG,\r\n dialog: visible ? { visible, bwic } : {}\r\n };\r\n}\r\n\r\nfunction publish(bwic) {\r\n return (dispatch, getState) => {\r\n dispatch(publishDialog(false));\r\n parsedBwicsService\r\n .publish(bwic.referenceName)\r\n .then(\r\n success,\r\n e => dispatch(errorActions.error(e, errorMessages.unexpectedError))\r\n );\r\n\r\n function success() {\r\n const bwics = getState().manageParsedBwics.bwics.map(b =>\r\n b.referenceName === bwic.referenceName\r\n ? { ...b, onReview: false }\r\n : b);\r\n dispatch(updateBwicList(bwics));\r\n }\r\n }\r\n}\r\n\r\nfunction unpublish(bwic) {\r\n return (dispatch, getState) => {\r\n dispatch(unpublishDialog(false));\r\n parsedBwicsService\r\n .unpublish(bwic.referenceName)\r\n .then(\r\n success,\r\n e => dispatch(errorActions.error(e, errorMessages.unexpectedError))\r\n );\r\n\r\n function success() {\r\n const bwics = getState().manageParsedBwics.bwics.map(b =>\r\n b.referenceName === bwic.referenceName\r\n ? { ...b, onReview: true }\r\n : b);\r\n dispatch(updateBwicList(bwics));\r\n }\r\n }\r\n}\r\n\r\nfunction updateBwicList(bwics) {\r\n return { type: actionTypes.UPDATE_BWIC_LIST, payload: { bwics } }\r\n}\r\n\r\nfunction editPxTalk(visible, bwicReferenceName, position) {\r\n return (dispatch, getState) => {\r\n if (visible) {\r\n const preloadedPxTalks = getState().entities.priceTalks.priceTalks[position.id]?.items;\r\n dispatch({\r\n type: actionTypes.EDIT_PXTALK,\r\n editPxTalk: { bwicReferenceName, positionId: position.id, priceTalkLock: position.priceTalkLock }\r\n });\r\n dispatch(changePxTalkActions.init(bwicReferenceName, position.id, position.ticker, preloadedPxTalks || position.pxTalks));\r\n } else {\r\n dispatch({\r\n type: actionTypes.EDIT_PXTALK,\r\n editPxTalk: {}\r\n });\r\n }\r\n };\r\n}\r\n\r\nfunction savePxTalk() {\r\n return (dispatch, getState) => {\r\n const state = getState();\r\n const { pxTalks, deletedPriceTalks } = state.changePxTalk;\r\n const { bwicReferenceName, positionId, priceTalkLock } = state.manageParsedBwics.editPxTalk;\r\n\r\n if (pxTalks && pxTalks.every(p => !p.error)) {\r\n dispatch(changePxTalkActions.reset());\r\n dispatch(editPxTalk(false));\r\n pxTalkService\r\n .save(bwicReferenceName, positionId, pxTalks, priceTalkLock, deletedPriceTalks)\r\n .then(newPriceTalkLock => {\r\n dispatch({\r\n type: actionTypes.UPDATE_PXTALK,\r\n update: { bwicReferenceName, positionId, pxTalks, priceTalkLock: newPriceTalkLock }\r\n });\r\n dispatch(priceTalksActions.replacePriceTalks(positionId, pxTalks));\r\n })\r\n .catch(e => {\r\n if (e.status === 409) {\r\n dispatch(\r\n notificationActions.notificationAddErrorMessageModal(\r\n errorMessages.refreshPage,\r\n errorMessages.cantSavePxTalk409,\r\n true\r\n )\r\n );\r\n } else {\r\n dispatch(errorActions.unexpectedError(e));\r\n }\r\n })\r\n }\r\n };\r\n}\r\n\r\nfunction editColor(visible, bwicReferenceName, position) {\r\n return dispatch => {\r\n if (visible) {\r\n dispatch({\r\n type: actionTypes.EDIT_COLOR,\r\n editColor: { bwicReferenceName, positionId: position.id }\r\n });\r\n dispatch(changeColorActions.init(position.ticker, position.color));\r\n } else {\r\n dispatch({\r\n type: actionTypes.EDIT_COLOR,\r\n editColor: {}\r\n });\r\n }\r\n };\r\n}\r\n\r\nfunction saveColor() {\r\n return (dispatch, getState) => {\r\n const state = getState();\r\n const { color, errors } = state.changeColor;\r\n const { bwicReferenceName, positionId } = state.manageParsedBwics.editColor;\r\n\r\n if (color && errors.isValid) {\r\n dispatch(changeColorActions.reset());\r\n dispatch(editColor(false));\r\n\r\n colorService\r\n .save(bwicReferenceName, positionId, color)\r\n .then(\r\n () => dispatch({\r\n type: actionTypes.UPDATE_COLOR,\r\n update: { bwicReferenceName, positionId, color: { ...color, isNew: false } }\r\n }),\r\n e => dispatch(errorActions.unexpectedError(e))\r\n );\r\n }\r\n };\r\n}\r\n\r\nfunction deleteColor() {\r\n return (dispatch, getState) => {\r\n const { bwicReferenceName, positionId } = getState().manageParsedBwics.editColor;\r\n\r\n dispatch(changeColorActions.reset());\r\n dispatch(editColor(false));\r\n\r\n colorService\r\n .deleteColor(bwicReferenceName, positionId)\r\n .then(\r\n () => dispatch({\r\n type: actionTypes.UPDATE_COLOR,\r\n update: { bwicReferenceName, positionId, undefined }\r\n }),\r\n e => dispatch(errorActions.unexpectedError(e))\r\n );\r\n };\r\n}\r\n\r\nfunction showNewBwic() {\r\n return (dispatch, getState) => {\r\n const { bwics } = getState().manageParsedBwics;\r\n const securities = [];\r\n\r\n for (let i = 0; i < bwics.length; i++) {\r\n if (bwics[i].positions) {\r\n for (let j = 0; j < bwics[i].positions.length; j++) {\r\n if (bwics[i].positions[j].selected) {\r\n securities.push({\r\n ...bwics[i].positions[j],\r\n pxTalks: [],\r\n color: null\r\n });\r\n }\r\n }\r\n }\r\n }\r\n\r\n dispatch(editActions.storeOriginalBwic({ securities }));\r\n history.push(routes.newParsedBWIC);\r\n };\r\n}\r\n\r\nfunction deleteBwicDialog(visible, referenceName) {\r\n return {\r\n type: actionTypes.DELETE_BWIC_DIALOG,\r\n dialog: { visible, referenceName }\r\n };\r\n}\r\n\r\nfunction deleteBwic(referenceName) {\r\n return (dispatch, getState) => {\r\n dispatch(deleteBwicDialog(false));\r\n\r\n parsedBwicsService\r\n .deleteBwic(referenceName)\r\n .then(success)\r\n .catch(e => dispatch(errorActions.error(e, errorMessages.unexpectedError)));\r\n\r\n function success() {\r\n const bwics = getState().manageParsedBwics.bwics\r\n .filter(b => b.referenceName !== referenceName);\r\n\r\n dispatch(updateBwicList(bwics));\r\n }\r\n };\r\n}\r\n\r\nfunction loadNextPage() {\r\n return (dispatch, getState) => {\r\n const { searchInProgress, isNextPageRequesting } = getState().manageParsedBwics;\r\n\r\n if (!searchInProgress && !isNextPageRequesting) {\r\n dispatch(nextPageRequesting(true));\r\n dispatch(search());\r\n }\r\n }\r\n}\r\n\r\nfunction nextPageRequesting(isRequesting) {\r\n return {\r\n type: actionTypes.MANAGE_PARSED_BWICS_NEXT_PAGE_REQUESTING,\r\n isRequesting\r\n }\r\n}\r\n\r\nfunction resetPaging() {\r\n return {\r\n type: actionTypes.MANAGE_PARSED_BWICS_RESET_PAGING\r\n };\r\n}\r\n\r\nfunction setRequestStatusIsAMR(referenceName, isRequesting) {\r\n return { type: actionTypes.MANAGE_PARSED_BWICS_SET_REQUEST_STATUS_IS_AMR, payload: { referenceName, isRequesting } }\r\n}\r\n\r\nfunction changeAmrFlag(referenceName, status) {\r\n return async (dispatch) => {\r\n dispatch(setRequestStatusIsAMR(referenceName, true));\r\n try {\r\n await parsedBwicsService.changeAmrFlag(referenceName, status);\r\n dispatch({ type: actionTypes.MANAGE_PARSED_BWICS_SET_IS_AMR_FLAG, payload: { referenceName, status } });\r\n } catch (e) {\r\n dispatch(errorActions.unexpectedError(e));\r\n } finally {\r\n dispatch(setRequestStatusIsAMR(referenceName, false));\r\n }\r\n }\r\n}\r\n\r\n","import { changePxTalkActions as actionTypes, errorMessages } from '../constants';\r\nimport { pxTalkService } from '../services';\r\nimport { jsonUtils, wait, pxTalkUtils, numericUtils, stringUtils } from '../utils';\r\nimport { formsActions } from '.';\r\n\r\nexport const changePxTalkActions = {\r\n init,\r\n reset,\r\n add,\r\n talkChange,\r\n normalizeTalk,\r\n levelTypeChange,\r\n deletePxTalk,\r\n validate,\r\n waitNormalizing\r\n}\r\n\r\nfunction init(bwicReferenceName, positionId, ticker, pxTalks) {\r\n return dispatch => {\r\n dispatch({\r\n type: actionTypes.STORE_PXTALKS,\r\n bwicReferenceName,\r\n positionId,\r\n ticker,\r\n pxTalks: pxTalks || []\r\n });\r\n }\r\n}\r\n\r\nfunction reset(resetCompanies = false) {\r\n return {\r\n type: actionTypes.RESET,\r\n resetCompanies\r\n };\r\n}\r\n\r\nfunction add(pxTalk) {\r\n return dispatch => {\r\n dispatch({\r\n type: actionTypes.ADD_PXTALK,\r\n pxTalk\r\n });\r\n dispatch(formsActions.reset());\r\n\r\n };\r\n}\r\n\r\nfunction levelTypeChange(companyId, levelType) {\r\n return (dispatch, getState) => {\r\n dispatch({\r\n type: actionTypes.LEVEL_TYPE_CHANGE,\r\n change: { companyId, levelType }\r\n });\r\n\r\n const { pxTalks } = getState().changePxTalk;\r\n const pxTalk = pxTalks.find(p => p.company.id === companyId);\r\n\r\n dispatch(normalizeTalk(companyId, pxTalk.talk, levelType));\r\n };\r\n}\r\n\r\nfunction deletePxTalk(index) {\r\n return {\r\n type: actionTypes.DELETE_PX_TALK,\r\n index\r\n };\r\n}\r\n\r\nfunction talkChange(companyId, talk) {\r\n return {\r\n type: actionTypes.TALK_CHANGE,\r\n change: { companyId, talk: pxTalkUtils.normalizeDecimalPlaces(talk) }\r\n };\r\n}\r\n\r\nfunction normalizeTalk(companyId, talk, levelType) {\r\n return (dispatch, getState) => {\r\n if (stringUtils.isNullOrWhiteSpace(talk)) {\r\n return dispatch(setPxTalkError(companyId, errorMessages.empty));\r\n } if (talk.match(',')) {\r\n return dispatch(setPxTalkError(companyId, errorMessages.invalidValue));\r\n }\r\n\r\n dispatch(normalizing(true));\r\n\r\n pxTalkService\r\n .normalize(talk, levelType)\r\n .then(setNormalizedLevel)\r\n .catch(setNormalizeError)\r\n .finally(() => dispatch(normalizing(false)));\r\n\r\n function setNormalizedLevel(normalized) {\r\n const { pxTalks } = getState().changePxTalk;\r\n if (pxTalks && pxTalks.length) {\r\n dispatch(normalizedLevelChange(companyId, normalized));\r\n }\r\n }\r\n\r\n function setNormalizeError(error) {\r\n const responseMessage = error && error.message && jsonUtils.tryParse(error.message);\r\n const errorMessage = responseMessage ? responseMessage.error : errorMessages.invalidValue;\r\n\r\n dispatch(setPxTalkError(companyId, errorMessage));\r\n }\r\n };\r\n}\r\n\r\nfunction normalizedLevelChange(companyId, normalizedLevel = {}) {\r\n return (dispatch, getState) => {\r\n if (!getState().changePxTalk.pxTalks) return;\r\n\r\n const updateValues = { companyId, normalizedLevel: '', talk: '' };\r\n if (normalizedLevel !== null && numericUtils.isNumber(normalizedLevel.parsedLevel)) {\r\n updateValues.normalizedLevel = normalizedLevel.parsedLevel.toFixed(2);\r\n updateValues.talk = normalizedLevel.level\r\n }\r\n\r\n dispatch({\r\n type: actionTypes.NORMALIZED_LEVEL_CHANGE,\r\n change: updateValues\r\n });\r\n\r\n const { pxTalks } = getState().changePxTalk;\r\n const pxTalk = pxTalks.find(p => p.company.id === companyId);\r\n\r\n if (pxTalk.error) {\r\n const error = validatePxTalk(pxTalk);\r\n if (pxTalk.error !== error) {\r\n dispatch(setPxTalkError(companyId, error));\r\n }\r\n }\r\n }\r\n}\r\n\r\nfunction validate() {\r\n return (dispatch, getState) => {\r\n if (!getState().changePxTalk.pxTalks) return;\r\n\r\n const pxTalks = getState().changePxTalk.pxTalks.map(p => {\r\n const error = validatePxTalk(p);\r\n return p.error ? p : { ...p, error }\r\n });\r\n\r\n dispatch({ type: actionTypes.VALIDATION_RESULT, pxTalks });\r\n };\r\n}\r\n\r\nfunction validatePxTalk(pxTalk) {\r\n let error;\r\n\r\n if (pxTalk.talk === '' || pxTalk.talk == null) {\r\n error = errorMessages.empty;\r\n } else if (!pxTalk.normalizedLevel || pxTalk.talk.match(',')) {\r\n error = errorMessages.invalidValue;\r\n }\r\n\r\n return error;\r\n}\r\n\r\nfunction setPxTalkError(companyId, errorMessage) {\r\n return {\r\n type: actionTypes.TALK_ERROR,\r\n error: { companyId, errorMessage }\r\n };\r\n}\r\n\r\nfunction normalizing(isNormalizing) {\r\n return {\r\n type: actionTypes.NORMALIZING,\r\n isNormalizing\r\n };\r\n}\r\n\r\nfunction waitNormalizing(normalizedCallback) {\r\n return async (dispatch, getState) => {\r\n await wait(() => !getState().changePxTalk.isNormalizing);\r\n dispatch(validate());\r\n normalizedCallback();\r\n };\r\n}\r\n","import {\r\n changeColorActions as actionTypes,\r\n errorMessages,\r\n pxTalkLevelTypes,\r\n levelSpecifications,\r\n colorTypes\r\n} from '../constants';\r\nimport { pxTalkService } from '../services';\r\nimport { jsonUtils, wait } from '../utils';\r\n\r\n\r\nexport const changeColorActions = {\r\n init,\r\n reset,\r\n setDm,\r\n tradedChange,\r\n levelSpecificationChange,\r\n levelChange,\r\n normalizeLevel,\r\n levelTypeChange,\r\n validate,\r\n waitNormalizing\r\n}\r\n\r\nfunction init(ticker, color, dm) {\r\n return {\r\n type: actionTypes.SET_COLOR,\r\n data: {\r\n ticker,\r\n color: color\r\n ? {\r\n ...color,\r\n levelSpecificationType: color.levelSpecificationType || levelSpecifications.cover.key\r\n }\r\n : getEmptyColor(),\r\n dm\r\n }\r\n };\r\n}\r\n\r\nfunction setDm(dm) {\r\n return {\r\n type: actionTypes.CHANGE_COLOR_SET_DM,\r\n payload: { dm }\r\n };\r\n}\r\n\r\nfunction getEmptyColor() {\r\n return {\r\n isNew: true,\r\n levelType: pxTalkLevelTypes.price.key,\r\n levelSpecificationType: levelSpecifications.cover.key,\r\n traded: true,\r\n colorType: colorTypes.none.key\r\n };\r\n}\r\n\r\nfunction reset() {\r\n return {\r\n type: actionTypes.RESET\r\n };\r\n}\r\n\r\nfunction tradedChange(traded) {\r\n return (dispatch, getState) => {\r\n dispatch({\r\n type: actionTypes.TRADED_CHANGE,\r\n traded\r\n });\r\n\r\n const { errors } = getState().changeColor;\r\n\r\n if (errors.color) {\r\n dispatch(setColorError());\r\n }\r\n };\r\n}\r\n\r\nfunction levelSpecificationChange(levelSpecification) {\r\n return (dispatch, getState) => {\r\n const { errors } = getState().changeColor;\r\n\r\n dispatch({\r\n type: actionTypes.LEVEL_SPECIFICATION_CHANGE,\r\n levelSpecification\r\n });\r\n\r\n if (errors.color) {\r\n dispatch(setColorError());\r\n }\r\n };\r\n}\r\n\r\nfunction levelChange(level) {\r\n return {\r\n type: actionTypes.LEVEL_CHANGE,\r\n level\r\n };\r\n}\r\n\r\nfunction normalizeLevel(level, levelType) {\r\n return (dispatch, getState) => {\r\n if (level !== '' && level != null) {\r\n dispatch(normalizing(true));\r\n pxTalkService\r\n .normalize(level, levelType)\r\n .then(setNormalizedLevel)\r\n .then(() => dispatch(normalizing(false)))\r\n .catch((e = {}) => {\r\n setNormalizedLevel(null)\r\n const errorMessage = jsonUtils.tryParse(e.message);\r\n if (errorMessage && errorMessage.error) {\r\n dispatch(setLevelError(errorMessage.error));\r\n }\r\n });\r\n } else {\r\n setNormalizedLevel(null);\r\n }\r\n\r\n function setNormalizedLevel(normalized) {\r\n const { color } = getState().changeColor;\r\n if (color) { //change color state is not reset\r\n dispatch(normalizedLevelChange(normalized));\r\n }\r\n }\r\n };\r\n}\r\n\r\nfunction normalizedLevelChange(normalizedLevel) {\r\n return (dispatch, getState) => {\r\n const updateColor = { normalizedLevel: '', level: '' };\r\n if (normalizedLevel !== null) {\r\n updateColor.normalizedLevel = normalizedLevel.parsedLevel;\r\n updateColor.level = normalizedLevel.level\r\n }\r\n dispatch({\r\n type: actionTypes.NORMALIZED_LEVEL_CHANGE,\r\n ...updateColor\r\n });\r\n\r\n const { color, errors } = getState().changeColor;\r\n\r\n if (errors.level) {\r\n const error = validateLevel(color);\r\n if (error !== errors.level) {\r\n dispatch(setLevelError(error));\r\n }\r\n }\r\n };\r\n}\r\n\r\nfunction validateLevel(color) {\r\n let error;\r\n if (color.level === '' || color.level == null) {\r\n error = null;\r\n } else if (!color.normalizedLevel) {\r\n error = errorMessages.invalidValue;\r\n }\r\n\r\n return error;\r\n}\r\n\r\nfunction validateColor(color) {\r\n const tradedBest = color.traded && color.levelSpecificationType === levelSpecifications.best.key;\r\n const dntCover = !color.traded && color.levelSpecificationType === levelSpecifications.cover.key;\r\n\r\n if (tradedBest || dntCover) {\r\n return errorMessages.invalidColor;\r\n }\r\n\r\n return null;\r\n}\r\n\r\nfunction setLevelError(error) {\r\n return {\r\n type: actionTypes.SET_LEVEL_ERROR,\r\n error\r\n }\r\n}\r\n\r\nfunction setColorError() {\r\n return (dispatch, getState) => {\r\n const { color } = getState().changeColor;\r\n const colorError = validateColor(color);\r\n\r\n if (color.error !== colorError) {\r\n dispatch({\r\n type: actionTypes.SET_COLOR_ERROR,\r\n error: colorError\r\n });\r\n }\r\n };\r\n}\r\n\r\nfunction levelTypeChange(levelType) {\r\n return (dispatch, getState) => {\r\n dispatch({\r\n type: actionTypes.LEVEL_TYPE_CHANGE,\r\n levelType\r\n });\r\n\r\n const { color } = getState().changeColor;\r\n dispatch(normalizeLevel(color.level, levelType));\r\n };\r\n}\r\n\r\nfunction validate() {\r\n return (dispatch, getState) => {\r\n const { color } = getState().changeColor;\r\n const levelError = validateLevel(color);\r\n\r\n dispatch(setLevelError(levelError));\r\n\r\n if (!levelError) {\r\n dispatch(setColorError());\r\n }\r\n };\r\n}\r\n\r\nfunction normalizing(isNormalizing) {\r\n return {\r\n type: actionTypes.NORMALIZING,\r\n isNormalizing\r\n };\r\n}\r\n\r\nfunction waitNormalizing(normalizedCallback) {\r\n return async (dispatch, getState) => {\r\n await wait(() => !getState().changeColor.isNormalizing);\r\n\r\n const { color } = getState().changeColor;\r\n if (color) {\r\n dispatch(validate());\r\n normalizedCallback();\r\n }\r\n };\r\n}\r\n","import {\r\n contactsSaveActions as actionTypes,\r\n gridColumns,\r\n routes,\r\n contactsSaveViews,\r\n errorMessages,\r\n uploadStatus,\r\n contactConflictTypes,\r\n constants\r\n} from '../constants';\r\nimport { errorActions, gridActions } from '.';\r\nimport { companiesService, contactsService } from '../services';\r\nimport { nameUtils } from '../utils';\r\nimport { history } from '../history';\r\n\r\n\r\nexport const contactsSaveActions = {\r\n init,\r\n reset,\r\n loadCompanies,\r\n selectCompany,\r\n resetCompaniesLookup,\r\n filterCompanies,\r\n uploadContacts,\r\n handleClipboardData,\r\n save,\r\n saveResolved,\r\n switchView,\r\n deleteContact,\r\n deleteDuplicate,\r\n backToContactsEdit,\r\n setCompanyNameByEmailDomain,\r\n}\r\n\r\nfunction init(isEdit) {\r\n return async dispatch => {\r\n dispatch(loading(true));\r\n try {\r\n const companiesPromise = companiesService.getBrokerDealers();\r\n const companyDomainsPromise = companiesService.getCompanyDomains();\r\n\r\n const companies = await companiesPromise;\r\n const companyDomains = await companyDomainsPromise;\r\n\r\n dispatch(loadCompanies(companies));\r\n dispatch(loadCompanyDomains(companyDomains));\r\n\r\n const columns = gridColumns.contacts().map(c =>\r\n c.name === gridColumns.email.name\r\n ? { ...c, updateDependencyColumnsCallback: setCompanyNameByEmailDomain }\r\n : c\r\n );\r\n\r\n if (isEdit) {\r\n const allContacts = await contactsService.getContacts();\r\n const contacts = allContacts.filter(c => !c.readonly && companies.some(company => company.id === c.companyId));\r\n\r\n contacts.forEach(c => c.company = companies.find(company => company.id === c.companyId).name)\r\n\r\n dispatch(storeInitialContacts(contacts));\r\n dispatch(gridActions.init(contacts, columns));\r\n } else {\r\n dispatch(gridActions.init([], columns));\r\n }\r\n\r\n dispatch(setEditMode(isEdit));\r\n }\r\n catch (e) {\r\n dispatch(errorActions.criticalError(e));\r\n } finally {\r\n dispatch(loading(false));\r\n }\r\n };\r\n}\r\n\r\nfunction loading(isLoading) {\r\n return {\r\n type: actionTypes.CONTACT_SAVE_LOADING,\r\n isLoading\r\n };\r\n}\r\n\r\nfunction storeInitialContacts(contacts) {\r\n return {\r\n type: actionTypes.INITIAL_CONTACTS,\r\n contacts\r\n }\r\n}\r\n\r\nfunction setEditMode(isEdit) {\r\n return {\r\n type: actionTypes.EDIT_MODE,\r\n isEdit\r\n }\r\n}\r\n\r\nfunction reset() {\r\n return dispatch => {\r\n dispatch({ type: actionTypes.RESET })\r\n dispatch(gridActions.reset());\r\n dispatch(errorActions.resetError());\r\n };\r\n}\r\n\r\nfunction loadCompanies(companies) {\r\n return {\r\n type: actionTypes.LOAD_COMPANIES,\r\n companies\r\n };\r\n}\r\n\r\nfunction loadCompanyDomains(companyDomains) {\r\n return {\r\n type: actionTypes.LOAD_COMPANY_DOMAINS,\r\n companyDomains\r\n };\r\n}\r\n\r\nfunction selectCompany(company) {\r\n return dispatch => {\r\n dispatch(gridActions.editing(company.name));\r\n dispatch(gridActions.applyEdit());\r\n dispatch(resetCompaniesLookup());\r\n };\r\n}\r\n\r\nfunction resetCompaniesLookup() {\r\n return {\r\n type: actionTypes.COMPANIES_LOOKUP,\r\n lookup: {\r\n companies: [],\r\n searchTerm: ''\r\n }\r\n };\r\n}\r\n\r\nfunction filterCompanies(searchTerm) {\r\n return (dispatch, getState) => {\r\n const { companies, companiesLookup } = getState().contactsSave;\r\n\r\n if (searchTerm.length) {\r\n const searchTermLowerCase = searchTerm.toLowerCase();\r\n dispatch({\r\n type: actionTypes.COMPANIES_LOOKUP,\r\n lookup: {\r\n searchTerm,\r\n companies: companies.filter(s =>\r\n s.name.toLowerCase().startsWith(searchTermLowerCase))\r\n }\r\n });\r\n\r\n } else if (companiesLookup.searchTerm) {\r\n dispatch(resetCompaniesLookup());\r\n }\r\n };\r\n}\r\n\r\nfunction uploadContacts(file) {\r\n return (dispatch, getState) => {\r\n const { position, upload } = getState().grid;\r\n\r\n if (upload.status === uploadStatus.uploading) {\r\n return;\r\n }\r\n\r\n const extension = (file.name.split('.').pop() || '').toLowerCase();\r\n\r\n if (extension !== 'csv' && extension !== 'xlsx') {\r\n dispatch(errorActions.error(\r\n null,\r\n errorMessages.invalidFileType,\r\n 'Invalid file type.'\r\n ));\r\n return;\r\n\r\n } else if (file.size > constants.gridFileUploadMaximumSize * 1024 * 1024) {\r\n dispatch(errorActions.error(\r\n null,\r\n errorMessages.fileSizeLimitExceeded(constants.gridFileUploadMaximumSize),\r\n 'The file is too big.'\r\n ));\r\n return;\r\n }\r\n\r\n if (position.editing) {\r\n dispatch(gridActions.applyEdit());\r\n }\r\n\r\n contactsService\r\n .uploadContacts(file, progress)\r\n .then(success, e => failure(e));\r\n\r\n dispatch(gridActions.setUploadState(uploadStatus.uploading, 0, file.name));\r\n\r\n function success(contacts) {\r\n contacts.forEach(s => {\r\n s.company = s.company ? s.company.trim() : '';\r\n s.email = s.email ? s.email.trim() : '';\r\n s.isNew = true;\r\n });\r\n dispatch(gridActions.addDataItems(contacts));\r\n dispatch(gridActions.validate());\r\n setTimeout(\r\n () => dispatch(gridActions.setUploadState(uploadStatus.none)),\r\n 500\r\n );\r\n }\r\n\r\n function failure(e) {\r\n dispatch(gridActions.setUploadState(uploadStatus.none));\r\n dispatch(errorActions.unexpectedError(e));\r\n }\r\n\r\n function progress(e) {\r\n if (e.lengthComputable) {\r\n var percentComplete = (e.loaded / e.total) * 100;\r\n dispatch(gridActions.setUploadState(uploadStatus.uploading, percentComplete, file.name));\r\n }\r\n }\r\n }\r\n}\r\n\r\nfunction handleClipboardData(clipboardText) {\r\n return (dispatch, getState) => {\r\n const { position = { index: 0 } } = getState().grid;\r\n\r\n dispatch(gridActions.dataProcessing(true));\r\n\r\n contactsService\r\n .parseContactsStirng(clipboardText)\r\n .then(success, e => dispatch(errorActions.unexpectedError(e)))\r\n .finally(() => dispatch(gridActions.dataProcessing(false)));\r\n\r\n function success(contacts) {\r\n contacts.forEach(s => s.isNew = true);\r\n dispatch(gridActions.insertDataItems(contacts, position.index));\r\n dispatch(gridActions.validate());\r\n }\r\n };\r\n}\r\n\r\nfunction save() {\r\n return async (dispatch, getState) => {\r\n dispatch(gridActions.validate());\r\n\r\n const { grid } = getState();\r\n const contacts = grid.dataItems.filter(i => !i.draft);\r\n if (!grid.isValid && contacts.length) {\r\n return;\r\n }\r\n\r\n const { deletedContacts } = getState().contactsSave;\r\n\r\n dispatch(loading(true));\r\n await dispatch(findConflicts(contacts, deletedContacts));\r\n\r\n const { conflicts } = getState().contactsSave;\r\n if (conflicts && conflicts.length) {\r\n dispatch(loading(false));\r\n return dispatch(switchView(contactsSaveViews.conflicts));\r\n }\r\n\r\n dispatch(doSave(contacts));\r\n };\r\n}\r\n\r\nfunction saveResolved() {\r\n return (dispatch, getState) => {\r\n const { grid } = getState();\r\n const contacts = grid.dataItems.filter(i => !i.draft);\r\n\r\n dispatch(loading(true));\r\n dispatch(doSave(contacts));\r\n };\r\n}\r\n\r\nfunction doSave(contacts) {\r\n return (dispatch, getState) => {\r\n const { deletedContacts, companies, conflicts } = getState().contactsSave;\r\n\r\n const contactIndexesToSkip = conflicts\r\n .map(c => c.duplicates.filter(d => d.isDeleted && !d.id))\r\n .flat()\r\n .map(d => d.contactIndex);\r\n\r\n const contactsToSave = contacts\r\n .filter((contact, index) =>\r\n !deletedContacts.some(id => contact.id === id) &&\r\n !contactIndexesToSkip.some(i => i === index))\r\n .map(c => {\r\n const company = companies.find(company =>\r\n company.name.localeCompare(\r\n c.company,\r\n undefined,\r\n { sensitivity: 'accent' }) === 0\r\n );\r\n\r\n return { ...c, companyId: company && company.id };\r\n });\r\n\r\n contactsService\r\n .bulkSave(contactsToSave, deletedContacts)\r\n .then(success)\r\n .catch(failed)\r\n .finally(() => dispatch(loading(false)))\r\n\r\n function success() {\r\n dispatch(storeConflicts(null));\r\n history.replace(routes.dealers);\r\n }\r\n\r\n function failed(e) {\r\n if (+e.status === 409) {\r\n dispatch(findConflicts(contacts));\r\n } else {\r\n dispatch(errorActions.unexpectedError(e));\r\n }\r\n }\r\n };\r\n}\r\n\r\nfunction switchView(view) {\r\n return {\r\n type: actionTypes.SWITCH_VIEW,\r\n view\r\n };\r\n}\r\n\r\nfunction findConflicts(contacts, deletedContacts) {\r\n return async dispatch => {\r\n let currentContacts;\r\n\r\n try {\r\n currentContacts = await\r\n contactsService.getContacts()\r\n }\r\n catch (e) {\r\n return dispatch(errorActions.unexpectedError(e));\r\n }\r\n\r\n currentContacts = currentContacts\r\n .filter(c => !deletedContacts.some(d => d === c.id))\r\n .filter(c => !contacts.some(cc => cc.id === c.id));\r\n\r\n const contactsIndexed = contacts.map((c, contactIndex) => ({ ...c, contactIndex }));\r\n\r\n const nameDuplicates = new Map();\r\n const emailDuplicates = new Map();\r\n\r\n contactsIndexed\r\n .forEach(c => {\r\n findNameDuplicates(c);\r\n findEmailDuplicates(c);\r\n });\r\n\r\n const nameConflicts = [...nameDuplicates.values()].map(d => ({\r\n conflictType: contactConflictTypes.duplicateName,\r\n duplicates: d,\r\n isResolved: false\r\n }));\r\n\r\n const emailConflicts = [...emailDuplicates.values()].map(d => ({\r\n conflictType: contactConflictTypes.duplicateEmail,\r\n duplicates: d,\r\n isResolved: false\r\n }));\r\n\r\n const conflicts = nameConflicts.concat(emailConflicts);\r\n dispatch(storeConflicts(conflicts));\r\n\r\n function findNameDuplicates(contact) {\r\n const fullName = nameUtils.getFullName(contact.firstName, contact.lastName, '');\r\n const nameEquals = ({ firstName, lastName }) => {\r\n const otherFullName = nameUtils.getFullName(firstName, lastName, '');\r\n return otherFullName && fullName.localeCompare(otherFullName, undefined, { sensitivity: 'accent' }) === 0;\r\n }\r\n\r\n if (fullName && !nameDuplicates.has(fullName)) {\r\n const currentDuplicates = currentContacts.filter(current => nameEquals(current));\r\n const localDuplicates = contactsIndexed.filter(c => nameEquals(c));\r\n const duplicates = currentDuplicates.concat(localDuplicates);\r\n\r\n if (duplicates.length > 1) {\r\n nameDuplicates.set(fullName, duplicates);\r\n }\r\n }\r\n }\r\n\r\n function findEmailDuplicates(contact) {\r\n if (!emailDuplicates.has(contact.email)) {\r\n const duplicates = currentContacts.filter(current =>\r\n current.email.localeCompare(contact.email, undefined, { sensitivity: 'accent' }) === 0);\r\n\r\n if (duplicates.length) {\r\n duplicates.push(contact);\r\n emailDuplicates.set(contact.email, duplicates);\r\n }\r\n }\r\n }\r\n };\r\n}\r\n\r\nfunction storeConflicts(conflicts) {\r\n return {\r\n type: actionTypes.STORE_CONFLICTS,\r\n conflicts\r\n };\r\n}\r\n\r\nfunction resetConflicts() {\r\n return {\r\n type: actionTypes.RESET_CONFLICTS\r\n };\r\n}\r\n\r\nfunction deleteContact(...contacts) {\r\n return dispatch => {\r\n const exstingContacts = contacts.filter(id => id);\r\n if (exstingContacts.length) {\r\n dispatch({\r\n type: actionTypes.DELETE_CONTACT,\r\n contacts: exstingContacts\r\n });\r\n }\r\n };\r\n}\r\n\r\nfunction deleteDuplicate(contact) {\r\n return dispatch => {\r\n dispatch({\r\n type: actionTypes.DELETE_DUPLICATE_CONTACT,\r\n contact\r\n });\r\n dispatch(deleteContact(contact.id));\r\n dispatch(ensureConflictsResolved());\r\n };\r\n}\r\n\r\nfunction ensureConflictsResolved() {\r\n return {\r\n type: actionTypes.ENSURE_CONFLICTS_RESOLVED\r\n }\r\n}\r\n\r\nfunction backToContactsEdit() {\r\n return dispatch => {\r\n dispatch(resetConflicts());\r\n dispatch(switchView(contactsSaveViews.grid));\r\n };\r\n}\r\n\r\nfunction setCompanyNameByEmailDomain(gridItemIndex) {\r\n return (dispatch, getState) => {\r\n const { dataItems } = getState().grid;\r\n const contact = dataItems[gridItemIndex];\r\n const domainName = contact.email.substring(contact.email.lastIndexOf(\"@\") + 1);\r\n\r\n if (domainName) {\r\n const { companyDomains } = getState().contactsSave;\r\n const domains = companyDomains.find(c =>\r\n c.domainNames.some(d => d.localeCompare(\r\n domainName,\r\n undefined,\r\n { sensitivity: 'accent' }) === 0));\r\n if (domains) {\r\n const { companies } = getState().contactsSave;\r\n const company = companies.find(c => c.id === domains.companyId);\r\n const dataItem = {\r\n ...contact,\r\n company: company.name\r\n };\r\n\r\n dispatch(gridActions.deleteRow(gridItemIndex));\r\n dispatch(gridActions.insertDataItems([dataItem], gridItemIndex));\r\n }\r\n }\r\n };\r\n}\r\n","import { uploadDocumentsActions, errorActions } from \".\";\r\nimport { portfolioService } from \"../services\";\r\n\r\nexport const portfolioDocumentsActions = {\r\n init,\r\n reset\r\n};\r\n\r\nfunction init() {\r\n return async dispatch => {\r\n try {\r\n const portfolios = await portfolioService.getPortfolios();\r\n const securityIdList = getSecurityIdList(portfolios);\r\n\r\n dispatch(uploadDocumentsActions.init(securityIdList));\r\n }\r\n catch (e) {\r\n dispatch(errorActions.criticalError(e));\r\n }\r\n };\r\n}\r\n\r\nfunction getSecurityIdList(portfolios) {\r\n return portfolios\r\n .map(p => p.securities || [])\r\n .flat()\r\n .map(s => s.securityId);\r\n}\r\n\r\nfunction reset() {\r\n return uploadDocumentsActions.reset();\r\n}\r\n","import { otherSellerBiddingActions as actionTypes } from '../constants';\r\n\r\nexport const otherSellerBiddingActions = {\r\n init,\r\n reset\r\n}\r\n\r\nfunction init(bwic) {\r\n return dispatch => {\r\n dispatch(storeSecurities(bwic.securities));\r\n };\r\n}\r\n\r\nfunction storeSecurities(securities) {\r\n return {\r\n type: actionTypes.OTHER_SELLER_BIDDING_STORE_SECURITIES,\r\n securities\r\n };\r\n}\r\n\r\nfunction reset() {\r\n return {\r\n type: actionTypes.OTHER_SELLER_BIDDING_RESET\r\n };\r\n}\r\n","import { dealersActions as actionTypes } from '../constants';\r\nimport { errorActions } from '.';\r\nimport { settlementAgentAgreementService } from '../services/settlement-agent-agreement.service';\r\nimport { createAction } from 'typesafe-actions';\r\n\r\nconst updateFilterOptions = createAction(\r\n 'dealers/UPDATE_FILTER_OPTIONS',\r\n resolve => (filterOption) => resolve({ filterOption })\r\n);\r\n\r\nconst clearFilterOptions = createAction('dealers/CLEAR_FILTER_OPTIONS');\r\n\r\nconst setSearchTerm = createAction(\r\n 'dealers/SET_SEARCH_TERM',\r\n resolve => (searchTerm) => resolve({ searchTerm })\r\n);\r\n\r\nexport const dealersActions = {\r\n requestToBid,\r\n reset,\r\n updateFilterOptions,\r\n clearFilterOptions,\r\n setSearchTerm,\r\n showBidRequestConfirmPopup,\r\n hideBidRequestConfirmPopup,\r\n};\r\n\r\nfunction reset() {\r\n return { type: actionTypes.DEALERS_RESET_STATE };\r\n}\r\n\r\nfunction requestToBid(settlementAgentId) {\r\n return (dispatch) => {\r\n dispatch(setRequestStatus(true));\r\n settlementAgentAgreementService.sendRequest({ settlementAgentId })\r\n .then(() => {\r\n dispatch(hideBidRequestConfirmPopup());\r\n })\r\n .catch(e => dispatch(errorActions.unexpectedError(e)))\r\n .finally(() => dispatch(setRequestStatus(false)));\r\n };\r\n}\r\n\r\nfunction setRequestStatus(status) {\r\n return {\r\n type: actionTypes.DEALERS_REQUEST_TO_BID_SET_REQUEST_STATUS,\r\n payload: { status }\r\n };\r\n}\r\n\r\nfunction showBidRequestConfirmPopup(dealerId) {\r\n return { type: actionTypes.DEALERS_SHOW_CONFIRM_BID_REQUEST_POPUP, payload: { dealerId } }\r\n}\r\n\r\nfunction hideBidRequestConfirmPopup() {\r\n return { type: actionTypes.DEALERS_HIDE_CONFIRM_BID_REQUEST_POPUP }\r\n}\r\n","import { logger } from '../logging/logger';\r\nimport { brokerDealerContactListActions } from './broker-dealer-contact-list.actions';\r\nimport { brokerDealerListActions } from './broker-dealer-list.actions';\r\n\r\nexport const pushInvitationActions = {\r\n dataPushReceived: (data) => {\r\n return dispatch => {\r\n logger.trace('Push', 'Invitation', data);\r\n if (data.contactId) {\r\n dispatch(brokerDealerContactListActions.setContactInvitationSent(data.contactId))\r\n }\r\n if (data.companyId) {\r\n dispatch(brokerDealerListActions.updateDealerDistributionListInvitationSent(data.companyId));\r\n dispatch(brokerDealerListActions.updateDealerHeadOfTradingInvitationSent(data.companyId))\r\n }\r\n }\r\n }\r\n};\r\n","import { colorDistributionActions as actionTypes, colorDistributionTypes} from '../constants';\r\nimport { bwicService } from '../services';\r\nimport { errorActions } from './error.actions';\r\nimport { TradeStatus } from '../types/trades/TradeStatus';\r\n\r\nexport const colorDistributionActions = {\r\n setBwicColorDistribution,\r\n cancelColorDistribution,\r\n completeBwic,\r\n tradedTypeChange,\r\n dntTypeChange,\r\n positionColorTypeChange\r\n}\r\n\r\nfunction setBwicColorDistribution(isColorDistribution) {\r\n return {\r\n type: actionTypes.COLOR_DISTRIBUTION_SET_BWIC_COLOR_DISTRIBUTION,\r\n isColorDistribution\r\n };\r\n}\r\n\r\nfunction setCompleteInProgress(inProgress) {\r\n return {\r\n type: actionTypes.COLOR_DISTRIBUTION_COMPLETE_IN_PROGRESS,\r\n inProgress\r\n };\r\n}\r\n\r\nfunction cancelColorDistribution(bwicReferenceName) {\r\n return (dispatch, getState) => {\r\n const { isCompleteInProgress } = getState().sellerBidding;\r\n\r\n if (!isCompleteInProgress) {\r\n bwicService\r\n .setColorDistribution(bwicReferenceName, false)\r\n .then(success, e => dispatch(errorActions.unexpectedError(e)));\r\n }\r\n\r\n function success() {\r\n dispatch(setBwicColorDistribution(false))\r\n dispatch(reset());\r\n }\r\n };\r\n}\r\n\r\nfunction tradedTypeChange(tradedType) {\r\n return {\r\n type: actionTypes.COLOR_DISTRIBUTION_TRADED_TYPE_CHANGE,\r\n tradedType\r\n };\r\n}\r\n\r\nfunction dntTypeChange(dntType) {\r\n return {\r\n type: actionTypes.COLOR_DISTRIBUTION_DNT_TYPE_CHANGE,\r\n dntType\r\n };\r\n}\r\n\r\nfunction positionColorTypeChange(positionId, colorType) {\r\n return {\r\n type: actionTypes.COLOR_DISTRIBUTION_POSITION_COLOR_TYPE_CHANGE,\r\n positionId,\r\n colorType\r\n };\r\n}\r\n\r\nfunction completeBwic() {\r\n return (dispatch, getState) => {\r\n const { bwic } = getState().bidding;\r\n const { securities, colorDistribution, isCompleteInProgress } = getState().sellerBidding;\r\n\r\n if (isCompleteInProgress) return;\r\n\r\n dispatch(setCompleteInProgress(true));\r\n\r\n const colorDistributionModel =\r\n securities\r\n .map(s => ({\r\n positionId: s.id,\r\n colorDistributionType:\r\n s.colorDistribution ||\r\n (s.trade && (s.trade.status === TradeStatus.pending || s.trade.status === TradeStatus.affirmed)\r\n ? colorDistribution.forTradedType\r\n : s?.bids?.length ? colorDistribution.forDNTType: colorDistributionTypes.status.key)\r\n }));\r\n\r\n bwicService\r\n .completeBwic(bwic.referenceName, colorDistributionModel)\r\n .catch(e => dispatch(errorActions.unexpectedError(e)))\r\n .then(() => dispatch(setCompleteInProgress(false)));\r\n };\r\n}\r\n\r\nfunction reset() {\r\n return {\r\n type: actionTypes.COLOR_DISTRIBUTION_RESET\r\n };\r\n}\r\n","import { createAction } from 'typesafe-actions';\r\n\r\nexport const onBoardingTooltipNav = createAction(\r\n 'ON_BOARDING_TOOLTIP_NAV',\r\n resolve => (page, next) => resolve({ page, next })\r\n);\r\n\r\nexport const onBoardingTooltipClose = createAction(\r\n 'ON_BOARDING_TOOLTIP_CLOSE',\r\n resolve => (page) => resolve({ page })\r\n);\r\n\r\nexport const onBoardingTooltipGotIt = createAction(\r\n 'ON_BOARDING_TOOLTIP_GOT_IT',\r\n resolve => (page, doNotShowSupportPopup) => resolve({ page, doNotShowSupportPopup })\r\n);\r\n\r\nexport const onBoardingTooltipSetVisible = createAction(\r\n 'ON_BOARDING_TOOLTIP_SET_VISIBLE',\r\n resolve => (status) => resolve({ status })\r\n);\r\n\r\nexport const onBoardingTooltipSetCountRequest = createAction(\r\n 'ON_BOARDING_TOOLTIP_SET_COUNT_REQUEST',\r\n resolve => (data) => resolve({ data })\r\n);\r\n\r\nexport const onBoardingTooltipSetCountSuccess = createAction(\r\n 'ON_BOARDING_TOOLTIP_SET_COUNT_SUCCESS',\r\n resolve => () => resolve()\r\n);\r\n\r\nexport const onBoardingTooltipSetCountFailure = createAction(\r\n 'ON_BOARDING_TOOLTIP_SET_COUNT_FAILURE',\r\n resolve => () => resolve()\r\n);\r\n\r\nexport const onBoardingTooltipSetVisibleSupportPopup = createAction(\r\n 'ON_BOARDING_TOOLTIP_SET_VISIBLE_SUPPORT_POPUP',\r\n resolve => (status) => resolve({ status })\r\n);\r\n\r\nexport const onBoardingReset = createAction(\r\n 'ON_BOARDING_TOOLTIP_RESET'\r\n);\r\n","import { inviteToJoinActionTypes } from '../constants';\r\nimport { contactsService } from '../services';\r\n\r\nfunction setVisiblePopup(visible) {\r\n return dispatch => {\r\n dispatch({\r\n type: inviteToJoinActionTypes.INVITE_TO_JOIN_TOGGLE_VISIBLE_POPUP,\r\n payload: { visible }\r\n })\r\n }\r\n}\r\n\r\nfunction sendInviteToJoin(message) {\r\n return dispatch => {\r\n dispatch({ type: inviteToJoinActionTypes.INVITE_TO_JOIN_INVITE_ALL_REQUEST });\r\n contactsService.inviteAllToJoin(message)\r\n .then(() => dispatch({ type: inviteToJoinActionTypes.INVITE_TO_JOIN_INVITE_ALL_SUCCESS }))\r\n .catch((e) => {\r\n dispatch({ type: inviteToJoinActionTypes.INVITE_TO_JOIN_INVITE_ALL_FAILURE, payload: e })\r\n })\r\n }\r\n}\r\n\r\nexport const inviteToJoinActions = {\r\n setVisiblePopup,\r\n sendInviteToJoin\r\n};\r\n","import { bwicHistoryActions as actionTypes } from '../constants';\r\nimport { bwicService } from '../services';\r\nimport { controlPanelActions } from '.';\r\nimport { isRequesting } from '../utils';\r\nimport { RequestState } from '../constants/request-state';\r\n\r\nexport const bwicHistoryActions = {\r\n init,\r\n loadHistory,\r\n showHistory,\r\n toggleHistory,\r\n markHistoryMessagesAsRead,\r\n reset\r\n}\r\n\r\nfunction init(bwicReferenceName, historyActions, positionId) {\r\n return {\r\n type: actionTypes.STORE_BWIC_HISTORY,\r\n bwicReferenceName,\r\n historyActions,\r\n positionId\r\n };\r\n}\r\n\r\nfunction loadHistory(bwicReferenceName, positionId) {\r\n return async (dispatch, getState) => {\r\n const historyState = getState().bwicHistory;\r\n\r\n if (!isRequesting(historyState.requestState) && historyState.bwicReferenceName !== bwicReferenceName) {\r\n dispatch(loadHistoryState(RequestState.request));\r\n\r\n try {\r\n const history = await bwicService.getBwicHistory(bwicReferenceName);\r\n dispatch(init(bwicReferenceName, history, positionId));\r\n dispatch(loadHistoryState(RequestState.success));\r\n } catch (e) {\r\n dispatch(loadHistoryState(RequestState.failure));\r\n }\r\n }\r\n };\r\n}\r\n\r\nfunction loadHistoryState(requestState) {\r\n return {\r\n type: actionTypes.LOAD_HISTORY_REQUEST_STATE,\r\n requestState\r\n }\r\n}\r\n\r\nfunction reset() {\r\n return {\r\n type: actionTypes.RESET\r\n };\r\n}\r\n\r\nfunction toggleHistory(positionId, ticker) {\r\n return (dispatch, getState) => {\r\n const history = getState().bwicHistory;\r\n const shouldShow = !history.visible || positionId !== history.positionId;\r\n\r\n dispatch(showHistory(shouldShow, positionId, ticker));\r\n };\r\n}\r\n\r\nfunction showHistory(visible, positionId, ticker) {\r\n return dispatch => {\r\n if (visible) {\r\n dispatch(controlPanelActions.hide());\r\n }\r\n\r\n dispatch({\r\n type: actionTypes.SHOW_BWIC_HISTORY,\r\n visible,\r\n positionId: visible && positionId,\r\n ticker: visible && ticker\r\n });\r\n };\r\n}\r\n\r\nfunction markHistoryMessagesAsRead(messages) {\r\n return dispatch => {\r\n dispatch({\r\n type: actionTypes.MARK_HISTORY_MESSAGES_AS_READ,\r\n messages\r\n });\r\n\r\n bwicService\r\n .markHistoryMessagesAsRead(messages)\r\n .catch(() => console.log('Failed to mark history action as read'));\r\n };\r\n}\r\n","import { pxTalkListActions as actionTypes } from '../constants';\r\nimport { controlPanelActions } from '.';\r\n\r\nexport const pxTalkListActions = {\r\n show,\r\n hide\r\n}\r\n\r\nfunction show(positionId) {\r\n return dispatch => {\r\n dispatch(controlPanelActions.hide());\r\n dispatch({\r\n type: actionTypes.PX_TALK_LIST_VISIBLE,\r\n visible: true,\r\n positionId\r\n });\r\n };\r\n}\r\n\r\nfunction hide() {\r\n return (dispatch, getState) => {\r\n if (getState().pxTalkList.visible) {\r\n dispatch({\r\n type: actionTypes.PX_TALK_LIST_VISIBLE,\r\n visible: false\r\n })\r\n }\r\n };\r\n}\r\n","import { createAction } from \"typesafe-actions\";\r\nimport { DateFilterOption } from \"../types/filters/DateFilterOption\";\r\nimport { DateRange } from \"../types/filters/DateRange\";\r\nimport { PaginationResult } from \"../types/PaginationResult\";\r\nimport { SellerBuysideSearchResult } from \"../types/bid-as-dealer/SellerBuysideSearchResult\";\r\nimport { Rating } from \"../types/enums/Rating\";\r\nimport { RequestState } from '../constants/request-state';\r\nimport { EditBidRequestState, SellerBuysideFilterState } from \"../types/state/SellerBuysideState\";\r\nimport { BwicType } from \"../types/enums/BwicType\";\r\nimport { SettlementAgentAgreement } from '../types/bid-as-dealer/SettlementAgentAgreement';\r\nimport { BwicMonitorSortByOptions } from \"../types/state/AllBwicsState\";\r\nimport { SellerBuysideSearchResultSummary } from \"../types/bid-as-dealer/SellerBuysideSearchResultSummary\";\r\n\r\nconst init = createAction('sellerBuyside/INIT', resolve => () => resolve());\r\nconst initRequestStatus = createAction(\r\n 'sellerBuyside/INIT_REQUEST_STATUS',\r\n resolve => (requestStatus: RequestState, bidAsDealerRequestExist: boolean = false) => resolve({ requestStatus, bidAsDealerRequestExist })\r\n);\r\nconst reset = createAction('sellerBuyside/RESET', resolve => () => resolve());\r\nconst dateFilterChange = createAction(\r\n 'sellerBuyside/DATE_FILTER_CHANGE',\r\n resolve => (dateOption: DateFilterOption) => resolve({ dateOption })\r\n);\r\nconst customDateFilterChange = createAction(\r\n 'sellerBuyside/CUSTOM_DATE_FILTER_CHANGE',\r\n resolve => (dateRange: DateRange) => resolve({ dateRange })\r\n);\r\nconst bwicStatusFilterChange = createAction(\r\n 'sellerBuyside/BWIC_STATUS_FILTER_CHANGE',\r\n resolve => (status: number, selected: boolean) => resolve({ status, selected })\r\n);\r\nconst currencyFilterChange = createAction(\r\n 'sellerBuyside/CURRENCY_FILTER_CHANGE',\r\n resolve => (currency: string, selected: boolean) => resolve({ currency, selected })\r\n);\r\nconst ratingFilterChange = createAction(\r\n 'sellerBuyside/RATING_FILTER_CHANGE',\r\n resolve => (rating: Rating, selected: boolean) => resolve({ rating, selected })\r\n);\r\n\r\nconst typeFilterChange = createAction(\r\n 'sellerBuyside/TYPE_FILTER_CHANGE',\r\n resolve => (type: BwicType, selected: boolean) => resolve({ type, selected })\r\n);\r\nconst sizeFilterChange = createAction(\r\n 'sellerBuyside/SIZE_FILTER_CHANGE',\r\n resolve => (size: { min?: number | string, max?: number | string }) => resolve({ size })\r\n)\r\nconst filterApply = createAction('sellerBuyside/FILTER_APPLY',\r\n resolve => (isApply?: boolean, isSearchTermChange?: boolean) => resolve({ isApply, isSearchTermChange }));\r\nconst filterReset = createAction('sellerBuyside/FILTER_RESET', resolve => () => resolve());\r\nconst dataItemsLoadingState = createAction(\r\n 'sellerBuyside/LOADING',\r\n resolve => (isLoading: boolean) => resolve({ isLoading })\r\n);\r\nconst storeSearchResult = createAction(\r\n 'sellerBuyside/STORE_SEARCH_RESULT',\r\n resolve => (result: PaginationResult, summary?: SellerBuysideSearchResultSummary) =>\r\n resolve({ result, summary })\r\n);\r\nconst storeCurrencySelectedStatus = createAction(\r\n 'sellerBuyside/SET_CURRENCIES_SELECTED_STATUS',\r\n resolve => (isSelected: boolean) => resolve({ isSelected })\r\n);\r\nexport type SubmitBidRequestPayloadType = {\r\n bwicReferenceName: string;\r\n positionId: number;\r\n level: number;\r\n axed: boolean;\r\n final: boolean;\r\n positionSize: number;\r\n agreementBrokerDealerId: number;\r\n agreementCommission: number;\r\n commission: number;\r\n modifiedDate?: Date;\r\n};\r\nconst submitBidRequest = createAction(\r\n 'sellerBuyside/SUBMIT_BID_REQUEST',\r\n resolve => (data: SubmitBidRequestPayloadType) => resolve({ data })\r\n);\r\n\r\nconst updateBidRequests = createAction(\r\n 'sellerBuyside/UPDATE_BID_REQUESTS',\r\n resolve => (dataItems: SellerBuysideSearchResult[]) => resolve({ dataItems })\r\n);\r\nconst updateRequestStateSubmitBid = createAction(\r\n 'sellerBuyside/UPDATE_REQUEST_STATE_SUBMIT_BID_REQUEST',\r\n resolve => (status: boolean, positionId: number) => resolve({ status, positionId })\r\n);\r\nconst saveSearchTermItems = createAction(\r\n 'sellerBuyside/SAVE_SEARCH_TERM_ITEMS',\r\n resolve => (searchItems: string[]) => resolve({ searchItems })\r\n);\r\nconst loadNextPage = createAction('sellerBuyside/LOAD_NEXT_PAGE');\r\nconst pagingReset = createAction('sellerBuyside/PAGING_RESET');\r\nconst storeAppliedFilter = createAction(\r\n 'sellerBuyside/STORE_APPLIED_FILTER',\r\n resolve => (filter: SellerBuysideFilterState) => resolve({ filter })\r\n);\r\nconst confirmBidRequestPopup = createAction(\r\n 'sellerBuyside/CONFIRM_BID_REQUEST_POPUP',\r\n resolve => (positionId: number, visible: boolean) => resolve({ positionId, visible })\r\n);\r\nconst exportBidRequestsRequest = createAction('sellerBuyside/EXPORT_BID_REQUESTS_REQUEST');\r\nconst exportBidRequestsSuccess = createAction('sellerBuyside/EXPORT_BID_REQUESTS_SUCCESS');\r\nconst exportBidRequestsFailure = createAction('sellerBuyside/EXPORT_BID_REQUESTS_FAILURE');\r\n\r\n\r\nconst updateEditBidRequestState = createAction(\r\n 'sellerBuyside/EDIT_BID_REQUEST_STATE',\r\n resolve => (editBidRequestState: EditBidRequestState) => resolve({ editBidRequestState })\r\n);\r\nconst hardReset = createAction('sellerBuyside/HARD_RESET');\r\nconst levelChange = createAction('sellerBuyside/LEVEL_CHANGE',\r\n resolve => (positionId: number, valueRaw: string, value: number | undefined, error: string, agreement: SettlementAgentAgreement) =>\r\n resolve({ positionId, valueRaw, value, error, agreement })\r\n);\r\nconst axedChange = createAction('sellerBuyside/AXED_CHANGE',\r\n resolve => (positionId: number, axed: boolean, agreement: SettlementAgentAgreement) =>\r\n resolve({ positionId, axed, agreement })\r\n);\r\nconst finalChange = createAction('sellerBuyside/FINAL_CHANGE',\r\n resolve => (positionId: number, final: boolean, agreement: SettlementAgentAgreement) =>\r\n resolve({ positionId, final, agreement })\r\n);\r\nconst commissionChange = createAction('sellerBuyside/COMMISSION_CHANGE',\r\n resolve => (positionId: number, commission: number, error: string, agreement: SettlementAgentAgreement) =>\r\n resolve({ positionId, commission, error, agreement })\r\n);\r\nconst resetPositionEditState = createAction('sellerBuyside/RESET_POSITION_EDIT_STATE',\r\n resolve => (positionId: number) => resolve({ positionId })\r\n);\r\nconst submittedBidsFilterChange = createAction('sellerBuyside/SUBMITTED_BIDS_FILTER_CHANGE',\r\n resolve => (submittedBidsFilterValue: boolean | null) => resolve({ submittedBidsFilterValue })\r\n);\r\nconst liveBiddingStage2TimerExpired = createAction('sellerBuyside/LIVE_BIDING_STAGE2_TIME_ENDED',\r\n resolve => (positionId: number) => resolve({ positionId })\r\n);\r\nconst sortChanged = createAction('sellerBuyside/SORTING_CHANGED',\r\n resolve => (sortBy: BwicMonitorSortByOptions) => resolve({ sortBy })\r\n);\r\nconst sortFieldChanged = createAction('sellerBuyside/SORTING_FIELD_CHANGED',\r\n resolve => (sortBy: BwicMonitorSortByOptions) => resolve({ sortBy })\r\n);\r\nconst advancedFiltersBlocked = createAction('sellerBuyside/ADVANCED_FILTERS_BLOCKED',\r\n resolve => (blocked: boolean) => resolve({ blocked })\r\n);\r\nconst resetSummary = createAction('sellerBuyside/RESET_SUMMARY');\r\n\r\nexport const sellerBuysideActions = {\r\n init,\r\n initRequestStatus,\r\n reset,\r\n hardReset,\r\n dateFilterChange,\r\n customDateFilterChange,\r\n bwicStatusFilterChange,\r\n currencyFilterChange,\r\n ratingFilterChange,\r\n typeFilterChange,\r\n sizeFilterChange,\r\n filterApply,\r\n filterReset,\r\n dataItemsLoadingState,\r\n storeSearchResult,\r\n loadNextPage,\r\n pagingReset,\r\n storeCurrencySelectedStatus,\r\n submitBidRequest,\r\n updateBidRequests,\r\n updateRequestStateSubmitBid,\r\n saveSearchTermItems,\r\n storeAppliedFilter,\r\n confirmBidRequestPopup,\r\n updateEditBidRequestState,\r\n exportBidRequestsRequest,\r\n exportBidRequestsSuccess,\r\n exportBidRequestsFailure,\r\n levelChange,\r\n axedChange,\r\n finalChange,\r\n commissionChange,\r\n resetPositionEditState,\r\n submittedBidsFilterChange,\r\n liveBiddingStage2TimerExpired,\r\n sortChanged,\r\n sortFieldChanged,\r\n advancedFiltersBlocked,\r\n resetSummary\r\n};\r\n\r\n","import { Dispatch } from \"redux\";\r\nimport { Deal } from \"../types/amr-pipeline/models/Deal\";\r\nimport { AppState } from \"../types/state/AppState\";\r\nimport { AmrClass } from \"../types/amr-pipeline/models/AmrClass\";\r\nimport { amrPipelineService } from \"../services/amr-pipeline.service\";\r\nimport { constants, imDetailsDealsActions as actionTypes, roles } from '../constants';\r\nimport { errorActions } from \"./error.actions\";\r\nimport { AmrDocument } from \"../types/amr-pipeline/models/AmrDocument\";\r\nimport moment from \"moment\";\r\nimport { dealsService } from \"../services/deals.service\";\r\nimport { user } from \"../user\";\r\nimport { getDealDocLastDate } from \"../utils/amr-pipeline.utils\";\r\nimport { DealDocumentsWithPattern } from \"../types/amr-pipeline/models/DealDocumentsWithPattern\";\r\n\r\nexport const imDetailsDealsActions = {\r\n loadDealDetails,\r\n loadTrancheDetails,\r\n documentsSearchTermChange,\r\n resetDocumentsSearch\r\n}\r\n\r\nfunction storeDeals(deals: Deal[]) {\r\n return {\r\n type: actionTypes.DEALS_STORE_DEALS,\r\n deals\r\n };\r\n}\r\n\r\nfunction storeDocumentsSearchResults(\r\n filteredDocuments: AmrDocument[],\r\n dealReferenceName: string\r\n) {\r\n return {\r\n type: actionTypes.DEALS_STORE_DOCUMENTS_SEARCH_RESULTS,\r\n filteredDocuments,\r\n dealReferenceName\r\n };\r\n}\r\n\r\nfunction resetDocumentsSearch() {\r\n return {\r\n type: actionTypes.DEALS_RESET_DOCUMENTS_SEARCH,\r\n };\r\n}\r\n\r\n\r\nfunction documentsSearchTermChange(\r\n searchTerm: string,\r\n dealReferenceName: string\r\n) {\r\n return async (dispatch: Dispatch, getState: () => AppState) => {\r\n const searchTermLowerCase = searchTerm.toLowerCase();\r\n const { deals } = getState().imDetailsDeals;\r\n if (deals) {\r\n const selectedDeal = deals?.find(\r\n (d) => d.referenceName === dealReferenceName\r\n );\r\n if (selectedDeal && selectedDeal.documents) {\r\n const {\r\n documents: { dealDocuments },\r\n } = selectedDeal;\r\n const filteredDocuments = dealDocuments?.filter(\r\n (d) => {\r\n const date = getDealDocLastDate(d);\r\n const dateText = moment(date).format(constants.dateFormat);\r\n\r\n return d.name.toLowerCase().includes(searchTermLowerCase) || dateText.toLowerCase().includes(searchTermLowerCase)\r\n }\r\n );\r\n dispatch(storeDocumentsSearchResults(filteredDocuments, dealReferenceName));\r\n }\r\n }\r\n };\r\n}\r\n\r\nfunction loadDealDetails(dealReferenceName: string, transactionReferenceName: string) {\r\n return async (dispatch: Dispatch, getState: () => AppState) => {\r\n const { deals, loadedDealReferenceNames } = getState().imDetailsDeals;\r\n const currentDeal = deals?.find(d => d.referenceName === dealReferenceName);\r\n\r\n if (!loadedDealReferenceNames.some((referenceName: string) => referenceName === dealReferenceName)) {\r\n dispatch(dealDetailsRequesting(true));\r\n\r\n try {\r\n const isMedia = user.hasRoles(roles.Media);\r\n\r\n const actualAuctionsPromise = dealsService.getLatestDealAuctions(dealReferenceName);\r\n const amrDocumentsPromise = isMedia ? null : amrPipelineService.getAmrDocuments(dealReferenceName, transactionReferenceName);\r\n const dealDocumentsPromise = dealsService.getDealDocuments(dealReferenceName);\r\n\r\n if (!currentDeal) {\r\n const deal = await dealsService.getDeal(dealReferenceName);\r\n const loadedDeals = deals || [];\r\n dispatch(storeDeals([...loadedDeals, deal]));\r\n }\r\n\r\n const [amrDocuments, dealDocuments, actualAuctions] = await Promise.all([\r\n amrDocumentsPromise,\r\n dealDocumentsPromise,\r\n actualAuctionsPromise,\r\n ]);\r\n\r\n dispatch(storeDocuments(dealReferenceName, dealDocuments, amrDocuments));\r\n dispatch(storeActualAmrClasses(dealReferenceName, actualAuctions));\r\n } catch (e) {\r\n dispatch(errorActions.criticalError(e));\r\n } finally {\r\n dispatch(dealDetailsRequesting(false));\r\n }\r\n }\r\n };\r\n}\r\n\r\nfunction loadTrancheDetails(dealReferenceName: string, classReferenceName: string) {\r\n return async (dispatch: Dispatch, getState: () => AppState) => {\r\n const { deals } = getState().imDetailsDeals;\r\n const selectedDeal = deals?.find(d => d.referenceName === dealReferenceName);\r\n const selectedTranche = selectedDeal?.classes.find(c => c.referenceName === classReferenceName);\r\n\r\n if (selectedDeal && selectedTranche && selectedTranche.auctions == null) {\r\n dispatch(trancheDetailsRequesting(true));\r\n\r\n try {\r\n const auctions = await dealsService.getClassAuctions(dealReferenceName, selectedTranche.referenceName);\r\n dispatch(storeAmrClasses(dealReferenceName, classReferenceName, auctions));\r\n } catch (e) {\r\n dispatch(errorActions.criticalError(e));\r\n } finally {\r\n dispatch(trancheDetailsRequesting(false));\r\n }\r\n }\r\n };\r\n}\r\n\r\nfunction storeActualAmrClasses(dealReferenceName: string, amrClasses: AmrClass[]) {\r\n return {\r\n type: actionTypes.DEALS_STORE_ACTUAL_AMR_CLASSES,\r\n dealReferenceName,\r\n amrClasses\r\n };\r\n}\r\n\r\nfunction storeAmrClasses(dealReferenceName: string, classReferenceName: string, amrClasses: AmrClass[]) {\r\n return {\r\n type: actionTypes.DEALS_STORE_AMR_CLASSES,\r\n dealReferenceName,\r\n classReferenceName,\r\n amrClasses\r\n };\r\n}\r\n\r\nfunction storeDocuments(dealReferenceName: string, dealDocuments: DealDocumentsWithPattern, amrDocuments: Document[]) {\r\n return {\r\n type: actionTypes.DEALS_STORE_DOCUMENTS,\r\n dealReferenceName,\r\n documents: {\r\n dealDocuments: [...dealDocuments.dealDocuments, ...amrDocuments],\r\n }\r\n };\r\n}\r\n\r\nfunction dealDetailsRequesting(isRequesting: boolean) {\r\n return {\r\n type: actionTypes.DEAL_DETAILS_REQUESTING_STATE,\r\n isRequesting\r\n };\r\n}\r\n\r\nfunction trancheDetailsRequesting(isRequesting: boolean) {\r\n return {\r\n type: actionTypes.DEALS_TRANCHE_DETAILS_REQUESTUNG_STATE,\r\n isRequesting\r\n };\r\n}\r\n","import { createAction } from \"typesafe-actions\";\r\nimport { BillingContact } from \"../types/billing/BillingContact\";\r\nimport { PaymentCard } from \"../types/billing/PaymentCard\";\r\nimport { SaveBillingContact } from \"../types/billing/SaveBillingContact\";\r\nimport { SavePaymentCard } from \"../types/billing/SavePaymentCard\";\r\nimport { City } from \"../types/location/City\";\r\nimport { Country } from \"../types/location/Country\";\r\nimport { State } from \"../types/location/State\";\r\nimport { SubscriptionType } from \"../types/billing/SubscriptionType\";\r\nimport { UpgradeSubscriptionStep } from \"../types/state/SubscriptionsState\";\r\nimport { SubscriptionPush } from \"../types/billing/SubscriptionPush\";\r\n\r\nconst init = createAction('subscriptions/INIT');\r\nconst reset = createAction('subscriptions/RESET');\r\nconst loadingFlag = createAction(\r\n 'subscriptions/LOADING',\r\n resolve => (isLoading: boolean) => resolve({ isLoading })\r\n);\r\nconst paymentCardSavingFlag = createAction(\r\n 'subscriptions/PAYMENT_CARD_SAVING',\r\n resolve => (isSaving: boolean) => resolve({ isSaving })\r\n);\r\nconst storePaymentCards = createAction(\r\n 'subscriptions/STORE_PAYMENT_CARDS',\r\n resolve => (paymentCards: PaymentCard[]) => resolve({ paymentCards })\r\n);\r\nconst sortPaymentCards = createAction(\r\n 'subscriptions/SORT_PAYMENT_CARDS'\r\n);\r\nconst primaryCardChange = createAction(\r\n 'subscriptions/PRIMARY_CARD_CHANGE',\r\n resolve => (paymentCard: PaymentCard, moveOnTop?: boolean) => resolve({ paymentCard, moveOnTop })\r\n);\r\nconst primaryCardChangeCompleted = createAction(\r\n 'subscriptions/PRIMARY_CARD_CHANGE_COMPLETED',\r\n resolve => (paymentCard: PaymentCard, moveOnTop?: boolean) => resolve({ paymentCard, moveOnTop })\r\n);\r\nconst deletePaymentCard = createAction(\r\n 'subscriptions/DELETE_PAYMENT_CARD',\r\n resolve => (paymentCard: PaymentCard) => resolve({ paymentCard })\r\n);\r\nconst deletePaymentCardCompleted = createAction(\r\n 'subscriptions/DELETE_PAYMENT_CARD_COMPLETED',\r\n resolve => (paymentCard: PaymentCard) => resolve({ paymentCard })\r\n);\r\nconst addPaymentCardPopupVisible = createAction(\r\n 'subscriptions/ADD_PAYMENT_CARD_POPUP_VISIBLE',\r\n resolve => (visible: boolean) => resolve({ visible })\r\n);\r\nconst addPaymentCard = createAction(\r\n 'subscriptions/ADD_PAYMENT_CARD',\r\n resolve => (paymentCard: SavePaymentCard, isLoadingVisible: boolean, setAsPrimary: boolean) =>\r\n resolve({ paymentCard, isLoadingVisible, setAsPrimary })\r\n);\r\nconst storeBillingContact = createAction(\r\n 'subscriptions/BILLING_CONTACT',\r\n resolve => (billingContact: BillingContact) => resolve({ billingContact })\r\n);\r\nconst storeCountries = createAction(\r\n 'subscriptions/COUNTRIES',\r\n resolve => (countries: Country[]) => resolve({ countries })\r\n);\r\nconst storeStates = createAction(\r\n 'subscriptions/STATES',\r\n resolve => (states: State[]) => resolve({ states })\r\n);\r\nconst storeCities = createAction(\r\n 'subscriptions/CITIES',\r\n resolve => (cities: City[]) => resolve({ cities })\r\n);\r\nconst billingContactEditFlag = createAction(\r\n 'subscriptions/BILLING_CONTACT_EDIT',\r\n resolve => (isBillingContactEdit: boolean) => resolve({ isBillingContactEdit })\r\n);\r\nconst billingContactSavingFlag = createAction(\r\n 'subscriptions/BILLING_CONTACT_SAVING',\r\n resolve => (isBillingContactSaving: boolean) => resolve({ isBillingContactSaving })\r\n);\r\nconst saveBillingContact = createAction(\r\n 'subscriptions/SAVE_BILLING_CONTACT',\r\n resolve => (billingContact: SaveBillingContact) => resolve({ billingContact })\r\n);\r\nconst loadCities = createAction(\r\n 'subscriptions/LOAD_CITIES',\r\n resolve => (stateId: number) => resolve({ stateId })\r\n);\r\nconst citiesLoadingFlag = createAction(\r\n 'subscriptions/CITIES_LOADING_FLAG',\r\n resolve => (isCitiesLoading: boolean) => resolve({ isCitiesLoading })\r\n);\r\nconst billingContactSaved = createAction(\r\n 'subscriptions/BILLING_CONTACT_SAVED',\r\n resolve => (billingContact: BillingContact) => resolve({ billingContact })\r\n);\r\nconst subscriptionPushReceived = createAction(\r\n 'subscriptions/SUBSCRIPTION_CHANGE_PUSH',\r\n resolve => (subscription: SubscriptionPush) => resolve({ subscription })\r\n);\r\nconst upgradeSubscription = createAction(\r\n 'subscriptions/UPGRADE',\r\n resolve => (targetSubscriptionType: SubscriptionType) => resolve({ targetSubscriptionType })\r\n);\r\nconst showUpgradeSubscriptionWizard = createAction(\r\n 'subscriptions/SHOW_UPGRADE_SUBSCRIPTION_WIZARD',\r\n resolve => (targetSubscriptionType: SubscriptionType, activeStep: UpgradeSubscriptionStep = UpgradeSubscriptionStep.BillingContact) =>\r\n resolve({ targetSubscriptionType, activeStep })\r\n);\r\nconst hideUpgradeSubscriptionWizard = createAction('subscriptions/HIDE_UPGRADE_SUBSCRIPTION_WIZARD');\r\nconst setUpgradeSubscriptionStep = createAction(\r\n 'subscriptions/UPGRADE_SUBSCRIPTION_STEP',\r\n resolve => (step: UpgradeSubscriptionStep) => resolve({ step })\r\n);\r\n\r\nexport const subscriptionsActions = {\r\n init,\r\n reset,\r\n loadingFlag,\r\n paymentCardSavingFlag,\r\n storePaymentCards,\r\n sortPaymentCards,\r\n storeBillingContact,\r\n storeCountries,\r\n storeStates,\r\n storeCities,\r\n loadCities,\r\n citiesLoadingFlag,\r\n primaryCardChange,\r\n primaryCardChangeCompleted,\r\n deletePaymentCard,\r\n deletePaymentCardCompleted,\r\n addPaymentCardPopupVisible,\r\n addPaymentCard,\r\n billingContactEditFlag,\r\n billingContactSavingFlag,\r\n saveBillingContact,\r\n billingContactSaved,\r\n subscriptionPushReceived,\r\n upgradeSubscription,\r\n showUpgradeSubscriptionWizard,\r\n hideUpgradeSubscriptionWizard,\r\n setUpgradeSubscriptionStep\r\n};\r\n\r\n","import { createAction } from \"typesafe-actions\";\r\nimport { ContactSalesRequest } from '../types/contact-sales/ContactSalesRequest';\r\n\r\nconst show = createAction('contactSales/SHOW');\r\nconst hide = createAction('contactSales/HIDE');\r\nconst requestSendingFlag = createAction('contactSales/REQUEST_SENDING', resolve => (isSending: boolean) => resolve({ isSending }));\r\nconst send = createAction('contactSales/SEND', resolve => (request: ContactSalesRequest) => resolve({ request }));\r\n\r\nexport const contactSalesActions = {\r\n show,\r\n hide,\r\n requestSendingFlag,\r\n send\r\n}\r\n","import { dashboardService } from \"../services\";\r\nimport { user } from \"../user\";\r\nimport { roles } from \"../constants\";\r\nimport { dealersStatsActions as actionTypes } from '../constants/actionTypes/dealers-stats.actions'\r\nimport { errorActions } from \"./error.actions\";\r\nimport { Dispatch } from \"redux\";\r\nimport { saveAs } from \"file-saver\";\r\nimport { IDealersStats } from \"../types/models/DealersStats\";\r\n\r\ninterface GetDealersStatsService {\r\n exist: () => Promise;\r\n fetch: () => Promise<{ data: IDealersStats[] }>;\r\n export: () => Promise<{ name: string, blob: Blob }>;\r\n}\r\n\r\nexport const dealersStatsActions = {\r\n checkStatsExist,\r\n fetchStats,\r\n exportDealersStats,\r\n setExportDealerStatsRequestStatus,\r\n};\r\n\r\nfunction getDealersStatsService(): GetDealersStatsService {\r\n const isSeller: boolean = user.hasRoles(...roles.seller());\r\n return {\r\n exist: isSeller ? dashboardService.fetchDealersStatsExists : dashboardService.fetchSellersStatsExists,\r\n fetch: isSeller ? dashboardService.fetchDealersStats : dashboardService.fetchClientsStats,\r\n export: isSeller ? dashboardService.exportDealersStats : dashboardService.exportSellerStats,\r\n }\r\n}\r\n\r\nfunction checkStatsExist() {\r\n return async (dispatch: Dispatch) => {\r\n try {\r\n dispatch(setRequestStateFetchDealerStatsExist(true));\r\n const statsExist = await getDealersStatsService().exist();\r\n dispatch(storeDealersStatsExist(statsExist));\r\n } catch (e) {\r\n dispatch(errorActions.unexpectedError(e));\r\n } finally {\r\n dispatch(setRequestStateFetchDealerStatsExist(false));\r\n }\r\n };\r\n}\r\n\r\nfunction setRequestStateFetchDealerStatsExist(status: boolean) {\r\n return {\r\n type: actionTypes.FETCH_STATS_EXIST_REQUEST_STATUS,\r\n payload: {status}\r\n };\r\n}\r\n\r\nfunction storeDealersStatsExist(existStatus: boolean) {\r\n return {\r\n type: actionTypes.STORE_STATS_EXIST_STATUS,\r\n payload: {existStatus}\r\n };\r\n}\r\n\r\n\r\nfunction fetchStats() {\r\n return async (dispatch: Dispatch) => {\r\n try {\r\n dispatch(setFetchStatsRequestStatus(true));\r\n const fetchStats = await getDealersStatsService().fetch();\r\n\r\n if (fetchStats) {\r\n dispatch(storeStats(fetchStats.data))\r\n }\r\n } catch (e) {\r\n errorActions.unexpectedError(e)\r\n } finally {\r\n dispatch(setFetchStatsRequestStatus(false))\r\n }\r\n };\r\n}\r\n\r\n\r\nfunction storeStats(stats: IDealersStats[]) {\r\n return {\r\n type: actionTypes.STORE_STATS,\r\n payload: {stats}\r\n };\r\n}\r\n\r\nfunction setFetchStatsRequestStatus(status: boolean) {\r\n return {\r\n type: actionTypes.FETCH_STATS_REQUEST_STATUS,\r\n payload: {status}\r\n };\r\n}\r\n\r\nfunction exportDealersStats() {\r\n return async (dispatch: Dispatch) => {\r\n try {\r\n const exportStats = await getDealersStatsService().export();\r\n\r\n if (exportStats) {\r\n dispatch(setExportDealerStatsRequestStatus(true));\r\n saveAs(exportStats.blob, exportStats.name);\r\n }\r\n\r\n } catch (e) {\r\n errorActions.unexpectedError(e)\r\n } finally {\r\n dispatch(setExportDealerStatsRequestStatus(false))\r\n }\r\n };\r\n}\r\n\r\nfunction setExportDealerStatsRequestStatus(status: boolean) {\r\n return {\r\n type: actionTypes.EXPORT_STATS_REQUEST_STATUS,\r\n payload: {status}\r\n };\r\n}\r\n","import { ActionType, createAction } from \"typesafe-actions\";\r\nimport { RequestState } from \"../constants/request-state\";\r\nimport { SettlementAccount } from \"../types/settlement/SettlementAccount\";\r\n\r\nconst request = createAction('entities/settlement-account/REQUEST');\r\nconst requestResult = createAction('entities/settlement-account/REQUEST_RESULT',\r\n resolve => (requestState: RequestState, settlementAccounts: SettlementAccount[] = []) =>\r\n resolve({ requestState, settlementAccounts })\r\n);\r\nconst update = createAction('entities/settlement-account/UPDATE',\r\n resolve => (account: SettlementAccount) => resolve({ account })\r\n);\r\nconst deleteAccount = createAction('entities/settlement-account/DELETE',\r\n resolve => (accountId: number) => resolve({ accountId })\r\n);\r\nconst reset = createAction('entities/settlement-account/RESET');\r\n\r\nexport type TSettlementAccountActionType =\r\n ActionType<\r\n typeof request |\r\n typeof requestResult |\r\n typeof update |\r\n typeof deleteAccount |\r\n typeof reset\r\n >;\r\n\r\nexport const settlementAccountActions = {\r\n request,\r\n requestResult,\r\n update,\r\n deleteAccount,\r\n reset\r\n}\r\n","import { createAction } from \"typesafe-actions\";\r\nimport { RequestState } from \"../constants/request-state\";\r\nimport { StatisticsAlertOption } from \"../types/amr-pipeline/enums/AlertOption\";\r\nimport { AlertOption } from \"../types/email-preferences/EmailPreferences\";\r\nimport { PipelineType } from '../types/amr-pipeline/enums/PipelineType';\r\nimport { UserConfigBase, ImUserConfig, UserConfigFilterType, CompanyAlertsValue } from \"../types/user-config/UserConfig\";\r\nimport { UserConfigFilter, UserFilterAlertStatus } from \"../types/user-config/UserConfigFilter\";\r\nimport { UserConfigType } from \"../types/user-config/UserConfigType\";\r\nimport { UserConfigTransaction } from \"../types/user-config/UserConfigTransaction\";\r\n\r\nconst getUserConfig = createAction(\r\n 'userconfig/get/REQUEST',\r\n resolve => (callback?: () => void) => resolve({ callback })\r\n);\r\n\r\nconst getUserConfigResult = createAction('userconfig/get/REQUEST_RESULT',\r\n resolve => (requestResult: RequestState, userConfig?: ImUserConfig[]) =>\r\n resolve({ requestResult, userConfig })\r\n);\r\n\r\nconst getUserFilterConfig = createAction(\r\n 'userconfig/get/filter/REQUEST',\r\n resolve => (configType?: UserConfigType.imFilter | UserConfigType.apFilter) => resolve({ configType })\r\n);\r\n\r\nconst getUserFilterConfigResult = createAction('userconfig/get/filter/REQUEST_RESULT',\r\n resolve => (requestResult: RequestState, userConfig?: ImUserConfig[]) =>\r\n resolve({ requestResult, userConfig })\r\n);\r\n\r\nconst updateUserConfig = createAction(\r\n 'userconfig/update/REQUEST',\r\n resolve => (userConfig: UserConfigBase[]) => {\r\n const imUserConfig: ImUserConfig[] = userConfig.map(config => ({\r\n ...config,\r\n value: JSON.stringify(config.value),\r\n }));\r\n\r\n return resolve({ userConfig: imUserConfig });\r\n },\r\n);\r\n\r\nconst updateUserConfigResult = createAction(\r\n 'userconfig/update/REQUEST_RESULT',\r\n resolve => (requestResult: RequestState, userConfig?: ImUserConfig[]) =>\r\n resolve({ requestResult, userConfig })\r\n);\r\n\r\nconst reset = createAction('userconfig/RESET');\r\n\r\nconst getDefaultUserColumnsConfig = createAction('userconfig/columns/default/REQUEST');\r\n\r\nconst getDefaultUserColumnsConfigResult = createAction(\r\n 'userconfig/columns/default/REQUEST_RESULT',\r\n resolve => (requestResult: RequestState, columnConfig?: ImUserConfig[]) =>\r\n resolve({ requestResult, columnConfig })\r\n);\r\n\r\nconst selectUserFilter = createAction(\r\n 'userconfig/filter/select/REQUEST',\r\n resolve => (userFilter: UserConfigFilter) =>\r\n resolve(userFilter)\r\n)\r\nconst createUserFilter = createAction(\r\n 'userconfig/filter/create/REQUEST',\r\n resolve => (pipelineType: PipelineType, userFilter: { name: string; default: boolean; alertOption: AlertOption }) =>\r\n resolve({ pipelineType, userFilter })\r\n);\r\n\r\nconst createUserFilterResult = createAction(\r\n 'userconfig/filter/create/REQUEST_RESULT',\r\n resolve => (requestResult: RequestState, userConfigFilter?: UserConfigFilter) =>\r\n resolve({ requestResult, userConfigFilter })\r\n);\r\n\r\nconst updateUserFilter = createAction(\r\n 'userconfig/filter/update/REQUEST',\r\n resolve => (pipelineType: PipelineType, userFilter: { referenceName: string; name: string; default: boolean; alertOption: AlertOption }) =>\r\n resolve({ pipelineType, userFilter })\r\n);\r\n\r\nconst updateUserFilterResult = createAction(\r\n 'userconfig/filter/update/REQUEST_RESULT',\r\n resolve => (requestResult: RequestState, userConfigFilter?: UserConfigFilter) =>\r\n resolve({ requestResult, userConfigFilter })\r\n);\r\n\r\nconst setUserFilterParams = createAction(\r\n 'userconfig/filter/set_params/REQUEST',\r\n resolve => (params: Partial, filterType: UserConfigFilterType) =>\r\n resolve({ filterType, ...params }),\r\n);\r\n\r\nconst setUserFilterParamsResult = createAction(\r\n 'userconfig/filter/set_params/REQUEST_RESULT',\r\n resolve => (requestResult: RequestState, filterType: UserConfigFilterType, userConfigFilter?: UserConfigFilter) =>\r\n resolve({ requestResult, filterType, userConfigFilter })\r\n);\r\n\r\nconst deleteUserFilter = createAction(\r\n 'userconfig/filter/delete/REQUEST',\r\n resolve => (referenceName: string, filterType: UserConfigFilterType) => resolve({ referenceName, filterType })\r\n);\r\n\r\nconst deleteUserFilterResult = createAction(\r\n 'userconfig/filter/delete/REQUEST_RESULT',\r\n resolve => (requestResult: RequestState, filterType: UserConfigFilterType, referenceName?: string) =>\r\n resolve({ requestResult, referenceName, filterType })\r\n);\r\n\r\nconst updateUserFilterEmailAlerts = createAction(\r\n 'userconfig/filter/email-alerts/update/REQUEST',\r\n resolve => (\r\n singleUpdateAlertOption: AlertOption,\r\n newTransactionAlertOption: AlertOption,\r\n statisticAlertOption: StatisticsAlertOption,\r\n filterEmailAlerts: UserFilterAlertStatus[]\r\n ) => resolve({ singleUpdateAlertOption, newTransactionAlertOption, statisticAlertOption, filterEmailAlerts })\r\n);\r\n\r\nconst saveTransactionAlerts = createAction(\r\n 'userconfig/transaction/alerts/save/REQUEST',\r\n resolve => (configs: {type: UserConfigType, value: UserConfigTransaction}[]) => resolve({ configs })\r\n);\r\n\r\nconst saveCompanyAlerts = createAction(\r\n 'userconfig/company/alerts/save/REQUEST',\r\n resolve => (configs: {type: UserConfigType, value: CompanyAlertsValue}[]) => resolve({ configs }));\r\n\r\n\r\n\r\nexport const imUserConfigActions = {\r\n getUserConfig,\r\n getUserConfigResult,\r\n getUserFilterConfig,\r\n getUserFilterConfigResult,\r\n updateUserConfig,\r\n updateUserConfigResult,\r\n saveTransactionAlerts,\r\n saveCompanyAlerts,\r\n getDefaultUserColumnsConfig,\r\n getDefaultUserColumnsConfigResult,\r\n reset,\r\n selectUserFilter,\r\n createUserFilter,\r\n updateUserFilter,\r\n createUserFilterResult,\r\n updateUserFilterResult,\r\n setUserFilterParams,\r\n setUserFilterParamsResult,\r\n deleteUserFilter,\r\n deleteUserFilterResult,\r\n updateUserFilterEmailAlerts,\r\n};\r\n","import { createAction } from 'typesafe-actions';\r\n\r\nexport const blotterInit = createAction('BLOTTER_INIT');\r\nexport const blotterReset = createAction('BLOTTER_RESET');\r\nexport const blotterFiltersReset = createAction('BLOTTER_FILTERS_RESET');\r\nexport const blotterSetFilterDefaults = createAction('blotter/DEFAULT_FILTER');\r\n\r\nexport const blotterToggleConfirmed = createAction('BLOTTER_TOGGLE_CONFIRMED');\r\nexport const blotterTogglePending = createAction('BLOTTER_TOGGLE_PENDING');\r\nexport const blotterToggleRejected = createAction('BLOTTER_TOGGLE_REJECTED');\r\n\r\nexport const blotterToggleAllocationStatusUnsettled = createAction('blotter/TOGGLE_UNSETTLED');\r\nexport const blotterToggleAllocationStatusPendingSettlement = createAction('blotter/TOGGLE_PENDING_SETTLEMENT');\r\nexport const blotterToggleAllocationStatusPendingAllocation = createAction('blotter/TOGGLE_PENDING_ALLOCATION');\r\nexport const blotterToggleAllocationStatusPendingProceeds = createAction('blotter/TOGGLE_PENDING_PROCEEDS');\r\nexport const blotterToggleAllocationStatusSettled = createAction('blotter/TOGGLE_SETTLED');\r\n\r\nexport const blotterSetCurrency = createAction(\r\n 'BLOTTER_SET_CURRENCY',\r\n resolve => currency => resolve({ currency })\r\n);\r\nexport const blotterResetCurrency = createAction('blotter/CURRENCY_FILTER_RESET');\r\nexport const blotterSelectAllCurrencies = createAction('blotter/CURRENCY_FILTER_SELECT_ALL');\r\n\r\nexport const blotterDateFilterChange = createAction(\r\n 'BLOTTER_DATE_RANGE_FILTER_CHANGED',\r\n resolve => (dateOption) => resolve({ dateOption })\r\n);\r\nexport const blotterCustomDateFilterChange = createAction(\r\n 'BLOTTER_CUSTOM_DATE_RANGE_FILTER_CHANGED',\r\n resolve => (dateRange) => resolve({ dateRange })\r\n);\r\nexport const blotterSettlementDateFilterChange = createAction(\r\n 'blotter/SETTLEMENT_DATE_RANGE_FILTER_CHANGED',\r\n resolve => (dateOption) => resolve({ dateOption })\r\n);\r\nexport const blotterSettlementCustomDateFilterChange = createAction(\r\n 'blotter/SETTLEMENT_CUSTOM_DATE_RANGE_FILTER_CHANGED',\r\n resolve => (dateRange) => resolve({ dateRange })\r\n);\r\nexport const blotterToggleFilterBuy = createAction('BLOTTER_TOGGLE_FILTER_BUY');\r\nexport const blotterToggleFilterSell = createAction('BLOTTER_TOGGLE_FILTER_SELL');\r\nexport const blotterToggleFilterClient = createAction('BLOTTER_TOGGLE_FILTER_CLIENT');\r\nexport const blotterToggleFilterDesc = createAction('BLOTTER_TOGGLE_FILTER_DESC');\r\nexport const blotterSearchRequest = createAction('BLOTTER_SEARCH_REQUEST');\r\nexport const blotterSearchRequestNextPage = createAction('blotter/REQUEST_NEXT_PAGE',\r\n resolve => page => resolve({ page })\r\n);\r\nexport const blotterSearchSuccess = createAction(\r\n 'BLOTTER_SEARCH_SUCCESS',\r\n resolve => ({ result, totalRecordNumber }) => resolve({ result, totalRecordNumber })\r\n);\r\nexport const blotterSearchFailure = createAction(\r\n 'BLOTTER_SEARCH_FAILURE',\r\n resolve => error => resolve({ error })\r\n);\r\nexport const blotterOrderByChange = createAction('blotter/ORDER_BY_CHANGE',\r\n resolve => orderByColumn => resolve({ orderByColumn })\r\n);\r\nexport const blotterHasTradesRequest = createAction('BLOTTER_HAS_TRADES_REQUEST');\r\nexport const blotterHasTradesSuccess = createAction(\r\n 'BLOTTER_HAS_TRADES_SUCCESS',\r\n resolve => hasTrades => resolve({ hasTrades })\r\n);\r\nexport const blotterHasTradesFailure = createAction(\r\n 'BLOTTER_HAS_TRADES_FAILURE',\r\n resolve => error => resolve({ error })\r\n);\r\nexport const blotterExportRequest = createAction('BLOTTER_EXPORT_REQUEST');\r\nexport const blotterExportSuccess = createAction('BLOTTER_EXPORT_SUCCESS');\r\nexport const blotterExportFailure = createAction('BLOTTER_EXPORT_FAILURE');\r\nexport const blotterToggleVcon = createAction(\r\n 'BLOTTER_TOGGLE_VCON',\r\n resolve => (tradeId, isBuyTrade, value) => resolve({ tradeId, isBuyTrade, value })\r\n);\r\nexport const blotterSetVconRequest = createAction(\r\n 'BLOTTER_SET_VCON_REQUEST',\r\n resolve => (tradeId, isBuyTrade) => resolve({ tradeId, isBuyTrade })\r\n);\r\nexport const blotterSetVconSuccess = createAction(\r\n 'BLOTTER_SET_VCON_SUCCESS',\r\n resolve => (tradeId, isBuyTrade, value) => resolve({ tradeId, isBuyTrade, value })\r\n);\r\nexport const blotterSetVconFailure = createAction(\r\n 'BLOTTER_SET_VCON_FAILURE',\r\n resolve => (tradeId, isBuyTrade) => resolve({ tradeId, isBuyTrade })\r\n);\r\nexport const blotterToggleBooked = createAction(\r\n 'BLOTTER_TOGGLE_BOOKED',\r\n resolve => (tradeId, isBuyTrade, value) => resolve({ tradeId, isBuyTrade, value })\r\n);\r\nexport const blotterSetBookedRequest = createAction(\r\n 'BLOTTER_SET_BOOKED_REQUEST',\r\n resolve => (tradeId, isBuyTrade) => resolve({ tradeId, isBuyTrade })\r\n);\r\nexport const blotterSetBookedSuccess = createAction(\r\n 'BLOTTER_SET_BOOKED_SUCCESS',\r\n resolve => (tradeId, isBuyTrade, value) => resolve({ tradeId, isBuyTrade, value })\r\n);\r\nexport const blotterSetBookedFailure = createAction(\r\n 'BLOTTER_SET_BOOKED_FAILURE',\r\n resolve => (tradeId, isBuyTrade) => resolve({ tradeId, isBuyTrade })\r\n);\r\n","import { ThunkDispatch } from 'redux-thunk';\r\nimport { createAction } from 'typesafe-actions';\r\nimport { AnyAction } from \"redux\";\r\nimport { AppState } from '../types/state/AppState';\r\nimport { EditTradeAllocationItem } from '../types/state/entities/TradeAllocationState';\r\nimport { GridDataItem } from '../types/state/GridState';\r\nimport { numericUtils } from '../utils';\r\nimport { gridActions } from './grid.actions';\r\nimport { notificationActions } from './notification.actions';\r\nimport { errorActions } from './error.actions';\r\nimport { errorMessages } from '../constants/error.messages';\r\nimport { TradeSettlementStatus } from '../types/settlement/TradeSettlementStatus';\r\nimport { settlementService } from '../services/settlement.service';\r\nimport { SaveTradeAllocationItem } from '../types/trade-allocation/TradeAllocationItem';\r\nimport { tradeAllocationActions } from './trade-allocation.actions';\r\nimport { history } from '../history';\r\nimport { LocationState, LocationStateBuilder } from '../types/state/ui/LocationState';\r\nimport { awaitingTradesActions } from './entities/awaitingTrades.actions';\r\nimport { gridColumns } from '../constants';\r\nimport { TradeSide } from '../types/trades/TradeSide';\r\n\r\nconst resetPopupState = createAction('blotter/trade-allocation/RESET');\r\nconst saveRequest = createAction('blotter/trade-allocation/SAVE_REQUEST');\r\nconst saveSuccess = createAction('blotter/trade-allocation/SAVE_SUCCESS',\r\n resolve => (\r\n tradeId: string,\r\n buyerSettlementStatus: TradeSettlementStatus,\r\n sellerSettlementStatus: TradeSettlementStatus,\r\n allocationLock: Date,\r\n isBuyerAllocationManual: boolean,\r\n isSellerAllocationManual: boolean\r\n ) =>\r\n resolve({ tradeId, allocationLock, buyerSettlementStatus, sellerSettlementStatus, isBuyerAllocationManual, isSellerAllocationManual })\r\n);\r\nconst saveFailure = createAction('blotter/trade-allocation/SAVE_FAILURE');\r\n\r\nexport const blotterTradeAllocationActions = {\r\n resetPopupState,\r\n recalculateAmountOfTrade,\r\n recalculatePercentOfTrade,\r\n save,\r\n saveRequest,\r\n saveSuccess,\r\n saveFailure\r\n}\r\n\r\nfunction recalculateAmountOfTrade(rowIndex: number, tradeId: string) {\r\n // use thunk because gridActions.deleteRow && gridActions.insertDataItems cannot be dispatched from saga\r\n return (dispatch: ThunkDispatch, getState: () => AppState) => {\r\n const dataItem: GridDataItem =\r\n getState().grid.dataItems[rowIndex];\r\n const trade = getState().blotter.securities.find(t => t.tradeId === tradeId)\r\n\r\n if (dataItem && trade) {\r\n let amount: number | undefined;\r\n\r\n if (dataItem.percent != null && dataItem.percent !== '') {\r\n const percent = numericUtils.numberOrDefault(dataItem.percent);\r\n if (numericUtils.isNumber(percent)) {\r\n amount = numericUtils.round(trade.size / 100 * percent);\r\n }\r\n }\r\n\r\n const updated: GridDataItem = {\r\n ...dataItem,\r\n amount: amount ?? gridColumns.amountOfTrade.initialValue\r\n };\r\n\r\n dispatch(gridActions.deleteRow(rowIndex));\r\n dispatch(gridActions.insertDataItems([updated], rowIndex));\r\n dispatch(gridActions.updateDataItemDraftStatus(rowIndex));\r\n };\r\n };\r\n}\r\n\r\nfunction recalculatePercentOfTrade(rowIndex: number, tradeId: string) {\r\n // use thunk because gridActions.deleteRow && gridActions.insertDataItems cannot be dispatched from saga\r\n return (dispatch: ThunkDispatch, getState: () => AppState) => {\r\n const dataItem: GridDataItem =\r\n getState().grid.dataItems[rowIndex];\r\n const trade = getState().blotter.securities.find(t => t.tradeId === tradeId)\r\n\r\n if (dataItem && trade) {\r\n let percent: number | undefined;\r\n\r\n if (dataItem.amount != null && dataItem.amount !== '') {\r\n if (numericUtils.isNumber(dataItem.amount)) {\r\n percent = numericUtils.round(Number(dataItem.amount) / (trade.size / 100), 2);\r\n }\r\n }\r\n\r\n const updated: GridDataItem = {\r\n ...dataItem,\r\n percent: percent ?? gridColumns.percentOfTrade.initialValue\r\n };\r\n\r\n dispatch(gridActions.deleteRow(rowIndex));\r\n dispatch(gridActions.insertDataItems([updated], rowIndex));\r\n dispatch(gridActions.updateDataItemDraftStatus(rowIndex));\r\n };\r\n };\r\n}\r\n\r\nfunction save(tradeId: string, allocationLock: Date, side: TradeSide) {\r\n return async (dispatch: ThunkDispatch, getState: () => AppState) => {\r\n dispatch(gridActions.validate());\r\n\r\n if (!getState().grid.isValid) return;\r\n\r\n dispatch(saveRequest());\r\n\r\n const items: SaveTradeAllocationItem[] = getState().grid.dataItems\r\n .filter((i: GridDataItem) => !i.draft)\r\n .map(i => ({\r\n id: i.id,\r\n settlementAccountId: Number(i.settlementAccountId),\r\n amount: Number(i.amount),\r\n percent: Number(i.percent),\r\n proceed: i.proceed == null || i.proceed === '' ? undefined : Number(i.proceed),\r\n side\r\n }));\r\n\r\n try {\r\n const response = await settlementService.saveTradeAllocation(tradeId, allocationLock, items, side);\r\n\r\n dispatch(blotterTradeAllocationActions.saveSuccess(\r\n tradeId,\r\n response.buyerSettlementStatus,\r\n response.sellerSettlementStatus,\r\n response.allocationLock,\r\n response.isBuyerAllocationManual,\r\n response.isSellerAllocationManual,\r\n ));\r\n\r\n // TO DO: Remove when trade allocation push will be implemented\r\n dispatch(\r\n awaitingTradesActions.tradeAllocationCreated(\r\n response.referenceName,\r\n response.buyerSettlementStatus,\r\n response.sellerSettlementStatus\r\n )\r\n )\r\n\r\n dispatch(tradeAllocationActions.update(tradeId, response.items));\r\n\r\n // Close popup\r\n const location = {\r\n ...history.location,\r\n state: new LocationStateBuilder(history.location.state as LocationState)\r\n .resetPopup()\r\n .result()\r\n };\r\n history.replace(location);\r\n\r\n } catch (e) {\r\n dispatch(blotterTradeAllocationActions.saveFailure());\r\n if (e.status === 409) {\r\n dispatch(\r\n notificationActions.notificationAddErrorMessageModal(\r\n errorMessages.refreshPage,\r\n \"Can't save Trade Allocation\",\r\n true\r\n )\r\n );\r\n } else {\r\n dispatch(errorActions.unexpectedError(e));\r\n }\r\n }\r\n };\r\n}\r\n","import { createAction } from 'typesafe-actions';\r\nimport { RequestState } from \"../constants/request-state\";\r\nimport { CompanySlim } from '../types/company/CompanySlim';\r\n\r\nconst request = createAction('entities/broker-dealer-list/REQUEST');\r\nconst requestResult = createAction('entities/broker-dealer-list/REQUEST_RESULT',\r\n resolve => (requestState: RequestState, result: CompanySlim[] = []) =>\r\n resolve({ requestState, result })\r\n);\r\nconst updateDealerDistributionListInvitationSent = createAction(\r\n 'entities/broker-dealer-list/UPDATE_DEALER_DISTRIBUTION_LIST_INVITATION_SEND',\r\n resolve => (dealerId: number) => resolve({ dealerId })\r\n);\r\nconst updateDealerHeadOfTradingInvitationSent = createAction(\r\n 'entities/broker-dealer-list/UPDATE_DEALER_HEAD_OF_TRADING_INVITATION_SEND',\r\n resolve => (dealerId: number) => resolve({ dealerId })\r\n);\r\nconst resetEntities = createAction('entities/broker-dealer-list/RESET');\r\n\r\n\r\nexport const brokerDealerListActions = {\r\n request,\r\n requestResult,\r\n updateDealerDistributionListInvitationSent,\r\n updateDealerHeadOfTradingInvitationSent,\r\n resetEntities\r\n};\r\n","import { createAction } from 'typesafe-actions';\r\n\r\nexport const dashboardInit = createAction('dashboard/INIT');\r\nexport const dashboardInitSuccess = createAction('dashboard/INIT_SUCCESS');\r\n\r\nexport const dashboardInitFailure = createAction(\r\n 'dashboard/INIT_FAILURE',\r\n resolve => (error) => resolve({ error })\r\n);\r\n\r\nexport const dashboardFetchBwics = createAction(\r\n 'dashboard/FETCH_BWICS',\r\n resolve => (requestState, data) => resolve({ requestState, data })\r\n);\r\n\r\nexport const dashboardFetchPortfolioExist = createAction(\r\n 'dashboard/FETCH_PORTFOLIO_EXIST',\r\n resolve => (requestState, data) => resolve({ requestState, data })\r\n);\r\n\r\nexport const dashboardInitPortfolioSecurities = createAction(\r\n 'dashboard/INIT_PORTFOLIO_SECURITIES',\r\n);\r\n\r\nexport const dashboardFetchPortfolioSecurities = createAction(\r\n 'dashboard/FETCH_PORTFOLIO_SECURITIES',\r\n resolve => (requestState, data) => resolve({ requestState, data })\r\n);\r\n\r\nexport const dashboardFetchColorRates = createAction(\r\n 'dashboard/FETCH_COLOR_RATES',\r\n resolve => (requestState, data) => resolve({ requestState, data })\r\n);\r\n\r\nexport const dashboardFetchDntRates = createAction(\r\n 'dashboard/FETCH_DNT_RATES',\r\n resolve => (requestState, data) => resolve({ requestState, data })\r\n);\r\n\r\nexport const dashboardFetchSameDayPeriods = createAction(\r\n 'dashboard/FETCH_SAME_DAYS_PERIODS',\r\n resolve => (requestState, data) => resolve({ requestState, data })\r\n);\r\n\r\nexport const dashboardInitTradingStats = createAction(\r\n 'dashboard/INIT_TRADING_STATS',\r\n);\r\n\r\nexport const dashboardFetchTradingStats = createAction(\r\n 'dashboard/FETCH_TRADING_STATS',\r\n resolve => (requestState, data) => resolve({ requestState, data })\r\n);\r\n\r\nexport const dashboardInitPriceLevel = createAction(\r\n 'dashboard/INIT_PRICE_LEVEL',\r\n);\r\n\r\nexport const dashboardFetchPriceLevel = createAction(\r\n 'dashboard/FETCH_PRICE_LEVEL',\r\n resolve => (requestState, data) => resolve({ requestState, data })\r\n);\r\n\r\nexport const dashboardFetchBidRequestsAsSeller = createAction(\r\n 'dashboard/FETCH_BID_REQUESTS_AS_SELLER',\r\n resolve => (requestState, data) => resolve({ requestState, data })\r\n);\r\n\r\nexport const dashboardFetchDtcSellingBuying = createAction(\r\n 'dashboard/FETCH_DTC_SELLING_BUYING',\r\n resolve => (requestState, data) => resolve({ requestState, data })\r\n);\r\n\r\nexport const dashboardFetchAAAPriceLevel = createAction(\r\n 'dashboard/FETCH_AAA_PRICE_LEVEL',\r\n resolve => (requestState, data) => resolve({ requestState, data })\r\n);\r\n\r\nexport const dashboardFetchMostTradedTickers = createAction(\r\n 'dashboard/FETCH_MOST_TRADED_TICKERS',\r\n resolve => (requestState, data) => resolve({ requestState, data })\r\n);\r\n\r\nexport const dashboardFetchBiggestMovers = createAction(\r\n 'dashboard/FETCH_BIGGEST_MOVERS',\r\n resolve => (requestState, data) => resolve({ requestState, data })\r\n);\r\n\r\nexport const dashboardFetchDtcIgHy = createAction(\r\n 'dashboard/FETCH_DTC_INVESTMENT_GRADE',\r\n resolve => (requestState, data) => resolve({ requestState, data })\r\n);\r\n\r\nexport const dashboardFetchPxTalkDeviation = createAction(\r\n 'dashboard/FETCH_PX_TALK_DEVIATION',\r\n resolve => (requestState, data) => resolve({ requestState, data })\r\n);\r\n\r\nexport const dashboardFetchBwicPercentOfTrace = createAction(\r\n 'dashboard/FETCH_BWIC_PERCENT_OF_DEVIATION',\r\n resolve => (requestState, data) => resolve({ requestState, data })\r\n);\r\n\r\nexport const dashboardFetchKWatchNews = createAction(\r\n 'dashboard/FETCH_K_WATCH_NEWS',\r\n resolve => (requestState, data) => resolve({ requestState, data })\r\n);\r\n\r\nexport const dashboardFetchTopIssuers = createAction(\r\n 'dashboard/FETCH_BWIC_TOP_ISSUERS',\r\n resolve => (types, ccy, year, collateralTypes) => resolve({ types, ccy, year, collateralTypes })\r\n);\r\n\r\nexport const dashboardFetchTopIssuersResult = createAction(\r\n 'dashboard/FETCH_BWIC_TOP_ISSUERS_RESULT',\r\n resolve => (requestState, data) => resolve({ requestState, data })\r\n);\r\n\r\nexport const dashboardExportTopIssuers = createAction(\r\n 'dashboard/EXPORT_TOP_ISSUERS',\r\n resolve => (types, ccy, year, collateralTypes, sortingParams) => resolve({ types, ccy, year, collateralTypes, sortingParams })\r\n);\r\n\r\nexport const dashboardSetRequestStatusExportTopIssuers = createAction(\r\n 'dashboard/SET_REQUEST_STATUS_EXPORT_TOP_ISSUERS',\r\n resolve => (requestState) => resolve({ requestState })\r\n);\r\n\r\nexport const dashboardFetchTopArrangers = createAction(\r\n 'dashboard/FETCH_BWIC_TOP_ARRANGERS',\r\n resolve => (types, ccy, year, collat) => resolve({ types, ccy, year, collat })\r\n);\r\n\r\nexport const dashboardFetchTopArrangersResult = createAction(\r\n 'dashboard/FETCH_BWIC_TOP_ARRANGERS_RESULT',\r\n resolve => (requestState, data) => resolve({ requestState, data })\r\n);\r\n\r\nexport const dashboardExportTopArrangers = createAction(\r\n 'dashboard/EXPORT_TOP_ARRANGERS',\r\n resolve => (types, ccy, year, collateralTypes, sortingParams) => resolve({ types, ccy, year, collateralTypes, sortingParams })\r\n);\r\n\r\nexport const dashboardSetRequestStatusExportTopArrangers = createAction(\r\n 'dashboard/SET_REQUEST_STATUS_EXPORT_TOP_ARRANGERS',\r\n resolve => (requestState) => resolve({ requestState })\r\n);\r\n\r\nexport const dashboardFetchTopTrustees = createAction(\r\n 'dashboard/FETCH_BWIC_TOP_TRUSTEES',\r\n resolve => (types, ccy, year, collateralTypes) => resolve({ types, ccy, year, collateralTypes })\r\n);\r\n\r\nexport const dashboardFetchTopTrusteesResult = createAction(\r\n 'dashboard/FETCH_BWIC_TOP_TRUSTEES_RESULT',\r\n resolve => (requestState, data) => resolve({ requestState, data })\r\n);\r\n\r\nexport const dashboardExportTopTrustees = createAction(\r\n 'dashboard/EXPORT_TOP_TRUSTEES',\r\n resolve => (types, ccy, year, collateralTypes, sortingParams) => resolve({ types, ccy, year, collateralTypes, sortingParams })\r\n);\r\n\r\nexport const dashboardSetRequestStatusExportTopTrustees = createAction(\r\n 'dashboard/SET_REQUEST_STATUS_EXPORT_TOP_TRUSTEES',\r\n resolve => (requestState) => resolve({ requestState })\r\n);\r\n\r\nexport const dashboardFetchTopStaticDeals = createAction(\r\n 'dashboard/FETCH_BWIC_TOP_STATIC_DEALS',\r\n resolve => (year) => resolve({ year })\r\n);\r\n\r\nexport const dashboardFetchTopStaticDealsResult = createAction(\r\n 'dashboard/FETCH_BWIC_TOP_STATIC_DEALS_RESULT',\r\n resolve => (requestState, data) => resolve({ requestState, data })\r\n);\r\n\r\nexport const dashboardExportTopStaticDeals = createAction(\r\n 'dashboard/EXPORT_BWIC_TOP_STATIC_DEALS',\r\n resolve => (year, orderByTransaction) => resolve({ year, orderByTransaction })\r\n);\r\n\r\nexport const dashboardSetRequestStatusExportTopStaticDeals = createAction(\r\n 'dashboard/SET_REQUEST_STATUS_EXPORT_BWIC_TOP_STATIC_DEALS',\r\n resolve => (requestState) => resolve({ requestState })\r\n);\r\n\r\nexport const dashboardFetchTopDebutDeals = createAction(\r\n 'dashboard/FETCH_BWIC_TOP_DEBUT_DEALS',\r\n resolve => (year) => resolve({ year })\r\n);\r\n\r\nexport const dashboardFetchTopDebutDealsResult = createAction(\r\n 'dashboard/FETCH_BWIC_TOP_DEBUT_DEALS_RESULT',\r\n resolve => (requestState, data) => resolve({ requestState, data })\r\n);\r\n\r\nexport const dashboardExportTopDebutDeals = createAction(\r\n 'dashboard/EXPORT_BWIC_TOP_DEBUT_DEALS',\r\n resolve => (year, orderByTransaction) => resolve({ year, orderByTransaction })\r\n);\r\n\r\nexport const dashboardSetRequestStatusExportTopDebutDeals = createAction(\r\n 'dashboard/SET_REQUEST_STATUS_EXPORT_BWIC_TOP_DEBUT_DEALS',\r\n resolve => (requestState) => resolve({ requestState })\r\n);\r\n\r\nexport const dashboardFetchKIndicator = createAction(\r\n 'dashboard/FETCH_K_INDICATOR',\r\n resolve => (requestState, data) => resolve({ requestState, data })\r\n);\r\n\r\nexport const dashboardSetFilter = createAction(\r\n 'dashboard/SET_FILTER',\r\n resolve => (filter) => resolve({ filter })\r\n);\r\n\r\nexport const dashboardSetNotAppliedFilter = createAction(\r\n 'dashboard/SET_NOT_APPLIED_FILTER',\r\n resolve => (filter) => resolve({ filter })\r\n);\r\n\r\nexport const dashboardClearFilter = createAction(\r\n 'dashboard/CLEAR_FILTER'\r\n);\r\n\r\nexport const dashboardSetFilterActive = createAction(\r\n 'dashboard/SET_FILTER_ACTIVE',\r\n resolve => (active) => resolve({ active })\r\n);\r\n\r\nexport const dashboardResetNotAppliedFilter = createAction('dashboard/RESET_NOT_APPLIED_FILTER');\r\n\r\nexport const dashboardReset = createAction('dashboard/RESET');\r\nexport const dashboardOnSelectedSecurity = createAction('dashboard/ON_SELECTED_SECURITY');\r\n\r\nexport const dashboardSetSearchTermItem = createAction(\r\n 'dashboard/SET_SEARCH_TERM_ITEM',\r\n resolve => (text) => resolve({ text })\r\n);\r\n\r\nexport const dashboardFetchSecurityHistoryRequest = createAction('dashboard/FETCH_SECURITY_HISTORY_REQUEST');\r\n\r\nexport const dashboardFetchSecurityHistorySuccess = createAction(\r\n 'dashboard/FETCH_SECURITY_HISTORY_SUCCESS',\r\n resolve => (securityHistory) => resolve({ securityHistory })\r\n);\r\n\r\nexport const dashboardFetchSecurityHistoryFailure = createAction('dashboard/FETCH_SECURITY_HISTORY_FAILURE');\r\nexport const dashboardExportBwiStatistic = createAction('dashboard/EXPORT_BWIC_STATISTIC');\r\n\r\nexport const dashboardExportTradingStats = createAction(\r\n 'dashboard/EXPORT_TRADING_STATS',\r\n resolve => (currencies, ratings) => resolve({ currencies, ratings })\r\n);\r\n\r\nexport const dashboardSetRequestStatusExportTradingStats = createAction(\r\n 'dashboard/SET_REQUEST_STATUS_EXPORT_TRADING_STATS',\r\n resolve => (status) => resolve({ status })\r\n);\r\n\r\nexport const dashboardPushUpdateTradingStats = createAction(\r\n 'dashboard/PUSH_DATA_UPDATE_TRADING_STATS',\r\n resolve => (tradingStats) => resolve({ tradingStats })\r\n);\r\n\r\nexport const dashboardPushUpdatePriceLevel = createAction(\r\n 'dashboard/PUSH_UPDATE_PRICE_LEVEL',\r\n resolve => (priceLevel) => resolve({ priceLevel })\r\n);\r\n\r\nexport const dashboardPushBiggestMovers = createAction(\r\n 'dashboard/PUSH_UPDATE_BIGGEST_MOVERS',\r\n resolve => (biggestMovers) => resolve({ biggestMovers })\r\n)\r\n\r\nexport const dashboardPushUpdateMostTradedTickers = createAction(\r\n 'dashboard/PUSH_UPDATE_MOST_TRADED_TICKERS',\r\n resolve => (mostTradedTickers) => resolve({ mostTradedTickers })\r\n);\r\n\r\nexport const dashboardInitIssueTransactionVolume = createAction(\r\n 'dashboard/ISSUE_TRANSACTION_VOLUME_INIT',\r\n);\r\n\r\nexport const dashboardIssueTransactionVolumeRequest = createAction(\r\n 'dashboard/ISSUE_TRANSACTION_VOLUME_REQUEST',\r\n resolve => (filter) => resolve({ filter })\r\n);\r\n\r\nexport const dashboardIssueTransactionVolumeResult = createAction(\r\n 'dashboard/ISSUE_TRANSACTION_VOLUME_RESULT',\r\n resolve => (requestState, data) =>\r\n resolve({ requestState, data })\r\n);\r\n\r\nexport const dashboardUsBslEsgNewIssueRequest = createAction(\r\n 'dashboard/US_BSL_ESG_NEW_ISSUE_REQUEST',\r\n resolve => (grouping) => resolve({ grouping }),\r\n);\r\n\r\nexport const dashboardUsBslEsgNewIssueResult = createAction(\r\n 'dashboard/US_BSL_ESG_NEW_ISSUE_RESULT',\r\n resolve => (requestState, esgLanguageDeals, usBslNewIssue) =>\r\n resolve({ requestState, esgLanguageDeals, usBslNewIssue })\r\n);\r\n\r\nexport const dashboardGetPortfolioInventorySecuritiesRequest = createAction(\r\n 'dashboard/GET_PORTFOLIO_INVENTORY_SECURITIES_REQUEST',\r\n resolve => (pageNumber, itemsOnPage, sortField, sortOrder) => resolve({ pageNumber, itemsOnPage, sortField, sortOrder })\r\n)\r\n\r\nexport const dashboardGetPortfolioInventorySecuritiesSuccess = createAction(\r\n 'dashboard/GET_PORTFOLIO_INVENTORY_SECURITIES_SUCCESS',\r\n resolve => (securities, pageNumber, totalRecordNumber) => resolve({ securities, pageNumber, totalRecordNumber })\r\n)\r\n\r\nexport const dashboardGetPortfolioInventorySecuritiesFailure = createAction(\r\n 'dashboard/GET_PORTFOLIO_INVENTORY_SECURITIES_FAILURE'\r\n)\r\n\r\nexport const dashboardSetPortfolioInventoryCurrentPage = createAction(\r\n 'dashboard/SET_PORTFOLIO_INVENTORY_CURRENT_PAGE',\r\n resolve => (currentPage) => resolve({ currentPage })\r\n)\r\n\r\nexport const dashboardPortfolioInventorySortParamsChanged = createAction(\r\n 'dashboard/PORTFOLIO_INVENTORY_SORT_PARAMS_CHANGED',\r\n resolve => (sortField, sortOrder) => resolve({ sortField, sortOrder })\r\n)\r\n\r\nexport const dashboardPortfolioInventoryReset = createAction('dashboard/PORTFOLIO_INVENTORY_RESET')\r\n\r\nexport const dashboardUsBslEuCompliantDealsRequest = createAction(\r\n 'dashboard/US_BSL_ESG_EU_COMPLIANT_DEALS_REQUEST',\r\n resolve => (filter) => resolve(filter),\r\n);\r\n\r\nexport const dashboardUsBslEuCompliantDealsResult = createAction(\r\n 'dashboard/US_BSL_ESG_EU_COMPLIANT_DEALS_RESPONSE',\r\n resolve => (requestState, usBslEuCompliantDeals, usBslDeals) =>\r\n resolve({ requestState, usBslEuCompliantDeals, usBslDeals })\r\n);\r\n\r\nexport const dashboardShortLongDatedDealsRequest = createAction(\r\n 'dashboard/SHORT_LONG_DATED_DEALS_REQUEST',\r\n resolve => (filter, managerReferenceName, startDate) => resolve({ filter, managerReferenceName, startDate }),\r\n);\r\n\r\nexport const dashboardShortLongDatedDealsResult = createAction(\r\n 'dashboard/SHORT_LONG_DATED_DEALS_RESPONSE',\r\n resolve => (requestState, data) =>\r\n resolve({ requestState, data })\r\n);\r\n\r\nexport const dashboardIssuanceSpreadRequest = createAction(\r\n 'dashboard/ISSUANCE_SPREAD_REQUEST',\r\n resolve => (filter, managerReferenceName, startDate) => resolve({ filter, managerReferenceName, startDate }),\r\n);\r\n\r\nexport const dashboardIssuanceSpreadResult = createAction(\r\n 'dashboard/ISSUANCE_SPREAD_RESPONSE',\r\n resolve => (requestState, data) =>\r\n resolve({ requestState, data })\r\n);\r\n\r\nexport const dashboarNewIssuedWeeklySpreadsRequest = createAction(\r\n 'dashboard/NEW_ISSUE_WEEKLY_SPREADS_REQUEST'\r\n);\r\n\r\nexport const dashboardNewIssueWeeklySpreadsResult = createAction(\r\n 'dashboard/NEW_ISSUE_WEEKLY_SPREADS_RESPONSE',\r\n resolve => (requestState, data) =>\r\n resolve({ requestState, data })\r\n);\r\n","import { createAction } from \"typesafe-actions\";\r\nimport { RequestState } from \"../../constants/request-state\";\r\nimport { Company } from \"../../types/amr-pipeline/models/Company\";\r\n\r\nconst requestCollateralManagers = createAction('entities/collateral-managers/REQUEST', resolve => (requestState: RequestState) => resolve({ requestState}));\r\n\r\nconst responseCollateralManagers = createAction(\r\n 'entities/collateral-managers/RESPONSE',\r\n resolve => (requestState: RequestState, collateralManagers: Company[]) => resolve({ requestState, collateralManagers })\r\n);\r\n\r\nexport const collateralManagersActions = {\r\n requestCollateralManagers,\r\n responseCollateralManagers\r\n};\r\n","import { ActionType, createAction } from \"typesafe-actions\";\r\nimport { RequestState } from \"../constants/request-state\";\r\nimport { PxTalk } from \"../types/bwic/PxTalk\";\r\n\r\nconst request = createAction(\"entities/priceTalks/REQUEST\",\r\n resolve => (bwicReferenceName: string, positionId: number) => resolve({ bwicReferenceName, positionId })\r\n);\r\nconst requestResult = createAction(\"entities/priceTalks/REQUEST_RESULT\",\r\n resolve => (positionId: number, requestState: RequestState, priceTalks: PxTalk[] = []) => resolve({ positionId, requestState, priceTalks })\r\n);\r\nconst addPriceTalk = createAction(\"entities/priceTalks/ADD\",\r\n resolve => (positionId: number, priceTalk: PxTalk) => resolve({ positionId, priceTalk })\r\n);\r\nconst replacePriceTalks = createAction(\"entities/priceTalks/REPLACE\",\r\n resolve => (positionId: number, priceTalks: PxTalk[]) => resolve({ positionId, priceTalks })\r\n);\r\nconst resetFailed = createAction(\"entities/priceTalks/RESET_FAILED\");\r\nconst reset = createAction(\"entities/priceTalks/RESET\");\r\n\r\nexport const priceTalksActions = {\r\n request,\r\n requestResult,\r\n addPriceTalk,\r\n replacePriceTalks,\r\n resetFailed,\r\n reset\r\n}\r\n\r\nexport type TPriceTalksActionType = ActionType<\r\n typeof request |\r\n typeof requestResult |\r\n typeof addPriceTalk |\r\n typeof replacePriceTalks |\r\n typeof resetFailed |\r\n typeof reset\r\n>;\r\n","import { ActionType, createAction } from \"typesafe-actions\"\r\nimport { RequestState } from \"../../constants/request-state\";\r\nimport { TransactionSlim } from \"../../types/amr-pipeline/models/TransactionSlim\";\r\n\r\nconst request = createAction('entities/latestTransaction/REQUEST',\r\n resolve => (tickers: string[]) => resolve({ tickers })\r\n);\r\nconst response = createAction('entities/latestTransaction/RESPONSE',\r\n resolve => (requestState: RequestState, transactions: TransactionSlim[] = []) =>\r\n resolve({ requestState, transactions })\r\n);\r\nconst reset = createAction('entities/latestTransaction/RESET');\r\n\r\nexport const latestTransactionActions = {\r\n request,\r\n response,\r\n reset\r\n}\r\n\r\nexport type TLatestTransactionActionType =\r\n ActionType\r\n"],"names":["profileActions","init","_ref","_asyncToGenerator","_regeneratorRuntime","mark","_callee","dispatch","profilePromise","companyPromise","profile","company","wrap","_context","prev","next","type","actionTypes","PROFILE_INIT","requestState","RequestState","request","accountService","getProfile","getProfileCompany","sent","GET_PROFILE_SUCCESS","GET_PROFILE_COMPANY_SUCCESS","payload","success","t0","failure","errorActions","criticalError","stop","_x","apply","arguments","toggleEditPhoneMode","toggleEditBloombergEmail","TOGGLE_VISIBILITY_FORM_BLOOMBERG_EMAIL","savePhoneNumber","phone","getState","SAVE_PHONE_NUMBER","_objectSpread","savePhoneNumberFailure","errorMessage","CHANGE_PHONE_NUMBER_FAILURE","error","changeContactPopupVisible","contactId","CHANGE_CONTACT_POPUP_VISIBLE","contact","changePasswordFormVisible","personalInfoReset","passwordSettingsReset","accountActions","changePasswordReset","reset","ACCOUNT_SETTINGS_RESET","sellerAdminUsersActions","sellerAdminDealerActions","sellerAdminLimitActions","addNewCompanyTraderToStore","trader","traders","push","PROFILE_COMPANY_ADD_NEW_TRADER","editNewCompanyTraderInStore","editCompanyContact","submitModel","departmentValue","then","PROFILE_COMPANY_CONTACT_CHANGED","catch","e","unexpectedError","enableCompanyTrader","_ref3","_callee3","_yield$accountService","id","status","_context3","ENABLE_COMPANY_TRADER_REQUEST","ENABLE_COMPANY_TRADER_SUCCESS","ENABLE_COMPANY_TRADER_FAIL","_x3","disableCompanyTrader","_ref4","_callee4","_yield$accountService2","_context4","DISABLE_COMPANY_TRADER_REQUEST","DISABLE_COMPANY_TRADER_SUCCESS","DISABLE_COMPANY_TRADER_FAIL","_x4","setVisibleUploadImagePopup","uploadUserImage","file","requestStateUploadUserImage","currentUser","user","current","userProfilePhotoActions","fetchUserImage","finally","deleteUserImage","requestStateDeleteUserImage","saveBloombergEmail","bloombergEmail","_ref2","_callee2","_context2","setRequestStatusSaveBloombergEmail","setBloombergEmail","finish","_x2","changeBwicAnnouncementNotifications","bwicAnnouncementNotifications","changeBwicAnnouncementNotificationsRequest","saveBwicAnnouncementNotifications","bwicCreateNotifyAdmins","bwicCreateNotifyViewers","changePhoneVisible","CHANGE_PHONE_VISIBLE","IS_REQUEST_SAVE_BLOOMBERG_EMAIL","changePasswordVisible","CHANGE_PASSWORD_FORM_VISIBLE","traderId","map","item","PROFILE_COMPANY_EDIT_TRADER","visible","PROFILE_SET_VISIBLE_UPLOAD_USER_IMAGE_POPUP","PROFILE_SET_REQUEST_STATE_UPLOAD_USER_IMAGE","PROFILE_SET_REQUEST_STATE_DELETE_USER_IMAGE","createAction","requestResult","resolve","trades","length","undefined","rejectedTradeActions","setTradesAsResolved","tradeIds","pushBuyerRejectTrade","trade","initialReferenceName","getInitResult","newsList","managers","arrangers","getTotalCountResult","totalCount","loadMoreNewsList","searchTerm","loadMoreNewsListResult","searchNewsList","searchNewsListResult","setInitialNews","initialNews","updateNewsList","setSearchTerm","editNewsActions","getNewsDetails","referenceName","getNewsDetailsResult","newsData","createOrUpdateNews","deleteNews","resetNewsDetails","requestTrades","requestTradesResult","requestStatus","awaitingTrades","awaitingTradesActions","tradeAllocationCreated","tradeId","buyerSettlementStatus","sellerSettlementStatus","getInitialDataRequest","withIssuanceMonitorAccess","getInitialDataSuccess","preferences","userConfig","banks","setRatingCheckedState","rating","currency","checked","setRatingInCurrencyCheckedState","setAllRatingCheckedState","setRatingSize","size","setCheckedDailyDashboardEmail","alertOption","setPortfolioBwicAlerts","setPortfolioCleansingNoticeAlerts","setPortfolioIssuanceMonitorAlerts","setPortfolioRiAlerts","setPortfolioNcAlerts","setPortfolioRollerDeadlineAlerts","setNewBiwicAlerts","setBiwicReminderAlerts","setPortfolioInventoryAlerts","setBwicByRatingPreferences","bwicByRatingAlertState","setDealerInventoryAlertState","dealerInventoryAlertState","setIssuanceMonitorSingleAlert","singleAlertState","setIssuanceMonitorNewTransactionAlert","transactionAlertState","setIssuanceMonitorStatisticsAlert","statisticAlertState","setIssuanceMonitorFiltersAlert","filtersAlertState","setArrangerPipelineAlert","apAlertOption","setCloManagersAnalyticsAlert","cloManagerAnalyticsAlert","setCloManagersIssuanceMonitorAlert","cloManagerImAlertsConfig","setCloManagersArrangerPipelineAlert","setCloManagersBwicAlert","cloManagerBwicAlert","setCloManagersDealerInventoryAlert","cloManagerDealerInventoryAlert","setBanksAnalyticsAlert","bankAnalyticsAlertConfig","setBanksDealerInventoryAlert","bankDiAlertConfig","setBanksIssuanceMonitorAlert","bankImAlertsConfig","setBanksArrangerPipelineAlert","bankApAlertsConfig","setSecondaryWeeklySummaryAlert","unsubscribeAllBWICsNotifications","unsubscribeAllIssuanceMonitor","unsubscribeAllCloManagers","userCompanyReferenceName","unsubscribeAllBanks","unsubscribeAllPortfolio","rollbackDashboardEmails","rollbackBWICPipelines","rollbackBWICNotifications","rollbackIssuanceMonitor","rollbackArrangerPipeline","rollbackCloManagers","manageEmailPreferencesActions","rollbackPortfolio","rollbackInventory","rollbackBanks","saveRequest","saveArrangerPipelineRequest","saveBanksRequest","saveSuccess","saveFailure","saveEmailPreferencesRequest","saveEmailPreferencesSuccess","emailPreferences","saveEmailPreferencesFailure","savedFilterAlertOptionChange","updated","savedFilterAlertOptionsReset","initPortfolioFilterAlerts","portfolioFilterAlerts","resetPortfolioFilterAlerts","portfolioSavedFilterAlertChange","filterReferenceName","bwicAlert","inventoryAlert","portfolioSavedFilterGlobalAlertChange","portfolioGlobalAlertsChange","bwicGlobalAlertEnabled","inventoryGlobalAlertEnabled","cleansingNoticeAlertEnabled","issuanceMonitorAlertEnabled","outOfRiAlertEnabled","outOfNcAlertEnabled","rollerDeadlineAlertEnabled","dataPushReceived","data","action","actionType","BwicHistoryActionType","NewBid","DirectBid","bwicReferenceName","bid","bwicName","logger","trace","concat","value","newBid","positionId","pushHistoryActions","add","receivedDate","Date","PushHistoryStateItemType","hasRoles","roles","SellerTrader","_getState$sellerBiddi","sellerBidding","securities","tradingPositions","Object","keys","position","find","p","_getSecuritiesWithLat","getSecuritiesWithLatestBids","positionWithActualBids","_slicedToArray","_biddingUtils$getBids","biddingUtils","getBidsByLevel","bids","BidLevel","Best","best","sellerBiddingActions","tradingPositionCompanyChange","getBidCompanyIdentifier","tradeConfirm","notificationActions","warningModal","name","ticker","moneyUtils","amountToMM","formatUtils","formatBid","handleNewBid","AxedFinalChanged","bidId","axed","final","modifiedDate","createdBy","axedFinalChange","handleAxedFinalChange","PriceTalk","priceTalk","talk","PUSH_DATA_NEW_PX_TALK","historyAction","newPriceTalk","QuickFeedback","DirectFeedback","feedback","Feedback","quickFeedback","bidRequestType","BidRequestType","BidOrPass","created","bidRequest","handleQuickFeedback","TargetLevel","_ref5","targetLevel","PUSH_DATA_TARGET_LEVEL","TradedAway","_ref6","isTradedAway","tradedAway","handleTradedAway","TradeSubmitted","_ref7","tradeAction","checkAwaitingTrades","TradeAffirmed","TradeRejected","tradeStatus","ColorDistribution","_ref9","isColorDistribution","colorDistribution","handleColorDistribution","ColorDistributionSend","_ref10","colors","publicColors","handleColorDistributionSend","Bidding","handleBwicStatusChanged","BwicStatus","bidding","Finished","finished","Canceled","canceled","OpenBiddingStage1Ended","_ref12","stage1EndDateUtc","canDealerBidOnPositions","liveBiddingActions","stage2Start","stagedBiddingStartStage2","BwicStage1Ended","handleStagedBiddingStartStage2","OpenBiddingStage2Ended","_ref13","stagedBiddingFinishStage2","BwicStage2Ended","handleStagedBiddingFinishStage2","OpenBiddingStage2Level","_ref14","level","tiedForBest","stage2LevelChange","sentDateUtc","liveBiddingStage2Level","handleLiveBiddingStage2Level","ModifyAutoFeedbackConfig","_ref15","autoFeedbackConfiguration","PUSH_DATA_AUTO_FEEDBACK_CONFIG","settings","handleAutoFeedbackSettingsChanged","BidAsDealerRequest","_data$bidAsDealerRequ","bidAsDealerRequest","sellerBidAsDealerRequest","handleBidAsDealerRequest","BuyerRejectedTrade","BiddingCompleteReminder","_ref16","remainingMinutes","Number","handleBwicCompleteReminder","createCustomAction","BrokerDealerTrader","tradeConfirmActions","_ref8","setAwaitingBwicTradeStatus","rejectReason","bwicStatusChanged","bwicStatus","_ref11","BwicStatusChanged","biddingActions","bwicStatusChange","pushBwicActions","clientsCompaniesActions","fetchListRequest","fetchListSuccess","fetchListFailure","setSelectedAgreement","companyId","resetSelectedAgreement","updateAgreementRequest","requestData","updateAgreementSuccess","assetManagerId","updateAgreementFailure","setSearchString","searchString","fetchPendingAgreementCountRequest","fetchPendingAgreementsCountSuccess","count","fetchPendingAgreementsCountFailure","hideActivePanels","setVisibleUpdateRatePopup","getCurrencyRate","setResultGetCurrencyRate","rate","updateCurrencyRate","setResultUpdateCurrencyRate","manageCompaniesFiltersActions","toogleFilterSalesRepresentative","salesRepresentatives","setFilterSalesRepresentative","toogleFilterRegBy","regBy","setFilterRegBy","toogleFilterStatusActive","toogleFilterStatusBlocked","toogleFilterStatusOffPlatform","toogleFilterRoleAdministrator","toogleFilterRoleBrokerDealer","toogleFilterRoleSeller","toogleFilterRoleViewer","toogleFilterRoleMedia","setDateFilterChange","dateOption","setDateFilterRangeChange","dateRange","searchSecuritiesActions","searchTermChange","resetSearchLookup","applyLookupItem","lookupItem","searchSecurities","stateSearchTerm","toLowerCase","isin","startsWith","cusip","trim","searchTermItems","includes","addSearchItem","removeSearchItem","index","SECURITY_SEARCH_ITEM_REMOVE","moveBack","SECURITY_SEARCH_MOVE_BACK","moveForward","SECURITY_SEARCH_MOVE_FORWARD","removeCurrentItem","SECURITY_SEARCH_REMOVE_CURRENT_ITEM","RESET","loadSearchLookupTimeout","showLookup","SEARCH_TERM_CHANGE","search","trimmedSearchTerm","constants","searchTermAcceptedLength","_getState$searchSecur","searchTermCache","lookupCache","searchTermLowerCase","SEARCH_LOOKUP","lookupData","filter","l","searchInLookupCache","clearTimeout","setTimeout","SEARCH_LOOKUP_CACHE","s","isinCusip","bwicService","loadSearchLookup","SECURITY_SEARCH_ITEM_ADD","classesLookup","fetchSection","createAsyncAction","helpResourcesActions","fetchCategories","fetchBySearch","loadMoreSearch","resetSection","resetSearch","manageEmailActions","setFilter","confirmRequest","onConfirm","confirmSuccess","confirmFailure","downloadFileRequest","downloadFileSuccess","downloadFileFailure","portfolioAgreementDisclaimerActions","show","blockerId","text","hide","confirmed","salesRepresentativeActions","loadUserSalesRepresentatives","storeSalesRepresentatives","pushUserActions","setSavingState","save","lockModifiedDate","setConflictsPopupVisible","setTradedStatus","inventoryPositionId","tradeDate","setTradedRequestStatus","inventoryId","setFlaggedModal","isFlaggedModalVisible","ensureFlaggedModalShown","merged","some","isFlagged","excludeComputedProps","source","withoutComputedProps","coupon","draft","errors","securityId","ncEndMonth","ncEndYear","riEndMonth","riEndYear","offer","floaterIndex","omitBy","isUndefined","mergeDataItems","actualItems","updatedItems","i","isNew","actualItemsCopy","_toConsumableArray","el","newItems","forEach","u","actualIndex","findIndex","a","actual","update","valueOrEmpty","offerDmBps","offerYield","spread","walYears","mvoc","manager","description","ncEnd","riEnd","creditEnhancement","isEqual","isUpdate","normalizeParsedInventoryPosition","dataItem","_entries$find","key","entries","inventoryFloatingIndexTitles","localeCompare","sensitivity","floaterIndexEnumKey","InventoryFloatingIndex","normalizeNumeric","formatInventoryCoupon","numericUtils","isNumber","bidSize","bidDmBps","stringUtils","isNullOrWhiteSpace","formatMonthAndYear","ncEndParseResult","dateTimeUtils","parseMonthAndYearStamp","riEndParseResult","isMonthValid","isYearValid","year","month","raw","defaultValue","trimmed","inventoryEditActions","updateCoupon","rowIndex","dataItems","grid","gridActions","deleteRow","insertDataItems","uploadSecurities","_getState$grid","upload","mountedKey","uploadStatus","uploading","extension","split","pop","gridFileUploadMaximumSize","errorMessages","fileSizeLimitExceeded","editing","applyOrCancelEdit","inventoryService","currentMountedKey","lengthComputable","percentComplete","loaded","total","setUploadState","positions","ready","clear","addDataItems","validate","none","invalidFileType","handleClipboardData","clipboardData","dataProcessing","parseSecuritiesStirng","clearingBankActions","saveClearingBankSettings","isClearingBank","commission","settlementAgentCommissionRequest","settlementAgentCommissionResponse","bwic","nextBusinessDayPromise","todayIsBusinessDayPromise","currentYearHolidaysPromise","nextYearHolidaysPromise","isBidingOrFinished","nextBusinessDay","todayIsBusinessDay","currentYearHolidays","nextYearHolidays","minDate","holidays","getFullYear","daysService","getNextBusinessDate","isBusinessDay","getHolidays","isAllToAll","process","BwicProcessType","Live","bidOnBehalfActions","requestCompanies","favoriteBrokerDealersActions","fetchFavoriteBrokerDealersRequest","moment","startOf","toDate","minimumDate","STORE_MIN_SETTLE_DATE","storeHolidays","SELLER_BIDDING_STORE_SECURITIES","cancelBwic","reason","cancel","dealerListPanelActions","SELLER_BIDDING_RESET","apiOperationActions","resetEvent","ApiOperationType","submitBidsOnBehalf","resetEdit","dealerListActions","tradeAll","storeTradingPositions","canTradePosition","completeBwic","setColorDistribution","colorDistributionActions","setBwicColorDistribution","setTargetLevel","sendTargetLevel","_getState$sellerBiddi4","editTargetLevel","security","edit","targetLevelRange","min","max","toFixed","SELLER_BIDDING_TARGET_LEVEL_REQUEST","targetLevelRequest","biddingService","saveTargetLevel","SELLER_BIDDING_TARGET_LEVEL_SUCCESS","targetLevelSuccess","SELLER_BIDDING_TARGET_LEVEL_FAILURE","targetLevelFailure","sendQuickFeedback","bidsList","feedbackType","excludeJumpBallStage2Bids","JumpBall","stagedBiddingStatus","OpenBiddingStatus","stage1Ended","feedbackTypes","submitFinal","b","onBehalfBids","onBehalf","bidIdList","sendOnBehalfQuickFeedback","feedbackSent","sendOnBehalfFeedback","sendRegularFeedback","tradingPositionSelectionChange","selected","SELLER_BIDDING_TRADING_POSITION_SELECTION_CHANGE","tradeAllChecked","tradingPositionIdList","every","tradeAllSelectionChange","tradingPositionSettleDateChange","date","settleDateError","settleDate","_getState$sellerBiddi3","minimumSettleDate","momentHolidays","h","validateTradingPositionSettleDate","SELLER_BIDDING_TRADING_SETTLE_DATE_CHANGE","tradingPositionCommentChange","comment","SELLER_BIDDING_TADING_COMMENT_CHANGE","tradingCompanyIdentifier","SELLER_BIDDING_TRADING_COMPANY_CHANGE","tradingPositionBidChange","SELLER_BIDDING_TRADING_BID_CHANGE","submitTrade","_getState$sellerBiddi2","tradingBidId","companyBidLock","bidLocks","tradingCompanyId","buyerCompany","toISOString","bidLock","cancelTrade","showBidList","toggleBidList","bidList","sendBidRequest","companies","requestType","c","markBidsShown","MARK_BIDS_SHOWN","SELLER_BIDDING_STORE_HOLIDAYS","hasErrors","validationResult","validateTradingPositions","r","SELLER_BIDING_STORE_TRADING_POSITIONS_VALIDATION_RESULT","SELLER_BIDDING_TRADING_CONFIRMATION_VISIBLE","defaultSettleDate","SELLER_BIDDING_STORE_TRADING_POSITIONS","SELLER_BIDDING_QUICK_FEEDBACK_SENT","SELLER_BIDDING_TRADING_TRADE_ALL_SELECTION_CHANGE","empty","invalidValue","diff","dateShouldNotBeInPast","momentSettleDate","weekday","d","bwicDateShouldNotBeWeekend","isSame","bwicDateShouldNotBeHoliday","SELLER_BIDDING_SET_TARGET_LEVEL","controlPanelActions","SELLER_BIDDING_SHOW_BID_LIST","partiesActions","items","releaseActions","fetchReleases","getReleaseRequest","getReleaseResponse","releases","markAsReadRequest","markAsReadResponse","bwicLogReset","bwicLogInitRequest","bwicLogInitSuccess","statistics","bwicLogActions","bwicLogInitFailure","bwicLogExportDataRequest","bwicLogExportDataSuccess","bwicLogExportDataFailure","response","fetchBillingHistory","billingHistory","updateFilter","filterField","filterOption","applyFilter","setApplyFilter","applyReset","billingHistoryActions","resetFilter","editParsedBwicActions","day","bwicPromise","processSettings","timeSpan","getByReferenceName","Promise","editParsedBwic","changeDate","changeBidsDueTime","bidsDue","changeGoodUntilTime","goodUntil","changeTimeZone","timeZone","changeDaysToSettle","daysToSettle","changeCustomRules","rulesText","securitiesActions","gridColumns","storeOriginalBwic","changeEmailReceivedDate","emailReceivedDate","parsedProcess","getProcessSpecificSettings","changeReserveLevelsApply","reserveLevelsApply","changeCanTradeEarly","canTradeEarly","changeCanBidEarly","canBidEarly","changePartialBidsAccepted","partialBidsAccepted","changeBwicProcessType","processType","changeHardCutOffNumber","hardCutOff","changeStage1EndTime","changeStage2EndTime","stage2EndDateUtc","changeStage2Participants","improverCount","bidsGoodFor","parseTimeSpan","changeBidsGoodForHours","hours","changeBidsGoodForMinutes","minutes","timestampToUtcString","daysToSettleDefault","TopX","INIT_COMPLETED","resetError","showManageParsedBwics","history","routes","manageParsedBwics","isValid","isPositionsValid","setSaveProgressState","doSave","saved","notificationAddErrorMessageModal","refreshPage","cantSavePxTalk409","saveAndPublish","parsedBwicsService","publish","_x5","_x6","saveOnExit","pathname","beforeNavigateCallback","cancelDialog","jumpBall","topX","BestFootForward","bff","Unknown","unknown","STORE_ORIGINAL_BWIC","_getState$editParsedB","SET_EMAIL_RECEIVED_DATE","_getState$editParsedB2","CHANGE_DATE","days","DAYS_TO_SETTLE","TIME_ZONE","time","_getState$editParsedB3","BIDS_DUE","hasTimeErrors","bidsDueTime","goodUntilTime","format","dateTimeFormatUtc","_getState$editParsedB4","GOOD_UNTIL","RULES_TEXT","RESERVE_LEVELS_APPLY_CHANHE","CAN_TRADE_EARLY_CHANGE","CAN_BID_EARLY_CHANGE","PARTIAL_BIDS_ACCEPTED_CHANHE","getDefaultStage1EndTimeUtc","getDefaultStage2Participants","Stage2Participants","Top3","BWIC_PROCESS_TYPE_CHANGE","Standard","HARD_CUT_OFF_NUMBER_CHANGE","bwicProcessType","getDefaultStage2EndTimeUtc","STAGE_1_TIME_CHANGE","STAGE_2_TIME_CHANGE","BIDS_GOOD_FOR_HOURS_CHANGE","BIDS_GOOD_FOR_MINUTES_CHANGE","STAGE_2_PARTICIPANTS_CHANGE","_getState$editParsedB5","bidsGoodForHours","bidsGoodForMinutes","state","_objectWithoutProperties","_excluded","setBwicDate","adjustTime","momentDate","isoWeekday","validateDate","bidsDueShoulbBeLessThanGoodUntil","validateTime","subtract","isAfter","isBefore","dateFormat","validateEmailReceivedDate","totalMinutes","numberOrDefault","maxHours","shouldBeBetween","validateBidsGoodFor","stage1End","stage2End","start","end","isSameOrAfter","validateStage1End","isSameOrBefore","validateStage2End","values","x","VALIDATE","validation","utcTime","timestampFromUtcString","bwicDate","set","minute","isSaving","SAVING_STATE","pxTalks","priceTalksActions","replacePriceTalks","BWIC_SAVED","_setBwicDate","_setBwicDate2","_state$editParsedBwic","utcOffset","CANCEL_DIALOG","selectDealers","selectedDealers","selectDealer","dealerId","selectDealersByDefault","dealers","resetSelectedByDefaultFlag","newBwicDealersActions","sellerBidAsDealerAgreementsPushDataReceived","agreement","updateFilterOptions","clearFilterOptions","setSelectPlatformDealersPopupVisible","editCompanyActions","countriesPromise","statesPromise","salesRepresentativesPromise","countries","states","setLoadingCompanyStatus","companiesService","getCompany","locationService","getCountries","getStates","USCountryCode","salesRepresentativesService","getList","loadCountries","loadStates","с","Error","message","countryCode","loadCities","stateId","registrationType","manualRegistration","RegistrationType","manual","sendLink","mpid","headOfTrading","loadCompany","_getState$editCompany","isBrokerDealer","model","salesRepresentativesToAssign","salesRepresentativesToUnassign","assignPromise","unassignPromise","saving","editCompany","role","companyRoles","BrokerDealer","website","cityId","city","zipCode","address","code","toUpperCase","distributionList","firstName","headOfTradingFirstName","lastName","headOfTradingLastName","email","headOfTradingEmail","office","headOfTradingOffice","mobile","headOfTradingMobile","v","assign","representativeUserIdList","unassign","SAVED","companyInformationCanNotBeChanged","SALES_REPRESENTATIVES","getCities","cities","CITIES","STATES","COUNTRIES","COMPANY","EDIT_COMPANY_LOADING_STATUS","SAVING","getUserListRequest","getUserListSuccess","users","requestUsers","getUserListFailure","saveUser","userId","setUserUpdateState","userSaved","saveUserRequest","userRequestId","concurrencyStamp","setUserRequestUpdateState","userRequestSaved","userRequest","disableUser","blockReason","enableUser","setUserOperationState","setUserEnabled","setUserDisable","disableUserRequest","enableUserRequest","setUserRequestOperationState","userRequestEnabled","userRequestDisabled","exportUsersRequest","exportUsersResponse","rulesActions","separatePanel","RULES_SHOW","rules","RULES_HIDE","brokerDealerBiddingActions","accessState","isParsed","getAccessState","storeAccessState","bwicStatuses","scheduled","storeSecurities","initPriceTalks","BROKER_DEALER_BIDDING_RESET","sendInviteRequest","requestAccess","brokerDealerAccessState","accessRequested","bidAll","bidPlacementActions","_getState$brokerDeale2","brokerDealerBidding","editBid","biddingSecurities","canSubmit","hasBidErrors","bidConfirmationActions","confirmation","bidSingle","validateSingle","_getState$brokerDeale","submitBids","BROKER_DEALER_BIDDING_STORE_SECURITIES","_s$pxTalks","BROKER_DEALER_ACCESS_STATE","editState","setEditModeStatus","getTradeLimitsRequest","getTradeLimitsSuccess","limits","updateTradeLimitsRequest","updateTradeLimitsSuccess","updateTradeLimitsFailure","companiesActions","companiesPromise","usersPromise","userRequestsPromise","companyList","userRequests","_getState$companies","isInitCompleted","companyFilter","memberFilter","getCompanies","usersService","getUsers","getUserCreationRequests","storeCompanies","storeUsers","storeUserRequests","STORE_SALES_REPRESENTATIVES","filterCompanies","filterMembers","initCreateEditUser","userPromise","_yield$Promise$all","_yield$Promise$all2","getUser","jobTitle","primaryContact","all","Media","Viewer","setEditingUser","COMPANY_UPDATE_INIT_STATUS_EDIT_USER","resetEditMember","RESET_EDIT_MEMBER","orderCompaniesBy","column","companyOrderBy","direction","ORDER_BY","orderBy","orderMembersBy","memberOrderBy","MEMBERS_ORDER_BY","approveCompany","companyApproveRequest","postCompanyApprove","companyApproveSuccess","companyApproveFailure","notificationAddErrorMessage","rejectCompany","postCompanyReject","rejectionReason","companyRejectReasonSet","COMPANY_REJECT_REASON_SET","companyApprovalConfirmationShow","COMPANY_APPROVAL_CONFIRMATION_SHOW","companyApprovalConfirmationHide","companyRejectionConfirmationShow","COMPANY_REJECTION_CONFIRMATION_SHOW","companyRejectionConfirmationHide","COMPANY_REJECTION_CONFIRMATION_HIDE","companyStatusChangeConfirmation","memberStatusChangeConfirmation","resendInviteConfirmation","resetPasswordConfirmation","chnageTfaEnabledStatusConfirmation","chnageTfaEnabledStatus","member","updateTfaEnabledState","tfaEnabled","TFA_ENABLED_STATE_CHANGED","resendInvite","resetPassword","fullName","changeCompanyStatus","companyStatuses","offPlatform","statusCode","active","blocked","changeMemberBlockedStatus","userStatuses","isUserPrimaryContact","notificationAddError","amrPipelineService","blockUserRequest","unblockUserRequest","showCompanyMembers","memberFilterInitialState","applyMemberFilters","replace","manageCompanyMembers","showMemberCompany","companyFilterInitialState","companyName","manageCompanies","saveMember","editMember","isEdit","initialUser","isPrimaryContactAndCompanyChanged","userToSave","desk","isNil","userInformationCanNotBeChanged","primaryContactUserCanNotBeMovedToAnotherCompany","abrupt","savingUser","sendInvite","phoneNumber","userEmail","linkedIn","location","setMemberOfacStatus","memberId","membersOfacRequestStatus","newStatusList","COMPANY_MEMBER_SET_OFAC_REQUEST","setMemberOfacRequest","res","ofac","_getState$companies2","newUsers","COMPANY_MEMBER_SET_OFAC_SUCCESS","setMemberOfacSuccess","setMemberOfacFailure","setCompanyOfacStatus","companiesOfacRequestStatus","COMPANY_SET_OFAC_REQUEST","setCompanyOfacRequest","_getState$companies3","newCompanies","COMPANY_SET_OFAC_SUCCESS","setCompanyOfacSuccess","setCompanyOfacFailure","exportUsers","exportUsersRequestState","filterOptions","statuses","UserStatus","Active","Blocked","invited","Invited","notInvited","NotInvited","pendingApproval","rolesArray","administrator","Administrator","arrangersClient","ArrangersClient","brokerDealerTrader","brokerDealerViewer","BrokerDealerViewer","dataEntry","DataEntry","sellerAdmin","SellerAdministrator","sellerTrader","sellerViewer","SellerViewer","subscriptionManager","SubscriptionManager","viewer","collateralManager","CollateralManager","media","dateFilter","getSearchDateRange","regByFrom","dateFrom","regByTo","dateTo","searchTerms","companyIds","regByIds","getFilterCriteria","MANAGE_EXPORT_USERS_REQUEST","saveAs","blob","MANAGE_EXPORT_USERS_SUCCESS","MANAGE_EXPORT_USERS_FAILURE","getUserLoginHistory","COMPANY_MEMBER_SET_USER_LAST_LOGIN_HISTORY","resetUserLoginHistory","COMPANY_MEMBER_RESET_USER_LAST_LOGIN_HISTORY","memberSubscriptionChange","subscriptionType","trialPeriodEnd","COMPANY_MEMBER_SUBSCRIPTION_CHANGE","companySubscriptionChange","subscriptionPeriodEnd","COMPANY_SUBSCRIPTION_CHANGE","changeClearingBankSettings","COMPANY_SET_CLEARING_BANK","setTempPassword","deleteUser","companyUserCount","COMPANY_MEMBER_DELETED","RESET_SUBSCRIPTION","_x7","exportCompanies","_callee7","order","salesRepresentative","orderByColumn","_context7","setIsRequestingExportCompany","CompanyStatus","brokerDealer","seller","Seller","companyColumnsExportValues","_x11","_x12","companyPushDataReceived","_callee6","targetCompany","_context6","_callee5","_context5","getUserListRequestStatus","exception","_x8","COMPANY_PUSH_DATA_RECEIVED","_x9","_x10","applyCompanyFilters","COMPANY_FILTER_APPLY","resetCompanyFilters","COMPANY_FILTER_RESET","resetMemberFilters","MEMBER_FILTER_RESET","COMPANY_SET_EDITING_USER","USERS","COMPANIES","USER_REQUESTS","COMPANY_STATUS_CHANGE_CONFIRMATION","MEMBER_STATUS_CHANGE_CONFIRMATION","COMPANY_APPROVE_REQUEST","COMPANY_APPROVE_SUCCESS","COMPANY_APPROVE_FAILURE","RESEND_INVITE_CONFIRMATION","RESET_PASSWORD_CONFIRMATION","COMPANY_FILTER_CHNAGED","MEMBER_FILTER_APPLY","MEMBERS_FILTER_CHNAGED","savingUserFlag","SAVING_USER","COMPANY_MEMBER_SET_OFAC_FAILURE","COMPANY_SET_OFAC_FAILURE","TFA_STATUS_CHANGE_CONFIRMATION","COMPANY_GET_USER_LIST_REQUEST_STATUS","MANAGE_SET_REQUEST_STATE_EXPORT_COMPANIES","trustee","trusteeActions","fetchFavoriteBrokerDealersSuccess","favorites","fetchFavoriteBrokerDealersFailure","updateFavoriteBrokerDealerRequest","isFavorite","updateFavoriteBrokerDealerSuccess","updateFavoriteBrokerDealerFailure","manageMembersFiltersActions","toogleFilterCompanies","setFilterCompanies","toogleFilterStatusInvited","toogleFilterStatusNotInvited","toogleFilterStatusPendingApproval","toggleFilterRoleArrangersClient","toogleFilterRoleBrokerDealerTrader","toogleFilterRoleBrokerDealerViewer","toogleFilterRolesDataEntry","toogleFilterRoleSellerAdministrator","toogleFilterRoleSellerTrader","toogleFilterRoleSellerViewer","toogleFilterRolesSubscriptionManager","toogleFilterCollateralManager","notificationReset","notificationPushReceived","notification","NotificationType","PushNotification","notificationAddInfo","title","createNotificationModel","uuidv4","Info","notificationAddInfoMessage","refreshButtonVisible","createModalNotificationModel","StatusMessageSectionType","infoModal","blinkBrowserTabText","popupClassName","infoModalReplace","modalKey","Alert","notificationListHideToast","notificationListRemoveModalItem","notificationListToastExpired","modalNotificationListReset","notificationServiceConnect","notificationServiceConnected","notificationServiceDisconnected","notificationServiceReconnecting","notificationServiceReconnected","notificationGetList","appendNotifications","notificationList","notificationAttributes","notificationGetListFailure","notificationsGetCountUnread","notificationsGetCountUnreadFailure","notificationsSetCountUnread","notificationSetReadRequest","notificationSetReadSuccess","notificationSetReadFailure","notificationsReadAllRequest","notificationsReadAllSuccess","notificationsReadAllFailure","notificationRead","notificationReadAll","isReadByUser","subject","getExcludedDealersRequest","getExcludedDealersSuccess","excludeNewCompany","getExcludedDealersFailure","saveExcludedDealersRequest","dealerIds","saveExcludedDealersSuccess","saveExcludedDealersFailure","requestTokens","storeTokens","tokens","setTokenRequestStatus","setCompanyRequestStatus","setGenerateRequestStatus","setUpdateTokenRequestStatus","storeGeneratedToken","token","generate","apis","tokenId","tokenUpdated","revoke","tokenRevoked","setRevokeTokenRequestStatus","toogleFilterStatusExpired","toogleFilterStatusRevoked","toogleFilterApiBlotterApiReader","toogleFilterApiBwicMonitorApiReader","toogleFilterApiIssuanceMonitorApiReader","toogleFilterApiPortfolioApi","toogleFilterApiEvalApiReader","toogleFilterApiDashboardApiReader","resetTokenFilters","manageTokenActions","applyTokenFilters","tickers","pipeline","arrangersPipelineActions","messageTypeChange","messageType","recipientLevelChange","recipientLevel","editMinutesAboutToEnd","stage1AboutToEndTimeout","setError","blastMessageActions","storeRecipients","recipients","recipientSelectedChange","companyIdentifier","send","blastMessageRecipients","bwicParticipants","sending","isSending","selectAllRecipientsChange","isSelectAllRecipients","toggleSelectAllParticipantsFlag","downloadPdfRequest","downloadPdfSuccess","downloadPdfFailure","directBiddingDisclaimerActions","settlementAgentAgeementPushActions","settlementAgentAgreementPushReceived","settlementAgentRequestPushReceived","getCloManagers","companyReferenceName","getCloManagersResult","cloManagers","getCloManager","getCloManagerResult","cloManager","bwicCloManagers","createOrUpdateCloManager","setCloManagerSaveState","isUpdating","logUserActivity","accessType","switchFavoriteRequest","favorite","switchFavoriteResponse","analyticsInit","analyticsInitResponse","analyticsReset","clientsActivityRequest","startDate","endDate","clientsActivityResponse","numberOfHiddenItems","clientsActivityFilterChange","profileViewHistoryRequest","profileViewHistoryResponse","cloManagersActions","setManagerForAlertPopup","profileViewHistoryFilterChange","profileViewHistoryFilterByBar","selectedSecurityChange","editPlatformUsers","resetEditPlatformUsers","companyMembersActions","fetchCompanyMembers","inventoryAlertChange","enabled","emailPreferencesActions","bwicAlertChange","availableBrokerDealersActions","changeSubscriptionActions","setSubscriptionSavingFlag","isSubscriptionSavingFlag","saveSubscription","subscriptionExpiration","result","portfolioListActions","resetEntities","colorDistributionSend","updateSendAlertState","sendAlertState","deletePortfolio","portfolioId","getDeals","getDealsResult","deals","getDealDetails","getDealDetailsResult","dealDetails","getClassSecondaryInfo","selectedClass","getClassSecondaryInfoResult","securityStatistics","resetDeals","editDeal","editDealReset","updateDeal","formData","updateDealResult","deleteDealRequest","deleteDealResult","allClassesEdit","classes","allClassesEditInit","deal","allClassesUpdate","dealReferenceName","allClassesUpdateResponse","allClassesCacheTranche","tranche","allClassesInvalidateTranceCache","updateGridRow","updateDealDocuments","documentsWithPattern","updateDealDocumentsResult","amrInfoClassesEdit","amrInfoSave","transactionReferenceName","amrInfo","saveAmrInfoResponse","deleteAmrTransaction","classReferenceName","excludedDealersReferenceNames","saveExcludedDealersResponse","saveSettlementInstructionsRequest","settlementInstructions","saveSettlementInstructionsResponse","exportSettlementInstructions","dealLegalName","classLegalName","openFigiErrorTickersResponse","errorTickers","dealsActions","allClassesUpdateStatus","clone","TrancheStatus","Inactive","updatedTranche","balance","margin","redeemed","ratingDbrs","ratingFitch","ratingKbra","ratingMoodys","ratingSnP","hasHistoryData","historyBalance","historyMargin","historyFloaterIndex","historyRatingDbrs","historyRatingFitch","historyRatingKbra","historyRatingMoodys","historyRatingSnP","cachedData","cachedItem","allClasses","cachedInactiveClasses","Draft","allClassesUpdateCoupon","originalFloaterIndex","originalMargin","updatedTrahcne","amrFormatUtils","originalCoupon","allClassesUpdateTickers","selectedDeal","updatedDataItem","ticker144A","formatTickerRule144a","tickerRegS","formatTickerRuleRegS","tickerAccdInvCertif","formatTickerRuleAccInvCertif","_history$location","_history$location$sta","securityDetailsActions","securityDetailsReset","autoFeedbackSettingsActions","showAutoFeedbackSettingsPanel","bwicHistoryActions","showHistory","pxTalkListActions","companyDetailsActions","textRulesPanelActions","panel","processActions","_process$templates$al","_getState","templates","processService","getTemplates","addTemplates","selectTemplate","setBwicDisabledTime","_getState$process$err","_getState$process2","_getState$process2$er","hasTemplateErrors","goodUntilCurrentTime","frameEnd","bwicAllowedTimeRange","to","storeNextBusiessDay","NEXT_BUSINESS_DAY","reserveLevelsApplyEnabled","RESERVE_LEVELS_APPLY_ENABLED","updateTemplateDirty","earlyTradesEnabled","EARLY_TRADES_ENABLED","setStage1Deadline","_getState$process$err3","cutOffReminder","stage1Deadline","SET_STAGE1_DEADLINE","setImprovementRound","SET_IMPROVEMENT_ROUND","setMinBidIncrement","SET_MIN_BID_INCREMENT","setLevelSpecificationType","SET_LEVEL_SPECIFICATION_TYPE","setOpenBiddingImproverCount","SET_OPEN_BIDDING_IMPROVER_COUNT","resetStage1DeadlineError","_getState$process$err4","resetImprovementRoundError","_getState$process$err5","improvementRound","resetMinBidIncrementError","_getState$process$err6","minBidIncrement","resetJumpBallStage2DurationMinutes","_getState$process$err7","jumpBallStage2DurationMinutes","resetBestFootForwardDurationMinutes","_getState$process$err19","bestFootForwardDurationMinutes","resetJumpBallStage1AutomaticMinutes","_getState$process$err10","jumpBallStage1AutomaticMinutes","resetTopXStage1AutomaticMinutes","_getState$process$err8","topXStage1AutomaticMinutes","resetTopXStage2DurationMinutes","_getState$process$err9","topXStage2DurationMinutes","titleChange","TITLE_CHANGE","descriptionChange","DESCRIPTION_CHANGE","setMinDate","MIN_DATE","setHolidays","HOLIDAYS","resetChanges","RESET_CHANGES","jumpBallStage1EndManual","JUMP_BALL_STAGE_1_END_MANUAL","RESET_CUT_OFF_REMINDER_MINS","jumpBallStage1EndAuto","JUMP_BALL_STAGE_1_END_AUTO","jumpBallStage1EndAutomaticMinutesChange","_getState$process$err12","JUMP_BALL_STAGE_1_END_AUTO_MINS","jumpBallStage2ParticipantsChange","participants","JUMP_BALL_STAGE_2_PARTICIPANTS_CHANGE","jumpBallStage2DurationUnspecified","JUMP_BALL_STAGE_2_DURATION_UNSPECIFIED","jumpBallStage2DurationPreset","JUMP_BALL_STAGE_2_DURATION_PRESET","jumpBallStage2DurationMinutesChange","_getState$process$err13","JUMP_BALL_STAGE_2_DURATION_MINS","autoFeedbackDelayChange","autoFeedbackDelay","AUTO_FEEDBACK_DELAY_MINS","autoFeedbackDelayEnabled","AUTO_FEEDBACK_DELAY_ENABLED","autoFeedbackDelayDisabled","AUTO_FEEDBACK_DELAY_DISABLED","_getState$process$err14","minBidIncrementChange","MIN_BID_INCREMENT_CHANGED","minBidIncrementEnabled","MIN_BID_INCREMENT_ENABLED","minBidIncrementDisabled","MIN_BID_INCREMENT_DISABLED","_getState$process$err15","cutOffReminderChange","_getState$process$err11","CUT_OFF_REMINDER_MINS","topXStage1EndManual","TOP_X_STAGE_1_END_MANUAL","topXStage1EndAuto","TOP_X_STAGE_1_END_AUTO","topXStage1EndAutomaticMinutesChange","_getState$process$err16","TOP_X_STAGE_1_END_AUTO_MINS","topXStage2ParticipantsChange","TOP_X_STAGE_2_PARTICIPANTS_CHANGE","topXStage2DurationUnspecified","TOP_X_STAGE_2_DURATION_UNSPECIFIED","topXStage2DurationPreset","TOP_X_STAGE_2_DURATION_PRESET","topXStage2DurationMinutesChange","_getState$process$err17","TOP_X_STAGE_2_DURATION_MINS","bestFootForwardDurationMinutesChange","_getState$process$err18","BEST_FOOT_FORWARD_DURATION_MINS","setAllToAllProtocol","SET_ALL_TO_ALL_PROTOCOL","_getState$process","timeZones","_getBwicAllowedTimeRa","getBwicAllowedTimeRange","fromTime","toTime","arrayUtils","arrayFromRange","allowed","hour","disabledHours","selectedTimeZone","t","frameEndHour","isBidsDueMinutesDisabled","shouldDisableMinutes","isGoodUntilMinutesDisabled","SET_DISABLED_TIME","utcOffsetMinutes","timeZoneId","est","abbreviation","_constants$bwicAllowe","from","_getState$process$err2","bidsDueUtc","goodUntilUtc","appConfig","enableAnyTimeNewBwic","_getBwicAllowedTimeRa2","bwicTimeInvalidRange","timeFormat3","now","bwicTimeShouldNotBeInPast","template","bidsDueTimestamp","goodUntilTimestamp","timeFormat","bwicDuration","validateNumber","minBidIncrementRange","validateMinBidIncrementTemplate","autoFeedbackDelayRange","Math","validateAutoFeedbackDelay","processRange","range","lessThanErrorMessage","greaterThenErrorMessage","getBestFootForwardCutOffReminderRange","stageDuration","stageDurationMinutes","minBwicDuration","cutOffReminderRange","differenceBetweenStageAndCutOffReminder","getRangeWithStage1Deadline","stage1DeadlineMinutes","automaticStage1Deadline","liveBidding","validateCutOffReminder","bwicDurationMinutes","stage1Max","openBiddingMinStage2Duration","openBiddingMinStage1Duration","setMoreThanTotalDuration","openBiddingMaxStage2Duration","openBiddingMinBidIncrement","openBiddingMaxBidIncrement","validateLive","_template$jumpBall","stage1EndAutoRange","stage2DurationRange","stagesDuration","validateJumpBall","_template$topX","validateTopX","_template$bff","bestFootForward","stage1DeadlineRange","validateBestFootForward","validateTemplate","isDateValid","isTemplateValid","String","invalidRange","ADD_TEMPLATES","cutOffReminderRangeDefaultMinutes","autoFeedbackDelayDefaultMinutes","levelSpecificationType","LevelSpecificationType","openBiddingImproverCount","OpenBiddingImproverCount","top3","openBiddingDefaultStage1Deadline","defaultMinBidIncrement","JumpBallStage2Participants","stage2DurationDefaultMinutes","stage1EndAutoDefaultMinutes","TopXStage2Participants","stage1DeadlineDefaultMinutes","SELECT_TEMPLATE","_getState$process$tem","original","dirty","SET_TEMPLATE_DIRTY_STATE","cloSystemInfrastructureActions","responseData","cloSystemInfrastructure","fetchMarketingEventsRequest","fetchMarketingEventsResponse","events","fetchNewsRequest","page","tab","fetchNewsResponse","news","fetchNewsDetails","newsReferenceName","queryParams","fetchNewsDetailsResponse","fetchTotalNewsCountRequest","fetchTotalNewsCountResponse","totalNews","deleteSingleNews","resetNewsList","newsActions","link","downloadDocument","documentReferenceName","fileName","downloadDocuments","newsItem","headers","rowsLimit","gridRowsLimit","minDrafts","autoFocus","GRID_SET_MOUNTED_KEY","getTime","setColumns","updateRowsLimit","appendDrafts","setInitialPosition","showHelp","addColumn","positionIndex","ADD_COLUMN","removeColumn","REMOVE_COLUMN","moveColumnData","fromColumnName","toColumnName","MOVE_COLUMN_DATA","clearCell","setFocus","columnName","hideHelp","POSITION_CHANGE","cancelEdit","applyEdit","targetColumnName","_getState$grid13","orderByUpdate","isMoney","nonDrafts","drafts","allSorted","sort","compareNumbers","columns","comparePxTalks","color","compareColors","compareRatings","compareStrings","getSortedDataItems","valueA","valueB","compareUtils","normalizedLevel","MAX_VALUE","numberA","formatColor","MIN_VALUE","Ratings","ordering","_getState$grid14","DELETE_ROW","appendDataItems","createDraftDataItem","unique","deleteDataItemsWithErrors","DELETE_INVALID","deleteFlaggedDataItems","DELETE_FLAGGED","_getState$grid$dataIt","currentItems","dataItemsLimitError","ADD_DATA_ITEMS","replaceDataItem","addFileToDataItem","processKeyCode","keyCode","ctrl","meta","shift","deleteDisabled","_getState$grid16","selection","inputBlocked","isMovement","moveUpOrDown","isEnteringValue","readonly","cancelOnLeave","moveLeft","lastSelectedIndex","nextIndex","setSelection","indexOf","removeRight","SAME_POSITION","selectTop","moveUp","moveRight","limit","selectBottom","moveDown","DELETE_SELECTED","selectRow","_store$getState$grid","store","selectedIndex","removeAt","Set","indexes","removeMany","progress","filename","DATA_ITEMS_UPLOAD_STATE","floor","blockInput","isDataProcessing","DATA_PROCESSING","parseValue","addRow","moveRowUp","newIndex","CHANGE_ROW_ORDER","moveRowDown","CLEAR","updateDataItemDraftStatus","ROWS_LIMIT","SETUP_HEADERS","REPLACE_DATA_ITEM","gridDataItemsLimitExceeded","gridDataItemsLimitExceededTitle","_getState$grid2","INSERT_DATA_ITEMS","APPEND_DATA_ITEMS","_getState$grid3","header","canEdit","requestCancelationController","abort","editingValue","initialValue","_getState$grid4","editingError","pattern","normalized","test","changePxTalkActions","changeColorActions","readonlyCallback","_getState$grid5","moveNextRow","_getState$grid6","_getState$grid7","_getState$grid8","_getState$grid9","headerIndex","_getState$grid10","_h$initialValue","Array","isArray","UPDATE_DRAFT","_dataItem$errors","_getState$grid11","editingHeader","APPLY_EDIT","hasColumnDependencies","updateDependencyColumnsCallback","headerError","_getState$grid12","parse","editingDataItem","_defineProperty","_getState$grid15","validatePropertyValue","EDITING","_step","_iterator","_createForOfIteratorHelper","n","done","err","f","_getState$grid17","SET_SELECTION","_getState$grid18","draftCountToAdd","nonDraftCount","calculateMinDraftToAdd","calculateFixedGridDraftToAdd","fill","_getState$grid19","isDuplicated","validateDataItem","validatedHeaders","validateHeader","validateHeaders","titleForError","required","_ref$required","isNullOrEmpty","number","selectSourceItemsCallback","contactsSave","lastIndexOf","isTickerValid","allowedValues","_a$key","validateRange","SHOW_HELP","HIDE_HELP","block","BLOCK_INPUT","ERROR_RESET","isRequestCancelationError","REQUEST_CANCELATION_ERROR","CRITICAL_ERROR","caption","errorJson","jsonUtils","tryParse","isModal","displayInModal","Boolean","tableActions","hoverChange","rowKey","hover","expandedChange","expanded","resetExpanded","sortByChange","tableKey","sortBy","sortDirection","sortingType","securityDetailsInitRequest","fetchAgencyRatings","securityDetailsInitSuccess","ratings","mappings","securityDetailsInitFailure","settlementAgentAgreementActions","pushDataReceived","setDealerExpanded","expandDealers","expandedAll","toggleExpandedAllDealers","setExpandAllDealers","setEditableContact","dealerName","editableContactUpdateDealer","editableContactSave","editableContactSetRequestStatus","deleteContact","contactInviteToJoin","distributionListInviteToJoin","headOfTradingInviteToJoin","contactInviteToJoinSetRequestStatus","resetEditableContact","filterActions","createFilterActions","BwicFilterType","Portfolio","portfolioActions","redirectWithFilterArguments","resetFiltersAndUnselectSavedFilter","latestTransactionActions","togglePortfolioExpanded","EXPANDED_CHANGE","_getState$portfolio","portfolio","expandedState","expandAll","getPortfolios","getExpandedState","expandAllChange","portfolioSelectionChange","selectAll","selectedState","securitiesSelectedState","apiUtils","normalize","PORTFOLIO_SELECTED_CHANGE","deletePortfolioConfirmation","portfolioService","_getState2","securityDetails","entities","portfolios","portfolioSecuritySelectionChange","portfolioSecurityId","currentSelectedState","portfolioSelectedState","checkSelectedState","showBwicDetails","selectedSecurity","currentBwicHistoryItem","SHOW_BWIC_DETAILS","resetRowSelection","newPortfolioDialog","newPortfolio","createPortfolio","editPortfolioUrl","exportAll","_getState3","filters","filterCriteria","identifiers","isinCusipsAndTickers","nonCallEndFromYear","nonCallEndFromDate","nonCallEndFrom","nonCallEndToYear","nonCallEndToDate","nonCallEndTo","reinvestmentEndFromYear","reinvestmentEndFromDate","reinvestmentEndFrom","reinvestmentEndToYear","reinvestmentEndToDate","reinvestmentEndTo","setPortfolioExportingStatus","exportPortfolios","createBwicConfirmed","flat","getSelectedSecurities","newBWIC","cloneDeep","groupSecurities","updatePortfoliosAlertStatus","list","dataToSend","_x$bwicAlert","_x$dealersInventoryAl","_x$cleansingNoticeAle","_x$issuanceMonitorAle","_x$outOfRiPeriodAlert","_x$outOfNcPeriodAlert","_x$rollerDeadlineAler","dealersInventoryAlert","cleansingNoticeAlert","issuanceMonitorAlert","outOfRiPeriodAlert","outOfNcPeriodAlert","rollerDeadlineAlert","bwicAlertChanges","inventoryAlertChanges","cleansingNoticeAlertChanges","issuanceMonitorAlertChanges","outOfRiPeriodAlertChanges","outOfNcPeriodAlertChanges","rollerDeadlineAlertChanges","PORTFOLIO_UPDATE_ALERT_STATUS_REQUEST","updateBwicAlertStatusRequest","UPDATE_INVENTORY_ALERT_STATUS_REQUEST","updateInventoryAlertStatusRequest","UPDATE_CLEANSING_NOTICE_ALERT_STATUS_REQUEST","updateCleansingNoticeAlertStatusRequest","UPDATE_ISSUANCE_MONITOR_ALERT_STATUS_REQUEST","updateIssuanceMonitorAlertStatusRequest","UPDATE_OUT_OF_RI_PERIOD_ALERT_STATUS_REQUEST","updateOutOfRiAlertStatusRequest","UPDATE_OUT_OF_NC_PERIOD_ALERT_STATUS_REQUEST","updateOutOfNcAlertStatusRequest","UPDATE_ROLLER_DEADLINE_ALERT_STATUS_REQUEST","updateRollerDeadlineAlertStatusRequest","updatePortfoliosAlert","PORTFOLIO_UPDATE_ALERT_STATUS_SUCCESS","updateBwicAlertStatusSuccess","UPDATE_INVENTORY_ALERT_STATUS_SUCCESS","updateInventoryAlertStatusSuccess","UPDATE_CLEANSING_NOTICE_ALERT_STATUS_SUCCESS","updateCleansingNoticeAlertStatusSuccess","UPDATE_ISSUANCE_MONITOR_ALERT_STATUS_SUCCESS","updateIssuanceMonitorAlertStatusSuccess","UPDATE_OUT_OF_RI_PERIOD_ALERT_STATUS_SUCCESS","updateOutOfRiAlertStatusSuccess","UPDATE_OUT_OF_NC_PERIOD_ALERT_STATUS_SUCCESS","updateOutOfNcAlertStatusSuccess","UPDATE_ROLLER_DEADLINE_ALERT_STATUS_SUCCESS","updateRollerDeadlineAlertStatusSuccess","PORTFOLIO_UPDATE_ALERT_STATUS_FAILURE","updateBwicAlertStatusFailure","UPDATE_INVENTORY_ALERT_STATUS_FAILURE","updateInventoryAlertStatusFailure","UPDATE_CLEANSING_NOTICE_ALERT_STATUS_FAILURE","updateCleansingNoticeAlertStatusFailure","UPDATE_ISSUANCE_MONITOR_ALERT_STATUS_FAILURE","updateIssuanceMonitorAlertStatusFailure","UPDATE_OUT_OF_RI_PERIOD_ALERT_STATUS_FAILURE","updateOutOfRiAlertStatusFailure","UPDATE_OUT_OF_NC_PERIOD_ALERT_STATUS_FAILURE","updateOutOfNcAlertStatusFailure","UPDATE_ROLLER_DEADLINE_ALERT_STATUS_FAILURE","updateRollerDeadlineAlertStatusFailure","applySearchInput","advancedFilterBlocked","ADVANCED_FILTER_BLOCKED","serializers","multipleCurrencies","dealsLegalNames","collateralTypes","collateralManagers","esg","euCompliance","staticDeals","noop","trustees","amr","outOfNC","outOfRI","queryString","queryStringSerializer","serialize","_filter$currency","_filter$ratings","_filter$dealName","_filter$collateralTyp","_filter$managers","_filter$esg","_filter$euCompliance","_filter$staticDeal","_nonCallEndYears$from","_nonCallEndYears$to","_reinvestmentEndYears","_reinvestmentEndYears2","_filter$trustees","_filter$amr","_filter$outOfNC","_filter$outOfRI","nonCallEndYears","getYearsRange","nonCallEnd","reinvestmentEndYears","reinvestmentEnd","nonCallEndDateRange","selectedDateOptions","reinvestmentEndDateRange","defaultDateRange","maturityRange","maturity","selectedOption","convertToApiCriteria","options","vintageRange","vintage","closingRange","closing","dealName","collateralType","staticDeal","maturityFrom","maturityTo","vintageFrom","vintageTo","closingFrom","closingTo","DELETE_PORTFOLIO_CONFIRMATION","NEW_PORTFOLIO_DIALOG","PORTFOLIO_SET_IS_REQUESTING_EXPORT","grouped","duplicate","g","EXPAND_ALL","pageConfigActions","getConfigs","getDefaultConfig","saveColumns","resetForType","_len","types","_key","brokerDealerUserListActions","fetchCompanyDetailsRequest","fetchCompanyDetailsResponse","setCompanyDetails","totalRecordNumber","summary","resetSummary","loadNextPage","sortField","requestInventoryExistFlag","inventoryExistFlag","exist","loadSellerInventory","loadSummary","inventoryActions","exportInventoryRequest","exportInventoryResponse","pushInventory","inventories","inventoryStatusChange","filterType","selectFilterFromConfig","selectedFilter","filterSelectChange","option","filterName","filterSelectSelectAll","filterSelectClearAll","makeFilterVisible","updateFilterState","resetFilterState","resetFiltersVisibility","filterVisibilityChange","storeFilterData","changeRangeFilter","filterRadioChange","filterRadioClearOption","filterRangeClearSelectedOptions","setFilterByReferenceName","selectedFilterReferenceName","filterDateClearSelectedOptions","filterDateSelectOption","filterDateTimeOptionSelected","filterDateSelectCustomRange","filterDateTimeSelectCustomRange","filterDateSelectYearsRange","setRedirectFilters","redirectWithNoFilter","filterDateQueryStringDeserialized","deserializeResult","resetSelectedFilter","pushUpdateList","contacts","brokerDealerContactListActions","setContactInvitationSent","resetPanelState","blotterTradeAllocationTemplateActions","templateId","activate","lock","saveModel","updates","activated","deactivated","settlementAccountId","assetManager","percent","TradeAllocationType","PercentOfTrade","CreditRatings","tradeAllocationTemplateService","saveTemplate","tradeAllocationTemplateActions","setTemplateActive","activeChange","LocationStateBuilder","resetPanel","PanelType","Templates","t1","createSearchTransactionActions","pipelineType","resetLookupCache","searchItemsRequesting","window","requestSearchLookup","isLoadMore","_amrPipelineSelector","_amrPipelineSelector$","dealsOffset","classesOffset","dealsWithClasses","amrPipelineSelector","searchTransactions","dealsService","getDealsList","getDealsClassesList","isDeal","SEARCH_ITEM_ADD","isSearching","SEARCH_ITEMS_REQUESTING","SEARCH_RESET_LOOKUP_CACHE","label","classNames","SEARCH_MOVE_BACK","SEARCH_MOVE_FORWARD","SEARCH_REMOVE_CURRENT_ITEM","SEARCH_ITEM_REMOVE","SEARCH_RESET","loadDealsLookup","_amrPipelineSelector2","SEARCH_ADD_DEALS","loadClassesLookup","_amrPipelineSelector3","SEARCH_ADD_CLASSES","toggleCompanyVisible","identifier","setLastSelectedCompanyIdentifier","toggleAllFavoriteCompaniesVisible","toggleAllPlatformVisible","toggleAllOffPlatformVisible","toggleAllSettlmentsClientsVisible","toggleAllFavoriteVisibleFlagOnly","toggleAllPlatformVisibleFlagOnly","toggleAllSettlmentsClientsFlagOnly","toggleAllOffPlatformVisibleFlagOnly","setDefaultVisibility","companiesToHide","setDisabledCompanies","disabledCompanies","setBidOnlyFlag","bidOnlyFlag","stage2ParticipantsFlagChange","isStage2participantsOnly","showAllEnabled","showBwicParticipantsOnly","signupActions","submit","submitSuccess","submitError","loadBwicDates","dateTime","dueTime","isInitializing","initializing","canCreateBwicOnUSFederalHolidays","utc","bidDueDefaultTimestamp","goodUntilDefaultTimestamp","formatTimeStringWithoutTimeZone","securitiesWithoutPxTalkAndColor","lookup","compareCallback","_security$isin","_security$cusip","fetchCallback","_fetchCallback","abortSignal","searchSecuritiesGlobal","onLookupItemSelected","insertSelectedSecurity","_fetchCallback2","toString","insertSecurityFromQueryParams","mergeWithPrevious","setSecurityNew","_getState$grid$positi","savePxTalks","changePxTalk","saveColor","_getState$changeColor","changeColor","validateTradeLimits","VALIDATE_TRADE_LIMITS_REQUEST","VALIDATE_TRADE_LIMITS_SUCCESS","VALIDATE_TRADE_LIMITS_ERROR","get","isins","cusips","tickersQueryParams","isinsQueryParams","cusipsQueryParams","securityFromQueryParams","join","INITIALIZING","SECURITIES_SET_FLAGGED_MODAL","formsActions","activateValidation","DISPLAY_VALIDATION_ERRORS","newBWICActions","EDIT_BWIC","changeStep","steps","nextStep","activeStep","_process","selectPlatformDealersPopupVisible","stepKeys","activeStepIndex","nextStepKey","isRequestSuccess","validateTradeLimitsRequestState","newBwicDealers","newBwicDealersSelector","previousStep","previousStepKey","isRequesting","_getState4","setTime","earlyTrades","processTemplateId","jumpBallAutomaticStage1Deadline","jumpBallImproverCount","jumpBallImprovementRound","topXAutomaticStage1Deadline","topXImproverCount","topXImprovementRound","BffStage1Deadline","_process$isAllToAll","getIsAlltoAllProtocol","submitActions","submitState","newBWICCreated","DEALERS_SET_SEARCH_TERM","updateFilterOption","DEALERS_UPDATE_FILTER_OPTION","DEALERS_CLEAR_FILTER_OPTIONS","documentsActions","RESET_WIZARD","step","CHANGE_STEP","securityIdList","uploadDocumentsActions","SUBMIT_STATE","userCompany","getCurrentUserCompany","STORE_USER_COMPANY","editPortfolioActions","portfolioReferenceName","loading","getPortfolio","PORTFOLIO_LOADED","createNewPortfolio","portfolioName","portfolioSaveSecuritiesMessage","portfolioSaveSecuritiesTitle","PORTFOLIO_UPDATE_REQUEST","PORTFOLIO_UPDATE_SUCCESS","PORTFOLIO_SAVED","activeInventorySecurityActions","PORTFOLIO_UPDATE_FAILURE","renamePortfolioDialog","RENAME_DIALOG_VISIBLE","dialog","updatePortfolioSecurities","updatedPortfolioName","editPortfolio","renamePortfolio","savePositions","deletePortfolioDialog","DELETE_PORTFOLIO_DIALOG","PORTFOLIO_DELETED","exportPortfolio","setRequestingExportState","isLoading","EDIT_PORTFOLIO_LOADING","PORTFOLIO_SET_REQUESTING_EXPORT_STATE","manageParsedBwicsActions","filterQueryString","resetFilters","loadFilterFromQueryString","hardReset","lastAppliedSearchTerm","refreshLastUpdatedDate","REFRESH_LAST_UPDATED_DATE","filterDateChange","filterCustomDateChange","filterStatusChange","filterPublishedChange","setBwicCollapsedState","collapsed","SET_BWIC_COLLAPSED_STATE","_getState$manageParse","bwics","collapseAll","collapsedCount","setCollapseAll","securitySelectionChange","POSITION_SELECTION_CHANGE","publishDialog","unpublishDialog","deleteBwicDialog","onReview","updateBwicList","unpublish","editPxTalk","savePxTalk","_state$changePxTalk","deletedPriceTalks","_state$manageParsedBw2","priceTalkLock","pxTalkService","newPriceTalkLock","UPDATE_PXTALK","editColor","_state$changeColor","_state$manageParsedBw3","colorService","UPDATE_COLOR","deleteColor","_getState$manageParse2","showNewBwic","j","editActions","newParsedBWIC","deleteBwic","changeAmrFlag","setRequestStatusIsAMR","MANAGE_PARSED_BWICS_SET_IS_AMR_FLAG","_getState$manageParse3","searchInProgress","isNextPageRequesting","nextPageRequesting","statusKeys","published","deserialize","_getDateRangeOption","getDateRangeOption","customRange","bwicDateFilterOptions","custom","shouldSearch","RESET_FILTERS","LOADING","MANAGE_PARSED_BWICS_RESET_PAGING","SEARCH_PROGRESS","searchCriteria","lastAppliedFilter","theFilter","getPublishedOption","stateOptions","getSearchCriteria","_state$manageParsedBw","currentPageNumber","pageSize","nextPageNumber","SEARCH_COMPLETE","FILTER_DATE_CHANGE","customDateRange","FILTER_CUSTOM_DATE_CHANGE","FILTER_STATUS_SELECTION_CHANGE","FILTER_PUBLISHED_STATE_SELECTION_CHANGE","SET_COLLAPSE_ALL","PUBLISH_DIALOG","UNPUBLISH_DIALOG","UPDATE_BWIC_LIST","_getState$entities$pr","preloadedPxTalks","priceTalks","EDIT_PXTALK","EDIT_COLOR","DELETE_BWIC_DIALOG","MANAGE_PARSED_BWICS_NEXT_PAGE_REQUESTING","MANAGE_PARSED_BWICS_SET_REQUEST_STATUS_IS_AMR","STORE_PXTALKS","resetCompanies","pxTalk","ADD_PXTALK","talkChange","TALK_CHANGE","change","pxTalkUtils","normalizeDecimalPlaces","normalizeTalk","levelTypeChange","levelType","LEVEL_TYPE_CHANGE","deletePxTalk","DELETE_PX_TALK","waitNormalizing","normalizedCallback","wait","isNormalizing","setPxTalkError","match","normalizing","updateValues","parsedLevel","NORMALIZED_LEVEL_CHANGE","validatePxTalk","normalizedLevelChange","responseMessage","VALIDATION_RESULT","TALK_ERROR","NORMALIZING","dm","SET_COLOR","levelSpecifications","cover","pxTalkLevelTypes","price","traded","colorType","colorTypes","setDm","CHANGE_COLOR_SET_DM","tradedChange","TRADED_CHANGE","setColorError","levelSpecificationChange","levelSpecification","LEVEL_SPECIFICATION_CHANGE","levelChange","LEVEL_CHANGE","normalizeLevel","setNormalizedLevel","updateColor","validateLevel","setLevelError","SET_LEVEL_ERROR","colorError","tradedBest","dntCover","invalidColor","validateColor","SET_COLOR_ERROR","levelError","contactsSaveActions","companyDomainsPromise","companyDomains","allContacts","getBrokerDealers","getCompanyDomains","loadCompanies","loadCompanyDomains","setCompanyNameByEmailDomain","contactsService","getContacts","storeInitialContacts","setEditMode","selectCompany","resetCompaniesLookup","_getState$contactsSav","companiesLookup","COMPANIES_LOOKUP","uploadContacts","clipboardText","parseContactsStirng","deletedContacts","conflicts","findConflicts","switchView","contactsSaveViews","saveResolved","deleteDuplicate","DELETE_DUPLICATE_CONTACT","ENSURE_CONFLICTS_RESOLVED","backToContactsEdit","RESET_CONFLICTS","CONTACT_SAVE_LOADING","INITIAL_CONTACTS","EDIT_MODE","LOAD_COMPANIES","LOAD_COMPANY_DOMAINS","_getState$contactsSav2","contactIndexesToSkip","duplicates","isDeleted","contactIndex","contactsToSave","bulkSave","storeConflicts","view","SWITCH_VIEW","currentContacts","contactsIndexed","nameDuplicates","emailDuplicates","nameConflicts","emailConflicts","findNameDuplicates","findEmailDuplicates","has","nameUtils","getFullName","nameEquals","otherFullName","currentDuplicates","localDuplicates","cc","Map","conflictType","contactConflictTypes","duplicateName","isResolved","duplicateEmail","STORE_CONFLICTS","exstingContacts","DELETE_CONTACT","gridItemIndex","domainName","substring","domains","domainNames","portfolioDocumentsActions","getSecurityIdList","otherSellerBiddingActions","OTHER_SELLER_BIDDING_STORE_SECURITIES","OTHER_SELLER_BIDDING_RESET","dealersActions","requestToBid","settlementAgentId","setRequestStatus","settlementAgentAgreementService","sendRequest","hideBidRequestConfirmPopup","DEALERS_RESET_STATE","showBidRequestConfirmPopup","DEALERS_SHOW_CONFIRM_BID_REQUEST_POPUP","DEALERS_REQUEST_TO_BID_SET_REQUEST_STATUS","DEALERS_HIDE_CONFIRM_BID_REQUEST_POPUP","pushInvitationActions","brokerDealerListActions","updateDealerDistributionListInvitationSent","updateDealerHeadOfTradingInvitationSent","cancelColorDistribution","isCompleteInProgress","COLOR_DISTRIBUTION_RESET","setCompleteInProgress","colorDistributionModel","_s$bids","colorDistributionType","TradeStatus","pending","affirmed","forDNTType","colorDistributionTypes","forTradedType","tradedTypeChange","tradedType","COLOR_DISTRIBUTION_TRADED_TYPE_CHANGE","dntTypeChange","dntType","COLOR_DISTRIBUTION_DNT_TYPE_CHANGE","positionColorTypeChange","COLOR_DISTRIBUTION_POSITION_COLOR_TYPE_CHANGE","COLOR_DISTRIBUTION_SET_BWIC_COLOR_DISTRIBUTION","inProgress","COLOR_DISTRIBUTION_COMPLETE_IN_PROGRESS","onBoardingTooltipNav","onBoardingTooltipClose","onBoardingTooltipGotIt","doNotShowSupportPopup","onBoardingTooltipSetVisible","onBoardingTooltipSetCountRequest","onBoardingTooltipSetCountSuccess","onBoardingTooltipSetCountFailure","onBoardingTooltipSetVisibleSupportPopup","onBoardingReset","inviteToJoinActions","setVisiblePopup","inviteToJoinActionTypes","INVITE_TO_JOIN_TOGGLE_VISIBLE_POPUP","sendInviteToJoin","INVITE_TO_JOIN_INVITE_ALL_REQUEST","inviteAllToJoin","INVITE_TO_JOIN_INVITE_ALL_SUCCESS","INVITE_TO_JOIN_INVITE_ALL_FAILURE","loadHistory","historyState","bwicHistory","loadHistoryState","getBwicHistory","toggleHistory","markHistoryMessagesAsRead","messages","MARK_HISTORY_MESSAGES_AS_READ","console","log","historyActions","STORE_BWIC_HISTORY","LOAD_HISTORY_REQUEST_STATE","SHOW_BWIC_HISTORY","PX_TALK_LIST_VISIBLE","pxTalkList","initRequestStatus","bidAsDealerRequestExist","dateFilterChange","customDateFilterChange","bwicStatusFilterChange","currencyFilterChange","ratingFilterChange","typeFilterChange","sizeFilterChange","filterApply","isApply","isSearchTermChange","filterReset","dataItemsLoadingState","storeSearchResult","storeCurrencySelectedStatus","isSelected","submitBidRequest","updateBidRequests","updateRequestStateSubmitBid","saveSearchTermItems","searchItems","pagingReset","storeAppliedFilter","confirmBidRequestPopup","exportBidRequestsRequest","exportBidRequestsSuccess","exportBidRequestsFailure","updateEditBidRequestState","editBidRequestState","sellerBuysideActions","valueRaw","axedChange","finalChange","commissionChange","resetPositionEditState","submittedBidsFilterChange","submittedBidsFilterValue","liveBiddingStage2TimerExpired","sortChanged","sortFieldChanged","advancedFiltersBlocked","imDetailsDealsActions","loadDealDetails","_getState$imDetailsDe","loadedDealReferenceNames","currentDeal","isMedia","actualAuctionsPromise","amrDocumentsPromise","dealDocumentsPromise","loadedDeals","amrDocuments","dealDocuments","actualAuctions","imDetailsDeals","dealDetailsRequesting","getLatestDealAuctions","getAmrDocuments","getDealDocuments","getDeal","storeDeals","storeDocuments","storeActualAmrClasses","loadTrancheDetails","selectedTranche","auctions","trancheDetailsRequesting","getClassAuctions","storeAmrClasses","documentsSearchTermChange","filteredDocuments","documents","getDealDocLastDate","dateText","storeDocumentsSearchResults","resetDocumentsSearch","DEALS_RESET_DOCUMENTS_SEARCH","DEALS_STORE_DEALS","DEALS_STORE_DOCUMENTS_SEARCH_RESULTS","amrClasses","DEALS_STORE_ACTUAL_AMR_CLASSES","DEALS_STORE_AMR_CLASSES","DEALS_STORE_DOCUMENTS","DEAL_DETAILS_REQUESTING_STATE","DEALS_TRANCHE_DETAILS_REQUESTUNG_STATE","loadingFlag","paymentCardSavingFlag","storePaymentCards","paymentCards","sortPaymentCards","primaryCardChange","paymentCard","moveOnTop","primaryCardChangeCompleted","deletePaymentCard","deletePaymentCardCompleted","addPaymentCardPopupVisible","addPaymentCard","isLoadingVisible","setAsPrimary","storeBillingContact","billingContact","storeCountries","storeStates","storeCities","billingContactEditFlag","isBillingContactEdit","billingContactSavingFlag","isBillingContactSaving","saveBillingContact","citiesLoadingFlag","isCitiesLoading","billingContactSaved","subscriptionPushReceived","subscription","upgradeSubscription","targetSubscriptionType","showUpgradeSubscriptionWizard","UpgradeSubscriptionStep","BillingContact","subscriptionsActions","hideUpgradeSubscriptionWizard","setUpgradeSubscriptionStep","contactSalesActions","requestSendingFlag","dealersStatsActions","checkStatsExist","statsExist","setRequestStateFetchDealerStatsExist","getDealersStatsService","existStatus","STORE_STATS_EXIST_STATUS","fetchStats","_fetchStats","setFetchStatsRequestStatus","fetch","stats","STORE_STATS","exportDealersStats","exportStats","export","setExportDealerStatsRequestStatus","isSeller","dashboardService","fetchDealersStatsExists","fetchSellersStatsExists","fetchDealersStats","fetchClientsStats","exportSellerStats","FETCH_STATS_EXIST_REQUEST_STATUS","FETCH_STATS_REQUEST_STATUS","EXPORT_STATS_REQUEST_STATUS","settlementAccounts","settlementAccountActions","account","deleteAccount","accountId","getUserConfig","callback","getUserConfigResult","getUserFilterConfig","configType","getUserFilterConfigResult","updateUserConfig","imUserConfig","config","JSON","stringify","updateUserConfigResult","getDefaultUserColumnsConfig","getDefaultUserColumnsConfigResult","columnConfig","selectUserFilter","userFilter","createUserFilter","createUserFilterResult","userConfigFilter","updateUserFilter","updateUserFilterResult","setUserFilterParams","params","setUserFilterParamsResult","deleteUserFilter","deleteUserFilterResult","updateUserFilterEmailAlerts","singleUpdateAlertOption","newTransactionAlertOption","statisticAlertOption","filterEmailAlerts","imUserConfigActions","saveTransactionAlerts","configs","saveCompanyAlerts","blotterInit","blotterReset","blotterFiltersReset","blotterSetFilterDefaults","blotterToggleConfirmed","blotterTogglePending","blotterToggleRejected","blotterToggleAllocationStatusUnsettled","blotterToggleAllocationStatusPendingSettlement","blotterToggleAllocationStatusPendingAllocation","blotterToggleAllocationStatusPendingProceeds","blotterToggleAllocationStatusSettled","blotterSetCurrency","blotterResetCurrency","blotterSelectAllCurrencies","blotterDateFilterChange","blotterCustomDateFilterChange","blotterSettlementDateFilterChange","blotterSettlementCustomDateFilterChange","blotterToggleFilterBuy","blotterToggleFilterSell","blotterToggleFilterClient","blotterToggleFilterDesc","blotterSearchRequest","blotterSearchRequestNextPage","blotterSearchSuccess","blotterSearchFailure","blotterOrderByChange","blotterHasTradesRequest","blotterHasTradesSuccess","hasTrades","blotterHasTradesFailure","blotterExportRequest","blotterExportSuccess","blotterExportFailure","blotterToggleVcon","isBuyTrade","blotterSetVconRequest","blotterSetVconSuccess","blotterSetVconFailure","blotterToggleBooked","blotterSetBookedRequest","blotterSetBookedSuccess","blotterSetBookedFailure","resetPopupState","allocationLock","isBuyerAllocationManual","isSellerAllocationManual","blotterTradeAllocationActions","recalculateAmountOfTrade","blotter","_amount","amount","round","amountOfTrade","recalculatePercentOfTrade","_percent","percentOfTrade","side","proceed","settlementService","saveTradeAllocation","tradeAllocationActions","resetPopup","dashboardInit","dashboardInitSuccess","dashboardInitFailure","dashboardFetchBwics","dashboardFetchPortfolioExist","dashboardInitPortfolioSecurities","dashboardFetchPortfolioSecurities","dashboardFetchColorRates","dashboardFetchDntRates","dashboardFetchSameDayPeriods","dashboardInitTradingStats","dashboardFetchTradingStats","dashboardInitPriceLevel","dashboardFetchPriceLevel","dashboardFetchBidRequestsAsSeller","dashboardFetchDtcSellingBuying","dashboardFetchAAAPriceLevel","dashboardFetchMostTradedTickers","dashboardFetchBiggestMovers","dashboardFetchDtcIgHy","dashboardFetchPxTalkDeviation","dashboardFetchBwicPercentOfTrace","dashboardFetchKWatchNews","dashboardFetchTopIssuers","ccy","dashboardFetchTopIssuersResult","dashboardExportTopIssuers","sortingParams","dashboardSetRequestStatusExportTopIssuers","dashboardFetchTopArrangers","collat","dashboardFetchTopArrangersResult","dashboardExportTopArrangers","dashboardSetRequestStatusExportTopArrangers","dashboardFetchTopTrustees","dashboardFetchTopTrusteesResult","dashboardExportTopTrustees","dashboardSetRequestStatusExportTopTrustees","dashboardFetchTopStaticDeals","dashboardFetchTopStaticDealsResult","dashboardExportTopStaticDeals","orderByTransaction","dashboardSetRequestStatusExportTopStaticDeals","dashboardFetchTopDebutDeals","dashboardFetchTopDebutDealsResult","dashboardExportTopDebutDeals","dashboardSetRequestStatusExportTopDebutDeals","dashboardFetchKIndicator","dashboardSetFilter","dashboardSetNotAppliedFilter","dashboardClearFilter","dashboardSetFilterActive","dashboardResetNotAppliedFilter","dashboardReset","dashboardOnSelectedSecurity","dashboardSetSearchTermItem","dashboardFetchSecurityHistoryRequest","dashboardFetchSecurityHistorySuccess","securityHistory","dashboardFetchSecurityHistoryFailure","dashboardExportBwiStatistic","dashboardExportTradingStats","currencies","dashboardSetRequestStatusExportTradingStats","dashboardPushUpdateTradingStats","tradingStats","dashboardPushUpdatePriceLevel","priceLevel","dashboardPushBiggestMovers","biggestMovers","dashboardPushUpdateMostTradedTickers","mostTradedTickers","dashboardInitIssueTransactionVolume","dashboardIssueTransactionVolumeRequest","dashboardIssueTransactionVolumeResult","dashboardUsBslEsgNewIssueRequest","grouping","dashboardUsBslEsgNewIssueResult","esgLanguageDeals","usBslNewIssue","dashboardGetPortfolioInventorySecuritiesRequest","pageNumber","itemsOnPage","sortOrder","dashboardGetPortfolioInventorySecuritiesSuccess","dashboardGetPortfolioInventorySecuritiesFailure","dashboardSetPortfolioInventoryCurrentPage","currentPage","dashboardPortfolioInventorySortParamsChanged","dashboardPortfolioInventoryReset","dashboardUsBslEuCompliantDealsRequest","dashboardUsBslEuCompliantDealsResult","usBslEuCompliantDeals","usBslDeals","dashboardShortLongDatedDealsRequest","managerReferenceName","dashboardShortLongDatedDealsResult","dashboardIssuanceSpreadRequest","dashboardIssuanceSpreadResult","dashboarNewIssuedWeeklySpreadsRequest","dashboardNewIssueWeeklySpreadsResult","collateralManagersActions","requestCollateralManagers","responseCollateralManagers","addPriceTalk","resetFailed","transactions"],"sourceRoot":""}