From aedabcbdeefdb56f4ec96fb85ac22db16a0752af Mon Sep 17 00:00:00 2001 From: Rafael Taranto Date: Mon, 12 May 2025 14:49:39 +0100 Subject: [PATCH] chore: reformat code --- .prettierrc | 2 +- eslint.config.mjs | 16 +- packages/admin-ui/src/Main.jsx | 2 +- .../src/components/Carousel.module.css | 2 +- .../src/components/CollapsibleCard.jsx | 4 +- .../admin-ui/src/components/ConfirmDialog.jsx | 2 +- .../src/components/CopyToClipboard.jsx | 4 +- .../admin-ui/src/components/DeleteDialog.jsx | 2 +- .../admin-ui/src/components/ImagePopper.jsx | 2 +- .../src/components/InformativeDialog.jsx | 8 +- .../src/components/LogsDownloaderPopper.jsx | 33 +- packages/admin-ui/src/components/Modal.jsx | 8 +- .../NotificationCenter/NotificationCenter.jsx | 14 +- .../NotificationCenter.module.css | 16 +- .../NotificationCenter/NotificationRow.jsx | 21 +- .../components/NotificationCenter/index.js | 1 + packages/admin-ui/src/components/Popper.jsx | 24 +- .../admin-ui/src/components/Popper.module.css | 2 +- .../admin-ui/src/components/SearchBox.jsx | 14 +- .../admin-ui/src/components/SearchFilter.jsx | 4 +- packages/admin-ui/src/components/Stepper.jsx | 4 +- .../src/components/Stepper.module.css | 2 +- packages/admin-ui/src/components/Subtitle.jsx | 2 +- packages/admin-ui/src/components/Tooltip.jsx | 26 +- .../BooleanPropertiesTable.jsx | 14 +- .../src/components/buttons/ActionButton.jsx | 6 +- .../components/buttons/BaseButton.styles.js | 36 +- .../src/components/buttons/Button.jsx | 6 +- .../src/components/buttons/Button.module.css | 6 +- .../src/components/buttons/FeatureButton.jsx | 6 +- .../src/components/buttons/IDButton.jsx | 7 +- .../admin-ui/src/components/buttons/Link.jsx | 4 +- .../src/components/buttons/Link.module.css | 2 +- .../src/components/buttons/SubpageButton.jsx | 10 +- .../buttons/SubpageButton.module.css | 2 +- .../buttons/SubpageButton.styles.js | 20 +- .../admin-ui/src/components/buttons/index.js | 2 +- .../components/date-range-picker/Calendar.jsx | 18 +- .../date-range-picker/Calendar.module.css | 4 +- .../date-range-picker/DateRangePicker.jsx | 6 +- .../src/components/date-range-picker/Tile.jsx | 8 +- .../src/components/editableTable/Header.jsx | 19 +- .../editableTable/NamespacedTable.jsx | 2 +- .../src/components/editableTable/Row.jsx | 20 +- .../components/editableTable/Row.module.css | 2 +- .../src/components/editableTable/Table.jsx | 7 +- .../src/components/fake-table/Table.jsx | 16 +- .../components/inputs/base/Autocomplete.jsx | 15 +- .../src/components/inputs/base/CodeInput.jsx | 4 +- .../src/components/inputs/base/Dropdown.jsx | 2 +- .../components/inputs/base/NumberInput.jsx | 7 +- .../src/components/inputs/base/RadioGroup.jsx | 2 +- .../components/inputs/base/SecretInput.jsx | 2 +- .../src/components/inputs/base/Select.jsx | 7 +- .../components/inputs/base/Select.module.css | 2 +- .../src/components/inputs/base/TextInput.jsx | 18 +- .../inputs/base/TextInput.module.css | 2 +- .../src/components/inputs/base/index.js | 3 +- .../src/components/inputs/cashbox/Cashbox.jsx | 14 +- .../inputs/cashbox/Cashbox.module.css | 2 +- .../inputs/formik/CashCassetteInput.jsx | 2 +- .../src/components/inputs/formik/Checkbox.jsx | 13 +- .../src/components/inputs/formik/index.js | 2 +- .../admin-ui/src/components/inputs/index.js | 2 +- .../admin-ui/src/components/layout/Header.jsx | 10 +- .../src/components/layout/Header.module.css | 2 +- .../src/components/layout/Sidebar.jsx | 8 +- .../src/components/layout/Sidebar.module.css | 4 +- .../src/components/layout/TitleSection.jsx | 6 +- .../machineActions/DiagnosticsModal.jsx | 12 +- .../machineActions/MachineActions.jsx | 30 +- .../single-row-table/SingleRowTable.jsx | 4 +- .../src/components/table/EmptyTable.jsx | 2 +- .../admin-ui/src/components/table/Table.jsx | 2 +- .../src/components/table/TableCell.jsx | 4 +- .../src/components/table/TableHeader.jsx | 4 +- .../src/components/table/TableRow.jsx | 4 +- .../admin-ui/src/components/table/index.js | 2 +- .../src/components/tables/DataTable.jsx | 14 +- .../src/components/typography/index.jsx | 14 +- .../src/components/typography/styles.js | 50 +- packages/admin-ui/src/index.jsx | 2 +- .../src/pages/AddMachine/AddMachine.jsx | 24 +- .../src/pages/Analytics/Analytics.jsx | 40 +- .../components/tooltips/GraphTooltip.jsx | 9 +- .../components/wrappers/HourOfDayWrapper.jsx | 10 +- .../components/wrappers/OverTimeWrapper.jsx | 4 +- .../wrappers/TopMachinesWrapper.jsx | 6 +- .../wrappers/VolumeOverTimeWrapper.jsx | 4 +- .../components/wrappers/wrappers.module.css | 18 +- .../src/pages/Analytics/graphs/Graph.jsx | 2 +- .../Analytics/graphs/HourOfDayBarGraph.jsx | 71 +- .../Analytics/graphs/OverTimeDotGraph.jsx | 94 +- .../Analytics/graphs/OverTimeLineGraph.jsx | 98 +- .../Analytics/graphs/TopMachinesBarGraph.jsx | 70 +- .../Authentication/Authentication.module.css | 6 +- .../pages/Authentication/Input2FAState.jsx | 12 +- .../pages/Authentication/InputFIDOState.jsx | 24 +- .../src/pages/Authentication/LoginCard.jsx | 3 +- .../src/pages/Authentication/LoginState.jsx | 42 +- .../src/pages/Authentication/Register.jsx | 32 +- .../src/pages/Authentication/Reset2FA.jsx | 18 +- .../pages/Authentication/ResetPassword.jsx | 16 +- .../pages/Authentication/Setup2FAState.jsx | 12 +- .../src/pages/Authentication/states.js | 2 +- .../src/pages/Blacklist/Blacklist.jsx | 25 +- .../src/pages/Blacklist/BlacklistAdvanced.jsx | 16 +- .../src/pages/Blacklist/BlacklistModal.jsx | 4 +- .../src/pages/Blacklist/BlacklistTable.jsx | 8 +- .../admin-ui/src/pages/Cashout/Cashout.jsx | 2 +- .../admin-ui/src/pages/Cashout/Wizard.jsx | 24 +- .../admin-ui/src/pages/Cashout/WizardStep.jsx | 16 +- packages/admin-ui/src/pages/Cashout/helper.js | 30 +- .../src/pages/Commissions/Commissions.jsx | 16 +- .../components/CommissionsDetails.jsx | 8 +- .../components/CommissionsList.jsx | 39 +- .../admin-ui/src/pages/Commissions/helper.jsx | 127 +-- .../src/pages/Customers/CustomerData.jsx | 129 +-- .../src/pages/Customers/CustomerNotes.jsx | 6 +- .../src/pages/Customers/CustomerPhotos.jsx | 2 +- .../src/pages/Customers/CustomerProfile.jsx | 94 +- .../src/pages/Customers/Customers.jsx | 24 +- .../src/pages/Customers/CustomersList.jsx | 25 +- .../admin-ui/src/pages/Customers/Wizard.jsx | 10 +- .../components/CreateCustomerModal.jsx | 15 +- .../Customers/components/CustomerDetails.jsx | 10 +- .../Customers/components/CustomerSidebar.jsx | 14 +- .../Customers/components/EditableCard.jsx | 5 +- .../pages/Customers/components/PhotosCard.jsx | 2 +- .../Customers/components/PhotosCarousel.jsx | 2 +- .../Customers/components/TransactionsList.jsx | 36 +- .../src/pages/Customers/components/Upload.jsx | 4 +- .../src/pages/Customers/components/index.js | 2 +- .../components/notes/NewNoteModal.jsx | 4 +- .../Customers/components/notes/NoteEdit.jsx | 10 +- .../admin-ui/src/pages/Customers/helper.jsx | 117 +-- .../src/pages/Dashboard/Alerts/Alerts.jsx | 2 +- .../pages/Dashboard/Alerts/AlertsTable.jsx | 4 +- .../src/pages/Dashboard/Alerts/index.js | 1 + .../src/pages/Dashboard/Footer/Footer.jsx | 14 +- .../pages/Dashboard/Footer/Footer.module.css | 6 +- .../src/pages/Dashboard/Footer/index.js | 1 + .../src/pages/Dashboard/RightSide.jsx | 4 +- .../Graphs/PercentageChart.jsx | 2 +- .../SystemPerformance/Graphs/RefLineChart.jsx | 18 +- .../Graphs/RefScatterplot.jsx | 60 +- .../SystemPerformance/InfoWithLabel.jsx | 1 + .../pages/Dashboard/SystemPerformance/Nav.jsx | 2 +- .../SystemPerformance/SystemPerformance.jsx | 24 +- .../Dashboard/SystemPerformance/index.js | 1 + .../Dashboard/SystemStatus/MachinesTable.jsx | 18 +- .../SystemStatus/MachinesTable.styles.js | 38 +- .../Dashboard/SystemStatus/SystemStatus.jsx | 2 +- .../src/pages/Dashboard/SystemStatus/index.js | 1 + .../admin-ui/src/pages/Dashboard/index.js | 1 + .../admin-ui/src/pages/Funding/Funding.jsx | 26 +- .../src/pages/Funding/Funding.module.css | 2 +- .../admin-ui/src/pages/Locales/Locales.jsx | 6 +- packages/admin-ui/src/pages/Locales/helper.js | 44 +- .../admin-ui/src/pages/Logs/Logs.module.css | 2 +- .../admin-ui/src/pages/Logs/MachineLogs.jsx | 6 +- .../admin-ui/src/pages/Logs/ServerLogs.jsx | 16 +- .../src/pages/Logs/ServerLogs.module.css | 2 +- .../LoyaltyPanel/IndividualDiscountModal.jsx | 12 +- .../LoyaltyPanel/IndividualDiscounts.jsx | 16 +- .../src/pages/LoyaltyPanel/PromoCodes.jsx | 16 +- .../pages/LoyaltyPanel/PromoCodesModal.jsx | 4 +- .../MachineComponents/Cassettes/Cassettes.jsx | 10 +- .../MachineComponents/Cassettes/index.js | 1 + .../Commissions/Commissions.jsx | 18 +- .../MachineComponents/Commissions/helper.jsx | 16 +- .../Machines/MachineComponents/Overview.jsx | 2 +- .../Transactions/Transactions.jsx | 22 +- .../MachineComponents/Transactions/index.js | 1 + .../admin-ui/src/pages/Machines/Machines.jsx | 6 +- .../src/pages/Maintenance/CashUnitDetails.jsx | 2 +- .../src/pages/Maintenance/CashUnits.jsx | 28 +- .../src/pages/Maintenance/CashUnitsFooter.jsx | 26 +- .../src/pages/Maintenance/CashboxHistory.jsx | 28 +- .../src/pages/Maintenance/MachineStatus.jsx | 16 +- .../src/pages/Maintenance/Wizard/Wizard.jsx | 48 +- .../pages/Maintenance/Wizard/WizardStep.jsx | 27 +- .../admin-ui/src/pages/Maintenance/helper.jsx | 14 +- .../src/pages/Notifications/Notifications.jsx | 16 +- .../components/EditableNumber.jsx | 4 +- .../components/SingleFieldEditableNumber.jsx | 4 +- .../sections/CryptoBalanceOverrides.jsx | 34 +- .../sections/FiatBalanceAlerts.jsx | 18 +- .../sections/FiatBalanceOverrides.jsx | 38 +- .../pages/Notifications/sections/Setup.jsx | 16 +- .../sections/ThirdPartyProvider.jsx | 18 +- .../src/pages/OperatorInfo/CoinATMRadar.jsx | 10 +- .../src/pages/OperatorInfo/ContactInfo.jsx | 22 +- .../src/pages/OperatorInfo/MachineScreens.jsx | 12 +- .../pages/OperatorInfo/ReceiptPrinting.jsx | 28 +- .../OperatorInfo/SMSNotices/SMSNotices.jsx | 22 +- .../SMSNotices/SMSNoticesModal.jsx | 38 +- .../pages/OperatorInfo/TermsConditions.jsx | 22 +- .../src/pages/Services/FormRenderer.jsx | 11 +- .../admin-ui/src/pages/Services/Services.jsx | 14 +- .../src/pages/Services/schemas/binance.js | 18 +- .../src/pages/Services/schemas/binanceus.js | 18 +- .../src/pages/Services/schemas/bitfinex.js | 18 +- .../src/pages/Services/schemas/bitgo.js | 60 +- .../src/pages/Services/schemas/bitstamp.js | 20 +- .../src/pages/Services/schemas/blockcypher.js | 14 +- .../src/pages/Services/schemas/cex.js | 20 +- .../src/pages/Services/schemas/elliptic.js | 18 +- .../src/pages/Services/schemas/galoy.js | 22 +- .../src/pages/Services/schemas/helper.js | 8 +- .../src/pages/Services/schemas/index.js | 2 +- .../src/pages/Services/schemas/inforu.js | 14 +- .../src/pages/Services/schemas/infura.js | 8 +- .../src/pages/Services/schemas/itbit.js | 22 +- .../src/pages/Services/schemas/kraken.js | 18 +- .../src/pages/Services/schemas/mailgun.js | 14 +- .../src/pages/Services/schemas/scorechain.js | 16 +- .../src/pages/Services/schemas/singlebitgo.js | 22 +- .../src/pages/Services/schemas/sumsub.js | 12 +- .../src/pages/Services/schemas/telnyx.js | 12 +- .../src/pages/Services/schemas/trongrid.js | 10 +- .../src/pages/Services/schemas/twilio.js | 14 +- .../src/pages/Services/schemas/vonage.js | 14 +- .../SessionManagement/SessionManagement.jsx | 16 +- .../src/pages/Transactions/DetailsCard.jsx | 28 +- .../src/pages/Transactions/Transactions.jsx | 32 +- .../CustomInfoRequests/CustomInfoRequests.jsx | 44 +- .../CustomInfoRequests/Forms/ChooseType.jsx | 14 +- .../Forms/NameOfRequirement.jsx | 10 +- .../Forms/Screen1Information.jsx | 4 +- .../Forms/Screen2Information.jsx | 4 +- .../Forms/TypeFields/ChoiceList.jsx | 4 +- .../Forms/TypeFields/NumericalEntry.jsx | 4 +- .../Forms/TypeFields/TextEntry.jsx | 6 +- .../Forms/TypeFields/index.jsx | 16 +- .../Triggers/CustomInfoRequests/Wizard.jsx | 37 +- .../Triggers/CustomInfoRequests/index.js | 1 + .../src/pages/Triggers/TriggerView.jsx | 10 +- .../admin-ui/src/pages/Triggers/Triggers.jsx | 18 +- .../admin-ui/src/pages/Triggers/Wizard.jsx | 18 +- .../Triggers/components/AdvancedTriggers.jsx | 12 +- .../src/pages/Triggers/components/helper.js | 60 +- .../admin-ui/src/pages/Triggers/helper.jsx | 136 +-- .../pages/UserManagement/UserManagement.jsx | 40 +- .../UserManagement/modals/ChangeRoleModal.jsx | 8 +- .../UserManagement/modals/CreateUserModal.jsx | 20 +- .../UserManagement/modals/EnableUserModal.jsx | 14 +- .../pages/UserManagement/modals/FIDOModal.jsx | 2 +- .../UserManagement/modals/Input2FAModal.jsx | 2 +- .../UserManagement/modals/Reset2FAModal.jsx | 12 +- .../modals/ResetPasswordModal.jsx | 14 +- .../src/pages/Wallet/AdvancedWallet.jsx | 18 +- packages/admin-ui/src/pages/Wallet/Wallet.jsx | 16 +- packages/admin-ui/src/pages/Wallet/Wizard.jsx | 16 +- .../admin-ui/src/pages/Wallet/WizardStep.jsx | 20 +- packages/admin-ui/src/pages/Wallet/helper.jsx | 84 +- packages/admin-ui/src/pages/Wizard/Wizard.jsx | 4 +- .../pages/Wizard/components/Commissions.jsx | 4 +- .../src/pages/Wizard/components/Locales.jsx | 8 +- .../src/pages/Wizard/components/Mailgun.jsx | 12 +- .../pages/Wizard/components/Notifications.jsx | 2 +- .../pages/Wizard/components/OperatorInfo.jsx | 1 + .../src/pages/Wizard/components/Twilio.jsx | 10 +- .../pages/Wizard/components/Twilio.module.css | 2 +- .../pages/Wizard/components/Wallet/AllSet.jsx | 13 +- .../Wizard/components/Wallet/Blockcypher.jsx | 10 +- .../Wizard/components/Wallet/ChooseCoin.jsx | 4 +- .../components/Wallet/ChooseExchange.jsx | 10 +- .../Wizard/components/Wallet/ChooseTicker.jsx | 2 +- .../Wizard/components/Wallet/ChooseWallet.jsx | 10 +- .../components/Wallet/Shared.module.css | 2 +- .../pages/Wizard/components/Wallet/Wallet.jsx | 14 +- packages/admin-ui/src/pages/Wizard/helper.jsx | 16 +- .../admin-ui/src/routing/lamassu.routes.jsx | 84 +- packages/admin-ui/src/routing/routes.jsx | 18 +- packages/admin-ui/src/routing/utils.js | 2 +- .../admin-ui/src/styling/global/fonts.css | 20 +- .../admin-ui/src/styling/global/global.css | 17 +- packages/admin-ui/src/styling/helpers.js | 4 +- .../src/styling/icons/ID/card/comet.svg | 12 +- .../src/styling/icons/ID/card/tomato.svg | 12 +- .../src/styling/icons/ID/card/white.svg | 12 +- .../src/styling/icons/ID/card/zodiac.svg | 6 +- .../src/styling/icons/ID/phone/comet.svg | 9 +- .../src/styling/icons/ID/phone/tomato.svg | 9 +- .../src/styling/icons/ID/phone/white.svg | 9 +- .../src/styling/icons/ID/phone/zodiac.svg | 9 +- .../src/styling/icons/ID/photo/comet.svg | 9 +- .../styling/icons/ID/photo/crossed-camera.svg | 9 +- .../src/styling/icons/ID/photo/tomato.svg | 9 +- .../src/styling/icons/ID/photo/white.svg | 9 +- .../src/styling/icons/ID/photo/zodiac.svg | 9 +- .../src/styling/icons/action/arrow/comet.svg | 6 +- .../styling/icons/action/arrow/regular.svg | 6 +- .../src/styling/icons/action/arrow/white.svg | 6 +- .../src/styling/icons/action/arrow/zodiac.svg | 27 +- .../src/styling/icons/action/close/comet.svg | 6 +- .../src/styling/icons/action/close/white.svg | 6 +- .../src/styling/icons/action/close/zodiac.svg | 9 +- .../src/styling/icons/action/copy/comet.svg | 12 +- .../src/styling/icons/action/copy/copy.svg | 9 +- .../src/styling/icons/action/copy/white.svg | 12 +- .../src/styling/icons/action/copy/zodiac.svg | 6 +- .../styling/icons/action/delete/disabled.svg | 52 +- .../styling/icons/action/delete/enabled.svg | 12 +- .../src/styling/icons/action/delete/white.svg | 9 +- .../src/styling/icons/action/edit/comet.svg | 9 +- .../styling/icons/action/edit/disabled.svg | 9 +- .../src/styling/icons/action/edit/enabled.svg | 9 +- .../src/styling/icons/action/edit/white.svg | 9 +- .../styling/icons/action/expand/closed.svg | 3 +- .../src/styling/icons/action/expand/open.svg | 6 +- .../icons/action/external link/white.svg | 9 +- .../icons/action/external link/zodiac.svg | 6 +- .../src/styling/icons/action/help/white.svg | 12 +- .../src/styling/icons/action/help/zodiac.svg | 12 +- .../styling/icons/action/wrench/zodiac.svg | 9 +- .../icons/arrow/carousel-left-arrow.svg | 6 +- .../icons/arrow/carousel-right-arrow.svg | 3 +- .../src/styling/icons/arrow/download_logs.svg | 12 +- .../src/styling/icons/arrow/month_change.svg | 12 +- .../icons/arrow/month_change_right.svg | 12 +- .../src/styling/icons/arrow/transaction.svg | 12 +- .../styling/icons/button/add note/white.svg | 9 +- .../styling/icons/button/add note/zodiac.svg | 9 +- .../styling/icons/button/add-note/white.svg | 19 +- .../styling/icons/button/add-note/zodiac.svg | 12 +- .../src/styling/icons/button/add/white.svg | 9 +- .../src/styling/icons/button/add/zodiac.svg | 9 +- .../styling/icons/button/authorize/white.svg | 3 +- .../styling/icons/button/authorize/zodiac.svg | 3 +- .../styling/icons/button/blacklist/white.svg | 9 +- .../styling/icons/button/blacklist/zodiac.svg | 9 +- .../src/styling/icons/button/block/white.svg | 3 +- .../src/styling/icons/button/block/zodiac.svg | 3 +- .../src/styling/icons/button/cancel/white.svg | 6 +- .../styling/icons/button/cancel/zodiac.svg | 6 +- .../styling/icons/button/configure/white.svg | 12 +- .../styling/icons/button/configure/zodiac.svg | 12 +- .../src/styling/icons/button/data/white.svg | 12 +- .../src/styling/icons/button/data/zodiac.svg | 12 +- .../styling/icons/button/discount/comet.svg | 9 +- .../styling/icons/button/discount/white.svg | 9 +- .../styling/icons/button/discount/zodiac.svg | 9 +- .../styling/icons/button/download/white.svg | 9 +- .../styling/icons/button/download/zodiac.svg | 9 +- .../src/styling/icons/button/edit/white.svg | 12 +- .../src/styling/icons/button/edit/zodiac.svg | 12 +- .../icons/button/export to PDF/white.svg | 12 +- .../icons/button/export to PDF/zodiac.svg | 12 +- .../styling/icons/button/export-pdf/white.svg | 21 +- .../src/styling/icons/button/filter/white.svg | 6 +- .../styling/icons/button/filter/zodiac.svg | 6 +- .../src/styling/icons/button/ignore/white.svg | 3 +- .../styling/icons/button/ignore/zodiac.svg | 3 +- .../src/styling/icons/button/key/white.svg | 9 +- .../src/styling/icons/button/key/zodiac.svg | 9 +- .../src/styling/icons/button/link/export.svg | 12 +- .../src/styling/icons/button/link/white.svg | 6 +- .../src/styling/icons/button/link/zodiac.svg | 6 +- .../src/styling/icons/button/lock/white.svg | 9 +- .../src/styling/icons/button/lock/zodiac.svg | 9 +- .../icons/button/photo/white-resized.svg | 24 +- .../icons/button/photo/zodiac-resized.svg | 16 +- .../src/styling/icons/button/reboot/white.svg | 21 +- .../styling/icons/button/reboot/zodiac.svg | 21 +- .../styling/icons/button/replace/white.svg | 18 +- .../styling/icons/button/replace/zodiac.svg | 21 +- .../src/styling/icons/button/retry/white.svg | 9 +- .../src/styling/icons/button/retry/zodiac.svg | 9 +- .../styling/icons/button/schedule/white.svg | 6 +- .../styling/icons/button/schedule/zodiac.svg | 6 +- .../styling/icons/button/shut down/white.svg | 9 +- .../styling/icons/button/shut down/zodiac.svg | 9 +- .../icons/button/stop-ignoring/white.svg | 10 +- .../icons/button/stop-ignoring/zodiac.svg | 10 +- .../src/styling/icons/button/unpair/white.svg | 6 +- .../styling/icons/button/unpair/zodiac.svg | 6 +- .../button/upload-file/white-resized.svg | 15 +- .../icons/button/upload-file/white.svg | 9 +- .../button/upload-file/zodiac-resized.svg | 12 +- .../icons/button/upload-file/zodiac.svg | 9 +- .../src/styling/icons/button/upload/white.svg | 12 +- .../styling/icons/button/upload/zodiac.svg | 12 +- .../styling/icons/button/user-role/white.svg | 9 +- .../styling/icons/button/user-role/zodiac.svg | 9 +- .../styling/icons/button/whitelist/white.svg | 12 +- .../styling/icons/button/whitelist/zodiac.svg | 12 +- .../icons/cassettes/acceptor-left-filled.svg | 64 +- .../styling/icons/cassettes/acceptor-left.svg | 21 +- .../styling/icons/cassettes/both-filled.svg | 90 +- .../styling/icons/cassettes/cashbox-empty.svg | 9 +- .../icons/cassettes/cashout-cassette-1.svg | 26 +- .../icons/cassettes/cashout-cassette-2.svg | 26 +- .../styling/icons/cassettes/dispenser-1.svg | 30 +- .../styling/icons/cassettes/dispenser-2.svg | 30 +- .../3-cassettes/3-cassettes-open-1-left.svg | 147 +-- .../tejo/3-cassettes/3-cassettes-open-1.svg | 147 +-- .../3-cassettes/3-cassettes-open-2-left.svg | 155 +-- .../tejo/3-cassettes/3-cassettes-open-2.svg | 158 ++-- .../3-cassettes/3-cassettes-open-3-left.svg | 159 ++-- .../tejo/3-cassettes/3-cassettes-open-3.svg | 159 ++-- .../4-cassettes/4-cassettes-open-1-left.svg | 168 ++-- .../tejo/4-cassettes/4-cassettes-open-1.svg | 168 ++-- .../4-cassettes/4-cassettes-open-2-left.svg | 172 ++-- .../tejo/4-cassettes/4-cassettes-open-2.svg | 175 ++-- .../4-cassettes/4-cassettes-open-3-left.svg | 172 ++-- .../tejo/4-cassettes/4-cassettes-open-3.svg | 176 ++-- .../4-cassettes/4-cassettes-open-4-left.svg | 181 ++-- .../tejo/4-cassettes/4-cassettes-open-4.svg | 185 ++-- .../customer-list-view/white.svg | 6 +- .../customer-list-view/zodiac.svg | 6 +- .../circle buttons/exception-view/white.svg | 6 +- .../circle buttons/exception-view/zodiac.svg | 6 +- .../icons/circle buttons/filter/white.svg | 21 +- .../icons/circle buttons/filter/zodiac.svg | 21 +- .../icons/circle buttons/history/white.svg | 9 +- .../icons/circle buttons/history/zodiac.svg | 9 +- .../icons/circle buttons/law/white.svg | 6 +- .../icons/circle buttons/law/zodiac.svg | 6 +- .../circle buttons/listing-view/white.svg | 6 +- .../circle buttons/listing-view/zodiac.svg | 6 +- .../icons/circle buttons/overview/comet.svg | 3 +- .../icons/circle buttons/overview/white.svg | 3 +- .../icons/circle buttons/overview/zodiac.svg | 3 +- .../icons/circle buttons/save/white.svg | 9 +- .../icons/circle buttons/save/zodiac.svg | 10 +- .../icons/circle buttons/search/white.svg | 9 +- .../icons/circle buttons/search/zodiac.svg | 9 +- .../icons/circle buttons/settings/white.svg | 9 +- .../icons/circle buttons/settings/zodiac.svg | 9 +- .../icons/circle buttons/share/white.svg | 6 +- .../icons/circle buttons/share/zodiac.svg | 6 +- .../icons/circle buttons/upload/white.svg | 13 +- .../icons/circle buttons/upload/zodiac.svg | 13 +- .../icons/circle buttons/wizard/white.svg | 9 +- .../icons/circle buttons/wizard/zodiac.svg | 9 +- .../icons/compliance/custom-requirement.svg | 890 +++++++++++++++++- .../src/styling/icons/compliance/keyboard.svg | 3 +- .../src/styling/icons/compliance/keypad.svg | 3 +- .../src/styling/icons/compliance/list.svg | 3 +- .../styling/icons/customer-nav/data/comet.svg | 9 +- .../styling/icons/customer-nav/data/white.svg | 9 +- .../icons/customer-nav/data/zodiac.svg | 9 +- .../styling/icons/customer-nav/note/comet.svg | 9 +- .../styling/icons/customer-nav/note/white.svg | 9 +- .../icons/customer-nav/note/zodiac.svg | 9 +- .../icons/customer-nav/overview/comet.svg | 3 +- .../icons/customer-nav/overview/white.svg | 3 +- .../icons/customer-nav/overview/zodiac.svg | 3 +- .../icons/customer-nav/photos/comet.svg | 9 +- .../icons/customer-nav/photos/white.svg | 9 +- .../src/styling/icons/dashboard/down.svg | 10 +- .../src/styling/icons/dashboard/equal.svg | 3 +- .../src/styling/icons/dashboard/up.svg | 10 +- .../src/styling/icons/direction/cash-in.svg | 6 +- .../src/styling/icons/direction/cash-out.svg | 7 +- .../admin-ui/src/styling/icons/file/comet.svg | 6 +- .../src/styling/icons/file/spring.svg | 6 +- .../src/styling/icons/file/tomato.svg | 6 +- .../src/styling/icons/menu/logo-white.svg | 6 +- .../admin-ui/src/styling/icons/menu/logo.svg | 6 +- .../icons/menu/notification-zodiac.svg | 9 +- .../src/styling/icons/menu/notification.svg | 9 +- .../src/styling/icons/menu/search-zodiac.svg | 9 +- .../src/styling/icons/menu/search.svg | 9 +- .../src/styling/icons/month arrows/left.svg | 12 +- .../src/styling/icons/month arrows/right.svg | 12 +- .../icons/month arrows/right_white.svg | 12 +- .../styling/icons/stage/spring/complete.svg | 10 +- .../styling/icons/stage/spring/current.svg | 7 +- .../src/styling/icons/stage/spring/empty.svg | 7 +- .../styling/icons/stage/zodiac/complete.svg | 10 +- .../styling/icons/stage/zodiac/current.svg | 7 +- .../src/styling/icons/stage/zodiac/empty.svg | 7 +- .../src/styling/icons/stage/zodiac/full.svg | 7 +- .../src/styling/icons/status/pumpkin.svg | 3 +- .../src/styling/icons/status/spring2.svg | 3 +- .../src/styling/icons/status/tomato.svg | 3 +- .../admin-ui/src/styling/icons/stripes.svg | 53 +- .../src/styling/icons/table/empty-table.svg | 30 +- .../src/styling/icons/table/false.svg | 10 +- .../admin-ui/src/styling/icons/table/true.svg | 6 +- .../src/styling/icons/warning-icon/comet.svg | 6 +- .../src/styling/icons/warning-icon/tomato.svg | 6 +- .../src/styling/logos/icon-bitcoin-colour.svg | 10 +- .../styling/logos/icon-bitcoincash-colour.svg | 6 +- .../src/styling/logos/icon-dash-colour.svg | 8 +- .../styling/logos/icon-ethereum-colour.svg | 21 +- .../styling/logos/icon-litecoin-colour.svg | 5 +- .../src/styling/logos/icon-monero-colour.svg | 7 +- .../src/styling/logos/icon-tether-colour.svg | 7 +- .../src/styling/logos/icon-tron-colour.svg | 6 +- .../src/styling/logos/icon-usdc-colour.svg | 9 +- .../src/styling/logos/icon-zcash-colour.svg | 13 +- packages/admin-ui/src/styling/theme.js | 186 ++-- packages/admin-ui/src/styling/variables.js | 2 +- packages/admin-ui/src/utils/apollo.jsx | 31 +- .../admin-ui/src/utils/bill-denominations.js | 146 +-- packages/admin-ui/src/utils/bill-options.js | 2 +- packages/admin-ui/src/utils/config.js | 12 +- packages/admin-ui/src/utils/constants.js | 2 +- packages/admin-ui/src/utils/customer.js | 4 +- packages/admin-ui/src/utils/machine.js | 20 +- packages/admin-ui/src/utils/number.js | 2 +- packages/admin-ui/src/utils/string.js | 6 +- packages/admin-ui/src/utils/timezone-list.js | 28 +- packages/admin-ui/src/utils/timezones.js | 2 +- packages/admin-ui/src/utils/urlResolver.js | 9 - 509 files changed, 6030 insertions(+), 4266 deletions(-) delete mode 100644 packages/admin-ui/src/utils/urlResolver.js diff --git a/.prettierrc b/.prettierrc index fe83baaf..bf93fdb8 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,5 +1,5 @@ { - "trailingComma": "none", + "trailingComma": "all", "tabWidth": 2, "semi": false, "singleQuote": true, diff --git a/eslint.config.mjs b/eslint.config.mjs index 15315c76..2447af6b 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -2,7 +2,6 @@ import js from '@eslint/js' import globals from 'globals' import pluginReact from 'eslint-plugin-react' import json from '@eslint/json' -import css from '@eslint/css' import { defineConfig, globalIgnores } from 'eslint/config' import reactCompiler from 'eslint-plugin-react-compiler' import eslintConfigPrettier from 'eslint-config-prettier/flat' @@ -16,7 +15,13 @@ export default defineConfig([ }, { files: ['packages/admin-ui/**/*.{js,mjs,jsx}'], - languageOptions: { sourceType: 'module', globals: globals.browser } + languageOptions: { + sourceType: 'module', + globals: { + ...globals.browser, + process: 'readonly' + } + } }, { files: ['packages/server/**/*.{js,cjs}'], @@ -35,15 +40,8 @@ export default defineConfig([ language: 'json/json', extends: ['json/recommended'] }, - { - files: ['**/*.css'], - plugins: { css }, - language: 'css/css', - extends: ['css/recommended'] - }, { rules: { - // 'no-unused-vars': 'on', 'react/prop-types': 'off', 'react/display-name': 'off', 'react/no-unescaped-entities': 'off', diff --git a/packages/admin-ui/src/Main.jsx b/packages/admin-ui/src/Main.jsx index ac31806f..376a2828 100644 --- a/packages/admin-ui/src/Main.jsx +++ b/packages/admin-ui/src/Main.jsx @@ -34,7 +34,7 @@ const Main = () => { onCompleted: userResponse => { if (!userData && userResponse?.userData) setUserData(userResponse.userData) - } + }, }) const route = location.pathname diff --git a/packages/admin-ui/src/components/Carousel.module.css b/packages/admin-ui/src/components/Carousel.module.css index 92a4c3b0..3239bde3 100644 --- a/packages/admin-ui/src/components/Carousel.module.css +++ b/packages/admin-ui/src/components/Carousel.module.css @@ -42,4 +42,4 @@ .navButton:hover { background-color: rgba(0, 0, 0, 0.04); -} \ No newline at end of file +} diff --git a/packages/admin-ui/src/components/CollapsibleCard.jsx b/packages/admin-ui/src/components/CollapsibleCard.jsx index 987c32e7..5cc60879 100644 --- a/packages/admin-ui/src/components/CollapsibleCard.jsx +++ b/packages/admin-ui/src/components/CollapsibleCard.jsx @@ -7,7 +7,7 @@ import classnames from 'classnames' const cardState = Object.freeze({ DEFAULT: 'default', SHRUNK: 'shrunk', - EXPANDED: 'expanded' + EXPANDED: 'expanded', }) const CollapsibleCard = ({ className, state, shrunkComponent, children }) => { @@ -19,7 +19,7 @@ const CollapsibleCard = ({ className, state, shrunkComponent, children }) => { } CollapsibleCard.propTypes = { - shrunkComponent: PropTypes.node.isRequired + shrunkComponent: PropTypes.node.isRequired, } export default CollapsibleCard diff --git a/packages/admin-ui/src/components/ConfirmDialog.jsx b/packages/admin-ui/src/components/ConfirmDialog.jsx index 607e8477..2fc880ca 100644 --- a/packages/admin-ui/src/components/ConfirmDialog.jsx +++ b/packages/admin-ui/src/components/ConfirmDialog.jsx @@ -101,5 +101,5 @@ export const ConfirmDialog = memo( ) - } + }, ) diff --git a/packages/admin-ui/src/components/CopyToClipboard.jsx b/packages/admin-ui/src/components/CopyToClipboard.jsx index eac6f815..c4035538 100644 --- a/packages/admin-ui/src/components/CopyToClipboard.jsx +++ b/packages/admin-ui/src/components/CopyToClipboard.jsx @@ -14,7 +14,7 @@ const CopyToClipboard = ({ buttonClassname, children, wrapperClassname, - removeSpace = true + removeSpace = true, }) => { const [anchorEl, setAnchorEl] = useState(null) @@ -68,7 +68,7 @@ const CopyToClipboard = ({ )} - ); + ) } export default CopyToClipboard diff --git a/packages/admin-ui/src/components/DeleteDialog.jsx b/packages/admin-ui/src/components/DeleteDialog.jsx index 1907b286..0d97f918 100644 --- a/packages/admin-ui/src/components/DeleteDialog.jsx +++ b/packages/admin-ui/src/components/DeleteDialog.jsx @@ -34,7 +34,7 @@ export const DeleteDialog = ({ item = 'item', confirmationMessage = `Are you sure you want to delete this ${item}?`, extraMessage, - errorMessage = '' + errorMessage = '', }) => { return ( diff --git a/packages/admin-ui/src/components/ImagePopper.jsx b/packages/admin-ui/src/components/ImagePopper.jsx index d732e957..93291e3b 100644 --- a/packages/admin-ui/src/components/ImagePopper.jsx +++ b/packages/admin-ui/src/components/ImagePopper.jsx @@ -50,7 +50,7 @@ const ImagePopper = memo( ) - } + }, ) export default ImagePopper diff --git a/packages/admin-ui/src/components/InformativeDialog.jsx b/packages/admin-ui/src/components/InformativeDialog.jsx index ed39fe4c..2311e9e0 100644 --- a/packages/admin-ui/src/components/InformativeDialog.jsx +++ b/packages/admin-ui/src/components/InformativeDialog.jsx @@ -7,7 +7,7 @@ import { H1 } from 'src/components/typography' import CloseIcon from 'src/styling/icons/action/close/zodiac.svg?react' export const InformativeDialog = memo( - ({ title = '', open, onDissmised, disabled = false, data, ...props }) => { + ({ title = '', open, onDissmised, data, ...props }) => { const innerOnClose = () => { onDissmised() } @@ -16,8 +16,8 @@ export const InformativeDialog = memo( {data} ) - } + }, ) diff --git a/packages/admin-ui/src/components/LogsDownloaderPopper.jsx b/packages/admin-ui/src/components/LogsDownloaderPopper.jsx index 67ec9087..98f4d947 100644 --- a/packages/admin-ui/src/components/LogsDownloaderPopper.jsx +++ b/packages/admin-ui/src/components/LogsDownloaderPopper.jsx @@ -15,7 +15,6 @@ import { formatDate } from 'src/utils/timezones' import Popper from './Popper' import DateRangePicker from './date-range-picker/DateRangePicker' import { RadioGroup } from './inputs' -import typographyStyles from './typography/styles' import { H4, Info1, Label1, Label2 } from './typography/index.jsx' const DateContainer = ({ date, children }) => { @@ -31,7 +30,7 @@ const DateContainer = ({ date, children }) => {
{`${format( 'MMM', - date + date, )} ${format('yyyy', date)}`} {format('EEEE', date)} @@ -57,7 +56,7 @@ const LogsDownloaderPopover = ({ getLogs, timezone, simplified, - className + className, }) => { const [selectedRadio, setSelectedRadio] = useState(ALL) const [selectedAdvancedRadio, setSelectedAdvancedRadio] = useState(ADVANCED) @@ -65,12 +64,12 @@ const LogsDownloaderPopover = ({ const [range, setRange] = useState({ from: null, until: null }) const [anchorEl, setAnchorEl] = useState(null) const [fetchLogs] = useLazyQuery(query, { - onCompleted: data => createLogsFile(getLogs(data), range) + onCompleted: data => createLogsFile(getLogs(data), range), }) const dateRangePickerClasses = { 'block h-full': selectedRadio === RANGE, - hidden: selectedRadio === ALL + hidden: selectedRadio === ALL, } const handleRadioButtons = evt => { @@ -88,7 +87,7 @@ const LogsDownloaderPopover = ({ (from, until) => { setRange({ from, until }) }, - [setRange] + [setRange], ) const downloadLogs = (range, args) => { @@ -97,8 +96,8 @@ const LogsDownloaderPopover = ({ variables: { ...args, simplified: selectedAdvancedRadio === SIMPLIFIED, - excludeTestingCustomers: true - } + excludeTestingCustomers: true, + }, }) } @@ -112,8 +111,8 @@ const LogsDownloaderPopover = ({ from: range.from, until: range.until, simplified: selectedAdvancedRadio === SIMPLIFIED, - excludeTestingCustomers: true - } + excludeTestingCustomers: true, + }, }) } } @@ -124,7 +123,7 @@ const LogsDownloaderPopover = ({ } const blob = new window.Blob([logs], { - type: 'text/plain;charset=utf-8' + type: 'text/plain;charset=utf-8', }) FileSaver.saveAs( @@ -132,8 +131,8 @@ const LogsDownloaderPopover = ({ selectedRadio === ALL ? `${formatDateFile(new Date())}_${name}.csv` : `${formatDateFile(range.from)}_${formatDateFile( - range.until - )}_${name}.csv` + range.until, + )}_${name}.csv`, ) } @@ -147,12 +146,12 @@ const LogsDownloaderPopover = ({ const radioButtonOptions = [ { display: 'All logs', code: ALL }, - { display: 'Date range', code: RANGE } + { display: 'Date range', code: RANGE }, ] const advancedRadioButtonOptions = [ { display: 'Advanced logs', code: ADVANCED }, - { display: 'Simplified logs', code: SIMPLIFIED } + { display: 'Simplified logs', code: SIMPLIFIED }, ] const open = Boolean(anchorEl) @@ -201,9 +200,9 @@ const LogsDownloaderPopover = ({ hours: 23, minutes: 59, seconds: 59, - milliseconds: 999 + milliseconds: 999, }, - new Date() + new Date(), )} onRangeChange={handleRangeChange} /> diff --git a/packages/admin-ui/src/components/Modal.jsx b/packages/admin-ui/src/components/Modal.jsx index 67aa2b9f..e208b320 100644 --- a/packages/admin-ui/src/components/Modal.jsx +++ b/packages/admin-ui/src/components/Modal.jsx @@ -17,14 +17,12 @@ const Modal = ({ infoPanel, handleClose, children, - secondaryModal, className, closeOnEscape, closeOnBackdropClick, ...props }) => { const TitleCase = small ? H4 : H1 - const closeSize = xl ? 28 : small ? 16 : 20 const innerClose = (evt, reason) => { if (!closeOnBackdropClick && reason === 'backdropClick') return @@ -44,7 +42,7 @@ const Modal = ({ style={{ width, height, minHeight: height ?? 400 }} className={classnames( 'flex flex-col max-h-[90vh] rounded-lg outline-0', - className + className, )}>
{title && ( @@ -78,11 +76,11 @@ const Modal = ({ style={{ width, height: infoPanelHeight, - minHeight: infoPanelHeight ?? 200 + minHeight: infoPanelHeight ?? 200, }} className={classnames( 'mt-4 flex flex-col max-h-[90vh] overflow-y-auto rounded-lg outline-0', - className + className, )}>
{infoPanel} diff --git a/packages/admin-ui/src/components/NotificationCenter/NotificationCenter.jsx b/packages/admin-ui/src/components/NotificationCenter/NotificationCenter.jsx index 6e971d55..1bbc1a39 100644 --- a/packages/admin-ui/src/components/NotificationCenter/NotificationCenter.jsx +++ b/packages/admin-ui/src/components/NotificationCenter/NotificationCenter.jsx @@ -52,28 +52,28 @@ const NotificationCenter = ({ hasUnreadProp, buttonCoords, popperRef, - refetchHasUnreadHeader + refetchHasUnreadHeader, }) => { const { data, loading } = useQuery(GET_NOTIFICATIONS, { - pollInterval: 60000 + pollInterval: 60000, }) const [xOffset, setXoffset] = useState(300) const [showingUnread, setShowingUnread] = useState(false) const machines = R.compose( R.map(R.prop('name')), - R.indexBy(R.prop('deviceId')) + R.indexBy(R.prop('deviceId')), )(R.path(['machines'])(data) ?? []) const notifications = R.path(['notifications'])(data) ?? [] const [hasUnread, setHasUnread] = useState(hasUnreadProp) const [toggleClearNotification] = useMutation(TOGGLE_CLEAR_NOTIFICATION, { onError: () => console.error('Error while clearing notification'), - refetchQueries: () => ['getNotifications'] + refetchQueries: () => ['getNotifications'], }) const [clearAllNotifications] = useMutation(CLEAR_ALL_NOTIFICATIONS, { onError: () => console.error('Error while clearing all notifications'), - refetchQueries: () => ['getNotifications'] + refetchQueries: () => ['getNotifications'], }) useEffect(() => { @@ -103,7 +103,7 @@ const NotificationCenter = ({ valid={n.valid} toggleClear={() => toggleClearNotification({ - variables: { id: n.id, read: !n.read } + variables: { id: n.id, read: !n.read }, }) } /> @@ -121,7 +121,7 @@ const NotificationCenter = ({ className={classes.notificationIcon} style={{ top: buttonCoords?.y ?? 0, - left: buttonCoords?.x ? buttonCoords.x - xOffset : 0 + left: buttonCoords?.x ? buttonCoords.x - xOffset : 0, }}> {hasUnread &&
} diff --git a/packages/admin-ui/src/components/NotificationCenter/NotificationCenter.module.css b/packages/admin-ui/src/components/NotificationCenter/NotificationCenter.module.css index dd30252b..b10a914d 100644 --- a/packages/admin-ui/src/components/NotificationCenter/NotificationCenter.module.css +++ b/packages/admin-ui/src/components/NotificationCenter/NotificationCenter.module.css @@ -6,8 +6,10 @@ box-shadow: 0 0 14px 0 rgba(0, 0, 0, 0.24); } -.container @media only screen and (max-width: 1920px) { - width: 30vw; +@media only screen and (max-width: 1920px) { + .container { + width: 30vw; + } } .header { @@ -75,7 +77,7 @@ } .unread { - background-color: var(--spring3) + background-color: var(--spring3); } .notificationRowIcon { @@ -83,11 +85,11 @@ } .notificationRowIcon > * { - margin-left: 24px + margin-left: 24px; } .readIconWrapper { - flex-grow: 1 + flex-grow: 1; } .unreadIcon { @@ -118,7 +120,7 @@ } .notificationBody { - margin: 0 + margin: 0; } .notificationSubtitle { @@ -142,4 +144,4 @@ height: 9px; background-color: var(--spring); border-radius: 50%; -} \ No newline at end of file +} diff --git a/packages/admin-ui/src/components/NotificationCenter/NotificationRow.jsx b/packages/admin-ui/src/components/NotificationCenter/NotificationRow.jsx index 37f4bfa1..d26fa425 100644 --- a/packages/admin-ui/src/components/NotificationCenter/NotificationRow.jsx +++ b/packages/admin-ui/src/components/NotificationCenter/NotificationRow.jsx @@ -12,37 +12,36 @@ import classes from './NotificationCenter.module.css' const types = { transaction: { display: 'Transactions', - icon: + icon: , }, highValueTransaction: { display: 'Transactions', - icon: + icon: , }, fiatBalance: { display: 'Maintenance', - icon: + icon: , }, cryptoBalance: { display: 'Maintenance', - icon: + icon: , }, compliance: { display: 'Compliance', - icon: + icon: , }, - error: { display: 'Error', icon: } + error: { display: 'Error', icon: }, } const NotificationRow = ({ id, type, - detail, message, deviceName, created, read, valid, - toggleClear + toggleClear, }) => { const typeDisplay = R.path([type, 'display'])(types) ?? null const icon = R.path([type, 'icon'])(types) ?? ( @@ -50,7 +49,7 @@ const NotificationRow = ({ ) const age = prettyMs(new Date().getTime() - new Date(created).getTime(), { compact: true, - verbose: true + verbose: true, }) const notificationTitle = typeDisplay && deviceName @@ -61,13 +60,13 @@ const NotificationRow = ({ const iconClass = { [classes.readIcon]: read, - [classes.unreadIcon]: !read + [classes.unreadIcon]: !read, } return (
{icon}
diff --git a/packages/admin-ui/src/components/NotificationCenter/index.js b/packages/admin-ui/src/components/NotificationCenter/index.js index 136ffb3b..fd2be253 100644 --- a/packages/admin-ui/src/components/NotificationCenter/index.js +++ b/packages/admin-ui/src/components/NotificationCenter/index.js @@ -1,2 +1,3 @@ import NotificationCenter from './NotificationCenter' + export default NotificationCenter diff --git a/packages/admin-ui/src/components/Popper.jsx b/packages/admin-ui/src/components/Popper.jsx index d440b987..4fe33c02 100644 --- a/packages/admin-ui/src/components/Popper.jsx +++ b/packages/admin-ui/src/components/Popper.jsx @@ -14,7 +14,7 @@ const Popover = ({ children, bgColor = white, className, ...props }) => { top: ['bottom'], bottom: ['top'], left: ['right'], - right: ['left'] + right: ['left'], } const modifiers = [ @@ -22,36 +22,36 @@ const Popover = ({ children, bgColor = white, className, ...props }) => { name: 'flip', enabled: R.defaultTo(false, props.flip), options: { - allowedAutoPlacements: flipPlacements[props.placement] - } + allowedAutoPlacements: flipPlacements[props.placement], + }, }, { name: 'preventOverflow', enabled: true, options: { - rootBoundary: 'scrollParent' - } + rootBoundary: 'scrollParent', + }, }, { name: 'offset', enabled: true, options: { - offset: [0, 10] - } + offset: [0, 10], + }, }, { name: 'arrow', enabled: R.defaultTo(true, props.showArrow), options: { - element: arrowRef - } + element: arrowRef, + }, }, { name: 'computeStyles', options: { - gpuAcceleration: false - } - } + gpuAcceleration: false, + }, + }, ] return ( diff --git a/packages/admin-ui/src/components/Popper.module.css b/packages/admin-ui/src/components/Popper.module.css index 66826b91..1beb7c5c 100644 --- a/packages/admin-ui/src/components/Popper.module.css +++ b/packages/admin-ui/src/components/Popper.module.css @@ -30,4 +30,4 @@ .tooltip[data-popper-placement^='right'] > div > span { left: -4px; -} \ No newline at end of file +} diff --git a/packages/admin-ui/src/components/SearchBox.jsx b/packages/admin-ui/src/components/SearchBox.jsx index dea9cb3d..f3f28ccd 100644 --- a/packages/admin-ui/src/components/SearchBox.jsx +++ b/packages/admin-ui/src/components/SearchBox.jsx @@ -12,7 +12,6 @@ const SearchBox = memo( filters = [], options = [], inputPlaceholder = '', - size, onChange, ...props }) => { @@ -20,7 +19,7 @@ const SearchBox = memo( const inputClasses = { 'flex flex-1 h-8 px-2 py-2 font-md items-center rounded-2xl bg-zircon text-comet': true, - 'rounded-b-none': popupOpen + 'rounded-b-none': popupOpen, } const innerOnChange = filters => onChange(filters) @@ -57,7 +56,7 @@ const SearchBox = memo( placeholder={inputPlaceholder} inputProps={{ className: 'font-bold', - ...params.inputProps + ...params.inputProps, }} /> ) @@ -74,10 +73,11 @@ const SearchBox = memo(
{children} - ) - }} /> - ); - } + ), + }} + /> + ) + }, ) export default SearchBox diff --git a/packages/admin-ui/src/components/SearchFilter.jsx b/packages/admin-ui/src/components/SearchFilter.jsx index 62a5d788..d15287a9 100644 --- a/packages/admin-ui/src/components/SearchFilter.jsx +++ b/packages/admin-ui/src/components/SearchFilter.jsx @@ -12,7 +12,7 @@ const SearchFilter = ({ filters, onFilterDelete, deleteAllFilters, - entries = 0 + entries = 0, }) => { return ( <> @@ -33,7 +33,7 @@ const SearchFilter = ({ {`${entries} ${singularOrPlural( entries, `entry`, - `entries` + `entries`, )}`} } { const separatorClasses = { 'w-7 h-[2px] border-2 z-1': true, 'border-spring': color === 'spring', - 'border-zodiac': color === 'zodiac' + 'border-zodiac': color === 'zodiac', } const separatorEmptyClasses = { 'w-7 h-[2px] border-2 z-1': true, 'border-dust': color === 'spring', - 'border-comet': color === 'zodiac' + 'border-comet': color === 'zodiac', } return ( diff --git a/packages/admin-ui/src/components/Stepper.module.css b/packages/admin-ui/src/components/Stepper.module.css index 34c7b5f7..9dccb967 100644 --- a/packages/admin-ui/src/components/Stepper.module.css +++ b/packages/admin-ui/src/components/Stepper.module.css @@ -9,4 +9,4 @@ height: 100%; width: 100%; overflow: visible; -} \ No newline at end of file +} diff --git a/packages/admin-ui/src/components/Subtitle.jsx b/packages/admin-ui/src/components/Subtitle.jsx index 1efb6f3a..31f24fbd 100644 --- a/packages/admin-ui/src/components/Subtitle.jsx +++ b/packages/admin-ui/src/components/Subtitle.jsx @@ -6,7 +6,7 @@ import { TL1 } from './typography' const Subtitle = memo(({ children, className, extraMarginTop }) => { const classNames = { 'text-comet my-4': true, - 'mt-18': extraMarginTop + 'mt-18': extraMarginTop, } return {children} diff --git a/packages/admin-ui/src/components/Tooltip.jsx b/packages/admin-ui/src/components/Tooltip.jsx index 1d825f77..ba73055f 100644 --- a/packages/admin-ui/src/components/Tooltip.jsx +++ b/packages/admin-ui/src/components/Tooltip.jsx @@ -4,30 +4,6 @@ import React, { useState, memo } from 'react' import Popper from 'src/components/Popper' import HelpIcon from 'src/styling/icons/action/help/zodiac.svg?react' -const useStyles = { - transparentButton: { - border: 'none', - backgroundColor: 'transparent', - outline: 'none', - cursor: 'pointer', - marginTop: 4 - }, - relativelyPositioned: { - position: 'relative' - }, - safeSpace: { - position: 'absolute', - backgroundColor: '#0000', - height: 40, - left: '-50%', - width: '200%' - }, - popoverContent: ({ width }) => ({ - width, - padding: [[10, 15]] - }) -} - const usePopperHandler = () => { const [helpPopperAnchorEl, setHelpPopperAnchorEl] = useState(null) @@ -50,7 +26,7 @@ const usePopperHandler = () => { helpPopperOpen, handleOpenHelpPopper, openHelpPopper, - handleCloseHelpPopper + handleCloseHelpPopper, } } diff --git a/packages/admin-ui/src/components/booleanPropertiesTable/BooleanPropertiesTable.jsx b/packages/admin-ui/src/components/booleanPropertiesTable/BooleanPropertiesTable.jsx index 10ace709..65f8bb00 100644 --- a/packages/admin-ui/src/components/booleanPropertiesTable/BooleanPropertiesTable.jsx +++ b/packages/admin-ui/src/components/booleanPropertiesTable/BooleanPropertiesTable.jsx @@ -25,27 +25,27 @@ const BooleanPropertiesTable = memo( const [editing, setEditing] = useState(forcedEditing) const initialValues = R.fromPairs( - elements.map(it => [it.name, data[it.name]?.toString() ?? 'false']) + elements.map(it => [it.name, data[it.name]?.toString() ?? 'false']), ) const validationSchema = Yup.object().shape( R.fromPairs( elements.map(it => [ it.name, - Yup.mixed().oneOf(['true', 'false', true, false]).required() - ]) - ) + Yup.mixed().oneOf(['true', 'false', true, false]).required(), + ]), + ), ) const innerSave = async values => { - const toBoolean = (num, _) => R.equals(num, 'true') + const toBoolean = num => R.equals(num, 'true') save(R.mapObjIndexed(toBoolean, R.filter(R.complement(R.isNil))(values))) setEditing(false) } const radioButtonOptions = [ { display: 'Yes', code: 'true' }, - { display: 'No', code: 'false' } + { display: 'No', code: 'false' }, ] return (
@@ -117,7 +117,7 @@ const BooleanPropertiesTable = memo(
) - } + }, ) export default BooleanPropertiesTable diff --git a/packages/admin-ui/src/components/buttons/ActionButton.jsx b/packages/admin-ui/src/components/buttons/ActionButton.jsx index 43666387..6c0ca257 100644 --- a/packages/admin-ui/src/components/buttons/ActionButton.jsx +++ b/packages/admin-ui/src/components/buttons/ActionButton.jsx @@ -21,7 +21,7 @@ const ActionButton = memo( [moduleStyles.secondary]: color === 'secondary', [moduleStyles.spring]: color === 'spring', [moduleStyles.tomato]: color === 'tomato', - [moduleStyles.center]: center + [moduleStyles.center]: center, } return ( @@ -35,7 +35,7 @@ const ActionButton = memo(
@@ -43,7 +43,7 @@ const ActionButton = memo( {children &&
{children}
} ) - } + }, ) export default ActionButton diff --git a/packages/admin-ui/src/components/buttons/BaseButton.styles.js b/packages/admin-ui/src/components/buttons/BaseButton.styles.js index 3d49746e..b0a034c9 100644 --- a/packages/admin-ui/src/components/buttons/BaseButton.styles.js +++ b/packages/admin-ui/src/components/buttons/BaseButton.styles.js @@ -4,18 +4,18 @@ import { subheaderColor, subheaderDarkColor, offColor, - offDarkColor + offDarkColor, } from 'src/styling/variables' const colors = (color1, color2, color3) => { return { backgroundColor: color1, '&:hover': { - backgroundColor: color2 + backgroundColor: color2, }, '&:active': { - backgroundColor: color3 - } + backgroundColor: color3, + }, } } @@ -30,23 +30,23 @@ export default { height: buttonHeight, color: fontColor, '&:active': { - color: white - } + color: white, + }, }, primary: { extend: colors(subheaderColor, subheaderDarkColor, offColor), '&:active': { color: white, '& $buttonIcon': { - display: 'none' + display: 'none', }, '& $buttonIconActive': { - display: 'block' - } + display: 'block', + }, }, '& $buttonIconActive': { - display: 'none' - } + display: 'none', + }, }, secondary: { extend: colors(offColor, offDarkColor, white), @@ -54,17 +54,17 @@ export default { '&:active': { color: fontColor, '& $buttonIcon': { - display: 'flex' + display: 'flex', }, '& $buttonIconActive': { - display: 'none' - } + display: 'none', + }, }, '& $buttonIcon': { - display: 'none' + display: 'none', }, '& $buttonIconActive': { - display: 'flex' - } - } + display: 'flex', + }, + }, } diff --git a/packages/admin-ui/src/components/buttons/Button.jsx b/packages/admin-ui/src/components/buttons/Button.jsx index a50eac4a..95342ac1 100644 --- a/packages/admin-ui/src/components/buttons/Button.jsx +++ b/packages/admin-ui/src/components/buttons/Button.jsx @@ -29,15 +29,15 @@ const ActionButton = memo( 'text-white', { [moduleStyles.buttonSm]: size === 'sm', - [moduleStyles.buttonXl]: size === 'xl' - } + [moduleStyles.buttonXl]: size === 'xl', + }, )} {...props}> {children}
) - } + }, ) export default ActionButton diff --git a/packages/admin-ui/src/components/buttons/Button.module.css b/packages/admin-ui/src/components/buttons/Button.module.css index be15b02e..c5c5c432 100644 --- a/packages/admin-ui/src/components/buttons/Button.module.css +++ b/packages/admin-ui/src/components/buttons/Button.module.css @@ -14,13 +14,13 @@ .buttonXl { composes: h1 from '../typography/typography.module.css'; height: 61px; - border-radius: 15px + border-radius: 15px; } .buttonSm { height: 32px; padding: 0 16px; - border-radius: 8px + border-radius: 8px; } .button:disabled { @@ -46,4 +46,4 @@ margin-top: 2px; background-color: var(--spring2); box-shadow: 0 2px var(--spring4); -} \ No newline at end of file +} diff --git a/packages/admin-ui/src/components/buttons/FeatureButton.jsx b/packages/admin-ui/src/components/buttons/FeatureButton.jsx index 73fb0a63..da65a2d9 100644 --- a/packages/admin-ui/src/components/buttons/FeatureButton.jsx +++ b/packages/admin-ui/src/components/buttons/FeatureButton.jsx @@ -11,7 +11,7 @@ const FeatureButton = memo( classes.baseButton, classes.roundButton, classes.primary, - className + className, )} {...props}> {Icon && ( @@ -23,7 +23,7 @@ const FeatureButton = memo(
@@ -31,7 +31,7 @@ const FeatureButton = memo( {children} ) - } + }, ) export default FeatureButton diff --git a/packages/admin-ui/src/components/buttons/IDButton.jsx b/packages/admin-ui/src/components/buttons/IDButton.jsx index 437821a5..592557de 100644 --- a/packages/admin-ui/src/components/buttons/IDButton.jsx +++ b/packages/admin-ui/src/components/buttons/IDButton.jsx @@ -11,7 +11,6 @@ const IDButton = memo( className, Icon, InverseIcon, - popoverWidth = 152, children, popoverClassname, ...props @@ -25,11 +24,11 @@ const IDButton = memo( [classes.idButton]: true, [classes.primary]: true, [classes.open]: open, - [classes.closed]: !open + [classes.closed]: !open, } const iconClassNames = { - [classes.buttonIcon]: true + [classes.buttonIcon]: true, } const handleClick = event => { @@ -74,7 +73,7 @@ const IDButton = memo( ) - } + }, ) export default IDButton diff --git a/packages/admin-ui/src/components/buttons/Link.jsx b/packages/admin-ui/src/components/buttons/Link.jsx index 1a4fdad2..39a721d1 100644 --- a/packages/admin-ui/src/components/buttons/Link.jsx +++ b/packages/admin-ui/src/components/buttons/Link.jsx @@ -10,7 +10,7 @@ const Link = memo( [classes.primary]: color === 'primary', [classes.secondary]: color === 'secondary', [classes.noColor]: color === 'noColor', - [classes.action]: color === 'action' + [classes.action]: color === 'action', } return ( @@ -21,7 +21,7 @@ const Link = memo( {children} ) - } + }, ) export default Link diff --git a/packages/admin-ui/src/components/buttons/Link.module.css b/packages/admin-ui/src/components/buttons/Link.module.css index b780f5c6..ee8244f5 100644 --- a/packages/admin-ui/src/components/buttons/Link.module.css +++ b/packages/admin-ui/src/components/buttons/Link.module.css @@ -44,4 +44,4 @@ .action:hover { box-shadow: none; background-color: rgba(72, 246, 148, 0.8); -} \ No newline at end of file +} diff --git a/packages/admin-ui/src/components/buttons/SubpageButton.jsx b/packages/admin-ui/src/components/buttons/SubpageButton.jsx index bf1de782..ed689e41 100644 --- a/packages/admin-ui/src/components/buttons/SubpageButton.jsx +++ b/packages/admin-ui/src/components/buttons/SubpageButton.jsx @@ -12,14 +12,14 @@ const SubpageButton = memo( InverseIcon, toggle, forceDisable = false, - children + children, }) => { const [active, setActive] = useState(false) const isActive = forceDisable ? false : active const classNames = { [classes.button]: true, [classes.normal]: !isActive, - [classes.active]: isActive + [classes.active]: isActive, } const normalButton = @@ -29,14 +29,14 @@ const SubpageButton = memo(

{children}

@@ -56,7 +56,7 @@ const SubpageButton = memo( {isActive ? activeButton : normalButton} ) - } + }, ) export default SubpageButton diff --git a/packages/admin-ui/src/components/buttons/SubpageButton.module.css b/packages/admin-ui/src/components/buttons/SubpageButton.module.css index ba97a0f4..84babdbc 100644 --- a/packages/admin-ui/src/components/buttons/SubpageButton.module.css +++ b/packages/admin-ui/src/components/buttons/SubpageButton.module.css @@ -27,7 +27,7 @@ } .active:hover { - background-color: var(--comet); + background-color: var(--comet); } .buttonIcon { diff --git a/packages/admin-ui/src/components/buttons/SubpageButton.styles.js b/packages/admin-ui/src/components/buttons/SubpageButton.styles.js index 5e2a2ade..a5afd0b6 100644 --- a/packages/admin-ui/src/components/buttons/SubpageButton.styles.js +++ b/packages/admin-ui/src/components/buttons/SubpageButton.styles.js @@ -8,10 +8,10 @@ export default { extend: baseButton, padding: 0, color: white, - borderRadius: baseButton.height / 2 + borderRadius: baseButton.height / 2, }, normalButton: { - width: baseButton.height + width: baseButton.height, }, activeButton: { display: 'flex', @@ -21,26 +21,26 @@ export default { fontWeight: 'bold', padding: '0 5px', '&:hover': { - backgroundColor: offColor - } + backgroundColor: offColor, + }, }, buttonIcon: { width: 16, height: 16, overflow: 'visible', '& g': { - strokeWidth: 1.8 - } + strokeWidth: 1.8, + }, }, buttonIconActiveLeft: { marginRight: 12, - marginLeft: 4 + marginLeft: 4, }, buttonIconActiveRight: { marginRight: 5, - marginLeft: 20 + marginLeft: 20, }, white: { - color: white - } + color: white, + }, } diff --git a/packages/admin-ui/src/components/buttons/index.js b/packages/admin-ui/src/components/buttons/index.js index e227aaa5..10cbe942 100644 --- a/packages/admin-ui/src/components/buttons/index.js +++ b/packages/admin-ui/src/components/buttons/index.js @@ -15,5 +15,5 @@ export { IDButton, AddButton, SupportLinkButton, - SubpageButton + SubpageButton, } diff --git a/packages/admin-ui/src/components/date-range-picker/Calendar.jsx b/packages/admin-ui/src/components/date-range-picker/Calendar.jsx index bd3dd81e..a95102ad 100644 --- a/packages/admin-ui/src/components/date-range-picker/Calendar.jsx +++ b/packages/admin-ui/src/components/date-range-picker/Calendar.jsx @@ -10,7 +10,7 @@ import { lastDayOfMonth, startOfMonth, startOfWeek, - sub + sub, } from 'date-fns/fp' import * as R from 'ramda' import React, { useState } from 'react' @@ -24,7 +24,7 @@ const Calendar = ({ minDate, maxDate, handleSelect, ...props }) => { const [currentDisplayedMonth, setCurrentDisplayedMonth] = useState(new Date()) const weekdays = Array.from(Array(7)).map((_, i) => - format('EEEEE', add({ days: i }, startOfWeek(new Date()))) + format('EEEEE', add({ days: i }, startOfWeek(new Date()))), ) const monthLength = month => getDaysInMonth(month) @@ -33,21 +33,21 @@ const Calendar = ({ minDate, maxDate, handleSelect, ...props }) => { const lastMonth = sub({ months: 1 }, month) const lastMonthRange = R.range(0, getDay(startOfMonth(month))).reverse() const lastMonthDays = R.map(i => - sub({ days: i }, lastDayOfMonth(lastMonth)) + sub({ days: i }, lastDayOfMonth(lastMonth)), )(lastMonthRange) const thisMonthRange = R.range(0, monthLength(month)) const thisMonthDays = R.map(i => add({ days: i }, startOfMonth(month)))( - thisMonthRange + thisMonthRange, ) const nextMonth = add({ months: 1 }, month) const nextMonthRange = R.range( 0, - 42 - lastMonthDays.length - thisMonthDays.length + 42 - lastMonthDays.length - thisMonthDays.length, ) const nextMonthDays = R.map(i => add({ days: i }, startOfMonth(nextMonth)))( - nextMonthRange + nextMonthRange, ) return R.concat(R.concat(lastMonthDays, thisMonthDays), nextMonthDays) @@ -63,7 +63,7 @@ const Calendar = ({ minDate, maxDate, handleSelect, ...props }) => { isSameMonth(minDate, prevMonth) || differenceInMonths(minDate, prevMonth) > 0 ? prevMonth - : currentDisplayedMonth + : currentDisplayedMonth, ) } } @@ -75,7 +75,7 @@ const Calendar = ({ minDate, maxDate, handleSelect, ...props }) => { isSameMonth(maxDate, nextMonth) || differenceInMonths(nextMonth, maxDate) > 0 ? nextMonth - : currentDisplayedMonth + : currentDisplayedMonth, ) } } @@ -91,7 +91,7 @@ const Calendar = ({ minDate, maxDate, handleSelect, ...props }) => { {`${format('MMMM', currentDisplayedMonth)} ${format( 'yyyy', - currentDisplayedMonth + currentDisplayedMonth, )}`}
diff --git a/packages/admin-ui/src/components/layout/Sidebar.module.css b/packages/admin-ui/src/components/layout/Sidebar.module.css index e1bf6b83..0f0f8df9 100644 --- a/packages/admin-ui/src/components/layout/Sidebar.module.css +++ b/packages/admin-ui/src/components/layout/Sidebar.module.css @@ -39,7 +39,7 @@ } .link::after { - content: ""; + content: ''; display: block; background: var(--zodiac); width: 4px; @@ -103,4 +103,4 @@ .stepperPast { border: 1px solid var(--zodiac); -} \ No newline at end of file +} diff --git a/packages/admin-ui/src/components/layout/TitleSection.jsx b/packages/admin-ui/src/components/layout/TitleSection.jsx index c42022ac..c22b4048 100644 --- a/packages/admin-ui/src/components/layout/TitleSection.jsx +++ b/packages/admin-ui/src/components/layout/TitleSection.jsx @@ -15,13 +15,13 @@ const TitleSection = ({ buttons = [], children, appendix, - appendixRight + appendixRight, }) => { return (
{title} @@ -44,7 +44,7 @@ const TitleSection = ({ {button.text} - ) + ), )} )} diff --git a/packages/admin-ui/src/components/machineActions/DiagnosticsModal.jsx b/packages/admin-ui/src/components/machineActions/DiagnosticsModal.jsx index d9519634..fb002172 100644 --- a/packages/admin-ui/src/components/machineActions/DiagnosticsModal.jsx +++ b/packages/admin-ui/src/components/machineActions/DiagnosticsModal.jsx @@ -12,7 +12,7 @@ const STATES = { EMPTY: 'EMPTY', RUNNING: 'RUNNING', FAILURE: 'FAILURE', - FILLED: 'FILLED' + FILLED: 'FILLED', } const MACHINE = gql` @@ -47,7 +47,7 @@ const MACHINE_LOGS = gql` const createCsv = async ({ machineLogsCsv }) => { const machineLogs = new Blob([machineLogsCsv], { - type: 'text/plain;charset=utf-8' + type: 'text/plain;charset=utf-8', }) FileSaver.saveAs(machineLogs, 'machineLogs.csv') @@ -59,11 +59,11 @@ const DiagnosticsModal = ({ onClose, deviceId, sendAction }) => { let timeout = null const [fetchSummary, { loading }] = useLazyQuery(MACHINE_LOGS, { - onCompleted: data => createCsv(data) + onCompleted: data => createCsv(data), }) const { data, stopPolling, startPolling } = useQuery(MACHINE, { - variables: { deviceId } + variables: { deviceId }, }) useEffect(() => { @@ -168,8 +168,8 @@ const DiagnosticsModal = ({ onClose, deviceId, sendAction }) => { variables: { from: subMinutes(new Date(timestamp), 5), deviceId, - limit: 500 - } + limit: 500, + }, }) }} className="mt-auto ml-auto mr-2 mb-0"> diff --git a/packages/admin-ui/src/components/machineActions/MachineActions.jsx b/packages/admin-ui/src/components/machineActions/MachineActions.jsx index 954b815a..c8ae031e 100644 --- a/packages/admin-ui/src/components/machineActions/MachineActions.jsx +++ b/packages/admin-ui/src/components/machineActions/MachineActions.jsx @@ -49,7 +49,7 @@ const isStaticState = machineState => { 'unpaired', 'maintenance', 'virgin', - 'wifiList' + 'wifiList', ] return staticStates.includes(machineState) } @@ -73,7 +73,7 @@ const MachineActions = memo(({ machine, onActionSuccess }) => { const [fetchMachineEvents, { loading: loadingEvents }] = useLazyQuery( MACHINE, - preflightOptions + preflightOptions, ) const [simpleMachineAction] = useMutation(MACHINE_ACTION) @@ -86,7 +86,7 @@ const MachineActions = memo(({ machine, onActionSuccess }) => { onCompleted: () => { onActionSuccess && onActionSuccess() setAction({ display: action.display, command: null }) - } + }, }) const confirmDialogOpen = Boolean(action.command) @@ -100,7 +100,7 @@ const MachineActions = memo(({ machine, onActionSuccess }) => { ? warningMessage : null setAction({ ...actionToDo, message }) - } + }, }) fetchMachineEvents() } @@ -118,7 +118,7 @@ const MachineActions = memo(({ machine, onActionSuccess }) => { setAction({ command: 'rename', display: 'Rename', - confirmationMessage: 'Write the new name for this machine' + confirmationMessage: 'Write the new name for this machine', }) }> Rename @@ -131,7 +131,7 @@ const MachineActions = memo(({ machine, onActionSuccess }) => { onClick={() => setAction({ command: 'unpair', - display: 'Unpair' + display: 'Unpair', }) }> Unpair @@ -144,7 +144,7 @@ const MachineActions = memo(({ machine, onActionSuccess }) => { onClick={() => setAction({ command: 'reboot', - display: 'Reboot' + display: 'Reboot', }) }> Reboot @@ -159,7 +159,7 @@ const MachineActions = memo(({ machine, onActionSuccess }) => { command: 'shutdown', display: 'Shutdown', message: - 'In order to bring it back online, the machine will need to be visited and its power reset.' + 'In order to bring it back online, the machine will need to be visited and its power reset.', }) }> Shutdown @@ -172,7 +172,7 @@ const MachineActions = memo(({ machine, onActionSuccess }) => { onClick={() => { machineStatusPreflight({ command: 'restartServices', - display: 'Restart services for' + display: 'Restart services for', }) }}> Restart services @@ -188,7 +188,7 @@ const MachineActions = memo(({ machine, onActionSuccess }) => { command: 'emptyUnit', display: 'Empty', message: - "Triggering this action will move all cash inside the machine towards its cashbox (if possible), allowing for the collection of cash from the machine via only its cashbox. Depending on how full the cash units are, it's possible that this action will need to be used more than once to ensure that the unit is left completely empty." + "Triggering this action will move all cash inside the machine towards its cashbox (if possible), allowing for the collection of cash from the machine via only its cashbox. Depending on how full the cash units are, it's possible that this action will need to be used more than once to ensure that the unit is left completely empty.", }) }}> Empty Unit @@ -205,7 +205,7 @@ const MachineActions = memo(({ machine, onActionSuccess }) => { command: 'refillUnit', display: 'Refill', message: - 'Triggering this action will refill the recyclers in this machine, by using bills present in its cassettes. This action may require manual operation of the cassettes and close attention to make sure that the denominations in the cassettes match the denominations in the recyclers.' + 'Triggering this action will refill the recyclers in this machine, by using bills present in its cassettes. This action may require manual operation of the cassettes and close attention to make sure that the denominations in the cassettes match the denominations in the recyclers.', }) }}> Refill Unit @@ -228,8 +228,8 @@ const MachineActions = memo(({ machine, onActionSuccess }) => { simpleMachineAction({ variables: { deviceId: machine.deviceId, - action: 'diagnostics' - } + action: 'diagnostics', + }, }) } deviceId={machine.deviceId} @@ -253,8 +253,8 @@ const MachineActions = memo(({ machine, onActionSuccess }) => { variables: { deviceId: machine.deviceId, action: `${action?.command}`, - ...(action?.command === 'rename' && { newName: value }) - } + ...(action?.command === 'rename' && { newName: value }), + }, }) }} onDismissed={() => { diff --git a/packages/admin-ui/src/components/single-row-table/SingleRowTable.jsx b/packages/admin-ui/src/components/single-row-table/SingleRowTable.jsx index 8e7cad48..490ac0c6 100644 --- a/packages/admin-ui/src/components/single-row-table/SingleRowTable.jsx +++ b/packages/admin-ui/src/components/single-row-table/SingleRowTable.jsx @@ -7,7 +7,7 @@ import { TBody, Td, Th, - Tr + Tr, } from 'src/components/fake-table/Table' import EditIcon from 'src/styling/icons/action/edit/white.svg?react' @@ -19,7 +19,7 @@ const SingleRowTable = ({ title, items, onEdit, - className + className, }) => { return ( <> diff --git a/packages/admin-ui/src/components/table/EmptyTable.jsx b/packages/admin-ui/src/components/table/EmptyTable.jsx index 5859bdfc..96f653c5 100644 --- a/packages/admin-ui/src/components/table/EmptyTable.jsx +++ b/packages/admin-ui/src/components/table/EmptyTable.jsx @@ -8,7 +8,7 @@ const EmptyTable = memo(({ message, className }) => {

{message}

diff --git a/packages/admin-ui/src/components/table/Table.jsx b/packages/admin-ui/src/components/table/Table.jsx index 980220b9..c54bedd7 100644 --- a/packages/admin-ui/src/components/table/Table.jsx +++ b/packages/admin-ui/src/components/table/Table.jsx @@ -7,7 +7,7 @@ const Table = memo(({ className, children, ...props }) => { {...props} className={classnames( 'table-fixed border-separate border-spacing-0', - className + className, )}> {children} diff --git a/packages/admin-ui/src/components/table/TableCell.jsx b/packages/admin-ui/src/components/table/TableCell.jsx index 204915ff..36e8501a 100644 --- a/packages/admin-ui/src/components/table/TableCell.jsx +++ b/packages/admin-ui/src/components/table/TableCell.jsx @@ -7,7 +7,7 @@ const TableCell = memo( ({ colspan, rightAlign, className, children, ...props }) => { const styles = { [classes.tableCell]: true, - 'text-right': rightAlign + 'text-right': rightAlign, } return ( @@ -18,7 +18,7 @@ const TableCell = memo( {children} ) - } + }, ) export default TableCell diff --git a/packages/admin-ui/src/components/table/TableHeader.jsx b/packages/admin-ui/src/components/table/TableHeader.jsx index cd1b895e..9653d1ba 100644 --- a/packages/admin-ui/src/components/table/TableHeader.jsx +++ b/packages/admin-ui/src/components/table/TableHeader.jsx @@ -5,7 +5,7 @@ const TableHeaderCell = memo( ({ rightAlign, children, className, ...props }) => { const styles = { 'bg-zodiac text-white py-0 px-6 h-8 text-sm text-left': true, - 'text-right': rightAlign + 'text-right': rightAlign, } return ( @@ -13,7 +13,7 @@ const TableHeaderCell = memo( {children} ) - } + }, ) export default TableHeaderCell diff --git a/packages/admin-ui/src/components/table/TableRow.jsx b/packages/admin-ui/src/components/table/TableRow.jsx index 8c026bd7..916416ea 100644 --- a/packages/admin-ui/src/components/table/TableRow.jsx +++ b/packages/admin-ui/src/components/table/TableRow.jsx @@ -8,7 +8,7 @@ const TableRow = memo( 'h-8': !header && size === 'sm', 'h-9 font-bold text-base ': !header && size === 'lg', 'bg-misty-rose': error, - 'bg-spring3': success + 'bg-spring3': success, } return ( @@ -16,7 +16,7 @@ const TableRow = memo( {children} ) - } + }, ) export default TableRow diff --git a/packages/admin-ui/src/components/table/index.js b/packages/admin-ui/src/components/table/index.js index 289d0b01..85ccc33d 100644 --- a/packages/admin-ui/src/components/table/index.js +++ b/packages/admin-ui/src/components/table/index.js @@ -15,5 +15,5 @@ export { TableHead, TableHeader, TableRow, - TableBody + TableBody, } diff --git a/packages/admin-ui/src/components/tables/DataTable.jsx b/packages/admin-ui/src/components/tables/DataTable.jsx index 29bba105..a4e3a97b 100644 --- a/packages/admin-ui/src/components/tables/DataTable.jsx +++ b/packages/admin-ui/src/components/tables/DataTable.jsx @@ -5,7 +5,7 @@ import { AutoSizer, List, CellMeasurer, - CellMeasurerCache + CellMeasurerCache, } from 'react-virtualized' import { Table, @@ -13,7 +13,7 @@ import { THead, Tr, Td, - Th + Th, } from 'src/components/fake-table/Table' import { H4 } from 'src/components/typography' import ExpandClosedIcon from 'src/styling/icons/action/expand/closed.svg?react' @@ -40,7 +40,7 @@ const Row = ({ const trClasses = { 'cursor-pointer': hasPointer, 'border-2 border-transparent': true, - 'border-2 border-zircon shadow-md': expanded + 'border-2 border-zircon shadow-md': expanded, } return ( @@ -79,7 +79,7 @@ const Row = ({
@@ -126,7 +126,7 @@ const DataTable = ({ const cache = new CellMeasurerCache({ defaultHeight: 58, - fixedWidth: true + fixedWidth: true, }) function rowRenderer({ index, key, parent, style }) { @@ -168,12 +168,12 @@ const DataTable = ({
diff --git a/packages/admin-ui/src/components/typography/index.jsx b/packages/admin-ui/src/components/typography/index.jsx index 58a0c026..a0776a6e 100644 --- a/packages/admin-ui/src/components/typography/index.jsx +++ b/packages/admin-ui/src/components/typography/index.jsx @@ -7,7 +7,7 @@ function H1({ children, noMargin, className, ...props }) { const classNames = { [styles.h1]: true, [styles.noMargin]: noMargin, - [className]: !!className + [className]: !!className, } return ( @@ -21,7 +21,7 @@ function H2({ children, noMargin, className, ...props }) { const classNames = { [styles.h2]: true, [styles.noMargin]: noMargin, - [className]: !!className + [className]: !!className, } return ( @@ -35,7 +35,7 @@ function H3({ children, noMargin, className, ...props }) { const classNames = { [styles.h3]: true, [styles.noMargin]: noMargin, - [className]: !!className + [className]: !!className, } return ( @@ -49,7 +49,7 @@ function H4({ children, noMargin, className, ...props }) { const classNames = { [styles.h4]: true, [styles.noMargin]: noMargin, - [className]: !!className + [className]: !!className, } return ( @@ -63,7 +63,7 @@ function H5({ children, noMargin, className, ...props }) { const classNames = { [styles.h5]: true, [styles.noMargin]: noMargin, - [className]: !!className + [className]: !!className, } return ( @@ -90,7 +90,7 @@ function pBuilder(elementClass) { [className]: !!className, [styles[elementClass]]: elementClass, [styles.inline]: inline, - [styles.noMargin]: noMargin + [styles.noMargin]: noMargin, } return (

@@ -115,5 +115,5 @@ export { Mono, Label1, Label2, - Label3 + Label3, } diff --git a/packages/admin-ui/src/components/typography/styles.js b/packages/admin-ui/src/components/typography/styles.js index 1d3f9fc8..d86386ba 100644 --- a/packages/admin-ui/src/components/typography/styles.js +++ b/packages/admin-ui/src/components/typography/styles.js @@ -7,132 +7,132 @@ import { fontSize5, fontPrimary, fontSecondary, - fontMonospaced + fontMonospaced, } from 'src/styling/variables' const base = { lineHeight: '120%', - color: fontColor + color: fontColor, } export default { base: { lineHeight: '120%', - color: fontColor + color: fontColor, }, h1: { extend: base, fontSize: fontSize1, fontFamily: fontPrimary, - fontWeight: 900 + fontWeight: 900, }, h2: { extend: base, fontSize: fontSize2, fontFamily: fontPrimary, - fontWeight: 900 + fontWeight: 900, }, h3: { extend: base, fontSize: fontSize4, fontFamily: fontPrimary, - fontWeight: 900 + fontWeight: 900, }, h4: { extend: base, fontSize: fontSize4, fontFamily: fontPrimary, - fontWeight: 700 + fontWeight: 700, }, h5: { extend: base, fontSize: fontSize3, fontFamily: fontPrimary, - fontWeight: 700 + fontWeight: 700, }, p: { ...base, fontSize: fontSize4, fontFamily: fontSecondary, - fontWeight: 500 + fontWeight: 500, }, tl1: { extend: base, fontSize: fontSize2, fontFamily: fontSecondary, - fontWeight: 700 + fontWeight: 700, }, tl2: { extend: base, fontSize: fontSize4, fontFamily: fontSecondary, - fontWeight: 700 + fontWeight: 700, }, info1: { extend: base, fontSize: fontSize1, fontFamily: fontSecondary, - fontWeight: 700 + fontWeight: 700, }, info2: { extend: base, fontSize: fontSize3, fontFamily: fontSecondary, - fontWeight: 700 + fontWeight: 700, }, info3: { extend: base, fontSize: fontSize3, fontFamily: fontSecondary, - fontWeight: 500 + fontWeight: 500, }, mono: { extend: base, fontSize: fontSize4, fontFamily: fontMonospaced, - fontWeight: 500 + fontWeight: 500, }, monoBold: { - fontWeight: 700 + fontWeight: 700, }, monoSmall: { - fontSize: fontSize5 + fontSize: fontSize5, }, inputFont: { fontSize: fontSize2, fontFamily: fontSecondary, fontWeight: 500, lineHeight: '110%', - color: fontColor + color: fontColor, }, regularLabel: { fontSize: fontSize4, fontFamily: fontSecondary, fontWeight: 500, - lineHeight: '110%' + lineHeight: '110%', }, label1: { fontSize: fontSize5, fontFamily: fontSecondary, fontWeight: 500, - color: fontColor + color: fontColor, }, label2: { fontSize: fontSize5, fontFamily: fontSecondary, fontWeight: 700, - color: fontColor + color: fontColor, }, label3: { fontSize: fontSize4, fontFamily: fontSecondary, fontWeight: 500, - color: fontColor + color: fontColor, }, inline: { - display: 'inline' + display: 'inline', }, noMargin: { - margin: 0 - } + margin: 0, + }, } diff --git a/packages/admin-ui/src/index.jsx b/packages/admin-ui/src/index.jsx index 638af18d..728ca19d 100644 --- a/packages/admin-ui/src/index.jsx +++ b/packages/admin-ui/src/index.jsx @@ -7,5 +7,5 @@ ReactDOM.render( , - document.getElementById('root') + document.getElementById('root'), ) diff --git a/packages/admin-ui/src/pages/AddMachine/AddMachine.jsx b/packages/admin-ui/src/pages/AddMachine/AddMachine.jsx index 55930c41..4c6fdebb 100644 --- a/packages/admin-ui/src/pages/AddMachine/AddMachine.jsx +++ b/packages/admin-ui/src/pages/AddMachine/AddMachine.jsx @@ -58,7 +58,7 @@ const QrCodeComponent = ({ qrCode, name, count, onPaired }) => { if (hasNewMachine) { timeout.current = setTimeout( () => onPaired(addedMachine), - CLOSE_SCREEN_TIMEOUT + CLOSE_SCREEN_TIMEOUT, ) } @@ -111,7 +111,7 @@ const QrCodeComponent = ({ qrCode, name, count, onPaired }) => { } const initialValues = { - name: '' + name: '', } const validationSchema = Yup.object().shape({ @@ -124,9 +124,9 @@ const validationSchema = Yup.object().shape({ (value, context) => !R.includes( R.toLower(value), - R.map(R.toLower, context.options.context.machineNames) - ) - ) + R.map(R.toLower, context.options.context.machineNames), + ), + ), }) const MachineNameComponent = ({ nextStep, setQrCode, setName }) => { @@ -138,7 +138,7 @@ const MachineNameComponent = ({ nextStep, setQrCode, setName }) => { setQrCode(createPairingTotem) nextStep() }, - onError: e => console.log(e) + onError: e => console.log(e), }) const { data } = useQuery(GET_MACHINES) @@ -147,7 +147,7 @@ const MachineNameComponent = ({ nextStep, setQrCode, setName }) => { const uniqueNameValidator = value => { try { validationSchema.validateSync(value, { - context: { machineNames: machineNames } + context: { machineNames: machineNames }, }) } catch (error) { return error @@ -189,12 +189,12 @@ const MachineNameComponent = ({ nextStep, setQrCode, setName }) => { const steps = [ { label: 'Machine name', - component: MachineNameComponent + component: MachineNameComponent, }, { label: 'Scan QR code', - component: QrCodeComponent - } + component: QrCodeComponent, + }, ] const renderStepper = (step, it, idx) => { @@ -208,7 +208,7 @@ const renderStepper = (step, it, idx) => { className={classnames({ 'mr-6 text-comet': true, 'text-zodiac font-bold': active, - 'text-zodiac': past + 'text-zodiac': past, })}> {it.label} @@ -219,7 +219,7 @@ const renderStepper = (step, it, idx) => {

)} diff --git a/packages/admin-ui/src/pages/Analytics/Analytics.jsx b/packages/admin-ui/src/pages/Analytics/Analytics.jsx index 3dbb5f3f..43a4b21d 100644 --- a/packages/admin-ui/src/pages/Analytics/Analytics.jsx +++ b/packages/admin-ui/src/pages/Analytics/Analytics.jsx @@ -26,29 +26,29 @@ const REPRESENTING_OPTIONS = [ { code: 'overTime', display: 'Over time' }, { code: 'volumeOverTime', display: 'Volume' }, { code: 'topMachines', display: 'Top machines' }, - { code: 'hourOfTheDay', display: 'Hour of the day' } + { code: 'hourOfTheDay', display: 'Hour of the day' }, ] const PERIOD_OPTIONS = [ { code: 'day', display: 'Last 24 hours' }, { code: 'threeDays', display: 'Last 3 days' }, { code: 'week', display: 'Last 7 days' }, - { code: 'month', display: 'Last 30 days' } + { code: 'month', display: 'Last 30 days' }, ] const TIME_OPTIONS = { day: DAY, threeDays: 3 * DAY, week: WEEK, - month: MONTH + month: MONTH, } const DAY_OPTIONS = R.map( it => ({ code: R.toLower(it), - display: it + display: it, }), Array.from(Array(7)).map((_, i) => - format('EEEE', add({ days: i }, startOfWeek(new Date()))) - ) + format('EEEE', add({ days: i }, startOfWeek(new Date()))), + ), ) const GET_TRANSACTIONS = gql` @@ -112,7 +112,7 @@ const OverviewEntry = ({ label, value, oldValue, currency }) => { const growthClasses = { 'font-bold': true, 'text-malachite': R.gt(value, oldValue), - 'text-tomato': R.gt(oldValue, value) + 'text-tomato': R.gt(oldValue, value), } return ( @@ -139,8 +139,8 @@ const Analytics = () => { variables: { from: subDays(65, endOfToday()), until: endOfToday(), - excludeTestingCustomers: true - } + excludeTestingCustomers: true, + }, }) const { data: configResponse, loading: configLoading } = useQuery(GET_DATA) @@ -148,7 +148,7 @@ const Analytics = () => { const [period, setPeriod] = useState(PERIOD_OPTIONS[0]) const [machine, setMachine] = useState(MACHINE_OPTIONS[0]) const [selectedDay, setSelectedDay] = useState( - R.equals(representing.code, 'hourOfTheDay') ? DAY_OPTIONS[0] : null + R.equals(representing.code, 'hourOfTheDay') ? DAY_OPTIONS[0] : null, ) const loading = txLoading || configLoading @@ -175,20 +175,20 @@ const Analytics = () => { tx => (!tx.dispensed || !tx.expired) && (tx.sendConfirmed || tx.dispense) && - !tx.hasError - ) + !tx.hasError, + ), ) ?? [] const machineOptions = R.clone(MACHINE_OPTIONS) R.forEach( m => machineOptions.push({ code: m.deviceId, display: m.name }), - machines + machines, ) const machineTxs = R.filter( tx => (machine.code === 'all' ? true : tx.deviceId === machine.code), - data + data, ) const filteredData = timeInterval => ({ @@ -213,35 +213,35 @@ const Analytics = () => { txDay < Date.now() - TIME_OPTIONS[timeInterval] && txDay >= Date.now() - 2 * TIME_OPTIONS[timeInterval] ) - }) ?? [] + }) ?? [], }) const txs = { current: filteredData(period.code).current.length, - previous: filteredData(period.code).previous.length + previous: filteredData(period.code).previous.length, } const median = values => (values.length === 0 ? 0 : R.median(values)) const medianAmount = { current: median(R.map(d => d.fiat, filteredData(period.code).current)), - previous: median(R.map(d => d.fiat, filteredData(period.code).previous)) + previous: median(R.map(d => d.fiat, filteredData(period.code).previous)), } const txVolume = { current: R.sum(R.map(d => d.fiat, filteredData(period.code).current)), - previous: R.sum(R.map(d => d.fiat, filteredData(period.code).previous)) + previous: R.sum(R.map(d => d.fiat, filteredData(period.code).previous)), } const commissions = { current: R.sum(R.map(d => d.profit, filteredData(period.code).current)), - previous: R.sum(R.map(d => d.profit, filteredData(period.code).previous)) + previous: R.sum(R.map(d => d.profit, filteredData(period.code).previous)), } const handleRepresentationChange = newRepresentation => { setRepresenting(newRepresentation) setSelectedDay( - R.equals(newRepresentation.code, 'hourOfTheDay') ? DAY_OPTIONS[0] : null + R.equals(newRepresentation.code, 'hourOfTheDay') ? DAY_OPTIONS[0] : null, ) } diff --git a/packages/admin-ui/src/pages/Analytics/components/tooltips/GraphTooltip.jsx b/packages/admin-ui/src/pages/Analytics/components/tooltips/GraphTooltip.jsx index 9c11e46e..3aa8057f 100644 --- a/packages/admin-ui/src/pages/Analytics/components/tooltips/GraphTooltip.jsx +++ b/packages/admin-ui/src/pages/Analytics/components/tooltips/GraphTooltip.jsx @@ -13,20 +13,19 @@ const GraphTooltip = ({ coords, data, dateInterval, - period, currency, - representing + representing, }) => { const formattedDateInterval = !R.includes('hourOfDay', representing.code) ? [ formatDate(dateInterval[1], null, 'MMM d'), formatDate(dateInterval[1], null, 'HH:mm'), - formatDate(dateInterval[0], null, 'HH:mm') + formatDate(dateInterval[0], null, 'HH:mm'), ] : [ formatDate(dateInterval[1], null, 'MMM d'), formatDateNonUtc(dateInterval[1], 'HH:mm'), - formatDateNonUtc(dateInterval[0], 'HH:mm') + formatDateNonUtc(dateInterval[0], 'HH:mm'), ] const transactions = R.reduce( @@ -37,7 +36,7 @@ const GraphTooltip = ({ return acc }, { volume: 0, cashIn: 0, cashOut: 0 }, - data + data, ) return ( diff --git a/packages/admin-ui/src/pages/Analytics/components/wrappers/HourOfDayWrapper.jsx b/packages/admin-ui/src/pages/Analytics/components/wrappers/HourOfDayWrapper.jsx index aaa1bf52..b3ad7e98 100644 --- a/packages/admin-ui/src/pages/Analytics/components/wrappers/HourOfDayWrapper.jsx +++ b/packages/admin-ui/src/pages/Analytics/components/wrappers/HourOfDayWrapper.jsx @@ -12,7 +12,7 @@ import classes from './wrappers.module.css' const options = [ { code: 'hourOfDayTransactions', display: 'Transactions' }, - { code: 'hourOfDayVolume', display: 'Volume' } + { code: 'hourOfDayVolume', display: 'Volume' }, ] const HourOfDayBarGraphHeader = ({ @@ -26,13 +26,13 @@ const HourOfDayBarGraphHeader = ({ dayOptions, handleDayChange, timezone, - currency + currency, }) => { const [graphType /*, setGraphType */] = useState(options[0].code) const legend = { cashIn:
, - cashOut:
+ cashOut:
, } const offset = getTimezoneOffset(timezone) @@ -41,7 +41,7 @@ const HourOfDayBarGraphHeader = ({ (acc, value) => { const created = new Date(value.created) created.setTime( - created.getTime() + created.getTimezoneOffset() * MINUTE + offset + created.getTime() + created.getTimezoneOffset() * MINUTE + offset, ) switch (created.getDay()) { case 0: @@ -71,7 +71,7 @@ const HourOfDayBarGraphHeader = ({ return acc }, R.fromPairs(R.map(it => [it.code, []], dayOptions)), - data + data, ) return ( diff --git a/packages/admin-ui/src/pages/Analytics/components/wrappers/OverTimeWrapper.jsx b/packages/admin-ui/src/pages/Analytics/components/wrappers/OverTimeWrapper.jsx index 1e36ac37..2cf845df 100644 --- a/packages/admin-ui/src/pages/Analytics/components/wrappers/OverTimeWrapper.jsx +++ b/packages/admin-ui/src/pages/Analytics/components/wrappers/OverTimeWrapper.jsx @@ -18,7 +18,7 @@ const OverTimeDotGraphHeader = ({ selectedMachine, handleMachineChange, timezone, - currency + currency, }) => { const [logarithmic, setLogarithmic] = useState() @@ -35,7 +35,7 @@ const OverTimeDotGraphHeader = ({ d="M 5 6 l 20 0" /> - ) + ), } return ( diff --git a/packages/admin-ui/src/pages/Analytics/components/wrappers/TopMachinesWrapper.jsx b/packages/admin-ui/src/pages/Analytics/components/wrappers/TopMachinesWrapper.jsx index ab0f9c52..88f426e8 100644 --- a/packages/admin-ui/src/pages/Analytics/components/wrappers/TopMachinesWrapper.jsx +++ b/packages/admin-ui/src/pages/Analytics/components/wrappers/TopMachinesWrapper.jsx @@ -8,7 +8,7 @@ import classes from './wrappers.module.css' const options = [ { code: 'topMachinesTransactions', display: 'Transactions' }, - { code: 'topMachinesVolume', display: 'Volume' } + { code: 'topMachinesVolume', display: 'Volume' }, ] const TopMachinesBarGraphHeader = ({ @@ -18,13 +18,13 @@ const TopMachinesBarGraphHeader = ({ machines, selectedMachine, timezone, - currency + currency, }) => { const [graphType /*, setGraphType */] = useState(options[0].code) const legend = { cashIn:
, - cashOut:
+ cashOut:
, } return ( diff --git a/packages/admin-ui/src/pages/Analytics/components/wrappers/VolumeOverTimeWrapper.jsx b/packages/admin-ui/src/pages/Analytics/components/wrappers/VolumeOverTimeWrapper.jsx index 60347b55..04540569 100644 --- a/packages/admin-ui/src/pages/Analytics/components/wrappers/VolumeOverTimeWrapper.jsx +++ b/packages/admin-ui/src/pages/Analytics/components/wrappers/VolumeOverTimeWrapper.jsx @@ -18,7 +18,7 @@ const VolumeOverTimeGraphHeader = ({ selectedMachine, handleMachineChange, timezone, - currency + currency, }) => { const [logarithmic, setLogarithmic] = useState() @@ -42,7 +42,7 @@ const VolumeOverTimeGraphHeader = ({ strokeLinecap="round" /> - ) + ), } return ( diff --git a/packages/admin-ui/src/pages/Analytics/components/wrappers/wrappers.module.css b/packages/admin-ui/src/pages/Analytics/components/wrappers/wrappers.module.css index c32bd59c..7cd53193 100644 --- a/packages/admin-ui/src/pages/Analytics/components/wrappers/wrappers.module.css +++ b/packages/admin-ui/src/pages/Analytics/components/wrappers/wrappers.module.css @@ -12,7 +12,7 @@ .graphHeaderRight { margin-top: 15px; display: flex; - gap: 30px + gap: 30px; } .cashInIcon { @@ -45,12 +45,12 @@ .graphHeaderSwitchBox { display: flex; flex-direction: column; -/*'& > *': {*/ -/* margin: 0*/ -/*},*/ -/*'& > :first-child': {*/ -/* marginBottom: 2,*/ -/* extend: label1,*/ -/* color: offColor*/ -/*}*/ + /*'& > *': {*/ + /* margin: 0*/ + /*},*/ + /*'& > :first-child': {*/ + /* marginBottom: 2,*/ + /* extend: label1,*/ + /* color: offColor*/ + /*}*/ } diff --git a/packages/admin-ui/src/pages/Analytics/graphs/Graph.jsx b/packages/admin-ui/src/pages/Analytics/graphs/Graph.jsx index 18ac8fdf..d6c85f3e 100644 --- a/packages/admin-ui/src/pages/Analytics/graphs/Graph.jsx +++ b/packages/admin-ui/src/pages/Analytics/graphs/Graph.jsx @@ -17,7 +17,7 @@ const GraphWrapper = ({ selectedMachine, machines, selectedDay, - log + log, }) => { const [selectionCoords, setSelectionCoords] = useState(null) const [selectionDateInterval, setSelectionDateInterval] = useState(null) diff --git a/packages/admin-ui/src/pages/Analytics/graphs/HourOfDayBarGraph.jsx b/packages/admin-ui/src/pages/Analytics/graphs/HourOfDayBarGraph.jsx index 702bbe66..ae5bac5c 100644 --- a/packages/admin-ui/src/pages/Analytics/graphs/HourOfDayBarGraph.jsx +++ b/packages/admin-ui/src/pages/Analytics/graphs/HourOfDayBarGraph.jsx @@ -11,7 +11,7 @@ import { subheaderDarkColor, fontColor, fontSecondary, - subheaderColor + subheaderColor, } from 'src/styling/variables' import { MINUTE } from 'src/utils/time' import { toUtc } from 'src/utils/timezones' @@ -22,7 +22,6 @@ const Graph = ({ setSelectionCoords, setSelectionData, setSelectionDateInterval, - selectedMachine }) => { const ref = useRef(null) @@ -36,9 +35,9 @@ const Graph = ({ top: 25, right: 0.5, bottom: 27, - left: 36.5 + left: 36.5, }), - [] + [], ) const offset = getTimezoneOffset(timezone) @@ -64,7 +63,7 @@ const Graph = ({ const tzCreated = new Date(it.created).setTime( new Date(it.created).getTime() + new Date(it.created).getTimezoneOffset() * MINUTE + - offset + offset, ) const created = new Date(tzCreated) @@ -77,7 +76,7 @@ const Graph = ({ created.getUTCHours() < new Date(upperBound).getUTCHours()) ) }, data), - [data, offset] + [data, offset], ) const txClassByHourInterval = useCallback( @@ -91,16 +90,16 @@ const Graph = ({ return acc }, { cashIn: 0, cashOut: 0 }, - filterByHourInterval(lowerBound, upperBound) + filterByHourInterval(lowerBound, upperBound), ), - [filterByHourInterval] + [filterByHourInterval], ) const x = d3 .scaleUtc() .domain([ toUtc(startOfDay(new Date())), - toUtc(add({ days: 1 }, startOfDay(new Date()))) + toUtc(add({ days: 1 }, startOfDay(new Date()))), ]) .rangeRound([GRAPH_MARGIN.left, GRAPH_WIDTH - GRAPH_MARGIN.right]) @@ -111,7 +110,7 @@ const Graph = ({ const upperBound = R.clone(it) return [lowerBound, filterByHourInterval(lowerBound, upperBound)] }, - R.init(getTickIntervals(x.domain(), 2)) + R.init(getTickIntervals(x.domain(), 2)), ) const groupedByTxClass = R.map( @@ -121,7 +120,7 @@ const Graph = ({ const upperBound = R.clone(it) return [lowerBound, txClassByHourInterval(lowerBound, upperBound)] }, - R.init(getTickIntervals(x.domain(), 2)) + R.init(getTickIntervals(x.domain(), 2)), ) const y = d3 @@ -130,13 +129,13 @@ const Graph = ({ 0, d3.max( groupedByTxClass.map(it => it[1]), - d => d.cashIn + d.cashOut + d => d.cashIn + d.cashOut, ) !== 0 ? d3.max( groupedByTxClass.map(it => it[1]), - d => d.cashIn + d.cashOut + d => d.cashIn + d.cashOut, ) - : 50 + : 50, ]) .range([GRAPH_HEIGHT - GRAPH_MARGIN.bottom, GRAPH_MARGIN.top]) @@ -145,15 +144,15 @@ const Graph = ({ g .attr( 'transform', - `translate(0, ${GRAPH_HEIGHT - GRAPH_MARGIN.bottom})` + `translate(0, ${GRAPH_HEIGHT - GRAPH_MARGIN.bottom})`, ) .call( d3 .axisBottom(x) .ticks(d3.timeHour.every(2)) - .tickFormat(d3.timeFormat('%H:%M')) + .tickFormat(d3.timeFormat('%H:%M')), ), - [GRAPH_MARGIN, x] + [GRAPH_MARGIN, x], ) const buildYAxis = useCallback( @@ -165,10 +164,10 @@ const Graph = ({ .axisLeft(y) .ticks(GRAPH_HEIGHT / 100) .tickSize(0) - .tickFormat(``) + .tickFormat(``), ) .call(g => g.select('.domain').remove()), - [GRAPH_MARGIN, y] + [GRAPH_MARGIN, y], ) const buildVerticalLines = useCallback( @@ -195,7 +194,7 @@ const Graph = ({ }) .attr('y1', GRAPH_MARGIN.top) .attr('y2', GRAPH_HEIGHT - GRAPH_MARGIN.bottom), - [GRAPH_MARGIN, x] + [GRAPH_MARGIN, x], ) const buildHoverableEventRects = useCallback( @@ -227,15 +226,15 @@ const Graph = ({ const endDate = R.clone(date) const filteredData = groupedByDateInterval.find(it => - R.equals(startDate, it[0]) + R.equals(startDate, it[0]), )[1] const rectXCoords = { left: R.clone(d.target.getBoundingClientRect().x), right: R.clone( d.target.getBoundingClientRect().x + - d.target.getBoundingClientRect().width - ) + d.target.getBoundingClientRect().width, + ), } const xCoord = @@ -248,18 +247,18 @@ const Graph = ({ setSelectionData(filteredData) setSelectionCoords({ x: Math.round(xCoord), - y: Math.round(yCoord) + y: Math.round(yCoord), }) d3.select(`#event-rect-${x(d.target.__data__)}`).attr( 'fill', - subheaderColor + subheaderColor, ) }) .on('mouseleave', d => { d3.select(`#event-rect-${x(d.target.__data__)}`).attr( 'fill', - 'transparent' + 'transparent', ) setSelectionDateInterval(null) setSelectionData(null) @@ -271,8 +270,8 @@ const Graph = ({ setSelectionCoords, setSelectionData, setSelectionDateInterval, - x - ] + x, + ], ) const buildEventRects = useCallback( @@ -298,7 +297,7 @@ const Graph = ({ .attr('height', GRAPH_HEIGHT - GRAPH_MARGIN.bottom - GRAPH_MARGIN.top) .attr('stroke', 'transparent') .attr('fill', 'transparent'), - [GRAPH_MARGIN, x] + [GRAPH_MARGIN, x], ) const formatTicksText = useCallback( @@ -309,7 +308,7 @@ const Graph = ({ .style('fill', fontColor) .style('stroke-width', 0.5) .style('font-family', fontSecondary), - [] + [], ) const drawCashIn = useCallback( @@ -334,7 +333,7 @@ const Graph = ({ GRAPH_HEIGHT - y(interval[1].cashIn) - GRAPH_MARGIN.bottom - - BAR_MARGIN / 2 + BAR_MARGIN / 2, ) }) .attr('width', d => { @@ -348,7 +347,7 @@ const Graph = ({ }) .attr('rx', 2.5) }, - [x, y, GRAPH_MARGIN, groupedByTxClass] + [x, y, GRAPH_MARGIN, groupedByTxClass], ) const drawCashOut = useCallback( @@ -377,7 +376,7 @@ const Graph = ({ GRAPH_HEIGHT - y(interval[1].cashOut) - GRAPH_MARGIN.bottom - - BAR_MARGIN / 2 + BAR_MARGIN / 2, ) }) .attr('width', d => { @@ -391,7 +390,7 @@ const Graph = ({ }) .attr('rx', 2.5) }, - [x, y, GRAPH_MARGIN, groupedByTxClass] + [x, y, GRAPH_MARGIN, groupedByTxClass], ) const drawChart = useCallback(() => { @@ -417,7 +416,7 @@ const Graph = ({ buildVerticalLines, drawCashIn, formatTicksText, - drawCashOut + drawCashOut, ]) useEffect(() => { @@ -433,5 +432,5 @@ export default memo( (prev, next) => R.equals(prev.period, next.period) && R.equals(prev.selectedDay, next.selectedDay) && - R.equals(prev.selectedMachine, next.selectedMachine) + R.equals(prev.selectedMachine, next.selectedMachine), ) diff --git a/packages/admin-ui/src/pages/Analytics/graphs/OverTimeDotGraph.jsx b/packages/admin-ui/src/pages/Analytics/graphs/OverTimeDotGraph.jsx index 12971143..7fc2cf85 100644 --- a/packages/admin-ui/src/pages/Analytics/graphs/OverTimeDotGraph.jsx +++ b/packages/admin-ui/src/pages/Analytics/graphs/OverTimeDotGraph.jsx @@ -13,7 +13,7 @@ import { fontColor, primaryColor, fontSecondary, - subheaderColor + subheaderColor, } from 'src/styling/variables' import { numberToFiatAmount } from 'src/utils/number' import { MINUTE, DAY, WEEK, MONTH } from 'src/utils/time' @@ -25,7 +25,7 @@ const Graph = ({ setSelectionCoords, setSelectionData, setSelectionDateInterval, - log = false + log = false, }) => { const ref = useRef(null) @@ -38,9 +38,9 @@ const Graph = ({ top: 25, right: 3.5, bottom: 27, - left: 38 + left: 38, }), - [] + [], ) const offset = getTimezoneOffset(timezone) @@ -50,7 +50,7 @@ const Graph = ({ day: [NOW - DAY, NOW], threeDays: [NOW - 3 * DAY, NOW], week: [NOW - WEEK, NOW], - month: [NOW - MONTH, NOW] + month: [NOW - MONTH, NOW], } const dataPoints = useMemo( @@ -59,28 +59,28 @@ const Graph = ({ freq: 24, step: 60 * 60 * 1000, tick: d3.utcHour.every(1), - labelFormat: '%H:%M' + labelFormat: '%H:%M', }, threeDays: { freq: 12, step: 6 * 60 * 60 * 1000, tick: d3.utcDay.every(1), - labelFormat: '%a %d' + labelFormat: '%a %d', }, week: { freq: 7, step: 24 * 60 * 60 * 1000, tick: d3.utcDay.every(1), - labelFormat: '%a %d' + labelFormat: '%a %d', }, month: { freq: 30, step: 24 * 60 * 60 * 1000, tick: d3.utcDay.every(1), - labelFormat: '%d' - } + labelFormat: '%d', + }, }), - [] + [], ) const getPastAndCurrentDayLabels = useCallback(d => { @@ -97,11 +97,11 @@ const Graph = ({ const previousDateMonth = previousDate.getUTCMonth() const daysOfWeek = Array.from(Array(7)).map((_, i) => - format('EEE', add({ days: i }, startOfWeek(new Date()))) + format('EEE', add({ days: i }, startOfWeek(new Date()))), ) const months = Array.from(Array(12)).map((_, i) => - format('LLL', add({ months: i }, startOfYear(new Date()))) + format('LLL', add({ months: i }, startOfYear(new Date()))), ) return { @@ -112,7 +112,7 @@ const Graph = ({ current: currentDateMonth !== previousDateMonth ? months[currentDateMonth] - : `${daysOfWeek[currentDateWeekday]} ${currentDateDay}` + : `${daysOfWeek[currentDateWeekday]} ${currentDateDay}`, } }, []) @@ -134,7 +134,7 @@ const Graph = ({ return points }, - [NOW, dataPoints, period.code] + [NOW, dataPoints, period.code], ) const buildAreas = useCallback( @@ -159,7 +159,7 @@ const Graph = ({ return points }, - [NOW, dataPoints, period.code] + [NOW, dataPoints, period.code], ) const x = d3 @@ -177,7 +177,7 @@ const Graph = ({ .scaleLinear() .domain([ 0, - (d3.max(data, d => new BigNumber(d.fiat).toNumber()) ?? 1000) * 1.03 + (d3.max(data, d => new BigNumber(d.fiat).toNumber()) ?? 1000) * 1.03, ]) .nice() .range([GRAPH_HEIGHT - GRAPH_MARGIN.bottom, GRAPH_MARGIN.top]) @@ -186,7 +186,7 @@ const Graph = ({ .scaleLog() .domain([ (d3.min(data, d => new BigNumber(d.fiat).toNumber()) ?? 1) * 0.9, - (d3.max(data, d => new BigNumber(d.fiat).toNumber()) ?? 1000) * 1.1 + (d3.max(data, d => new BigNumber(d.fiat).toNumber()) ?? 1000) * 1.1, ]) .range([GRAPH_HEIGHT - GRAPH_MARGIN.bottom, GRAPH_MARGIN.top]) @@ -196,7 +196,7 @@ const Graph = ({ const fullBreakpoints = [ graphLimits[1], ...R.filter(it => it > dataLimits[0] && it < dataLimits[1], breakpoints), - dataLimits[0] + dataLimits[0], ] const intervals = [] @@ -227,7 +227,7 @@ const Graph = ({ g .attr( 'transform', - `translate(0, ${GRAPH_HEIGHT - GRAPH_MARGIN.bottom})` + `translate(0, ${GRAPH_HEIGHT - GRAPH_MARGIN.bottom})`, ) .call( d3 @@ -235,18 +235,18 @@ const Graph = ({ .ticks(dataPoints[period.code].tick) .tickFormat(d => { return d3.timeFormat(dataPoints[period.code].labelFormat)( - d.getTime() + d.getTimezoneOffset() * MINUTE + d.getTime() + d.getTimezoneOffset() * MINUTE, ) }) - .tickSizeOuter(0) + .tickSizeOuter(0), ) .call(g => g .select('.domain') .attr('stroke', primaryColor) - .attr('stroke-width', 1) + .attr('stroke-width', 1), ), - [GRAPH_MARGIN, dataPoints, period.code, x] + [GRAPH_MARGIN, dataPoints, period.code, x], ) const buildYAxis = useCallback( @@ -264,12 +264,12 @@ const Graph = ({ if (d >= 1000) return numberToFiatAmount(d / 1000) + 'k' return numberToFiatAmount(d) - }) + }), ) .select('.domain') .attr('stroke', primaryColor) .attr('stroke-width', 1), - [GRAPH_MARGIN, y, log] + [GRAPH_MARGIN, y, log], ) const buildGrid = useCallback( @@ -286,7 +286,7 @@ const Graph = ({ .attr('x1', d => 0.5 + x(d)) .attr('x2', d => 0.5 + x(d)) .attr('y1', GRAPH_MARGIN.top) - .attr('y2', GRAPH_HEIGHT - GRAPH_MARGIN.bottom) + .attr('y2', GRAPH_HEIGHT - GRAPH_MARGIN.bottom), ) // Horizontal lines .call(g => @@ -297,13 +297,13 @@ const Graph = ({ d3 .axisLeft(y) .scale() - .ticks(GRAPH_HEIGHT / 100) + .ticks(GRAPH_HEIGHT / 100), ) .join('line') .attr('y1', d => 0.5 + y(d)) .attr('y2', d => 0.5 + y(d)) .attr('x1', GRAPH_MARGIN.left) - .attr('x2', GRAPH_WIDTH) + .attr('x2', GRAPH_WIDTH), ) // Vertical transparent rectangles for events .call(g => @@ -319,14 +319,14 @@ const Graph = ({ const intervals = getAreaInterval( buildAreas(x.domain()).map(it => Math.round(x(it) * 100) / 100), x.range(), - x2.range() + x2.range(), ) const interval = getAreaIntervalByX(intervals, xValue) return Math.round((interval[0] - interval[1]) * 100) / 100 }) .attr( 'height', - GRAPH_HEIGHT - GRAPH_MARGIN.bottom - GRAPH_MARGIN.top + GRAPH_HEIGHT - GRAPH_MARGIN.bottom - GRAPH_MARGIN.top, ) .attr('stroke', 'transparent') .attr('fill', 'transparent') @@ -336,7 +336,7 @@ const Graph = ({ const intervals = getAreaInterval( buildAreas(x.domain()).map(it => Math.round(x(it) * 100) / 100), x.range(), - x2.range() + x2.range(), ) const dateInterval = getDateIntervalByX(areas, intervals, xValue) @@ -354,8 +354,8 @@ const Graph = ({ left: R.clone(d.target.getBoundingClientRect().x), right: R.clone( d.target.getBoundingClientRect().x + - d.target.getBoundingClientRect().width - ) + d.target.getBoundingClientRect().width, + ), } const xCoord = @@ -370,7 +370,7 @@ const Graph = ({ setSelectionData(filteredData) setSelectionCoords({ x: Math.round(xCoord), - y: Math.round(yCoord) + y: Math.round(yCoord), }) d3.select(d.target).attr('fill', subheaderColor) @@ -380,7 +380,7 @@ const Graph = ({ setSelectionDateInterval(null) setSelectionData(null) setSelectionCoords(null) - }) + }), ) // Thick vertical lines .call(g => @@ -391,7 +391,7 @@ const Graph = ({ buildTicks(x.domain()).filter(x => { if (period.code === 'day') return x.getUTCHours() === 0 return x.getUTCDate() === 1 - }) + }), ) .join('line') .attr('class', 'dateSeparator') @@ -400,7 +400,7 @@ const Graph = ({ .attr('y1', GRAPH_MARGIN.top - 50) .attr('y2', GRAPH_HEIGHT - GRAPH_MARGIN.bottom) .attr('stroke-width', 5) - .join('text') + .join('text'), ) // Left side breakpoint label .call(g => { @@ -458,8 +458,8 @@ const Graph = ({ offset, setSelectionCoords, setSelectionData, - setSelectionDateInterval - ] + setSelectionDateInterval, + ], ) const formatTicksText = useCallback( @@ -470,7 +470,7 @@ const Graph = ({ .style('fill', fontColor) .style('stroke-width', 0.5) .style('font-family', fontSecondary), - [] + [], ) const formatText = useCallback( @@ -481,7 +481,7 @@ const Graph = ({ .style('fill', offColor) .style('stroke-width', 0.5) .style('font-family', fontSecondary), - [] + [], ) const formatTicks = useCallback(() => { @@ -505,10 +505,10 @@ const Graph = ({ .attr('y1', 0.5 + y(median)) .attr('y2', 0.5 + y(median)) .attr('x1', GRAPH_MARGIN.left) - .attr('x2', GRAPH_WIDTH) + .attr('x2', GRAPH_WIDTH), ) }, - [GRAPH_MARGIN, y, data, log] + [GRAPH_MARGIN, y, data, log], ) const drawData = useCallback( @@ -524,7 +524,7 @@ const Graph = ({ .attr('fill', d => (d.txClass === 'cashIn' ? java : neon)) .attr('r', 3.5) }, - [data, offset, x, y] + [data, offset, x, y], ) const drawChart = useCallback(() => { @@ -550,7 +550,7 @@ const Graph = ({ drawData, formatText, formatTicks, - formatTicksText + formatTicksText, ]) useEffect(() => { @@ -566,5 +566,5 @@ export default memo( (prev, next) => R.equals(prev.period, next.period) && R.equals(prev.selectedMachine, next.selectedMachine) && - R.equals(prev.log, next.log) + R.equals(prev.log, next.log), ) diff --git a/packages/admin-ui/src/pages/Analytics/graphs/OverTimeLineGraph.jsx b/packages/admin-ui/src/pages/Analytics/graphs/OverTimeLineGraph.jsx index 68074bcb..f945e261 100644 --- a/packages/admin-ui/src/pages/Analytics/graphs/OverTimeLineGraph.jsx +++ b/packages/admin-ui/src/pages/Analytics/graphs/OverTimeLineGraph.jsx @@ -8,7 +8,7 @@ import { differenceInMilliseconds, format, startOfWeek, - startOfYear + startOfYear, } from 'date-fns/fp' import * as R from 'ramda' import React, { memo, useCallback, useEffect, useMemo, useRef } from 'react' @@ -21,7 +21,7 @@ import { fontColor, primaryColor, fontSecondary, - subheaderColor + subheaderColor, } from 'src/styling/variables' import { numberToFiatAmount } from 'src/utils/number' import { MINUTE, DAY, WEEK, MONTH } from 'src/utils/time' @@ -33,7 +33,7 @@ const Graph = ({ setSelectionCoords, setSelectionData, setSelectionDateInterval, - log = false + log = false, }) => { const ref = useRef(null) @@ -46,9 +46,9 @@ const Graph = ({ top: 25, right: 3.5, bottom: 27, - left: 38 + left: 38, }), - [] + [], ) const offset = getTimezoneOffset(timezone) @@ -58,7 +58,7 @@ const Graph = ({ day: [NOW - DAY, NOW], threeDays: [NOW - 3 * DAY, NOW], week: [NOW - WEEK, NOW], - month: [NOW - MONTH, NOW] + month: [NOW - MONTH, NOW], } const dataPoints = useMemo( @@ -67,28 +67,28 @@ const Graph = ({ freq: 24, step: 60 * 60 * 1000, tick: d3.utcHour.every(1), - labelFormat: '%H:%M' + labelFormat: '%H:%M', }, threeDays: { freq: 12, step: 6 * 60 * 60 * 1000, tick: d3.utcDay.every(1), - labelFormat: '%a %d' + labelFormat: '%a %d', }, week: { freq: 7, step: 24 * 60 * 60 * 1000, tick: d3.utcDay.every(1), - labelFormat: '%a %d' + labelFormat: '%a %d', }, month: { freq: 30, step: 24 * 60 * 60 * 1000, tick: d3.utcDay.every(1), - labelFormat: '%d' - } + labelFormat: '%d', + }, }), - [] + [], ) const getPastAndCurrentDayLabels = useCallback(d => { @@ -105,11 +105,11 @@ const Graph = ({ const previousDateMonth = previousDate.getUTCMonth() const daysOfWeek = Array.from(Array(7)).map((_, i) => - format('EEE', add({ days: i }, startOfWeek(new Date()))) + format('EEE', add({ days: i }, startOfWeek(new Date()))), ) const months = Array.from(Array(12)).map((_, i) => - format('LLL', add({ months: i }, startOfYear(new Date()))) + format('LLL', add({ months: i }, startOfYear(new Date()))), ) return { @@ -120,7 +120,7 @@ const Graph = ({ current: currentDateMonth !== previousDateMonth ? months[currentDateMonth] - : `${daysOfWeek[currentDateWeekday]} ${currentDateDay}` + : `${daysOfWeek[currentDateWeekday]} ${currentDateDay}`, } }, []) @@ -142,7 +142,7 @@ const Graph = ({ return points }, - [NOW, dataPoints, period.code] + [NOW, dataPoints, period.code], ) const buildAreas = useCallback( @@ -167,7 +167,7 @@ const Graph = ({ return points }, - [NOW, dataPoints, period.code] + [NOW, dataPoints, period.code], ) const x = d3 @@ -192,14 +192,14 @@ const Graph = ({ else if (i === dates.length - 1) return addMilliseconds( -dataPoints[period.code].step, - dates[dates.length - 2] + dates[dates.length - 2], ) else return date }) .map(date => { const middleOfBin = addMilliseconds( dataPoints[period.code].step / 2, - date + date, ) const txs = data.filter(tx => { @@ -236,7 +236,7 @@ const Graph = ({ .scaleLog() .domain([ min === 0 ? 0.9 : min * 0.9, - (max === min ? min + Math.pow(10, 2 * min + 1) : max) * 2 + (max === min ? min + Math.pow(10, 2 * min + 1) : max) * 2, ]) .clamp(true) .range([GRAPH_HEIGHT - GRAPH_MARGIN.bottom, GRAPH_MARGIN.top]) @@ -247,7 +247,7 @@ const Graph = ({ const fullBreakpoints = [ graphLimits[1], ...R.filter(it => it > dataLimits[0] && it < dataLimits[1], breakpoints), - dataLimits[0] + dataLimits[0], ] const intervals = [] @@ -278,7 +278,7 @@ const Graph = ({ g .attr( 'transform', - `translate(0, ${GRAPH_HEIGHT - GRAPH_MARGIN.bottom})` + `translate(0, ${GRAPH_HEIGHT - GRAPH_MARGIN.bottom})`, ) .call( d3 @@ -286,18 +286,18 @@ const Graph = ({ .ticks(dataPoints[period.code].tick) .tickFormat(d => { return d3.timeFormat(dataPoints[period.code].labelFormat)( - d.getTime() + d.getTimezoneOffset() * MINUTE + d.getTime() + d.getTimezoneOffset() * MINUTE, ) }) - .tickSizeOuter(0) + .tickSizeOuter(0), ) .call(g => g .select('.domain') .attr('stroke', primaryColor) - .attr('stroke-width', 1) + .attr('stroke-width', 1), ), - [GRAPH_MARGIN, dataPoints, period.code, x] + [GRAPH_MARGIN, dataPoints, period.code, x], ) const buildYAxis = useCallback( @@ -315,12 +315,12 @@ const Graph = ({ if (d >= 1000) return numberToFiatAmount(d / 1000) + 'k' return numberToFiatAmount(d) - }) + }), ) .select('.domain') .attr('stroke', primaryColor) .attr('stroke-width', 1), - [GRAPH_MARGIN, y, log] + [GRAPH_MARGIN, y, log], ) const buildGrid = useCallback( @@ -337,7 +337,7 @@ const Graph = ({ .attr('x1', d => 0.5 + x(d)) .attr('x2', d => 0.5 + x(d)) .attr('y1', GRAPH_MARGIN.top) - .attr('y2', GRAPH_HEIGHT - GRAPH_MARGIN.bottom) + .attr('y2', GRAPH_HEIGHT - GRAPH_MARGIN.bottom), ) // Horizontal lines .call(g => @@ -348,13 +348,13 @@ const Graph = ({ d3 .axisLeft(y) .scale() - .ticks(GRAPH_HEIGHT / 100) + .ticks(GRAPH_HEIGHT / 100), ) .join('line') .attr('y1', d => 0.5 + y(d)) .attr('y2', d => 0.5 + y(d)) .attr('x1', GRAPH_MARGIN.left) - .attr('x2', GRAPH_WIDTH) + .attr('x2', GRAPH_WIDTH), ) // Vertical transparent rectangles for events .call(g => @@ -370,14 +370,14 @@ const Graph = ({ const intervals = getAreaInterval( buildAreas(x.domain()).map(it => Math.round(x(it) * 100) / 100), x.range(), - x2.range() + x2.range(), ) const interval = getAreaIntervalByX(intervals, xValue) return Math.round((interval[0] - interval[1]) * 100) / 100 }) .attr( 'height', - GRAPH_HEIGHT - GRAPH_MARGIN.bottom - GRAPH_MARGIN.top + GRAPH_HEIGHT - GRAPH_MARGIN.bottom - GRAPH_MARGIN.top, ) .attr('stroke', 'transparent') .attr('fill', 'transparent') @@ -387,7 +387,7 @@ const Graph = ({ const intervals = getAreaInterval( buildAreas(x.domain()).map(it => Math.round(x(it) * 100) / 100), x.range(), - x2.range() + x2.range(), ) const dateInterval = getDateIntervalByX(areas, intervals, xValue) @@ -405,8 +405,8 @@ const Graph = ({ left: R.clone(d.target.getBoundingClientRect().x), right: R.clone( d.target.getBoundingClientRect().x + - d.target.getBoundingClientRect().width - ) + d.target.getBoundingClientRect().width, + ), } const xCoord = @@ -421,7 +421,7 @@ const Graph = ({ setSelectionData(filteredData) setSelectionCoords({ x: Math.round(xCoord), - y: Math.round(yCoord) + y: Math.round(yCoord), }) d3.select(d.target).attr('fill', subheaderColor) @@ -431,7 +431,7 @@ const Graph = ({ setSelectionDateInterval(null) setSelectionData(null) setSelectionCoords(null) - }) + }), ) // Thick vertical lines .call(g => @@ -442,7 +442,7 @@ const Graph = ({ buildTicks(x.domain()).filter(x => { if (period.code === 'day') return x.getUTCHours() === 0 return x.getUTCDate() === 1 - }) + }), ) .join('line') .attr('class', 'dateSeparator') @@ -451,7 +451,7 @@ const Graph = ({ .attr('y1', GRAPH_MARGIN.top - 50) .attr('y2', GRAPH_HEIGHT - GRAPH_MARGIN.bottom) .attr('stroke-width', 5) - .join('text') + .join('text'), ) // Left side breakpoint label .call(g => { @@ -509,8 +509,8 @@ const Graph = ({ offset, setSelectionCoords, setSelectionData, - setSelectionDateInterval - ] + setSelectionDateInterval, + ], ) const formatTicksText = useCallback( @@ -521,7 +521,7 @@ const Graph = ({ .style('fill', fontColor) .style('stroke-width', 0.5) .style('font-family', fontSecondary), - [] + [], ) const formatText = useCallback( @@ -532,7 +532,7 @@ const Graph = ({ .style('fill', offColor) .style('stroke-width', 0.5) .style('font-family', fontSecondary), - [] + [], ) const formatTicks = useCallback(() => { @@ -574,7 +574,7 @@ const Graph = ({ .line() .curve(d3.curveMonotoneX) .x(d => x(d.date)) - .y(d => y(d.cashIn)) + .y(d => y(d.cashIn)), ) g.append('g') @@ -599,10 +599,10 @@ const Graph = ({ .line() .curve(d3.curveMonotoneX) .x(d => x(d.date)) - .y(d => y(d.cashOut)) + .y(d => y(d.cashOut)), ) }, - [x, y, bins, GRAPH_MARGIN] + [x, y, bins, GRAPH_MARGIN], ) const drawChart = useCallback(() => { @@ -626,7 +626,7 @@ const Graph = ({ drawData, formatText, formatTicks, - formatTicksText + formatTicksText, ]) useEffect(() => { @@ -642,5 +642,5 @@ export default memo( (prev, next) => R.equals(prev.period, next.period) && R.equals(prev.selectedMachine, next.selectedMachine) && - R.equals(prev.log, next.log) + R.equals(prev.log, next.log), ) diff --git a/packages/admin-ui/src/pages/Analytics/graphs/TopMachinesBarGraph.jsx b/packages/admin-ui/src/pages/Analytics/graphs/TopMachinesBarGraph.jsx index 1152a111..ef8ef505 100644 --- a/packages/admin-ui/src/pages/Analytics/graphs/TopMachinesBarGraph.jsx +++ b/packages/admin-ui/src/pages/Analytics/graphs/TopMachinesBarGraph.jsx @@ -8,10 +8,10 @@ import { neon, subheaderDarkColor, fontColor, - fontSecondary + fontSecondary, } from 'src/styling/variables' -const Graph = ({ data, machines, currency, selectedMachine }) => { +const Graph = ({ data, machines, currency }) => { const ref = useRef(null) const AMOUNT_OF_MACHINES = 5 @@ -24,9 +24,9 @@ const Graph = ({ data, machines, currency, selectedMachine }) => { top: 25, right: 0.5, bottom: 27, - left: 36.5 + left: 36.5, }), - [] + [], ) const machinesClone = R.clone(machines) @@ -41,7 +41,7 @@ const Graph = ({ data, machines, currency, selectedMachine }) => { if (!R.isNil(machinesClone[it])) return machinesClone[it] return { code: `ghostMachine${it}`, display: `` } }, - R.times(R.identity, AMOUNT_OF_MACHINES) + R.times(R.identity, AMOUNT_OF_MACHINES), ) const txByDevice = R.reduce( @@ -50,14 +50,14 @@ const Graph = ({ data, machines, currency, selectedMachine }) => { return acc }, {}, - filledMachines + filledMachines, ) const getDeviceVolume = deviceId => R.reduce( (acc, value) => acc + BigNumber(value.fiat).toNumber(), 0, - txByDevice[deviceId] + txByDevice[deviceId], ) const getDeviceVolumeByTxClass = deviceId => @@ -70,18 +70,18 @@ const Graph = ({ data, machines, currency, selectedMachine }) => { return acc }, { cashIn: 0, cashOut: 0 }, - txByDevice[deviceId] + txByDevice[deviceId], ) const devicesByVolume = R.sort( (a, b) => b[1] - a[1], - R.map(m => [m.code, getDeviceVolume(m.code)], filledMachines) + R.map(m => [m.code, getDeviceVolume(m.code)], filledMachines), ) const topMachines = R.take(AMOUNT_OF_MACHINES, devicesByVolume) const txClassVolumeByDevice = R.fromPairs( - R.map(v => [v[0], getDeviceVolumeByTxClass(v[0])], topMachines) + R.map(v => [v[0], getDeviceVolumeByTxClass(v[0])], topMachines), ) const x = d3 @@ -94,7 +94,9 @@ const Graph = ({ data, machines, currency, selectedMachine }) => { .scaleLinear() .domain([ 0, - d3.max(topMachines, d => d[1]) !== 0 ? d3.max(topMachines, d => d[1]) : 50 + d3.max(topMachines, d => d[1]) !== 0 + ? d3.max(topMachines, d => d[1]) + : 50, ]) .range([GRAPH_HEIGHT - GRAPH_MARGIN.bottom, GRAPH_MARGIN.top]) @@ -104,7 +106,7 @@ const Graph = ({ data, machines, currency, selectedMachine }) => { .attr('class', 'x-axis-1') .attr( 'transform', - `translate(0, ${GRAPH_HEIGHT - GRAPH_MARGIN.bottom})` + `translate(0, ${GRAPH_HEIGHT - GRAPH_MARGIN.bottom})`, ) .call( d3 @@ -113,12 +115,12 @@ const Graph = ({ data, machines, currency, selectedMachine }) => { d => `${ R.find(it => it.code === d[0], filledMachines).display ?? '' - }` + }`, ) .tickSize(0) - .tickPadding(10) + .tickPadding(10), ), - [GRAPH_MARGIN, x, filledMachines] + [GRAPH_MARGIN, x, filledMachines], ) const buildXAxis2 = useCallback( @@ -126,7 +128,7 @@ const Graph = ({ data, machines, currency, selectedMachine }) => { g.attr('class', 'x-axis-2') .attr( 'transform', - `translate(0, ${GRAPH_HEIGHT - GRAPH_MARGIN.bottom})` + `translate(0, ${GRAPH_HEIGHT - GRAPH_MARGIN.bottom})`, ) .call( d3 @@ -134,24 +136,24 @@ const Graph = ({ data, machines, currency, selectedMachine }) => { .tickFormat(d => R.includes(`ghostMachine`, d[0]) ? `` - : `${d[1].toFixed(2)} ${currency}` + : `${d[1].toFixed(2)} ${currency}`, ) .tickSize(0) - .tickPadding(10) + .tickPadding(10), ) }, - [GRAPH_MARGIN, x, currency] + [GRAPH_MARGIN, x, currency], ) const positionXAxisLabels = useCallback(() => { - d3.selectAll('.x-axis-1 .tick text').attr('transform', function (d) { + d3.selectAll('.x-axis-1 .tick text').attr('transform', function () { const widthPerEntry = (x.range()[1] - x.range()[0]) / AMOUNT_OF_MACHINES return `translate(${-widthPerEntry / 2.25 + this.getBBox().width / 2}, 0)` }) }, [x]) const positionXAxis2Labels = useCallback(() => { - d3.selectAll('.x-axis-2 .tick text').attr('transform', function (d) { + d3.selectAll('.x-axis-2 .tick text').attr('transform', function () { const widthPerEntry = (x.range()[1] - x.range()[0]) / AMOUNT_OF_MACHINES return `translate(${widthPerEntry / 2.25 - this.getBBox().width / 2}, 0)` }) @@ -166,10 +168,10 @@ const Graph = ({ data, machines, currency, selectedMachine }) => { .axisLeft(y) .ticks(GRAPH_HEIGHT / 100) .tickSize(0) - .tickFormat(``) + .tickFormat(``), ) .call(g => g.select('.domain').remove()), - [GRAPH_MARGIN, y] + [GRAPH_MARGIN, y], ) const formatTicksText = useCallback( @@ -180,7 +182,7 @@ const Graph = ({ data, machines, currency, selectedMachine }) => { .style('fill', fontColor) .style('stroke-width', 0.5) .style('font-family', fontSecondary), - [] + [], ) const buildGrid = useCallback( @@ -213,10 +215,10 @@ const Graph = ({ data, machines, currency, selectedMachine }) => { return 0.5 + x(d) - paddedXValue }) .attr('y1', GRAPH_MARGIN.top) - .attr('y2', GRAPH_HEIGHT - GRAPH_MARGIN.bottom) + .attr('y2', GRAPH_HEIGHT - GRAPH_MARGIN.bottom), ) }, - [GRAPH_MARGIN, x] + [GRAPH_MARGIN, x], ) const drawCashIn = useCallback( @@ -231,13 +233,13 @@ const Graph = ({ data, machines, currency, selectedMachine }) => { R.clamp( 0, GRAPH_HEIGHT, - GRAPH_HEIGHT - y(d[1].cashIn) - GRAPH_MARGIN.bottom - BAR_MARGIN - ) + GRAPH_HEIGHT - y(d[1].cashIn) - GRAPH_MARGIN.bottom - BAR_MARGIN, + ), ) .attr('width', x.bandwidth()) .attr('rx', 2.5) }, - [txClassVolumeByDevice, x, y, GRAPH_MARGIN] + [txClassVolumeByDevice, x, y, GRAPH_MARGIN], ) const drawCashOut = useCallback( @@ -252,7 +254,7 @@ const Graph = ({ data, machines, currency, selectedMachine }) => { d => y(d[1].cashIn + d[1].cashOut) - GRAPH_MARGIN.top + - GRAPH_MARGIN.bottom + GRAPH_MARGIN.bottom, ) .attr('height', d => { return R.clamp( @@ -261,13 +263,13 @@ const Graph = ({ data, machines, currency, selectedMachine }) => { GRAPH_HEIGHT - y(d[1].cashOut) - GRAPH_MARGIN.bottom - - BAR_MARGIN / 2 + BAR_MARGIN / 2, ) }) .attr('width', x.bandwidth()) .attr('rx', 2.5) }, - [txClassVolumeByDevice, x, y, GRAPH_MARGIN] + [txClassVolumeByDevice, x, y, GRAPH_MARGIN], ) const drawChart = useCallback(() => { @@ -295,7 +297,7 @@ const Graph = ({ data, machines, currency, selectedMachine }) => { formatTicksText, buildGrid, drawCashIn, - drawCashOut + drawCashOut, ]) useEffect(() => { @@ -310,5 +312,5 @@ export default memo( Graph, (prev, next) => R.equals(prev.period, next.period) && - R.equals(prev.selectedMachine, next.selectedMachine) + R.equals(prev.selectedMachine, next.selectedMachine), ) diff --git a/packages/admin-ui/src/pages/Authentication/Authentication.module.css b/packages/admin-ui/src/pages/Authentication/Authentication.module.css index 88648763..57fedb4e 100644 --- a/packages/admin-ui/src/pages/Authentication/Authentication.module.css +++ b/packages/admin-ui/src/pages/Authentication/Authentication.module.css @@ -1,5 +1,6 @@ .welcomeBackground { - background: var(--ghost) url(/wizard-background.svg) no-repeat fixed center center; + background: var(--ghost) url(/wizard-background.svg) no-repeat fixed center + center; background-size: cover; height: 100vh; width: 100vw; @@ -22,7 +23,7 @@ display: flex; flex-direction: row; align-items: center; - margin-bottom: 30px + margin-bottom: 30px; } .icon { @@ -70,4 +71,3 @@ .confirm2FAInput { margin-top: 25px; } - diff --git a/packages/admin-ui/src/pages/Authentication/Input2FAState.jsx b/packages/admin-ui/src/pages/Authentication/Input2FAState.jsx index b1326044..415d38f9 100644 --- a/packages/admin-ui/src/pages/Authentication/Input2FAState.jsx +++ b/packages/admin-ui/src/pages/Authentication/Input2FAState.jsx @@ -46,7 +46,7 @@ const Input2FAState = ({ state, dispatch }) => { onCompleted: ({ userData }) => { setUserData(userData) history.push('/') - } + }, }) const [input2FA, { error: mutationError }] = useMutation(INPUT_2FA, { @@ -55,15 +55,15 @@ const Input2FAState = ({ state, dispatch }) => { return getUserData() } return setInvalidToken(true) - } + }, }) const handle2FAChange = value => { dispatch({ type: STATES.INPUT_2FA, payload: { - twoFAField: value - } + twoFAField: value, + }, }) setInvalidToken(false) } @@ -79,8 +79,8 @@ const Input2FAState = ({ state, dispatch }) => { username: state.clientField, password: state.passwordField, code: state.twoFAField, - rememberMe: state.rememberMeField - } + rememberMe: state.rememberMeField, + }, } input2FA(options) diff --git a/packages/admin-ui/src/pages/Authentication/InputFIDOState.jsx b/packages/admin-ui/src/pages/Authentication/InputFIDOState.jsx index 3c8a1b70..7a3b24f3 100644 --- a/packages/admin-ui/src/pages/Authentication/InputFIDOState.jsx +++ b/packages/admin-ui/src/pages/Authentication/InputFIDOState.jsx @@ -24,12 +24,12 @@ const validationSchema = Yup.object().shape({ localClient: Yup.string() .required('Client field is required!') .email('Username field should be in an email format!'), - localRememberMe: Yup.boolean() + localRememberMe: Yup.boolean(), }) const initialValues = { localClient: '', - localRememberMe: false + localRememberMe: false, } const InputFIDOState = ({ state, strategy }) => { @@ -74,8 +74,8 @@ const InputFIDOState = ({ state, strategy }) => { { onCompleted: ({ validateAssertion: success }) => { success ? getUserData() : setInvalidToken(true) - } - } + }, + }, ) const [assertionOptions, { error: assertionQueryError }] = useLazyQuery( @@ -86,11 +86,11 @@ const InputFIDOState = ({ state, strategy }) => { ? { username: state.clientField, password: state.passwordField, - domain: window.location.hostname + domain: window.location.hostname, } : { username: localClientField, - domain: window.location.hostname + domain: window.location.hostname, }, onCompleted: ({ generateAssertionOptions: options }) => { startAssertion(options) @@ -102,31 +102,31 @@ const InputFIDOState = ({ state, strategy }) => { password: state.passwordField, rememberMe: state.rememberMeField, assertionResponse: res, - domain: window.location.hostname + domain: window.location.hostname, } : { username: localClientField, rememberMe: localRememberMeField, assertionResponse: res, - domain: window.location.hostname + domain: window.location.hostname, } validateAssertion({ - variables + variables, }) }) .catch(err => { console.error(err) setInvalidToken(true) }) - } - } + }, + }, ) const [getUserData, { error: queryError }] = useLazyQuery(GET_USER_DATA, { onCompleted: ({ userData }) => { setUserData(userData) history.push('/') - } + }, }) const getErrorMsg = (formikErrors, formikTouched) => { diff --git a/packages/admin-ui/src/pages/Authentication/LoginCard.jsx b/packages/admin-ui/src/pages/Authentication/LoginCard.jsx index d6617fdc..3661f1b0 100644 --- a/packages/admin-ui/src/pages/Authentication/LoginCard.jsx +++ b/packages/admin-ui/src/pages/Authentication/LoginCard.jsx @@ -1,6 +1,5 @@ import Paper from '@mui/material/Paper' import React, { useReducer } from 'react' -import { H5 } from 'src/components/typography' import Logo from 'src/styling/icons/menu/logo.svg?react' import Input2FAState from './Input2FAState' @@ -18,7 +17,7 @@ const initialState = { clientField: '', passwordField: '', rememberMeField: false, - loginState: STATES.LOGIN + loginState: STATES.LOGIN, } const reducer = (state, action) => { diff --git a/packages/admin-ui/src/pages/Authentication/LoginState.jsx b/packages/admin-ui/src/pages/Authentication/LoginState.jsx index ce8b4c72..af07216f 100644 --- a/packages/admin-ui/src/pages/Authentication/LoginState.jsx +++ b/packages/admin-ui/src/pages/Authentication/LoginState.jsx @@ -44,13 +44,13 @@ const GET_USER_DATA = gql` const validationSchema = Yup.object().shape({ email: Yup.string().label('Email').required().email(), password: Yup.string().required('Password field is required'), - rememberMe: Yup.boolean() + rememberMe: Yup.boolean(), }) const initialValues = { email: '', password: '', - rememberMe: false + rememberMe: false, } const getErrorMsg = (formikErrors, formikTouched, mutationError) => { @@ -62,7 +62,7 @@ const getErrorMsg = (formikErrors, formikTouched, mutationError) => { return null } -const LoginState = ({ state, dispatch, strategy }) => { +const LoginState = ({ dispatch, strategy }) => { const history = useHistory() const { setUserData } = useContext(AppContext) @@ -72,8 +72,8 @@ const LoginState = ({ state, dispatch, strategy }) => { const options = { variables: { username, - password - } + password, + }, } const { data: loginResponse } = await login(options) @@ -84,16 +84,16 @@ const LoginState = ({ state, dispatch, strategy }) => { payload: { clientField: username, passwordField: password, - rememberMeField: rememberMe - } + rememberMeField: rememberMe, + }, }) } const [validateAssertion, { error: FIDOMutationError }] = useMutation( VALIDATE_ASSERTION, { - onCompleted: ({ validateAssertion: success }) => success && getUserData() - } + onCompleted: ({ validateAssertion: success }) => success && getUserData(), + }, ) const [assertionOptions, { error: assertionQueryError }] = useLazyQuery( @@ -105,15 +105,15 @@ const LoginState = ({ state, dispatch, strategy }) => { validateAssertion({ variables: { assertionResponse: res, - domain: window.location.hostname - } + domain: window.location.hostname, + }, }) }) .catch(err => { console.error(err) }) - } - } + }, + }, ) const [getUserData, { error: userDataQueryError }] = useLazyQuery( @@ -122,8 +122,8 @@ const LoginState = ({ state, dispatch, strategy }) => { onCompleted: ({ userData }) => { setUserData(userData) history.push('/') - } - } + }, + }, ) return ( @@ -149,7 +149,7 @@ const LoginState = ({ state, dispatch, strategy }) => { loginMutationError || FIDOMutationError || assertionQueryError || - userDataQueryError + userDataQueryError, )} /> { loginMutationError || FIDOMutationError || assertionQueryError || - userDataQueryError + userDataQueryError, )} />
@@ -183,7 +183,7 @@ const LoginState = ({ state, dispatch, strategy }) => { loginMutationError || FIDOMutationError || assertionQueryError || - userDataQueryError + userDataQueryError, ) && (

{getErrorMsg( @@ -192,7 +192,7 @@ const LoginState = ({ state, dispatch, strategy }) => { loginMutationError || FIDOMutationError || assertionQueryError || - userDataQueryError + userDataQueryError, )}

)} @@ -202,11 +202,11 @@ const LoginState = ({ state, dispatch, strategy }) => { onClick={() => { return strategy === 'FIDOUsernameless' ? assertionOptions({ - variables: { domain: window.location.hostname } + variables: { domain: window.location.hostname }, }) : dispatch({ type: 'FIDO', - payload: {} + payload: {}, }) }} buttonClassName="w-full" diff --git a/packages/admin-ui/src/pages/Authentication/Register.jsx b/packages/admin-ui/src/pages/Authentication/Register.jsx index e7b71398..4a961e38 100644 --- a/packages/admin-ui/src/pages/Authentication/Register.jsx +++ b/packages/admin-ui/src/pages/Authentication/Register.jsx @@ -45,22 +45,22 @@ const validationSchema = Yup.object({ .required('A password is required') .min( PASSWORD_MIN_LENGTH, - `Your password must contain at least ${PASSWORD_MIN_LENGTH} characters` + `Your password must contain at least ${PASSWORD_MIN_LENGTH} characters`, ), confirmPassword: Yup.string() .required('Please confirm the password') - .oneOf([Yup.ref('password')], 'Passwords must match') + .oneOf([Yup.ref('password')], 'Passwords must match'), }) const initialValues = { password: '', - confirmPassword: '' + confirmPassword: '', } const initialState = { username: null, role: null, - result: '' + result: '', } const reducer = (state, action) => { @@ -72,7 +72,7 @@ const getErrorMsg = ( formikErrors, formikTouched, queryError, - mutationError + mutationError, ) => { if (!formikErrors || !formikTouched) return null if (queryError || mutationError) return 'Internal server error' @@ -94,32 +94,32 @@ const Register = () => { onCompleted: ({ validateRegisterLink: info }) => { if (!info) { return dispatch({ - type: 'failure' + type: 'failure', }) } dispatch({ type: 'success', payload: { username: info.username, - role: info.role - } + role: info.role, + }, }) }, onError: () => dispatch({ - type: 'failure' - }) + type: 'failure', + }), } const { error: queryError, loading } = useQuery( VALIDATE_REGISTER_LINK, - queryOptions + queryOptions, ) const [register, { error: mutationError }] = useMutation(REGISTER, { onCompleted: ({ register: success }) => { if (success) history.push('/wizard', { fromAuthRegister: true }) - } + }, }) return ( @@ -148,8 +148,8 @@ const Register = () => { token: token, username: state.username, password: values.password, - role: state.role - } + role: state.role, + }, }) }}> {({ errors, touched }) => ( @@ -175,14 +175,14 @@ const Register = () => { errors, touched, queryError, - mutationError + mutationError, ) && (

{getErrorMsg( errors, touched, queryError, - mutationError + mutationError, )}

)} diff --git a/packages/admin-ui/src/pages/Authentication/Reset2FA.jsx b/packages/admin-ui/src/pages/Authentication/Reset2FA.jsx index 3d93ce88..0a26d2b7 100644 --- a/packages/admin-ui/src/pages/Authentication/Reset2FA.jsx +++ b/packages/admin-ui/src/pages/Authentication/Reset2FA.jsx @@ -34,7 +34,7 @@ const initialState = { userID: null, secret: null, otpauth: null, - result: null + result: null, } const reducer = (state, action) => { @@ -63,7 +63,7 @@ const Reset2FA = () => { onCompleted: ({ validateReset2FALink: info }) => { if (!info) { dispatch({ - type: 'failure' + type: 'failure', }) } else { dispatch({ @@ -71,22 +71,22 @@ const Reset2FA = () => { payload: { userID: info.user_id, secret: info.secret, - otpauth: info.otpauth - } + otpauth: info.otpauth, + }, }) } }, onError: () => { dispatch({ - type: 'failure' + type: 'failure', }) - } + }, }) const [reset2FA, { error: mutationError }] = useMutation(RESET_2FA, { onCompleted: ({ reset2FA: success }) => { success ? history.push('/') : setInvalidToken(true) - } + }, }) const getErrorMsg = () => { @@ -107,8 +107,8 @@ const Reset2FA = () => { variables: { token: token, userID: state.userID, - code: twoFAConfirmation - } + code: twoFAConfirmation, + }, }) } diff --git a/packages/admin-ui/src/pages/Authentication/ResetPassword.jsx b/packages/admin-ui/src/pages/Authentication/ResetPassword.jsx index 5f440f17..31ba0907 100644 --- a/packages/admin-ui/src/pages/Authentication/ResetPassword.jsx +++ b/packages/admin-ui/src/pages/Authentication/ResetPassword.jsx @@ -33,17 +33,17 @@ const validationSchema = Yup.object().shape({ .test( 'len', 'New password must contain more than 8 characters', - val => val.length >= 8 + val => val.length >= 8, ), confirmPassword: Yup.string().oneOf( [Yup.ref('password'), null], - 'Passwords must match' - ) + 'Passwords must match', + ), }) const initialValues = { password: '', - confirmPassword: '' + confirmPassword: '', } const getErrorMsg = (formikErrors, formikTouched, mutationError) => { @@ -78,13 +78,13 @@ const ResetPassword = () => { onError: () => { setLoading(false) setSuccess(false) - } + }, }) const [resetPassword, { error }] = useMutation(RESET_PASSWORD, { onCompleted: ({ resetPassword: success }) => { if (success) history.push('/') - } + }, }) return ( @@ -112,8 +112,8 @@ const ResetPassword = () => { variables: { token: token, userID: userID, - newPassword: values.confirmPassword - } + newPassword: values.confirmPassword, + }, }) }}> {({ errors, touched }) => ( diff --git a/packages/admin-ui/src/pages/Authentication/Setup2FAState.jsx b/packages/admin-ui/src/pages/Authentication/Setup2FAState.jsx index 24c8507b..5b1e78bd 100644 --- a/packages/admin-ui/src/pages/Authentication/Setup2FAState.jsx +++ b/packages/admin-ui/src/pages/Authentication/Setup2FAState.jsx @@ -47,7 +47,7 @@ const GET_USER_DATA = gql` } ` -const Setup2FAState = ({ state, dispatch }) => { +const Setup2FAState = ({ state }) => { const history = useHistory() const { setUserData } = useContext(AppContext) @@ -68,7 +68,7 @@ const Setup2FAState = ({ state, dispatch }) => { onCompleted: ({ get2FASecret }) => { setSecret(get2FASecret.secret) setOtpauth(get2FASecret.otpauth) - } + }, } const mutationOptions = { @@ -76,8 +76,8 @@ const Setup2FAState = ({ state, dispatch }) => { username: state.clientField, password: state.passwordField, rememberMe: state.rememberMeField, - codeConfirmation: twoFAConfirmation - } + codeConfirmation: twoFAConfirmation, + }, } const { error: queryError } = useQuery(GET_2FA_SECRET, queryOptions) @@ -86,13 +86,13 @@ const Setup2FAState = ({ state, dispatch }) => { onCompleted: ({ userData }) => { setUserData(userData) history.push('/') - } + }, }) const [setup2FA, { error: mutationError }] = useMutation(SETUP_2FA, { onCompleted: ({ setup2FA: success }) => { success ? getUserData() : setInvalidToken(true) - } + }, }) const getErrorMsg = () => { diff --git a/packages/admin-ui/src/pages/Authentication/states.js b/packages/admin-ui/src/pages/Authentication/states.js index b2463c85..180ccf27 100644 --- a/packages/admin-ui/src/pages/Authentication/states.js +++ b/packages/admin-ui/src/pages/Authentication/states.js @@ -2,7 +2,7 @@ const STATES = { LOGIN: 'LOGIN', SETUP_2FA: 'SETUP2FA', INPUT_2FA: 'INPUT2FA', - FIDO: 'FIDO' + FIDO: 'FIDO', } export { STATES } diff --git a/packages/admin-ui/src/pages/Blacklist/Blacklist.jsx b/packages/admin-ui/src/pages/Blacklist/Blacklist.jsx index 8bee117a..a6a6b915 100644 --- a/packages/admin-ui/src/pages/Blacklist/Blacklist.jsx +++ b/packages/admin-ui/src/pages/Blacklist/Blacklist.jsx @@ -90,8 +90,8 @@ const PaperWalletDialog = ({ onConfirmed, onDissmised, open, props }) => { borderRadius: 8, minWidth: 656, bottom: 125, - right: 7 - } + right: 7, + }, }} {...props}>
@@ -136,20 +136,20 @@ const Blacklist = () => { setErrorMsg(errorMessage) }, onCompleted: () => setDeleteDialog(false), - refetchQueries: () => ['getBlacklistData'] + refetchQueries: () => ['getBlacklistData'], }) const [addEntry] = useMutation(ADD_ROW, { - refetchQueries: () => ['getBlacklistData'] + refetchQueries: () => ['getBlacklistData'], }) const [saveConfig] = useMutation(SAVE_CONFIG, { - refetchQueries: () => ['getData'] + refetchQueries: () => ['getData'], }) const [editMessage] = useMutation(EDIT_BLACKLIST_MESSAGE, { onError: e => setEditMessageError(e), - refetchQueries: () => ['getBlacklistData'] + refetchQueries: () => ['getBlacklistData'], }) const blacklistData = R.path(['blacklist'])(blacklistResponse) ?? [] @@ -172,7 +172,7 @@ const Blacklist = () => { const handleConfirmDialog = confirm => { addressReuseSave({ - enablePaperWalletOnly: confirm + enablePaperWalletOnly: confirm, }) setConfirmDialog(false) } @@ -193,6 +193,7 @@ const Blacklist = () => { setErrorMsg(`Server error${': ' + res?.errors[0]?.message}`) } } catch (e) { + console.error(e) setErrorMsg('Server error') } } @@ -201,8 +202,8 @@ const Blacklist = () => { editMessage({ variables: { id: r.id, - content: r.content - } + content: r.content, + }, }) } @@ -222,8 +223,8 @@ const Blacklist = () => { text: 'Advanced settings', icon: SettingsIcon, inverseIcon: ReverseSettingsIcon, - toggle: setAdvancedSettings - } + toggle: setAdvancedSettings, + }, ]}> {!advancedSettings && (
@@ -234,7 +235,7 @@ const Blacklist = () => { onChange={e => enablePaperWalletOnly ? addressReuseSave({ - enablePaperWalletOnly: e.target.checked + enablePaperWalletOnly: e.target.checked, }) : setConfirmDialog(true) } diff --git a/packages/admin-ui/src/pages/Blacklist/BlacklistAdvanced.jsx b/packages/admin-ui/src/pages/Blacklist/BlacklistAdvanced.jsx index 6050af0c..ec08fb4f 100644 --- a/packages/admin-ui/src/pages/Blacklist/BlacklistAdvanced.jsx +++ b/packages/admin-ui/src/pages/Blacklist/BlacklistAdvanced.jsx @@ -30,7 +30,7 @@ const BlacklistAdvanced = ({ data, editBlacklistMessage, onClose, - mutationError + mutationError, }) => { const [selectedMessage, setSelectedMessage] = useState(null) @@ -41,7 +41,7 @@ const BlacklistAdvanced = ({ width: 250, textAlign: 'left', size: 'sm', - view: it => R.path(['label'], it) + view: it => R.path(['label'], it), }, { name: 'content', @@ -49,7 +49,7 @@ const BlacklistAdvanced = ({ width: 690, textAlign: 'left', size: 'sm', - view: it => R.path(['content'], it) + view: it => R.path(['content'], it), }, { name: 'edit', @@ -63,7 +63,7 @@ const BlacklistAdvanced = ({ - ) + ), }, { name: 'deleteButton', @@ -86,8 +86,8 @@ const BlacklistAdvanced = ({ )} - ) - } + ), + }, ] const handleModalClose = () => { @@ -102,12 +102,12 @@ const BlacklistAdvanced = ({ const initialValues = { label: !R.isNil(selectedMessage) ? selectedMessage.label : '', - content: !R.isNil(selectedMessage) ? selectedMessage.content : '' + content: !R.isNil(selectedMessage) ? selectedMessage.content : '', } const validationSchema = Yup.object().shape({ label: Yup.string().required('A label is required!'), - content: Yup.string().required('The message content is required!').trim() + content: Yup.string().required('The message content is required!').trim(), }) return ( diff --git a/packages/admin-ui/src/pages/Blacklist/BlacklistModal.jsx b/packages/admin-ui/src/pages/Blacklist/BlacklistModal.jsx index dbd267f9..5d8fdf80 100644 --- a/packages/admin-ui/src/pages/Blacklist/BlacklistModal.jsx +++ b/packages/admin-ui/src/pages/Blacklist/BlacklistModal.jsx @@ -27,10 +27,10 @@ const BlackListModal = ({ onClose, addToBlacklist, errorMsg }) => { validateOnBlur={false} validateOnChange={false} initialValues={{ - address: '' + address: '', }} validationSchema={Yup.object({ - address: Yup.string().trim().required('An address is required') + address: Yup.string().trim().required('An address is required'), })} onSubmit={({ address }) => { handleAddToBlacklist(address.trim()) diff --git a/packages/admin-ui/src/pages/Blacklist/BlacklistTable.jsx b/packages/admin-ui/src/pages/Blacklist/BlacklistTable.jsx index 4171f1b1..53932a27 100644 --- a/packages/admin-ui/src/pages/Blacklist/BlacklistTable.jsx +++ b/packages/admin-ui/src/pages/Blacklist/BlacklistTable.jsx @@ -13,7 +13,7 @@ const BlacklistTable = ({ errorMessage, setErrorMessage, deleteDialog, - setDeleteDialog + setDeleteDialog, }) => { const [toBeDeleted, setToBeDeleted] = useState() @@ -28,7 +28,7 @@ const BlacklistTable = ({
{R.path(['address'], it)}
- ) + ), }, { name: 'deleteButton', @@ -47,8 +47,8 @@ const BlacklistTable = ({ - ) - } + ), + }, ] return ( diff --git a/packages/admin-ui/src/pages/Cashout/Cashout.jsx b/packages/admin-ui/src/pages/Cashout/Cashout.jsx index 2872b5a8..419f5782 100644 --- a/packages/admin-ui/src/pages/Cashout/Cashout.jsx +++ b/packages/admin-ui/src/pages/Cashout/Cashout.jsx @@ -51,7 +51,7 @@ const CashOut = ({ name: SCREEN_KEY }) => { const [saveConfig, { error }] = useMutation(SAVE_CONFIG, { onCompleted: () => setWizard(false), - refetchQueries: () => ['getData'] + refetchQueries: () => ['getData'], }) const save = (rawConfig, accounts) => { diff --git a/packages/admin-ui/src/pages/Cashout/Wizard.jsx b/packages/admin-ui/src/pages/Cashout/Wizard.jsx index aba07f1f..39ecf8d6 100644 --- a/packages/admin-ui/src/pages/Cashout/Wizard.jsx +++ b/packages/admin-ui/src/pages/Cashout/Wizard.jsx @@ -21,7 +21,7 @@ const Wizard = ({ machine, locale, onClose, save, error }) => { const LAST_STEP = machine.numberOfCassettes + machine.numberOfRecyclers + 1 const [{ step, config }, setState] = useState({ step: 0, - config: { active: true } + config: { active: true }, }) const options = getBillOptions(locale, denominations) @@ -34,8 +34,8 @@ const Wizard = ({ machine, locale, onClose, save, error }) => { return save( toNamespace( machine.deviceId, - DenominationsSchema.cast(config, { assert: false }) - ) + DenominationsSchema.cast(config, { assert: false }), + ), ) } @@ -43,7 +43,7 @@ const Wizard = ({ machine, locale, onClose, save, error }) => { setState({ step: step + 1, - config: newConfig + config: newConfig, }) } @@ -57,10 +57,10 @@ const Wizard = ({ machine, locale, onClose, save, error }) => { inputProps: { options: options, labelProp: 'display', - valueProp: 'code' - } + valueProp: 'code', + }, }), - R.range(1, machine.numberOfCassettes + 1) + R.range(1, machine.numberOfCassettes + 1), ), R.map( it => ({ @@ -71,11 +71,11 @@ const Wizard = ({ machine, locale, onClose, save, error }) => { inputProps: { options: options, labelProp: 'display', - valueProp: 'code' - } + valueProp: 'code', + }, }), - R.range(1, machine.numberOfRecyclers + 1) - ) + R.range(1, machine.numberOfRecyclers + 1), + ), ) const schema = () => @@ -119,7 +119,7 @@ const Wizard = ({ machine, locale, onClose, save, error }) => { recycler6: machine.numberOfRecyclers >= 6 && step >= machine.numberOfCassettes + 6 ? Yup.number().required() - : Yup.number().transform(transformNumber).nullable() + : Yup.number().transform(transformNumber).nullable(), }) return ( diff --git a/packages/admin-ui/src/pages/Cashout/WizardStep.jsx b/packages/admin-ui/src/pages/Cashout/WizardStep.jsx index 6aa881c9..3f44c24d 100644 --- a/packages/admin-ui/src/pages/Cashout/WizardStep.jsx +++ b/packages/admin-ui/src/pages/Cashout/WizardStep.jsx @@ -19,23 +19,23 @@ import tejo4CassetteFour from 'src/styling/icons/cassettes/tejo/4-cassettes/4-ca const getCassetesArtworks = () => ({ 1: { - 1: cassetteOne + 1: cassetteOne, }, 2: { 1: cassetteOne, - 2: cassetteTwo + 2: cassetteTwo, }, 3: { 1: tejo3CassetteOne, 2: tejo3CassetteTwo, - 3: tejo3CassetteThree + 3: tejo3CassetteThree, }, 4: { 1: tejo4CassetteOne, 2: tejo4CassetteTwo, 3: tejo4CassetteThree, - 4: tejo4CassetteFour - } + 4: tejo4CassetteFour, + }, }) const WizardStep = ({ @@ -48,7 +48,7 @@ const WizardStep = ({ steps, fiatCurrency, options, - numberOfCassettes + numberOfCassettes, }) => { const label = isLastStep ? 'Finish' : 'Next' const cassetteIcon = getCassetesArtworks()[numberOfCassettes] @@ -68,7 +68,7 @@ const WizardStep = ({ cassette1: '', cassette2: '', cassette3: '', - cassette4: '' + cassette4: '', }} enableReinitialize validationSchema={schema}> @@ -101,7 +101,7 @@ const WizardStep = ({
- ) + ), )} R.any(key => !R.isNil(values[key]), denominationKeys) @@ -98,19 +98,19 @@ const DenominationsSchema = Yup.object() : context.createError({ path: '', message: - 'The recyclers or at least one of the cassettes must have a value' - }) + 'The recyclers or at least one of the cassettes must have a value', + }), ) const getElements = (machines, locale = {}) => { const fiatCurrency = R.prop('fiatCurrency')(locale) const maxNumberOfCassettes = Math.max( ...R.map(it => it.numberOfCassettes, machines), - 0 + 0, ) const maxNumberOfRecyclers = Math.max( ...R.map(it => it.numberOfRecyclers, machines), - 0 + 0, ) const numberOfCashUnits = maxNumberOfCassettes + Math.ceil(maxNumberOfRecyclers / 2) @@ -122,7 +122,7 @@ const getElements = (machines, locale = {}) => { options: options, labelProp: 'display', valueProp: 'code', - className: 'w-full' + className: 'w-full', } : { decimalPlaces: 0 } @@ -133,8 +133,8 @@ const getElements = (machines, locale = {}) => { width: widthsByNumberOfUnits[numberOfCashUnits]?.machine, view: it => machines.find(({ deviceId }) => deviceId === it).name, size: 'sm', - editable: false - } + editable: false, + }, ] R.until( @@ -156,11 +156,11 @@ const getElements = (machines, locale = {}) => { isHidden: machine => it > machines.find(({ deviceId }) => deviceId === machine.id) - .numberOfCassettes + .numberOfCassettes, }) return R.add(1, it) }, - 1 + 1, ) R.until( @@ -182,12 +182,12 @@ const getElements = (machines, locale = {}) => { it > Math.ceil( machines.find(({ deviceId }) => deviceId === machine.id) - .numberOfRecyclers / 2 - ) + .numberOfRecyclers / 2, + ), }) return R.add(1, it) }, - 1 + 1, ) return elements diff --git a/packages/admin-ui/src/pages/Commissions/Commissions.jsx b/packages/admin-ui/src/pages/Commissions/Commissions.jsx index bfe4a9d2..73bdcb61 100644 --- a/packages/admin-ui/src/pages/Commissions/Commissions.jsx +++ b/packages/admin-ui/src/pages/Commissions/Commissions.jsx @@ -36,7 +36,7 @@ const SAVE_CONFIG = gql` ` const removeCoinFromOverride = crypto => override => R.mergeRight(override, { - cryptoCurrencies: R.without([crypto], override.cryptoCurrencies) + cryptoCurrencies: R.without([crypto], override.cryptoCurrencies), }) const Commissions = ({ name: SCREEN_KEY }) => { @@ -45,7 +45,7 @@ const Commissions = ({ name: SCREEN_KEY }) => { const { data, loading } = useQuery(GET_DATA) const [saveConfig] = useMutation(SAVE_CONFIG, { refetchQueries: () => ['getData'], - onError: error => setError(error) + onError: error => setError(error), }) const config = data?.config && fromNamespace(SCREEN_KEY)(data.config) @@ -78,11 +78,11 @@ const Commissions = ({ name: SCREEN_KEY }) => { const machineOverrides = R.map(removeCoin)(filterMachine(it)) const overrides = machineOverrides.concat( - R.filter(it => !sameMachine(it), it) + R.filter(it => !sameMachine(it), it), ) const config = { - commissions_overrides: R.prepend(override, overrides) + commissions_overrides: R.prepend(override, overrides), } return saveConfig({ variables: { config } }) @@ -92,8 +92,8 @@ const Commissions = ({ name: SCREEN_KEY }) => { ? [ { label: 'Override value', - icon: - } + icon: , + }, ] : [] @@ -107,8 +107,8 @@ const Commissions = ({ name: SCREEN_KEY }) => { text: 'List view', icon: ListingViewIcon, inverseIcon: ReverseListingViewIcon, - toggle: setShowMachines - } + toggle: setShowMachines, + }, ]} iconClassName="ml-1" appendix={ diff --git a/packages/admin-ui/src/pages/Commissions/components/CommissionsDetails.jsx b/packages/admin-ui/src/pages/Commissions/components/CommissionsDetails.jsx index e96c03c3..521a153d 100644 --- a/packages/admin-ui/src/pages/Commissions/components/CommissionsDetails.jsx +++ b/packages/admin-ui/src/pages/Commissions/components/CommissionsDetails.jsx @@ -8,7 +8,7 @@ import { getOverridesSchema, defaults, overridesDefaults, - getOrder + getOrder, } from 'src/pages/Commissions/helper' import { Table as EditableTable } from 'src/components/editableTable' @@ -23,7 +23,7 @@ const CommissionsDetails = memo( const orderedCommissionsOverrides = R.sortWith([ R.ascend(getOrder), - R.ascend(R.prop('machine')) + R.ascend(R.prop('machine')), ])(commissionOverrides) const onEditingDefault = (it, editing) => setEditingDefault(editing) @@ -63,7 +63,7 @@ const CommissionsDetails = memo( validationSchema={getOverridesSchema( orderedCommissionsOverrides, data, - locale + locale, )} data={orderedCommissionsOverrides} elements={overrides(data, currency, orderedCommissionsOverrides)} @@ -73,7 +73,7 @@ const CommissionsDetails = memo( ) - } + }, ) export default CommissionsDetails diff --git a/packages/admin-ui/src/pages/Commissions/components/CommissionsList.jsx b/packages/admin-ui/src/pages/Commissions/components/CommissionsList.jsx index 927660c8..debfd42b 100644 --- a/packages/admin-ui/src/pages/Commissions/components/CommissionsList.jsx +++ b/packages/admin-ui/src/pages/Commissions/components/CommissionsList.jsx @@ -4,7 +4,7 @@ import { overridesDefaults, getCommissions, getListCommissionsSchema, - commissionsList + commissionsList, } from 'src/pages/Commissions/helper' import { Table as EditableTable } from 'src/components/editableTable' @@ -12,39 +12,39 @@ import { Select } from 'src/components/inputs' const SHOW_ALL = { code: 'SHOW_ALL', - display: 'Show all' + display: 'Show all', } const ORDER_OPTIONS = [ { code: 'machine', - display: 'Machine name' + display: 'Machine name', }, { code: 'cryptoCurrencies', - display: 'Cryptocurrency' + display: 'Cryptocurrency', }, { code: 'cashIn', - display: 'Cash-in' + display: 'Cash-in', }, { code: 'cashOut', - display: 'Cash-out' + display: 'Cash-out', }, { code: 'fixedFee', - display: 'Fixed fee' + display: 'Fixed fee', }, { code: 'minimumTx', - display: 'Minimum Tx' - } + display: 'Minimum Tx', + }, ] const getElement = (code, display) => ({ code: code, - display: display || code + display: display || code, }) const sortCommissionsBy = prop => { @@ -61,12 +61,13 @@ const sortCommissionsBy = prop => { const filterCommissions = (coinFilter, machineFilter) => R.compose( R.filter( - it => (machineFilter === SHOW_ALL) | (machineFilter.code === it.machine) + it => (machineFilter === SHOW_ALL) | (machineFilter.code === it.machine), ), R.filter( it => - (coinFilter === SHOW_ALL) | (coinFilter.code === it.cryptoCurrencies[0]) - ) + (coinFilter === SHOW_ALL) | + (coinFilter.code === it.cryptoCurrencies[0]), + ), ) const CommissionsList = memo( @@ -79,7 +80,7 @@ const CommissionsList = memo( const getMachineCoins = deviceId => { const override = R.prop('overrides', localeConfig)?.find( - R.propEq('machine', deviceId) + R.propEq('machine', deviceId), ) const machineCoins = override @@ -96,20 +97,20 @@ const CommissionsList = memo( const machineData = R.sortBy( R.prop('display'), - R.map(getMachineElement)(R.prop('machines', data)) + R.map(getMachineElement)(R.prop('machines', data)), ) const machinesCoinsTuples = R.unnest( - R.map(getMachineCoins)(machineData.map(R.prop('code'))) + R.map(getMachineCoins)(machineData.map(R.prop('code'))), ) const commissions = R.map(([deviceId, cryptoCode]) => - getCommissions(cryptoCode, deviceId, config) + getCommissions(cryptoCode, deviceId, config), )(machinesCoinsTuples) const tableData = R.compose( sortCommissionsBy(orderProp), - filterCommissions(coinFilter, machineFilter) + filterCommissions(coinFilter, machineFilter), )(commissions) return ( @@ -155,7 +156,7 @@ const CommissionsList = memo(
) - } + }, ) export default CommissionsList diff --git a/packages/admin-ui/src/pages/Commissions/helper.jsx b/packages/admin-ui/src/pages/Commissions/helper.jsx index d15f9184..c1c74472 100644 --- a/packages/admin-ui/src/pages/Commissions/helper.jsx +++ b/packages/admin-ui/src/pages/Commissions/helper.jsx @@ -14,12 +14,12 @@ import { CURRENCY_MAX } from 'src/utils/constants' const ALL_MACHINES = { name: 'All Machines', - deviceId: 'ALL_MACHINES' + deviceId: 'ALL_MACHINES', } const ALL_COINS = { display: 'All Coins', - code: 'ALL_COINS' + code: 'ALL_COINS', } const cashInAndOutHeaderStyle = { marginLeft: 6, whiteSpace: 'nowrap' } @@ -68,11 +68,11 @@ const onCryptoChange = (prev, curr, setValue) => { setValue(curr) } -const getOverridesFields = (getData, currency, auxElements) => { +const getOverridesFields = (getData, currency) => { const machineData = [ALL_MACHINES].concat(getData(['machines'])) const rawCryptos = getData(['cryptoCurrencies']) const cryptoData = [ALL_COINS].concat( - R.map(it => ({ display: it.code, code: it.code }))(rawCryptos ?? []) + R.map(it => ({ display: it.code, code: it.code }))(rawCryptos ?? []), ) return [ @@ -85,8 +85,8 @@ const getOverridesFields = (getData, currency, auxElements) => { inputProps: { options: machineData, valueProp: 'deviceId', - labelProp: 'name' - } + labelProp: 'name', + }, }, { name: 'cryptoCurrencies', @@ -100,8 +100,8 @@ const getOverridesFields = (getData, currency, auxElements) => { labelProp: 'display', multiple: true, onChange: onCryptoChange, - shouldStayOpen: true - } + shouldStayOpen: true, + }, }, { header: cashInHeader, @@ -113,8 +113,8 @@ const getOverridesFields = (getData, currency, auxElements) => { suffix: '%', bold: bold, inputProps: { - decimalPlaces: 3 - } + decimalPlaces: 3, + }, }, { header: cashOutHeader, @@ -126,8 +126,8 @@ const getOverridesFields = (getData, currency, auxElements) => { suffix: '%', bold: bold, inputProps: { - decimalPlaces: 3 - } + decimalPlaces: 3, + }, }, { name: 'fixedFee', @@ -139,8 +139,8 @@ const getOverridesFields = (getData, currency, auxElements) => { suffix: currency, bold: bold, inputProps: { - decimalPlaces: 2 - } + decimalPlaces: 2, + }, }, { name: 'minimumTx', @@ -153,8 +153,8 @@ const getOverridesFields = (getData, currency, auxElements) => { suffix: currency, bold: bold, inputProps: { - decimalPlaces: 2 - } + decimalPlaces: 2, + }, }, { name: 'cashOutFixedFee', @@ -167,9 +167,9 @@ const getOverridesFields = (getData, currency, auxElements) => { suffix: currency, bold: bold, inputProps: { - decimalPlaces: 2 - } - } + decimalPlaces: 2, + }, + }, ] } @@ -185,8 +185,8 @@ const mainFields = currency => [ suffix: '%', bold: bold, inputProps: { - decimalPlaces: 3 - } + decimalPlaces: 3, + }, }, { header: cashOutHeader, @@ -199,8 +199,8 @@ const mainFields = currency => [ suffix: '%', bold: bold, inputProps: { - decimalPlaces: 3 - } + decimalPlaces: 3, + }, }, { name: 'fixedFee', @@ -214,8 +214,8 @@ const mainFields = currency => [ suffix: currency, bold: bold, inputProps: { - decimalPlaces: 2 - } + decimalPlaces: 2, + }, }, { name: 'minimumTx', @@ -229,8 +229,8 @@ const mainFields = currency => [ suffix: currency, bold: bold, inputProps: { - decimalPlaces: 2 - } + decimalPlaces: 2, + }, }, { name: 'cashOutFixedFee', @@ -244,9 +244,9 @@ const mainFields = currency => [ suffix: currency, bold: bold, inputProps: { - decimalPlaces: 2 - } - } + decimalPlaces: 2, + }, + }, ] const overrides = (auxData, currency, auxElements) => { @@ -286,7 +286,7 @@ const getSchema = locale => { .label('Cash-out fixed fee') .min(0) .max(highestBill) - .required() + .required(), }) } @@ -303,7 +303,7 @@ const getAlreadyUsed = (id, machine, values) => { const alreadyUsed = R.compose( R.uniq, R.flatten, - R.map(getCrypto) + R.map(getCrypto), )(filteredOverrides) if (machine !== originalMachineId) return alreadyUsed ?? [] @@ -316,11 +316,11 @@ const getOverridesSchema = (values, rawData, locale) => { const machineData = [ALL_MACHINES].concat(getData(['machines'])) const rawCryptos = getData(['cryptoCurrencies']) const cryptoData = [ALL_COINS].concat( - R.map(it => ({ display: it.code, code: it.code }))(rawCryptos ?? []) + R.map(it => ({ display: it.code, code: it.code }))(rawCryptos ?? []), ) const bills = getBillOptions(locale, denominations).map(it => - parseInt(it.code) + parseInt(it.code), ) const highestBill = R.isEmpty(bills) ? CURRENCY_MAX : Math.max(...bills) @@ -336,7 +336,7 @@ const getOverridesSchema = (values, rawData, locale) => { const isAllCoins = R.includes(ALL_COINS.code, cryptoCurrencies) if (isAllMachines && isAllCoins) { return this.createError({ - message: `All machines and all coins should be configured in the default setup table` + message: `All machines and all coins should be configured in the default setup table`, }) } @@ -346,7 +346,7 @@ const getOverridesSchema = (values, rawData, locale) => { const machineView = getView( machineData, 'name', - 'deviceId' + 'deviceId', )(machine) const message = `${codes} already overridden for machine: ${machineView}` @@ -354,7 +354,7 @@ const getOverridesSchema = (values, rawData, locale) => { return this.createError({ message }) } return true - } + }, }) .label('Crypto currencies') .required() @@ -383,7 +383,7 @@ const getOverridesSchema = (values, rawData, locale) => { .label('Cash-out fixed fee') .min(0) .max(highestBill) - .required() + .required(), }) } @@ -392,7 +392,7 @@ const defaults = { cashOut: '', fixedFee: '', minimumTx: '', - cashOutFixedFee: '' + cashOutFixedFee: '', } const overridesDefaults = { @@ -402,7 +402,7 @@ const overridesDefaults = { cashOut: '', fixedFee: '', minimumTx: '', - cashOutFixedFee: '' + cashOutFixedFee: '', } const getOrder = ({ machine, cryptoCurrencies }) => { @@ -426,7 +426,7 @@ const createCommissions = (cryptoCode, deviceId, isDefault, config) => { machine: deviceId, cryptoCurrencies: [cryptoCode], default: isDefault, - id: uuidv4() + id: uuidv4(), } } @@ -438,7 +438,8 @@ const getCommissions = (cryptoCode, deviceId, config) => { } const specificOverride = R.find( - it => it.machine === deviceId && R.includes(cryptoCode)(it.cryptoCurrencies) + it => + it.machine === deviceId && R.includes(cryptoCode)(it.cryptoCurrencies), )(overrides) if (specificOverride !== undefined) @@ -446,7 +447,7 @@ const getCommissions = (cryptoCode, deviceId, config) => { const machineOverride = R.find( it => - it.machine === deviceId && R.includes('ALL_COINS')(it.cryptoCurrencies) + it.machine === deviceId && R.includes('ALL_COINS')(it.cryptoCurrencies), )(overrides) if (machineOverride !== undefined) @@ -455,7 +456,7 @@ const getCommissions = (cryptoCode, deviceId, config) => { const coinOverride = R.find( it => it.machine === 'ALL_MACHINES' && - R.includes(cryptoCode)(it.cryptoCurrencies) + R.includes(cryptoCode)(it.cryptoCurrencies), )(overrides) if (coinOverride !== undefined) @@ -466,7 +467,7 @@ const getCommissions = (cryptoCode, deviceId, config) => { const getListCommissionsSchema = locale => { const bills = getBillOptions(locale, denominations).map(it => - parseInt(it.code) + parseInt(it.code), ) const highestBill = R.isEmpty(bills) ? CURRENCY_MAX : Math.max(...bills) @@ -497,21 +498,21 @@ const getListCommissionsSchema = locale => { .label('Cash-out fixed fee') .min(0) .max(highestBill) - .required() + .required(), }) } -const getTextStyle = (obj, isEditing) => { +const getTextStyle = obj => { return { color: obj.default ? primaryColor : secondaryColorDark } } -const commissionsList = (auxData, currency, auxElements) => { +const commissionsList = (auxData, currency) => { const getData = R.path(R.__, auxData) return getListCommissionsFields(getData, currency, defaults) } -const getListCommissionsFields = (getData, currency, defaults) => { +const getListCommissionsFields = (getData, currency) => { const machineData = [ALL_MACHINES].concat(getData(['machines'])) return [ @@ -520,7 +521,7 @@ const getListCommissionsFields = (getData, currency, defaults) => { width: 196, size: 'sm', view: getView(machineData, 'name', 'deviceId'), - editable: false + editable: false, }, { name: 'cryptoCurrencies', @@ -528,7 +529,7 @@ const getListCommissionsFields = (getData, currency, defaults) => { width: 150, view: R.prop(0), size: 'sm', - editable: false + editable: false, }, { header: cashInHeader, @@ -540,8 +541,8 @@ const getListCommissionsFields = (getData, currency, defaults) => { suffix: '%', textStyle: obj => getTextStyle(obj), inputProps: { - decimalPlaces: 3 - } + decimalPlaces: 3, + }, }, { header: cashOutHeader, @@ -554,8 +555,8 @@ const getListCommissionsFields = (getData, currency, defaults) => { suffix: '%', textStyle: obj => getTextStyle(obj), inputProps: { - decimalPlaces: 3 - } + decimalPlaces: 3, + }, }, { name: 'fixedFee', @@ -567,8 +568,8 @@ const getListCommissionsFields = (getData, currency, defaults) => { suffix: currency, textStyle: obj => getTextStyle(obj), inputProps: { - decimalPlaces: 2 - } + decimalPlaces: 2, + }, }, { name: 'minimumTx', @@ -580,8 +581,8 @@ const getListCommissionsFields = (getData, currency, defaults) => { suffix: currency, textStyle: obj => getTextStyle(obj), inputProps: { - decimalPlaces: 2 - } + decimalPlaces: 2, + }, }, { name: 'cashOutFixedFee', @@ -594,9 +595,9 @@ const getListCommissionsFields = (getData, currency, defaults) => { suffix: currency, textStyle: obj => getTextStyle(obj), inputProps: { - decimalPlaces: 2 - } - } + decimalPlaces: 2, + }, + }, ] } @@ -610,5 +611,5 @@ export { getOrder, getCommissions, getListCommissionsSchema, - commissionsList + commissionsList, } diff --git a/packages/admin-ui/src/pages/Customers/CustomerData.jsx b/packages/admin-ui/src/pages/Customers/CustomerData.jsx index df572d82..b04e7a1d 100644 --- a/packages/admin-ui/src/pages/Customers/CustomerData.jsx +++ b/packages/admin-ui/src/pages/Customers/CustomerData.jsx @@ -10,7 +10,7 @@ import * as Yup from 'yup' import { TextInput } from 'src/components/inputs/formik' import { OVERRIDE_AUTHORIZED, - OVERRIDE_REJECTED + OVERRIDE_REJECTED, } from 'src/pages/Customers/components/consts' import { onlyFirstToUpper } from 'src/utils/string' @@ -20,7 +20,7 @@ import { customerDataSchemas, formatDates, tryFormatDate, - getFormattedPhone + getFormattedPhone, } from './helper' const IMAGE_WIDTH = 165 @@ -50,7 +50,7 @@ const CustomerData = ({ updateCustomRequest, authorizeCustomRequest, updateCustomEntry, - checkAgainstSanctions + checkAgainstSanctions, }) => { const [previewPhoto, setPreviewPhoto] = useState(null) const [previewCard, setPreviewCard] = useState(null) @@ -68,21 +68,22 @@ const CustomerData = ({ : 'Failed' const sortByName = R.sortBy( - R.compose(R.toLower, R.path(['customInfoRequest', 'customRequest', 'name'])) + R.compose( + R.toLower, + R.path(['customInfoRequest', 'customRequest', 'name']), + ), ) const customFields = [] const customRequirements = [] const customInfoRequests = sortByName( - R.path(['customInfoRequests'])(customer) ?? [] + R.path(['customInfoRequests'])(customer) ?? [], ) const phone = R.path(['phone'])(customer) const email = R.path(['email'])(customer) const smsData = R.path(['subscriberInfo'])(customer) - const isEven = elem => elem % 2 === 0 - const getVisibleCards = R.filter(elem => elem.isAvailable) const initialValues = { @@ -93,23 +94,23 @@ const CustomerData = ({ dateOfBirth: tryFormatDate(rawDob), gender: R.path(['gender'])(idData) ?? '', country: R.path(['country'])(idData) ?? '', - expirationDate: tryFormatDate(rawExpirationDate) + expirationDate: tryFormatDate(rawExpirationDate), }, usSsn: { - usSsn: customer.usSsn ?? '' + usSsn: customer.usSsn ?? '', }, frontCamera: { - frontCamera: null + frontCamera: null, }, idCardPhoto: { - idCardPhoto: null + idCardPhoto: null, }, email: { - email + email, }, smsData: { - phoneNumber: getFormattedPhone(phone, locale.country) - } + phoneNumber: getFormattedPhone(phone, locale.country), + }, } const smsDataElements = [ @@ -117,8 +118,8 @@ const CustomerData = ({ name: 'phoneNumber', label: 'Phone number', component: TextInput, - editable: false - } + editable: false, + }, ] const smsDataSchema = { @@ -128,10 +129,10 @@ const CustomerData = ({ if (R.length(fields) === 2) { return Yup.object().shape({ [R.head(fields)]: Yup.string().required(), - [R.last(fields)]: Yup.string().required() + [R.last(fields)]: Yup.string().required(), }) } - }) + }), } const cards = [ @@ -146,18 +147,18 @@ const CustomerData = ({ deleteEditedData: () => deleteEditedData({ idCardData: null }), save: values => editCustomer({ - idCardData: R.merge(idData, formatDates(values)) + idCardData: R.merge(idData, formatDates(values)), }), validationSchema: customerDataSchemas.idCardData, checkAgainstSanctions: () => checkAgainstSanctions({ variables: { - customerId: R.path(['id'])(customer) - } + customerId: R.path(['id'])(customer), + }, }), initialValues: initialValues.idCardData, isAvailable: !R.isNil(idData), - editable: true + editable: true, }, { fields: smsDataElements, @@ -169,15 +170,15 @@ const CustomerData = ({ save: values => { editCustomer({ subscriberInfo: { - result: R.merge(smsData, R.omit(['phoneNumber'])(values)) - } + result: R.merge(smsData, R.omit(['phoneNumber'])(values)), + }, }) }, validationSchema: smsDataSchema.smsData, initialValues: initialValues.smsData, isAvailable: !R.isNil(phone), hasAdditionalData: !R.isNil(smsData) && !R.isEmpty(smsData), - editable: false + editable: false, }, { title: 'Email', @@ -190,13 +191,13 @@ const CustomerData = ({ deleteEditedData: () => deleteEditedData({ email: null }), initialValues: initialValues.email, isAvailable: !R.isNil(customer.email), - editable: false + editable: false, }, { title: 'Name', titleIcon: , isAvailable: false, - editable: true + editable: true, }, { title: 'Sanctions check', @@ -207,7 +208,7 @@ const CustomerData = ({ reject: () => updateCustomer({ sanctionsOverride: OVERRIDE_REJECTED }), children: () => {sanctionsDisplay}, isAvailable: !R.isNil(sanctions), - editable: true + editable: true, }, { fields: customerDataElements.frontCamera, @@ -221,7 +222,7 @@ const CustomerData = ({ setPreviewPhoto(null) return replacePhoto({ newPhoto: values.frontCamera, - photoType: 'frontCamera' + photoType: 'frontCamera', }) }, cancel: () => setPreviewPhoto(null), @@ -245,7 +246,7 @@ const CustomerData = ({ validationSchema: customerDataSchemas.frontCamera, initialValues: initialValues.frontCamera, isAvailable: !R.isNil(customer.frontCameraPath), - editable: true + editable: true, }, { fields: customerDataElements.idCardPhoto, @@ -259,7 +260,7 @@ const CustomerData = ({ setPreviewCard(null) return replacePhoto({ newPhoto: values.idCardPhoto, - photoType: 'idCardPhoto' + photoType: 'idCardPhoto', }) }, cancel: () => setPreviewCard(null), @@ -283,7 +284,7 @@ const CustomerData = ({ validationSchema: customerDataSchemas.idCardPhoto, initialValues: initialValues.idCardPhoto, isAvailable: !R.isNil(customer.idCardPhotoPath), - editable: true + editable: true, }, { fields: customerDataElements.usSsn, @@ -298,8 +299,8 @@ const CustomerData = ({ validationSchema: customerDataSchemas.usSsn, initialValues: initialValues.usSsn, isAvailable: !R.isNil(customer.usSsn), - editable: true - } + editable: true, + }, ] R.forEach(it => { @@ -310,8 +311,8 @@ const CustomerData = ({ label: it.customInfoRequest.customRequest.name, value: it.customerData.data ?? '', component: TextInput, - editable: true - } + editable: true, + }, ], title: it.customInfoRequest.customRequest.name, titleIcon: , @@ -321,16 +322,16 @@ const CustomerData = ({ variables: { customerId: it.customerId, infoRequestId: it.customInfoRequest.id, - override: OVERRIDE_AUTHORIZED - } + override: OVERRIDE_AUTHORIZED, + }, }), reject: () => authorizeCustomRequest({ variables: { customerId: it.customerId, infoRequestId: it.customInfoRequest.id, - override: OVERRIDE_REJECTED - } + override: OVERRIDE_REJECTED, + }, }), save: values => { updateCustomRequest({ @@ -339,18 +340,18 @@ const CustomerData = ({ infoRequestId: it.customInfoRequest.id, data: { info_request_id: it.customInfoRequest.id, - data: values[it.customInfoRequest.id] - } - } + data: values[it.customInfoRequest.id], + }, + }, }) }, deleteEditedData: () => {}, validationSchema: Yup.object().shape({ - [it.customInfoRequest.id]: Yup.string() + [it.customInfoRequest.id]: Yup.string(), }), initialValues: { - [it.customInfoRequest.id]: it.customerData.data ?? '' - } + [it.customInfoRequest.id]: it.customerData.data ?? '', + }, }) }, customInfoRequests) @@ -363,27 +364,27 @@ const CustomerData = ({ label: it.label, value: it.value ?? '', component: TextInput, - editable: true - } + editable: true, + }, ], title: it.label, titleIcon: , save: values => { updateCustomEntry({ fieldId: it.id, - value: values[it.label] + value: values[it.label], }) }, deleteEditedData: () => {}, validationSchema: Yup.object().shape({ - [it.label]: Yup.string() + [it.label]: Yup.string(), }), initialValues: { - [it.label]: it.value ?? '' - } + [it.label]: it.value ?? '', + }, }) }, - R.path(['customFields'])(customer) ?? [] + R.path(['customFields'])(customer) ?? [], ) R.forEach( @@ -393,10 +394,10 @@ const CustomerData = ({ name: it, label: onlyFirstToUpper(it), component: TextInput, - editable: false + editable: false, }) }, - R.keys(smsData) ?? [] + R.keys(smsData) ?? [], ) const externalCompliance = R.map(it => ({ @@ -404,26 +405,26 @@ const CustomerData = ({ { name: 'externalId', label: 'Third Party ID', - editable: false + editable: false, }, { name: 'lastKnownStatus', label: 'Last Known Status', - editable: false + editable: false, }, { name: 'lastUpdated', label: 'Last Updated', - editable: false - } + editable: false, + }, ], titleIcon: , title: `External Info [${it.service}]`, initialValues: it ?? { externalId: '', lastKnownStatus: '', - lastUpdated: '' - } + lastUpdated: '', + }, }))(customer.externalCompliance ?? []) const editableCard = ( @@ -443,9 +444,9 @@ const CustomerData = ({ hasImage, hasAdditionalData, editable, - checkAgainstSanctions + checkAgainstSanctions, }, - idx + idx, ) => { return (
@@ -474,7 +475,7 @@ const CustomerData = ({ const nonEditableCard = ( { title, state, titleIcon, fields, hasImage, initialValues, children }, - idx + idx, ) => { return (
diff --git a/packages/admin-ui/src/pages/Customers/CustomerNotes.jsx b/packages/admin-ui/src/pages/Customers/CustomerNotes.jsx index ee1ad95e..5f5cf2cb 100644 --- a/packages/admin-ui/src/pages/Customers/CustomerNotes.jsx +++ b/packages/admin-ui/src/pages/Customers/CustomerNotes.jsx @@ -12,14 +12,14 @@ const CustomerNotes = ({ createNote, deleteNote, editNote, - timezone + timezone, }) => { const [openModal, setOpenModal] = useState(false) const [editing, setEditing] = useState(null) const customerNotes = R.sort( (a, b) => new Date(b?.created).getTime() - new Date(a?.created).getTime(), - customer.notes ?? [] + customer.notes ?? [], ) const handleModalClose = () => { @@ -39,7 +39,7 @@ const CustomerNotes = ({ if (!R.equals(it.newContent, it.oldContent)) { editNote({ noteId: it.noteId, - newContent: it.newContent + newContent: it.newContent, }) } setEditing(null) diff --git a/packages/admin-ui/src/pages/Customers/CustomerPhotos.jsx b/packages/admin-ui/src/pages/Customers/CustomerPhotos.jsx index 75d81372..761899f5 100644 --- a/packages/admin-ui/src/pages/Customers/CustomerPhotos.jsx +++ b/packages/admin-ui/src/pages/Customers/CustomerPhotos.jsx @@ -49,7 +49,7 @@ export const PhotoCard = ({ date, src, setPhotosDialog, - setPhotoClickIndex + setPhotoClickIndex, }) => { return ( { const { data: customerResponse, refetch: getCustomer, - loading: customerLoading + loading: customerLoading, } = useQuery(GET_CUSTOMER, { - variables: { customerId } + variables: { customerId }, }) const { data: configResponse, loading: configLoading } = useQuery(GET_DATA) const { data: activeCustomRequests } = useQuery(GET_ACTIVE_CUSTOM_REQUESTS, { variables: { - onlyEnabled: true - } + onlyEnabled: true, + }, }) const [setCustomEntry] = useMutation(SET_CUSTOM_ENTRY, { - onCompleted: () => getCustomer() + onCompleted: () => getCustomer(), }) const [editCustomEntry] = useMutation(EDIT_CUSTOM_ENTRY, { - onCompleted: () => getCustomer() + onCompleted: () => getCustomer(), }) const [replaceCustomerPhoto] = useMutation(REPLACE_CUSTOMER_PHOTO, { - onCompleted: () => getCustomer() + onCompleted: () => getCustomer(), }) const [editCustomerData] = useMutation(EDIT_CUSTOMER, { - onCompleted: () => getCustomer() + onCompleted: () => getCustomer(), }) const [deleteCustomerEditedData] = useMutation(DELETE_EDITED_CUSTOMER, { - onCompleted: () => getCustomer() + onCompleted: () => getCustomer(), }) const [setCustomer] = useMutation(SET_CUSTOMER, { onCompleted: () => { getCustomer() }, - onError: error => setError(error) + onError: error => setError(error), }) const [authorizeCustomRequest] = useMutation(SET_AUTHORIZED_REQUEST, { - onCompleted: () => getCustomer() + onCompleted: () => getCustomer(), }) const [setCustomerCustomInfoRequest] = useMutation( SET_CUSTOMER_CUSTOM_INFO_REQUEST, { - onCompleted: () => getCustomer() - } + onCompleted: () => getCustomer(), + }, ) const [createNote] = useMutation(CREATE_NOTE, { - onCompleted: () => getCustomer() + onCompleted: () => getCustomer(), }) const [deleteNote] = useMutation(DELETE_NOTE, { - onCompleted: () => getCustomer() + onCompleted: () => getCustomer(), }) const [editNote] = useMutation(EDIT_NOTE, { - onCompleted: () => getCustomer() + onCompleted: () => getCustomer(), }) const saveCustomEntry = it => { @@ -366,8 +366,8 @@ const CustomerProfile = memo(() => { variables: { customerId, label: it.title, - value: it.data - } + value: it.data, + }, }) setWizard(null) } @@ -377,31 +377,31 @@ const CustomerProfile = memo(() => { variables: { customerId, fieldId: it.fieldId, - value: it.value - } + value: it.value, + }, }) } const [enableTestCustomer] = useMutation(ENABLE_TEST_CUSTOMER, { variables: { customerId }, - onCompleted: () => getCustomer() + onCompleted: () => getCustomer(), }) const [disableTestCustomer] = useMutation(DISABLE_TEST_CUSTOMER, { variables: { customerId }, - onCompleted: () => getCustomer() + onCompleted: () => getCustomer(), }) const [checkAgainstSanctions] = useLazyQuery(CHECK_AGAINST_SANCTIONS, { - onCompleted: () => getCustomer() + onCompleted: () => getCustomer(), }) const updateCustomer = it => setCustomer({ variables: { customerId, - customerInput: it - } + customerInput: it, + }, }) const replacePhoto = it => { @@ -409,8 +409,8 @@ const CustomerProfile = memo(() => { variables: { customerId, newPhoto: it.newPhoto, - photoType: it.photoType - } + photoType: it.photoType, + }, }) setWizard(null) } @@ -419,8 +419,8 @@ const CustomerProfile = memo(() => { editCustomerData({ variables: { customerId, - customerEdit: it - } + customerEdit: it, + }, }) setWizard(null) } @@ -429,8 +429,8 @@ const CustomerProfile = memo(() => { deleteCustomerEditedData({ variables: { customerId, - customerEdit: it - } + customerEdit: it, + }, }) const createCustomerNote = it => @@ -438,23 +438,23 @@ const CustomerProfile = memo(() => { variables: { customerId, title: it.title, - content: it.content - } + content: it.content, + }, }) const deleteCustomerNote = it => deleteNote({ variables: { - noteId: it.noteId - } + noteId: it.noteId, + }, }) const editCustomerNote = it => editNote({ variables: { noteId: it.noteId, - newContent: it.newContent - } + newContent: it.newContent, + }, }) const onClickSidebarItem = code => setClickedItem(code) @@ -464,7 +464,7 @@ const CustomerProfile = memo(() => { const customerData = R.path(['customer'])(customerResponse) ?? [] const rawTransactions = R.path(['transactions'])(customerData) ?? [] const sortedTransactions = R.sort(R.descend(R.prop('cryptoAtoms')))( - rawTransactions + rawTransactions, ) const name = getName(customerData) const blocked = @@ -477,12 +477,12 @@ const CustomerProfile = memo(() => { const isPhotos = clickedItem === 'photos' const frontCameraData = R.pick(['frontCameraPath', 'frontCameraAt'])( - customerData + customerData, ) const txPhotosData = sortedTransactions && R.map(R.pick(['id', 'txCustomerPhotoPath', 'txCustomerPhotoAt']))( - sortedTransactions + sortedTransactions, ) const photosData = formatPhotosData(R.append(frontCameraData, txPhotosData)) @@ -491,8 +491,8 @@ const CustomerProfile = memo(() => { { photoDir: 'id-card-photo', path: customerData.idCardPhotoPath, - date: customerData.idCardPhotoAt - } + date: customerData.idCardPhotoAt, + }, ] : [] @@ -503,7 +503,7 @@ const CustomerProfile = memo(() => { const customInfoRequirementOptions = activeCustomRequests?.customInfoRequests?.map(it => ({ value: it.id, - display: it.customRequest.name + display: it.customRequest.name, })) ?? [] const email = R.path(['email'])(customerData) @@ -565,7 +565,7 @@ const CustomerProfile = memo(() => { InverseIcon={AuthorizeReversedIcon} onClick={() => updateCustomer({ - suspendedUntil: null + suspendedUntil: null, }) }> {`Unsuspend customer`} @@ -582,7 +582,7 @@ const CustomerProfile = memo(() => { updateCustomer({ authorizedOverride: blocked ? OVERRIDE_AUTHORIZED - : OVERRIDE_REJECTED + : OVERRIDE_REJECTED, }) }> {`${blocked ? 'Authorize' : 'Block'} customer`} diff --git a/packages/admin-ui/src/pages/Customers/Customers.jsx b/packages/admin-ui/src/pages/Customers/Customers.jsx index 284363e6..892fe634 100644 --- a/packages/admin-ui/src/pages/Customers/Customers.jsx +++ b/packages/admin-ui/src/pages/Customers/Customers.jsx @@ -108,10 +108,10 @@ const Customers = () => { const { data: customersResponse, loading: customerLoading, - refetch + refetch, } = useQuery(GET_CUSTOMERS, { variables, - onCompleted: data => setFilteredCustomers(R.path(['customers'])(data)) + onCompleted: data => setFilteredCustomers(R.path(['customers'])(data)), }) const { data: filtersResponse, loading: loadingFilters } = @@ -122,9 +122,9 @@ const Customers = () => { refetchQueries: () => [ { query: GET_CUSTOMERS, - variables - } - ] + variables, + }, + ], }) const configData = R.path(['config'])(customersResponse) ?? [] @@ -137,14 +137,14 @@ const Customers = () => { R.assoc( 'authorizedStatus', getAuthorizedStatus(c, triggers, customRequirementsData), - c + c, ) const byAuthorized = c => (c.authorizedStatus.label === 'Pending' ? 0 : 1) const byLastActive = c => new Date(R.prop('lastActive', c) ?? '0') const customersData = R.pipe( R.map(setAuthorizedStatus), - R.sortWith([R.ascend(byAuthorized), R.descend(byLastActive)]) + R.sortWith([R.ascend(byAuthorized), R.descend(byLastActive)]), )(filteredCustomers ?? []) const onFilterChange = filters => { @@ -157,7 +157,7 @@ const Customers = () => { name: filtersObject.name, email: filtersObject.email, address: filtersObject.address, - id: filtersObject.id + id: filtersObject.id, }) refetch && refetch() @@ -165,7 +165,7 @@ const Customers = () => { const onFilterDelete = filter => { const newFilters = R.filter( - f => !R.whereEq(R.pick(['type', 'value'], f), filter) + f => !R.whereEq(R.pick(['type', 'value'], f), filter), )(filters) setFilters(newFilters) @@ -177,7 +177,7 @@ const Customers = () => { name: filtersObject.name, email: filtersObject.email, address: filtersObject.address, - id: filtersObject.id + id: filtersObject.id, }) refetch && refetch() @@ -192,7 +192,7 @@ const Customers = () => { name: filtersObject.name, email: filtersObject.email, address: filtersObject.address, - id: filtersObject.id + id: filtersObject.id, }) refetch && refetch() @@ -224,7 +224,7 @@ const Customers = () => { } labels={[ { label: 'Cash-in', icon: }, - { label: 'Cash-out', icon: } + { label: 'Cash-out', icon: }, ]} /> {filters.length > 0 && ( diff --git a/packages/admin-ui/src/pages/Customers/CustomersList.jsx b/packages/admin-ui/src/pages/Customers/CustomersList.jsx index 66b67833..10f01cfa 100644 --- a/packages/admin-ui/src/pages/Customers/CustomersList.jsx +++ b/packages/admin-ui/src/pages/Customers/CustomersList.jsx @@ -8,44 +8,37 @@ import TxOutIcon from 'src/styling/icons/direction/cash-out.svg?react' import { getFormattedPhone, getName } from './helper' -const CustomersList = ({ - data, - locale, - onClick, - loading, - triggers, - customRequests -}) => { +const CustomersList = ({ data, locale, onClick, loading }) => { const elements = [ { header: 'Phone/email', width: 199, view: it => `${getFormattedPhone(it.phone, locale.country) || ''} - ${it.email || ''}` + ${it.email || ''}`, }, { header: 'Name', width: 241, - view: getName + view: getName, }, { header: 'Total Txs', width: 126, textAlign: 'right', - view: it => `${Number.parseInt(it.totalTxs)}` + view: it => `${Number.parseInt(it.totalTxs)}`, }, { header: 'Total spent', width: 152, textAlign: 'right', view: it => - `${Number.parseFloat(it.totalSpent)} ${it.lastTxFiatCode ?? ''}` + `${Number.parseFloat(it.totalSpent)} ${it.lastTxFiatCode ?? ''}`, }, { header: 'Last active', width: 133, view: it => - (it.lastActive && format('yyyy-MM-dd', new Date(it.lastActive))) ?? '' + (it.lastActive && format('yyyy-MM-dd', new Date(it.lastActive))) ?? '', }, { header: 'Last transaction', @@ -62,13 +55,13 @@ const CustomersList = ({ {hasLastTx && lastIcon} ) - } + }, }, { header: 'Status', width: 191, - view: it => - } + view: it => , + }, ] return ( diff --git a/packages/admin-ui/src/pages/Customers/Wizard.jsx b/packages/admin-ui/src/pages/Customers/Wizard.jsx index cb94bbab..f11c845b 100644 --- a/packages/admin-ui/src/pages/Customers/Wizard.jsx +++ b/packages/admin-ui/src/pages/Customers/Wizard.jsx @@ -13,7 +13,7 @@ import { requirementElements, formatDates, REQUIREMENT, - ID_CARD_DATA + ID_CARD_DATA, } from './helper' const LAST_STEP = 2 @@ -41,12 +41,12 @@ const Wizard = ({ error, customInfoRequirementOptions, addCustomerData, - addPhoto + addPhoto, }) => { const [selectedValues, setSelectedValues] = useState(null) const [{ step, config }, setState] = useState({ - step: 1 + step: 1, }) const isIdCardData = values => values?.requirement === ID_CARD_DATA @@ -67,7 +67,7 @@ const Wizard = ({ case 'customerDataUpload': return addPhoto({ newPhoto: R.head(R.values(it)), - photoType: R.head(R.keys(it)) + photoType: R.head(R.keys(it)), }) case 'customEntry': return save(newConfig) @@ -82,7 +82,7 @@ const Wizard = ({ setState({ step: step + 1, - config: newConfig + config: newConfig, }) } diff --git a/packages/admin-ui/src/pages/Customers/components/CreateCustomerModal.jsx b/packages/admin-ui/src/pages/Customers/components/CreateCustomerModal.jsx index c71f5289..4ca2737f 100644 --- a/packages/admin-ui/src/pages/Customers/components/CreateCustomerModal.jsx +++ b/packages/admin-ui/src/pages/Customers/components/CreateCustomerModal.jsx @@ -17,13 +17,14 @@ const getValidationSchema = countryCodes => .test('is-valid-number', 'That is not a valid phone number', value => { try { return countryCodes.some(countryCode => - parsePhoneNumberWithError(value, countryCode).isValid() + parsePhoneNumberWithError(value, countryCode).isValid(), ) } catch (e) { + console.error(e) return false } }) - .trim() + .trim(), }) const formatPhoneNumber = (countryCodes, numberStr) => { @@ -36,7 +37,7 @@ const formatPhoneNumber = (countryCodes, numberStr) => { } const initialValues = { - phoneNumber: '' + phoneNumber: '', } const getErrorMsg = (formikErrors, formikTouched) => { @@ -49,7 +50,7 @@ const getErrorMsg = (formikErrors, formikTouched) => { const CreateCustomerModal = ({ showModal, handleClose, onSubmit, locale }) => { const possibleCountries = R.append( locale?.country, - R.map(it => it.country, locale?.overrides ?? []) + R.map(it => it.country, locale?.overrides ?? []), ) return ( @@ -68,9 +69,9 @@ const CreateCustomerModal = ({ showModal, handleClose, onSubmit, locale }) => { variables: { phoneNumber: formatPhoneNumber( possibleCountries, - values.phoneNumber - ) - } + values.phoneNumber, + ), + }, }) }}> {({ errors, touched }) => ( diff --git a/packages/admin-ui/src/pages/Customers/components/CustomerDetails.jsx b/packages/admin-ui/src/pages/Customers/components/CustomerDetails.jsx index fb09c760..e720e332 100644 --- a/packages/admin-ui/src/pages/Customers/components/CustomerDetails.jsx +++ b/packages/admin-ui/src/pages/Customers/components/CustomerDetails.jsx @@ -18,29 +18,29 @@ const CustomerDetails = memo(({ customer, photosData, locale, timezone }) => { { header: 'Phone number', size: 172, - value: getFormattedPhone(customer.phone, locale.country) - } + value: getFormattedPhone(customer.phone, locale.country), + }, ] if (idNumber) elements.push({ header: 'ID number', size: 172, - value: idNumber + value: idNumber, }) if (usSsn) elements.push({ header: 'US SSN', size: 127, - value: usSsn + value: usSsn, }) if (email) elements.push({ header: 'Email', size: 190, - value: email + value: email, }) return ( diff --git a/packages/admin-ui/src/pages/Customers/components/CustomerSidebar.jsx b/packages/admin-ui/src/pages/Customers/components/CustomerSidebar.jsx index 3b396d96..b7109e78 100644 --- a/packages/admin-ui/src/pages/Customers/components/CustomerSidebar.jsx +++ b/packages/admin-ui/src/pages/Customers/components/CustomerSidebar.jsx @@ -17,26 +17,26 @@ const CustomerSidebar = ({ isSelected, onClick }) => { code: 'overview', display: 'Overview', Icon: OverviewIcon, - InverseIcon: OverviewReversedIcon + InverseIcon: OverviewReversedIcon, }, { code: 'customerData', display: 'Customer data', Icon: CustomerDataIcon, - InverseIcon: CustomerDataReversedIcon + InverseIcon: CustomerDataReversedIcon, }, { code: 'notes', display: 'Notes', Icon: NoteIcon, - InverseIcon: NoteReversedIcon + InverseIcon: NoteReversedIcon, }, { code: 'photos', display: 'Photos & files', Icon: Photos, - InverseIcon: PhotosReversedIcon - } + InverseIcon: PhotosReversedIcon, + }, ] return ( @@ -46,7 +46,7 @@ const CustomerSidebar = ({ isSelected, onClick }) => { key={idx} className={classnames({ 'gap-4 p-4 cursor-pointer flex items-center': true, - 'bg-comet2': isSelected(code) + 'bg-comet2': isSelected(code), })} onClick={() => onClick(code)}> {isSelected(code) ? : } @@ -54,7 +54,7 @@ const CustomerSidebar = ({ isSelected, onClick }) => { noMargin className={classnames({ 'text-comet2': true, - 'text-white font-bold': isSelected(code) + 'text-white font-bold': isSelected(code), })}> {display}

diff --git a/packages/admin-ui/src/pages/Customers/components/EditableCard.jsx b/packages/admin-ui/src/pages/Customers/components/EditableCard.jsx index f03378f0..8ec57d4a 100644 --- a/packages/admin-ui/src/pages/Customers/components/EditableCard.jsx +++ b/packages/admin-ui/src/pages/Customers/components/EditableCard.jsx @@ -20,7 +20,7 @@ import SaveReversedIcon from 'src/styling/icons/circle buttons/save/white.svg?re import { ActionButton } from 'src/components/buttons' import { OVERRIDE_REJECTED, - OVERRIDE_PENDING + OVERRIDE_PENDING, } from 'src/pages/Customers/components/consts' const ReadOnlyField = ({ field, value }) => { @@ -73,9 +73,8 @@ const EditableCard = ({ children = () => {}, validationSchema, initialValues, - deleteEditedData, editable, - checkAgainstSanctions + checkAgainstSanctions, }) => { const formRef = useRef() diff --git a/packages/admin-ui/src/pages/Customers/components/PhotosCard.jsx b/packages/admin-ui/src/pages/Customers/components/PhotosCard.jsx index dd72a435..8a0fd60c 100644 --- a/packages/admin-ui/src/pages/Customers/components/PhotosCard.jsx +++ b/packages/admin-ui/src/pages/Customers/components/PhotosCard.jsx @@ -13,7 +13,7 @@ const PhotosCard = memo(({ photosData, timezone }) => { const sortedPhotosData = R.sortWith( [(a, b) => R.has('id', a) - R.has('id', b), R.descend(R.prop('date'))], - photosData + photosData, ) const singlePhoto = R.head(sortedPhotosData) diff --git a/packages/admin-ui/src/pages/Customers/components/PhotosCarousel.jsx b/packages/admin-ui/src/pages/Customers/components/PhotosCarousel.jsx index 006addca..91e6b567 100644 --- a/packages/admin-ui/src/pages/Customers/components/PhotosCarousel.jsx +++ b/packages/admin-ui/src/pages/Customers/components/PhotosCarousel.jsx @@ -43,7 +43,7 @@ const PhotosCarousel = memo(({ photosData, timezone }) => { formatDate( photosData[currentIndex]?.date, timezone, - 'yyyy-MM-dd HH:mm' + 'yyyy-MM-dd HH:mm', )}
diff --git a/packages/admin-ui/src/pages/Customers/components/TransactionsList.jsx b/packages/admin-ui/src/pages/Customers/components/TransactionsList.jsx index f426a20e..60594450 100644 --- a/packages/admin-ui/src/pages/Customers/components/TransactionsList.jsx +++ b/packages/admin-ui/src/pages/Customers/components/TransactionsList.jsx @@ -25,16 +25,16 @@ const TransactionsList = ({ customer, data, loading }) => { size: 127, value: ifNotNull( customer.totalTxs, - `${Number.parseInt(customer.totalTxs)}` - ) + `${Number.parseInt(customer.totalTxs)}`, + ), }, { header: 'Transaction volume', size: 167, value: ifNotNull( customer.totalSpent, - `${Number.parseFloat(customer.totalSpent)} ${customer.lastTxFiatCode}` - ) + `${Number.parseFloat(customer.totalSpent)} ${customer.lastTxFiatCode}`, + ), }, { header: 'Last active', @@ -43,7 +43,7 @@ const TransactionsList = ({ customer, data, loading }) => { !R.isNil(timezone) && ((customer.lastActive && formatDate(customer.lastActive, timezone, 'yyyy-MM-dd')) ?? - '') + ''), }, { header: 'Last transaction', @@ -54,14 +54,14 @@ const TransactionsList = ({ customer, data, loading }) => { {`${Number.parseFloat(customer.lastTxFiat)} ${customer.lastTxFiatCode}`} - - ) + , + ), }, { header: 'Last used machine', size: 198, - value: ifNotNull(lastUsedMachineName, <>{lastUsedMachineName}) - } + value: ifNotNull(lastUsedMachineName, <>{lastUsedMachineName}), + }, ] const tableElements = [ @@ -75,12 +75,12 @@ const TransactionsList = ({ customer, data, loading }) => { )} - ) + ), }, { header: 'Machine', width: 160, - view: R.path(['machineName']) + view: R.path(['machineName']), }, { header: 'Transaction ID', @@ -89,7 +89,7 @@ const TransactionsList = ({ customer, data, loading }) => { {it.id} - ) + ), }, { header: 'Cash', @@ -100,7 +100,7 @@ const TransactionsList = ({ customer, data, loading }) => { {`${Number.parseFloat(it.fiat)} `} {it.fiatCode} - ) + ), }, { header: 'Crypto', @@ -109,22 +109,22 @@ const TransactionsList = ({ customer, data, loading }) => { view: it => ( <> {`${toUnit(new BigNumber(it.cryptoAtoms), it.cryptoCode).toFormat( - 5 + 5, )} `} {it.cryptoCode} - ) + ), }, { header: 'Date', width: 100, - view: it => formatDate(it.created, timezone, 'yyyy‑MM‑dd') + view: it => formatDate(it.created, timezone, 'yyyy‑MM‑dd'), }, { header: 'Time (h:m:s)', width: 130, - view: it => formatDate(it.created, timezone, 'HH:mm:ss') - } + view: it => formatDate(it.created, timezone, 'HH:mm:ss'), + }, ] return ( diff --git a/packages/admin-ui/src/pages/Customers/components/Upload.jsx b/packages/admin-ui/src/pages/Customers/components/Upload.jsx index 1e81c289..94b48ae3 100644 --- a/packages/admin-ui/src/pages/Customers/components/Upload.jsx +++ b/packages/admin-ui/src/pages/Customers/components/Upload.jsx @@ -27,10 +27,10 @@ const Upload = ({ type }) => { setData({ preview: isImage ? URL.createObjectURL(R.head(acceptedData)) - : R.head(acceptedData).name + : R.head(acceptedData).name, }) }, - [isImage, type, setFieldValue] + [isImage, type, setFieldValue], ) const { getRootProps, getInputProps } = useDropzone({ onDrop }) diff --git a/packages/admin-ui/src/pages/Customers/components/index.js b/packages/admin-ui/src/pages/Customers/components/index.js index 448efe76..41020d36 100644 --- a/packages/admin-ui/src/pages/Customers/components/index.js +++ b/packages/admin-ui/src/pages/Customers/components/index.js @@ -12,5 +12,5 @@ export { CustomerSidebar, EditableCard, Wizard, - Upload + Upload, } diff --git a/packages/admin-ui/src/pages/Customers/components/notes/NewNoteModal.jsx b/packages/admin-ui/src/pages/Customers/components/notes/NewNoteModal.jsx index 5725472a..99d09f5c 100644 --- a/packages/admin-ui/src/pages/Customers/components/notes/NewNoteModal.jsx +++ b/packages/admin-ui/src/pages/Customers/components/notes/NewNoteModal.jsx @@ -9,12 +9,12 @@ import { TextInput } from 'src/components/inputs/formik' const initialValues = { title: '', - content: '' + content: '', } const validationSchema = Yup.object().shape({ title: Yup.string().required().trim().max(25), - content: Yup.string().required() + content: Yup.string().required(), }) const NewNoteModal = ({ showModal, onClose, onSubmit, errorMsg }) => { diff --git a/packages/admin-ui/src/pages/Customers/components/notes/NoteEdit.jsx b/packages/admin-ui/src/pages/Customers/components/notes/NoteEdit.jsx index ea9f8ca3..d53bc2d2 100644 --- a/packages/admin-ui/src/pages/Customers/components/notes/NoteEdit.jsx +++ b/packages/admin-ui/src/pages/Customers/components/notes/NoteEdit.jsx @@ -17,11 +17,11 @@ const NoteEdit = ({ note, cancel, edit, timezone }) => { const formRef = useRef() const validationSchema = Yup.object().shape({ - content: Yup.string() + content: Yup.string(), }) const initialValues = { - content: note.content + content: note.content, } return ( @@ -33,8 +33,8 @@ const NoteEdit = ({ note, cancel, edit, timezone }) => { { delimited: ', ' }, intervalToDuration({ start: toTimezone(new Date(note.lastEditedAt), timezone), - end: toTimezone(new Date(), timezone) - }) + end: toTimezone(new Date(), timezone), + }), )} {` ago`}

@@ -74,7 +74,7 @@ const NoteEdit = ({ note, cancel, edit, timezone }) => { edit({ noteId: note.id, newContent: content, - oldContent: note.content + oldContent: note.content, }) } innerRef={formRef}> diff --git a/packages/admin-ui/src/pages/Customers/helper.jsx b/packages/admin-ui/src/pages/Customers/helper.jsx index ca672fc7..8e894c04 100644 --- a/packages/admin-ui/src/pages/Customers/helper.jsx +++ b/packages/admin-ui/src/pages/Customers/helper.jsx @@ -10,7 +10,7 @@ import * as Yup from 'yup' import { RadioGroup, TextInput, - Autocomplete + Autocomplete, } from 'src/components/inputs/formik' import { MANUAL } from 'src/utils/constants' @@ -24,7 +24,7 @@ const ID_CARD_DATA = 'idCardData' const getAuthorizedStatus = (it, triggers, customRequests) => { const fields = R.concat( ['frontCamera', 'idCardData', 'idCardPhoto', 'email', 'usSsn', 'sanctions'], - R.map(ite => ite.id, customRequests) + R.map(ite => ite.id, customRequests), ) const fieldsWithPathSuffix = ['frontCamera', 'idCardPhoto'] @@ -34,13 +34,13 @@ const getAuthorizedStatus = (it, triggers, customRequests) => { : fieldName const manualOverrides = R.filter( ite => R.equals(R.toLower(ite.automation), MANUAL), - triggers?.overrides ?? [] + triggers?.overrides ?? [], ) return ( !!R.find( ite => R.equals(ite.requirement, triggerName), - manualOverrides + manualOverrides, ) || R.equals(R.toLower(triggers.automation ?? ''), MANUAL) ) } @@ -50,7 +50,7 @@ const getAuthorizedStatus = (it, triggers, customRequests) => { if (uuidValidate(ite)) { const request = R.find( iter => iter.infoRequestId === ite, - it.customInfoRequests + it.customInfoRequests, ) return !R.isNil(request) && R.equals(request.override, 'automatic') } @@ -69,7 +69,7 @@ const getAuthorizedStatus = (it, triggers, customRequests) => { if (uuidValidate(ite)) { const request = R.find( iter => iter.infoRequestId === ite, - it.customInfoRequests + it.customInfoRequests, ) return !R.isNil(request) && R.equals(request.override, 'blocked') } @@ -115,11 +115,11 @@ const getName = it => { const entryOptions = [ { display: 'Custom entry', code: 'custom' }, - { display: 'Populate existing requirement', code: 'requirement' } + { display: 'Populate existing requirement', code: 'requirement' }, ] const dataOptions = [ - { display: 'Text', code: 'text' } + { display: 'Text', code: 'text' }, // TODO: Requires backend modifications to support File and Image // { display: 'File', code: 'file' }, // { display: 'Image', code: 'image' } @@ -130,12 +130,12 @@ const requirementOptions = [ { display: 'ID data', code: 'idCardData' }, { display: 'US SSN', code: 'usSsn' }, { display: 'Email', code: 'email' }, - { display: 'Customer camera', code: 'frontCamera' } + { display: 'Customer camera', code: 'frontCamera' }, ] const customTextOptions = [ { label: 'Data entry title', name: 'title' }, - { label: 'Data entry', name: 'data' } + { label: 'Data entry', name: 'data' }, ] const customUploadOptions = [{ label: 'Data entry title', name: 'title' }] @@ -144,40 +144,40 @@ const entryTypeSchema = Yup.lazy(values => { if (values.entryType === 'custom') { return Yup.object().shape({ entryType: Yup.string().required(), - dataType: Yup.string().required() + dataType: Yup.string().required(), }) } else if (values.entryType === 'requirement') { return Yup.object().shape({ entryType: Yup.string().required(), - requirement: Yup.string().required() + requirement: Yup.string().required(), }) } }) const customFileSchema = Yup.object().shape({ title: Yup.string().required(), - file: Yup.mixed().required() + file: Yup.mixed().required(), }) const customImageSchema = Yup.object().shape({ title: Yup.string().required(), - image: Yup.mixed().required() + image: Yup.mixed().required(), }) const customTextSchema = Yup.object().shape({ title: Yup.string().required(), - data: Yup.string().required() + data: Yup.string().required(), }) const updateRequirementOptions = it => [ { display: 'Custom information requirement', - code: 'custom' + code: 'custom', }, - ...it + ...it, ] -const EntryType = ({ customInfoRequirementOptions }) => { +const EntryType = () => { const { values } = useFormikContext() const displayCustomOptions = values.entryType === CUSTOM @@ -265,7 +265,7 @@ const ManualDataEntry = ({ selectedValues, customInfoRequirementOptions }) => { isOptionEqualToValue={R.eqProps('code')} labelProp={'display'} options={customInfoRequirementOptions} - onChange={(evt, it) => {}} + onChange={() => {}} /> )}
@@ -297,29 +297,29 @@ const customElements = { options: customTextOptions, Component: ManualDataEntry, initialValues: { data: '', title: '' }, - saveType: 'customEntry' + saveType: 'customEntry', }, file: { schema: customFileSchema, options: customUploadOptions, Component: ManualDataEntry, initialValues: { file: null, title: '' }, - saveType: 'customEntryUpload' + saveType: 'customEntryUpload', }, image: { schema: customImageSchema, options: customUploadOptions, Component: ManualDataEntry, initialValues: { image: null, title: '' }, - saveType: 'customEntryUpload' - } + saveType: 'customEntryUpload', + }, } const entryType = { schema: entryTypeSchema, options: entryOptions, Component: EntryType, - initialValues: { entryType: '' } + initialValues: { entryType: '' }, } // Customer data @@ -330,44 +330,44 @@ const customerDataElements = { name: 'firstName', label: 'First name', component: TextInput, - editable: true + editable: true, }, { name: 'documentNumber', label: 'ID number', component: TextInput, - editable: true + editable: true, }, { name: 'dateOfBirth', label: 'Birthdate', component: TextInput, - editable: true + editable: true, }, { name: 'gender', label: 'Gender', component: TextInput, - editable: true + editable: true, }, { name: 'lastName', label: 'Last name', component: TextInput, - editable: true + editable: true, }, { name: 'expirationDate', label: 'Expiration date', component: TextInput, - editable: true + editable: true, }, { name: 'country', label: 'Country', component: TextInput, - editable: true - } + editable: true, + }, ], usSsn: [ { @@ -375,8 +375,8 @@ const customerDataElements = { label: 'US SSN', component: TextInput, size: 190, - editable: true - } + editable: true, + }, ], email: [ { @@ -384,11 +384,11 @@ const customerDataElements = { label: 'Email', component: TextInput, size: 190, - editable: false - } + editable: false, + }, ], idCardPhoto: [{ name: 'idCardPhoto' }], - frontCamera: [{ name: 'frontCamera' }] + frontCamera: [{ name: 'frontCamera' }], } const customerDataSchemas = { @@ -399,7 +399,7 @@ const customerDataSchemas = { dateOfBirth: Yup.string() .test({ test: val => isValid(parse(new Date(), 'yyyy-MM-dd', val)), - message: 'Date must be in format YYYY-MM-DD' + message: 'Date must be in format YYYY-MM-DD', }) .required(), gender: Yup.string().required(), @@ -407,22 +407,22 @@ const customerDataSchemas = { expirationDate: Yup.string() .test({ test: val => isValid(parse(new Date(), 'yyyy-MM-dd', val)), - message: 'Date must be in format YYYY-MM-DD' + message: 'Date must be in format YYYY-MM-DD', }) - .required() + .required(), }), usSsn: Yup.object().shape({ - usSsn: Yup.string().required() + usSsn: Yup.string().required(), }), idCardPhoto: Yup.object().shape({ - idCardPhoto: Yup.mixed().required() + idCardPhoto: Yup.mixed().required(), }), frontCamera: Yup.object().shape({ - frontCamera: Yup.mixed().required() + frontCamera: Yup.mixed().required(), }), email: Yup.object().shape({ - email: Yup.string().required() - }) + email: Yup.string().required(), + }), } const requirementElements = { @@ -437,44 +437,44 @@ const requirementElements = { dateOfBirth: '', gender: '', country: '', - expirationDate: '' + expirationDate: '', }, - saveType: 'customerData' + saveType: 'customerData', }, usSsn: { schema: customerDataSchemas.usSsn, options: customerDataElements.usSsn, Component: ManualDataEntry, initialValues: { usSsn: '' }, - saveType: 'customerData' + saveType: 'customerData', }, email: { schema: customerDataSchemas.email, options: customerDataElements.email, Component: ManualDataEntry, initialValues: { email: '' }, - saveType: 'customerData' + saveType: 'customerData', }, idCardPhoto: { schema: customerDataSchemas.idCardPhoto, options: customerDataElements.idCardPhoto, Component: ManualDataEntry, initialValues: { idCardPhoto: null }, - saveType: 'customerDataUpload' + saveType: 'customerDataUpload', }, frontCamera: { schema: customerDataSchemas.frontCamera, options: customerDataElements.frontCamera, Component: ManualDataEntry, initialValues: { frontCamera: null }, - saveType: 'customerDataUpload' + saveType: 'customerDataUpload', }, custom: { // schema: customerDataSchemas.customInfoRequirement, Component: ManualDataEntry, initialValues: { customInfoRequirement: null }, - saveType: 'customInfoRequirement' - } + saveType: 'customInfoRequirement', + }, } const tryFormatDate = rawDate => { @@ -485,6 +485,7 @@ const tryFormatDate = rawDate => { '' ) } catch (err) { + console.error(err) return '' } } @@ -493,8 +494,8 @@ const formatDates = values => { R.map( elem => (values[elem] = format('yyyyMMdd')( - parse(new Date(), 'yyyy-MM-dd', values[elem]) - )) + parse(new Date(), 'yyyy-MM-dd', values[elem]), + )), )(['dateOfBirth', 'expirationDate']) return values } @@ -520,13 +521,13 @@ const addPhotoDir = R.map(it => { const standardizeKeys = R.map(R.compose(R.fromPairs, R.map(mapKeys), R.toPairs)) const filterByPhotoAvailable = R.filter( - tx => !R.isNil(tx.date) && !R.isNil(tx.path) + tx => !R.isNil(tx.date) && !R.isNil(tx.path), ) const formatPhotosData = R.compose( filterByPhotoAvailable, addPhotoDir, - standardizeKeys + standardizeKeys, ) export { @@ -543,5 +544,5 @@ export { tryFormatDate, REQUIREMENT, CUSTOM, - ID_CARD_DATA + ID_CARD_DATA, } diff --git a/packages/admin-ui/src/pages/Dashboard/Alerts/Alerts.jsx b/packages/admin-ui/src/pages/Dashboard/Alerts/Alerts.jsx index bb88d73f..e0f66499 100644 --- a/packages/admin-ui/src/pages/Dashboard/Alerts/Alerts.jsx +++ b/packages/admin-ui/src/pages/Dashboard/Alerts/Alerts.jsx @@ -35,7 +35,7 @@ const Alerts = ({ onReset, onExpand, size }) => { const alerts = R.path(['alerts'])(data) ?? [] const machines = R.compose( R.map(R.prop('name')), - R.indexBy(R.prop('deviceId')) + R.indexBy(R.prop('deviceId')), )(data?.machines ?? []) const alertsLength = alerts.length diff --git a/packages/admin-ui/src/pages/Dashboard/Alerts/AlertsTable.jsx b/packages/admin-ui/src/pages/Dashboard/Alerts/AlertsTable.jsx index 604a2992..35345401 100644 --- a/packages/admin-ui/src/pages/Dashboard/Alerts/AlertsTable.jsx +++ b/packages/admin-ui/src/pages/Dashboard/Alerts/AlertsTable.jsx @@ -13,13 +13,13 @@ const icons = { error: , fiatBalance: ( - ) + ), } const links = { error: '/maintenance/machine-status', fiatBalance: '/maintenance/cash-cassettes', - cryptoBalance: '/maintenance/funding' + cryptoBalance: '/maintenance/funding', } const AlertsTable = ({ numToRender, alerts, machines }) => { diff --git a/packages/admin-ui/src/pages/Dashboard/Alerts/index.js b/packages/admin-ui/src/pages/Dashboard/Alerts/index.js index 2b2f3f45..62844083 100644 --- a/packages/admin-ui/src/pages/Dashboard/Alerts/index.js +++ b/packages/admin-ui/src/pages/Dashboard/Alerts/index.js @@ -1,2 +1,3 @@ import Alerts from './Alerts' + export default Alerts diff --git a/packages/admin-ui/src/pages/Dashboard/Footer/Footer.jsx b/packages/admin-ui/src/pages/Dashboard/Footer/Footer.jsx index 6b751407..cd50cf23 100644 --- a/packages/admin-ui/src/pages/Dashboard/Footer/Footer.jsx +++ b/packages/admin-ui/src/pages/Dashboard/Footer/Footer.jsx @@ -47,24 +47,24 @@ const Footer = () => { const tickerName = tickerIdx > -1 ? accountsConfig[tickerIdx].display : '' const cashInNoCommission = parseFloat( - R.path(['cryptoRates', 'withoutCommissions', key, 'cashIn'])(data) + R.path(['cryptoRates', 'withoutCommissions', key, 'cashIn'])(data), ) const cashOutNoCommission = parseFloat( - R.path(['cryptoRates', 'withoutCommissions', key, 'cashOut'])(data) + R.path(['cryptoRates', 'withoutCommissions', key, 'cashOut'])(data), ) const avgOfAskBid = new BigNumber( - (cashInNoCommission + cashOutNoCommission) / 2 + (cashInNoCommission + cashOutNoCommission) / 2, ).toFormat(2) const cashIn = new BigNumber( parseFloat( - R.path(['cryptoRates', 'withCommissions', key, 'cashIn'])(data) - ) + R.path(['cryptoRates', 'withCommissions', key, 'cashIn'])(data), + ), ).toFormat(2) const cashOut = new BigNumber( parseFloat( - R.path(['cryptoRates', 'withCommissions', key, 'cashOut'])(data) - ) + R.path(['cryptoRates', 'withCommissions', key, 'cashOut'])(data), + ), ).toFormat(2) return ( diff --git a/packages/admin-ui/src/pages/Dashboard/Footer/Footer.module.css b/packages/admin-ui/src/pages/Dashboard/Footer/Footer.module.css index 304ffbb5..c3c89bf6 100644 --- a/packages/admin-ui/src/pages/Dashboard/Footer/Footer.module.css +++ b/packages/admin-ui/src/pages/Dashboard/Footer/Footer.module.css @@ -12,9 +12,9 @@ } .footer1:hover { - transition: min-height 0.5s ease-in; - min-height: 200px; - } + transition: min-height 0.5s ease-in; + min-height: 200px; +} .content1 { width: 1200px; diff --git a/packages/admin-ui/src/pages/Dashboard/Footer/index.js b/packages/admin-ui/src/pages/Dashboard/Footer/index.js index 426e806d..9c7e8318 100644 --- a/packages/admin-ui/src/pages/Dashboard/Footer/index.js +++ b/packages/admin-ui/src/pages/Dashboard/Footer/index.js @@ -1,2 +1,3 @@ import Footer from './Footer' + export default Footer diff --git a/packages/admin-ui/src/pages/Dashboard/RightSide.jsx b/packages/admin-ui/src/pages/Dashboard/RightSide.jsx index e7a438f0..acffe2dc 100644 --- a/packages/admin-ui/src/pages/Dashboard/RightSide.jsx +++ b/packages/admin-ui/src/pages/Dashboard/RightSide.jsx @@ -39,7 +39,7 @@ const RightSide = () => { { className={classnames({ 'flex-[0.1]': systemStatusSize === cardState.SHRUNK, 'flex-1': systemStatusSize === cardState.DEFAULT, - 'flex-[0.9]': systemStatusSize === cardState.EXPANDED + 'flex-[0.9]': systemStatusSize === cardState.EXPANDED, })} state={systemStatusSize} shrunkComponent={ diff --git a/packages/admin-ui/src/pages/Dashboard/SystemPerformance/Graphs/PercentageChart.jsx b/packages/admin-ui/src/pages/Dashboard/SystemPerformance/Graphs/PercentageChart.jsx index 775ed780..d678140e 100644 --- a/packages/admin-ui/src/pages/Dashboard/SystemPerformance/Graphs/PercentageChart.jsx +++ b/packages/admin-ui/src/pages/Dashboard/SystemPerformance/Graphs/PercentageChart.jsx @@ -12,7 +12,7 @@ const PercentageChart = ({ cashIn, cashOut }) => { const percentageClasses = { 'h-35 rounded-sm flex items-center justify-center': true, - 'min-w-2 rounded-xs': value < 5 && value > 0 + 'min-w-2 rounded-xs': value < 5 && value > 0, } return ( diff --git a/packages/admin-ui/src/pages/Dashboard/SystemPerformance/Graphs/RefLineChart.jsx b/packages/admin-ui/src/pages/Dashboard/SystemPerformance/Graphs/RefLineChart.jsx index 2dc3787e..1d5808e7 100644 --- a/packages/admin-ui/src/pages/Dashboard/SystemPerformance/Graphs/RefLineChart.jsx +++ b/packages/admin-ui/src/pages/Dashboard/SystemPerformance/Graphs/RefLineChart.jsx @@ -23,14 +23,14 @@ const reducer = (acc, tx) => { const timeFrameMS = { Day: 24 * 3600 * 1000, Week: 7 * 24 * 3600 * 1000, - Month: 30 * 24 * 3600 * 1000 + Month: 30 * 24 * 3600 * 1000, } const RefLineChart = ({ data: realData, previousTimeData, previousProfit, - timeFrame + timeFrame, }) => { const svgRef = useRef() @@ -55,7 +55,7 @@ const RefLineChart = ({ if (!aggregatedTX.length && previousTimeData.length) { const mockPoint1 = { created: new Date().toISOString(), - profit: 0 + profit: 0, } const mockPoint2 = mockPoint(mockPoint1, -timeFrameMS[timeFrame], 1) return [[mockPoint1, mockPoint2], false] @@ -64,7 +64,7 @@ const RefLineChart = ({ if (aggregatedTX.length && !previousTimeData.length) { const mockPoint1 = { created: new Date().toISOString(), - profit: 1 + profit: 1, } const mockPoint2 = mockPoint(mockPoint1, -timeFrameMS[timeFrame], 0) return [[mockPoint1, mockPoint2], false] @@ -75,13 +75,13 @@ const RefLineChart = ({ R.append( { created: new Date( - Date.now() - timeFrameMS[timeFrame] + Date.now() - timeFrameMS[timeFrame], ).toISOString(), - profit: previousProfit + profit: previousProfit, }, - aggregatedTX + aggregatedTX, ), - false + false, ] } // the boolean value is for zeroProfit. It makes the line render at y = 0 instead of y = 50% of container height @@ -120,7 +120,7 @@ const RefLineChart = ({ .data([ { offset: '0%', color: 'var(--zircon)' }, { offset: '25%', color: 'var(--zircon)' }, - { offset: '100%', color: 'var(--ghost)' } + { offset: '100%', color: 'var(--ghost)' }, ]) .enter() .append('stop') diff --git a/packages/admin-ui/src/pages/Dashboard/SystemPerformance/Graphs/RefScatterplot.jsx b/packages/admin-ui/src/pages/Dashboard/SystemPerformance/Graphs/RefScatterplot.jsx index e1ef4388..02a8d53e 100644 --- a/packages/admin-ui/src/pages/Dashboard/SystemPerformance/Graphs/RefScatterplot.jsx +++ b/packages/admin-ui/src/pages/Dashboard/SystemPerformance/Graphs/RefScatterplot.jsx @@ -17,9 +17,9 @@ const Graph = ({ data, timeFrame, timezone }) => { top: 20, right: 3.5, bottom: 27, - left: 33.5 + left: 33.5, }), - [] + [], ) const offset = getTimezoneOffset(timezone) @@ -28,7 +28,7 @@ const Graph = ({ data, timeFrame, timezone }) => { const periodDomains = { Day: [NOW - DAY, NOW], Week: [NOW - WEEK, NOW], - Month: [NOW - MONTH, NOW] + Month: [NOW - MONTH, NOW], } const dataPoints = useMemo( @@ -37,27 +37,27 @@ const Graph = ({ data, timeFrame, timezone }) => { freq: 24, step: 60 * 60 * 1000, tick: d3.utcHour.every(4), - labelFormat: '%H:%M' + labelFormat: '%H:%M', }, Week: { freq: 7, step: 24 * 60 * 60 * 1000, tick: d3.utcDay.every(1), - labelFormat: '%a %d' + labelFormat: '%a %d', }, Month: { freq: 30, step: 24 * 60 * 60 * 1000, tick: d3.utcDay.every(2), - labelFormat: '%d' - } + labelFormat: '%d', + }, }), - [] + [], ) const filterDay = useCallback( x => (timeFrame === 'Day' ? x.getUTCHours() === 0 : x.getUTCDate() === 1), - [timeFrame] + [timeFrame], ) const getPastAndCurrentDayLabels = useCallback(d => { @@ -74,11 +74,11 @@ const Graph = ({ data, timeFrame, timezone }) => { const previousDateMonth = previousDate.getUTCMonth() const daysOfWeek = Array.from(Array(7)).map((_, i) => - format('EEE', add({ days: i }, startOfWeek(new Date()))) + format('EEE', add({ days: i }, startOfWeek(new Date()))), ) const months = Array.from(Array(12)).map((_, i) => - format('LLL', add({ months: i }, startOfYear(new Date()))) + format('LLL', add({ months: i }, startOfYear(new Date()))), ) return { @@ -89,7 +89,7 @@ const Graph = ({ data, timeFrame, timezone }) => { current: currentDateMonth !== previousDateMonth ? months[currentDateMonth] - : `${daysOfWeek[currentDateWeekday]} ${currentDateDay}` + : `${daysOfWeek[currentDateWeekday]} ${currentDateDay}`, } }, []) @@ -111,7 +111,7 @@ const Graph = ({ data, timeFrame, timezone }) => { return points }, - [NOW, dataPoints, timeFrame] + [NOW, dataPoints, timeFrame], ) const x = d3 @@ -123,7 +123,7 @@ const Graph = ({ data, timeFrame, timezone }) => { .scaleLinear() .domain([ 0, - (d3.max(data, d => new BigNumber(d.fiat).toNumber()) ?? 1000) * 1.05 + (d3.max(data, d => new BigNumber(d.fiat).toNumber()) ?? 1000) * 1.05, ]) .nice() .range([GRAPH_HEIGHT - GRAPH_MARGIN.bottom, GRAPH_MARGIN.top]) @@ -137,7 +137,7 @@ const Graph = ({ data, timeFrame, timezone }) => { .attr('height', GRAPH_HEIGHT - GRAPH_MARGIN.top - GRAPH_MARGIN.bottom) .attr('fill', 'var(--ghost)') }, - [GRAPH_MARGIN] + [GRAPH_MARGIN], ) const buildXAxis = useCallback( @@ -145,7 +145,7 @@ const Graph = ({ data, timeFrame, timezone }) => { g .attr( 'transform', - `translate(0, ${GRAPH_HEIGHT - GRAPH_MARGIN.bottom})` + `translate(0, ${GRAPH_HEIGHT - GRAPH_MARGIN.bottom})`, ) .call( d3 @@ -153,12 +153,12 @@ const Graph = ({ data, timeFrame, timezone }) => { .ticks(dataPoints[timeFrame].tick) .tickFormat(d => { return d3.timeFormat(dataPoints[timeFrame].labelFormat)( - d.getTime() + d.getTimezoneOffset() * MINUTE + d.getTime() + d.getTimezoneOffset() * MINUTE, ) - }) + }), ) .call(g => g.select('.domain').remove()), - [GRAPH_MARGIN, dataPoints, timeFrame, x] + [GRAPH_MARGIN, dataPoints, timeFrame, x], ) const buildYAxis = useCallback( @@ -173,12 +173,12 @@ const Graph = ({ data, timeFrame, timezone }) => { if (d >= 1000) return numberToFiatAmount(d / 1000) + 'k' return numberToFiatAmount(d) - }) + }), ) .call(g => g.select('.domain').remove()) .selectAll('text') .attr('dy', '-0.25rem'), - [GRAPH_MARGIN, y] + [GRAPH_MARGIN, y], ) const buildGrid = useCallback( @@ -196,7 +196,7 @@ const Graph = ({ data, timeFrame, timezone }) => { .attr('x2', d => 0.5 + x(d)) .attr('y1', GRAPH_MARGIN.top) .attr('y2', GRAPH_HEIGHT - GRAPH_MARGIN.bottom) - .attr('stroke-width', 1) + .attr('stroke-width', 1), ) // Horizontal lines .call(g => @@ -208,7 +208,7 @@ const Graph = ({ data, timeFrame, timezone }) => { .attr('y1', d => 0.5 + y(d)) .attr('y2', d => 0.5 + y(d)) .attr('x1', GRAPH_MARGIN.left) - .attr('x2', GRAPH_WIDTH) + .attr('x2', GRAPH_WIDTH), ) // Thick vertical lines .call(g => @@ -223,7 +223,7 @@ const Graph = ({ data, timeFrame, timezone }) => { .attr('y1', GRAPH_MARGIN.top - 10) .attr('y2', GRAPH_HEIGHT - GRAPH_MARGIN.bottom) .attr('stroke-width', 2) - .join('text') + .join('text'), ) // Left side breakpoint label .call(g => { @@ -262,7 +262,7 @@ const Graph = ({ data, timeFrame, timezone }) => { .text(labels.current) }) }, - [GRAPH_MARGIN, buildTicks, getPastAndCurrentDayLabels, x, y, filterDay] + [GRAPH_MARGIN, buildTicks, getPastAndCurrentDayLabels, x, y, filterDay], ) const formatTicksText = useCallback( @@ -273,7 +273,7 @@ const Graph = ({ data, timeFrame, timezone }) => { .style('fill', 'var(--comet)') .style('stroke-width', 0) .style('font-family', 'var(--museo)'), - [] + [], ) const formatText = useCallback( @@ -284,7 +284,7 @@ const Graph = ({ data, timeFrame, timezone }) => { .style('fill', 'var(--comet)') .style('stroke-width', 0) .style('font-family', 'var(--museo)'), - [] + [], ) const formatTicks = useCallback(() => { @@ -304,11 +304,11 @@ const Graph = ({ data, timeFrame, timezone }) => { }) .attr('cy', d => y(new BigNumber(d.fiat).toNumber())) .attr('fill', d => - d.txClass === 'cashIn' ? 'var(--java)' : 'var(--neon)' + d.txClass === 'cashIn' ? 'var(--java)' : 'var(--neon)', ) .attr('r', 3.5) }, - [data, offset, x, y] + [data, offset, x, y], ) const drawChart = useCallback(() => { @@ -334,7 +334,7 @@ const Graph = ({ data, timeFrame, timezone }) => { drawData, formatText, formatTicks, - formatTicksText + formatTicksText, ]) useEffect(() => { diff --git a/packages/admin-ui/src/pages/Dashboard/SystemPerformance/InfoWithLabel.jsx b/packages/admin-ui/src/pages/Dashboard/SystemPerformance/InfoWithLabel.jsx index 367f9c7c..54cc3582 100644 --- a/packages/admin-ui/src/pages/Dashboard/SystemPerformance/InfoWithLabel.jsx +++ b/packages/admin-ui/src/pages/Dashboard/SystemPerformance/InfoWithLabel.jsx @@ -1,5 +1,6 @@ import React from 'react' import { Info1, Label1 } from 'src/components/typography/index' + const InfoWithLabel = ({ info, label }) => { return (
diff --git a/packages/admin-ui/src/pages/Dashboard/SystemPerformance/Nav.jsx b/packages/admin-ui/src/pages/Dashboard/SystemPerformance/Nav.jsx index e81c28c3..4dc251b2 100644 --- a/packages/admin-ui/src/pages/Dashboard/SystemPerformance/Nav.jsx +++ b/packages/admin-ui/src/pages/Dashboard/SystemPerformance/Nav.jsx @@ -27,7 +27,7 @@ const Nav = ({ handleSetRange, showPicker }) => { className={classnames({ 'cursor-pointer text-comet': true, 'font-bold text-zodiac border-b-zodiac border-b-2': - isSelected(it) + isSelected(it), })}> {it}
diff --git a/packages/admin-ui/src/pages/Dashboard/SystemPerformance/SystemPerformance.jsx b/packages/admin-ui/src/pages/Dashboard/SystemPerformance/SystemPerformance.jsx index 838ded7e..31c68f50 100644 --- a/packages/admin-ui/src/pages/Dashboard/SystemPerformance/SystemPerformance.jsx +++ b/packages/admin-ui/src/pages/Dashboard/SystemPerformance/SystemPerformance.jsx @@ -52,7 +52,7 @@ const GET_DATA = gql` const SystemPerformance = () => { const [selectedRange, setSelectedRange] = useState('Day') const { data, loading } = useQuery(GET_DATA, { - variables: { excludeTestingCustomers: true } + variables: { excludeTestingCustomers: true }, }) const fiatLocale = fromNamespace('locale')(data?.config).fiatCurrency const timezone = fromNamespace('locale')(data?.config).timezone @@ -62,7 +62,7 @@ const SystemPerformance = () => { const periodDomains = { Day: [NOW - DAY, NOW], Week: [NOW - WEEK, NOW], - Month: [NOW - MONTH, NOW] + Month: [NOW - MONTH, NOW], } const isInRangeAndNoError = getLastTimePeriod => t => { @@ -74,11 +74,11 @@ const SystemPerformance = () => { t.error === null && isAfter( toTimezone(t.created, timezone), - toTimezone(periodDomains[selectedRange][1], timezone) + toTimezone(periodDomains[selectedRange][1], timezone), ) && isAfter( toTimezone(periodDomains[selectedRange][0], timezone), - toTimezone(t.created, timezone) + toTimezone(t.created, timezone), ) ) } @@ -86,11 +86,11 @@ const SystemPerformance = () => { t.error === null && isAfter( toTimezone(periodDomains[selectedRange][1], timezone), - toTimezone(t.created, timezone) + toTimezone(t.created, timezone), ) && isAfter( toTimezone(t.created, timezone), - toTimezone(periodDomains[selectedRange][0], timezone) + toTimezone(periodDomains[selectedRange][0], timezone), ) ) } @@ -104,10 +104,10 @@ const SystemPerformance = () => { } const transactionsToShow = R.map(convertFiatToLocale)( - R.filter(isInRangeAndNoError(false), data?.transactions ?? []) + R.filter(isInRangeAndNoError(false), data?.transactions ?? []), ) const transactionsLastTimePeriod = R.map(convertFiatToLocale)( - R.filter(isInRangeAndNoError(true), data?.transactions ?? []) + R.filter(isInRangeAndNoError(true), data?.transactions ?? []), ) const getNumTransactions = () => { @@ -121,7 +121,7 @@ const SystemPerformance = () => { return R.reduce( (acc, value) => acc.plus(value.profit), new BigNumber(0), - transactions + transactions, ) } @@ -141,7 +141,7 @@ const SystemPerformance = () => { const getDirectionPercent = () => { const [cashIn, cashOut] = R.partition(R.propEq('txClass', 'cashIn'))( - transactionsToShow + transactionsToShow, ) const totalLength = cashIn.length + cashOut.length if (totalLength === 0) { @@ -150,7 +150,7 @@ const SystemPerformance = () => { return { cashIn: Math.round((cashIn.length / totalLength) * 100), - cashOut: Math.round((cashOut.length / totalLength) * 100) + cashOut: Math.round((cashOut.length / totalLength) * 100), } } @@ -160,7 +160,7 @@ const SystemPerformance = () => { 'text-tomato': percentChange < 0, 'text-spring4': percentChange > 0, 'text-comet': percentChange === 0, - 'flex items-center justify-center gap-1': true + 'flex items-center justify-center gap-1': true, } const getPercentageIcon = () => { diff --git a/packages/admin-ui/src/pages/Dashboard/SystemPerformance/index.js b/packages/admin-ui/src/pages/Dashboard/SystemPerformance/index.js index bd06fb98..8bea8c7f 100644 --- a/packages/admin-ui/src/pages/Dashboard/SystemPerformance/index.js +++ b/packages/admin-ui/src/pages/Dashboard/SystemPerformance/index.js @@ -1,2 +1,3 @@ import SystemPerformance from './SystemPerformance' + export default SystemPerformance diff --git a/packages/admin-ui/src/pages/Dashboard/SystemStatus/MachinesTable.jsx b/packages/admin-ui/src/pages/Dashboard/SystemStatus/MachinesTable.jsx index 37362174..e0fea8f7 100644 --- a/packages/admin-ui/src/pages/Dashboard/SystemStatus/MachinesTable.jsx +++ b/packages/admin-ui/src/pages/Dashboard/SystemStatus/MachinesTable.jsx @@ -28,14 +28,14 @@ const GET_CONFIG = gql` const StyledCell = styled(TableCell)({ borderBottom: '4px solid white', padding: 0, - paddingLeft: '15px' + paddingLeft: '15px', }) const HeaderCell = styled(TableCell)({ borderBottom: '4px solid white', padding: 0, paddingLeft: '15px', - backgroundColor: 'white' + backgroundColor: 'white', }) const MachinesTable = ({ machines = [], numToRender }) => { @@ -44,7 +44,7 @@ const MachinesTable = ({ machines = [], numToRender }) => { const { data } = useQuery(GET_CONFIG) const fillingPercentageSettings = fromNamespace( 'notifications', - R.path(['config'], data) ?? {} + R.path(['config'], data) ?? {}, ) const getPercent = (notes, capacity = 500) => { @@ -55,7 +55,7 @@ const MachinesTable = ({ machines = [], numToRender }) => { const percent = getPercent(notes, capacity) const percentageThreshold = R.pipe( R.path([`fillingPercentageCassette${cassetteIdx}`]), - R.defaultTo(PERCENTAGE_THRESHOLD) + R.defaultTo(PERCENTAGE_THRESHOLD), )(fillingPercentageSettings) return percent < percentageThreshold ? ( {`${percent}%`} @@ -66,13 +66,13 @@ const MachinesTable = ({ machines = [], numToRender }) => { const redirect = ({ name, deviceId }) => { return history.push(`/machines/${deviceId}`, { - selectedMachine: name + selectedMachine: name, }) } const maxNumberOfCassettes = Math.max( ...R.map(it => it.numberOfCassettes, machines), - 0 + 0, ) return ( @@ -119,7 +119,7 @@ const MachinesTable = ({ machines = [], numToRender }) => { sx={{ borderBottom: '4px solid white', padding: 0, - paddingLeft: '15px' + paddingLeft: '15px', }} align="left">
@@ -138,14 +138,14 @@ const MachinesTable = ({ machines = [], numToRender }) => { {makePercentageText( it, - machine.cashUnits[`cassette${it}`] + machine.cashUnits[`cassette${it}`], )} ) : ( {`— %`} - ) + ), )} ) diff --git a/packages/admin-ui/src/pages/Dashboard/SystemStatus/MachinesTable.styles.js b/packages/admin-ui/src/pages/Dashboard/SystemStatus/MachinesTable.styles.js index b8774833..844a9455 100644 --- a/packages/admin-ui/src/pages/Dashboard/SystemStatus/MachinesTable.styles.js +++ b/packages/admin-ui/src/pages/Dashboard/SystemStatus/MachinesTable.styles.js @@ -2,28 +2,28 @@ import { backgroundColor, offColor, errorColor, - primaryColor + primaryColor, } from 'src/styling/variables' const styles = { label: { margin: 0, - color: offColor + color: offColor, }, row: { backgroundColor: backgroundColor, - borderBottom: 'none' + borderBottom: 'none', }, clickableRow: { - cursor: 'pointer' + cursor: 'pointer', }, header: { display: 'flex', alignItems: 'center', - whiteSpace: 'pre' + whiteSpace: 'pre', }, error: { - color: errorColor + color: errorColor, }, button: { color: primaryColor, @@ -32,46 +32,46 @@ const styles = { padding: 0, textTransform: 'none', '&:hover': { - backgroundColor: 'transparent' + backgroundColor: 'transparent', }, - marginBottom: -40 + marginBottom: -40, }, buttonLabel: { position: 'absolute', bottom: 160, - marginBottom: 0 + marginBottom: 0, }, statusHeader: { - marginLeft: 2 + marginLeft: 2, }, tableBody: { - overflow: 'auto' + overflow: 'auto', }, tl2: { - display: 'inline' + display: 'inline', }, label1: { - display: 'inline' + display: 'inline', }, machinesTableContainer: { - height: 220 + height: 220, }, expandedMachinesTableContainer: { - height: 414 + height: 414, }, centerLabel: { marginBottom: 0, padding: 0, - textAlign: 'center' + textAlign: 'center', }, machineNameWrapper: { display: 'flex', flexDirection: 'row', - alignItems: 'center' + alignItems: 'center', }, machineRedirectIcon: { - marginLeft: 10 - } + marginLeft: 10, + }, } export default styles diff --git a/packages/admin-ui/src/pages/Dashboard/SystemStatus/SystemStatus.jsx b/packages/admin-ui/src/pages/Dashboard/SystemStatus/SystemStatus.jsx index 7b043d1a..1bd249b6 100644 --- a/packages/admin-ui/src/pages/Dashboard/SystemStatus/SystemStatus.jsx +++ b/packages/admin-ui/src/pages/Dashboard/SystemStatus/SystemStatus.jsx @@ -60,7 +60,7 @@ const SystemStatus = ({ onReset, onExpand, size }) => { const machinesTableContainerClasses = { 'h-55': !showAllItems, - 'h-103': showAllItems + 'h-103': showAllItems, } // const uptime = data?.uptime ?? [{}] return ( diff --git a/packages/admin-ui/src/pages/Dashboard/SystemStatus/index.js b/packages/admin-ui/src/pages/Dashboard/SystemStatus/index.js index 74b705c6..41973d9b 100644 --- a/packages/admin-ui/src/pages/Dashboard/SystemStatus/index.js +++ b/packages/admin-ui/src/pages/Dashboard/SystemStatus/index.js @@ -1,2 +1,3 @@ import SystemStatus from './SystemStatus' + export default SystemStatus diff --git a/packages/admin-ui/src/pages/Dashboard/index.js b/packages/admin-ui/src/pages/Dashboard/index.js index d08092b2..f952036f 100644 --- a/packages/admin-ui/src/pages/Dashboard/index.js +++ b/packages/admin-ui/src/pages/Dashboard/index.js @@ -1,2 +1,3 @@ import Dashboard from './Dashboard' + export default Dashboard diff --git a/packages/admin-ui/src/pages/Funding/Funding.jsx b/packages/admin-ui/src/pages/Funding/Funding.jsx index 9c0c589d..86d83735 100644 --- a/packages/admin-ui/src/pages/Funding/Funding.jsx +++ b/packages/admin-ui/src/pages/Funding/Funding.jsx @@ -13,7 +13,7 @@ import { Td, THead, TBody, - Table + Table, } from 'src/components/fake-table/Table.jsx' import Sidebar from 'src/components/layout/Sidebar.jsx' import { @@ -22,7 +22,7 @@ import { Info2, Info3, Label1, - Label3 + Label3, } from 'src/components/typography/index.jsx' import CopyToClipboard from 'src/components/CopyToClipboard.jsx' @@ -36,7 +36,7 @@ const NODE_NOT_CONNECTED_ERR = const sizes = { big: 165, time: 140, - date: 130 + date: 130, } const GET_FUNDING = gql` @@ -67,7 +67,7 @@ const getConfirmedTotal = list => { list .filter(it => !it.errorMsg) .map(it => new BigNumber(it.fiatConfirmedBalance)) - .reduce(sumReducer, new BigNumber(0)) + .reduce(sumReducer, new BigNumber(0)), ) } @@ -76,7 +76,7 @@ const getPendingTotal = list => { list .filter(it => !it.errorMsg) .map(it => new BigNumber(it.fiatPending)) - .reduce(sumReducer, new BigNumber(0)) + .reduce(sumReducer, new BigNumber(0)), ) } @@ -90,22 +90,22 @@ const Funding = () => { fiatValue: 1000.0, date: new Date(), performedBy: null, - pending: true + pending: true, }, { cryptoAmount: 10.0, balance: 12.23, fiatValue: 12000.0, date: new Date(), - performedBy: null + performedBy: null, }, { cryptoAmount: 5.0, balance: 5.0, fiatValue: 50000.0, date: new Date(), - performedBy: null - } + performedBy: null, + }, ] const isSelected = it => { @@ -122,11 +122,11 @@ const Funding = () => { const itemRender = (it, active) => { const itemClass = { [classes.item]: true, - [classes.inactiveItem]: !active + [classes.inactiveItem]: !active, } const wrapperClass = { [classes.itemWrapper]: true, - [classes.error]: it.errorMsg + [classes.error]: it.errorMsg, } return ( @@ -212,7 +212,7 @@ const Funding = () => { {`(${signIfPositive(selected.fiatPending)} ${formatNumber( - selected.fiatPending + selected.fiatPending, )} pending)`}
@@ -226,7 +226,7 @@ const Funding = () => { key={selected.cryptoCode}> {formatAddress( selected.cryptoCode, - selected.fundingAddress + selected.fundingAddress, )} diff --git a/packages/admin-ui/src/pages/Funding/Funding.module.css b/packages/admin-ui/src/pages/Funding/Funding.module.css index 85eff346..d6a0baac 100644 --- a/packages/admin-ui/src/pages/Funding/Funding.module.css +++ b/packages/admin-ui/src/pages/Funding/Funding.module.css @@ -104,4 +104,4 @@ font-weight: 400; width: 375px; margin: 12px 24px; -} \ No newline at end of file +} diff --git a/packages/admin-ui/src/pages/Locales/Locales.jsx b/packages/admin-ui/src/pages/Locales/Locales.jsx index 06a526da..78388b83 100644 --- a/packages/admin-ui/src/pages/Locales/Locales.jsx +++ b/packages/admin-ui/src/pages/Locales/Locales.jsx @@ -20,7 +20,7 @@ import { LocaleSchema, OverridesSchema, localeDefaults, - overridesDefaults + overridesDefaults, } from './helper' const GET_DATA = gql` @@ -113,7 +113,7 @@ const Locales = ({ name: SCREEN_KEY }) => { const [saveConfig] = useMutation(SAVE_CONFIG, { onCompleted: () => setWizard(false), refetchQueries: () => ['getData'], - onError: error => setError(error) + onError: error => setError(error), }) const [dataToSave, setDataToSave] = useState(null) @@ -229,7 +229,7 @@ const Locales = ({ name: SCREEN_KEY }) => { elements={overrides(data, localeOverrides, onChangeCoin)} disableAdd={R.compose(R.isEmpty, R.difference)( data?.machines.map(m => m.deviceId) ?? [], - localeOverrides?.map(o => o.machine) ?? [] + localeOverrides?.map(o => o.machine) ?? [], )} setEditing={onEditingOverrides} forceDisable={isEditingDefault} diff --git a/packages/admin-ui/src/pages/Locales/helper.js b/packages/admin-ui/src/pages/Locales/helper.js index b8193c56..2b82f11e 100644 --- a/packages/admin-ui/src/pages/Locales/helper.js +++ b/packages/admin-ui/src/pages/Locales/helper.js @@ -7,7 +7,7 @@ import { labels as timezoneList } from 'src/utils/timezone-list' const getFields = (getData, names, onChange, auxElements = []) => { return R.filter( it => R.includes(it.name, names), - allFields(getData, onChange, auxElements) + allFields(getData, onChange, auxElements), ) } @@ -17,7 +17,7 @@ const allFields = (getData, onChange, auxElements = []) => { return R.compose( it => `${R.prop(code)(it)} ${it?.isBeta ? '(Beta)' : ''}`, - R.find(R.propEq(compare ?? 'code', it)) + R.find(R.propEq(compare ?? 'code', it)), )(data) } @@ -60,8 +60,8 @@ const allFields = (getData, onChange, auxElements = []) => { options: it => R.concat(findSuggestion(it))(suggestionFilter(machineData)), valueProp: 'deviceId', - labelProp: 'name' - } + labelProp: 'name', + }, }, { name: 'country', @@ -72,8 +72,8 @@ const allFields = (getData, onChange, auxElements = []) => { inputProps: { options: countryData, valueProp: 'code', - labelProp: 'display' - } + labelProp: 'display', + }, }, { name: 'fiatCurrency', @@ -84,8 +84,8 @@ const allFields = (getData, onChange, auxElements = []) => { inputProps: { options: currencyData, valueProp: 'code', - labelProp: 'code' - } + labelProp: 'code', + }, }, { name: 'languages', @@ -97,8 +97,8 @@ const allFields = (getData, onChange, auxElements = []) => { options: languageData, valueProp: 'code', labelProp: 'display', - multiple: true - } + multiple: true, + }, }, { name: 'cryptoCurrencies', @@ -112,8 +112,8 @@ const allFields = (getData, onChange, auxElements = []) => { labelProp: 'codeLabel', multiple: true, optionsLimit: null, - onChange - } + onChange, + }, }, { name: 'timezone', @@ -124,9 +124,9 @@ const allFields = (getData, onChange, auxElements = []) => { inputProps: { options: timezonesData, valueProp: 'code', - labelProp: 'label' - } - } + labelProp: 'label', + }, + }, ] } @@ -137,7 +137,7 @@ const mainFields = (auxData, configureCoin) => { getData, ['country', 'fiatCurrency', 'languages', 'cryptoCurrencies', 'timezone'], configureCoin, - undefined + undefined, ) } @@ -148,7 +148,7 @@ const overrides = (auxData, auxElements, configureCoin) => { getData, ['machine', 'country', 'languages', 'cryptoCurrencies'], configureCoin, - auxElements + auxElements, ) } @@ -157,14 +157,14 @@ const LocaleSchema = Yup.object().shape({ fiatCurrency: Yup.string().label('Fiat currency').required(), languages: Yup.array().label('Languages').required().min(1).max(4), cryptoCurrencies: Yup.array().label('Crypto currencies').required().min(1), - timezone: Yup.string().label('Timezone').required() + timezone: Yup.string().label('Timezone').required(), }) const OverridesSchema = Yup.object().shape({ machine: Yup.string().label('Machine').required(), country: Yup.string().label('Country').required(), languages: Yup.array().label('Languages').required().min(1).max(4), - cryptoCurrencies: Yup.array().label('Crypto currencies').required().min(1) + cryptoCurrencies: Yup.array().label('Crypto currencies').required().min(1), }) const localeDefaults = { @@ -172,14 +172,14 @@ const localeDefaults = { fiatCurrency: '', languages: [], cryptoCurrencies: [], - timezone: '' + timezone: '', } const overridesDefaults = { machine: '', country: '', languages: [], - cryptoCurrencies: [] + cryptoCurrencies: [], } export { @@ -188,5 +188,5 @@ export { LocaleSchema, OverridesSchema, localeDefaults, - overridesDefaults + overridesDefaults, } diff --git a/packages/admin-ui/src/pages/Logs/Logs.module.css b/packages/admin-ui/src/pages/Logs/Logs.module.css index cf3dde45..869f58dd 100644 --- a/packages/admin-ui/src/pages/Logs/Logs.module.css +++ b/packages/admin-ui/src/pages/Logs/Logs.module.css @@ -71,4 +71,4 @@ .buttonsWrapper > * { margin: auto 6px; -} \ No newline at end of file +} diff --git a/packages/admin-ui/src/pages/Logs/MachineLogs.jsx b/packages/admin-ui/src/pages/Logs/MachineLogs.jsx index 0046ae3c..d6fccf0c 100644 --- a/packages/admin-ui/src/pages/Logs/MachineLogs.jsx +++ b/packages/admin-ui/src/pages/Logs/MachineLogs.jsx @@ -12,7 +12,7 @@ import { TableRow, TableHeader, TableBody, - TableCell + TableCell, } from 'src/components/table/index.js' import { formatDate } from 'src/utils/timezones.js' @@ -91,8 +91,8 @@ const Logs = () => { { variables: { deviceId, limit: NUM_LOG_RESULTS }, skip: !selected, - onCompleted: () => setSaveMessage('') - } + onCompleted: () => setSaveMessage(''), + }, ) if (machineResponse?.machines?.length && !selected) { diff --git a/packages/admin-ui/src/pages/Logs/ServerLogs.jsx b/packages/admin-ui/src/pages/Logs/ServerLogs.jsx index ac2d1926..ceded0db 100644 --- a/packages/admin-ui/src/pages/Logs/ServerLogs.jsx +++ b/packages/admin-ui/src/pages/Logs/ServerLogs.jsx @@ -13,7 +13,7 @@ import { TableRow, TableHeader, TableBody, - TableCell + TableCell, } from 'src/components/table/index.js' import { startCase } from 'src/utils/string.js' import { formatDate } from 'src/utils/timezones.js' @@ -73,8 +73,8 @@ const Logs = () => { const { data, loading: dataLoading } = useQuery(GET_SERVER_DATA, { onCompleted: () => setSaveMessage(''), variables: { - limit: NUM_LOG_RESULTS - } + limit: NUM_LOG_RESULTS, + }, }) const { data: configResponse, loading: configLoading } = useQuery(GET_DATA) const timezone = R.path(['config', 'locale_timezone'], configResponse) @@ -82,7 +82,7 @@ const Logs = () => { const defaultLogLevels = [ { code: 'error', display: 'Error' }, { code: 'info', display: 'Info' }, - { code: 'debug', display: 'Debug' } + { code: 'debug', display: 'Debug' }, ] const serverVersion = data?.serverVersion const processStates = data?.uptime ?? [] @@ -93,9 +93,9 @@ const Logs = () => { R.concat(defaultLogLevels), R.map(it => ({ code: R.path(['logLevel'])(it), - display: startCase(R.path(['logLevel'])(it)) + display: startCase(R.path(['logLevel'])(it)), })), - R.path(['serverLogs']) + R.path(['serverLogs']), ) const handleLogLevelChange = logLevel => { @@ -166,7 +166,7 @@ const Logs = () => { data.serverLogs .filter( log => - logLevel === SHOW_ALL || log.logLevel === logLevel.code + logLevel === SHOW_ALL || log.logLevel === logLevel.code, ) .map((log, idx) => ( @@ -175,7 +175,7 @@ const Logs = () => { formatDate( log.timestamp, timezone, - 'yyyy-MM-dd HH:mm' + 'yyyy-MM-dd HH:mm', )} {log.logLevel} diff --git a/packages/admin-ui/src/pages/Logs/ServerLogs.module.css b/packages/admin-ui/src/pages/Logs/ServerLogs.module.css index ddea352c..b6cea140 100644 --- a/packages/admin-ui/src/pages/Logs/ServerLogs.module.css +++ b/packages/admin-ui/src/pages/Logs/ServerLogs.module.css @@ -17,4 +17,4 @@ .uptimeContainer { margin: auto 0 auto 0; -} \ No newline at end of file +} diff --git a/packages/admin-ui/src/pages/LoyaltyPanel/IndividualDiscountModal.jsx b/packages/admin-ui/src/pages/LoyaltyPanel/IndividualDiscountModal.jsx index 840964ab..7fdefc2f 100644 --- a/packages/admin-ui/src/pages/LoyaltyPanel/IndividualDiscountModal.jsx +++ b/packages/admin-ui/src/pages/LoyaltyPanel/IndividualDiscountModal.jsx @@ -12,7 +12,7 @@ import { NumberInput, Autocomplete } from 'src/components/inputs/formik' const initialValues = { customer: '', - discount: '' + discount: '', } const validationSchema = Yup.object().shape({ @@ -20,7 +20,7 @@ const validationSchema = Yup.object().shape({ discount: Yup.number() .required('A discount rate is required!') .min(0, 'Discount rate should be a positive number!') - .max(100, 'Discount rate should have a maximum value of 100%!') + .max(100, 'Discount rate should have a maximum value of 100%!'), }) const getErrorMsg = (formikErrors, formikTouched, mutationError) => { @@ -39,14 +39,14 @@ const IndividualDiscountModal = ({ onClose, creationError, addDiscount, - customers + customers, }) => { const handleAddDiscount = (customer, discount) => { addDiscount({ variables: { customerId: customer, - discount: parseInt(discount) - } + discount: parseInt(discount), + }, }) setShowModal(false) } @@ -85,7 +85,7 @@ const IndividualDiscountModal = ({ it?.idCardData?.firstName && it?.idCardData?.lastName ? ` ` : `` - }${it?.idCardData?.lastName ?? ``} (${it.phone})` + }${it?.idCardData?.lastName ?? ``} (${it.phone})`, }))(customers)} labelProp="display" valueProp="code" diff --git a/packages/admin-ui/src/pages/LoyaltyPanel/IndividualDiscounts.jsx b/packages/admin-ui/src/pages/LoyaltyPanel/IndividualDiscounts.jsx index 936cedff..fb6b08d5 100644 --- a/packages/admin-ui/src/pages/LoyaltyPanel/IndividualDiscounts.jsx +++ b/packages/admin-ui/src/pages/LoyaltyPanel/IndividualDiscounts.jsx @@ -69,8 +69,8 @@ const IndividualDiscounts = () => { const [createDiscount, { error: creationError }] = useMutation( CREATE_DISCOUNT, { - refetchQueries: () => ['individualDiscounts'] - } + refetchQueries: () => ['individualDiscounts'], + }, ) const [deleteDiscount] = useMutation(DELETE_DISCOUNT, { @@ -79,7 +79,7 @@ const IndividualDiscounts = () => { setErrorMsg(errorMessage) }, onCompleted: () => setDeleteDialog(false), - refetchQueries: () => ['individualDiscounts'] + refetchQueries: () => ['individualDiscounts'], }) const elements = [ @@ -95,7 +95,7 @@ const IndividualDiscounts = () => { {t.customer.phone}
) - } + }, }, { header: 'Name', @@ -115,7 +115,7 @@ const IndividualDiscounts = () => { : `` }${customer.idCardData.lastName ?? ``}`} ) - } + }, }, { header: 'Discount rate', @@ -126,7 +126,7 @@ const IndividualDiscounts = () => { <> {t.discount} % - ) + ), }, { header: 'Revoke', @@ -143,8 +143,8 @@ const IndividualDiscounts = () => { - ) - } + ), + }, ] return ( diff --git a/packages/admin-ui/src/pages/LoyaltyPanel/PromoCodes.jsx b/packages/admin-ui/src/pages/LoyaltyPanel/PromoCodes.jsx index d53a727a..73b3ddca 100644 --- a/packages/admin-ui/src/pages/LoyaltyPanel/PromoCodes.jsx +++ b/packages/admin-ui/src/pages/LoyaltyPanel/PromoCodes.jsx @@ -59,23 +59,23 @@ const PromoCodes = () => { setErrorMsg(errorMessage) }, onCompleted: () => setDeleteDialog(false), - refetchQueries: () => ['promoCodes'] + refetchQueries: () => ['promoCodes'], }) const [createCode] = useMutation(CREATE_CODE, { - refetchQueries: () => ['promoCodes'] + refetchQueries: () => ['promoCodes'], }) const addCode = (code, discount) => { setErrorMsg(null) createCode({ - variables: { code: code, discount: discount } + variables: { code: code, discount: discount }, }) .then(res => { if (!res.errors) return setShowModal(false) const duplicateCodeError = R.any(it => - R.includes('duplicate', it?.message) + R.includes('duplicate', it?.message), )(res.errors) const msg = duplicateCodeError ? DUPLICATE_ERROR_MSG : DEFAULT_ERROR_MSG @@ -93,7 +93,7 @@ const PromoCodes = () => { width: 300, textAlign: 'left', size: 'sm', - view: t => t.code + view: t => t.code, }, { header: 'Discount', @@ -104,7 +104,7 @@ const PromoCodes = () => { <> {t.discount} % in commissions - ) + ), }, { header: 'Delete', @@ -121,8 +121,8 @@ const PromoCodes = () => { - ) - } + ), + }, ] return ( diff --git a/packages/admin-ui/src/pages/LoyaltyPanel/PromoCodesModal.jsx b/packages/admin-ui/src/pages/LoyaltyPanel/PromoCodesModal.jsx index 15d064e5..d44ebf71 100644 --- a/packages/admin-ui/src/pages/LoyaltyPanel/PromoCodesModal.jsx +++ b/packages/admin-ui/src/pages/LoyaltyPanel/PromoCodesModal.jsx @@ -12,7 +12,7 @@ import { TextInput, NumberInput } from 'src/components/inputs/formik' const initialValues = { code: '', - discount: '' + discount: '', } const validationSchema = Yup.object().shape({ @@ -21,7 +21,7 @@ const validationSchema = Yup.object().shape({ .trim() .max(25) .matches(/^\S*$/, 'No whitespace allowed'), - discount: Yup.number().required().min(0).max(100) + discount: Yup.number().required().min(0).max(100), }) const PromoCodesModal = ({ showModal, onClose, errorMsg, addCode }) => { diff --git a/packages/admin-ui/src/pages/Machines/MachineComponents/Cassettes/Cassettes.jsx b/packages/admin-ui/src/pages/Machines/MachineComponents/Cassettes/Cassettes.jsx index 0dd0b5a4..f055537b 100644 --- a/packages/admin-ui/src/pages/Machines/MachineComponents/Cassettes/Cassettes.jsx +++ b/packages/admin-ui/src/pages/Machines/MachineComponents/Cassettes/Cassettes.jsx @@ -37,7 +37,7 @@ const widths = { name: 0, cashbox: 175, cassettes: 585, - edit: 90 + edit: 90, } const CashCassettes = ({ machine, config, refetchData, bills }) => { @@ -50,11 +50,11 @@ const CashCassettes = ({ machine, config, refetchData, bills }) => { const getCashoutSettings = deviceId => fromNamespace(deviceId)(cashout) const elements = R.filter(it => it.name !== 'name')( - helper.getElements(config, bills, setWizard, widths) + helper.getElements(config, bills, setWizard, widths), ) const [setCassetteBills, { error }] = useMutation(SET_CASSETTE_BILLS, { - refetchQueries: () => refetchData() + refetchQueries: () => refetchData(), }) const onSave = (_, cashUnits) => @@ -62,8 +62,8 @@ const CashCassettes = ({ machine, config, refetchData, bills }) => { variables: { action: 'setCassetteBills', deviceId: machine.deviceId, - cashUnits - } + cashUnits, + }, }) const InnerCashUnitDetails = ({ it }) => ( diff --git a/packages/admin-ui/src/pages/Machines/MachineComponents/Cassettes/index.js b/packages/admin-ui/src/pages/Machines/MachineComponents/Cassettes/index.js index e70fe4c3..5d089de2 100644 --- a/packages/admin-ui/src/pages/Machines/MachineComponents/Cassettes/index.js +++ b/packages/admin-ui/src/pages/Machines/MachineComponents/Cassettes/index.js @@ -1,2 +1,3 @@ import Cassettes from './Cassettes' + export default Cassettes diff --git a/packages/admin-ui/src/pages/Machines/MachineComponents/Commissions/Commissions.jsx b/packages/admin-ui/src/pages/Machines/MachineComponents/Commissions/Commissions.jsx index 29dae910..4e5bf03e 100644 --- a/packages/admin-ui/src/pages/Machines/MachineComponents/Commissions/Commissions.jsx +++ b/packages/admin-ui/src/pages/Machines/MachineComponents/Commissions/Commissions.jsx @@ -1,4 +1,4 @@ -import { useQuery, useMutation, gql } from "@apollo/client"; +import { useQuery, useMutation, gql } from '@apollo/client' import * as R from 'ramda' import React from 'react' @@ -30,12 +30,12 @@ const SAVE_CONFIG = gql` const Commissions = ({ name: SCREEN_KEY, id: deviceId }) => { const { data, loading } = useQuery(GET_DATA) const [saveConfig] = useMutation(SAVE_CONFIG, { - refetchQueries: () => ['getData'] + refetchQueries: () => ['getData'], }) const config = data?.config && fromNamespace(SCREEN_KEY)(data.config) const currency = R.path(['fiatCurrency'])( - fromNamespace(namespaces.LOCALE)(data?.config) + fromNamespace(namespaces.LOCALE)(data?.config), ) const saveOverrides = it => { @@ -49,7 +49,7 @@ const Commissions = ({ name: SCREEN_KEY, id: deviceId }) => { const overrides = config.overrides ? R.concat( R.filter(R.propEq('machine', 'ALL_MACHINES'), config.overrides), - R.filter(R.propEq('machine', deviceId), config.overrides) + R.filter(R.propEq('machine', deviceId), config.overrides), ) : [] @@ -64,7 +64,7 @@ const Commissions = ({ name: SCREEN_KEY, id: deviceId }) => { cashOut: config.cashOut, fixedFee: config.fixedFee, minimumTx: config.minimumTx, - cashOutFixedFee: config.cashOutFixedFee + cashOutFixedFee: config.cashOutFixedFee, }, R.project( ['cashIn', 'cashOut', 'fixedFee', 'minimumTx', 'cashOutFixedFee'], @@ -72,11 +72,11 @@ const Commissions = ({ name: SCREEN_KEY, id: deviceId }) => { o => R.includes(coin.code, o.cryptoCurrencies) || R.includes('ALL_COINS', o.cryptoCurrencies), - overrides - ) - ) + overrides, + ), + ), ), - data.cryptoCurrencies + data.cryptoCurrencies, ) } diff --git a/packages/admin-ui/src/pages/Machines/MachineComponents/Commissions/helper.jsx b/packages/admin-ui/src/pages/Machines/MachineComponents/Commissions/helper.jsx index 70065128..aa3bf049 100644 --- a/packages/admin-ui/src/pages/Machines/MachineComponents/Commissions/helper.jsx +++ b/packages/admin-ui/src/pages/Machines/MachineComponents/Commissions/helper.jsx @@ -24,7 +24,7 @@ const getOverridesFields = currency => { name: 'name', width: 280, size: 'sm', - view: it => `${it}` + view: it => `${it}`, }, { header: cashInHeader, @@ -32,7 +32,7 @@ const getOverridesFields = currency => { display: 'Cash-in', width: 130, textAlign: 'right', - suffix: '%' + suffix: '%', }, { header: cashOutHeader, @@ -42,8 +42,8 @@ const getOverridesFields = currency => { textAlign: 'right', suffix: '%', inputProps: { - decimalPlaces: 3 - } + decimalPlaces: 3, + }, }, { name: 'fixedFee', @@ -51,7 +51,7 @@ const getOverridesFields = currency => { width: 155, doubleHeader: 'Cash-in only', textAlign: 'right', - suffix: currency + suffix: currency, }, { name: 'minimumTx', @@ -59,7 +59,7 @@ const getOverridesFields = currency => { width: 155, doubleHeader: 'Cash-in only', textAlign: 'right', - suffix: currency + suffix: currency, }, { name: 'cashOutFixedFee', @@ -67,8 +67,8 @@ const getOverridesFields = currency => { width: 155, doubleHeader: 'Cash-out only', textAlign: 'right', - suffix: currency - } + suffix: currency, + }, ] } diff --git a/packages/admin-ui/src/pages/Machines/MachineComponents/Overview.jsx b/packages/admin-ui/src/pages/Machines/MachineComponents/Overview.jsx index da3f939a..8fc4c6e9 100644 --- a/packages/admin-ui/src/pages/Machines/MachineComponents/Overview.jsx +++ b/packages/admin-ui/src/pages/Machines/MachineComponents/Overview.jsx @@ -28,7 +28,7 @@ const Overview = ({ data, onActionSuccess }) => {

{data.lastPing ? formatDistance(new Date(data.lastPing), new Date(), { - addSuffix: true + addSuffix: true, }) : 'unknown'}

diff --git a/packages/admin-ui/src/pages/Machines/MachineComponents/Transactions/Transactions.jsx b/packages/admin-ui/src/pages/Machines/MachineComponents/Transactions/Transactions.jsx index aac44707..4eb9bdc6 100644 --- a/packages/admin-ui/src/pages/Machines/MachineComponents/Transactions/Transactions.jsx +++ b/packages/admin-ui/src/pages/Machines/MachineComponents/Transactions/Transactions.jsx @@ -77,9 +77,9 @@ const Transactions = ({ id }) => { { variables: { limit: NUM_LOG_RESULTS, - deviceId: id - } - } + deviceId: id, + }, + }, ) const { data: configData, loading: configLoading } = useQuery(GET_DATA) @@ -102,20 +102,20 @@ const Transactions = ({ id }) => { header: '', width: 0, size: 'sm', - view: it => (it.txClass === 'cashOut' ? : ) + view: it => (it.txClass === 'cashOut' ? : ), }, { header: 'Customer', width: 122, size: 'sm', - view: Customer.displayName + view: Customer.displayName, }, { header: 'Cash', width: 144, textAlign: 'right', size: 'sm', - view: it => `${Number.parseFloat(it.fiat)} ${it.fiatCode}` + view: it => `${Number.parseFloat(it.fiat)} ${it.fiatCode}`, }, { header: 'Crypto', @@ -125,7 +125,7 @@ const Transactions = ({ id }) => { view: it => `${toUnit(new BigNumber(it.cryptoAtoms), it.cryptoCode).toFormat(5)} ${ it.cryptoCode - }` + }`, }, { header: 'Address', @@ -133,21 +133,21 @@ const Transactions = ({ id }) => { className: 'overflow-hidden whitespace-nowrap text-ellipsis', size: 'sm', textAlign: 'left', - width: 140 + width: 140, }, { header: 'Date', view: it => formatDate(it.created, timezone, 'yyyy‑MM‑dd'), textAlign: 'left', size: 'sm', - width: 140 + width: 140, }, { header: 'Status', view: it => getStatus(it), size: 'sm', - width: 20 - } + width: 20, + }, ] const handleClick = e => { diff --git a/packages/admin-ui/src/pages/Machines/MachineComponents/Transactions/index.js b/packages/admin-ui/src/pages/Machines/MachineComponents/Transactions/index.js index 1d3254c5..57bc006e 100644 --- a/packages/admin-ui/src/pages/Machines/MachineComponents/Transactions/index.js +++ b/packages/admin-ui/src/pages/Machines/MachineComponents/Transactions/index.js @@ -1,2 +1,3 @@ import Transactions from './Transactions' + export default Transactions diff --git a/packages/admin-ui/src/pages/Machines/Machines.jsx b/packages/admin-ui/src/pages/Machines/Machines.jsx index 51975340..e26bce22 100644 --- a/packages/admin-ui/src/pages/Machines/Machines.jsx +++ b/packages/admin-ui/src/pages/Machines/Machines.jsx @@ -79,9 +79,9 @@ const MachineRoute = () => { deviceId: id, billFilters: { deviceId: id, - batch: 'none' - } - } + batch: 'none', + }, + }, }) const reload = () => { diff --git a/packages/admin-ui/src/pages/Maintenance/CashUnitDetails.jsx b/packages/admin-ui/src/pages/Maintenance/CashUnitDetails.jsx index 00b196ac..60128171 100644 --- a/packages/admin-ui/src/pages/Maintenance/CashUnitDetails.jsx +++ b/packages/admin-ui/src/pages/Maintenance/CashUnitDetails.jsx @@ -12,7 +12,7 @@ const CashUnitDetails = ({ bills, currency, config, - hideMachineData = false + hideMachineData = false, }) => { const billCount = R.countBy(it => it.fiat)(bills) const fillingPercentageSettings = fromNamespace('notifications', config) diff --git a/packages/admin-ui/src/pages/Maintenance/CashUnits.jsx b/packages/admin-ui/src/pages/Maintenance/CashUnits.jsx index 8d045bf5..4dc49033 100644 --- a/packages/admin-ui/src/pages/Maintenance/CashUnits.jsx +++ b/packages/admin-ui/src/pages/Maintenance/CashUnits.jsx @@ -108,7 +108,7 @@ const widths = { name: 250, cashbox: 200, cassettes: 575, - edit: 90 + edit: 90, } const CashCassettes = () => { @@ -119,9 +119,9 @@ const CashCassettes = () => { const { data, loading: dataLoading } = useQuery(GET_MACHINES_AND_CONFIG, { variables: { billFilters: { - batch: 'none' - } - } + batch: 'none', + }, + }, }) const [wizard, setWizard] = useState(false) const [machineId, setMachineId] = useState('') @@ -130,18 +130,18 @@ const CashCassettes = () => { const unpairedMachines = R.path(['unpairedMachines'])(data) ?? [] const config = R.path(['config'])(data) ?? {} const [setCassetteBills, { error }] = useMutation(SET_CASSETTE_BILLS, { - refetchQueries: () => ['getData'] + refetchQueries: () => ['getData'], }) const [saveConfig] = useMutation(SAVE_CONFIG, { onCompleted: () => setEditingSchema(false), - refetchQueries: () => ['getData'] + refetchQueries: () => ['getData'], }) const timezone = R.path(['config', 'locale_timezone'], data) const bills = R.groupBy(bill => bill.deviceId)(R.path(['bills'])(data) ?? []) const deviceIds = R.uniq( - R.map(R.prop('deviceId'))(R.path(['bills'])(data) ?? []) + R.map(R.prop('deviceId'))(R.path(['bills'])(data) ?? []), ) const cashout = data?.config && fromNamespace('cashOut')(data.config) const locale = data?.config && fromNamespace('locale')(data.config) @@ -154,8 +154,8 @@ const CashCassettes = () => { variables: { action: 'setCassetteBills', deviceId: id, - cashUnits - } + cashUnits, + }, }) } @@ -176,7 +176,7 @@ const CashCassettes = () => { const radioButtonOptions = [ { display: 'Automatic', code: AUTOMATIC }, - { display: 'Manual', code: MANUAL } + { display: 'Manual', code: MANUAL }, ] const handleRadioButtons = evt => { @@ -189,7 +189,7 @@ const CashCassettes = () => { bills, setWizard, widths, - setMachineId + setMachineId, ) const InnerCashUnitDetails = ({ it }) => ( @@ -211,7 +211,7 @@ const CashCassettes = () => { text: 'Cash box history', icon: HistoryIcon, inverseIcon: ReverseHistoryIcon, - toggle: setShowHistory + toggle: setShowHistory, }, { component: showHistory ? ( @@ -226,8 +226,8 @@ const CashCassettes = () => { /> ) : ( <> - ) - } + ), + }, ]} className="flex items-center mr-[1px]" appendix={ diff --git a/packages/admin-ui/src/pages/Maintenance/CashUnitsFooter.jsx b/packages/admin-ui/src/pages/Maintenance/CashUnitsFooter.jsx index 856828af..dde73e25 100644 --- a/packages/admin-ui/src/pages/Maintenance/CashUnitsFooter.jsx +++ b/packages/admin-ui/src/pages/Maintenance/CashUnitsFooter.jsx @@ -8,18 +8,12 @@ import TxOutIcon from 'src/styling/icons/direction/cash-out.svg?react' import { fromNamespace } from 'src/utils/config' import { numberToFiatAmount } from 'src/utils/number' -const CashCassettesFooter = ({ - machines, - config, - currencyCode, - bills, - deviceIds -}) => { +const CashCassettesFooter = ({ machines, config, currencyCode, bills }) => { const cashout = config && fromNamespace('cashOut')(config) const getCashoutSettings = id => fromNamespace(id)(cashout) const cashoutReducerFn = ( acc, - { cashUnits: { cassette1, cassette2, cassette3, cassette4 }, id } + { cashUnits: { cassette1, cassette2, cassette3, cassette4 }, id }, ) => { const cassette1Denomination = getCashoutSettings(id).cassette1 ?? 0 const cassette2Denomination = getCashoutSettings(id).cassette2 ?? 0 @@ -29,7 +23,7 @@ const CashCassettesFooter = ({ (acc[0] += cassette1 * cassette1Denomination), (acc[1] += cassette2 * cassette2Denomination), (acc[2] += cassette3 * cassette3Denomination), - (acc[3] += cassette4 * cassette4Denomination) + (acc[3] += cassette4 * cassette4Denomination), ] } @@ -42,10 +36,10 @@ const CashCassettesFooter = ({ recycler3, recycler4, recycler5, - recycler6 + recycler6, }, - id - } + id, + }, ) => { const recycler1Denomination = getCashoutSettings(id).recycler1 ?? 0 const recycler2Denomination = getCashoutSettings(id).recycler2 ?? 0 @@ -59,22 +53,22 @@ const CashCassettesFooter = ({ (acc[0] += recycler3 * recycler3Denomination), (acc[1] += recycler4 * recycler4Denomination), (acc[0] += recycler5 * recycler5Denomination), - (acc[1] += recycler6 * recycler6Denomination) + (acc[1] += recycler6 * recycler6Denomination), ] } const totalInRecyclers = R.sum( - R.reduce(recyclerReducerFn, [0, 0, 0, 0, 0, 0], machines) + R.reduce(recyclerReducerFn, [0, 0, 0, 0, 0, 0], machines), ) const totalInCassettes = R.sum( - R.reduce(cashoutReducerFn, [0, 0, 0, 0], machines) + R.reduce(cashoutReducerFn, [0, 0, 0, 0], machines), ) const totalInCashBox = R.sum(R.map(it => it.fiat)(bills)) const total = new BigNumber( - totalInCassettes + totalInCashBox + totalInRecyclers + totalInCassettes + totalInCashBox + totalInRecyclers, ).toFormat(0) return ( diff --git a/packages/admin-ui/src/pages/Maintenance/CashboxHistory.jsx b/packages/admin-ui/src/pages/Maintenance/CashboxHistory.jsx index 70b8f41e..44b8f0af 100644 --- a/packages/admin-ui/src/pages/Maintenance/CashboxHistory.jsx +++ b/packages/admin-ui/src/pages/Maintenance/CashboxHistory.jsx @@ -38,15 +38,15 @@ const CashboxHistory = ({ machines, currency, timezone }) => { <> Cash cassette {i} refill - + , ), R.assoc( `cash-cassette-${i}-empty`, <> Cash cassette {i} emptied - - ) + , + ), )(ret), { 'cash-box-empty': ( @@ -54,9 +54,9 @@ const CashboxHistory = ({ machines, currency, timezone }) => { Cash box emptied - ) + ), }, - R.range(1, 5) + R.range(1, 5), ) const elements = [ @@ -69,7 +69,7 @@ const CashboxHistory = ({ machines, currency, timezone }) => {
{getOperationRender[it.operationType]}
- ) + ), }, { name: 'machine', @@ -80,8 +80,8 @@ const CashboxHistory = ({ machines, currency, timezone }) => { R.prop('deviceId'), id => R.find(R.propEq('id', id), machines), R.defaultTo({ name: Unpaired device }), - R.prop('name') - ) + R.prop('name'), + ), }, { name: 'billCount', @@ -90,10 +90,10 @@ const CashboxHistory = ({ machines, currency, timezone }) => { textAlign: 'left', input: NumberInput, inputProps: { - decimalPlaces: 0 + decimalPlaces: 0, }, view: it => - R.isNil(it.customBillCount) ? it.billCount : it.customBillCount + R.isNil(it.customBillCount) ? it.billCount : it.customBillCount, }, { name: 'total', @@ -104,22 +104,22 @@ const CashboxHistory = ({ machines, currency, timezone }) => { {it.fiatTotal} {currency} - ) + ), }, { name: 'date', header: 'Date', width: 135, textAlign: 'right', - view: it => formatDate(it.created, timezone, 'yyyy-MM-dd') + view: it => formatDate(it.created, timezone, 'yyyy-MM-dd'), }, { name: 'time', header: 'Time (h:m)', width: 125, textAlign: 'right', - view: it => formatDate(it.created, timezone, 'HH:mm') - } + view: it => formatDate(it.created, timezone, 'HH:mm'), + }, ] return ( diff --git a/packages/admin-ui/src/pages/Maintenance/MachineStatus.jsx b/packages/admin-ui/src/pages/Maintenance/MachineStatus.jsx index 34eea6d3..b105a2b1 100644 --- a/packages/admin-ui/src/pages/Maintenance/MachineStatus.jsx +++ b/packages/admin-ui/src/pages/Maintenance/MachineStatus.jsx @@ -61,7 +61,7 @@ const MachineStatus = () => { const { data: machinesResponse, refetch, - loading: machinesLoading + loading: machinesLoading, } = useQuery(GET_MACHINES) const { data: configResponse, configLoading } = useQuery(GET_DATA) const timezone = R.path(['config', 'locale_timezone'], configResponse) @@ -82,14 +82,14 @@ const MachineStatus = () => {
- ) + ), }, { header: 'Status', width: 350, size: 'sm', textAlign: 'left', - view: m => + view: m => , }, { header: 'Last ping', @@ -99,22 +99,22 @@ const MachineStatus = () => { view: m => m.lastPing ? formatDistance(new Date(m.lastPing), new Date(), { - addSuffix: true + addSuffix: true, }) - : 'unknown' + : 'unknown', }, { header: 'Software version', width: 200, size: 'sm', textAlign: 'left', - view: m => m.version || 'unknown' - } + view: m => m.version || 'unknown', + }, ] const machines = R.path(['machines'])(machinesResponse) ?? [] const expandedIndex = R.findIndex(R.propEq('deviceId', addedMachineId))( - machines + machines, ) const InnerMachineDetailsRow = ({ it }) => ( diff --git a/packages/admin-ui/src/pages/Maintenance/Wizard/Wizard.jsx b/packages/admin-ui/src/pages/Maintenance/Wizard/Wizard.jsx index a42680e4..b261e394 100644 --- a/packages/admin-ui/src/pages/Maintenance/Wizard/Wizard.jsx +++ b/packages/admin-ui/src/pages/Maintenance/Wizard/Wizard.jsx @@ -7,7 +7,7 @@ import { MAX_NUMBER_OF_CASSETTES } from 'src/utils/constants' import { cashUnitCapacity, getCashUnitCapacity, - modelPrettifier + modelPrettifier, } from 'src/utils/machine' import { defaultToZero } from 'src/utils/number' @@ -19,7 +19,7 @@ const MODAL_HEIGHT = 535 const CASSETTE_FIELDS = R.map( it => `cassette${it}`, - R.range(1, MAX_NUMBER_OF_CASSETTES + 1) + R.range(1, MAX_NUMBER_OF_CASSETTES + 1), ) const RECYCLER_FIELDS = [ @@ -28,7 +28,7 @@ const RECYCLER_FIELDS = [ 'recycler3', 'recycler4', 'recycler5', - 'recycler6' + 'recycler6', ] const canManuallyLoadRecyclers = ({ model }) => ['grandola'].includes(model) @@ -36,7 +36,7 @@ const canManuallyLoadRecyclers = ({ model }) => ['grandola'].includes(model) const Wizard = ({ machine, cashoutSettings, locale, onClose, save, error }) => { const [{ step, config }, setState] = useState({ step: 0, - config: { active: true } + config: { active: true }, }) const isCashOutDisabled = @@ -60,7 +60,7 @@ const Wizard = ({ machine, cashoutSettings, locale, onClose, save, error }) => { if (isLastStep) { const wasCashboxEmptied = [ config?.wasCashboxEmptied, - it?.wasCashboxEmptied + it?.wasCashboxEmptied, ].includes('YES') const cassettes = buildCashUnitObj(CASSETTE_FIELDS, it) @@ -71,7 +71,7 @@ const Wizard = ({ machine, cashoutSettings, locale, onClose, save, error }) => { const cashUnits = { cashbox: wasCashboxEmptied ? 0 : machine?.cashUnits.cashbox, ...cassettes, - ...recyclers + ...recyclers, } save(machine.id, cashUnits) @@ -80,7 +80,7 @@ const Wizard = ({ machine, cashoutSettings, locale, onClose, save, error }) => { setState({ step: step + 1, - config: newConfig + config: newConfig, }) } @@ -102,11 +102,11 @@ const Wizard = ({ machine, cashoutSettings, locale, onClose, save, error }) => { modelPrettifier[machine.model] } maximum cassette capacity is ${getCashUnitCapacity( machine.model, - 'cassette' - )} bills` - ) - }) - })) + 'cassette', + )} bills`, + ), + }), + })), ) const makeRecyclerSteps = R.pipe( @@ -126,10 +126,10 @@ const Wizard = ({ machine, cashoutSettings, locale, onClose, save, error }) => { `${modelPrettifier[machine.model]} maximum recycler capacity is ${ cashUnitCapacity[machine.model].recycler - } bills` - ) - }) - })) + } bills`, + ), + }), + })), ) const makeCassettesInitialValues = () => @@ -140,7 +140,7 @@ const Wizard = ({ machine, cashoutSettings, locale, onClose, save, error }) => { return acc }, {}, - R.range(1, numberOfCassettes + 1) + R.range(1, numberOfCassettes + 1), ) : {} @@ -153,7 +153,7 @@ const Wizard = ({ machine, cashoutSettings, locale, onClose, save, error }) => { return acc }, {}, - R.range(1, numberOfRecyclers + 1) + R.range(1, numberOfRecyclers + 1), ) : {} @@ -163,19 +163,19 @@ const Wizard = ({ machine, cashoutSettings, locale, onClose, save, error }) => { const steps = R.pipe( R.concat( makeRecyclerSteps( - canManuallyLoadRecyclers(machine) ? numberOfRecyclers : 0 - ) + canManuallyLoadRecyclers(machine) ? numberOfRecyclers : 0, + ), ), R.concat(makeCassetteSteps(isCashOutDisabled ? 0 : numberOfCassettes)), R.concat([ { type: 'cashbox', schema: Yup.object().shape({ - wasCashboxEmptied: Yup.string().required('Select one option.') + wasCashboxEmptied: Yup.string().required('Select one option.'), }), - cashoutRequired: false - } - ]) + cashoutRequired: false, + }, + ]), )([]) return ( diff --git a/packages/admin-ui/src/pages/Maintenance/Wizard/WizardStep.jsx b/packages/admin-ui/src/pages/Maintenance/Wizard/WizardStep.jsx index 51007534..87056254 100644 --- a/packages/admin-ui/src/pages/Maintenance/Wizard/WizardStep.jsx +++ b/packages/admin-ui/src/pages/Maintenance/Wizard/WizardStep.jsx @@ -46,8 +46,8 @@ const cassetesArtworks = (step, numberOfCassettes, numberOfRecyclers) => { tejo4CassetteOne, tejo4CassetteTwo, tejo4CassetteThree, - tejo4CassetteFour - ] + tejo4CassetteFour, + ], ][numberOfCassettes - 1][step - cassetteStepsStart] : [ /* TODO: Recycler artwork */ @@ -58,8 +58,8 @@ const cassetesArtworks = (step, numberOfCassettes, numberOfRecyclers) => { tejo4CassetteOne, tejo4CassetteTwo, tejo4CassetteThree, - tejo4CassetteFour - ] + tejo4CassetteFour, + ], ][numberOfRecyclers - 1][step - cassetteStepsStart] } @@ -69,13 +69,13 @@ const getCashUnitFieldName = (step, numberOfCassettes, numberOfRecyclers) => { if (isCassetteStep(step, numberOfCassettes)) return { name: `cassette${step - cassetteStepsStart + 1}`, - category: 'cassette' + category: 'cassette', } const recyclerStepsStart = CASHBOX_STEP + numberOfCassettes + 1 if (isRecyclerStep(step, numberOfCassettes, numberOfRecyclers)) return { name: `recycler${Math.ceil(step - recyclerStepsStart + 1)}`, - category: 'recycler' + category: 'recycler', } } @@ -84,18 +84,17 @@ const WizardStep = ({ name, machine, cashoutSettings, - error, lastStep, steps, fiatCurrency, onContinue, - initialValues + initialValues, }) => { const label = lastStep ? 'Finish' : 'Confirm' const stepOneRadioOptions = [ { display: 'Yes', code: 'YES' }, - { display: 'No', code: 'NO' } + { display: 'No', code: 'NO' }, ] const numberOfCassettes = machine.numberOfCassettes @@ -111,7 +110,7 @@ const WizardStep = ({ cassetteCount, count => 100 * (count / getCashUnitCapacity(machine.model, cashUnitCategory)), - R.clamp(0, 100) + R.clamp(0, 100), ) return ( @@ -155,7 +154,7 @@ const WizardStep = ({

Since previous update

@@ -168,7 +167,7 @@ const WizardStep = ({
{machine?.cashUnits.cashbox} @@ -203,7 +202,7 @@ const WizardStep = ({ src={cassetesArtworks( step, numberOfCassettes, - numberOfRecyclers + numberOfRecyclers, )}>
@@ -232,7 +231,7 @@ const WizardStep = ({
{ header: 'Machine', width: widths.name, view: m => <>{m.name}, - input: ({ field: { value: name } }) => <>{name} + input: ({ field: { value: name } }) => <>{name}, }, { name: 'cashbox', @@ -39,8 +39,8 @@ const getElements = (config, bills, setWizard, widths, setMachineId) => { /> ), inputProps: { - decimalPlaces: 0 - } + decimalPlaces: 0, + }, }, { name: 'cassettes', @@ -111,8 +111,8 @@ const getElements = (config, bills, setWizard, widths, setMachineId) => { ) }, inputProps: { - decimalPlaces: 0 - } + decimalPlaces: 0, + }, }, { name: 'edit', @@ -131,8 +131,8 @@ const getElements = (config, bills, setWizard, widths, setMachineId) => { ) - } - } + }, + }, ] return elements diff --git a/packages/admin-ui/src/pages/Notifications/Notifications.jsx b/packages/admin-ui/src/pages/Notifications/Notifications.jsx index ee09c0cf..a6a28a5f 100644 --- a/packages/admin-ui/src/pages/Notifications/Notifications.jsx +++ b/packages/admin-ui/src/pages/Notifications/Notifications.jsx @@ -1,4 +1,4 @@ -import { useQuery, useMutation, gql } from "@apollo/client"; +import { useQuery, useMutation, gql } from '@apollo/client' import * as R from 'ramda' import React, { useState } from 'react' import Modal from 'src/components/Modal' @@ -70,7 +70,7 @@ const Notifications = ({ displayOverrides = true, displayTitle = true, displayThirdPartyProvider = true, - wizard = false + wizard = false, }) => { const [section, setSection] = useState(null) const [error, setError] = useState(null) @@ -83,7 +83,7 @@ const Notifications = ({ const [saveConfig] = useMutation(SAVE_CONFIG, { refetchQueries: ['getData'], onCompleted: () => setEditingKey(null), - onError: error => setError(error) + onError: error => setError(error), }) const [saveAccount] = useMutation(SAVE_ACCOUNT, { @@ -92,7 +92,7 @@ const Notifications = ({ setEmailSetupPopup(false) }, refetchQueries: ['getData'], - onError: error => setError(error) + onError: error => setError(error), }) const config = fromNamespace(SCREEN_KEY)(data?.config) @@ -103,7 +103,7 @@ const Notifications = ({ const mailgunAvailable = R.has('mailgun', data?.accounts || {}) const currency = R.path(['fiatCurrency'])( - fromNamespace(namespaces.LOCALE)(data?.config) + fromNamespace(namespaces.LOCALE)(data?.config), ) const save = R.curry((section, rawConfig) => { @@ -123,14 +123,14 @@ const Notifications = ({ const twilioSave = it => { setError(null) return saveAccount({ - variables: { accounts: { twilio: it } } + variables: { accounts: { twilio: it } }, }).then(() => R.compose(save(null), toNamespace('sms'))({ active: true })) } const mailgunSave = it => { setError(null) return saveAccount({ - variables: { accounts: { mailgun: it } } + variables: { accounts: { mailgun: it } }, }).then(() => R.compose(save(null), toNamespace('email'))({ active: true })) } @@ -153,7 +153,7 @@ const Notifications = ({ twilioAvailable, setSmsSetupPopup, mailgunAvailable, - setEmailSetupPopup + setEmailSetupPopup, } return ( diff --git a/packages/admin-ui/src/pages/Notifications/components/EditableNumber.jsx b/packages/admin-ui/src/pages/Notifications/components/EditableNumber.jsx index 6abbcf4b..116ae291 100644 --- a/packages/admin-ui/src/pages/Notifications/components/EditableNumber.jsx +++ b/packages/admin-ui/src/pages/Notifications/components/EditableNumber.jsx @@ -13,13 +13,13 @@ const EditableNumber = ({ decoration, className, decimalPlaces = 0, - width = 80 + width = 80, }) => { const { values } = useFormikContext() const classNames = { 'h-13': true, - className + className, } return ( diff --git a/packages/admin-ui/src/pages/Notifications/components/SingleFieldEditableNumber.jsx b/packages/admin-ui/src/pages/Notifications/components/SingleFieldEditableNumber.jsx index 78d486d1..39a30588 100644 --- a/packages/admin-ui/src/pages/Notifications/components/SingleFieldEditableNumber.jsx +++ b/packages/admin-ui/src/pages/Notifications/components/SingleFieldEditableNumber.jsx @@ -18,7 +18,7 @@ const SingleFieldEditableNumber = ({ max = 9999999, name, section, - className + className, }) => { const [saving, setSaving] = useState(false) @@ -42,7 +42,7 @@ const SingleFieldEditableNumber = ({ .integer() .min(min) .max(max) - .nullable() + .nullable(), }) return ( diff --git a/packages/admin-ui/src/pages/Notifications/sections/CryptoBalanceOverrides.jsx b/packages/admin-ui/src/pages/Notifications/sections/CryptoBalanceOverrides.jsx index dd083ead..a92d0b6c 100644 --- a/packages/admin-ui/src/pages/Notifications/sections/CryptoBalanceOverrides.jsx +++ b/packages/admin-ui/src/pages/Notifications/sections/CryptoBalanceOverrides.jsx @@ -23,27 +23,27 @@ const CryptoBalanceOverrides = ({ section }) => { error, currency, isDisabled, - setEditing + setEditing, } = useContext(NotificationsCtx) const setupValues = data?.cryptoBalanceOverrides ?? [] const innerSetEditing = it => setEditing(NAME, it) const onDelete = id => { const newOverrides = { - cryptoBalanceOverrides: R.reject(it => it.id === id, setupValues) + cryptoBalanceOverrides: R.reject(it => it.id === id, setupValues), } return save(newOverrides) } const overriddenCryptos = R.map(R.prop(CRYPTOCURRENCY_KEY))(setupValues) const suggestionFilter = R.filter( - it => !R.contains(it.code, overriddenCryptos) + it => !R.contains(it.code, overriddenCryptos), ) const suggestions = suggestionFilter(cryptoCurrencies) const findSuggestion = it => { const coin = R.compose(R.find(R.propEq('code', it?.cryptoCurrency)))( - cryptoCurrencies + cryptoCurrencies, ) return coin ? [coin] : [] } @@ -51,7 +51,7 @@ const CryptoBalanceOverrides = ({ section }) => { const initialValues = { [CRYPTOCURRENCY_KEY]: null, [LOW_BALANCE_KEY]: '', - [HIGH_BALANCE_KEY]: '' + [HIGH_BALANCE_KEY]: '', } const notesMin = 0 @@ -65,7 +65,7 @@ const CryptoBalanceOverrides = ({ section }) => { .label('Low balance') .when(HIGH_BALANCE_KEY, { is: HIGH_BALANCE_KEY => !HIGH_BALANCE_KEY, - then: schema => schema.required() + then: schema => schema.required(), }) .transform(transformNumber) .integer() @@ -76,21 +76,21 @@ const CryptoBalanceOverrides = ({ section }) => { .label('High balance') .when(LOW_BALANCE_KEY, { is: LOW_BALANCE_KEY => !LOW_BALANCE_KEY, - then: schema => schema.required() + then: schema => schema.required(), }) .transform(transformNumber) .integer() .min(notesMin) .max(CURRENCY_MAX) - .nullable() + .nullable(), }, - [LOW_BALANCE_KEY, HIGH_BALANCE_KEY] + [LOW_BALANCE_KEY, HIGH_BALANCE_KEY], ) const viewCrypto = it => R.compose( R.path(['display']), - R.find(R.propEq('code', it)) + R.find(R.propEq('code', it)), )(cryptoCurrencies) const elements = [ @@ -105,8 +105,8 @@ const CryptoBalanceOverrides = ({ section }) => { options: it => R.concat(suggestions, findSuggestion(it)), optionsLimit: null, valueProp: 'code', - labelProp: 'display' - } + labelProp: 'display', + }, }, { name: LOW_BALANCE_KEY, @@ -116,8 +116,8 @@ const CryptoBalanceOverrides = ({ section }) => { input: NumberInput, suffix: currency, inputProps: { - decimalPlaces: 2 - } + decimalPlaces: 2, + }, }, { name: HIGH_BALANCE_KEY, @@ -127,9 +127,9 @@ const CryptoBalanceOverrides = ({ section }) => { input: NumberInput, suffix: currency, inputProps: { - decimalPlaces: 2 - } - } + decimalPlaces: 2, + }, + }, ] return ( diff --git a/packages/admin-ui/src/pages/Notifications/sections/FiatBalanceAlerts.jsx b/packages/admin-ui/src/pages/Notifications/sections/FiatBalanceAlerts.jsx index 7c136cc1..0bead6e3 100644 --- a/packages/admin-ui/src/pages/Notifications/sections/FiatBalanceAlerts.jsx +++ b/packages/admin-ui/src/pages/Notifications/sections/FiatBalanceAlerts.jsx @@ -20,23 +20,23 @@ const DEFAULT_NUMBER_OF_RECYCLERS = 0 const notesMin = 0 const notesMax = 9999999 -const FiatBalance = ({ section, min = 0, max = 100, fieldWidth = 80 }) => { +const FiatBalance = ({ section, fieldWidth = 80 }) => { const { isEditing, isDisabled, setEditing, data, save, - machines = [] + machines = [], } = useContext(NotificationsCtx) const maxNumberOfCassettes = Math.max( ...R.map(it => it.numberOfCassettes, machines), - DEFAULT_NUMBER_OF_CASSETTES + DEFAULT_NUMBER_OF_CASSETTES, ) const maxNumberOfRecyclers = Math.max( ...R.map(it => it.numberOfRecyclers, machines), - DEFAULT_NUMBER_OF_RECYCLERS + DEFAULT_NUMBER_OF_RECYCLERS, ) const percentValidation = Yup.number() @@ -62,7 +62,7 @@ const FiatBalance = ({ section, min = 0, max = 100, fieldWidth = 80 }) => { fillingPercentageRecycler3: percentValidation, fillingPercentageRecycler4: percentValidation, fillingPercentageRecycler5: percentValidation, - fillingPercentageRecycler6: percentValidation + fillingPercentageRecycler6: percentValidation, }) return ( @@ -81,7 +81,7 @@ const FiatBalance = ({ section, min = 0, max = 100, fieldWidth = 80 }) => { fillingPercentageRecycler3: data?.fillingPercentageRecycler3 ?? '', fillingPercentageRecycler4: data?.fillingPercentageRecycler4 ?? '', fillingPercentageRecycler5: data?.fillingPercentageRecycler5 ?? '', - fillingPercentageRecycler6: data?.fillingPercentageRecycler6 ?? '' + fillingPercentageRecycler6: data?.fillingPercentageRecycler6 ?? '', }} validationSchema={schema} onSubmit={it => save(section, schema.cast(it))} @@ -145,7 +145,7 @@ const FiatBalance = ({ section, min = 0, max = 100, fieldWidth = 80 }) => {
), - R.times(R.identity, maxNumberOfCassettes) + R.times(R.identity, maxNumberOfCassettes), )}
@@ -210,9 +210,9 @@ const FiatBalance = ({ section, min = 0, max = 100, fieldWidth = 80 }) => { />
- + , ], - R.times(R.identity, maxNumberOfRecyclers / 2) + R.times(R.identity, maxNumberOfRecyclers / 2), )}
diff --git a/packages/admin-ui/src/pages/Notifications/sections/FiatBalanceOverrides.jsx b/packages/admin-ui/src/pages/Notifications/sections/FiatBalanceOverrides.jsx index 32e37865..06b69515 100644 --- a/packages/admin-ui/src/pages/Notifications/sections/FiatBalanceOverrides.jsx +++ b/packages/admin-ui/src/pages/Notifications/sections/FiatBalanceOverrides.jsx @@ -23,13 +23,13 @@ const CASSETTE_LIST = [ CASSETTE_1_KEY, CASSETTE_2_KEY, CASSETTE_3_KEY, - CASSETTE_4_KEY + CASSETTE_4_KEY, ] const widthsByNumberOfCassettes = { 2: { machine: 230, cashbox: 150, cassette: 250 }, 3: { machine: 216, cashbox: 150, cassette: 270 }, - 4: { machine: 210, cashbox: 150, cassette: 204 } + 4: { machine: 210, cashbox: 150, cassette: 204 }, } const FiatBalanceOverrides = ({ config, section }) => { @@ -39,7 +39,7 @@ const FiatBalanceOverrides = ({ config, section }) => { save, isDisabled, setEditing, - error + error, } = useContext(NotificationsCtx) const setupValues = data?.fiatBalanceOverrides ?? [] @@ -50,7 +50,7 @@ const FiatBalanceOverrides = ({ config, section }) => { const suggestions = R.differenceWith( (it, m) => it.deviceId === m, machines, - overriddenMachines + overriddenMachines, ) const findSuggestion = it => { @@ -64,7 +64,7 @@ const FiatBalanceOverrides = ({ config, section }) => { [CASSETTE_1_KEY]: '', [CASSETTE_2_KEY]: '', [CASSETTE_3_KEY]: '', - [CASSETTE_4_KEY]: '' + [CASSETTE_4_KEY]: '', } const notesMin = 0 @@ -72,7 +72,7 @@ const FiatBalanceOverrides = ({ config, section }) => { const maxNumberOfCassettes = Math.max( ...R.map(it => it.numberOfCassettes, machines), - DEFAULT_NUMBER_OF_CASSETTES + DEFAULT_NUMBER_OF_CASSETTES, ) const percentMin = 0 @@ -114,7 +114,7 @@ const FiatBalanceOverrides = ({ config, section }) => { .integer() .min(percentMin) .max(percentMax) - .nullable() + .nullable(), }) .test((values, context) => R.any(key => !R.isNil(values[key]), R.prepend(CASHBOX_KEY, CASSETTE_LIST)) @@ -122,8 +122,8 @@ const FiatBalanceOverrides = ({ config, section }) => { : context.createError({ path: CASHBOX_KEY, message: - 'The cash box or at least one of the cassettes must have a value' - }) + 'The cash box or at least one of the cassettes must have a value', + }), ) const viewMachine = it => @@ -141,8 +141,8 @@ const FiatBalanceOverrides = ({ config, section }) => { inputProps: { options: it => R.concat(suggestions, findSuggestion(it)), valueProp: 'deviceId', - labelProp: 'name' - } + labelProp: 'name', + }, }, { name: CASHBOX_KEY, @@ -153,9 +153,9 @@ const FiatBalanceOverrides = ({ config, section }) => { input: NumberInput, suffix: 'notes', inputProps: { - decimalPlaces: 0 - } - } + decimalPlaces: 0, + }, + }, ], R.map( it => ({ @@ -168,7 +168,7 @@ const FiatBalanceOverrides = ({ config, section }) => { input: NumberInput, suffix: '%', inputProps: { - decimalPlaces: 0 + decimalPlaces: 0, }, view: el => el?.toString() ?? '—', isHidden: value => @@ -177,11 +177,11 @@ const FiatBalanceOverrides = ({ config, section }) => { R.defaultTo( 0, machines.find(({ deviceId }) => deviceId === value.machine) - ?.numberOfCassettes - ) + ?.numberOfCassettes, + ), }), - R.range(1, maxNumberOfCassettes + 1) - ) + R.range(1, maxNumberOfCassettes + 1), + ), ) return ( diff --git a/packages/admin-ui/src/pages/Notifications/sections/Setup.jsx b/packages/admin-ui/src/pages/Notifications/sections/Setup.jsx index 82fecb6e..50733fca 100644 --- a/packages/admin-ui/src/pages/Notifications/sections/Setup.jsx +++ b/packages/admin-ui/src/pages/Notifications/sections/Setup.jsx @@ -7,7 +7,7 @@ import { TBody, Tr, Td, - Th + Th, } from 'src/components/fake-table/Table' import { fromNamespace, toNamespace } from 'src/utils/config' @@ -22,7 +22,7 @@ const sizes = { compliance: 178, errors: 142, security: 152, - active: 263 + active: 263, } const Row = ({ @@ -31,7 +31,7 @@ const Row = ({ forceDisable, save, shouldUpperCase, - onActivation + onActivation, }) => { const disabled = forceDisable || !data || !data.active @@ -80,7 +80,7 @@ const Setup = ({ wizard, forceDisable }) => { twilioAvailable, setSmsSetupPopup, mailgunAvailable, - setEmailSetupPopup + setEmailSetupPopup, } = useContext(NotificationsCtx) const namespaces = [ @@ -92,7 +92,7 @@ const Setup = ({ wizard, forceDisable }) => { if (mailgunAvailable) return true setEmailSetupPopup(true) return false - } + }, }, { name: 'sms', @@ -102,14 +102,14 @@ const Setup = ({ wizard, forceDisable }) => { if (twilioAvailable) return true setSmsSetupPopup(true) return false - } + }, }, { name: 'notificationCenter', forceDisable: forceDisable, shouldUpperCase: false, - onActivation: () => true - } + onActivation: () => true, + }, ] const widthAdjust = wizard ? 20 : 0 diff --git a/packages/admin-ui/src/pages/Notifications/sections/ThirdPartyProvider.jsx b/packages/admin-ui/src/pages/Notifications/sections/ThirdPartyProvider.jsx index 46f990f5..60a21e92 100644 --- a/packages/admin-ui/src/pages/Notifications/sections/ThirdPartyProvider.jsx +++ b/packages/admin-ui/src/pages/Notifications/sections/ThirdPartyProvider.jsx @@ -15,7 +15,7 @@ const ThirdPartyProvider = () => { save, data: _data, error, - accountsConfig + accountsConfig, } = useContext(NotificationsCtx) const data = fromNamespace('thirdParty')(_data) @@ -25,7 +25,7 @@ const ThirdPartyProvider = () => { const getDisplayName = type => it => R.compose( R.prop('display'), - R.find(R.propEq('code', it)) + R.find(R.propEq('code', it)), )(filterOptions(type)) const innerSave = async value => { @@ -35,7 +35,7 @@ const ThirdPartyProvider = () => { const ThirdPartySchema = Yup.object().shape({ sms: Yup.string('SMS must be a string').required('SMS is required'), - email: Yup.string('Email must be a string').required('Email is required') + email: Yup.string('Email must be a string').required('Email is required'), }) const elements = [ @@ -48,8 +48,8 @@ const ThirdPartyProvider = () => { inputProps: { options: filterOptions('sms'), valueProp: 'code', - labelProp: 'display' - } + labelProp: 'display', + }, }, { name: 'email', @@ -60,13 +60,13 @@ const ThirdPartyProvider = () => { inputProps: { options: filterOptions('email'), valueProp: 'code', - labelProp: 'display' - } - } + labelProp: 'display', + }, + }, ] const values = { sms: data.sms ?? 'twilio', - email: data.email ?? 'mailgun' + email: data.email ?? 'mailgun', } return ( diff --git a/packages/admin-ui/src/pages/OperatorInfo/CoinATMRadar.jsx b/packages/admin-ui/src/pages/OperatorInfo/CoinATMRadar.jsx index f8064b34..ea5c2b33 100644 --- a/packages/admin-ui/src/pages/OperatorInfo/CoinATMRadar.jsx +++ b/packages/admin-ui/src/pages/OperatorInfo/CoinATMRadar.jsx @@ -23,12 +23,12 @@ const CoinATMRadar = memo(({ wizard }) => { const { data } = useQuery(GET_CONFIG) const [saveConfig] = useMutation(SAVE_CONFIG, { - refetchQueries: ['getData'] + refetchQueries: ['getData'], }) const save = it => saveConfig({ - variables: { config: toNamespace(namespaces.COIN_ATM_RADAR, it) } + variables: { config: toNamespace(namespaces.COIN_ATM_RADAR, it) }, }) const coinAtmRadarConfig = @@ -54,12 +54,12 @@ const CoinATMRadar = memo(({ wizard }) => { elements={[ { name: 'commissions', - display: 'Commissions' + display: 'Commissions', }, { name: 'limitsAndVerification', - display: 'Limits and verification' - } + display: 'Limits and verification', + }, ]} save={save} /> diff --git a/packages/admin-ui/src/pages/OperatorInfo/ContactInfo.jsx b/packages/admin-ui/src/pages/OperatorInfo/ContactInfo.jsx index 1d0d83df..53cd7a90 100644 --- a/packages/admin-ui/src/pages/OperatorInfo/ContactInfo.jsx +++ b/packages/admin-ui/src/pages/OperatorInfo/ContactInfo.jsx @@ -71,14 +71,14 @@ const ContactInfo = ({ wizard }) => { const [saveConfig] = useMutation(SAVE_CONFIG, { onCompleted: () => setEditing(false), refetchQueries: () => ['getData'], - onError: e => setError(e) + onError: e => setError(e), }) const { data } = useQuery(GET_CONFIG) const save = it => { return saveConfig({ - variables: { config: toNamespace(namespaces.OPERATOR_INFO, it) } + variables: { config: toNamespace(namespaces.OPERATOR_INFO, it) }, }) } @@ -95,7 +95,7 @@ const ContactInfo = ({ wizard }) => { .email('Please enter a valid email address') .required('An email is required'), website: Yup.string(), - companyNumber: Yup.string() + companyNumber: Yup.string(), }) const fields = [ @@ -103,32 +103,32 @@ const ContactInfo = ({ wizard }) => { name: 'name', label: 'Company name', value: info.name ?? '', - component: TextInput + component: TextInput, }, { name: 'phone', label: 'Phone number', value: info.phone, - component: TextInput + component: TextInput, }, { name: 'email', label: 'Email', value: info.email ?? '', - component: TextInput + component: TextInput, }, { name: 'website', label: 'Website', value: info.website ?? '', - component: TextInput + component: TextInput, }, { name: 'companyNumber', label: 'Company registration number', value: info.companyNumber ?? '', - component: TextInput - } + component: TextInput, + }, ] const findField = name => R.find(R.propEq('name', name))(fields) @@ -143,8 +143,8 @@ const ContactInfo = ({ wizard }) => { phone: findValue('phone'), email: findValue('email'), website: findValue('website'), - companyNumber: findValue('companyNumber') - } + companyNumber: findValue('companyNumber'), + }, } const getErrorMsg = formikErrors => diff --git a/packages/admin-ui/src/pages/OperatorInfo/MachineScreens.jsx b/packages/admin-ui/src/pages/OperatorInfo/MachineScreens.jsx index 6a66f783..d53fdf9f 100644 --- a/packages/admin-ui/src/pages/OperatorInfo/MachineScreens.jsx +++ b/packages/admin-ui/src/pages/OperatorInfo/MachineScreens.jsx @@ -19,24 +19,24 @@ const SAVE_CONFIG = gql` } ` -const MachineScreens = memo(({ wizard }) => { +const MachineScreens = memo(() => { const { data } = useQuery(GET_CONFIG) const [saveConfig] = useMutation(SAVE_CONFIG, { - refetchQueries: () => ['getData'] + refetchQueries: () => ['getData'], }) const save = it => { const formatConfig = R.compose( toNamespace(namespaces.MACHINE_SCREENS), toNamespace('rates'), - R.mergeRight(ratesScreenConfig) + R.mergeRight(ratesScreenConfig), ) return saveConfig({ variables: { - config: formatConfig({ active: it }) - } + config: formatConfig({ active: it }), + }, }) } @@ -47,7 +47,7 @@ const MachineScreens = memo(({ wizard }) => { data?.config && R.compose( fromNamespace('rates'), - fromNamespace(namespaces.MACHINE_SCREENS) + fromNamespace(namespaces.MACHINE_SCREENS), )(data.config) if (!machineScreensConfig) return null diff --git a/packages/admin-ui/src/pages/OperatorInfo/ReceiptPrinting.jsx b/packages/admin-ui/src/pages/OperatorInfo/ReceiptPrinting.jsx index 4f0209d9..88ad61da 100644 --- a/packages/admin-ui/src/pages/OperatorInfo/ReceiptPrinting.jsx +++ b/packages/admin-ui/src/pages/OperatorInfo/ReceiptPrinting.jsx @@ -24,7 +24,7 @@ const ReceiptPrinting = memo(({ wizard }) => { const { data } = useQuery(GET_CONFIG) const [saveConfig] = useMutation(SAVE_CONFIG, { - refetchQueries: () => ['getData'] + refetchQueries: () => ['getData'], }) const saveSwitch = object => { @@ -32,15 +32,15 @@ const ReceiptPrinting = memo(({ wizard }) => { variables: { config: toNamespace( namespaces.RECEIPT, - R.mergeRight(receiptPrintingConfig, object) - ) - } + R.mergeRight(receiptPrintingConfig, object), + ), + }, }) } const save = it => saveConfig({ - variables: { config: toNamespace(namespaces.RECEIPT, it) } + variables: { config: toNamespace(namespaces.RECEIPT, it) }, }) const receiptPrintingConfig = @@ -76,36 +76,36 @@ const ReceiptPrinting = memo(({ wizard }) => { elements={[ { name: 'operatorWebsite', - display: 'Operator website' + display: 'Operator website', }, { name: 'operatorEmail', - display: 'Operator email' + display: 'Operator email', }, { name: 'operatorPhone', - display: 'Operator phone' + display: 'Operator phone', }, { name: 'companyNumber', - display: 'Company registration number' + display: 'Company registration number', }, { name: 'machineLocation', - display: 'Machine location' + display: 'Machine location', }, { name: 'customerNameOrPhoneNumber', - display: 'Customer name or phone number (if known)' + display: 'Customer name or phone number (if known)', }, { name: 'exchangeRate', - display: 'Exchange rate' + display: 'Exchange rate', }, { name: 'addressQRCode', - display: 'Address QR code' - } + display: 'Address QR code', + }, ]} save={save} /> diff --git a/packages/admin-ui/src/pages/OperatorInfo/SMSNotices/SMSNotices.jsx b/packages/admin-ui/src/pages/OperatorInfo/SMSNotices/SMSNotices.jsx index bae80f2d..287938c8 100644 --- a/packages/admin-ui/src/pages/OperatorInfo/SMSNotices/SMSNotices.jsx +++ b/packages/admin-ui/src/pages/OperatorInfo/SMSNotices/SMSNotices.jsx @@ -82,13 +82,13 @@ const TOOLTIPS = { cashOutDispenseReady: ``, smsReceipt: formatContent(`The contents of this notice will be appended to the end of the SMS receipt sent, and not replace it.\n - To edit the contents of the SMS receipt, please go to the 'Receipt' tab`) + To edit the contents of the SMS receipt, please go to the 'Receipt' tab`), } const SMSPreview = ({ sms, coords, timezone }) => { const matches = { '#code': 123, - '#timestamp': formatDate(new Date(), timezone, 'HH:mm') + '#timestamp': formatDate(new Date(), timezone, 'HH:mm'), } return ( @@ -128,17 +128,17 @@ const SMSNotices = () => { const [editMessage] = useMutation(EDIT_SMS_NOTICE, { onError: ({ msg }) => setErrorMsg(msg), - refetchQueries: () => ['SMSNotices'] + refetchQueries: () => ['SMSNotices'], }) const [enableMessage] = useMutation(ENABLE_SMS_NOTICE, { onError: ({ msg }) => setErrorMsg(msg), - refetchQueries: () => ['SMSNotices'] + refetchQueries: () => ['SMSNotices'], }) const [disableMessage] = useMutation(DISABLE_SMS_NOTICE, { onError: ({ msg }) => setErrorMsg(msg), - refetchQueries: () => ['SMSNotices'] + refetchQueries: () => ['SMSNotices'], }) const loading = messagesLoading @@ -164,7 +164,7 @@ const SMSNotices = () => { ) : ( R.prop('messageName', it) - ) + ), }, { header: 'Edit', @@ -182,7 +182,7 @@ const SMSNotices = () => { - ) + ), }, { header: 'Enable', @@ -199,7 +199,7 @@ const SMSNotices = () => { }} checked={it.enabled} /> - ) + ), }, { header: '', @@ -215,7 +215,7 @@ const SMSNotices = () => { y: window.innerHeight - 5 - - e.currentTarget.getBoundingClientRect().bottom + e.currentTarget.getBoundingClientRect().bottom, }) R.equals(selectedSMS, it) ? setPreviewOpen(!previewOpen) @@ -229,8 +229,8 @@ const SMSNotices = () => { )} - ) - } + ), + }, ] return ( diff --git a/packages/admin-ui/src/pages/OperatorInfo/SMSNotices/SMSNoticesModal.jsx b/packages/admin-ui/src/pages/OperatorInfo/SMSNotices/SMSNoticesModal.jsx index 4939df23..29dcd876 100644 --- a/packages/admin-ui/src/pages/OperatorInfo/SMSNotices/SMSNoticesModal.jsx +++ b/packages/admin-ui/src/pages/OperatorInfo/SMSNotices/SMSNoticesModal.jsx @@ -30,39 +30,39 @@ const PREFILL = { name: 'has-code', message: 'The confirmation code is missing from the message!', exclusive: false, - test: value => value?.match(/#code/g)?.length > 0 + test: value => value?.match(/#code/g)?.length > 0, }) .test({ name: 'has-single-code', message: 'There should be a single confirmation code!', exclusive: false, - test: value => value?.match(/#code/g)?.length === 1 - }) + test: value => value?.match(/#code/g)?.length === 1, + }), }, cashOutDispenseReady: { - validator: Yup.string().required('The message content is required!').trim() + validator: Yup.string().required('The message content is required!').trim(), }, smsReceipt: { - validator: Yup.string().trim() - } + validator: Yup.string().trim(), + }, } const CHIPS = { smsCode: [ { code: '#code', display: 'Confirmation code', obligatory: true }, - { code: '#timestamp', display: 'Timestamp', obligatory: false } + { code: '#timestamp', display: 'Timestamp', obligatory: false }, ], cashOutDispenseReady: [ - { code: '#timestamp', display: 'Timestamp', obligatory: false } + { code: '#timestamp', display: 'Timestamp', obligatory: false }, ], - smsReceipt: [{ code: '#timestamp', display: 'Timestamp', obligatory: false }] + smsReceipt: [{ code: '#timestamp', display: 'Timestamp', obligatory: false }], } const DEFAULT_MESSAGES = { smsCode: 'Your cryptomat code: #code', cashOutDispenseReady: 'Your cash is waiting! Go to the Cryptomat and press Redeem within 24 hours. [#timestamp]', - smsReceipt: '' + smsReceipt: '', } const SMSNoticesModal = ({ @@ -70,18 +70,18 @@ const SMSNoticesModal = ({ onClose, sms, creationError, - submit + submit, }) => { const initialValues = { event: !R.isNil(sms) ? sms.event : '', - message: !R.isNil(sms) ? sms.message : '' + message: !R.isNil(sms) ? sms.message : '', } const validationSchema = Yup.object().shape({ event: Yup.string().required('An event is required!'), message: PREFILL[sms?.event]?.validator ?? - Yup.string().required('The message content is required!').trim() + Yup.string().required('The message content is required!').trim(), }) const handleSubmit = values => { @@ -90,14 +90,14 @@ const SMSNoticesModal = ({ variables: { id: sms.id, event: values.event, - message: values.message - } + message: values.message, + }, }) : submit({ variables: { event: values.event, - message: values.message - } + message: values.message, + }, }) onClose() } @@ -160,8 +160,8 @@ const SMSNoticesModal = ({ 'message', values.message.concat( R.last(values.message) === ' ' ? '' : ' ', - ite.code - ) + ite.code, + ), ) }} /> diff --git a/packages/admin-ui/src/pages/OperatorInfo/TermsConditions.jsx b/packages/admin-ui/src/pages/OperatorInfo/TermsConditions.jsx index 95dfee1b..0065d74e 100644 --- a/packages/admin-ui/src/pages/OperatorInfo/TermsConditions.jsx +++ b/packages/admin-ui/src/pages/OperatorInfo/TermsConditions.jsx @@ -32,7 +32,7 @@ const Field = ({ }) => { const info3ClassNames = { 'overflow-hidden whitespace-nowrap text-ellipsis h-6': !multiline, - 'wrap-anywhere overflow-y-auto h-32 mt-4 leading-[23px]': multiline + 'wrap-anywhere overflow-y-auto h-32 mt-4 leading-[23px]': multiline, } return ( @@ -88,7 +88,7 @@ const TermsConditions = () => { setEditing(false) }, refetchQueries: () => ['getData'], - onError: e => setError(e) + onError: e => setError(e), }) const { data } = useQuery(GET_CONFIG) @@ -102,7 +102,7 @@ const TermsConditions = () => { const save = it => saveConfig({ - variables: { config: toNamespace(namespaces.TERMS_CONDITIONS, it) } + variables: { config: toNamespace(namespaces.TERMS_CONDITIONS, it) }, }) const fields = [ @@ -110,7 +110,7 @@ const TermsConditions = () => { name: 'title', label: 'Screen title', value: formData.title ?? '', - width: 282 + width: 282, }, { name: 'text', @@ -118,22 +118,22 @@ const TermsConditions = () => { value: formData.text ?? '', width: 502, multiline: true, - rows: 6 + rows: 6, }, { name: 'acceptButtonText', label: 'Accept button text', value: formData.acceptButtonText ?? '', placeholder: 'I accept', - width: 282 + width: 282, }, { name: 'cancelButtonText', label: 'Cancel button text', value: formData.cancelButtonText ?? '', placeholder: 'Cancel', - width: 282 - } + width: 282, + }, ] const findField = name => R.find(R.propEq('name', name))(fields) @@ -143,7 +143,7 @@ const TermsConditions = () => { title: findValue('title'), text: findValue('text'), acceptButtonText: findValue('acceptButtonText'), - cancelButtonText: findValue('cancelButtonText') + cancelButtonText: findValue('cancelButtonText'), } const validationSchema = Yup.object().shape({ @@ -151,14 +151,14 @@ const TermsConditions = () => { .required('The screen title is required') .max(50, 'Too long'), text: Yup.string('The text content must be a string').required( - 'The text content is required' + 'The text content is required', ), acceptButtonText: Yup.string('The accept button text must be a string') .required('The accept button text is required') .max(50, 'The accept button text is too long'), cancelButtonText: Yup.string('The cancel button text must be a string') .required('The cancel button text is required') - .max(50, 'The cancel button text is too long') + .max(50, 'The cancel button text is too long'), }) return ( diff --git a/packages/admin-ui/src/pages/Services/FormRenderer.jsx b/packages/admin-ui/src/pages/Services/FormRenderer.jsx index ca4cbf3b..220faaab 100644 --- a/packages/admin-ui/src/pages/Services/FormRenderer.jsx +++ b/packages/admin-ui/src/pages/Services/FormRenderer.jsx @@ -14,11 +14,10 @@ const FormRenderer = ({ save, buttonLabel = 'Save changes', buttonClass, - xs = 12 }) => { const initialValues = R.compose( R.mergeAll, - R.map(({ code }) => ({ [code]: (value && value[code]) ?? '' })) + R.map(({ code }) => ({ [code]: (value && value[code]) ?? '' })), )(elements) const values = R.merge(initialValues, value) @@ -31,10 +30,10 @@ const FormRenderer = ({ R.filter( elem => R.prop('component', elem) === SecretInput && - R.isEmpty(it[R.prop('code', elem)]) - ) + R.isEmpty(it[R.prop('code', elem)]), + ), )(elements) - return save(R.omit(emptySecretFields, it)).catch(s => { + return save(R.omit(emptySecretFields, it)).catch(() => { setSaveError({ save: 'Failed to save changes' }) }) } @@ -62,7 +61,7 @@ const FormRenderer = ({ fullWidth={true} /> - ) + ), )}
diff --git a/packages/admin-ui/src/pages/Services/Services.jsx b/packages/admin-ui/src/pages/Services/Services.jsx index c5e728f0..aac6085c 100644 --- a/packages/admin-ui/src/pages/Services/Services.jsx +++ b/packages/admin-ui/src/pages/Services/Services.jsx @@ -38,7 +38,7 @@ const Services = () => { const { data: marketsData, loading: marketsLoading } = useQuery(GET_MARKETS) const [saveAccount] = useMutation(SAVE_ACCOUNT, { onCompleted: () => setEditingSchema(null), - refetchQueries: ['getData'] + refetchQueries: ['getData'], }) const markets = marketsData?.getMarkets @@ -52,7 +52,7 @@ const Services = () => { const values = accounts[code] || {} return R.map(({ display, code, long }) => ({ label: display, - value: long ? formatLong(values[code]) : values[code] + value: long ? formatLong(values[code]) : values[code], }))(faceElements) } @@ -75,8 +75,8 @@ const Services = () => { inputProps: { isPasswordFilled: !R.isNil(accounts[code]) && - !R.isNil(R.path([elem.code], accounts[code])) - } + !R.isNil(R.path([elem.code], accounts[code])), + }, } }, elements) } @@ -87,11 +87,11 @@ const Services = () => { const mapToCode = R.map(R.prop(['code'])) const passwordFields = R.compose( mapToCode, - filterBySecretComponent + filterBySecretComponent, )(elements) return R.mapObjIndexed( (value, key) => (R.includes(key, passwordFields) ? '' : value), - account + account, ) } @@ -124,7 +124,7 @@ const Services = () => { saveAccount({ - variables: { accounts: { [editingSchema.code]: it } } + variables: { accounts: { [editingSchema.code]: it } }, }) } elements={getElements(editingSchema)} diff --git a/packages/admin-ui/src/pages/Services/schemas/binance.js b/packages/admin-ui/src/pages/Services/schemas/binance.js index faec0e35..4182a6e4 100644 --- a/packages/admin-ui/src/pages/Services/schemas/binance.js +++ b/packages/admin-ui/src/pages/Services/schemas/binance.js @@ -3,7 +3,7 @@ import * as Yup from 'yup' import { SecretInput, TextInput, - Autocomplete + Autocomplete, } from 'src/components/inputs/formik' import { secretTest, buildCurrencyOptions } from './helper' @@ -19,12 +19,12 @@ const schema = markets => { display: 'API key', component: TextInput, face: true, - long: true + long: true, }, { code: 'privateKey', display: 'Private key', - component: SecretInput + component: SecretInput, }, { code: 'currencyMarket', @@ -33,10 +33,10 @@ const schema = markets => { inputProps: { options: buildCurrencyOptions(markets), labelProp: 'display', - valueProp: 'code' + valueProp: 'code', }, - face: true - } + face: true, + }, ], getValidationSchema: account => { return Yup.object().shape({ @@ -47,10 +47,10 @@ const schema = markets => { .max(100, 'The private key is too long') .test(secretTest(account?.privateKey, 'private key')), currencyMarket: Yup.string( - 'The currency market must be a string' - ).required('The currency market is required') + 'The currency market must be a string', + ).required('The currency market is required'), }) - } + }, } } diff --git a/packages/admin-ui/src/pages/Services/schemas/binanceus.js b/packages/admin-ui/src/pages/Services/schemas/binanceus.js index 74795e24..708fc593 100644 --- a/packages/admin-ui/src/pages/Services/schemas/binanceus.js +++ b/packages/admin-ui/src/pages/Services/schemas/binanceus.js @@ -3,7 +3,7 @@ import * as Yup from 'yup' import { SecretInput, TextInput, - Autocomplete + Autocomplete, } from 'src/components/inputs/formik' import { secretTest, buildCurrencyOptions } from './helper' @@ -19,12 +19,12 @@ const schema = markets => { display: 'API key', component: TextInput, face: true, - long: true + long: true, }, { code: 'privateKey', display: 'Private key', - component: SecretInput + component: SecretInput, }, { code: 'currencyMarket', @@ -33,10 +33,10 @@ const schema = markets => { inputProps: { options: buildCurrencyOptions(markets), labelProp: 'display', - valueProp: 'code' + valueProp: 'code', }, - face: true - } + face: true, + }, ], getValidationSchema: account => { return Yup.object().shape({ @@ -47,10 +47,10 @@ const schema = markets => { .max(100, 'The private key is too long') .test(secretTest(account?.privateKey, 'private key')), currencyMarket: Yup.string( - 'The currency market must be a string' - ).required('The currency market is required') + 'The currency market must be a string', + ).required('The currency market is required'), }) - } + }, } } diff --git a/packages/admin-ui/src/pages/Services/schemas/bitfinex.js b/packages/admin-ui/src/pages/Services/schemas/bitfinex.js index c0485af1..67563406 100644 --- a/packages/admin-ui/src/pages/Services/schemas/bitfinex.js +++ b/packages/admin-ui/src/pages/Services/schemas/bitfinex.js @@ -3,7 +3,7 @@ import * as Yup from 'yup' import { SecretInput, TextInput, - Autocomplete + Autocomplete, } from 'src/components/inputs/formik' import { secretTest, buildCurrencyOptions } from './helper' @@ -19,12 +19,12 @@ const schema = markets => { display: 'API key', component: TextInput, face: true, - long: true + long: true, }, { code: 'secret', display: 'API secret', - component: SecretInput + component: SecretInput, }, { code: 'currencyMarket', @@ -33,10 +33,10 @@ const schema = markets => { inputProps: { options: buildCurrencyOptions(markets), labelProp: 'display', - valueProp: 'code' + valueProp: 'code', }, - face: true - } + face: true, + }, ], getValidationSchema: account => { return Yup.object().shape({ @@ -47,10 +47,10 @@ const schema = markets => { .max(100, 'The API secret is too long') .test(secretTest(account?.secret, 'API secret')), currencyMarket: Yup.string( - 'The currency market must be a string' - ).required('The currency market is required') + 'The currency market must be a string', + ).required('The currency market is required'), }) - } + }, } } diff --git a/packages/admin-ui/src/pages/Services/schemas/bitgo.js b/packages/admin-ui/src/pages/Services/schemas/bitgo.js index 07c2705b..8185701d 100644 --- a/packages/admin-ui/src/pages/Services/schemas/bitgo.js +++ b/packages/admin-ui/src/pages/Services/schemas/bitgo.js @@ -3,7 +3,7 @@ import * as Yup from 'yup' import { TextInput, SecretInput, - Autocomplete + Autocomplete, } from 'src/components/inputs/formik' import { secretTest } from './helper' @@ -15,7 +15,7 @@ const buildTestValidation = (id, passphrase) => { .max(100, 'Too long') .when(id, { is: isDefined, - then: schema => schema.test(secretTest(passphrase)) + then: schema => schema.test(secretTest(passphrase)), }) } @@ -29,7 +29,7 @@ export default { display: 'API token', component: TextInput, face: true, - long: true + long: true, }, { code: 'environment', @@ -38,63 +38,63 @@ export default { inputProps: { options: [ { code: 'prod', display: 'prod' }, - { code: 'test', display: 'test' } + { code: 'test', display: 'test' }, ], labelProp: 'display', - valueProp: 'code' + valueProp: 'code', }, - face: true + face: true, }, { code: 'BTCWalletId', display: 'BTC wallet ID', - component: TextInput + component: TextInput, }, { code: 'BTCWalletPassphrase', display: 'BTC wallet passphrase', - component: SecretInput + component: SecretInput, }, { code: 'LTCWalletId', display: 'LTC wallet ID', - component: TextInput + component: TextInput, }, { code: 'LTCWalletPassphrase', display: 'LTC wallet passphrase', - component: SecretInput + component: SecretInput, }, { code: 'ZECWalletId', display: 'ZEC wallet ID', - component: TextInput + component: TextInput, }, { code: 'ZECWalletPassphrase', display: 'ZEC wallet passphrase', - component: SecretInput + component: SecretInput, }, { code: 'BCHWalletId', display: 'BCH wallet ID', - component: TextInput + component: TextInput, }, { code: 'BCHWalletPassphrase', display: 'BCH wallet passphrase', - component: SecretInput + component: SecretInput, }, { code: 'DASHWalletId', display: 'DASH wallet ID', - component: TextInput + component: TextInput, }, { code: 'DASHWalletPassphrase', display: 'DASH wallet passphrase', - component: SecretInput - } + component: SecretInput, + }, ], getValidationSchema: account => { return Yup.object().shape({ @@ -103,47 +103,47 @@ export default { .required('The token is required'), BTCWalletId: Yup.string('The BTC wallet ID must be a string').max( 100, - 'The BTC wallet ID is too long' + 'The BTC wallet ID is too long', ), BTCWalletPassphrase: buildTestValidation( 'BTCWalletId', - account?.BTCWalletPassphrase + account?.BTCWalletPassphrase, ), LTCWalletId: Yup.string('The LTC wallet ID must be a string').max( 100, - 'The LTC wallet ID is too long' + 'The LTC wallet ID is too long', ), LTCWalletPassphrase: buildTestValidation( 'LTCWalletId', - account?.LTCWalletPassphrase + account?.LTCWalletPassphrase, ), ZECWalletId: Yup.string('The ZEC wallet ID must be a string').max( 100, - 'The ZEC wallet ID is too long' + 'The ZEC wallet ID is too long', ), ZECWalletPassphrase: buildTestValidation( 'ZECWalletId', - account?.ZECWalletPassphrase + account?.ZECWalletPassphrase, ), BCHWalletId: Yup.string('The BCH wallet ID must be a string').max( 100, - 'The BCH wallet ID is too long' + 'The BCH wallet ID is too long', ), BCHWalletPassphrase: buildTestValidation( 'BCHWalletId', - account?.BCHWalletPassphrase + account?.BCHWalletPassphrase, ), DASHWalletId: Yup.string('The DASH wallet ID must be a string').max( 100, - 'The DASH wallet ID is too long' + 'The DASH wallet ID is too long', ), DASHWalletPassphrase: buildTestValidation( 'DASHWalletId', - account?.DASHWalletPassphrase + account?.DASHWalletPassphrase, ), environment: Yup.string('The environment must be a string') .matches(/(prod|test)/) - .required('The environment is required') - }); - } + .required('The environment is required'), + }) + }, } diff --git a/packages/admin-ui/src/pages/Services/schemas/bitstamp.js b/packages/admin-ui/src/pages/Services/schemas/bitstamp.js index e9061e9e..d2664809 100644 --- a/packages/admin-ui/src/pages/Services/schemas/bitstamp.js +++ b/packages/admin-ui/src/pages/Services/schemas/bitstamp.js @@ -3,7 +3,7 @@ import * as Yup from 'yup' import { SecretInput, TextInput, - Autocomplete + Autocomplete, } from 'src/components/inputs/formik' import { secretTest, buildCurrencyOptions } from './helper' @@ -19,19 +19,19 @@ const schema = markets => { display: 'Client ID', component: TextInput, face: true, - long: true + long: true, }, { code: 'key', display: 'API key', component: TextInput, face: true, - long: true + long: true, }, { code: 'secret', display: 'API secret', - component: SecretInput + component: SecretInput, }, { code: 'currencyMarket', @@ -40,10 +40,10 @@ const schema = markets => { inputProps: { options: buildCurrencyOptions(markets), labelProp: 'display', - valueProp: 'code' + valueProp: 'code', }, - face: true - } + face: true, + }, ], getValidationSchema: account => { return Yup.object().shape({ @@ -57,10 +57,10 @@ const schema = markets => { .max(100, 'The API secret is too long') .test(secretTest(account?.secret, 'API secret')), currencyMarket: Yup.string( - 'The currency market must be a string' - ).required('The currency market is required') + 'The currency market must be a string', + ).required('The currency market is required'), }) - } + }, } } diff --git a/packages/admin-ui/src/pages/Services/schemas/blockcypher.js b/packages/admin-ui/src/pages/Services/schemas/blockcypher.js index d0875577..564127bb 100644 --- a/packages/admin-ui/src/pages/Services/schemas/blockcypher.js +++ b/packages/admin-ui/src/pages/Services/schemas/blockcypher.js @@ -12,13 +12,13 @@ export default { display: 'API token', component: TextInput, face: true, - long: true + long: true, }, { code: 'confidenceFactor', display: 'Confidence factor', component: NumberInput, - face: true + face: true, }, { code: 'rbf', @@ -30,10 +30,10 @@ export default { 'Lower the confidence of RBF transactions (Available when using bitcoind.)', label: 'Lower the confidence of RBF transactions', requirement: 'bitcoind', - rightSideLabel: true + rightSideLabel: true, }, - face: true - } + face: true, + }, ], getValidationSchema: () => { return Yup.object().shape({ @@ -44,7 +44,7 @@ export default { .integer('The confidence factor must be an integer') .min(0, 'The confidence factor must be between 0 and 100') .max(100, 'The confidence factor must be between 0 and 100') - .required('The confidence factor is required') + .required('The confidence factor is required'), }) - } + }, } diff --git a/packages/admin-ui/src/pages/Services/schemas/cex.js b/packages/admin-ui/src/pages/Services/schemas/cex.js index b887db93..25488088 100644 --- a/packages/admin-ui/src/pages/Services/schemas/cex.js +++ b/packages/admin-ui/src/pages/Services/schemas/cex.js @@ -3,7 +3,7 @@ import * as Yup from 'yup' import { SecretInput, TextInput, - Autocomplete + Autocomplete, } from 'src/components/inputs/formik' import { secretTest, buildCurrencyOptions } from './helper' @@ -19,19 +19,19 @@ const schema = markets => { display: 'API key', component: TextInput, face: true, - long: true + long: true, }, { code: 'uid', display: 'User ID', component: TextInput, face: true, - long: true + long: true, }, { code: 'privateKey', display: 'Private key', - component: SecretInput + component: SecretInput, }, { code: 'currencyMarket', @@ -40,10 +40,10 @@ const schema = markets => { inputProps: { options: buildCurrencyOptions(markets), labelProp: 'display', - valueProp: 'code' + valueProp: 'code', }, - face: true - } + face: true, + }, ], getValidationSchema: account => { return Yup.object().shape({ @@ -57,10 +57,10 @@ const schema = markets => { .max(100, 'The private key is too long') .test(secretTest(account?.privateKey, 'private key')), currencyMarket: Yup.string( - 'The currency market must be a string' - ).required('The currency market is required') + 'The currency market must be a string', + ).required('The currency market is required'), }) - } + }, } } diff --git a/packages/admin-ui/src/pages/Services/schemas/elliptic.js b/packages/admin-ui/src/pages/Services/schemas/elliptic.js index 41d0d810..acb943f8 100644 --- a/packages/admin-ui/src/pages/Services/schemas/elliptic.js +++ b/packages/admin-ui/src/pages/Services/schemas/elliptic.js @@ -13,19 +13,19 @@ export default { { code: 'apiKey', display: 'API Key', - component: SecretInputFormik + component: SecretInputFormik, }, { code: 'apiSecret', display: 'API Secret', - component: SecretInputFormik + component: SecretInputFormik, }, { code: 'scoreThreshold', display: 'Score threshold', component: NumberInputFormik, face: true, - long: false + long: false, }, { code: 'enabled', @@ -35,10 +35,10 @@ export default { disabledMessage: 'This plugin is disabled', label: 'Enabled', requirement: null, - rightSideLabel: true + rightSideLabel: true, }, - face: true - } + face: true, + }, ], getValidationSchema: account => { return Yup.object().shape({ @@ -56,8 +56,8 @@ export default { .test( 'no-leading-zeros', 'The score threshold must not have leading zeros', - leadingZerosTest - ) + leadingZerosTest, + ), }) - } + }, } diff --git a/packages/admin-ui/src/pages/Services/schemas/galoy.js b/packages/admin-ui/src/pages/Services/schemas/galoy.js index d98a07f4..a0fc2727 100644 --- a/packages/admin-ui/src/pages/Services/schemas/galoy.js +++ b/packages/admin-ui/src/pages/Services/schemas/galoy.js @@ -3,7 +3,7 @@ import * as Yup from 'yup' import { SecretInput, TextInput, - Autocomplete + Autocomplete, } from 'src/components/inputs/formik' import { secretTest } from './helper' @@ -16,7 +16,7 @@ export default { { code: 'apiSecret', display: 'API Secret', - component: SecretInput + component: SecretInput, }, { code: 'environment', @@ -25,23 +25,23 @@ export default { inputProps: { options: [ { code: 'main', display: 'prod' }, - { code: 'test', display: 'test' } + { code: 'test', display: 'test' }, ], labelProp: 'display', - valueProp: 'code' + valueProp: 'code', }, - face: true + face: true, }, { code: 'endpoint', display: 'Endpoint', - component: TextInput + component: TextInput, }, { code: 'walletId', display: 'Wallet ID', - component: SecretInput - } + component: SecretInput, + }, ], getValidationSchema: account => { return Yup.object().shape({ @@ -56,7 +56,7 @@ export default { .required('The environment is required'), endpoint: Yup.string('The endpoint must be a string') .max(100, 'The endpoint is too long') - .required('The endpoint is required') - }); - } + .required('The endpoint is required'), + }) + }, } diff --git a/packages/admin-ui/src/pages/Services/schemas/helper.js b/packages/admin-ui/src/pages/Services/schemas/helper.js index f4be746c..65347f36 100644 --- a/packages/admin-ui/src/pages/Services/schemas/helper.js +++ b/packages/admin-ui/src/pages/Services/schemas/helper.js @@ -5,7 +5,7 @@ import * as R from 'ramda' const WARNING_LEVELS = { CLEAN: 'clean', PARTIAL: 'partial', - IMPORTANT: 'important' + IMPORTANT: 'important', } const secretTest = (secret, message) => ({ @@ -16,7 +16,7 @@ const secretTest = (secret, message) => ({ return this.createError() } return true - } + }, }) const leadingZerosTest = (value, context) => { @@ -39,7 +39,7 @@ const buildCurrencyOptions = markets => { R.length(unavailableCryptosFiltered) > 1 ? `${R.join( ', ', - R.slice(0, -1, unavailableCryptosFiltered) + R.slice(0, -1, unavailableCryptosFiltered), )} and ${R.last(unavailableCryptosFiltered)}` : unavailableCryptosFiltered[0] @@ -56,7 +56,7 @@ const buildCurrencyOptions = markets => { warning: warningLevel, warningMessage: !R.isEmpty(unavailableCryptosFiltered) ? `No market pairs available for ${unavailableMarketsStr}` - : `All market pairs are available` + : `All market pairs are available`, } }, R.keys(markets)) } diff --git a/packages/admin-ui/src/pages/Services/schemas/index.js b/packages/admin-ui/src/pages/Services/schemas/index.js index e952771b..695aa598 100644 --- a/packages/admin-ui/src/pages/Services/schemas/index.js +++ b/packages/admin-ui/src/pages/Services/schemas/index.js @@ -48,7 +48,7 @@ const schemas = (markets = {}) => { [trongrid.code]: trongrid, [binance.code]: binance, [bitfinex.code]: bitfinex, - [sumsub.code]: sumsub + [sumsub.code]: sumsub, } } diff --git a/packages/admin-ui/src/pages/Services/schemas/inforu.js b/packages/admin-ui/src/pages/Services/schemas/inforu.js index a334afe6..3dbe292f 100644 --- a/packages/admin-ui/src/pages/Services/schemas/inforu.js +++ b/packages/admin-ui/src/pages/Services/schemas/inforu.js @@ -13,25 +13,25 @@ export default { code: 'username', display: 'InforU username', component: TextInputFormik, - face: true + face: true, }, { code: 'apiKey', display: 'API Key', - component: SecretInputFormik + component: SecretInputFormik, }, { code: 'fromNumber', display: 'InforU sender', component: TextInputFormik, - face: true + face: true, }, { code: 'toNumber', display: 'Notifications Number (international format)', component: TextInputFormik, - face: true - } + face: true, + }, ], getValidationSchema: account => { return Yup.object().shape({ @@ -46,7 +46,7 @@ export default { .required('The InforU sender is required'), toNumber: Yup.string('The notifications number must be a string') .max(100, 'The notifications number is too long') - .required('The notifications number is required') + .required('The notifications number is required'), }) - } + }, } diff --git a/packages/admin-ui/src/pages/Services/schemas/infura.js b/packages/admin-ui/src/pages/Services/schemas/infura.js index 8a18752b..87d3895d 100644 --- a/packages/admin-ui/src/pages/Services/schemas/infura.js +++ b/packages/admin-ui/src/pages/Services/schemas/infura.js @@ -10,14 +10,14 @@ export default { code: 'endpoint', display: 'Endpoint', component: TextInputFormik, - face: true - } + face: true, + }, ], getValidationSchema: () => { return Yup.object().shape({ endpoint: Yup.string('The endpoint must be a string') .max(100, 'The endpoint is too long') - .required('The endpoint is required') + .required('The endpoint is required'), }) - } + }, } diff --git a/packages/admin-ui/src/pages/Services/schemas/itbit.js b/packages/admin-ui/src/pages/Services/schemas/itbit.js index d6607461..d679af1b 100644 --- a/packages/admin-ui/src/pages/Services/schemas/itbit.js +++ b/packages/admin-ui/src/pages/Services/schemas/itbit.js @@ -3,7 +3,7 @@ import * as Yup from 'yup' import { SecretInput, TextInput, - Autocomplete + Autocomplete, } from 'src/components/inputs/formik' import { buildCurrencyOptions, secretTest } from './helper' @@ -19,24 +19,24 @@ const schema = markets => { display: 'User ID', component: TextInput, face: true, - long: true + long: true, }, { code: 'walletId', display: 'Wallet ID', component: TextInput, face: true, - long: true + long: true, }, { code: 'clientKey', display: 'Client key', - component: TextInput + component: TextInput, }, { code: 'clientSecret', display: 'Client secret', - component: SecretInput + component: SecretInput, }, { code: 'currencyMarket', @@ -45,10 +45,10 @@ const schema = markets => { inputProps: { options: buildCurrencyOptions(markets), labelProp: 'display', - valueProp: 'code' + valueProp: 'code', }, - face: true - } + face: true, + }, ], getValidationSchema: account => { return Yup.object().shape({ @@ -65,10 +65,10 @@ const schema = markets => { .max(100, 'The client secret is too long') .test(secretTest(account?.clientSecret, 'client secret')), currencyMarket: Yup.string( - 'The currency market must be a string' - ).required('The currency market is required') + 'The currency market must be a string', + ).required('The currency market is required'), }) - } + }, } } diff --git a/packages/admin-ui/src/pages/Services/schemas/kraken.js b/packages/admin-ui/src/pages/Services/schemas/kraken.js index 2c0ee271..0ad9f12f 100644 --- a/packages/admin-ui/src/pages/Services/schemas/kraken.js +++ b/packages/admin-ui/src/pages/Services/schemas/kraken.js @@ -3,7 +3,7 @@ import * as Yup from 'yup' import { SecretInput, TextInput, - Autocomplete + Autocomplete, } from 'src/components/inputs/formik' import { secretTest, buildCurrencyOptions } from './helper' @@ -19,12 +19,12 @@ const schema = markets => { display: 'API key', component: TextInput, face: true, - long: true + long: true, }, { code: 'privateKey', display: 'Private key', - component: SecretInput + component: SecretInput, }, { code: 'currencyMarket', @@ -33,10 +33,10 @@ const schema = markets => { inputProps: { options: buildCurrencyOptions(markets), labelProp: 'display', - valueProp: 'code' + valueProp: 'code', }, - face: true - } + face: true, + }, ], getValidationSchema: account => { return Yup.object().shape({ @@ -47,10 +47,10 @@ const schema = markets => { .max(100, 'The private key is too long') .test(secretTest(account?.privateKey, 'private key')), currencyMarket: Yup.string( - 'The currency market must be a string' - ).required('The currency market is required') + 'The currency market must be a string', + ).required('The currency market is required'), }) - } + }, } } diff --git a/packages/admin-ui/src/pages/Services/schemas/mailgun.js b/packages/admin-ui/src/pages/Services/schemas/mailgun.js index b01b84b7..c00f69a0 100644 --- a/packages/admin-ui/src/pages/Services/schemas/mailgun.js +++ b/packages/admin-ui/src/pages/Services/schemas/mailgun.js @@ -9,25 +9,25 @@ export default { { code: 'apiKey', display: 'API key', - component: TextInputFormik + component: TextInputFormik, }, { code: 'domain', display: 'Domain', - component: TextInputFormik + component: TextInputFormik, }, { code: 'fromEmail', display: 'From email', component: TextInputFormik, - face: true + face: true, }, { code: 'toEmail', display: 'To email', component: TextInputFormik, - face: true - } + face: true, + }, ], getValidationSchema: () => { return Yup.object().shape({ @@ -44,7 +44,7 @@ export default { toEmail: Yup.string('The to email must be a string') .max(100, 'The to email is too long') .email('The to email must be a valid email address') - .required('The to email is required') + .required('The to email is required'), }) - } + }, } diff --git a/packages/admin-ui/src/pages/Services/schemas/scorechain.js b/packages/admin-ui/src/pages/Services/schemas/scorechain.js index 2ee4eb97..ac1c011c 100644 --- a/packages/admin-ui/src/pages/Services/schemas/scorechain.js +++ b/packages/admin-ui/src/pages/Services/schemas/scorechain.js @@ -13,14 +13,14 @@ export default { { code: 'apiKey', display: 'API Key', - component: SecretInputFormik + component: SecretInputFormik, }, { code: 'scoreThreshold', display: 'Score threshold', component: NumberInputFormik, face: true, - long: false + long: false, }, { code: 'enabled', @@ -30,10 +30,10 @@ export default { disabledMessage: 'This plugin is disabled', label: 'Enabled', requirement: null, - rightSideLabel: true + rightSideLabel: true, }, - face: true - } + face: true, + }, ], getValidationSchema: account => { return Yup.object().shape({ @@ -48,8 +48,8 @@ export default { .test( 'no-leading-zeros', 'The score threshold must not have leading zeros', - leadingZerosTest - ) + leadingZerosTest, + ), }) - } + }, } diff --git a/packages/admin-ui/src/pages/Services/schemas/singlebitgo.js b/packages/admin-ui/src/pages/Services/schemas/singlebitgo.js index 9e206632..de47811b 100644 --- a/packages/admin-ui/src/pages/Services/schemas/singlebitgo.js +++ b/packages/admin-ui/src/pages/Services/schemas/singlebitgo.js @@ -3,7 +3,7 @@ import * as Yup from 'yup' import { TextInput, SecretInput, - Autocomplete + Autocomplete, } from 'src/components/inputs/formik' const singleBitgo = code => ({ @@ -16,7 +16,7 @@ const singleBitgo = code => ({ display: 'API token', component: TextInput, face: true, - long: true + long: true, }, { code: 'environment', @@ -25,23 +25,23 @@ const singleBitgo = code => ({ inputProps: { options: [ { code: 'prod', display: 'prod' }, - { code: 'test', display: 'test' } + { code: 'test', display: 'test' }, ], labelProp: 'display', - valueProp: 'code' + valueProp: 'code', }, - face: true + face: true, }, { code: `${code}WalletId`, display: `${code} wallet ID`, - component: TextInput + component: TextInput, }, { code: `${code}WalletPassphrase`, display: `${code} wallet passphrase`, - component: SecretInput - } + component: SecretInput, + }, ], validationSchema: Yup.object().shape({ token: Yup.string('The token must be a string') @@ -54,11 +54,11 @@ const singleBitgo = code => ({ .max(100, `The ${code} wallet ID is too long`) .required(`The ${code} wallet ID is required`), [`${code}WalletPassphrase`]: Yup.string( - `The ${code} passphrase must be a string` + `The ${code} passphrase must be a string`, ) .max(100, `The ${code} wallet passphrase is too long`) - .required(`The ${code} wallet passphrase is required`) - }) + .required(`The ${code} wallet passphrase is required`), + }), }) export default singleBitgo diff --git a/packages/admin-ui/src/pages/Services/schemas/sumsub.js b/packages/admin-ui/src/pages/Services/schemas/sumsub.js index ee156a9e..b4f13c5d 100644 --- a/packages/admin-ui/src/pages/Services/schemas/sumsub.js +++ b/packages/admin-ui/src/pages/Services/schemas/sumsub.js @@ -12,19 +12,19 @@ const schema = { { code: 'apiToken', display: 'API Token', - component: SecretInput + component: SecretInput, }, { code: 'secretKey', display: 'Secret Key', - component: SecretInput + component: SecretInput, }, { code: 'applicantLevel', display: 'Applicant Level', component: TextInput, - face: true - } + face: true, + }, ], getValidationSchema: account => { return Yup.object().shape({ @@ -36,9 +36,9 @@ const schema = { .test(secretTest(account?.secretKey, 'secret key')), applicantLevel: Yup.string('The applicant level must be a string') .max(100, 'The applicant level is too long') - .required('The applicant level is required') + .required('The applicant level is required'), }) - } + }, } export default schema diff --git a/packages/admin-ui/src/pages/Services/schemas/telnyx.js b/packages/admin-ui/src/pages/Services/schemas/telnyx.js index ce11ed48..b33b8c7e 100644 --- a/packages/admin-ui/src/pages/Services/schemas/telnyx.js +++ b/packages/admin-ui/src/pages/Services/schemas/telnyx.js @@ -12,20 +12,20 @@ export default { { code: 'apiKey', display: 'API Key', - component: SecretInputFormik + component: SecretInputFormik, }, { code: 'fromNumber', display: 'Telnyx Number (international format)', component: TextInputFormik, - face: true + face: true, }, { code: 'toNumber', display: 'Notifications Number (international format)', component: TextInputFormik, - face: true - } + face: true, + }, ], getValidationSchema: account => { return Yup.object().shape({ @@ -37,7 +37,7 @@ export default { .required('The Telnyx number is required'), toNumber: Yup.string('The notifications number must be a string') .max(100, 'The notifications number is too long') - .required('The notifications number is required') + .required('The notifications number is required'), }) - } + }, } diff --git a/packages/admin-ui/src/pages/Services/schemas/trongrid.js b/packages/admin-ui/src/pages/Services/schemas/trongrid.js index affc3989..4d6bb9ea 100644 --- a/packages/admin-ui/src/pages/Services/schemas/trongrid.js +++ b/packages/admin-ui/src/pages/Services/schemas/trongrid.js @@ -11,14 +11,14 @@ export default { display: 'API Key', component: TextInputFormik, face: true, - long: true - } + long: true, + }, ], - getValidationSchema: account => { + getValidationSchema: () => { return Yup.object().shape({ apiKey: Yup.string('The project ID must be a string') .max(100, 'The project ID is too long') - .required('The project ID is required') + .required('The project ID is required'), }) - } + }, } diff --git a/packages/admin-ui/src/pages/Services/schemas/twilio.js b/packages/admin-ui/src/pages/Services/schemas/twilio.js index 756287a3..d22d51be 100644 --- a/packages/admin-ui/src/pages/Services/schemas/twilio.js +++ b/packages/admin-ui/src/pages/Services/schemas/twilio.js @@ -12,25 +12,25 @@ export default { { code: 'accountSid', display: 'Account SID', - component: TextInputFormik + component: TextInputFormik, }, { code: 'authToken', display: 'Auth token', - component: SecretInputFormik + component: SecretInputFormik, }, { code: 'fromNumber', display: 'Twilio number (international format)', component: TextInputFormik, - face: true + face: true, }, { code: 'toNumber', display: 'Notifications number (international format)', component: TextInputFormik, - face: true - } + face: true, + }, ], getValidationSchema: account => { return Yup.object().shape({ @@ -45,7 +45,7 @@ export default { .required('The Twilio number is required'), toNumber: Yup.string('The notifications number must be a string') .max(100, 'The notifications number is too long') - .required('The notifications number is required') + .required('The notifications number is required'), }) - } + }, } diff --git a/packages/admin-ui/src/pages/Services/schemas/vonage.js b/packages/admin-ui/src/pages/Services/schemas/vonage.js index fb95023a..6aaeeee1 100644 --- a/packages/admin-ui/src/pages/Services/schemas/vonage.js +++ b/packages/admin-ui/src/pages/Services/schemas/vonage.js @@ -12,25 +12,25 @@ export default { { code: 'apiKey', display: 'API Key', - component: TextInputFormik + component: TextInputFormik, }, { code: 'apiSecret', display: 'API Secret', - component: SecretInputFormik + component: SecretInputFormik, }, { code: 'fromNumber', display: 'Vonage Number (international format)', component: TextInputFormik, - face: true + face: true, }, { code: 'toNumber', display: 'Notifications Number (international format)', component: TextInputFormik, - face: true - } + face: true, + }, ], getValidationSchema: account => { return Yup.object().shape({ @@ -45,7 +45,7 @@ export default { .required('The Vonage number is required'), toNumber: Yup.string('The notifications number must be a string') .max(100, 'The notifications number is too long') - .required('The notifications number is required') + .required('The notifications number is required'), }) - } + }, } diff --git a/packages/admin-ui/src/pages/SessionManagement/SessionManagement.jsx b/packages/admin-ui/src/pages/SessionManagement/SessionManagement.jsx index ce108590..ec64df8e 100644 --- a/packages/admin-ui/src/pages/SessionManagement/SessionManagement.jsx +++ b/packages/admin-ui/src/pages/SessionManagement/SessionManagement.jsx @@ -42,7 +42,7 @@ const SessionManagement = () => { const { data: tknResponse, loading: sessionsLoading } = useQuery(GET_SESSIONS) const [deleteSession] = useMutation(DELETE_SESSION, { - refetchQueries: () => ['sessions'] + refetchQueries: () => ['sessions'], }) const { data: configResponse, loading: configLoading } = useQuery(GET_DATA) @@ -56,7 +56,7 @@ const SessionManagement = () => { width: 207, textAlign: 'left', size: 'sm', - view: s => s.sess.user.username + view: s => s.sess.user.username, }, { header: 'Last known use', @@ -67,7 +67,7 @@ const SessionManagement = () => { if (R.isNil(s.sess.ua)) return 'No Record' const ua = parser(s.sess.ua) return `${ua.browser.name} ${ua.browser.version} on ${ua.os.name} ${ua.os.version}` - } + }, }, { header: 'Last known location', @@ -76,7 +76,7 @@ const SessionManagement = () => { size: 'sm', view: s => { return isLocalhost(s.sess.ipAddress) ? 'This device' : s.sess.ipAddress - } + }, }, { header: 'Expiration date', @@ -87,8 +87,8 @@ const SessionManagement = () => { `${formatDate(s.expire, timezone, 'yyyy-MM-dd')} ${formatDate( s.expire, timezone, - 'HH:mm:ss' - )}` + 'HH:mm:ss', + )}`, }, { header: '', @@ -104,8 +104,8 @@ const SessionManagement = () => { - ) - } + ), + }, ] return ( diff --git a/packages/admin-ui/src/pages/Transactions/DetailsCard.jsx b/packages/admin-ui/src/pages/Transactions/DetailsCard.jsx index e07ec7ab..cf3799aa 100644 --- a/packages/admin-ui/src/pages/Transactions/DetailsCard.jsx +++ b/packages/admin-ui/src/pages/Transactions/DetailsCard.jsx @@ -28,7 +28,7 @@ import { primaryColor, subheaderColor, errorColor, - offErrorColor + offErrorColor, } from 'src/styling/variables' import { SWEEPABLE_CRYPTOS } from 'src/utils/constants' import * as Customer from 'src/utils/customer' @@ -113,7 +113,7 @@ const DetailsRow = ({ it: tx, timezone }) => { const zip = new JSZip() const [fetchSummary] = useLazyQuery(TX_SUMMARY, { - onCompleted: data => createCsv(R.filter(it => !R.isEmpty(it), data)) + onCompleted: data => createCsv(R.filter(it => !R.isEmpty(it), data)), }) const [cancelTransaction] = useMutation( @@ -121,13 +121,13 @@ const DetailsRow = ({ it: tx, timezone }) => { { onError: ({ message }) => setErrorMessage(message ?? 'An error occurred.'), - refetchQueries: () => ['transactions'] - } + refetchQueries: () => ['transactions'], + }, ) const commission = BigNumber(tx.profit).toFixed(2, 1) // ROUND_DOWN const commissionPercentage = BigNumber( - Number.parseFloat(tx.commissionPercentage, 2) * 100 + Number.parseFloat(tx.commissionPercentage, 2) * 100, ).toFixed(2, 1) // ROUND_DOWN const fixedFee = Number.parseFloat(tx.fixedFee) || 0 const fiat = BigNumber(tx.fiat).minus(fixedFee).toFixed(2, 1) // ROUND_DOWN @@ -145,7 +145,7 @@ const DetailsRow = ({ it: tx, timezone }) => { (tx.customerIdCardData.dateOfBirth && differenceInYears( parseDateString(tx.customerIdCardData.dateOfBirth), - new Date() + new Date(), )) ?? '', country: tx.customerIdCardData.country, @@ -153,9 +153,9 @@ const DetailsRow = ({ it: tx, timezone }) => { idCardExpirationDate: (tx.customerIdCardData.expirationDate && format('yyyy-MM-dd')( - parseDateString(tx.customerIdCardData.expirationDate) + parseDateString(tx.customerIdCardData.expirationDate), )) ?? - '' + '', } const from = sub({ minutes: MINUTES_OFFSET }, new Date(tx.created)) @@ -163,7 +163,7 @@ const DetailsRow = ({ it: tx, timezone }) => { const downloadRawLogs = ({ id: txId, deviceId, txClass }, timezone) => { fetchSummary({ - variables: { txId, from, until, deviceId, txClass, timezone } + variables: { txId, from, until, deviceId, txClass, timezone }, }) } @@ -220,7 +220,7 @@ const DetailsRow = ({ it: tx, timezone }) => { noMargin className={classNames({ 'font-bold ml-1': true, - 'text-tomato': hasChainAnalysisError(tx) + 'text-tomato': hasChainAnalysisError(tx), })}> {tx.walletScore}

@@ -396,7 +396,7 @@ const DetailsRow = ({ it: tx, timezone }) => { className="w-40" onClick={() => setAction({ - command: 'cancelTx' + command: 'cancelTx', }) }> Cancel transaction @@ -434,8 +434,8 @@ const DetailsRow = ({ it: tx, timezone }) => { setAction({ command: null }) cancelTransaction({ variables: { - id: tx.id - } + id: tx.id, + }, }) }} onDismissed={() => { @@ -453,5 +453,5 @@ export default memo( prev.it.id === next.it.id && prev.it.hasError === next.it.hasError && prev.it.batchError === next.it.batchError && - getStatus(prev.it) === getStatus(next.it) + getStatus(prev.it) === getStatus(next.it), ) diff --git a/packages/admin-ui/src/pages/Transactions/Transactions.jsx b/packages/admin-ui/src/pages/Transactions/Transactions.jsx index daaad78b..f385231a 100644 --- a/packages/admin-ui/src/pages/Transactions/Transactions.jsx +++ b/packages/admin-ui/src/pages/Transactions/Transactions.jsx @@ -138,7 +138,7 @@ const Transactions = () => { const [filters, setFilters] = useState([]) const { data: filtersResponse, loading: filtersLoading } = useQuery( - GET_TRANSACTION_FILTERS + GET_TRANSACTION_FILTERS, ) const [variables, setVariables] = useState({ limit: NUM_LOG_RESULTS }) const { @@ -146,7 +146,7 @@ const Transactions = () => { loading: transactionsLoading, refetch, startPolling, - stopPolling + stopPolling, } = useQuery(GET_TRANSACTIONS, { variables }) useEffect(() => { @@ -168,14 +168,14 @@ const Transactions = () => { header: '', width: 32, size: 'sm', - view: it => (it.txClass === 'cashOut' ? : ) + view: it => (it.txClass === 'cashOut' ? : ), }, { header: 'Machine', name: 'machineName', width: 160, size: 'sm', - view: R.path(['machineName']) + view: R.path(['machineName']), }, { header: 'Customer', @@ -198,14 +198,14 @@ const Transactions = () => {
)} - ) + ), }, { header: 'Cash', width: 144, textAlign: 'right', size: 'sm', - view: it => `${Number.parseFloat(it.fiat)} ${it.fiatCode}` + view: it => `${Number.parseFloat(it.fiat)} ${it.fiatCode}`, }, { header: 'Crypto', @@ -215,14 +215,14 @@ const Transactions = () => { view: it => `${toUnit(new BigNumber(it.cryptoAtoms), it.cryptoCode)} ${ it.cryptoCode - }` + }`, }, { header: 'Address', view: it => formatCryptoAddress(it.cryptoCode, it.toAddress), className: 'overflow-hidden whitespace-nowrap text-ellipsis', size: 'sm', - width: 140 + width: 140, }, { header: 'Date', @@ -230,7 +230,7 @@ const Transactions = () => { timezone && formatDate(it.created, timezone, 'yyyy-MM-dd HH:mm'), textAlign: 'right', size: 'sm', - width: 195 + width: 195, }, { header: 'Status', @@ -252,8 +252,8 @@ const Transactions = () => { }, textAlign: 'left', size: 'sm', - width: 80 - } + width: 80, + }, ] const onFilterChange = filters => { @@ -270,7 +270,7 @@ const Transactions = () => { cryptoCode: filtersObject.crypto, toAddress: filtersObject.address, status: filtersObject.status, - swept: filtersObject.swept && filtersObject.swept === 'Swept' + swept: filtersObject.swept && filtersObject.swept === 'Swept', }) refetch && refetch() @@ -278,7 +278,7 @@ const Transactions = () => { const onFilterDelete = filter => { const newFilters = R.filter( - f => !R.whereEq(R.pick(['type', 'value'], f), filter) + f => !R.whereEq(R.pick(['type', 'value'], f), filter), )(filters) setFilters(newFilters) @@ -294,7 +294,7 @@ const Transactions = () => { cryptoCode: filtersObject.crypto, toAddress: filtersObject.address, status: filtersObject.status, - swept: filtersObject.swept && filtersObject.swept === 'Swept' + swept: filtersObject.swept && filtersObject.swept === 'Swept', }) refetch && refetch() @@ -313,7 +313,7 @@ const Transactions = () => { cryptoCode: filtersObject.crypto, toAddress: filtersObject.address, status: filtersObject.status, - swept: filtersObject.swept && filtersObject.swept === 'Swept' + swept: filtersObject.swept && filtersObject.swept === 'Swept', }) refetch && refetch() @@ -336,7 +336,7 @@ const Transactions = () => { labels={[ { icon: , label: 'Cash-in' }, { icon: , label: 'Cash-out' }, - { icon: errorLabel, label: 'Transaction error' } + { icon: errorLabel, label: 'Transaction error' }, ]} appendix={
diff --git a/packages/admin-ui/src/pages/Triggers/CustomInfoRequests/CustomInfoRequests.jsx b/packages/admin-ui/src/pages/Triggers/CustomInfoRequests/CustomInfoRequests.jsx index 0eb40c6a..260ef1e9 100644 --- a/packages/admin-ui/src/pages/Triggers/CustomInfoRequests/CustomInfoRequests.jsx +++ b/packages/admin-ui/src/pages/Triggers/CustomInfoRequests/CustomInfoRequests.jsx @@ -18,7 +18,7 @@ import SvgIcon from '@mui/material/SvgIcon' const inputTypeDisplay = { numerical: 'Numerical', text: 'Text', - choiceList: 'Choice list' + choiceList: 'Choice list', } const constraintTypeDisplay = { @@ -28,7 +28,7 @@ const constraintTypeDisplay = { length: 'Length', selectOne: 'Select one', selectMultiple: 'Select multiple', - spaceSeparation: 'Space separation' + spaceSeparation: 'Space separation', } const GET_DATA = gql` @@ -72,7 +72,7 @@ const REMOVE_ROW = gql` const CustomInfoRequests = ({ showWizard, toggleWizard, - data: customRequests + data: customRequests, }) => { const [toBeDeleted, setToBeDeleted] = useState() const [toBeEdited, setToBeEdited] = useState() @@ -83,7 +83,7 @@ const CustomInfoRequests = ({ const [saveConfig] = useMutation(SAVE_CONFIG, { refetchQueries: () => ['getData'], - onError: () => setHasError(true) + onError: () => setHasError(true), }) const [addEntry] = useMutation(ADD_ROW, { @@ -95,7 +95,7 @@ const CustomInfoRequests = ({ setHasError(false) toggleWizard() }, - refetchQueries: () => ['customInfoRequests'] + refetchQueries: () => ['customInfoRequests'], }) const [editEntry] = useMutation(EDIT_ROW, { @@ -108,7 +108,7 @@ const CustomInfoRequests = ({ setToBeEdited(null) toggleWizard() }, - refetchQueries: () => ['getData', 'customInfoRequests'] + refetchQueries: () => ['getData', 'customInfoRequests'], }) const [removeEntry] = useMutation(REMOVE_ROW, { @@ -120,7 +120,7 @@ const CustomInfoRequests = ({ setDeleteDialog(false) setHasError(false) }, - refetchQueries: () => ['getData', 'customInfoRequests'] + refetchQueries: () => ['getData', 'customInfoRequests'], }) const config = R.path(['config'])(configData) ?? [] @@ -128,16 +128,16 @@ const CustomInfoRequests = ({ const handleDelete = id => { removeEntry({ variables: { - id - } + id, + }, }).then(() => { const triggersConfig = (config && fromNamespace(namespaces.TRIGGERS)(config)) ?? [] const cleanConfig = { overrides: R.reject( it => it.requirement === id, - triggersConfig.overrides - ) + triggersConfig.overrides, + ), } const newConfig = toNamespace(namespaces.TRIGGERS)(cleanConfig) saveConfig({ variables: { config: newConfig } }) @@ -149,16 +149,16 @@ const CustomInfoRequests = ({ return editEntry({ variables: { id: values.id, - customRequest: R.omit(['id'])(values) - } + customRequest: R.omit(['id'])(values), + }, }) } return addEntry({ variables: { customRequest: { - ...values - } - } + ...values, + }, + }, }) } @@ -186,14 +186,14 @@ const CustomInfoRequests = ({ width: 300, textAlign: 'left', size: 'sm', - view: it => it.customRequest.name + view: it => it.customRequest.name, }, { header: 'Data entry type', width: 300, textAlign: 'left', size: 'sm', - view: it => inputTypeDisplay[it.customRequest.input.type] + view: it => inputTypeDisplay[it.customRequest.input.type], }, { header: 'Constraints', @@ -201,7 +201,7 @@ const CustomInfoRequests = ({ textAlign: 'left', size: 'sm', view: it => - constraintTypeDisplay[it.customRequest.input.constraintType] + constraintTypeDisplay[it.customRequest.input.constraintType], }, { header: 'Edit', @@ -220,7 +220,7 @@ const CustomInfoRequests = ({ ) - } + }, }, { header: 'Delete', @@ -239,8 +239,8 @@ const CustomInfoRequests = ({ ) - } - } + }, + }, ]} data={customRequests} Details={DetailsRow} diff --git a/packages/admin-ui/src/pages/Triggers/CustomInfoRequests/Forms/ChooseType.jsx b/packages/admin-ui/src/pages/Triggers/CustomInfoRequests/Forms/ChooseType.jsx index c70b732c..8a52f818 100644 --- a/packages/admin-ui/src/pages/Triggers/CustomInfoRequests/Forms/ChooseType.jsx +++ b/packages/admin-ui/src/pages/Triggers/CustomInfoRequests/Forms/ChooseType.jsx @@ -20,7 +20,7 @@ const MakeIcon = IconSvg => ( maxWidth: 104, maxHeight: 64, minWidth: 104, - minHeight: 64 + minHeight: 64, }}>
@@ -33,21 +33,21 @@ const ChooseType = () => { title: 'Numerical entry', description: 'User will enter information with a keypad. Good for dates, ID numbers, etc.', - icon: () => MakeIcon(Keypad) + icon: () => MakeIcon(Keypad), }, { value: 'text', title: 'Text entry', description: 'User will entry information with a keyboard. Good for names, email, address, etc.', - icon: () => MakeIcon(Keyboard) + icon: () => MakeIcon(Keyboard), }, { value: 'choiceList', title: 'Choice list', description: 'Gives user multiple options to choose from.', - icon: () => MakeIcon(List) - } + icon: () => MakeIcon(List), + }, ] return ( @@ -65,11 +65,11 @@ const ChooseType = () => { } const validationSchema = Yup.object().shape({ - inputType: Yup.string().label('Input type').required() + inputType: Yup.string().label('Input type').required(), }) const defaultValues = { - inputType: '' + inputType: '', } export default ChooseType diff --git a/packages/admin-ui/src/pages/Triggers/CustomInfoRequests/Forms/NameOfRequirement.jsx b/packages/admin-ui/src/pages/Triggers/CustomInfoRequests/Forms/NameOfRequirement.jsx index 1f0b9b14..70f95c64 100644 --- a/packages/admin-ui/src/pages/Triggers/CustomInfoRequests/Forms/NameOfRequirement.jsx +++ b/packages/admin-ui/src/pages/Triggers/CustomInfoRequests/Forms/NameOfRequirement.jsx @@ -32,16 +32,16 @@ const validationSchema = existingRequirements => .test( 'unique-name', 'A custom information requirement with that name already exists', - (value, _context) => + value => !R.includes( R.toLower(R.defaultTo('', value)), - R.map(it => R.toLower(it.customRequest.name), existingRequirements) - ) - ) + R.map(it => R.toLower(it.customRequest.name), existingRequirements), + ), + ), }) const defaultValues = { - requirementName: '' + requirementName: '', } export default NameOfRequirement diff --git a/packages/admin-ui/src/pages/Triggers/CustomInfoRequests/Forms/Screen1Information.jsx b/packages/admin-ui/src/pages/Triggers/CustomInfoRequests/Forms/Screen1Information.jsx index 4e338d5f..7433ce63 100644 --- a/packages/admin-ui/src/pages/Triggers/CustomInfoRequests/Forms/Screen1Information.jsx +++ b/packages/admin-ui/src/pages/Triggers/CustomInfoRequests/Forms/Screen1Information.jsx @@ -32,12 +32,12 @@ const Screen1Information = () => { const validationSchema = Yup.object().shape({ screen1Title: Yup.string().label('Screen title').required(), - screen1Text: Yup.string().label('Screen text').required() + screen1Text: Yup.string().label('Screen text').required(), }) const defaultValues = { screen1Title: '', - screen1Text: '' + screen1Text: '', } export default Screen1Information diff --git a/packages/admin-ui/src/pages/Triggers/CustomInfoRequests/Forms/Screen2Information.jsx b/packages/admin-ui/src/pages/Triggers/CustomInfoRequests/Forms/Screen2Information.jsx index 0f455cb5..b531c31d 100644 --- a/packages/admin-ui/src/pages/Triggers/CustomInfoRequests/Forms/Screen2Information.jsx +++ b/packages/admin-ui/src/pages/Triggers/CustomInfoRequests/Forms/Screen2Information.jsx @@ -30,12 +30,12 @@ const ScreenInformation = () => { const validationSchema = Yup.object().shape({ screen2Title: Yup.string().label('Screen title').required(), - screen2Text: Yup.string().label('Screen text').required() + screen2Text: Yup.string().label('Screen text').required(), }) const defaultValues = { screen2Title: '', - screen2Text: '' + screen2Text: '', } export default ScreenInformation diff --git a/packages/admin-ui/src/pages/Triggers/CustomInfoRequests/Forms/TypeFields/ChoiceList.jsx b/packages/admin-ui/src/pages/Triggers/CustomInfoRequests/Forms/TypeFields/ChoiceList.jsx index e514d747..2ce9a71c 100644 --- a/packages/admin-ui/src/pages/Triggers/CustomInfoRequests/Forms/TypeFields/ChoiceList.jsx +++ b/packages/admin-ui/src/pages/Triggers/CustomInfoRequests/Forms/TypeFields/ChoiceList.jsx @@ -13,7 +13,7 @@ const nonEmptyStr = obj => obj.text && obj.text.length const options = [ { display: 'Select just one', code: 'selectOne' }, - { display: 'Select multiple', code: 'selectMultiple' } + { display: 'Select multiple', code: 'selectMultiple' }, ] const ChoiceList = () => { @@ -26,7 +26,7 @@ const ChoiceList = () => { 'mb-0': true, 'text-tomato': !R.path(['values', 'constraintType'])(context) && - R.path(['errors', 'constraintType'])(context) + R.path(['errors', 'constraintType'])(context), } const hasError = choice => { diff --git a/packages/admin-ui/src/pages/Triggers/CustomInfoRequests/Forms/TypeFields/NumericalEntry.jsx b/packages/admin-ui/src/pages/Triggers/CustomInfoRequests/Forms/TypeFields/NumericalEntry.jsx index fff64499..b6a6da64 100644 --- a/packages/admin-ui/src/pages/Triggers/CustomInfoRequests/Forms/TypeFields/NumericalEntry.jsx +++ b/packages/admin-ui/src/pages/Triggers/CustomInfoRequests/Forms/TypeFields/NumericalEntry.jsx @@ -9,7 +9,7 @@ import { TL1, H4 } from 'src/components/typography' const options = [ { display: 'None', code: 'none' }, { display: 'Date', code: 'date' }, - { display: 'Length', code: 'length' } + { display: 'Length', code: 'length' }, ] const NumericalEntry = () => { @@ -23,7 +23,7 @@ const NumericalEntry = () => { 'mb-0': true, 'text-tomat': !R.path(['values', 'constraintType'])(context) && - R.path(['errors', 'constraintType'])(context) + R.path(['errors', 'constraintType'])(context), } return ( diff --git a/packages/admin-ui/src/pages/Triggers/CustomInfoRequests/Forms/TypeFields/TextEntry.jsx b/packages/admin-ui/src/pages/Triggers/CustomInfoRequests/Forms/TypeFields/TextEntry.jsx index 6b9ed614..dc07e766 100644 --- a/packages/admin-ui/src/pages/Triggers/CustomInfoRequests/Forms/TypeFields/TextEntry.jsx +++ b/packages/admin-ui/src/pages/Triggers/CustomInfoRequests/Forms/TypeFields/TextEntry.jsx @@ -12,8 +12,8 @@ const options = [ { display: 'Space separation', subtitle: '(e.g. first and last name)', - code: 'spaceSeparation' - } + code: 'spaceSeparation', + }, ] const TextEntry = () => { @@ -22,7 +22,7 @@ const TextEntry = () => { 'mt-0': true, 'text-tomato': !R.path(['values', 'constraintType'])(context) && - R.path(['errors', 'constraintType'])(context) + R.path(['errors', 'constraintType'])(context), } const getLabelInputs = () => { diff --git a/packages/admin-ui/src/pages/Triggers/CustomInfoRequests/Forms/TypeFields/index.jsx b/packages/admin-ui/src/pages/Triggers/CustomInfoRequests/Forms/TypeFields/index.jsx index 3c608e8c..2ecc3233 100644 --- a/packages/admin-ui/src/pages/Triggers/CustomInfoRequests/Forms/TypeFields/index.jsx +++ b/packages/admin-ui/src/pages/Triggers/CustomInfoRequests/Forms/TypeFields/index.jsx @@ -33,7 +33,7 @@ const defaultValues = { inputLength: '', inputLabel1: '', inputLabel2: '', - listChoices: [{ text: '' }, { text: '' }] + listChoices: [{ text: '' }, { text: '' }], } const validationSchema = Yup.lazy(values => { @@ -45,8 +45,8 @@ const validationSchema = Yup.lazy(values => { is: 'length', then: schema => schema.min(0).required('The number of digits is required'), - otherwise: schema => schema.notRequired() - }) + otherwise: schema => schema.notRequired(), + }), }) case 'text': return Yup.object({ @@ -55,8 +55,8 @@ const validationSchema = Yup.lazy(values => { inputLabel2: Yup.string().when('constraintType', { is: 'spaceSeparation', then: schema => schema.label('Second word label').required(), - otherwise: schema => schema.notRequired() - }) + otherwise: schema => schema.notRequired(), + }), }) case 'choiceList': return Yup.object({ @@ -64,10 +64,10 @@ const validationSchema = Yup.lazy(values => { listChoices: Yup.array().test( 'has-2-or-more', 'Choice list needs to have two or more non empty fields', - (values, ctx) => { + values => { return R.filter(nonEmptyStr)(values).length > 1 - } - ) + }, + ), }) default: return Yup.mixed().notRequired() diff --git a/packages/admin-ui/src/pages/Triggers/CustomInfoRequests/Wizard.jsx b/packages/admin-ui/src/pages/Triggers/CustomInfoRequests/Wizard.jsx index 0bcebe78..a0c2c669 100644 --- a/packages/admin-ui/src/pages/Triggers/CustomInfoRequests/Wizard.jsx +++ b/packages/admin-ui/src/pages/Triggers/CustomInfoRequests/Wizard.jsx @@ -9,23 +9,23 @@ import { Button } from 'src/components/buttons' import ChooseType, { validationSchema as chooseTypeSchema, - defaultValues as chooseTypeDefaults + defaultValues as chooseTypeDefaults, } from './Forms/ChooseType' import NameOfRequirement, { validationSchema as nameOfReqSchema, - defaultValues as nameOfReqDefaults + defaultValues as nameOfReqDefaults, } from './Forms/NameOfRequirement' import Screen1Information, { validationSchema as screen1InfoSchema, - defaultValues as screen1InfoDefaults + defaultValues as screen1InfoDefaults, } from './Forms/Screen1Information' import Screen2Information, { validationSchema as screen2InfoSchema, - defaultValues as screen2InfoDefaults + defaultValues as screen2InfoDefaults, } from './Forms/Screen2Information' import TypeFields, { defaultValues as typeFieldsDefaults, - validationSchema as typeFieldsValidationSchema + validationSchema as typeFieldsValidationSchema, } from './Forms/TypeFields' import WizardSplash from './WizardSplash' @@ -35,21 +35,21 @@ const getStep = (step, existingRequirements) => [ { validationSchema: nameOfReqSchema(existingRequirements), - Component: NameOfRequirement + Component: NameOfRequirement, }, { validationSchema: screen1InfoSchema, - Component: Screen1Information + Component: Screen1Information, }, { validationSchema: chooseTypeSchema, Component: ChooseType }, { validationSchema: screen2InfoSchema, - Component: Screen2Information + Component: Screen2Information, }, { validationSchema: typeFieldsValidationSchema, - Component: TypeFields - } + Component: TypeFields, + }, ][step - 1] const nonEmptyStr = obj => obj.text && obj.text.length @@ -69,16 +69,16 @@ const formatValues = (values, isEditing) => { name: values.requirementName, screen1: { text: values.screen1Text, - title: values.screen1Title + title: values.screen1Title, }, screen2: { title: values.screen2Title, - text: values.screen2Text + text: values.screen2Text, }, input: { type: values.inputType, - constraintType: values.constraintType - } + constraintType: values.constraintType, + }, } if (isChoiceList) { @@ -117,7 +117,7 @@ const makeEditingValues = ({ customRequest, id }) => { inputLabel2: customRequest.input.label2, listChoices: customRequest.input.choiceList, constraintType: customRequest.input.constraintType, - inputLength: customRequest.input.numDigits + inputLength: customRequest.input.numDigits, } } @@ -125,11 +125,10 @@ const chooseNotNull = (a, b) => (R.isNil(b) ? a : b) const Wizard = ({ onClose, - error = false, toBeEdited, onSave, hasError, - existingRequirements + existingRequirements, }) => { const isEditing = !R.isNil(toBeEdited) const [step, setStep] = useState(isEditing ? 1 : 0) @@ -139,7 +138,7 @@ const Wizard = ({ ...screen1InfoDefaults, ...screen2InfoDefaults, ...chooseTypeDefaults, - ...typeFieldsDefaults + ...typeFieldsDefaults, } // If we're editing, filter out the requirement being edited so that validation schemas don't enter in circular conflicts @@ -149,7 +148,7 @@ const Wizard = ({ const stepOptions = getStep(step, existingRequirements) const isLastStep = step === LAST_STEP - const onContinue = (values, actions) => { + const onContinue = values => { const showScreen2 = values.inputType === 'numerical' || values.inputType === 'choiceList' if (isEditing && step === 2) { diff --git a/packages/admin-ui/src/pages/Triggers/CustomInfoRequests/index.js b/packages/admin-ui/src/pages/Triggers/CustomInfoRequests/index.js index 5d99663f..0b85a771 100644 --- a/packages/admin-ui/src/pages/Triggers/CustomInfoRequests/index.js +++ b/packages/admin-ui/src/pages/Triggers/CustomInfoRequests/index.js @@ -1,2 +1,3 @@ import CustomInfoRequests from './CustomInfoRequests' + export default CustomInfoRequests diff --git a/packages/admin-ui/src/pages/Triggers/TriggerView.jsx b/packages/admin-ui/src/pages/Triggers/TriggerView.jsx index 6bd1f76f..871e1602 100644 --- a/packages/admin-ui/src/pages/Triggers/TriggerView.jsx +++ b/packages/admin-ui/src/pages/Triggers/TriggerView.jsx @@ -25,29 +25,29 @@ const TriggerView = ({ addNewTriger, emailAuth, complianceServices, - customInfoRequests + customInfoRequests, }) => { const currency = R.path(['fiatCurrency'])( - fromNamespace(namespaces.LOCALE)(config) + fromNamespace(namespaces.LOCALE)(config), ) const [error, setError] = useState(null) const [saveConfig] = useMutation(SAVE_CONFIG, { onCompleted: () => toggleWizard(true), refetchQueries: () => ['getData'], - onError: error => setError(error) + onError: error => setError(error), }) const save = config => { setError(null) return saveConfig({ - variables: { config: { triggers: toServer(config.triggers) } } + variables: { config: { triggers: toServer(config.triggers) } }, }) } const add = rawConfig => { const toSave = R.concat([ - { id: uuidv4(), direction: 'both', ...rawConfig } + { id: uuidv4(), direction: 'both', ...rawConfig }, ])(triggers) return saveConfig({ variables: { config: { triggers: toServer(toSave) } } }) } diff --git a/packages/admin-ui/src/pages/Triggers/Triggers.jsx b/packages/admin-ui/src/pages/Triggers/Triggers.jsx index 781a74f2..7212950f 100644 --- a/packages/admin-ui/src/pages/Triggers/Triggers.jsx +++ b/packages/admin-ui/src/pages/Triggers/Triggers.jsx @@ -70,14 +70,14 @@ const Triggers = () => { const enabledCustomInfoRequests = R.pipe( R.path(['customInfoRequests']), R.defaultTo([]), - R.filter(R.propEq('enabled', true)) + R.filter(R.propEq('enabled', true)), )(customInfoReqData) const emailAuth = data?.config?.triggersConfig_customerAuthentication === 'EMAIL' const complianceServices = R.filter(R.propEq('class', 'compliance'))( - data?.accountsConfig || [] + data?.accountsConfig || [], ) const triggers = fromServer(data?.config?.triggers ?? []) const complianceConfig = @@ -87,7 +87,7 @@ const Triggers = () => { const [saveConfig] = useMutation(SAVE_CONFIG, { onCompleted: () => setWizard(false), refetchQueries: () => ['getData'], - onError: error => setError(error) + onError: error => setError(error), }) const [saveAccount] = useMutation(SAVE_ACCOUNT, { @@ -96,7 +96,7 @@ const Triggers = () => { toggleWizard('newTrigger')() }, refetchQueries: () => ['getData'], - onError: error => setError(error) + onError: error => setError(error), }) const addressReuseSave = rawConfig => { @@ -105,7 +105,7 @@ const Triggers = () => { } const titleSectionWidth = { - 'w-230': !subMenu === 'customInfoRequests' + 'w-230': !subMenu === 'customInfoRequests', } const setBlur = shouldBlur => { @@ -128,7 +128,7 @@ const Triggers = () => { const twilioSave = it => { setError(null) return saveAccount({ - variables: { accounts: { twilio: it } } + variables: { accounts: { twilio: it } }, }) } const addNewTriger = () => { @@ -149,7 +149,7 @@ const Triggers = () => { toggle: show => { refetch() setSubMenu(show ? 'advancedSettings' : false) - } + }, }, { text: 'Custom info requests', @@ -159,8 +159,8 @@ const Triggers = () => { toggle: show => { refetch() setSubMenu(show ? 'customInfoRequests' : false) - } - } + }, + }, ]} className={classnames(titleSectionWidth)}> {!subMenu && ( diff --git a/packages/admin-ui/src/pages/Triggers/Wizard.jsx b/packages/admin-ui/src/pages/Triggers/Wizard.jsx index 11f5f6c7..492e1f6a 100644 --- a/packages/admin-ui/src/pages/Triggers/Wizard.jsx +++ b/packages/admin-ui/src/pages/Triggers/Wizard.jsx @@ -19,7 +19,7 @@ const getStep = ( customInfoRequests, complianceServices, emailAuth, - triggers + triggers, ) => { switch (step) { // case 1: @@ -32,7 +32,7 @@ const getStep = ( triggers, customInfoRequests, complianceServices, - emailAuth + emailAuth, ) default: return Fragment @@ -97,7 +97,7 @@ const getTypeText = (config, currency) => { {singularOrPlural( config.threshold.threshold, 'transaction', - 'transactions' + 'transactions', )}{' '} in {orUnderline(config.threshold.thresholdDays)}{' '} {singularOrPlural(config.threshold.thresholdDays, 'day', 'days')} @@ -189,11 +189,11 @@ const Wizard = ({ customInfoRequests, complianceServices, emailAuth, - triggers + triggers, }) => { const [liveValues, setLiveValues] = useState({}) const [{ step, config }, setState] = useState({ - step: 1 + step: 1, }) const isLastStep = step === LAST_STEP @@ -203,7 +203,7 @@ const Wizard = ({ customInfoRequests, complianceServices, emailAuth, - triggers + triggers, ) const onContinue = async it => { @@ -215,7 +215,7 @@ const Wizard = ({ setState({ step: step + 1, - config: newConfig + config: newConfig, }) } @@ -228,12 +228,12 @@ const Wizard = ({ const hasRequirementError = requirements().hasRequirementError( errors, touched, - values + values, ) const hasCustomRequirementError = requirements().hasCustomRequirementError( errors, touched, - values + values, ) const hasAmountError = diff --git a/packages/admin-ui/src/pages/Triggers/components/AdvancedTriggers.jsx b/packages/admin-ui/src/pages/Triggers/components/AdvancedTriggers.jsx index 3186ff1f..b51849da 100644 --- a/packages/admin-ui/src/pages/Triggers/components/AdvancedTriggers.jsx +++ b/packages/admin-ui/src/pages/Triggers/components/AdvancedTriggers.jsx @@ -1,4 +1,4 @@ -import { useMutation, useQuery, gql } from "@apollo/client"; +import { useMutation, useQuery, gql } from '@apollo/client' import * as R from 'ramda' import React, { memo, useState } from 'react' import Section from 'src/components/layout/Section' @@ -12,7 +12,7 @@ import { defaults, overridesDefaults, getDefaultSettings, - getOverrides + getOverrides, } from './helper' const SAVE_CONFIG = gql` @@ -50,21 +50,21 @@ const AdvancedTriggersSettings = memo(() => { const customInfoRequests = R.path(['customInfoRequests'])(customInfoReqData) ?? [] const enabledCustomInfoRequests = R.filter(R.propEq('enabled', true))( - customInfoRequests + customInfoRequests, ) const loading = configLoading || customInfoLoading const [saveConfig] = useMutation(SAVE_CONFIG, { refetchQueries: () => ['getData'], - onError: error => setError(error) + onError: error => setError(error), }) const saveDefaults = it => { const newConfig = toNamespace(SCREEN_KEY)(it.triggersConfig[0]) setError(null) return saveConfig({ - variables: { config: newConfig } + variables: { config: newConfig }, }) } @@ -117,7 +117,7 @@ const AdvancedTriggersSettings = memo(() => { save={saveOverrides} validationSchema={getOverridesSchema( requirementsOverrides, - enabledCustomInfoRequests + enabledCustomInfoRequests, )} data={requirementsOverrides} elements={getOverrides(enabledCustomInfoRequests)} diff --git a/packages/admin-ui/src/pages/Triggers/components/helper.js b/packages/admin-ui/src/pages/Triggers/components/helper.js index 70ab864f..26690843 100644 --- a/packages/admin-ui/src/pages/Triggers/components/helper.js +++ b/packages/admin-ui/src/pages/Triggers/components/helper.js @@ -9,12 +9,12 @@ const buildAdvancedRequirementOptions = customInfoRequests => { { display: 'ID card image', code: 'idCardPhoto' }, { display: 'ID data', code: 'idCardData' }, { display: 'Customer camera', code: 'facephoto' }, - { display: 'US SSN', code: 'usSsn' } + { display: 'US SSN', code: 'usSsn' }, ] const custom = R.map(it => ({ display: it.customRequest.name, - code: it.id + code: it.id, }))(customInfoRequests) return R.concat(base, custom) @@ -24,8 +24,8 @@ const displayRequirement = (code, customInfoRequests) => { return R.prop( 'display', R.find(R.propEq('code', code))( - buildAdvancedRequirementOptions(customInfoRequests) - ) + buildAdvancedRequirementOptions(customInfoRequests), + ), ) } @@ -34,7 +34,7 @@ const defaultSchema = Yup.object().shape({ automation: Yup.string() .label('Automation') .matches(/(Manual|Automatic)/) - .required() + .required(), }) const getOverridesSchema = (values, customInfoRequests) => { @@ -51,19 +51,19 @@ const getOverridesSchema = (values, customInfoRequests) => { return this.createError({ message: `Requirement '${displayRequirement( requirement, - customInfoRequests - )}' already overridden` + customInfoRequests, + )}' already overridden`, }) } return true - } + }, }), expirationTime: Yup.string().label('Expiration time').required(), automation: Yup.string() .label('Automation') .matches(/(Manual|Automatic)/) - .required() - }); + .required(), + }) } const getDefaultSettings = () => { @@ -73,7 +73,7 @@ const getDefaultSettings = () => { header: 'Expiration time', width: 196, size: 'sm', - editable: false + editable: false, }, { name: 'automation', @@ -84,11 +84,11 @@ const getDefaultSettings = () => { inputProps: { options: [ { code: 'Automatic', display: 'Automatic' }, - { code: 'Manual', display: 'Manual' } + { code: 'Manual', display: 'Manual' }, ], labelProp: 'display', - valueProp: 'code' - } + valueProp: 'code', + }, }, { name: 'customerAuthentication', @@ -99,12 +99,12 @@ const getDefaultSettings = () => { inputProps: { options: [ { code: 'SMS', display: 'SMS' }, - { code: 'EMAIL', display: 'EMAIL' } + { code: 'EMAIL', display: 'EMAIL' }, ], labelProp: 'display', - valueProp: 'code' - } - } + valueProp: 'code', + }, + }, ] } @@ -117,21 +117,21 @@ const getOverrides = customInfoRequests => { size: 'sm', view: getView( buildAdvancedRequirementOptions(customInfoRequests), - 'display' + 'display', ), input: Autocomplete, inputProps: { options: buildAdvancedRequirementOptions(customInfoRequests), labelProp: 'display', - valueProp: 'code' - } + valueProp: 'code', + }, }, { name: 'expirationTime', header: 'Expiration time', width: 196, size: 'sm', - editable: false + editable: false, }, { name: 'automation', @@ -142,12 +142,12 @@ const getOverrides = customInfoRequests => { inputProps: { options: [ { code: 'Automatic', display: 'Automatic' }, - { code: 'Manual', display: 'Manual' } + { code: 'Manual', display: 'Manual' }, ], labelProp: 'display', - valueProp: 'code' - } - } + valueProp: 'code', + }, + }, ] } @@ -155,14 +155,14 @@ const defaults = [ { expirationTime: 'Forever', automation: 'Automatic', - customerAuth: 'SMS' - } + customerAuth: 'SMS', + }, ] const overridesDefaults = { requirement: '', expirationTime: 'Forever', - automation: 'Automatic' + automation: 'Automatic', } export { @@ -171,5 +171,5 @@ export { defaults, overridesDefaults, getDefaultSettings, - getOverrides + getOverrides, } diff --git a/packages/admin-ui/src/pages/Triggers/helper.jsx b/packages/admin-ui/src/pages/Triggers/helper.jsx index b6d82200..55506b6d 100644 --- a/packages/admin-ui/src/pages/Triggers/helper.jsx +++ b/packages/admin-ui/src/pages/Triggers/helper.jsx @@ -18,24 +18,24 @@ const threshold = Yup.object().shape({ thresholdDays: Yup.number() .transform(transformNumber) .nullable() - .label('Invalid threshold days') + .label('Invalid threshold days'), }) const requirement = Yup.object().shape({ requirement: Yup.string().required(), - suspensionDays: Yup.number().transform(transformNumber).nullable() + suspensionDays: Yup.number().transform(transformNumber).nullable(), }) const Schema = Yup.object() .shape({ triggerType, requirement, - threshold + threshold, // direction }) .test(({ threshold, triggerType }, context) => { const errorMessages = { - txAmount: threshold => 'Amount must be greater than or equal to 0', + txAmount: () => 'Amount must be greater than or equal to 0', txVolume: threshold => { const thresholdMessage = 'Volume must be greater than or equal to 0' const thresholdDaysMessage = 'Days must be greater than 0' @@ -52,7 +52,7 @@ const Schema = Yup.object() if (threshold.thresholdDays <= 0) message.push(thresholdDaysMessage) return message.join(', ') }, - consecutiveDays: threshold => 'Days must be greater than 0' + consecutiveDays: () => 'Days must be greater than 0', } const thresholdValidator = { txAmount: threshold => threshold.threshold >= 0, @@ -60,14 +60,14 @@ const Schema = Yup.object() threshold.threshold >= 0 && threshold.thresholdDays > 0, txVelocity: threshold => threshold.threshold > 0 && threshold.thresholdDays > 0, - consecutiveDays: threshold => threshold.thresholdDays > 0 + consecutiveDays: threshold => threshold.thresholdDays > 0, } if (triggerType && thresholdValidator[triggerType](threshold)) return return context.createError({ path: 'threshold', - message: errorMessages[triggerType](threshold) + message: errorMessages[triggerType](threshold), }) }) .test(({ requirement }, context) => { @@ -80,7 +80,7 @@ const Schema = Yup.object() return context.createError({ path: 'requirement', - message: 'Suspension days must be greater than 0' + message: 'Suspension days must be greater than 0', }) }) @@ -88,16 +88,16 @@ const Schema = Yup.object() const typeSchema = Yup.object() .shape({ triggerType: Yup.string('The trigger type must be a string').required( - 'The trigger type is required' + 'The trigger type is required', ), threshold: Yup.object({ threshold: Yup.number().transform(transformNumber).nullable(), - thresholdDays: Yup.number().transform(transformNumber).nullable() - }) + thresholdDays: Yup.number().transform(transformNumber).nullable(), + }), }) .test(({ threshold, triggerType }, context) => { const errorMessages = { - txAmount: threshold => 'Amount must be greater than or equal to 0', + txAmount: () => 'Amount must be greater than or equal to 0', txVolume: threshold => { const thresholdMessage = 'Volume must be greater than or equal to 0' const thresholdDaysMessage = 'Days must be greater than 0' @@ -118,7 +118,7 @@ const typeSchema = Yup.object() message.push(thresholdDaysMessage) return message.join(', ') }, - consecutiveDays: threshold => 'Days must be greater than 0' + consecutiveDays: () => 'Days must be greater than 0', } const thresholdValidator = { txAmount: threshold => threshold.threshold >= 0, @@ -126,7 +126,7 @@ const typeSchema = Yup.object() threshold.threshold >= 0 && threshold.thresholdDays > 0, txVelocity: threshold => threshold.threshold > 0 && threshold.thresholdDays > 0, - consecutiveDays: threshold => threshold.thresholdDays > 0 + consecutiveDays: threshold => threshold.thresholdDays > 0, } if (!triggerType) return @@ -135,7 +135,7 @@ const typeSchema = Yup.object() return context.createError({ path: 'threshold', - message: errorMessages[triggerType](threshold) + message: errorMessages[triggerType](threshold), }) }) @@ -143,10 +143,10 @@ const typeOptions = [ { display: 'Transaction amount', code: 'txAmount' }, { display: 'Transaction volume', - code: 'txVolume' + code: 'txVolume', }, { display: 'Transaction velocity', code: 'txVelocity' }, - { display: 'Consecutive days', code: 'consecutiveDays' } + { display: 'Consecutive days', code: 'consecutiveDays' }, ] const Type = ({ ...props }) => { @@ -154,7 +154,7 @@ const Type = ({ ...props }) => { useFormikContext() const typeClass = { - 'text-tomato': errors.triggerType && touched.triggerType + 'text-tomato': errors.triggerType && touched.triggerType, } const containsType = R.contains(values?.triggerType) @@ -177,7 +177,7 @@ const Type = ({ ...props }) => { const triggerTypeError = !!(hasDaysError || hasAmountError) const thresholdClass = { - 'text-tomato': triggerTypeError + 'text-tomato': triggerTypeError, } const isRadioGroupActive = () => { @@ -205,7 +205,7 @@ const Type = ({ ...props }) => { handleChange(e) setTouched({ threshold: false, - thresholdDays: false + thresholdDays: false, }) }} /> @@ -277,8 +277,8 @@ const type = currency => ({ props: { currency }, initialValues: { triggerType: '', - threshold: { threshold: '', thresholdDays: '' } - } + threshold: { threshold: '', thresholdDays: '' }, + }, }) const requirementSchema = Yup.object() @@ -288,17 +288,17 @@ const requirementSchema = Yup.object() suspensionDays: Yup.number().when('requirement', { is: value => value === 'suspend', then: schema => schema.nullable().transform(transformNumber), - otherwise: schema => schema.nullable().transform(() => null) + otherwise: schema => schema.nullable().transform(() => null), }), customInfoRequestId: Yup.string().when('requirement', { is: value => value !== 'custom', - then: schema => schema.nullable().transform(() => '') + then: schema => schema.nullable().transform(() => ''), }), externalService: Yup.string().when('requirement', { is: value => value !== 'external', - then: schema => schema.nullable().transform(() => '') - }) - }).required() + then: schema => schema.nullable().transform(() => ''), + }), + }).required(), }) .test(({ requirement }, context) => { const requirementValidator = (requirement, type) => { @@ -323,19 +323,19 @@ const requirementSchema = Yup.object() if (requirement && !requirementValidator(requirement, 'suspend')) return context.createError({ path: 'requirement', - message: 'Suspension days must be greater than 0' + message: 'Suspension days must be greater than 0', }) if (requirement && !requirementValidator(requirement, 'custom')) return context.createError({ path: 'requirement', - message: 'You must select an item' + message: 'You must select an item', }) if (requirement && !requirementValidator(requirement, 'external')) return context.createError({ path: 'requirement', - message: 'You must select an item' + message: 'You must select an item', }) }) @@ -343,25 +343,25 @@ const requirementOptions = [ { display: 'SMS verification', code: 'sms' }, { display: 'Email verification', - code: 'email' + code: 'email', }, { display: 'ID card image', code: 'idCardPhoto' }, { display: 'ID data', - code: 'idCardData' + code: 'idCardData', }, { display: 'Customer camera', code: 'facephoto' }, { display: 'Sanctions', code: 'sanctions' }, { display: 'US SSN', - code: 'usSsn' + code: 'usSsn', }, // { display: 'Super user', code: 'superuser' }, { display: 'Suspend', code: 'suspend' }, { display: 'Block', code: 'block' }, { display: 'External verification', - code: 'external' - } + code: 'external', + }, ] const hasRequirementError = (errors, touched, values) => @@ -386,7 +386,7 @@ const Requirement = ({ triggers, emailAuth, complianceServices, - customInfoRequests = [] + customInfoRequests = [], }) => { const { touched, errors, values, handleChange, setTouched } = useFormikContext() @@ -400,12 +400,12 @@ const Requirement = ({ if (value.requirement.requirement === 'custom') acc.push({ triggerType: value.triggerType, - id: value.requirement.customInfoRequestId + id: value.requirement.customInfoRequestId, }) return acc }, [], - triggers + triggers, ) const availableCustomRequirements = R.filter( @@ -413,24 +413,24 @@ const Requirement = ({ !R.includes( { triggerType: config.triggerType, - id: it.id + id: it.id, }, - customRequirementsInUse + customRequirementsInUse, ), - customInfoRequests + customInfoRequests, ) const makeCustomReqOptions = () => availableCustomRequirements.map(it => ({ value: it.id, - display: it.customRequest.name + display: it.customRequest.name, })) const enableCustomRequirement = !R.isEmpty(availableCustomRequirements) const customInfoOption = { display: 'Custom information requirement', - code: 'custom' + code: 'custom', } const itemToRemove = emailAuth ? 'sms' : 'email' @@ -444,7 +444,7 @@ const Requirement = ({ (!!errors.requirement && !isSuspend && !isCustom && !isExternal) || (isSuspend && hasRequirementError(errors, touched, values)) || (isCustom && hasCustomRequirementError(errors, touched, values)) || - (isExternal && hasExternalRequirementError(errors, touched, values)) + (isExternal && hasExternalRequirementError(errors, touched, values)), } return ( @@ -462,7 +462,7 @@ const Requirement = ({ onChange={e => { handleChange(e) setTouched({ - suspensionDays: false + suspensionDays: false, }) }} /> @@ -496,7 +496,7 @@ const Requirement = ({ name="requirement.externalService" options={complianceServices.map(it => ({ value: it.code, - display: it.display + display: it.display, }))} /> @@ -510,7 +510,7 @@ const requirements = ( triggers, customInfoRequests, complianceServices, - emailAuth + emailAuth, ) => ({ schema: requirementSchema, options: requirementOptions, @@ -520,7 +520,7 @@ const requirements = ( triggers, customInfoRequests, emailAuth, - complianceServices + complianceServices, }, hasRequirementError: hasRequirementError, hasCustomRequirementError: hasCustomRequirementError, @@ -530,9 +530,9 @@ const requirements = ( requirement: '', suspensionDays: '', customInfoRequestId: '', - externalService: '' - } - } + externalService: '', + }, + }, }) const getView = (data, code, compare) => it => { @@ -553,7 +553,7 @@ const RequirementInput = ({ customInfoRequests = [] }) => { const isSuspend = requirement === 'suspend' const display = customRequestId ? (R.path(['customRequest', 'name'])( - R.find(customReqIdMatches(customRequestId))(customInfoRequests) + R.find(customReqIdMatches(customRequestId))(customInfoRequests), ) ?? '') : getView(requirementOptions, 'display')(requirement) @@ -579,12 +579,12 @@ const RequirementView = ({ suspensionDays, customInfoRequestId, externalService, - customInfoRequests = [] + customInfoRequests = [], }) => { const display = requirement === 'custom' ? (R.path(['customRequest', 'name'])( - R.find(customReqIdMatches(customInfoRequestId))(customInfoRequests) + R.find(customReqIdMatches(customInfoRequestId))(customInfoRequests), ) ?? '') : requirement === 'external' ? `External verification (${onlyFirstToUpper(externalService)})` @@ -607,7 +607,7 @@ const DisplayThreshold = ({ config, currency, isEdit }) => { const inputClasses = { '-mt-1': true, 'w-13': config?.triggerType === 'txVelocity', - 'w-15': config?.triggerType === 'consecutiveDays' + 'w-15': config?.triggerType === 'consecutiveDays', } const threshold = config?.threshold?.threshold @@ -712,8 +712,8 @@ const getElements = (currency, customInfoRequests) => [ options: typeOptions, valueProp: 'code', labelProp: 'display', - optionsLimit: null - } + optionsLimit: null, + }, }, { name: 'requirement', @@ -723,7 +723,7 @@ const getElements = (currency, customInfoRequests) => [ input: () => , view: it => ( - ) + ), }, { name: 'threshold', @@ -731,16 +731,16 @@ const getElements = (currency, customInfoRequests) => [ width: 254, textAlign: 'right', input: () => , - view: (it, config) => - } + view: (it, config) => , + }, ] const triggerOrder = R.map(R.prop('code'))(typeOptions) const sortBy = [ R.comparator( (a, b) => - triggerOrder.indexOf(a.triggerType) < triggerOrder.indexOf(b.triggerType) - ) + triggerOrder.indexOf(a.triggerType) < triggerOrder.indexOf(b.triggerType), + ), ] const fromServer = triggers => { @@ -758,14 +758,14 @@ const fromServer = triggers => { requirement, suspensionDays, customInfoRequestId, - externalService + externalService, }, threshold: { threshold, - thresholdDays + thresholdDays, }, - ...rest - }) + ...rest, + }), )(triggers) } @@ -777,7 +777,7 @@ const toServer = triggers => thresholdDays: threshold.thresholdDays, customInfoRequestId: requirement.customInfoRequestId, externalService: requirement.externalService, - ...rest + ...rest, }))(triggers) export { @@ -789,5 +789,5 @@ export { fromServer, toServer, getView, - requirementOptions + requirementOptions, } diff --git a/packages/admin-ui/src/pages/UserManagement/UserManagement.jsx b/packages/admin-ui/src/pages/UserManagement/UserManagement.jsx index d7850b37..85b25245 100644 --- a/packages/admin-ui/src/pages/UserManagement/UserManagement.jsx +++ b/packages/admin-ui/src/pages/UserManagement/UserManagement.jsx @@ -65,7 +65,7 @@ const initialState = { showResetPasswordModal: false, showReset2FAModal: false, showRoleModal: false, - showEnableUserModal: false + showEnableUserModal: false, } const reducer = (_, action) => { @@ -82,7 +82,7 @@ const reducer = (_, action) => { const roleMapper = { user: 'Regular', - superuser: 'Superuser' + superuser: 'Superuser', } const Users = () => { @@ -94,9 +94,9 @@ const Users = () => { const [userInfo, setUserInfo] = useState(null) const [validateAttestation] = useMutation(VALIDATE_ATTESTATION, { - onCompleted: res => { + onCompleted: () => { // TODO: show a brief popup to have UX feedback? - } + }, }) const [generateAttestationOptions] = useLazyQuery(GENERATE_ATTESTATION, { @@ -106,11 +106,11 @@ const Users = () => { variables: { userID: userInfo.id, attestationResponse: res, - domain: window.location.hostname - } + domain: window.location.hostname, + }, }) }) - } + }, }) const elements = [ @@ -128,7 +128,7 @@ const Users = () => { ) return {u.username} - } + }, }, { header: 'Role', @@ -146,13 +146,13 @@ const Users = () => { setUserInfo(u) dispatch({ type: 'open', - payload: 'showRoleModal' + payload: 'showRoleModal', }) }} value={u.role === 'superuser'} /> - ) + ), }, { header: 'Actions', @@ -170,7 +170,7 @@ const Users = () => { setUserInfo(u) dispatch({ type: 'open', - payload: 'showResetPasswordModal' + payload: 'showResetPasswordModal', }) }}> Reset password @@ -183,7 +183,7 @@ const Users = () => { setUserInfo(u) dispatch({ type: 'open', - payload: 'showReset2FAModal' + payload: 'showReset2FAModal', }) }}> Reset 2FA @@ -196,15 +196,15 @@ const Users = () => { if (IP_CHECK_REGEX.test(window.location.hostname)) { dispatch({ type: 'open', - payload: 'showFIDOModal' + payload: 'showFIDOModal', }) } else { setUserInfo(u) generateAttestationOptions({ variables: { userID: u.id, - domain: window.location.hostname - } + domain: window.location.hostname, + }, }) } }}> @@ -212,7 +212,7 @@ const Users = () => { ) - } + }, }, { header: 'Enabled', @@ -227,13 +227,13 @@ const Users = () => { setUserInfo(u) dispatch({ type: 'open', - payload: 'showEnableUserModal' + payload: 'showEnableUserModal', }) }} value={u.enabled} /> - ) - } + ), + }, ] return ( @@ -246,7 +246,7 @@ const Users = () => { onClick={() => { dispatch({ type: 'open', - payload: 'showCreateUserModal' + payload: 'showCreateUserModal', }) }}> Add new user diff --git a/packages/admin-ui/src/pages/UserManagement/modals/ChangeRoleModal.jsx b/packages/admin-ui/src/pages/UserManagement/modals/ChangeRoleModal.jsx index e048d02c..a5a0f6cb 100644 --- a/packages/admin-ui/src/pages/UserManagement/modals/ChangeRoleModal.jsx +++ b/packages/admin-ui/src/pages/UserManagement/modals/ChangeRoleModal.jsx @@ -28,7 +28,7 @@ const CHANGE_USER_ROLE = gql` const ChangeRoleModal = ({ state, dispatch, user, requiresConfirmation }) => { const [changeUserRole, { error }] = useMutation(CHANGE_USER_ROLE, { onCompleted: () => handleClose(), - refetchQueries: () => ['users'] + refetchQueries: () => ['users'], }) const [confirmation, setConfirmation] = useState(null) @@ -38,8 +38,8 @@ const ChangeRoleModal = ({ state, dispatch, user, requiresConfirmation }) => { variables: { confirmationCode: confirmation, id: user.id, - newRole: user.role === 'superuser' ? 'user' : 'superuser' - } + newRole: user.role === 'superuser' ? 'user' : 'superuser', + }, }) } @@ -47,7 +47,7 @@ const ChangeRoleModal = ({ state, dispatch, user, requiresConfirmation }) => { setConfirmation(null) dispatch({ type: 'close', - payload: 'showRoleModal' + payload: 'showRoleModal', }) } diff --git a/packages/admin-ui/src/pages/UserManagement/modals/CreateUserModal.jsx b/packages/admin-ui/src/pages/UserManagement/modals/CreateUserModal.jsx index a962c8ed..c801ecd0 100644 --- a/packages/admin-ui/src/pages/UserManagement/modals/CreateUserModal.jsx +++ b/packages/admin-ui/src/pages/UserManagement/modals/CreateUserModal.jsx @@ -27,23 +27,23 @@ const validationSchema = Yup.object().shape({ username: Yup.string() .email('Username field should be in an email format!') .required('Username field is required!'), - role: Yup.string().required('Role field is required!') + role: Yup.string().required('Role field is required!'), }) const initialValues = { username: '', - role: '' + role: '', } const radioOptions = [ { code: 'user', - display: 'Regular user' + display: 'Regular user', }, { code: 'superuser', - display: 'Superuser' - } + display: 'Superuser', + }, ] const getErrorMsg = (formikErrors, formikTouched, mutationError) => { @@ -62,18 +62,18 @@ const CreateUserModal = ({ state, dispatch }) => { setCreateUserURL(null) dispatch({ type: 'close', - payload: 'showCreateUserModal' + payload: 'showCreateUserModal', }) } const [createUser, { error }] = useMutation(CREATE_USER, { onCompleted: ({ createRegisterToken: token }) => { setCreateUserURL(urlResolver(`/register?t=${token.token}`)) - } + }, }) const roleClass = (formikErrors, formikTouched) => ({ - [classes.error]: formikErrors.role && formikTouched.role + [classes.error]: formikErrors.role && formikTouched.role, }) return ( @@ -91,7 +91,7 @@ const CreateUserModal = ({ state, dispatch }) => { onSubmit={values => { setUsernameField(values.username) createUser({ - variables: { username: values.username, role: values.role } + variables: { username: values.username, role: values.role }, }) }}> {({ errors, touched }) => ( @@ -107,7 +107,7 @@ const CreateUserModal = ({ state, dispatch }) => {

Role

diff --git a/packages/admin-ui/src/pages/UserManagement/modals/EnableUserModal.jsx b/packages/admin-ui/src/pages/UserManagement/modals/EnableUserModal.jsx index dcb23287..c1c4bd7a 100644 --- a/packages/admin-ui/src/pages/UserManagement/modals/EnableUserModal.jsx +++ b/packages/admin-ui/src/pages/UserManagement/modals/EnableUserModal.jsx @@ -28,12 +28,12 @@ const DISABLE_USER = gql` const EnableUserModal = ({ state, dispatch, user, requiresConfirmation }) => { const [enableUser, { error: enableError }] = useMutation(ENABLE_USER, { onCompleted: () => handleClose(), - refetchQueries: () => ['users'] + refetchQueries: () => ['users'], }) const [disableUser, { error: disableError }] = useMutation(DISABLE_USER, { onCompleted: () => handleClose(), - refetchQueries: () => ['users'] + refetchQueries: () => ['users'], }) const [confirmation, setConfirmation] = useState(null) @@ -42,8 +42,8 @@ const EnableUserModal = ({ state, dispatch, user, requiresConfirmation }) => { disableUser({ variables: { confirmationCode: confirmation, - id: user.id - } + id: user.id, + }, }) } @@ -51,8 +51,8 @@ const EnableUserModal = ({ state, dispatch, user, requiresConfirmation }) => { enableUser({ variables: { confirmationCode: confirmation, - id: user.id - } + id: user.id, + }, }) } @@ -64,7 +64,7 @@ const EnableUserModal = ({ state, dispatch, user, requiresConfirmation }) => { setConfirmation(null) dispatch({ type: 'close', - payload: 'showEnableUserModal' + payload: 'showEnableUserModal', }) } diff --git a/packages/admin-ui/src/pages/UserManagement/modals/FIDOModal.jsx b/packages/admin-ui/src/pages/UserManagement/modals/FIDOModal.jsx index 172e93a0..d1304d19 100644 --- a/packages/admin-ui/src/pages/UserManagement/modals/FIDOModal.jsx +++ b/packages/admin-ui/src/pages/UserManagement/modals/FIDOModal.jsx @@ -10,7 +10,7 @@ const ChangeRoleModal = ({ state, dispatch }) => { const handleClose = () => { dispatch({ type: 'close', - payload: 'showFIDOModal' + payload: 'showFIDOModal', }) } diff --git a/packages/admin-ui/src/pages/UserManagement/modals/Input2FAModal.jsx b/packages/admin-ui/src/pages/UserManagement/modals/Input2FAModal.jsx index 450d3d5f..2730aab1 100644 --- a/packages/admin-ui/src/pages/UserManagement/modals/Input2FAModal.jsx +++ b/packages/admin-ui/src/pages/UserManagement/modals/Input2FAModal.jsx @@ -32,7 +32,7 @@ const Input2FAModal = ({ showModal, handleClose, setConfirmation }) => { const [confirm2FA, { error: queryError }] = useLazyQuery(CONFIRM_2FA, { onCompleted: ({ confirm2FA: success }) => - !success ? setInvalidCode(true) : onContinue() + !success ? setInvalidCode(true) : onContinue(), }) const getErrorMsg = () => { diff --git a/packages/admin-ui/src/pages/UserManagement/modals/Reset2FAModal.jsx b/packages/admin-ui/src/pages/UserManagement/modals/Reset2FAModal.jsx index ccf0e043..1cf5ae78 100644 --- a/packages/admin-ui/src/pages/UserManagement/modals/Reset2FAModal.jsx +++ b/packages/admin-ui/src/pages/UserManagement/modals/Reset2FAModal.jsx @@ -28,8 +28,8 @@ const Reset2FAModal = ({ state, dispatch, user, requiresConfirmation }) => { { onCompleted: ({ createReset2FAToken: token }) => { setReset2FAUrl(urlResolver(`/reset2fa?t=${token.token}`)) - } - } + }, + }, ) const [confirmation, setConfirmation] = useState(null) @@ -40,22 +40,22 @@ const Reset2FAModal = ({ state, dispatch, user, requiresConfirmation }) => { createReset2FAToken({ variables: { confirmationCode: confirmation, - userID: user?.id - } + userID: user?.id, + }, }) }, [ confirmation, createReset2FAToken, requiresConfirmation, state.showReset2FAModal, - user?.id + user?.id, ]) const handleClose = () => { setConfirmation(null) dispatch({ type: 'close', - payload: 'showReset2FAModal' + payload: 'showReset2FAModal', }) } diff --git a/packages/admin-ui/src/pages/UserManagement/modals/ResetPasswordModal.jsx b/packages/admin-ui/src/pages/UserManagement/modals/ResetPasswordModal.jsx index 1ebdfa70..1f8da1bc 100644 --- a/packages/admin-ui/src/pages/UserManagement/modals/ResetPasswordModal.jsx +++ b/packages/admin-ui/src/pages/UserManagement/modals/ResetPasswordModal.jsx @@ -27,7 +27,7 @@ const ResetPasswordModal = ({ state, dispatch, user, - requiresConfirmation + requiresConfirmation, }) => { const [resetPasswordUrl, setResetPasswordUrl] = useState('') @@ -36,8 +36,8 @@ const ResetPasswordModal = ({ { onCompleted: ({ createResetPasswordToken: token }) => { setResetPasswordUrl(urlResolver(`/resetpassword?t=${token.token}`)) - } - } + }, + }, ) const [confirmation, setConfirmation] = useState(null) @@ -48,22 +48,22 @@ const ResetPasswordModal = ({ createResetPasswordToken({ variables: { confirmationCode: confirmation, - userID: user?.id - } + userID: user?.id, + }, }) }, [ confirmation, createResetPasswordToken, requiresConfirmation, state.showResetPasswordModal, - user?.id + user?.id, ]) const handleClose = () => { setConfirmation(null) dispatch({ type: 'close', - payload: 'showResetPasswordModal' + payload: 'showResetPasswordModal', }) } diff --git a/packages/admin-ui/src/pages/Wallet/AdvancedWallet.jsx b/packages/admin-ui/src/pages/Wallet/AdvancedWallet.jsx index 9a56cdaf..d54600e7 100644 --- a/packages/admin-ui/src/pages/Wallet/AdvancedWallet.jsx +++ b/packages/admin-ui/src/pages/Wallet/AdvancedWallet.jsx @@ -1,4 +1,4 @@ -import { useQuery, useMutation, gql } from "@apollo/client"; +import { useQuery, useMutation, gql } from '@apollo/client' import * as R from 'ramda' import React, { useState } from 'react' import Section from 'src/components/layout/Section' @@ -11,7 +11,7 @@ import { getAdvancedWalletElements, getAdvancedWalletElementsOverrides, OverridesDefaults, - OverridesSchema + OverridesSchema, } from './helper' const SAVE_CONFIG = gql` @@ -39,12 +39,12 @@ const AdvancedWallet = () => { const [isEditingOverrides, setEditingOverrides] = useState(false) const [saveConfig, { error }] = useMutation(SAVE_CONFIG, { - refetchQueries: () => ['getData'] + refetchQueries: () => ['getData'], }) const save = rawConfig => { const config = toNamespace(SCREEN_KEY)( - toNamespace(ADVANCED)(rawConfig.wallets[0]) + toNamespace(ADVANCED)(rawConfig.wallets[0]), ) return saveConfig({ variables: { config } }) } @@ -60,22 +60,22 @@ const AdvancedWallet = () => { const cryptoCurrencies = data?.cryptoCurrencies ?? [] const AdvancedWalletSettings = fromNamespace(ADVANCED)( - fromNamespace(SCREEN_KEY)(data?.config) + fromNamespace(SCREEN_KEY)(data?.config), ) const AdvancedWalletSettingsOverrides = AdvancedWalletSettings.overrides ?? [] const overriddenCryptos = R.map(R.prop(CRYPTOCURRENCY_KEY))( - AdvancedWalletSettingsOverrides + AdvancedWalletSettingsOverrides, ) const suggestionFilter = R.filter( - it => !R.contains(it.code, overriddenCryptos) + it => !R.contains(it.code, overriddenCryptos), ) const coinSuggestions = suggestionFilter(cryptoCurrencies) const findSuggestion = it => { const coin = R.compose(R.find(R.propEq('code', it?.cryptoCurrency)))( - cryptoCurrencies + cryptoCurrencies, ) return coin ? [coin] : [] } @@ -113,7 +113,7 @@ const AdvancedWallet = () => { data={AdvancedWalletSettingsOverrides ?? []} elements={getAdvancedWalletElementsOverrides( coinSuggestions, - findSuggestion + findSuggestion, )} disableAdd={!coinSuggestions?.length} setEditing={onEditingOverrides} diff --git a/packages/admin-ui/src/pages/Wallet/Wallet.jsx b/packages/admin-ui/src/pages/Wallet/Wallet.jsx index 8e61444e..67704801 100644 --- a/packages/admin-ui/src/pages/Wallet/Wallet.jsx +++ b/packages/admin-ui/src/pages/Wallet/Wallet.jsx @@ -1,4 +1,4 @@ -import { useQuery, useMutation, gql } from "@apollo/client"; +import { useQuery, useMutation, gql } from '@apollo/client' import * as R from 'ramda' import React, { useState } from 'react' import Modal from 'src/components/Modal' @@ -68,14 +68,14 @@ const Wallet = ({ name: SCREEN_KEY }) => { const [saveConfig, { error }] = useMutation(SAVE_CONFIG, { onCompleted: () => setWizard(false), - refetchQueries: () => ['getData'] + refetchQueries: () => ['getData'], }) const { data: marketsData } = useQuery(GET_MARKETS) const [saveAccount] = useMutation(SAVE_ACCOUNT, { onCompleted: () => setEditingSchema(null), - refetchQueries: () => ['getData'] + refetchQueries: () => ['getData'], }) const save = (rawConfig, accounts) => { @@ -114,7 +114,7 @@ const Wallet = ({ name: SCREEN_KEY }) => { const wizardSave = it => saveAccount({ - variables: { accounts: { [editingSchema.code]: it } } + variables: { accounts: { [editingSchema.code]: it } }, }).then(it => { onChangeFunction() setOnChangeFunction(null) @@ -131,8 +131,8 @@ const Wallet = ({ name: SCREEN_KEY }) => { text: 'Advanced settings', icon: SettingsIcon, inverseIcon: ReverseSettingsIcon, - toggle: setAdvancedSettings - } + toggle: setAdvancedSettings, + }, ]} appendix={ @@ -188,7 +188,9 @@ const Wallet = ({ name: SCREEN_KEY }) => { diff --git a/packages/admin-ui/src/pages/Wallet/Wizard.jsx b/packages/admin-ui/src/pages/Wallet/Wizard.jsx index ebb91549..2321ab47 100644 --- a/packages/admin-ui/src/pages/Wallet/Wizard.jsx +++ b/packages/admin-ui/src/pages/Wallet/Wizard.jsx @@ -44,12 +44,12 @@ const Wizard = ({ accounts, fiatCurrency, save, - error + error, }) => { const [{ step, config, accountsToSave }, setState] = useState({ step: 0, config: { active: true }, - accountsToSave: {} + accountsToSave: {}, }) const title = `Enable ${coin.display}` @@ -64,7 +64,7 @@ const Wizard = ({ const commonWizardSteps = [ { type: 'ticker', ...tickers }, { type: 'wallet', ...wallets }, - { type: 'exchange', ...exchanges } + { type: 'exchange', ...exchanges }, ] const hasZeroConfs = @@ -75,14 +75,14 @@ const Wizard = ({ type: 'zeroConf', name: 'confidence checking', schema: Yup.object().shape({ - zeroConfLimit: Yup.number().required() + zeroConfLimit: Yup.number().required(), }), - ...zeroConfs + ...zeroConfs, } const zeroConfLimitStep = { type: 'zeroConfLimit', - name: '0-conf limit' + name: '0-conf limit', } const wizardSteps = hasZeroConfs @@ -90,7 +90,7 @@ const Wizard = ({ commonWizardSteps, has0Conf(coin) ? [confidenceCheckingStep] - : [confidenceCheckingStep, zeroConfLimitStep] + : [confidenceCheckingStep, zeroConfLimitStep], ) : commonWizardSteps @@ -111,7 +111,7 @@ const Wizard = ({ setState({ step: step + 1, config: newConfig, - accountsToSave: newAccounts + accountsToSave: newAccounts, }) } diff --git a/packages/admin-ui/src/pages/Wallet/WizardStep.jsx b/packages/admin-ui/src/pages/Wallet/WizardStep.jsx index 0b1fcb30..7e4746a6 100644 --- a/packages/admin-ui/src/pages/Wallet/WizardStep.jsx +++ b/packages/admin-ui/src/pages/Wallet/WizardStep.jsx @@ -16,7 +16,7 @@ const initialState = { form: null, selected: null, isNew: false, - iError: false + iError: false, } const reducer = (state, action) => { @@ -26,7 +26,7 @@ const reducer = (state, action) => { form: null, selected: action.selected, isNew: null, - iError: false + iError: false, } case 'new': return { form: state.form, selected: null, isNew: true, iError: false } @@ -35,7 +35,7 @@ const reducer = (state, action) => { form: action.form, selected: action.form.code, isNew: true, - iError: false + iError: false, } case 'error': return R.merge(state, { innerError: true }) @@ -62,11 +62,11 @@ const WizardStep = ({ fiatCurrency, filled, unfilled, - getValue + getValue, }) => { const [{ innerError, selected, form, isNew }, dispatch] = useReducer( reducer, - initialState + initialState, ) useEffect(() => { @@ -83,7 +83,7 @@ const WizardStep = ({ const label = isLastStep ? 'Finish' : 'Next' const displayName = name ?? type const subtitleClass = classnames('mt-8 mb-5 mx-0', { - 'text-tomato': innerError + 'text-tomato': innerError, }) return ( <> @@ -115,7 +115,7 @@ const WizardStep = ({ initialValues={{ zeroConfLimit: '' }} enableReinitialize validationSchema={stepSchema}> - {({ values, setFieldValue }) => ( + {({ setFieldValue }) => (
{ dispatch({ type: 'select', - selected: event.target.value + selected: event.target.value, }) setFieldValue(event.target.id, event.target.value) }} @@ -143,7 +143,7 @@ const WizardStep = ({ {!R.isEmpty(unfilled) && !R.isNil(unfilled) && ( { + onChange={() => { dispatch({ type: 'new' }) }} labelClassName="w-[150px] h-12" @@ -170,7 +170,7 @@ const WizardStep = ({ save={it => innerContinue({ [type]: form.code }, { [form.code]: it })} elements={schemas[form.code].elements} validationSchema={schemas[form.code].getValidationSchema( - accounts[form.code] + accounts[form.code], )} value={getValue(form.code)} buttonLabel={label} diff --git a/packages/admin-ui/src/pages/Wallet/helper.jsx b/packages/admin-ui/src/pages/Wallet/helper.jsx index 482c7d1c..fc6128fc 100644 --- a/packages/admin-ui/src/pages/Wallet/helper.jsx +++ b/packages/admin-ui/src/pages/Wallet/helper.jsx @@ -6,7 +6,7 @@ import * as Yup from 'yup' import { Autocomplete, Checkbox, - NumberInput + NumberInput, } from 'src/components/inputs/formik' import { CURRENCY_MAX } from 'src/utils/constants' import { defaultToZero } from 'src/utils/number' @@ -16,26 +16,26 @@ const filterCoins = ({ id }) => R.filter(it => R.contains(id)(it.cryptos)) const WalletSchema = Yup.object().shape({ ticker: Yup.string('The ticker must be a string').required( - 'The ticker is required' + 'The ticker is required', ), wallet: Yup.string('The wallet must be a string').required( - 'The wallet is required' + 'The wallet is required', ), exchange: Yup.string('The exchange must be a string').required( - 'The exchange is required' + 'The exchange is required', ), zeroConf: Yup.string('The confidence checking must be a string'), zeroConfLimit: Yup.number('The 0-conf limit must be an integer') .integer('The 0-conf limit must be an integer') .min(0, 'The 0-conf limit must be a positive integer') .max(CURRENCY_MAX) - .transform(defaultToZero) + .transform(defaultToZero), }) const AdvancedWalletSchema = Yup.object().shape({ cryptoUnits: Yup.string().required(), feeMultiplier: Yup.string().required(), - allowTransactionBatching: Yup.boolean() + allowTransactionBatching: Yup.boolean(), }) const OverridesSchema = Yup.object().shape({ @@ -46,14 +46,14 @@ const OverridesSchema = Yup.object().shape({ cryptoCurrency: Yup.string().required(), allowTransactionBatching: Yup.boolean() .default(() => false) - .required() + .required(), }) const OverridesDefaults = { cryptoUnits: '', feeMultiplier: '', cryptoCurrency: '', - allowTransactionBatching: null + allowTransactionBatching: null, } const viewFeeMultiplier = it => @@ -72,12 +72,12 @@ const feeOptions = [ { display: '-30%', code: '0.7' }, { display: '-40%', code: '0.6' }, { display: '-50%', code: '0.5' }, - { display: '-60%', code: '0.4' } + { display: '-60%', code: '0.4' }, ] const cryptoUnitsDefaultOptions = [ { display: 'mili', code: 'mili' }, - { display: 'full', code: 'full' } + { display: 'full', code: 'full' }, ] const getCryptoUnitsOptions = it => { @@ -99,8 +99,8 @@ const getAdvancedWalletElements = () => { inputProps: { options: cryptoUnitsDefaultOptions, valueProp: 'code', - labelProp: 'display' - } + labelProp: 'display', + }, }, { name: 'allowTransactionBatching', @@ -111,7 +111,7 @@ const getAdvancedWalletElements = () => { view: (_, ite) => { return ite.allowTransactionBatching ? 'Yes' : `No` }, - input: Checkbox + input: Checkbox, }, { name: 'feeMultiplier', @@ -124,15 +124,15 @@ const getAdvancedWalletElements = () => { inputProps: { options: feeOptions, valueProp: 'code', - labelProp: 'display' - } - } + labelProp: 'display', + }, + }, ] } const getAdvancedWalletElementsOverrides = ( coinSuggestions, - findSuggestion + findSuggestion, ) => { return [ { @@ -143,9 +143,9 @@ const getAdvancedWalletElementsOverrides = ( options: it => R.concat(coinSuggestions, findSuggestion(it)), optionsLimit: null, valueProp: 'code', - labelProp: 'display' + labelProp: 'display', }, - size: 'sm' + size: 'sm', }, { name: 'cryptoUnits', @@ -156,8 +156,8 @@ const getAdvancedWalletElementsOverrides = ( inputProps: { options: getCryptoUnitsOptions, valueProp: 'code', - labelProp: 'display' - } + labelProp: 'display', + }, }, { name: 'allowTransactionBatching', @@ -170,7 +170,7 @@ const getAdvancedWalletElementsOverrides = ( return ite.allowTransactionBatching ? 'Yes' : 'No' }, input: Checkbox, - editable: it => it.cryptoCurrency === 'BTC' + editable: it => it.cryptoCurrency === 'BTC', }, { name: 'feeMultiplier', @@ -187,16 +187,16 @@ const getAdvancedWalletElementsOverrides = ( inputProps: { options: feeOptions, valueProp: 'code', - labelProp: 'display' + labelProp: 'display', }, - editable: it => it.cryptoCurrency === 'BTC' - } + editable: it => it.cryptoCurrency === 'BTC', + }, ] } const has0Conf = R.complement( /* NOTE: List of coins without 0conf settings. */ - R.pipe(R.prop('id'), R.flip(R.includes)(['ETH', 'USDT', 'USDC'])) + R.pipe(R.prop('id'), R.flip(R.includes)(['ETH', 'USDT', 'USDC'])), ) const getElements = (cryptoCurrencies, accounts, onChange, wizard = false) => { @@ -204,7 +204,7 @@ const getElements = (cryptoCurrencies, accounts, onChange, wizard = false) => { const viewCryptoCurrency = it => { const currencyDisplay = R.compose( it => `${R.prop(['display'])(it)} ${it?.isBeta ? '(Beta)' : ''}`, - R.find(R.propEq('code', it)) + R.find(R.propEq('code', it)), )(cryptoCurrencies) return currencyDisplay } @@ -213,11 +213,11 @@ const getElements = (cryptoCurrencies, accounts, onChange, wizard = false) => { const getDisplayName = type => it => R.compose( R.prop('display'), - R.find(R.propEq('code', it)) + R.find(R.propEq('code', it)), )(filterOptions(type)) const getOptions = R.curry((option, it) => - filterCoins(it)(filterOptions(option)) + filterCoins(it)(filterOptions(option)), ) return [ @@ -227,7 +227,7 @@ const getElements = (cryptoCurrencies, accounts, onChange, wizard = false) => { width: 150 - widthAdjust, view: viewCryptoCurrency, size: 'sm', - editable: false + editable: false, }, { name: 'ticker', @@ -240,8 +240,8 @@ const getElements = (cryptoCurrencies, accounts, onChange, wizard = false) => { options: getOptions('ticker'), valueProp: 'code', labelProp: 'display', - optionsLimit: null - } + optionsLimit: null, + }, }, { name: 'wallet', @@ -255,8 +255,8 @@ const getElements = (cryptoCurrencies, accounts, onChange, wizard = false) => { valueProp: 'code', labelProp: 'display', optionsLimit: null, - onChange - } + onChange, + }, }, { name: 'exchange', @@ -270,8 +270,8 @@ const getElements = (cryptoCurrencies, accounts, onChange, wizard = false) => { valueProp: 'code', labelProp: 'display', optionsLimit: null, - onChange - } + onChange, + }, }, { name: 'zeroConf', @@ -293,9 +293,9 @@ const getElements = (cryptoCurrencies, accounts, onChange, wizard = false) => { valueProp: 'code', labelProp: 'display', optionsLimit: null, - onChange + onChange, }, - editable: has0Conf + editable: has0Conf, }, { name: 'zeroConfLimit', @@ -307,10 +307,10 @@ const getElements = (cryptoCurrencies, accounts, onChange, wizard = false) => { input: NumberInput, width: 145 - widthAdjust, inputProps: { - decimalPlaces: 0 + decimalPlaces: 0, }, - editable: has0Conf - } + editable: has0Conf, + }, ] } @@ -323,5 +323,5 @@ export { getAdvancedWalletElementsOverrides, OverridesDefaults, OverridesSchema, - has0Conf + has0Conf, } diff --git a/packages/admin-ui/src/pages/Wizard/Wizard.jsx b/packages/admin-ui/src/pages/Wizard/Wizard.jsx index 729ccbbf..82123298 100644 --- a/packages/admin-ui/src/pages/Wizard/Wizard.jsx +++ b/packages/admin-ui/src/pages/Wizard/Wizard.jsx @@ -21,7 +21,7 @@ const GET_DATA = gql` } ` -const Wizard = ({ fromAuthRegister }) => { +const Wizard = () => { const { data, loading } = useQuery(GET_DATA) const history = useHistory() const { setWizardTested } = useContext(AppContext) @@ -68,7 +68,7 @@ const Wizard = ({ fromAuthRegister }) => { 'flex flex-col justify-between py-4 px-0 bg-white': true, 'bg-[url(/wizard-background.svg)] bg-no-repeat bg-center bg-fixed bg-cover': isWelcome, - 'blur-sm pointer-events-none': footerExp + 'blur-sm pointer-events-none': footerExp, } return ( diff --git a/packages/admin-ui/src/pages/Wizard/components/Commissions.jsx b/packages/admin-ui/src/pages/Wizard/components/Commissions.jsx index b4f6f95b..50f2e32e 100644 --- a/packages/admin-ui/src/pages/Wizard/components/Commissions.jsx +++ b/packages/admin-ui/src/pages/Wizard/components/Commissions.jsx @@ -23,7 +23,7 @@ function Commissions({ isActive, doContinue }) { const { data } = useQuery(GET_DATA) const [saveConfig] = useMutation(SAVE_CONFIG, { - onCompleted: doContinue + onCompleted: doContinue, }) const save = it => { @@ -32,7 +32,7 @@ function Commissions({ isActive, doContinue }) { } const currency = R.path(['fiatCurrency'])( - fromNamespace(namespaces.LOCALE)(data?.config) + fromNamespace(namespaces.LOCALE)(data?.config), ) const locale = fromNamespace(namespaces.LOCALE)(data?.config) diff --git a/packages/admin-ui/src/pages/Wizard/components/Locales.jsx b/packages/admin-ui/src/pages/Wizard/components/Locales.jsx index 8ed67674..da95bb48 100644 --- a/packages/admin-ui/src/pages/Wizard/components/Locales.jsx +++ b/packages/admin-ui/src/pages/Wizard/components/Locales.jsx @@ -8,7 +8,7 @@ import { Table as EditableTable } from 'src/components/editableTable' import { mainFields, localeDefaults as defaults, - LocaleSchema as schema + LocaleSchema as schema, } from 'src/pages/Locales/helper' import { toNamespace } from 'src/utils/config' @@ -51,7 +51,7 @@ function Locales({ isActive, doContinue }) { const { data } = useQuery(GET_DATA) const [saveConfig] = useMutation(SAVE_CONFIG, { - onCompleted: doContinue + onCompleted: doContinue, }) const save = it => { @@ -61,7 +61,7 @@ function Locales({ isActive, doContinue }) { const cryptoCurrencies = getConfiguredCoins( data?.config || {}, - data?.cryptoCurrencies || [] + data?.cryptoCurrencies || [], ) const onChangeCoin = (prev, curr, setValue) => setValue(curr) @@ -83,7 +83,7 @@ function Locales({ isActive, doContinue }) { data={[]} elements={mainFields( R.mergeRight(data, { cryptoCurrencies }), - onChangeCoin + onChangeCoin, )} /> diff --git a/packages/admin-ui/src/pages/Wizard/components/Mailgun.jsx b/packages/admin-ui/src/pages/Wizard/components/Mailgun.jsx index b467a12b..6d9b8cc2 100644 --- a/packages/admin-ui/src/pages/Wizard/components/Mailgun.jsx +++ b/packages/admin-ui/src/pages/Wizard/components/Mailgun.jsx @@ -1,4 +1,4 @@ -import { useMutation, useQuery, gql } from "@apollo/client"; +import { useMutation, useQuery, gql } from '@apollo/client' import React, { useState, useEffect } from 'react' import { H4, Info3 } from 'src/components/typography' import FormRenderer from 'src/pages/Services/FormRenderer' @@ -33,12 +33,12 @@ const SAVE_ACCOUNTS = gql` const options = [ { code: 'enabled', - display: 'Yes, send notifications to my email' + display: 'Yes, send notifications to my email', }, { code: 'disabled', - display: "No, don't send email notifications" - } + display: "No, don't send email notifications", + }, ] const Mailgun = () => { @@ -111,7 +111,9 @@ const Mailgun = () => { value={accounts.mailgun} save={saveAccount} elements={mailgunSchema.elements} - validationSchema={mailgunSchema.getValidationSchema(accounts.mailgun)} + validationSchema={mailgunSchema.getValidationSchema( + accounts.mailgun, + )} buttonLabel={'Save'} /> diff --git a/packages/admin-ui/src/pages/Wizard/components/Notifications.jsx b/packages/admin-ui/src/pages/Wizard/components/Notifications.jsx index b547f0ca..1c459693 100644 --- a/packages/admin-ui/src/pages/Wizard/components/Notifications.jsx +++ b/packages/admin-ui/src/pages/Wizard/components/Notifications.jsx @@ -19,7 +19,7 @@ const pages = [ SETUP_CHANNELS, TRANSACTION_ALERTS, FIAT_BALANCE_ALERTS, - CRYPTO_BALANCE_ALERTS + CRYPTO_BALANCE_ALERTS, ] const N = () => { diff --git a/packages/admin-ui/src/pages/Wizard/components/OperatorInfo.jsx b/packages/admin-ui/src/pages/Wizard/components/OperatorInfo.jsx index 127a27fd..0f09aeba 100644 --- a/packages/admin-ui/src/pages/Wizard/components/OperatorInfo.jsx +++ b/packages/admin-ui/src/pages/Wizard/components/OperatorInfo.jsx @@ -1,4 +1,5 @@ import React from 'react' + // import OperatorInfo from 'src/pages/OperatorInfo' function WizardOperatorInfo() { diff --git a/packages/admin-ui/src/pages/Wizard/components/Twilio.jsx b/packages/admin-ui/src/pages/Wizard/components/Twilio.jsx index 0b00f2b4..fa4bb382 100644 --- a/packages/admin-ui/src/pages/Wizard/components/Twilio.jsx +++ b/packages/admin-ui/src/pages/Wizard/components/Twilio.jsx @@ -29,12 +29,12 @@ const SAVE_ACCOUNTS = gql` const options = [ { code: 'enable', - display: 'Yes, I will' + display: 'Yes, I will', }, { code: 'disable', - display: 'No, not for now' - } + display: 'No, not for now', + }, ] function Twilio({ doContinue }) { @@ -43,7 +43,7 @@ function Twilio({ doContinue }) { const { data, refetch } = useQuery(GET_CONFIG) const [saveAccounts] = useMutation(SAVE_ACCOUNTS, { - onCompleted: doContinue + onCompleted: doContinue, }) const accounts = data?.accounts ?? [] @@ -65,7 +65,7 @@ function Twilio({ doContinue }) { const titleClasses = { 'ml-2 mb-2': true, - [sharedClasses.error]: error + [sharedClasses.error]: error, } return ( diff --git a/packages/admin-ui/src/pages/Wizard/components/Twilio.module.css b/packages/admin-ui/src/pages/Wizard/components/Twilio.module.css index 30bd9e37..3654ca3b 100644 --- a/packages/admin-ui/src/pages/Wizard/components/Twilio.module.css +++ b/packages/admin-ui/src/pages/Wizard/components/Twilio.module.css @@ -21,4 +21,4 @@ .info { margin-top: 20px; margin-bottom: 20px; -} \ No newline at end of file +} diff --git a/packages/admin-ui/src/pages/Wizard/components/Wallet/AllSet.jsx b/packages/admin-ui/src/pages/Wizard/components/Wallet/AllSet.jsx index f2c59217..8f7a02ac 100644 --- a/packages/admin-ui/src/pages/Wizard/components/Wallet/AllSet.jsx +++ b/packages/admin-ui/src/pages/Wizard/components/Wallet/AllSet.jsx @@ -1,4 +1,4 @@ -import { useQuery, useMutation, gql } from "@apollo/client"; +import { useQuery, useMutation, gql } from '@apollo/client' import * as R from 'ramda' import React, { useState } from 'react' import { P, H4 } from 'src/components/typography' @@ -9,6 +9,7 @@ import { NamespacedTable as EditableTable } from 'src/components/editableTable' import { toNamespace, namespaces } from 'src/utils/config' import classes from './Shared.module.css' + const GET_INFO = gql` query getData { config @@ -36,7 +37,7 @@ const SAVE_CONFIG = gql` const AllSet = ({ data: currentData, doContinue }) => { const { data } = useQuery(GET_INFO) const [saveConfig] = useMutation(SAVE_CONFIG, { - onCompleted: doContinue + onCompleted: doContinue, }) const [error, setError] = useState(false) @@ -49,7 +50,7 @@ const AllSet = ({ data: currentData, doContinue }) => { const save = () => { const adjustedData = { zeroConfLimit: 0, - ...currentData + ...currentData, } if (!WalletSchema.isValidSync(adjustedData)) return setError(true) @@ -61,16 +62,16 @@ const AllSet = ({ data: currentData, doContinue }) => { const presentableData = R.pipe( R.omit(['coin', 'zeroConf', 'zeroConfLimit']), - toNamespace(coin) + toNamespace(coin), )(currentData) const presentableElements = R.filter( R.pipe( R.prop('name'), R.flip(R.includes)(['zeroConf', 'zeroConfLimit']), - R.not() + R.not(), ), - getElements(cryptoCurrencies, accountsConfig, null, true) + getElements(cryptoCurrencies, accountsConfig, null, true), ) return ( diff --git a/packages/admin-ui/src/pages/Wizard/components/Wallet/Blockcypher.jsx b/packages/admin-ui/src/pages/Wizard/components/Wallet/Blockcypher.jsx index 3cf99128..72e9238f 100644 --- a/packages/admin-ui/src/pages/Wizard/components/Wallet/Blockcypher.jsx +++ b/packages/admin-ui/src/pages/Wizard/components/Wallet/Blockcypher.jsx @@ -1,4 +1,4 @@ -import { useMutation, useQuery, gql } from "@apollo/client"; +import { useMutation, useQuery, gql } from '@apollo/client' import React, { useState } from 'react' import { P, H4 } from 'src/components/typography' import FormRenderer from 'src/pages/Services/FormRenderer' @@ -23,18 +23,18 @@ const SAVE_ACCOUNTS = gql` const options = [ { code: 'enable', - display: 'I will enable cash-out' + display: 'I will enable cash-out', }, { code: 'disable', - display: "I won't enable cash-out" - } + display: "I won't enable cash-out", + }, ] const Blockcypher = ({ addData }) => { const { data } = useQuery(GET_CONFIG) const [saveConfig] = useMutation(SAVE_ACCOUNTS, { - onCompleted: () => addData({ zeroConf: 'blockcypher' }) + onCompleted: () => addData({ zeroConf: 'blockcypher' }), }) const [selected, setSelected] = useState(null) diff --git a/packages/admin-ui/src/pages/Wizard/components/Wallet/ChooseCoin.jsx b/packages/admin-ui/src/pages/Wizard/components/Wallet/ChooseCoin.jsx index adeb32b4..3e4b4e1b 100644 --- a/packages/admin-ui/src/pages/Wizard/components/Wallet/ChooseCoin.jsx +++ b/packages/admin-ui/src/pages/Wizard/components/Wallet/ChooseCoin.jsx @@ -1,4 +1,4 @@ -import { useQuery, gql } from "@apollo/client"; +import { useQuery, gql } from '@apollo/client' import { Formik, Form, Field } from 'formik' import React, { useState } from 'react' import PromptWhenDirty from 'src/components/PromptWhenDirty' @@ -20,7 +20,7 @@ const GET_CONFIG = gql` ` const schema = Yup.object().shape({ - coin: Yup.string().required() + coin: Yup.string().required(), }) const ChooseCoin = ({ addData }) => { diff --git a/packages/admin-ui/src/pages/Wizard/components/Wallet/ChooseExchange.jsx b/packages/admin-ui/src/pages/Wizard/components/Wallet/ChooseExchange.jsx index 4a5df8d9..ce1d845c 100644 --- a/packages/admin-ui/src/pages/Wizard/components/Wallet/ChooseExchange.jsx +++ b/packages/admin-ui/src/pages/Wizard/components/Wallet/ChooseExchange.jsx @@ -1,4 +1,4 @@ -import { useQuery, useMutation, gql } from "@apollo/client"; +import { useQuery, useMutation, gql } from '@apollo/client' import { getEquivalentCode } from '@lamassu/coins/lightUtils' import * as R from 'ramda' import React, { useState } from 'react' @@ -41,7 +41,7 @@ const isConfigurable = it => const ChooseExchange = ({ data: currentData, addData }) => { const { data } = useQuery(GET_CONFIG) const [saveAccounts] = useMutation(SAVE_ACCOUNTS, { - onCompleted: () => submit() + onCompleted: () => submit(), }) const [selected, setSelected] = useState(null) @@ -75,7 +75,7 @@ const ChooseExchange = ({ data: currentData, addData }) => { itbit: 'https://support.lamassu.is/hc/en-us/articles/360026195032-itBit-trading', bitstamp: - 'https://support.lamassu.is/hc/en-us/articles/115001206911-Bitstamp-trading' + 'https://support.lamassu.is/hc/en-us/articles/115001206911-Bitstamp-trading', } return ( @@ -113,7 +113,9 @@ const ChooseExchange = ({ data: currentData, addData }) => { value={accounts[selected]} save={saveExchange(selected)} elements={schema[selected].elements} - validationSchema={schema[selected].getValidationSchema(accounts[selected])} + validationSchema={schema[selected].getValidationSchema( + accounts[selected], + )} buttonLabel={'Continue'} buttonClass={classes.formButton} /> diff --git a/packages/admin-ui/src/pages/Wizard/components/Wallet/ChooseTicker.jsx b/packages/admin-ui/src/pages/Wizard/components/Wallet/ChooseTicker.jsx index 23c73a23..76fc301d 100644 --- a/packages/admin-ui/src/pages/Wizard/components/Wallet/ChooseTicker.jsx +++ b/packages/admin-ui/src/pages/Wizard/components/Wallet/ChooseTicker.jsx @@ -1,4 +1,4 @@ -import { useQuery, gql } from "@apollo/client"; +import { useQuery, gql } from '@apollo/client' import { getEquivalentCode } from '@lamassu/coins/lightUtils' import * as R from 'ramda' import React, { useState } from 'react' diff --git a/packages/admin-ui/src/pages/Wizard/components/Wallet/ChooseWallet.jsx b/packages/admin-ui/src/pages/Wizard/components/Wallet/ChooseWallet.jsx index e898d4d4..691ede32 100644 --- a/packages/admin-ui/src/pages/Wizard/components/Wallet/ChooseWallet.jsx +++ b/packages/admin-ui/src/pages/Wizard/components/Wallet/ChooseWallet.jsx @@ -1,4 +1,4 @@ -import { useQuery, useMutation, gql } from "@apollo/client"; +import { useQuery, useMutation, gql } from '@apollo/client' import * as R from 'ramda' import React, { useState } from 'react' import { H4, Info3 } from 'src/components/typography' @@ -45,7 +45,7 @@ const isLocalHosted = it => 'litecoind', 'dashd', 'zcashd', - 'bitcoincashd' + 'bitcoincashd', ]) const ChooseWallet = ({ data: currentData, addData }) => { @@ -53,7 +53,7 @@ const ChooseWallet = ({ data: currentData, addData }) => { const schema = _schema() const { data } = useQuery(GET_CONFIG) const [saveAccounts] = useMutation(SAVE_ACCOUNTS, { - onCompleted: () => submit() + onCompleted: () => submit(), }) const [selected, setSelected] = useState(null) @@ -143,7 +143,7 @@ const ChooseWallet = ({ data: currentData, addData }) => { save={saveWallet(selected)} elements={schema.infura.elements} validationSchema={schema.infura.getValidationSchema( - accounts.infura + accounts.infura, )} buttonLabel={'Continue'} buttonClass={classes.formButton} @@ -158,7 +158,7 @@ const ChooseWallet = ({ data: currentData, addData }) => { save={saveWallet(selected)} elements={schema.trongrid.elements} validationSchema={schema.trongrid.getValidationSchema( - accounts.trongrid + accounts.trongrid, )} buttonLabel={'Continue'} buttonClass={classes.formButton} diff --git a/packages/admin-ui/src/pages/Wizard/components/Wallet/Shared.module.css b/packages/admin-ui/src/pages/Wizard/components/Wallet/Shared.module.css index c52d200d..7e03a9df 100644 --- a/packages/admin-ui/src/pages/Wizard/components/Wallet/Shared.module.css +++ b/packages/admin-ui/src/pages/Wizard/components/Wallet/Shared.module.css @@ -42,4 +42,4 @@ .formButton { margin: 24px 0 0; -} \ No newline at end of file +} diff --git a/packages/admin-ui/src/pages/Wizard/components/Wallet/Wallet.jsx b/packages/admin-ui/src/pages/Wizard/components/Wallet/Wallet.jsx index 0580b673..616cfbf7 100644 --- a/packages/admin-ui/src/pages/Wizard/components/Wallet/Wallet.jsx +++ b/packages/admin-ui/src/pages/Wizard/components/Wallet/Wallet.jsx @@ -13,28 +13,28 @@ import ChooseWallet from './ChooseWallet' const steps = [ { label: 'Choose cryptocurrency', - component: ChooseCoin + component: ChooseCoin, }, { label: 'Choose wallet', - component: ChooseWallet + component: ChooseWallet, }, { label: 'Choose ticker', - component: ChooseTicker + component: ChooseTicker, }, { label: 'Exchange', - component: ChooseExchange + component: ChooseExchange, }, { label: 'Blockcypher', - component: Blockcypher + component: Blockcypher, }, { label: 'All set', - component: AllSet - } + component: AllSet, + }, ] const Wallet = ({ doContinue }) => { diff --git a/packages/admin-ui/src/pages/Wizard/helper.jsx b/packages/admin-ui/src/pages/Wizard/helper.jsx index 47035521..6e1590b9 100644 --- a/packages/admin-ui/src/pages/Wizard/helper.jsx +++ b/packages/admin-ui/src/pages/Wizard/helper.jsx @@ -15,7 +15,7 @@ import Welcome from './components/Welcome' const getConfiguredCoins = (config, crypto) => { const wallet = fromNamespace(namespaces.WALLETS, config) return R.filter(it => - WalletSchema.isValidSync(fromNamespace(it.code, wallet)) + WalletSchema.isValidSync(fromNamespace(it.code, wallet)), )(crypto) } @@ -25,7 +25,7 @@ const hasValidWallet = (config, crypto) => { const hasValidConfig = R.compose( R.any(R.identity), - R.map(it => WalletSchema.isValidSync(it)) + R.map(it => WalletSchema.isValidSync(it)), )(coins) return hasValidConfig @@ -60,7 +60,7 @@ const getWizardStep = (config, crypto) => { const STEPS = [ { id: 'welcome', - Component: Welcome + Component: Welcome, }, { id: 'wallet', @@ -69,7 +69,7 @@ const STEPS = [ subtitle: 'Wallet settings', text: `Your wallet settings are the first step for this wizard. We'll start by setting up one of cryptocurrencies to get you up and running, - but you can later set up as many as you want.` + but you can later set up as many as you want.`, }, { id: 'locale', @@ -78,7 +78,7 @@ const STEPS = [ subtitle: 'Locales', text: `From the Locales panel, you can define default settings that will be applied to all machines you add to your network later on. - These settings may be overridden for specific machines in the Overrides section.` + These settings may be overridden for specific machines in the Overrides section.`, }, { id: 'twilio', @@ -93,7 +93,7 @@ const STEPS = [ You'll need to configure Twilio if you're offering cash-out or any compliance options - ) + ), }, { id: 'commissions', @@ -105,8 +105,8 @@ const STEPS = [ you'll later add to your network. Default settings keep you from having to enter the same values everytime you add a new machine. Once a machine is added, you may override these values per machine and per - cryptocurrency in the overrides section.` - } + cryptocurrency in the overrides section.`, + }, // { // id: 'notifications', // Component: Notifications, diff --git a/packages/admin-ui/src/routing/lamassu.routes.jsx b/packages/admin-ui/src/routing/lamassu.routes.jsx index 81781d0b..70b5586e 100644 --- a/packages/admin-ui/src/routing/lamassu.routes.jsx +++ b/packages/admin-ui/src/routing/lamassu.routes.jsx @@ -37,7 +37,7 @@ const getLamassuRoutes = () => [ label: 'Transactions', route: '/transactions', allowedRoles: [ROLES.USER, ROLES.SUPERUSER], - component: Transactions + component: Transactions, }, { key: 'maintenance', @@ -53,44 +53,44 @@ const getLamassuRoutes = () => [ label: 'Cash units', route: '/maintenance/cash-units', allowedRoles: [ROLES.USER, ROLES.SUPERUSER], - component: CashUnits + component: CashUnits, }, { key: 'funding', label: 'Funding', route: '/maintenance/funding', allowedRoles: [ROLES.USER, ROLES.SUPERUSER], - component: Funding + component: Funding, }, { key: 'logs', label: 'Machine logs', route: '/maintenance/logs', allowedRoles: [ROLES.USER, ROLES.SUPERUSER], - component: MachineLogs + component: MachineLogs, }, { key: 'machine-status', label: 'Machine status', route: '/maintenance/machine-status', allowedRoles: [ROLES.USER, ROLES.SUPERUSER], - component: MachineStatus + component: MachineStatus, }, { key: 'server-logs', label: 'Server', route: '/maintenance/server-logs', allowedRoles: [ROLES.USER, ROLES.SUPERUSER], - component: ServerLogs - } - ] + component: ServerLogs, + }, + ], }, { key: 'analytics', label: 'Analytics', route: '/analytics', allowedRoles: [ROLES.USER, ROLES.SUPERUSER], - component: Analytics + component: Analytics, }, { key: 'settings', @@ -106,42 +106,42 @@ const getLamassuRoutes = () => [ label: 'Commissions', route: '/settings/commissions', allowedRoles: [ROLES.USER, ROLES.SUPERUSER], - component: Commissions + component: Commissions, }, { key: namespaces.LOCALE, label: 'Locales', route: '/settings/locale', allowedRoles: [ROLES.USER, ROLES.SUPERUSER], - component: Locales + component: Locales, }, { key: namespaces.CASH_OUT, label: 'Cash-out', route: '/settings/cash-out', allowedRoles: [ROLES.USER, ROLES.SUPERUSER], - component: Cashout + component: Cashout, }, { key: namespaces.NOTIFICATIONS, label: 'Notifications', route: '/settings/notifications', allowedRoles: [ROLES.USER, ROLES.SUPERUSER], - component: Notifications + component: Notifications, }, { key: 'services', label: 'Third-party services', route: '/settings/3rd-party-services', allowedRoles: [ROLES.USER, ROLES.SUPERUSER], - component: Services + component: Services, }, { key: namespaces.WALLETS, label: 'Wallet', route: '/settings/wallet-settings', allowedRoles: [ROLES.USER, ROLES.SUPERUSER], - component: WalletSettings + component: WalletSettings, }, { key: namespaces.OPERATOR_INFO, @@ -154,7 +154,7 @@ const getLamassuRoutes = () => [ ) @@ -165,46 +165,46 @@ const getLamassuRoutes = () => [ label: 'Contact information', route: '/settings/operator-info/contact-info', allowedRoles: [ROLES.USER, ROLES.SUPERUSER], - component: ContactInfo + component: ContactInfo, }, { key: 'receipt-printing', label: 'Receipt', route: '/settings/operator-info/receipt-printing', allowedRoles: [ROLES.USER, ROLES.SUPERUSER], - component: ReceiptPrinting + component: ReceiptPrinting, }, { key: 'sms-notices', label: 'SMS notices', route: '/settings/operator-info/sms-notices', allowedRoles: [ROLES.USER, ROLES.SUPERUSER], - component: SMSNotices + component: SMSNotices, }, { key: 'coin-atm-radar', label: 'Coin ATM Radar', route: '/settings/operator-info/coin-atm-radar', allowedRoles: [ROLES.USER, ROLES.SUPERUSER], - component: CoinAtmRadar + component: CoinAtmRadar, }, { key: 'terms-conditions', label: 'Terms & Conditions', route: '/settings/operator-info/terms-conditions', allowedRoles: [ROLES.USER, ROLES.SUPERUSER], - component: TermsConditions + component: TermsConditions, }, { key: 'machine-screens', label: 'Machine screens', route: '/settings/operator-info/machine-screens', allowedRoles: [ROLES.USER, ROLES.SUPERUSER], - component: MachineScreens - } - ] - } - ] + component: MachineScreens, + }, + ], + }, + ], }, { key: 'compliance', @@ -220,21 +220,21 @@ const getLamassuRoutes = () => [ label: 'Triggers', route: '/compliance/triggers', allowedRoles: [ROLES.USER, ROLES.SUPERUSER], - component: Triggers + component: Triggers, }, { key: 'customers', label: 'Customers', route: '/compliance/customers', allowedRoles: [ROLES.USER, ROLES.SUPERUSER], - component: Customers + component: Customers, }, { key: 'blacklist', label: 'Blacklist', route: '/compliance/blacklist', allowedRoles: [ROLES.USER, ROLES.SUPERUSER], - component: Blacklist + component: Blacklist, }, { key: 'loyalty', @@ -247,7 +247,7 @@ const getLamassuRoutes = () => [ ) @@ -258,24 +258,24 @@ const getLamassuRoutes = () => [ label: 'Individual discounts', route: '/compliance/loyalty/individual-discounts', allowedRoles: [ROLES.USER, ROLES.SUPERUSER], - component: IndividualDiscounts + component: IndividualDiscounts, }, { key: 'promo-codes', label: 'Promo codes', route: '/compliance/loyalty/codes', allowedRoles: [ROLES.USER, ROLES.SUPERUSER], - component: PromoCodes - } - ] + component: PromoCodes, + }, + ], }, { key: 'customer', route: '/compliance/customer/:id', allowedRoles: [ROLES.USER, ROLES.SUPERUSER], - component: CustomerProfile - } - ] + component: CustomerProfile, + }, + ], }, { key: 'system', @@ -291,17 +291,17 @@ const getLamassuRoutes = () => [ label: 'User management', route: '/system/user-management', allowedRoles: [ROLES.SUPERUSER], - component: UserManagement + component: UserManagement, }, { key: 'session-management', label: 'Session management', route: '/system/session-management', allowedRoles: [ROLES.SUPERUSER], - component: SessionManagement - } - ] - } + component: SessionManagement, + }, + ], + }, ] export default getLamassuRoutes diff --git a/packages/admin-ui/src/routing/routes.jsx b/packages/admin-ui/src/routing/routes.jsx index 8fd3c366..baa349e2 100644 --- a/packages/admin-ui/src/routing/routes.jsx +++ b/packages/admin-ui/src/routing/routes.jsx @@ -7,7 +7,7 @@ import { Redirect, Switch, useHistory, - useLocation + useLocation, } from 'react-router-dom' import Login from 'src/pages/Authentication/Login' import Register from 'src/pages/Authentication/Register' @@ -30,7 +30,7 @@ const tree = getLamassuRoutes() const map = R.map(R.when(R.has('children'), R.prop('children'))) const mappedRoutes = R.compose(R.flatten, map)(tree) const parentRoutes = R.filter(R.has('children'))(mappedRoutes).concat( - R.filter(R.has('children'))(tree) + R.filter(R.has('children'))(tree), ) const leafRoutes = R.compose(R.flatten, map)(mappedRoutes) @@ -41,8 +41,8 @@ const hasSidebar = route => R.compose( R.flatten, R.map(R.prop('children')), - R.filter(R.has('children')) - )(mappedRoutes) + R.filter(R.has('children')), + )(mappedRoutes), ) const getParent = route => @@ -51,9 +51,9 @@ const getParent = route => 'route', R.dropLast( 1, - R.dropLastWhile(x => x !== '/', route) - ) - ) + R.dropLastWhile(x => x !== '/', route), + ), + ), )(flattened) const Routes = () => { @@ -68,7 +68,7 @@ const Routes = () => { '/login', '/register', '/resetpassword', - '/reset2fa' + '/reset2fa', ] if (!wizardTested && !R.contains(location.pathname)(dontTriggerPages)) { @@ -94,7 +94,7 @@ const Routes = () => { R.findIndex(R.propEq('route', location.state.prev))(leafRoutes) > R.findIndex(R.propEq('route', location.pathname))(leafRoutes) ? 'right' - : 'left' + : 'left', } : { timeout: 400 } diff --git a/packages/admin-ui/src/routing/utils.js b/packages/admin-ui/src/routing/utils.js index 6222bfe4..39cbfbf0 100644 --- a/packages/admin-ui/src/routing/utils.js +++ b/packages/admin-ui/src/routing/utils.js @@ -7,5 +7,5 @@ export const isLoggedIn = userData => export const ROLES = { USER: 'user', - SUPERUSER: 'superuser' + SUPERUSER: 'superuser', } diff --git a/packages/admin-ui/src/styling/global/fonts.css b/packages/admin-ui/src/styling/global/fonts.css index e5623b10..cb63e217 100644 --- a/packages/admin-ui/src/styling/global/fonts.css +++ b/packages/admin-ui/src/styling/global/fonts.css @@ -26,14 +26,18 @@ font-family: 'Mont'; font-weight: 900; font-style: normal; - src: url('/fonts/MontHeavy/mont-heavy-webfont.woff2') format('woff2'), url('/fonts/MontHeavy/mont-heavy-webfont.woff') format('woff'); + src: + url('/fonts/MontHeavy/mont-heavy-webfont.woff2') format('woff2'), + url('/fonts/MontHeavy/mont-heavy-webfont.woff') format('woff'); } @font-face { font-family: 'Mont'; font-weight: 700; font-style: normal; - src: url('/fonts/MontHeavy/mont-bold-webfont.woff2') format('woff2'), url('/fonts/MontHeavy/mont-bold-webfont.woff') format('woff'); + src: + url('/fonts/MontHeavy/mont-bold-webfont.woff2') format('woff2'), + url('/fonts/MontHeavy/mont-bold-webfont.woff') format('woff'); } /*! @@ -63,14 +67,18 @@ font-family: 'MuseoSans'; font-weight: 500; font-style: normal; - src: url("/fonts/MuseoSans/MuseoSans_500-webfont.woff2") format("woff2"), url("/fonts/MuseoSans/MuseoSans_500-webfont.woff") format("woff"); + src: + url('/fonts/MuseoSans/MuseoSans_500-webfont.woff2') format('woff2'), + url('/fonts/MuseoSans/MuseoSans_500-webfont.woff') format('woff'); } @font-face { font-family: 'MuseoSans'; font-weight: 700; font-style: normal; - src: url("/fonts/MuseoSans/MuseoSans_700-webfont.woff2") format("woff2"), url("/fonts/MuseoSans/MuseoSans_700-webfont.woff") format("woff"); + src: + url('/fonts/MuseoSans/MuseoSans_700-webfont.woff2') format('woff2'), + url('/fonts/MuseoSans/MuseoSans_700-webfont.woff') format('woff'); } /* BP-mono Freely distributed at http://backpacker.gr/fonts/5 */ @@ -78,5 +86,5 @@ font-family: 'BPmono'; font-weight: 500; font-style: normal; - src: url("/fonts/BPmono/BPmono.ttf") format("truetype"), -} \ No newline at end of file + src: url('/fonts/BPmono/BPmono.ttf') format('truetype'); +} diff --git a/packages/admin-ui/src/styling/global/global.css b/packages/admin-ui/src/styling/global/global.css index bd8f92da..3b65166d 100644 --- a/packages/admin-ui/src/styling/global/global.css +++ b/packages/admin-ui/src/styling/global/global.css @@ -1,9 +1,9 @@ -@import "./fonts.css"; +@import './fonts.css'; /* TODO remove important */ @layer theme, base, mui, components, utilities; -@import "tailwindcss/theme.css" layer(theme); -@import "tailwindcss/utilities.css" layer(utilities) important; +@import 'tailwindcss/theme.css' layer(theme); +@import 'tailwindcss/utilities.css' layer(utilities) important; :root { --zodiac: #1b2559; @@ -12,7 +12,6 @@ --spring3: #ecfbef; --spring4: #3fd07e; - --comet: #5f668a; --comet2: #72799d; --comet3: #525772; @@ -27,7 +26,7 @@ --java: #16d6d3; --neon: #5a67ff; - --malachite: #00CD5A; + --malachite: #00cd5a; --orange-yellow: #ffcc00; --mont: 'Mont'; @@ -110,14 +109,14 @@ html { } a::-moz-focus-inner, -input[type="submit"]::-moz-focus-inner, -input[type="button"]::-moz-focus-inner { +input[type='submit']::-moz-focus-inner, +input[type='button']::-moz-focus-inner { border: 0; } a::-moz-focus-inner, -input[type="submit"]::-moz-focus-inner, -input[type="button"]::-moz-focus-inner { +input[type='submit']::-moz-focus-inner, +input[type='button']::-moz-focus-inner { border: 0; } diff --git a/packages/admin-ui/src/styling/helpers.js b/packages/admin-ui/src/styling/helpers.js index 0854a253..8934e1d5 100644 --- a/packages/admin-ui/src/styling/helpers.js +++ b/packages/admin-ui/src/styling/helpers.js @@ -2,7 +2,7 @@ import { inputFontSize, inputFontSizeLg, inputFontSizeSm, - inputFontWeightBold + inputFontWeightBold, } from './variables' const respondTo = breakpoint => @@ -20,7 +20,7 @@ const bySize = size => { } const bold = { - fontWeight: inputFontWeightBold + fontWeight: inputFontWeightBold, } export { respondTo, bySize, bold } diff --git a/packages/admin-ui/src/styling/icons/ID/card/comet.svg b/packages/admin-ui/src/styling/icons/ID/card/comet.svg index 0163f2cb..dc06e354 100644 --- a/packages/admin-ui/src/styling/icons/ID/card/comet.svg +++ b/packages/admin-ui/src/styling/icons/ID/card/comet.svg @@ -1,10 +1,14 @@ - + icon/ID/card/new/comet - + - - + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/ID/card/tomato.svg b/packages/admin-ui/src/styling/icons/ID/card/tomato.svg index a3effa2d..af75dc22 100644 --- a/packages/admin-ui/src/styling/icons/ID/card/tomato.svg +++ b/packages/admin-ui/src/styling/icons/ID/card/tomato.svg @@ -1,10 +1,14 @@ - + icon/ID/card/new/tomato - + - - + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/ID/card/white.svg b/packages/admin-ui/src/styling/icons/ID/card/white.svg index 3448f195..dca48378 100644 --- a/packages/admin-ui/src/styling/icons/ID/card/white.svg +++ b/packages/admin-ui/src/styling/icons/ID/card/white.svg @@ -1,10 +1,14 @@ - + icon/ID/card/new/white - + - - + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/ID/card/zodiac.svg b/packages/admin-ui/src/styling/icons/ID/card/zodiac.svg index 14a0fc39..b22569b3 100644 --- a/packages/admin-ui/src/styling/icons/ID/card/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/ID/card/zodiac.svg @@ -1,7 +1,9 @@ - + icon/ID/card/new/zodiac - + diff --git a/packages/admin-ui/src/styling/icons/ID/phone/comet.svg b/packages/admin-ui/src/styling/icons/ID/phone/comet.svg index ea786af7..1748dc14 100644 --- a/packages/admin-ui/src/styling/icons/ID/phone/comet.svg +++ b/packages/admin-ui/src/styling/icons/ID/phone/comet.svg @@ -1,7 +1,10 @@ - + icon/ID/phone/new/comet - - + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/ID/phone/tomato.svg b/packages/admin-ui/src/styling/icons/ID/phone/tomato.svg index ac4320cc..ad479f62 100644 --- a/packages/admin-ui/src/styling/icons/ID/phone/tomato.svg +++ b/packages/admin-ui/src/styling/icons/ID/phone/tomato.svg @@ -1,7 +1,10 @@ - + icon/ID/phone/new/tomato - - + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/ID/phone/white.svg b/packages/admin-ui/src/styling/icons/ID/phone/white.svg index 6485d8b9..8a8a9e16 100644 --- a/packages/admin-ui/src/styling/icons/ID/phone/white.svg +++ b/packages/admin-ui/src/styling/icons/ID/phone/white.svg @@ -1,7 +1,10 @@ - + icon/ID/phone/new/white - - + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/ID/phone/zodiac.svg b/packages/admin-ui/src/styling/icons/ID/phone/zodiac.svg index 6454e804..f0586e26 100644 --- a/packages/admin-ui/src/styling/icons/ID/phone/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/ID/phone/zodiac.svg @@ -1,7 +1,10 @@ - + icon/ID/phone/new/zodiac - - + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/ID/photo/comet.svg b/packages/admin-ui/src/styling/icons/ID/photo/comet.svg index ddeb1e5a..8d120e99 100644 --- a/packages/admin-ui/src/styling/icons/ID/photo/comet.svg +++ b/packages/admin-ui/src/styling/icons/ID/photo/comet.svg @@ -1,7 +1,10 @@ - + icon/ID/photo/new/comet - - + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/ID/photo/crossed-camera.svg b/packages/admin-ui/src/styling/icons/ID/photo/crossed-camera.svg index 38a5e2e4..625733ea 100644 --- a/packages/admin-ui/src/styling/icons/ID/photo/crossed-camera.svg +++ b/packages/admin-ui/src/styling/icons/ID/photo/crossed-camera.svg @@ -1,14 +1,17 @@ - + Created with Sketch. - + - + diff --git a/packages/admin-ui/src/styling/icons/ID/photo/tomato.svg b/packages/admin-ui/src/styling/icons/ID/photo/tomato.svg index 77b2e366..fce78c6e 100644 --- a/packages/admin-ui/src/styling/icons/ID/photo/tomato.svg +++ b/packages/admin-ui/src/styling/icons/ID/photo/tomato.svg @@ -1,7 +1,10 @@ - + icon/ID/photo/new/tomato - - + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/ID/photo/white.svg b/packages/admin-ui/src/styling/icons/ID/photo/white.svg index 1c541cc7..29e4b507 100644 --- a/packages/admin-ui/src/styling/icons/ID/photo/white.svg +++ b/packages/admin-ui/src/styling/icons/ID/photo/white.svg @@ -1,7 +1,10 @@ - + icon/ID/photo/new/white - - + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/ID/photo/zodiac.svg b/packages/admin-ui/src/styling/icons/ID/photo/zodiac.svg index b02095e1..7ab1193c 100644 --- a/packages/admin-ui/src/styling/icons/ID/photo/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/ID/photo/zodiac.svg @@ -1,7 +1,10 @@ - + icon/ID/photo/new/zodiac - - + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/action/arrow/comet.svg b/packages/admin-ui/src/styling/icons/action/arrow/comet.svg index 1f46001f..500eff33 100644 --- a/packages/admin-ui/src/styling/icons/action/arrow/comet.svg +++ b/packages/admin-ui/src/styling/icons/action/arrow/comet.svg @@ -1,9 +1,11 @@ - + Created with Sketch. - + diff --git a/packages/admin-ui/src/styling/icons/action/arrow/regular.svg b/packages/admin-ui/src/styling/icons/action/arrow/regular.svg index 66bcf2f4..f3919756 100644 --- a/packages/admin-ui/src/styling/icons/action/arrow/regular.svg +++ b/packages/admin-ui/src/styling/icons/action/arrow/regular.svg @@ -1,9 +1,11 @@ - + Created with Sketch. - + diff --git a/packages/admin-ui/src/styling/icons/action/arrow/white.svg b/packages/admin-ui/src/styling/icons/action/arrow/white.svg index 430756e6..5f29c3cb 100644 --- a/packages/admin-ui/src/styling/icons/action/arrow/white.svg +++ b/packages/admin-ui/src/styling/icons/action/arrow/white.svg @@ -1,9 +1,11 @@ - + Created with Sketch. - + diff --git a/packages/admin-ui/src/styling/icons/action/arrow/zodiac.svg b/packages/admin-ui/src/styling/icons/action/arrow/zodiac.svg index 164bb129..e37328fe 100644 --- a/packages/admin-ui/src/styling/icons/action/arrow/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/action/arrow/zodiac.svg @@ -1,15 +1,16 @@ - - - - - - - - - + width="13" + height="8" + viewBox="0 0 13 8" + xmlns="http://www.w3.org/2000/svg"> + + + + + + + + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/action/close/comet.svg b/packages/admin-ui/src/styling/icons/action/close/comet.svg index 17e28139..e3590b84 100644 --- a/packages/admin-ui/src/styling/icons/action/close/comet.svg +++ b/packages/admin-ui/src/styling/icons/action/close/comet.svg @@ -1,9 +1,11 @@ - + Created with Sketch. - + diff --git a/packages/admin-ui/src/styling/icons/action/close/white.svg b/packages/admin-ui/src/styling/icons/action/close/white.svg index c0ef73c9..1443838f 100644 --- a/packages/admin-ui/src/styling/icons/action/close/white.svg +++ b/packages/admin-ui/src/styling/icons/action/close/white.svg @@ -1,9 +1,11 @@ - + Created with Sketch. - + diff --git a/packages/admin-ui/src/styling/icons/action/close/zodiac.svg b/packages/admin-ui/src/styling/icons/action/close/zodiac.svg index 9f3de3ae..30535870 100644 --- a/packages/admin-ui/src/styling/icons/action/close/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/action/close/zodiac.svg @@ -1,13 +1,14 @@ - + -Created with Sketch. - + Created with Sketch. + - + Created with Sketch. - - - + + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/action/copy/copy.svg b/packages/admin-ui/src/styling/icons/action/copy/copy.svg index 4f7cb694..382ae6b8 100644 --- a/packages/admin-ui/src/styling/icons/action/copy/copy.svg +++ b/packages/admin-ui/src/styling/icons/action/copy/copy.svg @@ -1,12 +1,15 @@ - + Created with Sketch. - - + + diff --git a/packages/admin-ui/src/styling/icons/action/copy/white.svg b/packages/admin-ui/src/styling/icons/action/copy/white.svg index 21ad5401..541e0d80 100644 --- a/packages/admin-ui/src/styling/icons/action/copy/white.svg +++ b/packages/admin-ui/src/styling/icons/action/copy/white.svg @@ -1,9 +1,13 @@ - + Created with Sketch. - - - + + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/action/copy/zodiac.svg b/packages/admin-ui/src/styling/icons/action/copy/zodiac.svg index 1e54058c..ca973f97 100644 --- a/packages/admin-ui/src/styling/icons/action/copy/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/action/copy/zodiac.svg @@ -1,8 +1,10 @@ - + Created with Sketch. - + diff --git a/packages/admin-ui/src/styling/icons/action/delete/disabled.svg b/packages/admin-ui/src/styling/icons/action/delete/disabled.svg index 4aabb607..170a1ca6 100644 --- a/packages/admin-ui/src/styling/icons/action/delete/disabled.svg +++ b/packages/admin-ui/src/styling/icons/action/delete/disabled.svg @@ -1,29 +1,29 @@ - - - - - - - - - - - + width="22" + height="22" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink"> + + + + + + + + + + + + - \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/action/delete/enabled.svg b/packages/admin-ui/src/styling/icons/action/delete/enabled.svg index a3960659..46844490 100644 --- a/packages/admin-ui/src/styling/icons/action/delete/enabled.svg +++ b/packages/admin-ui/src/styling/icons/action/delete/enabled.svg @@ -1,12 +1,16 @@ - + Created with Sketch. - + - + - + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/action/delete/white.svg b/packages/admin-ui/src/styling/icons/action/delete/white.svg index 087327c2..108e9347 100644 --- a/packages/admin-ui/src/styling/icons/action/delete/white.svg +++ b/packages/admin-ui/src/styling/icons/action/delete/white.svg @@ -1,5 +1,6 @@ - + Created with Sketch. @@ -10,8 +11,10 @@ - - + + diff --git a/packages/admin-ui/src/styling/icons/action/edit/comet.svg b/packages/admin-ui/src/styling/icons/action/edit/comet.svg index 10c785d1..e1bc5672 100644 --- a/packages/admin-ui/src/styling/icons/action/edit/comet.svg +++ b/packages/admin-ui/src/styling/icons/action/edit/comet.svg @@ -1,8 +1,11 @@ - + Created with Sketch. - - + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/action/edit/disabled.svg b/packages/admin-ui/src/styling/icons/action/edit/disabled.svg index 76b31834..a17fba71 100644 --- a/packages/admin-ui/src/styling/icons/action/edit/disabled.svg +++ b/packages/admin-ui/src/styling/icons/action/edit/disabled.svg @@ -1,9 +1,12 @@ - + Created with Sketch. - - + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/action/edit/enabled.svg b/packages/admin-ui/src/styling/icons/action/edit/enabled.svg index deea0765..19152575 100644 --- a/packages/admin-ui/src/styling/icons/action/edit/enabled.svg +++ b/packages/admin-ui/src/styling/icons/action/edit/enabled.svg @@ -1,9 +1,12 @@ - + Created with Sketch. - - + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/action/edit/white.svg b/packages/admin-ui/src/styling/icons/action/edit/white.svg index 1464e3dc..bb82ec6f 100644 --- a/packages/admin-ui/src/styling/icons/action/edit/white.svg +++ b/packages/admin-ui/src/styling/icons/action/edit/white.svg @@ -1,9 +1,12 @@ - + Created with Sketch. - - + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/action/expand/closed.svg b/packages/admin-ui/src/styling/icons/action/expand/closed.svg index 4b515464..26e2cfe3 100644 --- a/packages/admin-ui/src/styling/icons/action/expand/closed.svg +++ b/packages/admin-ui/src/styling/icons/action/expand/closed.svg @@ -1,5 +1,6 @@ - + Created with Sketch. diff --git a/packages/admin-ui/src/styling/icons/action/expand/open.svg b/packages/admin-ui/src/styling/icons/action/expand/open.svg index 2c324b69..053a7b07 100644 --- a/packages/admin-ui/src/styling/icons/action/expand/open.svg +++ b/packages/admin-ui/src/styling/icons/action/expand/open.svg @@ -1,9 +1,11 @@ - + Created with Sketch. - + diff --git a/packages/admin-ui/src/styling/icons/action/external link/white.svg b/packages/admin-ui/src/styling/icons/action/external link/white.svg index 4f03b0dc..348b54f0 100644 --- a/packages/admin-ui/src/styling/icons/action/external link/white.svg +++ b/packages/admin-ui/src/styling/icons/action/external link/white.svg @@ -1,9 +1,12 @@ - + Created with Sketch. - - + + diff --git a/packages/admin-ui/src/styling/icons/action/external link/zodiac.svg b/packages/admin-ui/src/styling/icons/action/external link/zodiac.svg index abc9beb5..7a9ff1cb 100644 --- a/packages/admin-ui/src/styling/icons/action/external link/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/action/external link/zodiac.svg @@ -1,8 +1,10 @@ - + Created with Sketch. - + diff --git a/packages/admin-ui/src/styling/icons/action/help/white.svg b/packages/admin-ui/src/styling/icons/action/help/white.svg index 80960209..58ee0a08 100644 --- a/packages/admin-ui/src/styling/icons/action/help/white.svg +++ b/packages/admin-ui/src/styling/icons/action/help/white.svg @@ -1,10 +1,14 @@ - + Created with Sketch. - - - + + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/action/help/zodiac.svg b/packages/admin-ui/src/styling/icons/action/help/zodiac.svg index 4ad70c8d..3a776167 100644 --- a/packages/admin-ui/src/styling/icons/action/help/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/action/help/zodiac.svg @@ -1,10 +1,14 @@ - + Created with Sketch. - - - + + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/action/wrench/zodiac.svg b/packages/admin-ui/src/styling/icons/action/wrench/zodiac.svg index 0cf3417a..57be21d9 100644 --- a/packages/admin-ui/src/styling/icons/action/wrench/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/action/wrench/zodiac.svg @@ -1,10 +1,13 @@ - - + + - + diff --git a/packages/admin-ui/src/styling/icons/arrow/carousel-left-arrow.svg b/packages/admin-ui/src/styling/icons/arrow/carousel-left-arrow.svg index e6518d3f..9a6eb387 100644 --- a/packages/admin-ui/src/styling/icons/arrow/carousel-left-arrow.svg +++ b/packages/admin-ui/src/styling/icons/arrow/carousel-left-arrow.svg @@ -1,6 +1,8 @@ - + - + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/arrow/carousel-right-arrow.svg b/packages/admin-ui/src/styling/icons/arrow/carousel-right-arrow.svg index 3f812933..42e09bf2 100644 --- a/packages/admin-ui/src/styling/icons/arrow/carousel-right-arrow.svg +++ b/packages/admin-ui/src/styling/icons/arrow/carousel-right-arrow.svg @@ -1,5 +1,6 @@ - + diff --git a/packages/admin-ui/src/styling/icons/arrow/download_logs.svg b/packages/admin-ui/src/styling/icons/arrow/download_logs.svg index 19eaf13d..f4a8ed4d 100644 --- a/packages/admin-ui/src/styling/icons/arrow/download_logs.svg +++ b/packages/admin-ui/src/styling/icons/arrow/download_logs.svg @@ -1,11 +1,15 @@ - + arrow download logs Created with Sketch. - - - + + + diff --git a/packages/admin-ui/src/styling/icons/arrow/month_change.svg b/packages/admin-ui/src/styling/icons/arrow/month_change.svg index 92a7e526..29b02986 100644 --- a/packages/admin-ui/src/styling/icons/arrow/month_change.svg +++ b/packages/admin-ui/src/styling/icons/arrow/month_change.svg @@ -1,15 +1,19 @@ - + Created with Sketch. - + - - + + diff --git a/packages/admin-ui/src/styling/icons/arrow/month_change_right.svg b/packages/admin-ui/src/styling/icons/arrow/month_change_right.svg index 465955d9..7217a0e3 100644 --- a/packages/admin-ui/src/styling/icons/arrow/month_change_right.svg +++ b/packages/admin-ui/src/styling/icons/arrow/month_change_right.svg @@ -1,15 +1,19 @@ - + Created with Sketch. - + - - + + diff --git a/packages/admin-ui/src/styling/icons/arrow/transaction.svg b/packages/admin-ui/src/styling/icons/arrow/transaction.svg index 84501d20..0348a1b8 100644 --- a/packages/admin-ui/src/styling/icons/arrow/transaction.svg +++ b/packages/admin-ui/src/styling/icons/arrow/transaction.svg @@ -1,14 +1,18 @@ - - - + + + - + diff --git a/packages/admin-ui/src/styling/icons/button/add note/white.svg b/packages/admin-ui/src/styling/icons/button/add note/white.svg index 6c1c9ab2..05183ced 100644 --- a/packages/admin-ui/src/styling/icons/button/add note/white.svg +++ b/packages/admin-ui/src/styling/icons/button/add note/white.svg @@ -1,9 +1,11 @@ - + Created with Sketch. - + @@ -12,7 +14,8 @@ - + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/button/add note/zodiac.svg b/packages/admin-ui/src/styling/icons/button/add note/zodiac.svg index 5bf3b738..ac7d3a07 100644 --- a/packages/admin-ui/src/styling/icons/button/add note/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/button/add note/zodiac.svg @@ -1,9 +1,11 @@ - + Created with Sketch. - + @@ -13,7 +15,8 @@ - + diff --git a/packages/admin-ui/src/styling/icons/button/add-note/white.svg b/packages/admin-ui/src/styling/icons/button/add-note/white.svg index 42862d8d..d180298a 100644 --- a/packages/admin-ui/src/styling/icons/button/add-note/white.svg +++ b/packages/admin-ui/src/styling/icons/button/add-note/white.svg @@ -1,17 +1,18 @@ - + - - - - - - - + + + + + + + diff --git a/packages/admin-ui/src/styling/icons/button/add-note/zodiac.svg b/packages/admin-ui/src/styling/icons/button/add-note/zodiac.svg index 92be9843..0eff2aad 100644 --- a/packages/admin-ui/src/styling/icons/button/add-note/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/button/add-note/zodiac.svg @@ -1,11 +1,14 @@ - + Created with Sketch. - - + + @@ -14,7 +17,8 @@ - + diff --git a/packages/admin-ui/src/styling/icons/button/add/white.svg b/packages/admin-ui/src/styling/icons/button/add/white.svg index efc8ebe5..64f33699 100644 --- a/packages/admin-ui/src/styling/icons/button/add/white.svg +++ b/packages/admin-ui/src/styling/icons/button/add/white.svg @@ -1,9 +1,12 @@ - + Created with Sketch. - - + + diff --git a/packages/admin-ui/src/styling/icons/button/add/zodiac.svg b/packages/admin-ui/src/styling/icons/button/add/zodiac.svg index 02cd42ad..eee13c17 100644 --- a/packages/admin-ui/src/styling/icons/button/add/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/button/add/zodiac.svg @@ -1,9 +1,12 @@ - + Created with Sketch. - - + + diff --git a/packages/admin-ui/src/styling/icons/button/authorize/white.svg b/packages/admin-ui/src/styling/icons/button/authorize/white.svg index 54a67625..13243cc4 100644 --- a/packages/admin-ui/src/styling/icons/button/authorize/white.svg +++ b/packages/admin-ui/src/styling/icons/button/authorize/white.svg @@ -4,6 +4,7 @@ Created with Sketch. - + diff --git a/packages/admin-ui/src/styling/icons/button/authorize/zodiac.svg b/packages/admin-ui/src/styling/icons/button/authorize/zodiac.svg index 805dd29d..c0f236a4 100644 --- a/packages/admin-ui/src/styling/icons/button/authorize/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/button/authorize/zodiac.svg @@ -6,6 +6,7 @@ - + diff --git a/packages/admin-ui/src/styling/icons/button/blacklist/white.svg b/packages/admin-ui/src/styling/icons/button/blacklist/white.svg index 2723fad2..2b060ce8 100644 --- a/packages/admin-ui/src/styling/icons/button/blacklist/white.svg +++ b/packages/admin-ui/src/styling/icons/button/blacklist/white.svg @@ -1,10 +1,12 @@ - + Created with Sketch. - + @@ -12,7 +14,8 @@ - + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/button/blacklist/zodiac.svg b/packages/admin-ui/src/styling/icons/button/blacklist/zodiac.svg index 83e5d63b..5f12bfa7 100644 --- a/packages/admin-ui/src/styling/icons/button/blacklist/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/button/blacklist/zodiac.svg @@ -1,10 +1,12 @@ - + Created with Sketch. - + @@ -13,7 +15,8 @@ - + diff --git a/packages/admin-ui/src/styling/icons/button/block/white.svg b/packages/admin-ui/src/styling/icons/button/block/white.svg index 71606bc4..d959fb3f 100644 --- a/packages/admin-ui/src/styling/icons/button/block/white.svg +++ b/packages/admin-ui/src/styling/icons/button/block/white.svg @@ -2,7 +2,8 @@ Created with Sketch. - + diff --git a/packages/admin-ui/src/styling/icons/button/block/zodiac.svg b/packages/admin-ui/src/styling/icons/button/block/zodiac.svg index 0d2abcb7..0c746ac2 100644 --- a/packages/admin-ui/src/styling/icons/button/block/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/button/block/zodiac.svg @@ -2,7 +2,8 @@ Created with Sketch. - + diff --git a/packages/admin-ui/src/styling/icons/button/cancel/white.svg b/packages/admin-ui/src/styling/icons/button/cancel/white.svg index 632b1027..2969bbd8 100644 --- a/packages/admin-ui/src/styling/icons/button/cancel/white.svg +++ b/packages/admin-ui/src/styling/icons/button/cancel/white.svg @@ -1,8 +1,10 @@ - + Created with Sketch. - + diff --git a/packages/admin-ui/src/styling/icons/button/cancel/zodiac.svg b/packages/admin-ui/src/styling/icons/button/cancel/zodiac.svg index 852f9dc3..4e03443a 100644 --- a/packages/admin-ui/src/styling/icons/button/cancel/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/button/cancel/zodiac.svg @@ -1,8 +1,10 @@ - + Created with Sketch. - + diff --git a/packages/admin-ui/src/styling/icons/button/configure/white.svg b/packages/admin-ui/src/styling/icons/button/configure/white.svg index dee9aff8..d3b1aa63 100644 --- a/packages/admin-ui/src/styling/icons/button/configure/white.svg +++ b/packages/admin-ui/src/styling/icons/button/configure/white.svg @@ -1,9 +1,13 @@ - + Created with Sketch. - - - + + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/button/configure/zodiac.svg b/packages/admin-ui/src/styling/icons/button/configure/zodiac.svg index 8e7462c7..617cad3d 100644 --- a/packages/admin-ui/src/styling/icons/button/configure/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/button/configure/zodiac.svg @@ -1,9 +1,13 @@ - + Created with Sketch. - - - + + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/button/data/white.svg b/packages/admin-ui/src/styling/icons/button/data/white.svg index 4e50be4f..3b2fb541 100644 --- a/packages/admin-ui/src/styling/icons/button/data/white.svg +++ b/packages/admin-ui/src/styling/icons/button/data/white.svg @@ -1,14 +1,18 @@ - + - - + + - + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/button/data/zodiac.svg b/packages/admin-ui/src/styling/icons/button/data/zodiac.svg index 66e0049c..e7c76b3c 100644 --- a/packages/admin-ui/src/styling/icons/button/data/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/button/data/zodiac.svg @@ -1,14 +1,18 @@ - + - - + + - + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/button/discount/comet.svg b/packages/admin-ui/src/styling/icons/button/discount/comet.svg index 4ad0de56..31e4114a 100644 --- a/packages/admin-ui/src/styling/icons/button/discount/comet.svg +++ b/packages/admin-ui/src/styling/icons/button/discount/comet.svg @@ -1,7 +1,10 @@ - + - - + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/button/discount/white.svg b/packages/admin-ui/src/styling/icons/button/discount/white.svg index 56d5d8ad..5e58402a 100644 --- a/packages/admin-ui/src/styling/icons/button/discount/white.svg +++ b/packages/admin-ui/src/styling/icons/button/discount/white.svg @@ -1,7 +1,10 @@ - + - - + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/button/discount/zodiac.svg b/packages/admin-ui/src/styling/icons/button/discount/zodiac.svg index 15d095d6..1295f4a9 100644 --- a/packages/admin-ui/src/styling/icons/button/discount/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/button/discount/zodiac.svg @@ -1,7 +1,10 @@ - + - - + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/button/download/white.svg b/packages/admin-ui/src/styling/icons/button/download/white.svg index 8ceed415..07ec7552 100644 --- a/packages/admin-ui/src/styling/icons/button/download/white.svg +++ b/packages/admin-ui/src/styling/icons/button/download/white.svg @@ -1,12 +1,15 @@ - + Created with Sketch. - + - + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/button/download/zodiac.svg b/packages/admin-ui/src/styling/icons/button/download/zodiac.svg index 40db4acd..02d68d43 100644 --- a/packages/admin-ui/src/styling/icons/button/download/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/button/download/zodiac.svg @@ -1,12 +1,15 @@ - + Created with Sketch. - + - + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/button/edit/white.svg b/packages/admin-ui/src/styling/icons/button/edit/white.svg index 717b213d..443c83de 100644 --- a/packages/admin-ui/src/styling/icons/button/edit/white.svg +++ b/packages/admin-ui/src/styling/icons/button/edit/white.svg @@ -1,9 +1,13 @@ - + Created with Sketch. - - - + + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/button/edit/zodiac.svg b/packages/admin-ui/src/styling/icons/button/edit/zodiac.svg index e112bb5a..378791ca 100644 --- a/packages/admin-ui/src/styling/icons/button/edit/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/button/edit/zodiac.svg @@ -1,9 +1,13 @@ - + Created with Sketch. - - - + + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/button/export to PDF/white.svg b/packages/admin-ui/src/styling/icons/button/export to PDF/white.svg index e32a1e35..c48bcb63 100644 --- a/packages/admin-ui/src/styling/icons/button/export to PDF/white.svg +++ b/packages/admin-ui/src/styling/icons/button/export to PDF/white.svg @@ -1,5 +1,6 @@ - + Created with Sketch. @@ -8,10 +9,13 @@ - - + + - + diff --git a/packages/admin-ui/src/styling/icons/button/export to PDF/zodiac.svg b/packages/admin-ui/src/styling/icons/button/export to PDF/zodiac.svg index bebece76..b6fe94af 100644 --- a/packages/admin-ui/src/styling/icons/button/export to PDF/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/button/export to PDF/zodiac.svg @@ -1,5 +1,6 @@ - + Created with Sketch. @@ -8,10 +9,13 @@ - - + + - + diff --git a/packages/admin-ui/src/styling/icons/button/export-pdf/white.svg b/packages/admin-ui/src/styling/icons/button/export-pdf/white.svg index 90fa4f2e..fa8d163e 100644 --- a/packages/admin-ui/src/styling/icons/button/export-pdf/white.svg +++ b/packages/admin-ui/src/styling/icons/button/export-pdf/white.svg @@ -1,10 +1,15 @@ - - - - - - - - + + + + + + + + diff --git a/packages/admin-ui/src/styling/icons/button/filter/white.svg b/packages/admin-ui/src/styling/icons/button/filter/white.svg index a3542fe9..960997a1 100644 --- a/packages/admin-ui/src/styling/icons/button/filter/white.svg +++ b/packages/admin-ui/src/styling/icons/button/filter/white.svg @@ -1,7 +1,9 @@ - + icon/button/filter/white - + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/button/filter/zodiac.svg b/packages/admin-ui/src/styling/icons/button/filter/zodiac.svg index 51cdefd6..af292f68 100644 --- a/packages/admin-ui/src/styling/icons/button/filter/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/button/filter/zodiac.svg @@ -1,7 +1,9 @@ - + icon/button/filter/zodiac - + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/button/ignore/white.svg b/packages/admin-ui/src/styling/icons/button/ignore/white.svg index 6e64b340..08c44091 100644 --- a/packages/admin-ui/src/styling/icons/button/ignore/white.svg +++ b/packages/admin-ui/src/styling/icons/button/ignore/white.svg @@ -1,5 +1,6 @@ - + Created with Sketch. diff --git a/packages/admin-ui/src/styling/icons/button/ignore/zodiac.svg b/packages/admin-ui/src/styling/icons/button/ignore/zodiac.svg index 7fb57a3e..74fb3a30 100644 --- a/packages/admin-ui/src/styling/icons/button/ignore/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/button/ignore/zodiac.svg @@ -1,5 +1,6 @@ - + Created with Sketch. diff --git a/packages/admin-ui/src/styling/icons/button/key/white.svg b/packages/admin-ui/src/styling/icons/button/key/white.svg index ec28f490..53114386 100644 --- a/packages/admin-ui/src/styling/icons/button/key/white.svg +++ b/packages/admin-ui/src/styling/icons/button/key/white.svg @@ -1,11 +1,14 @@ - + icon/button/key/white - - + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/button/key/zodiac.svg b/packages/admin-ui/src/styling/icons/button/key/zodiac.svg index cd9d1645..73b2c34f 100644 --- a/packages/admin-ui/src/styling/icons/button/key/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/button/key/zodiac.svg @@ -1,11 +1,14 @@ - + icon/button/key/zodiac - - + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/button/link/export.svg b/packages/admin-ui/src/styling/icons/button/link/export.svg index 2a46ca2f..6ac38d04 100644 --- a/packages/admin-ui/src/styling/icons/button/link/export.svg +++ b/packages/admin-ui/src/styling/icons/button/link/export.svg @@ -1,5 +1,6 @@ - + Created with Sketch. @@ -8,10 +9,13 @@ - - + + - + diff --git a/packages/admin-ui/src/styling/icons/button/link/white.svg b/packages/admin-ui/src/styling/icons/button/link/white.svg index decd7fc4..6e65cddf 100644 --- a/packages/admin-ui/src/styling/icons/button/link/white.svg +++ b/packages/admin-ui/src/styling/icons/button/link/white.svg @@ -1,8 +1,10 @@ - + Created with Sketch. - + diff --git a/packages/admin-ui/src/styling/icons/button/link/zodiac.svg b/packages/admin-ui/src/styling/icons/button/link/zodiac.svg index 20e48189..bf3bd27a 100644 --- a/packages/admin-ui/src/styling/icons/button/link/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/button/link/zodiac.svg @@ -1,8 +1,10 @@ - + Created with Sketch. - + diff --git a/packages/admin-ui/src/styling/icons/button/lock/white.svg b/packages/admin-ui/src/styling/icons/button/lock/white.svg index 53b5e362..db4395ec 100644 --- a/packages/admin-ui/src/styling/icons/button/lock/white.svg +++ b/packages/admin-ui/src/styling/icons/button/lock/white.svg @@ -1,10 +1,13 @@ - + icon/button/lock/white - - + + diff --git a/packages/admin-ui/src/styling/icons/button/lock/zodiac.svg b/packages/admin-ui/src/styling/icons/button/lock/zodiac.svg index fd064efc..a637c03b 100644 --- a/packages/admin-ui/src/styling/icons/button/lock/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/button/lock/zodiac.svg @@ -1,10 +1,13 @@ - + icon/button/lock/zodiac - - + + diff --git a/packages/admin-ui/src/styling/icons/button/photo/white-resized.svg b/packages/admin-ui/src/styling/icons/button/photo/white-resized.svg index fc199166..f25831cf 100644 --- a/packages/admin-ui/src/styling/icons/button/photo/white-resized.svg +++ b/packages/admin-ui/src/styling/icons/button/photo/white-resized.svg @@ -1,19 +1,29 @@ - + - - + + - + - + - - + + diff --git a/packages/admin-ui/src/styling/icons/button/photo/zodiac-resized.svg b/packages/admin-ui/src/styling/icons/button/photo/zodiac-resized.svg index 1065bc1f..a6137d47 100644 --- a/packages/admin-ui/src/styling/icons/button/photo/zodiac-resized.svg +++ b/packages/admin-ui/src/styling/icons/button/photo/zodiac-resized.svg @@ -1,18 +1,24 @@ - + - + - + - - + + diff --git a/packages/admin-ui/src/styling/icons/button/reboot/white.svg b/packages/admin-ui/src/styling/icons/button/reboot/white.svg index 0531c087..6158eba1 100644 --- a/packages/admin-ui/src/styling/icons/button/reboot/white.svg +++ b/packages/admin-ui/src/styling/icons/button/reboot/white.svg @@ -1,17 +1,24 @@ - + Created with Sketch. - + - - + + - - - + + + diff --git a/packages/admin-ui/src/styling/icons/button/reboot/zodiac.svg b/packages/admin-ui/src/styling/icons/button/reboot/zodiac.svg index 4e117986..13eec9cc 100644 --- a/packages/admin-ui/src/styling/icons/button/reboot/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/button/reboot/zodiac.svg @@ -1,17 +1,24 @@ - + Created with Sketch. - + - - + + - - - + + + diff --git a/packages/admin-ui/src/styling/icons/button/replace/white.svg b/packages/admin-ui/src/styling/icons/button/replace/white.svg index dd3d3f3c..961863ea 100644 --- a/packages/admin-ui/src/styling/icons/button/replace/white.svg +++ b/packages/admin-ui/src/styling/icons/button/replace/white.svg @@ -1,14 +1,20 @@ - - + + - + - - - + + + diff --git a/packages/admin-ui/src/styling/icons/button/replace/zodiac.svg b/packages/admin-ui/src/styling/icons/button/replace/zodiac.svg index 65d17fb1..f4cb3787 100644 --- a/packages/admin-ui/src/styling/icons/button/replace/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/button/replace/zodiac.svg @@ -1,14 +1,21 @@ - - + + - - + + - - - + + + diff --git a/packages/admin-ui/src/styling/icons/button/retry/white.svg b/packages/admin-ui/src/styling/icons/button/retry/white.svg index 9de65c2e..6d70c719 100644 --- a/packages/admin-ui/src/styling/icons/button/retry/white.svg +++ b/packages/admin-ui/src/styling/icons/button/retry/white.svg @@ -1,10 +1,13 @@ - + Created with Sketch. - + - + diff --git a/packages/admin-ui/src/styling/icons/button/retry/zodiac.svg b/packages/admin-ui/src/styling/icons/button/retry/zodiac.svg index 1aa858cc..0b87802e 100644 --- a/packages/admin-ui/src/styling/icons/button/retry/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/button/retry/zodiac.svg @@ -1,10 +1,13 @@ - + Created with Sketch. - + - + diff --git a/packages/admin-ui/src/styling/icons/button/schedule/white.svg b/packages/admin-ui/src/styling/icons/button/schedule/white.svg index de4cbc71..6abbf19e 100644 --- a/packages/admin-ui/src/styling/icons/button/schedule/white.svg +++ b/packages/admin-ui/src/styling/icons/button/schedule/white.svg @@ -1,9 +1,11 @@ - + Created with Sketch. - + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/button/schedule/zodiac.svg b/packages/admin-ui/src/styling/icons/button/schedule/zodiac.svg index ffb90c44..5f60117e 100644 --- a/packages/admin-ui/src/styling/icons/button/schedule/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/button/schedule/zodiac.svg @@ -1,9 +1,11 @@ - + Created with Sketch. - + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/button/shut down/white.svg b/packages/admin-ui/src/styling/icons/button/shut down/white.svg index d5b995de..3e5f74be 100644 --- a/packages/admin-ui/src/styling/icons/button/shut down/white.svg +++ b/packages/admin-ui/src/styling/icons/button/shut down/white.svg @@ -1,10 +1,13 @@ - + Created with Sketch. - + - + diff --git a/packages/admin-ui/src/styling/icons/button/shut down/zodiac.svg b/packages/admin-ui/src/styling/icons/button/shut down/zodiac.svg index b892ccdd..d049be65 100644 --- a/packages/admin-ui/src/styling/icons/button/shut down/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/button/shut down/zodiac.svg @@ -1,10 +1,13 @@ - + Created with Sketch. - + - + diff --git a/packages/admin-ui/src/styling/icons/button/stop-ignoring/white.svg b/packages/admin-ui/src/styling/icons/button/stop-ignoring/white.svg index 561392e8..8a37b9b3 100644 --- a/packages/admin-ui/src/styling/icons/button/stop-ignoring/white.svg +++ b/packages/admin-ui/src/styling/icons/button/stop-ignoring/white.svg @@ -1,8 +1,12 @@ - + Created with Sketch. - - + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/button/stop-ignoring/zodiac.svg b/packages/admin-ui/src/styling/icons/button/stop-ignoring/zodiac.svg index 11e609bc..0885ebeb 100644 --- a/packages/admin-ui/src/styling/icons/button/stop-ignoring/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/button/stop-ignoring/zodiac.svg @@ -1,8 +1,12 @@ - + Created with Sketch. - - + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/button/unpair/white.svg b/packages/admin-ui/src/styling/icons/button/unpair/white.svg index be65f2c8..4f886625 100644 --- a/packages/admin-ui/src/styling/icons/button/unpair/white.svg +++ b/packages/admin-ui/src/styling/icons/button/unpair/white.svg @@ -1,8 +1,10 @@ - + Created with Sketch. - + diff --git a/packages/admin-ui/src/styling/icons/button/unpair/zodiac.svg b/packages/admin-ui/src/styling/icons/button/unpair/zodiac.svg index 099464f0..63a48a3b 100644 --- a/packages/admin-ui/src/styling/icons/button/unpair/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/button/unpair/zodiac.svg @@ -1,8 +1,10 @@ - + Created with Sketch. - + diff --git a/packages/admin-ui/src/styling/icons/button/upload-file/white-resized.svg b/packages/admin-ui/src/styling/icons/button/upload-file/white-resized.svg index 63e43664..ff74e5b4 100644 --- a/packages/admin-ui/src/styling/icons/button/upload-file/white-resized.svg +++ b/packages/admin-ui/src/styling/icons/button/upload-file/white-resized.svg @@ -1,5 +1,6 @@ - + @@ -8,12 +9,16 @@ - - + + - - + + diff --git a/packages/admin-ui/src/styling/icons/button/upload-file/white.svg b/packages/admin-ui/src/styling/icons/button/upload-file/white.svg index c59dca65..500c8759 100644 --- a/packages/admin-ui/src/styling/icons/button/upload-file/white.svg +++ b/packages/admin-ui/src/styling/icons/button/upload-file/white.svg @@ -1,5 +1,6 @@ - + @@ -8,12 +9,14 @@ - + - + diff --git a/packages/admin-ui/src/styling/icons/button/upload-file/zodiac-resized.svg b/packages/admin-ui/src/styling/icons/button/upload-file/zodiac-resized.svg index 5d7e61f1..3460c2b6 100644 --- a/packages/admin-ui/src/styling/icons/button/upload-file/zodiac-resized.svg +++ b/packages/admin-ui/src/styling/icons/button/upload-file/zodiac-resized.svg @@ -1,5 +1,6 @@ - + @@ -8,12 +9,15 @@ - - + + - + diff --git a/packages/admin-ui/src/styling/icons/button/upload-file/zodiac.svg b/packages/admin-ui/src/styling/icons/button/upload-file/zodiac.svg index 26bab67b..16a0df2c 100644 --- a/packages/admin-ui/src/styling/icons/button/upload-file/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/button/upload-file/zodiac.svg @@ -1,5 +1,6 @@ - + @@ -8,12 +9,14 @@ - + - + diff --git a/packages/admin-ui/src/styling/icons/button/upload/white.svg b/packages/admin-ui/src/styling/icons/button/upload/white.svg index 9d24f44b..a3fda130 100644 --- a/packages/admin-ui/src/styling/icons/button/upload/white.svg +++ b/packages/admin-ui/src/styling/icons/button/upload/white.svg @@ -1,14 +1,18 @@ - + Created with Sketch. - + - + - + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/button/upload/zodiac.svg b/packages/admin-ui/src/styling/icons/button/upload/zodiac.svg index a4f0d8db..fe24d97e 100644 --- a/packages/admin-ui/src/styling/icons/button/upload/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/button/upload/zodiac.svg @@ -1,14 +1,18 @@ - + Created with Sketch. - + - + - + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/button/user-role/white.svg b/packages/admin-ui/src/styling/icons/button/user-role/white.svg index 13e5a9a5..59cf2a14 100644 --- a/packages/admin-ui/src/styling/icons/button/user-role/white.svg +++ b/packages/admin-ui/src/styling/icons/button/user-role/white.svg @@ -1,9 +1,12 @@ - + icon/button/user-role/white - + - + diff --git a/packages/admin-ui/src/styling/icons/button/user-role/zodiac.svg b/packages/admin-ui/src/styling/icons/button/user-role/zodiac.svg index 5a05f3a5..726f6d31 100644 --- a/packages/admin-ui/src/styling/icons/button/user-role/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/button/user-role/zodiac.svg @@ -1,9 +1,12 @@ - + icon/button/user-role/zodiac - + - + diff --git a/packages/admin-ui/src/styling/icons/button/whitelist/white.svg b/packages/admin-ui/src/styling/icons/button/whitelist/white.svg index d200d15c..fd494dfe 100644 --- a/packages/admin-ui/src/styling/icons/button/whitelist/white.svg +++ b/packages/admin-ui/src/styling/icons/button/whitelist/white.svg @@ -1,10 +1,13 @@ - + Created with Sketch. - - + + @@ -13,6 +16,7 @@ - + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/button/whitelist/zodiac.svg b/packages/admin-ui/src/styling/icons/button/whitelist/zodiac.svg index a0cdb412..1095e80d 100644 --- a/packages/admin-ui/src/styling/icons/button/whitelist/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/button/whitelist/zodiac.svg @@ -1,10 +1,13 @@ - + Created with Sketch. - - + + @@ -13,6 +16,7 @@ - + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/cassettes/acceptor-left-filled.svg b/packages/admin-ui/src/styling/icons/cassettes/acceptor-left-filled.svg index c2a9b20c..3ee73c04 100644 --- a/packages/admin-ui/src/styling/icons/cassettes/acceptor-left-filled.svg +++ b/packages/admin-ui/src/styling/icons/cassettes/acceptor-left-filled.svg @@ -1 +1,63 @@ -acceptor-left-filled \ No newline at end of file + + + + + acceptor-left-filled + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/cassettes/acceptor-left.svg b/packages/admin-ui/src/styling/icons/cassettes/acceptor-left.svg index 06519d18..e2cee8dc 100644 --- a/packages/admin-ui/src/styling/icons/cassettes/acceptor-left.svg +++ b/packages/admin-ui/src/styling/icons/cassettes/acceptor-left.svg @@ -1 +1,20 @@ -acceptor-left \ No newline at end of file + + + + + acceptor-left + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/cassettes/both-filled.svg b/packages/admin-ui/src/styling/icons/cassettes/both-filled.svg index 6104c6dd..f3dc501d 100644 --- a/packages/admin-ui/src/styling/icons/cassettes/both-filled.svg +++ b/packages/admin-ui/src/styling/icons/cassettes/both-filled.svg @@ -1 +1,89 @@ -both-filled \ No newline at end of file + + + + + both-filled + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/cassettes/cashbox-empty.svg b/packages/admin-ui/src/styling/icons/cassettes/cashbox-empty.svg index bbcec59a..a16fb500 100644 --- a/packages/admin-ui/src/styling/icons/cassettes/cashbox-empty.svg +++ b/packages/admin-ui/src/styling/icons/cassettes/cashbox-empty.svg @@ -1,12 +1,15 @@ - + 07E3DD15-D5E4-46A8-BF7B-064F598230CE - - + + diff --git a/packages/admin-ui/src/styling/icons/cassettes/cashout-cassette-1.svg b/packages/admin-ui/src/styling/icons/cassettes/cashout-cassette-1.svg index e0067b7c..2f750684 100644 --- a/packages/admin-ui/src/styling/icons/cassettes/cashout-cassette-1.svg +++ b/packages/admin-ui/src/styling/icons/cassettes/cashout-cassette-1.svg @@ -1 +1,25 @@ - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/cassettes/cashout-cassette-2.svg b/packages/admin-ui/src/styling/icons/cassettes/cashout-cassette-2.svg index d58ba026..2471d673 100644 --- a/packages/admin-ui/src/styling/icons/cassettes/cashout-cassette-2.svg +++ b/packages/admin-ui/src/styling/icons/cassettes/cashout-cassette-2.svg @@ -1 +1,25 @@ - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/cassettes/dispenser-1.svg b/packages/admin-ui/src/styling/icons/cassettes/dispenser-1.svg index a255b0b3..f4a54381 100644 --- a/packages/admin-ui/src/styling/icons/cassettes/dispenser-1.svg +++ b/packages/admin-ui/src/styling/icons/cassettes/dispenser-1.svg @@ -1 +1,29 @@ -v2-1 \ No newline at end of file + + + + + v2-1 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/cassettes/dispenser-2.svg b/packages/admin-ui/src/styling/icons/cassettes/dispenser-2.svg index 68c9ea1b..c2806db8 100644 --- a/packages/admin-ui/src/styling/icons/cassettes/dispenser-2.svg +++ b/packages/admin-ui/src/styling/icons/cassettes/dispenser-2.svg @@ -1 +1,29 @@ -v2-2 \ No newline at end of file + + + + + v2-2 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/cassettes/tejo/3-cassettes/3-cassettes-open-1-left.svg b/packages/admin-ui/src/styling/icons/cassettes/tejo/3-cassettes/3-cassettes-open-1-left.svg index 4053f270..ca88beff 100644 --- a/packages/admin-ui/src/styling/icons/cassettes/tejo/3-cassettes/3-cassettes-open-1-left.svg +++ b/packages/admin-ui/src/styling/icons/cassettes/tejo/3-cassettes/3-cassettes-open-1-left.svg @@ -1,85 +1,88 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - diff --git a/packages/admin-ui/src/styling/icons/cassettes/tejo/3-cassettes/3-cassettes-open-1.svg b/packages/admin-ui/src/styling/icons/cassettes/tejo/3-cassettes/3-cassettes-open-1.svg index f1f34689..036c40b3 100644 --- a/packages/admin-ui/src/styling/icons/cassettes/tejo/3-cassettes/3-cassettes-open-1.svg +++ b/packages/admin-ui/src/styling/icons/cassettes/tejo/3-cassettes/3-cassettes-open-1.svg @@ -1,85 +1,88 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - diff --git a/packages/admin-ui/src/styling/icons/cassettes/tejo/3-cassettes/3-cassettes-open-2-left.svg b/packages/admin-ui/src/styling/icons/cassettes/tejo/3-cassettes/3-cassettes-open-2-left.svg index d5afa864..df52d50e 100644 --- a/packages/admin-ui/src/styling/icons/cassettes/tejo/3-cassettes/3-cassettes-open-2-left.svg +++ b/packages/admin-ui/src/styling/icons/cassettes/tejo/3-cassettes/3-cassettes-open-2-left.svg @@ -1,89 +1,92 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - diff --git a/packages/admin-ui/src/styling/icons/cassettes/tejo/3-cassettes/3-cassettes-open-2.svg b/packages/admin-ui/src/styling/icons/cassettes/tejo/3-cassettes/3-cassettes-open-2.svg index 3f30e76f..f8e29e28 100644 --- a/packages/admin-ui/src/styling/icons/cassettes/tejo/3-cassettes/3-cassettes-open-2.svg +++ b/packages/admin-ui/src/styling/icons/cassettes/tejo/3-cassettes/3-cassettes-open-2.svg @@ -1,92 +1,96 @@ - - + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - diff --git a/packages/admin-ui/src/styling/icons/cassettes/tejo/3-cassettes/3-cassettes-open-3-left.svg b/packages/admin-ui/src/styling/icons/cassettes/tejo/3-cassettes/3-cassettes-open-3-left.svg index 239b19dd..32d6f7d3 100644 --- a/packages/admin-ui/src/styling/icons/cassettes/tejo/3-cassettes/3-cassettes-open-3-left.svg +++ b/packages/admin-ui/src/styling/icons/cassettes/tejo/3-cassettes/3-cassettes-open-3-left.svg @@ -1,91 +1,94 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - diff --git a/packages/admin-ui/src/styling/icons/cassettes/tejo/3-cassettes/3-cassettes-open-3.svg b/packages/admin-ui/src/styling/icons/cassettes/tejo/3-cassettes/3-cassettes-open-3.svg index f5af1913..d367db4c 100644 --- a/packages/admin-ui/src/styling/icons/cassettes/tejo/3-cassettes/3-cassettes-open-3.svg +++ b/packages/admin-ui/src/styling/icons/cassettes/tejo/3-cassettes/3-cassettes-open-3.svg @@ -1,91 +1,94 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - diff --git a/packages/admin-ui/src/styling/icons/cassettes/tejo/4-cassettes/4-cassettes-open-1-left.svg b/packages/admin-ui/src/styling/icons/cassettes/tejo/4-cassettes/4-cassettes-open-1-left.svg index af490251..e8d58ae2 100644 --- a/packages/admin-ui/src/styling/icons/cassettes/tejo/4-cassettes/4-cassettes-open-1-left.svg +++ b/packages/admin-ui/src/styling/icons/cassettes/tejo/4-cassettes/4-cassettes-open-1-left.svg @@ -1,95 +1,99 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - diff --git a/packages/admin-ui/src/styling/icons/cassettes/tejo/4-cassettes/4-cassettes-open-1.svg b/packages/admin-ui/src/styling/icons/cassettes/tejo/4-cassettes/4-cassettes-open-1.svg index 68ad3092..c18f5252 100644 --- a/packages/admin-ui/src/styling/icons/cassettes/tejo/4-cassettes/4-cassettes-open-1.svg +++ b/packages/admin-ui/src/styling/icons/cassettes/tejo/4-cassettes/4-cassettes-open-1.svg @@ -1,95 +1,99 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - diff --git a/packages/admin-ui/src/styling/icons/cassettes/tejo/4-cassettes/4-cassettes-open-2-left.svg b/packages/admin-ui/src/styling/icons/cassettes/tejo/4-cassettes/4-cassettes-open-2-left.svg index 94f1ad71..4e004674 100644 --- a/packages/admin-ui/src/styling/icons/cassettes/tejo/4-cassettes/4-cassettes-open-2-left.svg +++ b/packages/admin-ui/src/styling/icons/cassettes/tejo/4-cassettes/4-cassettes-open-2-left.svg @@ -1,97 +1,101 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - diff --git a/packages/admin-ui/src/styling/icons/cassettes/tejo/4-cassettes/4-cassettes-open-2.svg b/packages/admin-ui/src/styling/icons/cassettes/tejo/4-cassettes/4-cassettes-open-2.svg index b431117a..c5a4c712 100644 --- a/packages/admin-ui/src/styling/icons/cassettes/tejo/4-cassettes/4-cassettes-open-2.svg +++ b/packages/admin-ui/src/styling/icons/cassettes/tejo/4-cassettes/4-cassettes-open-2.svg @@ -1,100 +1,105 @@ - - + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - diff --git a/packages/admin-ui/src/styling/icons/cassettes/tejo/4-cassettes/4-cassettes-open-3-left.svg b/packages/admin-ui/src/styling/icons/cassettes/tejo/4-cassettes/4-cassettes-open-3-left.svg index bc22c04c..8a8f1b3e 100644 --- a/packages/admin-ui/src/styling/icons/cassettes/tejo/4-cassettes/4-cassettes-open-3-left.svg +++ b/packages/admin-ui/src/styling/icons/cassettes/tejo/4-cassettes/4-cassettes-open-3-left.svg @@ -1,97 +1,101 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - diff --git a/packages/admin-ui/src/styling/icons/cassettes/tejo/4-cassettes/4-cassettes-open-3.svg b/packages/admin-ui/src/styling/icons/cassettes/tejo/4-cassettes/4-cassettes-open-3.svg index 3cf139ca..39be85db 100644 --- a/packages/admin-ui/src/styling/icons/cassettes/tejo/4-cassettes/4-cassettes-open-3.svg +++ b/packages/admin-ui/src/styling/icons/cassettes/tejo/4-cassettes/4-cassettes-open-3.svg @@ -1,99 +1,103 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - diff --git a/packages/admin-ui/src/styling/icons/cassettes/tejo/4-cassettes/4-cassettes-open-4-left.svg b/packages/admin-ui/src/styling/icons/cassettes/tejo/4-cassettes/4-cassettes-open-4-left.svg index 89c7c360..1ad69163 100644 --- a/packages/admin-ui/src/styling/icons/cassettes/tejo/4-cassettes/4-cassettes-open-4-left.svg +++ b/packages/admin-ui/src/styling/icons/cassettes/tejo/4-cassettes/4-cassettes-open-4-left.svg @@ -1,101 +1,106 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - diff --git a/packages/admin-ui/src/styling/icons/cassettes/tejo/4-cassettes/4-cassettes-open-4.svg b/packages/admin-ui/src/styling/icons/cassettes/tejo/4-cassettes/4-cassettes-open-4.svg index 3dd819f7..866c9d75 100644 --- a/packages/admin-ui/src/styling/icons/cassettes/tejo/4-cassettes/4-cassettes-open-4.svg +++ b/packages/admin-ui/src/styling/icons/cassettes/tejo/4-cassettes/4-cassettes-open-4.svg @@ -1,103 +1,108 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - diff --git a/packages/admin-ui/src/styling/icons/circle buttons/customer-list-view/white.svg b/packages/admin-ui/src/styling/icons/circle buttons/customer-list-view/white.svg index c610ebf5..13ddbcba 100644 --- a/packages/admin-ui/src/styling/icons/circle buttons/customer-list-view/white.svg +++ b/packages/admin-ui/src/styling/icons/circle buttons/customer-list-view/white.svg @@ -1,6 +1,8 @@ - - + + diff --git a/packages/admin-ui/src/styling/icons/circle buttons/customer-list-view/zodiac.svg b/packages/admin-ui/src/styling/icons/circle buttons/customer-list-view/zodiac.svg index 6e07620e..910e0225 100644 --- a/packages/admin-ui/src/styling/icons/circle buttons/customer-list-view/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/circle buttons/customer-list-view/zodiac.svg @@ -1,6 +1,8 @@ - - + + diff --git a/packages/admin-ui/src/styling/icons/circle buttons/exception-view/white.svg b/packages/admin-ui/src/styling/icons/circle buttons/exception-view/white.svg index 6302951e..e3f7add0 100644 --- a/packages/admin-ui/src/styling/icons/circle buttons/exception-view/white.svg +++ b/packages/admin-ui/src/styling/icons/circle buttons/exception-view/white.svg @@ -1,8 +1,10 @@ - + Created with Sketch. - + diff --git a/packages/admin-ui/src/styling/icons/circle buttons/exception-view/zodiac.svg b/packages/admin-ui/src/styling/icons/circle buttons/exception-view/zodiac.svg index ffb4661c..a35dfdcd 100644 --- a/packages/admin-ui/src/styling/icons/circle buttons/exception-view/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/circle buttons/exception-view/zodiac.svg @@ -1,8 +1,10 @@ - + Created with Sketch. - + diff --git a/packages/admin-ui/src/styling/icons/circle buttons/filter/white.svg b/packages/admin-ui/src/styling/icons/circle buttons/filter/white.svg index c85b1138..a88db1c3 100644 --- a/packages/admin-ui/src/styling/icons/circle buttons/filter/white.svg +++ b/packages/admin-ui/src/styling/icons/circle buttons/filter/white.svg @@ -1,13 +1,20 @@ - + Created with Sketch. - - - - - - + + + + + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/circle buttons/filter/zodiac.svg b/packages/admin-ui/src/styling/icons/circle buttons/filter/zodiac.svg index 367fa7e3..c338dc08 100644 --- a/packages/admin-ui/src/styling/icons/circle buttons/filter/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/circle buttons/filter/zodiac.svg @@ -1,13 +1,20 @@ - + Created with Sketch. - - - - - - + + + + + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/circle buttons/history/white.svg b/packages/admin-ui/src/styling/icons/circle buttons/history/white.svg index 21bc2206..093db36a 100644 --- a/packages/admin-ui/src/styling/icons/circle buttons/history/white.svg +++ b/packages/admin-ui/src/styling/icons/circle buttons/history/white.svg @@ -1,10 +1,13 @@ - + Created with Sketch. - + - + diff --git a/packages/admin-ui/src/styling/icons/circle buttons/history/zodiac.svg b/packages/admin-ui/src/styling/icons/circle buttons/history/zodiac.svg index 41486cfb..9a3ce056 100644 --- a/packages/admin-ui/src/styling/icons/circle buttons/history/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/circle buttons/history/zodiac.svg @@ -1,10 +1,13 @@ - + Created with Sketch. - + - + diff --git a/packages/admin-ui/src/styling/icons/circle buttons/law/white.svg b/packages/admin-ui/src/styling/icons/circle buttons/law/white.svg index e82cd95e..a92bdc15 100644 --- a/packages/admin-ui/src/styling/icons/circle buttons/law/white.svg +++ b/packages/admin-ui/src/styling/icons/circle buttons/law/white.svg @@ -1,6 +1,8 @@ - - + + diff --git a/packages/admin-ui/src/styling/icons/circle buttons/law/zodiac.svg b/packages/admin-ui/src/styling/icons/circle buttons/law/zodiac.svg index 8c13bc6c..3ab6c4f9 100644 --- a/packages/admin-ui/src/styling/icons/circle buttons/law/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/circle buttons/law/zodiac.svg @@ -1,6 +1,8 @@ - - + + diff --git a/packages/admin-ui/src/styling/icons/circle buttons/listing-view/white.svg b/packages/admin-ui/src/styling/icons/circle buttons/listing-view/white.svg index 9a10d18b..cd4b1c7a 100644 --- a/packages/admin-ui/src/styling/icons/circle buttons/listing-view/white.svg +++ b/packages/admin-ui/src/styling/icons/circle buttons/listing-view/white.svg @@ -1,8 +1,10 @@ - + Created with Sketch. - + diff --git a/packages/admin-ui/src/styling/icons/circle buttons/listing-view/zodiac.svg b/packages/admin-ui/src/styling/icons/circle buttons/listing-view/zodiac.svg index 45e3122d..2dc959af 100644 --- a/packages/admin-ui/src/styling/icons/circle buttons/listing-view/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/circle buttons/listing-view/zodiac.svg @@ -1,8 +1,10 @@ - + Created with Sketch. - + diff --git a/packages/admin-ui/src/styling/icons/circle buttons/overview/comet.svg b/packages/admin-ui/src/styling/icons/circle buttons/overview/comet.svg index 2ab2ffd7..b450c0d5 100644 --- a/packages/admin-ui/src/styling/icons/circle buttons/overview/comet.svg +++ b/packages/admin-ui/src/styling/icons/circle buttons/overview/comet.svg @@ -1,5 +1,6 @@ - + diff --git a/packages/admin-ui/src/styling/icons/circle buttons/overview/white.svg b/packages/admin-ui/src/styling/icons/circle buttons/overview/white.svg index aa7c2af6..2e193c68 100644 --- a/packages/admin-ui/src/styling/icons/circle buttons/overview/white.svg +++ b/packages/admin-ui/src/styling/icons/circle buttons/overview/white.svg @@ -1,5 +1,6 @@ - + diff --git a/packages/admin-ui/src/styling/icons/circle buttons/overview/zodiac.svg b/packages/admin-ui/src/styling/icons/circle buttons/overview/zodiac.svg index db0c70ec..2d5a5461 100644 --- a/packages/admin-ui/src/styling/icons/circle buttons/overview/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/circle buttons/overview/zodiac.svg @@ -1,5 +1,6 @@ - + diff --git a/packages/admin-ui/src/styling/icons/circle buttons/save/white.svg b/packages/admin-ui/src/styling/icons/circle buttons/save/white.svg index 870b1188..6d3f4ac7 100644 --- a/packages/admin-ui/src/styling/icons/circle buttons/save/white.svg +++ b/packages/admin-ui/src/styling/icons/circle buttons/save/white.svg @@ -1,5 +1,6 @@ - + Created with Sketch. @@ -7,12 +8,14 @@ - + - + diff --git a/packages/admin-ui/src/styling/icons/circle buttons/save/zodiac.svg b/packages/admin-ui/src/styling/icons/circle buttons/save/zodiac.svg index 7428d35d..cc68d335 100644 --- a/packages/admin-ui/src/styling/icons/circle buttons/save/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/circle buttons/save/zodiac.svg @@ -1,5 +1,6 @@ - + Created with Sketch. @@ -9,12 +10,15 @@ - + - + diff --git a/packages/admin-ui/src/styling/icons/circle buttons/search/white.svg b/packages/admin-ui/src/styling/icons/circle buttons/search/white.svg index 6ca60dd1..13eeedf8 100644 --- a/packages/admin-ui/src/styling/icons/circle buttons/search/white.svg +++ b/packages/admin-ui/src/styling/icons/circle buttons/search/white.svg @@ -1,9 +1,12 @@ - + Created with Sketch. - - + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/circle buttons/search/zodiac.svg b/packages/admin-ui/src/styling/icons/circle buttons/search/zodiac.svg index 89515ba2..56e57c69 100644 --- a/packages/admin-ui/src/styling/icons/circle buttons/search/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/circle buttons/search/zodiac.svg @@ -1,10 +1,13 @@ - + icon/search/dark02 - - + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/circle buttons/settings/white.svg b/packages/admin-ui/src/styling/icons/circle buttons/settings/white.svg index c2f13552..6349fd2c 100644 --- a/packages/admin-ui/src/styling/icons/circle buttons/settings/white.svg +++ b/packages/admin-ui/src/styling/icons/circle buttons/settings/white.svg @@ -1,8 +1,11 @@ - + Created with Sketch. - - + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/circle buttons/settings/zodiac.svg b/packages/admin-ui/src/styling/icons/circle buttons/settings/zodiac.svg index 1f60c4c0..a122c9b4 100644 --- a/packages/admin-ui/src/styling/icons/circle buttons/settings/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/circle buttons/settings/zodiac.svg @@ -1,8 +1,11 @@ - + Created with Sketch. - - + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/circle buttons/share/white.svg b/packages/admin-ui/src/styling/icons/circle buttons/share/white.svg index 058f9a51..fb5fe6e1 100644 --- a/packages/admin-ui/src/styling/icons/circle buttons/share/white.svg +++ b/packages/admin-ui/src/styling/icons/circle buttons/share/white.svg @@ -1,8 +1,10 @@ - + Created with Sketch. - + diff --git a/packages/admin-ui/src/styling/icons/circle buttons/share/zodiac.svg b/packages/admin-ui/src/styling/icons/circle buttons/share/zodiac.svg index d77c5160..65cd828f 100644 --- a/packages/admin-ui/src/styling/icons/circle buttons/share/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/circle buttons/share/zodiac.svg @@ -1,8 +1,10 @@ - + Created with Sketch. - + diff --git a/packages/admin-ui/src/styling/icons/circle buttons/upload/white.svg b/packages/admin-ui/src/styling/icons/circle buttons/upload/white.svg index 912372ba..28a22c06 100644 --- a/packages/admin-ui/src/styling/icons/circle buttons/upload/white.svg +++ b/packages/admin-ui/src/styling/icons/circle buttons/upload/white.svg @@ -1,12 +1,17 @@ - + Created with Sketch. - - + + - + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/circle buttons/upload/zodiac.svg b/packages/admin-ui/src/styling/icons/circle buttons/upload/zodiac.svg index 08c4c550..c9f950c0 100644 --- a/packages/admin-ui/src/styling/icons/circle buttons/upload/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/circle buttons/upload/zodiac.svg @@ -1,12 +1,17 @@ - + Created with Sketch. - - + + - + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/circle buttons/wizard/white.svg b/packages/admin-ui/src/styling/icons/circle buttons/wizard/white.svg index e07c6d13..4e19de15 100644 --- a/packages/admin-ui/src/styling/icons/circle buttons/wizard/white.svg +++ b/packages/admin-ui/src/styling/icons/circle buttons/wizard/white.svg @@ -1,9 +1,12 @@ - + Created with Sketch. - - + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/circle buttons/wizard/zodiac.svg b/packages/admin-ui/src/styling/icons/circle buttons/wizard/zodiac.svg index 485e5aeb..aabb52bd 100644 --- a/packages/admin-ui/src/styling/icons/circle buttons/wizard/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/circle buttons/wizard/zodiac.svg @@ -1,9 +1,12 @@ - + Created with Sketch. - - + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/compliance/custom-requirement.svg b/packages/admin-ui/src/styling/icons/compliance/custom-requirement.svg index 4fdf906d..33f74e7c 100644 --- a/packages/admin-ui/src/styling/icons/compliance/custom-requirement.svg +++ b/packages/admin-ui/src/styling/icons/compliance/custom-requirement.svg @@ -1 +1,889 @@ - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/compliance/keyboard.svg b/packages/admin-ui/src/styling/icons/compliance/keyboard.svg index f7d68740..bee03752 100644 --- a/packages/admin-ui/src/styling/icons/compliance/keyboard.svg +++ b/packages/admin-ui/src/styling/icons/compliance/keyboard.svg @@ -1,5 +1,6 @@ - + entry-icon/keyboard diff --git a/packages/admin-ui/src/styling/icons/compliance/keypad.svg b/packages/admin-ui/src/styling/icons/compliance/keypad.svg index 02b01b3f..495c98f0 100644 --- a/packages/admin-ui/src/styling/icons/compliance/keypad.svg +++ b/packages/admin-ui/src/styling/icons/compliance/keypad.svg @@ -1,5 +1,6 @@ - + entry-icon/keypad diff --git a/packages/admin-ui/src/styling/icons/compliance/list.svg b/packages/admin-ui/src/styling/icons/compliance/list.svg index 459fde15..e94cbb67 100644 --- a/packages/admin-ui/src/styling/icons/compliance/list.svg +++ b/packages/admin-ui/src/styling/icons/compliance/list.svg @@ -1,5 +1,6 @@ - + entry-icon/list diff --git a/packages/admin-ui/src/styling/icons/customer-nav/data/comet.svg b/packages/admin-ui/src/styling/icons/customer-nav/data/comet.svg index 3504ab61..6ee63c8b 100644 --- a/packages/admin-ui/src/styling/icons/customer-nav/data/comet.svg +++ b/packages/admin-ui/src/styling/icons/customer-nav/data/comet.svg @@ -1,8 +1,11 @@ - + - - + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/customer-nav/data/white.svg b/packages/admin-ui/src/styling/icons/customer-nav/data/white.svg index b517414e..37890014 100644 --- a/packages/admin-ui/src/styling/icons/customer-nav/data/white.svg +++ b/packages/admin-ui/src/styling/icons/customer-nav/data/white.svg @@ -1,8 +1,11 @@ - + - - + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/customer-nav/data/zodiac.svg b/packages/admin-ui/src/styling/icons/customer-nav/data/zodiac.svg index 735c8741..5c9e2b38 100644 --- a/packages/admin-ui/src/styling/icons/customer-nav/data/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/customer-nav/data/zodiac.svg @@ -1,8 +1,11 @@ - + - - + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/customer-nav/note/comet.svg b/packages/admin-ui/src/styling/icons/customer-nav/note/comet.svg index 951e3108..51f39880 100644 --- a/packages/admin-ui/src/styling/icons/customer-nav/note/comet.svg +++ b/packages/admin-ui/src/styling/icons/customer-nav/note/comet.svg @@ -1,9 +1,12 @@ - + - + - + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/customer-nav/note/white.svg b/packages/admin-ui/src/styling/icons/customer-nav/note/white.svg index def24ed8..764fe4ad 100644 --- a/packages/admin-ui/src/styling/icons/customer-nav/note/white.svg +++ b/packages/admin-ui/src/styling/icons/customer-nav/note/white.svg @@ -1,9 +1,12 @@ - + - + - + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/customer-nav/note/zodiac.svg b/packages/admin-ui/src/styling/icons/customer-nav/note/zodiac.svg index 6388cc81..afd33ca2 100644 --- a/packages/admin-ui/src/styling/icons/customer-nav/note/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/customer-nav/note/zodiac.svg @@ -1,9 +1,12 @@ - + - + - + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/customer-nav/overview/comet.svg b/packages/admin-ui/src/styling/icons/customer-nav/overview/comet.svg index 8bb25dc1..70b3d6af 100644 --- a/packages/admin-ui/src/styling/icons/customer-nav/overview/comet.svg +++ b/packages/admin-ui/src/styling/icons/customer-nav/overview/comet.svg @@ -1,5 +1,6 @@ - + diff --git a/packages/admin-ui/src/styling/icons/customer-nav/overview/white.svg b/packages/admin-ui/src/styling/icons/customer-nav/overview/white.svg index 77d347eb..f5dd4a28 100644 --- a/packages/admin-ui/src/styling/icons/customer-nav/overview/white.svg +++ b/packages/admin-ui/src/styling/icons/customer-nav/overview/white.svg @@ -1,5 +1,6 @@ - + diff --git a/packages/admin-ui/src/styling/icons/customer-nav/overview/zodiac.svg b/packages/admin-ui/src/styling/icons/customer-nav/overview/zodiac.svg index b0d4319a..c4720367 100644 --- a/packages/admin-ui/src/styling/icons/customer-nav/overview/zodiac.svg +++ b/packages/admin-ui/src/styling/icons/customer-nav/overview/zodiac.svg @@ -1,5 +1,6 @@ - + diff --git a/packages/admin-ui/src/styling/icons/customer-nav/photos/comet.svg b/packages/admin-ui/src/styling/icons/customer-nav/photos/comet.svg index 95ee5f2c..af7211c2 100644 --- a/packages/admin-ui/src/styling/icons/customer-nav/photos/comet.svg +++ b/packages/admin-ui/src/styling/icons/customer-nav/photos/comet.svg @@ -1,10 +1,13 @@ - + icon/customer-nav/photos/comet - - + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/customer-nav/photos/white.svg b/packages/admin-ui/src/styling/icons/customer-nav/photos/white.svg index e27fef8f..3ef7bcf8 100644 --- a/packages/admin-ui/src/styling/icons/customer-nav/photos/white.svg +++ b/packages/admin-ui/src/styling/icons/customer-nav/photos/white.svg @@ -1,10 +1,13 @@ - + icon/customer-nav/photos/white - - + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/dashboard/down.svg b/packages/admin-ui/src/styling/icons/dashboard/down.svg index 497eb245..ea095515 100644 --- a/packages/admin-ui/src/styling/icons/dashboard/down.svg +++ b/packages/admin-ui/src/styling/icons/dashboard/down.svg @@ -1,10 +1,14 @@ - + - - + + diff --git a/packages/admin-ui/src/styling/icons/dashboard/equal.svg b/packages/admin-ui/src/styling/icons/dashboard/equal.svg index a37df157..e4aad0ed 100644 --- a/packages/admin-ui/src/styling/icons/dashboard/equal.svg +++ b/packages/admin-ui/src/styling/icons/dashboard/equal.svg @@ -1,5 +1,6 @@ - + diff --git a/packages/admin-ui/src/styling/icons/dashboard/up.svg b/packages/admin-ui/src/styling/icons/dashboard/up.svg index 08357739..d4f9ae3e 100644 --- a/packages/admin-ui/src/styling/icons/dashboard/up.svg +++ b/packages/admin-ui/src/styling/icons/dashboard/up.svg @@ -1,10 +1,14 @@ - + - - + + diff --git a/packages/admin-ui/src/styling/icons/direction/cash-in.svg b/packages/admin-ui/src/styling/icons/direction/cash-in.svg index ae91335b..474ba3b1 100644 --- a/packages/admin-ui/src/styling/icons/direction/cash-in.svg +++ b/packages/admin-ui/src/styling/icons/direction/cash-in.svg @@ -1,10 +1,12 @@ - + Created with Sketch. - + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/direction/cash-out.svg b/packages/admin-ui/src/styling/icons/direction/cash-out.svg index 123fdd02..b30796cf 100644 --- a/packages/admin-ui/src/styling/icons/direction/cash-out.svg +++ b/packages/admin-ui/src/styling/icons/direction/cash-out.svg @@ -1,10 +1,13 @@ - + Created with Sketch. - + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/file/comet.svg b/packages/admin-ui/src/styling/icons/file/comet.svg index 86dc1d0d..f031f4fc 100644 --- a/packages/admin-ui/src/styling/icons/file/comet.svg +++ b/packages/admin-ui/src/styling/icons/file/comet.svg @@ -1,8 +1,10 @@ - + - + diff --git a/packages/admin-ui/src/styling/icons/file/spring.svg b/packages/admin-ui/src/styling/icons/file/spring.svg index 26d73281..041f0699 100644 --- a/packages/admin-ui/src/styling/icons/file/spring.svg +++ b/packages/admin-ui/src/styling/icons/file/spring.svg @@ -1,8 +1,10 @@ - + - + diff --git a/packages/admin-ui/src/styling/icons/file/tomato.svg b/packages/admin-ui/src/styling/icons/file/tomato.svg index f7cae5ad..c6840ff4 100644 --- a/packages/admin-ui/src/styling/icons/file/tomato.svg +++ b/packages/admin-ui/src/styling/icons/file/tomato.svg @@ -1,8 +1,10 @@ - + - + diff --git a/packages/admin-ui/src/styling/icons/menu/logo-white.svg b/packages/admin-ui/src/styling/icons/menu/logo-white.svg index 7de68c79..90f8c08c 100644 --- a/packages/admin-ui/src/styling/icons/menu/logo-white.svg +++ b/packages/admin-ui/src/styling/icons/menu/logo-white.svg @@ -1,9 +1,11 @@ - + Created with Sketch. - + diff --git a/packages/admin-ui/src/styling/icons/menu/logo.svg b/packages/admin-ui/src/styling/icons/menu/logo.svg index bbdc846a..7e7d2e44 100644 --- a/packages/admin-ui/src/styling/icons/menu/logo.svg +++ b/packages/admin-ui/src/styling/icons/menu/logo.svg @@ -1,9 +1,11 @@ - + Created with Sketch. - + diff --git a/packages/admin-ui/src/styling/icons/menu/notification-zodiac.svg b/packages/admin-ui/src/styling/icons/menu/notification-zodiac.svg index d35d2028..5c1a019d 100644 --- a/packages/admin-ui/src/styling/icons/menu/notification-zodiac.svg +++ b/packages/admin-ui/src/styling/icons/menu/notification-zodiac.svg @@ -1,12 +1,15 @@ - + Created with Sketch. - - + + diff --git a/packages/admin-ui/src/styling/icons/menu/notification.svg b/packages/admin-ui/src/styling/icons/menu/notification.svg index cc917d32..4385728d 100644 --- a/packages/admin-ui/src/styling/icons/menu/notification.svg +++ b/packages/admin-ui/src/styling/icons/menu/notification.svg @@ -1,12 +1,15 @@ - + Created with Sketch. - - + + diff --git a/packages/admin-ui/src/styling/icons/menu/search-zodiac.svg b/packages/admin-ui/src/styling/icons/menu/search-zodiac.svg index 99fb94be..efb34a8e 100644 --- a/packages/admin-ui/src/styling/icons/menu/search-zodiac.svg +++ b/packages/admin-ui/src/styling/icons/menu/search-zodiac.svg @@ -1,12 +1,15 @@ - + Created with Sketch. - - + + diff --git a/packages/admin-ui/src/styling/icons/menu/search.svg b/packages/admin-ui/src/styling/icons/menu/search.svg index 9a7ea06f..66d37b18 100644 --- a/packages/admin-ui/src/styling/icons/menu/search.svg +++ b/packages/admin-ui/src/styling/icons/menu/search.svg @@ -1,12 +1,15 @@ - + Created with Sketch. - - + + diff --git a/packages/admin-ui/src/styling/icons/month arrows/left.svg b/packages/admin-ui/src/styling/icons/month arrows/left.svg index e5ce3c47..a3d438fd 100644 --- a/packages/admin-ui/src/styling/icons/month arrows/left.svg +++ b/packages/admin-ui/src/styling/icons/month arrows/left.svg @@ -1,5 +1,6 @@ - + Created with Sketch. @@ -7,7 +8,8 @@ - + @@ -15,8 +17,10 @@ - - + + diff --git a/packages/admin-ui/src/styling/icons/month arrows/right.svg b/packages/admin-ui/src/styling/icons/month arrows/right.svg index 500673b1..2692ac8b 100644 --- a/packages/admin-ui/src/styling/icons/month arrows/right.svg +++ b/packages/admin-ui/src/styling/icons/month arrows/right.svg @@ -1,11 +1,13 @@ - + - + @@ -13,8 +15,10 @@ - - + + diff --git a/packages/admin-ui/src/styling/icons/month arrows/right_white.svg b/packages/admin-ui/src/styling/icons/month arrows/right_white.svg index 9d8cae10..0213c036 100644 --- a/packages/admin-ui/src/styling/icons/month arrows/right_white.svg +++ b/packages/admin-ui/src/styling/icons/month arrows/right_white.svg @@ -1,11 +1,13 @@ - + - + @@ -13,8 +15,10 @@ - - + + diff --git a/packages/admin-ui/src/styling/icons/stage/spring/complete.svg b/packages/admin-ui/src/styling/icons/stage/spring/complete.svg index c5bca93a..34885ee0 100644 --- a/packages/admin-ui/src/styling/icons/stage/spring/complete.svg +++ b/packages/admin-ui/src/styling/icons/stage/spring/complete.svg @@ -1,9 +1,13 @@ - + Created with Sketch. - - + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/stage/spring/current.svg b/packages/admin-ui/src/styling/icons/stage/spring/current.svg index c84bb8c1..f38ccab4 100644 --- a/packages/admin-ui/src/styling/icons/stage/spring/current.svg +++ b/packages/admin-ui/src/styling/icons/stage/spring/current.svg @@ -1,9 +1,12 @@ - + Created with Sketch. - + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/stage/spring/empty.svg b/packages/admin-ui/src/styling/icons/stage/spring/empty.svg index ef66b65c..10485bac 100644 --- a/packages/admin-ui/src/styling/icons/stage/spring/empty.svg +++ b/packages/admin-ui/src/styling/icons/stage/spring/empty.svg @@ -1,8 +1,11 @@ - + Created with Sketch. - + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/stage/zodiac/complete.svg b/packages/admin-ui/src/styling/icons/stage/zodiac/complete.svg index 0fae49dd..21c1c973 100644 --- a/packages/admin-ui/src/styling/icons/stage/zodiac/complete.svg +++ b/packages/admin-ui/src/styling/icons/stage/zodiac/complete.svg @@ -1,9 +1,13 @@ - + Created with Sketch. - - + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/stage/zodiac/current.svg b/packages/admin-ui/src/styling/icons/stage/zodiac/current.svg index 044d18b2..e2eff64f 100644 --- a/packages/admin-ui/src/styling/icons/stage/zodiac/current.svg +++ b/packages/admin-ui/src/styling/icons/stage/zodiac/current.svg @@ -1,9 +1,12 @@ - + Created with Sketch. - + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/stage/zodiac/empty.svg b/packages/admin-ui/src/styling/icons/stage/zodiac/empty.svg index 4529dbf6..77411f82 100644 --- a/packages/admin-ui/src/styling/icons/stage/zodiac/empty.svg +++ b/packages/admin-ui/src/styling/icons/stage/zodiac/empty.svg @@ -1,8 +1,11 @@ - + Created with Sketch. - + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/stage/zodiac/full.svg b/packages/admin-ui/src/styling/icons/stage/zodiac/full.svg index 8e905e5e..3062b257 100644 --- a/packages/admin-ui/src/styling/icons/stage/zodiac/full.svg +++ b/packages/admin-ui/src/styling/icons/stage/zodiac/full.svg @@ -1,9 +1,12 @@ - + Created with Sketch. - + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/status/pumpkin.svg b/packages/admin-ui/src/styling/icons/status/pumpkin.svg index fc11e181..f081464c 100644 --- a/packages/admin-ui/src/styling/icons/status/pumpkin.svg +++ b/packages/admin-ui/src/styling/icons/status/pumpkin.svg @@ -1,4 +1,5 @@ - + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/status/spring2.svg b/packages/admin-ui/src/styling/icons/status/spring2.svg index 0ffc9aa2..0edd8bd3 100644 --- a/packages/admin-ui/src/styling/icons/status/spring2.svg +++ b/packages/admin-ui/src/styling/icons/status/spring2.svg @@ -1,4 +1,5 @@ - + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/status/tomato.svg b/packages/admin-ui/src/styling/icons/status/tomato.svg index 7e5eb10a..58748c43 100644 --- a/packages/admin-ui/src/styling/icons/status/tomato.svg +++ b/packages/admin-ui/src/styling/icons/status/tomato.svg @@ -1,4 +1,5 @@ - + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/stripes.svg b/packages/admin-ui/src/styling/icons/stripes.svg index f1c87ebd..929c5598 100644 --- a/packages/admin-ui/src/styling/icons/stripes.svg +++ b/packages/admin-ui/src/styling/icons/stripes.svg @@ -1,28 +1,29 @@ - - - - - {' '} - + xmlns="http://www.w3.org/2000/svg" + width="100%" + height="36px"> + + + + + + {' '} + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/table/empty-table.svg b/packages/admin-ui/src/styling/icons/table/empty-table.svg index 76464a0c..fb0284b4 100644 --- a/packages/admin-ui/src/styling/icons/table/empty-table.svg +++ b/packages/admin-ui/src/styling/icons/table/empty-table.svg @@ -1,27 +1,33 @@ - + - + - + - + - + - + @@ -38,10 +44,14 @@ - - - - + + + + diff --git a/packages/admin-ui/src/styling/icons/table/false.svg b/packages/admin-ui/src/styling/icons/table/false.svg index 4d44d93f..466d068d 100644 --- a/packages/admin-ui/src/styling/icons/table/false.svg +++ b/packages/admin-ui/src/styling/icons/table/false.svg @@ -1,11 +1,15 @@ - + Group - + - + diff --git a/packages/admin-ui/src/styling/icons/table/true.svg b/packages/admin-ui/src/styling/icons/table/true.svg index d805af9d..288843f3 100644 --- a/packages/admin-ui/src/styling/icons/table/true.svg +++ b/packages/admin-ui/src/styling/icons/table/true.svg @@ -1,9 +1,11 @@ - + icon/table/true Created with Sketch. - + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/warning-icon/comet.svg b/packages/admin-ui/src/styling/icons/warning-icon/comet.svg index 6d59876c..0548ac6e 100644 --- a/packages/admin-ui/src/styling/icons/warning-icon/comet.svg +++ b/packages/admin-ui/src/styling/icons/warning-icon/comet.svg @@ -1,11 +1,13 @@ - + Created with Sketch. - + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/icons/warning-icon/tomato.svg b/packages/admin-ui/src/styling/icons/warning-icon/tomato.svg index eeb7b713..4922e485 100644 --- a/packages/admin-ui/src/styling/icons/warning-icon/tomato.svg +++ b/packages/admin-ui/src/styling/icons/warning-icon/tomato.svg @@ -1,11 +1,13 @@ - + Created with Sketch. - + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/logos/icon-bitcoin-colour.svg b/packages/admin-ui/src/styling/logos/icon-bitcoin-colour.svg index 94b562ad..57336810 100644 --- a/packages/admin-ui/src/styling/logos/icon-bitcoin-colour.svg +++ b/packages/admin-ui/src/styling/logos/icon-bitcoin-colour.svg @@ -1,7 +1,7 @@ - - + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/logos/icon-bitcoincash-colour.svg b/packages/admin-ui/src/styling/logos/icon-bitcoincash-colour.svg index e10506eb..096583ef 100644 --- a/packages/admin-ui/src/styling/logos/icon-bitcoincash-colour.svg +++ b/packages/admin-ui/src/styling/logos/icon-bitcoincash-colour.svg @@ -1,4 +1,6 @@ - - + + diff --git a/packages/admin-ui/src/styling/logos/icon-dash-colour.svg b/packages/admin-ui/src/styling/logos/icon-dash-colour.svg index 73da05d9..137b1737 100644 --- a/packages/admin-ui/src/styling/logos/icon-dash-colour.svg +++ b/packages/admin-ui/src/styling/logos/icon-dash-colour.svg @@ -1 +1,7 @@ - \ No newline at end of file + + + + + + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/logos/icon-ethereum-colour.svg b/packages/admin-ui/src/styling/logos/icon-ethereum-colour.svg index f095d8c0..dd16d053 100644 --- a/packages/admin-ui/src/styling/logos/icon-ethereum-colour.svg +++ b/packages/admin-ui/src/styling/logos/icon-ethereum-colour.svg @@ -1,11 +1,14 @@ - - - - - - - - - + + + + + + + + + diff --git a/packages/admin-ui/src/styling/logos/icon-litecoin-colour.svg b/packages/admin-ui/src/styling/logos/icon-litecoin-colour.svg index 0e25829b..ba607d19 100644 --- a/packages/admin-ui/src/styling/logos/icon-litecoin-colour.svg +++ b/packages/admin-ui/src/styling/logos/icon-litecoin-colour.svg @@ -1,4 +1,5 @@ - - + + diff --git a/packages/admin-ui/src/styling/logos/icon-monero-colour.svg b/packages/admin-ui/src/styling/logos/icon-monero-colour.svg index af777a4d..d0e1290a 100644 --- a/packages/admin-ui/src/styling/logos/icon-monero-colour.svg +++ b/packages/admin-ui/src/styling/logos/icon-monero-colour.svg @@ -1 +1,6 @@ - \ No newline at end of file + + + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/logos/icon-tether-colour.svg b/packages/admin-ui/src/styling/logos/icon-tether-colour.svg index 3efaa649..f4547484 100644 --- a/packages/admin-ui/src/styling/logos/icon-tether-colour.svg +++ b/packages/admin-ui/src/styling/logos/icon-tether-colour.svg @@ -1 +1,6 @@ - \ No newline at end of file + + + + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/logos/icon-tron-colour.svg b/packages/admin-ui/src/styling/logos/icon-tron-colour.svg index 7f0efe2f..42d65be8 100644 --- a/packages/admin-ui/src/styling/logos/icon-tron-colour.svg +++ b/packages/admin-ui/src/styling/logos/icon-tron-colour.svg @@ -1,7 +1,9 @@ - + - + \ No newline at end of file diff --git a/packages/admin-ui/src/styling/logos/icon-usdc-colour.svg b/packages/admin-ui/src/styling/logos/icon-usdc-colour.svg index 5dfea926..16b6b806 100644 --- a/packages/admin-ui/src/styling/logos/icon-usdc-colour.svg +++ b/packages/admin-ui/src/styling/logos/icon-usdc-colour.svg @@ -1,5 +1,8 @@ - - - + + + diff --git a/packages/admin-ui/src/styling/logos/icon-zcash-colour.svg b/packages/admin-ui/src/styling/logos/icon-zcash-colour.svg index 7e7655dc..7eb63db6 100644 --- a/packages/admin-ui/src/styling/logos/icon-zcash-colour.svg +++ b/packages/admin-ui/src/styling/logos/icon-zcash-colour.svg @@ -1,15 +1,16 @@ - + -headerArtboard 7 - - - + diff --git a/packages/admin-ui/src/styling/theme.js b/packages/admin-ui/src/styling/theme.js index 96748084..5dbee8be 100644 --- a/packages/admin-ui/src/styling/theme.js +++ b/packages/admin-ui/src/styling/theme.js @@ -22,30 +22,30 @@ import { tomato, mistyRose, linen, - pumpkin + pumpkin, } from './variables' const { p } = typographyStyles let theme = createTheme({ typography: { - fontFamily: inputFontFamily + fontFamily: inputFontFamily, }, palette: { primary: { light: secondaryColor, dark: secondaryColor, - main: secondaryColor + main: secondaryColor, }, secondary: { light: secondaryColor, dark: secondaryColor, - main: secondaryColor + main: secondaryColor, }, background: { - default: backgroundColor - } - } + default: backgroundColor, + }, + }, }) theme = createTheme(theme, { @@ -53,18 +53,18 @@ theme = createTheme(theme, { MuiTypography: { styleOverrides: { root: { ...p }, - body1: { ...p } - } + body1: { ...p }, + }, }, MuiIconButtonBase: { defaultProps: { - disableRipple: true - } + disableRipple: true, + }, }, MuiButtonBase: { defaultProps: { - disableRipple: true - } + disableRipple: true, + }, }, MuiSwitch: { styleOverrides: { @@ -72,18 +72,18 @@ theme = createTheme(theme, { width: 32, height: 20, padding: 0, - margin: theme.spacing(1) + margin: theme.spacing(1), }, thumb: { width: 16, - height: 16 + height: 16, }, track: { borderRadius: 17, border: 'none', backgroundColor: offColor, opacity: 1, - transition: theme.transitions.create(['background-color', 'border']) + transition: theme.transitions.create(['background-color', 'border']), }, switchBase: { padding: 2, @@ -91,96 +91,96 @@ theme = createTheme(theme, { color: disabledColor2, '& + .MuiSwitch-track': { backgroundColor: disabledColor, - opacity: 1 - } + opacity: 1, + }, }, '&.Mui-checked': { transform: 'translateX(58%)', color: theme.palette.common.white, '&.Mui-disabled': { - color: disabledColor2 + color: disabledColor2, }, '& + .MuiSwitch-track': { backgroundColor: secondaryColor, opacity: 1, - border: 'none' - } + border: 'none', + }, }, '&.Mui-focusVisible .MuiSwitch-thumb': { border: '6px solid #fff', - boxShadow: '0 0 4px 0 rgba(0,0,0,0.24)' - } - } - } + boxShadow: '0 0 4px 0 rgba(0,0,0,0.24)', + }, + }, + }, }, MuiMenuItem: { styleOverrides: { root: { '&:hover': { - backgroundColor: subheaderColor + backgroundColor: subheaderColor, }, '&.Mui-selected': { '&:hover': { - backgroundColor: subheaderColor + backgroundColor: subheaderColor, }, - backgroundColor: subheaderColor - } - } - } + backgroundColor: subheaderColor, + }, + }, + }, }, MuiAutocomplete: { styleOverrides: { root: { - color: fontColor + color: fontColor, }, noOptions: { - padding: `6px 16px` + padding: `6px 16px`, }, option: { '&.Mui-focused': { - backgroundColor: subheaderColor + backgroundColor: subheaderColor, }, '&[aria-selected="true"]': { - backgroundColor: `${subheaderColor} !important` - } + backgroundColor: `${subheaderColor} !important`, + }, }, paper: { color: fontColor, - margin: 0 + margin: 0, }, listbox: { - padding: 0 + padding: 0, }, tag: { '&[data-tag-index="0"]': { - marginLeft: 0 + marginLeft: 0, }, margin: 2, backgroundColor: subheaderColor, borderRadius: 4, - height: 18 - } - } + height: 18, + }, + }, }, MuiPaper: { styleOverrides: { root: { - color: primaryColor + color: primaryColor, }, elevation1: { - boxShadow: '0 0 4px 0 rgba(0, 0, 0, 0.08)' - } - } + boxShadow: '0 0 4px 0 rgba(0, 0, 0, 0.08)', + }, + }, }, MuiCheckbox: { styleOverrides: { root: { color: secondaryColor, '&.Mui-checked': { - color: secondaryColor - } - } - } + color: secondaryColor, + }, + }, + }, }, MuiChip: { styleOverrides: { @@ -188,7 +188,7 @@ theme = createTheme(theme, { backgroundColor: subheaderColor, borderRadius: 4, margin: theme.spacing(0.5, 0.25), - height: 18 + height: 18, }, label: { fontSize: smallestFontSize, @@ -196,76 +196,76 @@ theme = createTheme(theme, { fontWeight: inputFontWeight, fontFamily: inputFontFamily, paddingRight: 4, - paddingLeft: 4 + paddingLeft: 4, }, colorDefault: { backgroundColor: zircon, '& .MuiChip-label': { - color: primaryColor - } + color: primaryColor, + }, }, colorWarning: { backgroundColor: linen, '& .MuiChip-label': { - color: pumpkin - } + color: pumpkin, + }, }, colorError: { backgroundColor: mistyRose, '& .MuiChip-label': { - color: tomato - } + color: tomato, + }, }, colorSuccess: { backgroundColor: spring3, '& .MuiChip-label': { - color: spring4 - } - } - } + color: spring4, + }, + }, + }, }, MuiInput: { styleOverrides: { root: { - color: fontColor + color: fontColor, }, underline: { '&:before': { - borderBottom: `2px solid ${fontColor}` - } - } - } + borderBottom: `2px solid ${fontColor}`, + }, + }, + }, }, MuiInputLabel: { styleOverrides: { root: { font: 'inherit', fontSize: fontSize3, - color: offColor + color: offColor, }, shrink: { color: fontColor, - transform: 'translate(0, 1.7px) scale(0.83)' - } - } + transform: 'translate(0, 1.7px) scale(0.83)', + }, + }, }, MuiFormLabel: { styleOverrides: { root: { '&.Mui-focused': { - color: fontColor - } - } - } + color: fontColor, + }, + }, + }, }, MuiListItem: { styleOverrides: { root: { '&:nth-of-type(odd)': { - backgroundColor: backgroundColor - } - } - } + backgroundColor: backgroundColor, + }, + }, + }, }, MuiToggleButton: { styleOverrides: { @@ -275,21 +275,21 @@ theme = createTheme(theme, { borderColor: primaryColor, borderTopColor: `${primaryColor} !important`, '&:hover': { - backgroundColor: zircon2 - } + backgroundColor: zircon2, + }, }, '&:hover': { - backgroundColor: zircon2 - } - } - } + backgroundColor: zircon2, + }, + }, + }, }, MuiToggleButtonGroup: { styleOverrides: { vertical: { borderRadius: 8, border: 'none', - borderColor: zircon + borderColor: zircon, }, firstButton: { borderTop: '1px solid', @@ -297,7 +297,7 @@ theme = createTheme(theme, { borderTopRightRadius: 8, borderTopLeftRadius: 8, borderBottomRightRadius: 8, - borderBottomLeftRadius: 8 + borderBottomLeftRadius: 8, }, lastButton: { borderTop: '1px solid', @@ -305,7 +305,7 @@ theme = createTheme(theme, { borderTopRightRadius: 8, borderTopLeftRadius: 8, borderBottomRightRadius: 8, - borderBottomLeftRadius: 8 + borderBottomLeftRadius: 8, }, middleButton: { borderTop: '1px solid', @@ -313,11 +313,11 @@ theme = createTheme(theme, { borderTopRightRadius: 8, borderTopLeftRadius: 8, borderBottomRightRadius: 8, - borderBottomLeftRadius: 8 - } - } - } - } + borderBottomLeftRadius: 8, + }, + }, + }, + }, }) export default theme diff --git a/packages/admin-ui/src/styling/variables.js b/packages/admin-ui/src/styling/variables.js index d3542141..0ca762df 100644 --- a/packages/admin-ui/src/styling/variables.js +++ b/packages/admin-ui/src/styling/variables.js @@ -168,5 +168,5 @@ export { tableCellHeight, tableHeaderColor, tableErrorColor, - tableSuccessColor + tableSuccessColor, } diff --git a/packages/admin-ui/src/utils/apollo.jsx b/packages/admin-ui/src/utils/apollo.jsx index d141ca15..a9ef9881 100644 --- a/packages/admin-ui/src/utils/apollo.jsx +++ b/packages/admin-ui/src/utils/apollo.jsx @@ -1,6 +1,11 @@ -import { ApolloClient, ApolloProvider, InMemoryCache, ApolloLink } from "@apollo/client"; -import { onError } from "@apollo/client/link/error" -import createUploadLink from "apollo-upload-client/createUploadLink.mjs"; +import { + ApolloClient, + ApolloProvider, + InMemoryCache, + ApolloLink, +} from '@apollo/client' +import { onError } from '@apollo/client/link/error' +import createUploadLink from 'apollo-upload-client/createUploadLink.mjs' import React, { useContext } from 'react' import { useHistory, useLocation } from 'react-router-dom' @@ -8,7 +13,7 @@ import AppContext from 'src/AppContext' const uploadLink = createUploadLink({ credentials: 'include', - uri: `/graphql` + uri: `/graphql`, }) const getClient = (history, location, getUserData, setUserData, setRole) => @@ -22,7 +27,7 @@ const getClient = (history, location, getUserData, setUserData, setRole) => if (location.pathname !== '/login') history.push('/login') } console.log( - `[GraphQL error]: Message: ${message}, Location: ${locations}, Path: ${path}` + `[GraphQL error]: Message: ${message}, Location: ${locations}, Path: ${path}`, ) }) if (networkError) console.log(`[Network error]: ${networkError}`) @@ -31,7 +36,7 @@ const getClient = (history, location, getUserData, setUserData, setRole) => return forward(operation).map(response => { const context = operation.getContext() const { - response: { headers } + response: { headers }, } = context if (headers) { @@ -42,22 +47,22 @@ const getClient = (history, location, getUserData, setUserData, setRole) => return response }) }), - uploadLink + uploadLink, ]), cache: new InMemoryCache(), defaultOptions: { watchQuery: { fetchPolicy: 'no-cache', - errorPolicy: 'ignore' + errorPolicy: 'ignore', }, query: { fetchPolicy: 'no-cache', - errorPolicy: 'all' + errorPolicy: 'all', }, mutate: { - errorPolicy: 'all' - } - } + errorPolicy: 'all', + }, + }, }) const Provider = ({ children }) => { @@ -69,7 +74,7 @@ const Provider = ({ children }) => { location, () => userData, setUserData, - setRole + setRole, ) return {children} diff --git a/packages/admin-ui/src/utils/bill-denominations.js b/packages/admin-ui/src/utils/bill-denominations.js index 508a26fd..99f51ebe 100644 --- a/packages/admin-ui/src/utils/bill-denominations.js +++ b/packages/admin-ui/src/utils/bill-denominations.js @@ -9,9 +9,9 @@ export default { 100: [0xa5, 0x91], 200: [0xa7, 0x93], 500: [0xa9, 0x95], - 1000: [0xad, 0x99] + 1000: [0xad, 0x99], }, - polymer: false + polymer: false, }, ANG: { thickness: 0x0c, @@ -19,9 +19,9 @@ export default { 10: [0x98, 0x8e], 25: [0x98, 0x8e], 50: [0x98, 0x8e], - 100: [0x98, 0x8e] + 100: [0x98, 0x8e], }, - polymer: false + polymer: false, }, AUD: { thickness: 0x0d, @@ -30,9 +30,9 @@ export default { 10: [0x93, 0x7f], 20: [0x9a, 0x86], 50: [0xa1, 0x8d], - 100: [0xa8, 0x94] + 100: [0xa8, 0x94], }, - polymer: true + polymer: true, }, BGN: { thickness: 0x0d, @@ -43,9 +43,9 @@ export default { 10: [0x83, 0x79], 20: [0x88, 0x7e], 50: [0x8d, 0x83], - 100: [0x92, 0x88] + 100: [0x92, 0x88], }, - polymer: false + polymer: false, }, CAD: { thickness: 0x0d, @@ -54,9 +54,9 @@ export default { 10: [0xa2, 0x8e], 20: [0xa2, 0x8e], 50: [0xa2, 0x8e], - 100: [0xa2, 0x8e] + 100: [0xa2, 0x8e], }, - polymer: true + polymer: true, }, CHF: { thickness: 0x0d, @@ -66,9 +66,9 @@ export default { 50: [0x93, 0x7f], 100: [0x9a, 0x86], 200: [0xa1, 0x8d], - 1000: [0xa8, 0x94] + 1000: [0xa8, 0x94], }, - polymer: false + polymer: false, }, CNY: { thickness: 0x0d, @@ -78,9 +78,9 @@ export default { 10: [0x96, 0x82], 20: [0x9b, 0x87], 50: [0xa0, 0x8c], - 100: [0x91, 0xa5] + 100: [0x91, 0xa5], }, - polymer: false + polymer: false, }, COP: { thickness: 0x0d, @@ -90,9 +90,9 @@ export default { 10000: [0x94, 0x80], 20000: [0x99, 0x85], 50000: [0x9e, 0x8a], - 100000: [0xa3, 0x8f] + 100000: [0xa3, 0x8f], }, - polymer: false + polymer: false, }, CRC: { thickness: 0x0d, @@ -102,9 +102,9 @@ export default { 5000: [0x90, 0x86], 10000: [0x97, 0x8d], 20000: [0x9e, 0x94], - 50000: [0xaa, 0x96] + 50000: [0xaa, 0x96], }, - polymer: true + polymer: true, }, CZK: { thickness: 0x0c, @@ -114,9 +114,9 @@ export default { 500: [0xa2, 0x8e], 1000: [0xa8, 0x94], 2000: [0xae, 0x9a], - 5000: [0xb4, 0xa0] + 5000: [0xb4, 0xa0], }, - polymer: false + polymer: false, }, EUR: { thickness: 0x0c, @@ -127,9 +127,9 @@ export default { 50: [0x96, 0x82], 100: [0x9d, 0x89], 200: [0xa3, 0x8f], - 500: [0xaa, 0x96] + 500: [0xaa, 0x96], }, - polymer: false + polymer: false, }, GBP: { thickness: 0x0d, @@ -137,9 +137,9 @@ export default { 5: [0x91, 0x7d], 10: [0x98, 0x84], 20: [0x95, 0x81], - 50: [0xa6, 0x92] + 50: [0xa6, 0x92], }, - polymer: true + polymer: true, }, GHS: { thickness: 0x0c, @@ -149,9 +149,9 @@ export default { 5: [0x97, 0x83], 10: [0x9b, 0x87], 20: [0x9f, 0x8b], - 50: [0xa3, 0x8f] + 50: [0xa3, 0x8f], }, - polymer: false + polymer: false, }, GIP: { thickness: 0x0c, @@ -160,9 +160,9 @@ export default { 10: [0x92, 0x88], 20: [0x9b, 0x91], 50: [0xa2, 0x98], - 100: [0xa9, 0x9f] + 100: [0xa9, 0x9f], }, - polymer: false + polymer: false, }, GTQ: { thickness: 0x0c, @@ -172,9 +172,9 @@ export default { 20: [0xa3, 0x99], 50: [0xa1, 0x97], 100: [0xa1, 0x97], - 200: [0xa1, 0x97] + 200: [0xa1, 0x97], }, - polymer: false + polymer: false, }, HKD: { thickness: 0x0d, @@ -184,9 +184,9 @@ export default { 50: [0x9e, 0x8a], 100: [0xa3, 0x8f], 500: [0xa8, 0x94], - 1000: [0xae, 0x9a] + 1000: [0xae, 0x9a], }, - polymer: false + polymer: false, }, HNL: { thickness: 0x0c, @@ -199,9 +199,9 @@ export default { 50: [0xa6, 0x92], 100: [0xa6, 0x92], 200: [0xa6, 0x92], - 500: [0xa6, 0x92] + 500: [0xa6, 0x92], }, - polymer: false + polymer: false, }, HRK: { thickness: 0x0c, @@ -213,9 +213,9 @@ export default { 100: [0x8f, 0x85], 200: [0x93, 0x89], 500: [0x97, 0x8d], - 1000: [0x9b, 0x91] + 1000: [0x9b, 0x91], }, - polymer: false + polymer: false, }, ILS: { thickness: 0x0d, @@ -223,9 +223,9 @@ export default { 20: [0x8b, 0x77], 50: [0x92, 0x7e], 100: [0x99, 0x85], - 200: [0xa0, 0x8c] + 200: [0xa0, 0x8c], }, - polymer: false + polymer: false, }, JPY: { thickness: 0x0d, @@ -233,9 +233,9 @@ export default { 1000: [0x99, 0x93], 2000: [0x9c, 0x98], 5000: [0x9d, 0x9a], - 10000: [0xa3, 0x9e] + 10000: [0xa3, 0x9e], }, - polymer: false + polymer: false, }, KRW: { thickness: 0x0d, @@ -244,9 +244,9 @@ export default { 2000: [0x96, 0x82], 5000: [0x98, 0x84], 10000: [0x9e, 0x8a], - 50000: [0xa4, 0x90] + 50000: [0xa4, 0x90], }, - polymer: false + polymer: false, }, MDL: { thickness: 0x0c, @@ -259,9 +259,9 @@ export default { 100: [0x83, 0x6f], 200: [0x8f, 0x7b], 500: [0x8f, 0x7b], - 1000: [0x8f, 0x7b] + 1000: [0x8f, 0x7b], }, - polymer: false + polymer: false, }, MKD: { thickness: 0x0c, @@ -273,9 +273,9 @@ export default { 500: [0x9a, 0x90], 1000: [0x9d, 0x93], 2000: [0x9d, 0x93], - 5000: [0xa0, 0x96] + 5000: [0xa0, 0x96], }, - polymer: true + polymer: true, }, MXN: { thickness: 0x0c, @@ -285,9 +285,9 @@ export default { 100: [0x89, 0x7f], 200: [0x90, 0x86], 500: [0x97, 0x8d], - 1000: [0x9e, 0x94] + 1000: [0x9e, 0x94], }, - polymer: true + polymer: true, }, MYR: { thickness: 0x0c, @@ -297,9 +297,9 @@ export default { 10: [0x96, 0x82], 20: [0x9b, 0x87], 50: [0x9b, 0x87], - 100: [0xa0, 0x8c] + 100: [0xa0, 0x8c], }, - polymer: false + polymer: false, }, NAD: { thickness: 0x0c, @@ -308,9 +308,9 @@ export default { 20: [0x8b, 0x81], 50: [0x91, 0x87], 100: [0x97, 0x8d], - 200: [0x9d, 0x93] + 200: [0x9d, 0x93], }, - polymer: false + polymer: false, }, NZD: { thickness: 0x0c, @@ -319,9 +319,9 @@ export default { 10: [0x91, 0x87], 20: [0x96, 0x8c], 50: [0x9b, 0x91], - 100: [0xa0, 0x96] + 100: [0xa0, 0x96], }, - polymer: true + polymer: true, }, PHP: { thickness: 0x0c, @@ -330,9 +330,9 @@ export default { 100: [0xaa, 0x96], 200: [0xaa, 0x96], 500: [0xaa, 0x96], - 1000: [0xaa, 0x96] + 1000: [0xaa, 0x96], }, - polymer: false + polymer: false, }, PLN: { thickness: 0x0c, @@ -342,9 +342,9 @@ export default { 50: [0x89, 0x7f], 100: [0x8f, 0x85], 200: [0x95, 0x8b], - 500: [0x9b, 0x91] + 500: [0x9b, 0x91], }, - polymer: false + polymer: false, }, RON: { thickness: 0x0c, @@ -355,9 +355,9 @@ export default { 50: [0x96, 0x82], 100: [0x9d, 0x89], 200: [0xa0, 0x8c], - 500: [0xa3, 0x8f] + 500: [0xa3, 0x8f], }, - polymer: true + polymer: true, }, SGD: { thickness: 0x0c, @@ -367,9 +367,9 @@ export default { 10: [0x97, 0x83], 50: [0xa6, 0x92], 100: [0xac, 0x98], - 1000: [0xb4, 0xa0] + 1000: [0xb4, 0xa0], }, - polymer: false + polymer: false, }, TWD: { thickness: 0x0d, @@ -378,9 +378,9 @@ export default { 200: [0xa0, 0x8c], 500: [0xa5, 0x91], 1000: [0xaa, 0x96], - 2000: [0xaf, 0x9b] + 2000: [0xaf, 0x9b], }, - polymer: false + polymer: false, }, USD: { thickness: 0x0d, @@ -391,9 +391,9 @@ export default { 10: [0xa6, 0x92], 20: [0xa6, 0x92], 50: [0xa6, 0x92], - 100: [0xa6, 0x92] + 100: [0xa6, 0x92], }, - polymer: false + polymer: false, }, UYU: { thickness: 0x0d, @@ -404,9 +404,9 @@ export default { 200: [0xa4, 0x9a], 500: [0xa4, 0x9a], 1000: [0xa4, 0x9a], - 2000: [0xa4, 0x9a] + 2000: [0xa4, 0x9a], }, - polymer: false + polymer: false, }, XCD: { thickness: 0x0c, @@ -415,9 +415,9 @@ export default { 10: [0x9b, 0x87], 20: [0x9b, 0x87], 50: [0x9b, 0x87], - 100: [0x9b, 0x87] + 100: [0x9b, 0x87], }, - polymer: true + polymer: true, }, ZAR: { thickness: 0x0c, @@ -426,8 +426,8 @@ export default { 20: [0x90, 0x7c], 50: [0x96, 0x82], 100: [0x9c, 0x88], - 200: [0xa2, 0x8e] + 200: [0xa2, 0x8e], }, - polymer: false - } + polymer: false, + }, } diff --git a/packages/admin-ui/src/utils/bill-options.js b/packages/admin-ui/src/utils/bill-options.js index b95cb009..6481375a 100644 --- a/packages/admin-ui/src/utils/bill-options.js +++ b/packages/admin-ui/src/utils/bill-options.js @@ -5,7 +5,7 @@ const getBillOptions = R.curry((locale, denomiations) => { return R.compose( R.map(code => ({ code: parseInt(code), display: code })), R.keys, - R.path([currency, 'lengths']) + R.path([currency, 'lengths']), )(denomiations) }) diff --git a/packages/admin-ui/src/utils/config.js b/packages/admin-ui/src/utils/config.js index 0c282719..b521c471 100644 --- a/packages/admin-ui/src/utils/config.js +++ b/packages/admin-ui/src/utils/config.js @@ -13,30 +13,30 @@ const namespaces = { COIN_ATM_RADAR: 'coinAtmRadar', TERMS_CONDITIONS: 'termsConditions', TRIGGERS: 'triggersConfig', - MACHINE_SCREENS: 'machineScreens' + MACHINE_SCREENS: 'machineScreens', } const mapKeys = R.curry((fn, obj) => - R.fromPairs(R.map(R.adjust(0, fn), R.toPairs(obj))) + R.fromPairs(R.map(R.adjust(0, fn), R.toPairs(obj))), ) const filterByKey = R.curry((fn, obj) => - R.fromPairs(R.filter(it => fn(it[0]), R.toPairs(obj))) + R.fromPairs(R.filter(it => fn(it[0]), R.toPairs(obj))), ) const stripl = R.curry((q, str) => - R.startsWith(q, str) ? str.slice(q.length) : str + R.startsWith(q, str) ? str.slice(q.length) : str, ) const filtered = key => filterByKey(R.startsWith(`${key}_`)) const stripped = key => mapKeys(stripl(`${key}_`)) const fromNamespace = R.curry((key, config) => - R.compose(stripped(key), filtered(key))(config) + R.compose(stripped(key), filtered(key))(config), ) const toNamespace = R.curry((key, config) => - mapKeys(it => `${key}_${it}`)(config) + mapKeys(it => `${key}_${it}`)(config), ) export { fromNamespace, toNamespace, namespaces } diff --git a/packages/admin-ui/src/utils/constants.js b/packages/admin-ui/src/utils/constants.js index ed26830c..959edfc1 100644 --- a/packages/admin-ui/src/utils/constants.js +++ b/packages/admin-ui/src/utils/constants.js @@ -19,5 +19,5 @@ export { MANUAL, WALLET_SCORING_DEFAULT_THRESHOLD, IP_CHECK_REGEX, - SWEEPABLE_CRYPTOS + SWEEPABLE_CRYPTOS, } diff --git a/packages/admin-ui/src/utils/customer.js b/packages/admin-ui/src/utils/customer.js index ac7da296..8a7af097 100644 --- a/packages/admin-ui/src/utils/customer.js +++ b/packages/admin-ui/src/utils/customer.js @@ -8,7 +8,7 @@ const formatFullName = R.pipe( R.values, R.reject(R.allPass([R.isNil, R.isEmpty])), R.map(onlyFirstToUpper), - R.join(' ') + R.join(' '), ) const formatName = idCardData => { @@ -29,7 +29,7 @@ const displayName = ({ customerName, customerIdCardData, customerPhone, - customerEmail + customerEmail, }) => isAnonymous ? 'Anonymous' diff --git a/packages/admin-ui/src/utils/machine.js b/packages/admin-ui/src/utils/machine.js index 362e5e35..991a34fe 100644 --- a/packages/admin-ui/src/utils/machine.js +++ b/packages/admin-ui/src/utils/machine.js @@ -4,44 +4,44 @@ const modelPrettifier = { gaia: 'Gaia', tejo: 'Tejo', aveiro: 'Aveiro', - grandola: 'Grândola' + grandola: 'Grândola', } const cashUnitCapacity = { default: { cashbox: 600, - cassette: 500 + cassette: 500, }, douro: { cashbox: 600, - cassette: 500 + cassette: 500, }, grandola: { cashbox: 2500, - recycler: 2800 + recycler: 2800, }, aveiro: { cashbox: 1500, recycler: 60, escrow: 20, - cassette: 500 + cassette: 500, }, tejo: { // TODO: add support for the different cashbox configuration in Tejo cashbox: 1000, - cassette: 500 + cassette: 500, }, gaia: { - cashbox: 600 + cashbox: 600, }, sintra: { cashbox: 1000, - cassette: 500 + cassette: 500, }, gmuk1: { cashbox: 2200, - cassette: 2000 - } + cassette: 2000, + }, } const getCashUnitCapacity = (model, device) => { diff --git a/packages/admin-ui/src/utils/number.js b/packages/admin-ui/src/utils/number.js index a1221231..ab1aae76 100644 --- a/packages/admin-ui/src/utils/number.js +++ b/packages/admin-ui/src/utils/number.js @@ -17,5 +17,5 @@ export { defaultToZero, transformNumber, numberToFiatAmount, - numberToCryptoAmount + numberToCryptoAmount, } diff --git a/packages/admin-ui/src/utils/string.js b/packages/admin-ui/src/utils/string.js index 63ea1f54..2fc36494 100644 --- a/packages/admin-ui/src/utils/string.js +++ b/packages/admin-ui/src/utils/string.js @@ -5,7 +5,7 @@ const formatLong = value => { return `${value.slice(0, 8)}(...)${value.slice( value.length - 8, - value.length + value.length, )}` } @@ -18,7 +18,7 @@ const onlyFirstToUpper = R.compose(toFirstUpper, R.toLower) const splitOnUpper = R.compose( R.split(' '), R.replace(/([A-Z])/g, ' $1'), - toFirstLower + toFirstLower, ) const startCase = R.compose(R.join(' '), R.map(onlyFirstToUpper), splitOnUpper) @@ -32,5 +32,5 @@ export { onlyFirstToUpper, formatLong, singularOrPlural, - sentenceCase + sentenceCase, } diff --git a/packages/admin-ui/src/utils/timezone-list.js b/packages/admin-ui/src/utils/timezone-list.js index f7984f7d..f0bb37c7 100644 --- a/packages/admin-ui/src/utils/timezone-list.js +++ b/packages/admin-ui/src/utils/timezone-list.js @@ -14,7 +14,7 @@ const timezones = { 'America/Regina': { short: 'CST', long: 'Saskatchewan' }, 'America/Mexico_City': { short: 'CST', - long: 'Guadalajara, Mexico City, Monterrey' + long: 'Guadalajara, Mexico City, Monterrey', }, 'America/Belize': { short: 'CST', long: 'Central America' }, 'America/Detroit': { short: 'EST', long: 'Eastern Time' }, @@ -27,7 +27,7 @@ const timezones = { 'America/Montevideo': { short: 'UYT', long: 'Montevideo' }, 'America/Argentina/Buenos_Aires': { short: null, - long: 'Buenos Aires, Georgetown' + long: 'Buenos Aires, Georgetown', }, 'America/Godthab': { short: null, long: 'Greenland' }, 'America/Los_Angeles': { short: 'PST', long: 'Pacific Time' }, @@ -41,23 +41,23 @@ const timezones = { 'Atlantic/Canary': { short: 'WET', long: 'Canary Islands' }, 'Europe/Belgrade': { short: 'CET', - long: 'Belgrade, Bratislava, Budapest, Ljubljana, Prague' + long: 'Belgrade, Bratislava, Budapest, Ljubljana, Prague', }, 'Europe/Sarajevo': { short: 'CET', long: 'Sarajevo, Skopje, Warsaw, Zagreb' }, 'Europe/Brussels': { short: 'CET', - long: 'Brussels, Copenhagen, Madrid, Paris' + long: 'Brussels, Copenhagen, Madrid, Paris', }, 'Europe/Amsterdam': { short: 'CET', - long: 'Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna' + long: 'Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna', }, 'Africa/Algiers': { short: 'CET', long: 'West Central Africa' }, 'Europe/Bucharest': { short: 'EET', long: 'Bucharest' }, 'Africa/Cairo': { short: 'EET', long: 'Cairo' }, 'Europe/Helsinki': { short: 'EET', - long: 'Helsinki, Kiev, Riga, Sofia, Tallinn, Vilnius' + long: 'Helsinki, Kiev, Riga, Sofia, Tallinn, Vilnius', }, 'Europe/Athens': { short: 'EET', long: 'Athens, Istanbul, Minsk' }, 'Asia/Jerusalem': { short: 'IST', long: 'Jerusalem' }, @@ -82,7 +82,7 @@ const timezones = { 'Asia/Krasnoyarsk': { short: 'KRAT', long: 'Krasnoyarsk' }, 'Asia/Shanghai': { short: 'CST', - long: 'Beijing, Chongqing, Hong Kong SAR, Urumqi' + long: 'Beijing, Chongqing, Hong Kong SAR, Urumqi', }, 'Asia/Kuala_Lumpur': { short: 'MYT', long: 'Kuala Lumpur, Singapore' }, 'Asia/Taipei': { short: 'CST', long: 'Taipei' }, @@ -100,12 +100,12 @@ const timezones = { 'Pacific/Guam': { short: 'ChST', long: 'Guam, Port Moresby' }, 'Asia/Magadan': { short: 'MAGT', - long: 'Magadan, Solomon Islands, New Caledonia' + long: 'Magadan, Solomon Islands, New Caledonia', }, 'Asia/Kamchatka': { short: 'PETT', long: 'Kamchatka, Marshall Islands' }, 'Pacific/Fiji': { short: 'FJT', long: 'Fiji Islands' }, 'Pacific/Auckland': { short: 'NZDT', long: 'Auckland, Wellington' }, - 'Pacific/Tongatapu': { short: null, long: "Nuku'alofa" } + 'Pacific/Tongatapu': { short: null, long: "Nuku'alofa" }, } const buildTzLabels = timezoneList => { @@ -115,29 +115,29 @@ const buildTzLabels = timezoneList => { const isNegative = getTimezoneOffset(value[0]) < 0 const duration = intervalToDuration({ start: 0, - end: Math.abs(getTimezoneOffset(value[0])) + end: Math.abs(getTimezoneOffset(value[0])), }) const hours = duration.hours.toLocaleString('en-US', { minimumIntegerDigits: 2, - useGrouping: false + useGrouping: false, }) const minutes = duration.minutes.toLocaleString('en-US', { minimumIntegerDigits: 2, - useGrouping: false + useGrouping: false, }) const prefix = `(GMT${isNegative ? `-` : `+`}${hours}:${minutes})` acc.push({ label: `${prefix} - ${value[1].long}`, - code: value[0] + code: value[0], }) return acc }, [], - pairs + pairs, ) } diff --git a/packages/admin-ui/src/utils/timezones.js b/packages/admin-ui/src/utils/timezones.js index 88d111ae..f4c1ec14 100644 --- a/packages/admin-ui/src/utils/timezones.js +++ b/packages/admin-ui/src/utils/timezones.js @@ -15,7 +15,7 @@ const formatDate = (date, timezone, pattern) => { const browserTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone const newDate = utcToZonedTime( timezone, - zonedTimeToUtc(browserTimezone, date) + zonedTimeToUtc(browserTimezone, date), ) return format(pattern, newDate) } diff --git a/packages/admin-ui/src/utils/urlResolver.js b/packages/admin-ui/src/utils/urlResolver.js deleted file mode 100644 index fc198043..00000000 --- a/packages/admin-ui/src/utils/urlResolver.js +++ /dev/null @@ -1,9 +0,0 @@ -const url = `https://${ - process.env.NODE_ENV === 'development' - ? window.location.host - : window.location.hostname -}` - -const urlResolver = content => `${url}${content}` - -export { urlResolver }