├── .bowerrc
├── .coveralls.yml
├── .editorconfig
├── .ember-cli
├── .gitignore
├── .jsbeautifyrc
├── .jshintrc
├── .travis.yml
├── Brocfile.js
├── CHANGELOG.md
├── CONTRIBUTING.md
├── CONTRIBUTORS
├── Gruntfile.js
├── LICENSE
├── README.md
├── app
├── adapters
│ ├── ajax.js
│ ├── base.coffee
│ └── fixture.js
├── app.js
├── auth.js
├── components
│ ├── api-key-secret-shower.js
│ ├── api-keys-table.js
│ ├── confirm-modal.js
│ ├── formatted-credit-card-input.coffee
│ ├── formatted-input.coffee
│ ├── formatted-month-year-input.coffee
│ ├── mfa-information-modal.js
│ ├── modal.js
│ ├── title-bar.js
│ └── users-table.js
├── controllers
│ ├── accounts.js
│ ├── application.js
│ ├── bank-accounts.js
│ ├── cards.js
│ ├── credits.js
│ ├── customer.js
│ ├── debits.js
│ ├── dispute.js
│ ├── events.js
│ ├── forgot-password.js
│ ├── holds.js
│ ├── invoice.js
│ ├── loading.coffee
│ ├── log.js
│ ├── login.coffee
│ ├── marketplace.js
│ ├── marketplace
│ │ ├── credits.js
│ │ ├── customers.js
│ │ ├── debits.js
│ │ ├── disputes.js
│ │ ├── funding-instruments.js
│ │ ├── holds.js
│ │ ├── import-payouts.js
│ │ ├── invoices.js
│ │ ├── logs-embedded.js
│ │ ├── logs.js
│ │ ├── orders.js
│ │ ├── refunds.js
│ │ ├── search.js
│ │ ├── settings.js
│ │ └── transactions.js
│ ├── marketplaces.js
│ ├── marketplaces
│ │ └── index.coffee
│ ├── menus
│ │ ├── base-menu.coffee
│ │ └── user-menu.coffee
│ ├── migrate.coffee
│ ├── mixins
│ │ └── action-evented.js
│ ├── modal-notification-center.coffee
│ ├── modals-container.js
│ ├── notification-center.js
│ ├── orders.js
│ ├── otp.coffee
│ ├── refunds.js
│ ├── register-flow
│ │ ├── owner-customer-bank-account.js
│ │ └── user-marketplace.js
│ ├── registration.js
│ ├── reset-password.js
│ ├── reversals.js
│ └── sessions.js
├── helpers
│ ├── colorize-status.js
│ ├── current-year.js
│ ├── format-currency.js
│ ├── format-error.js
│ ├── format-file-size.js
│ ├── format-number.js
│ ├── human-readable-date-long.js
│ ├── human-readable-date-short.js
│ ├── human-readable-date-time.js
│ ├── human-readable-date.js
│ ├── human-readable-time.js
│ ├── inflection.js
│ ├── lower-case.js
│ ├── modal-field-errors.js
│ ├── pretty-print.js
│ ├── sentence-case.js
│ ├── stringify.js
│ └── title-case.js
├── index.html
├── initializers
│ ├── analytics-initializer.coffee
│ ├── auth-injector-initializer.coffee
│ ├── balanced-app-global-initializer.coffee
│ ├── legacy-routes-initializer.coffee
│ ├── link-view-extensions-initializer.coffee
│ ├── models-adapter-initializer.coffee
│ ├── result-loaders-initializer.coffee
│ ├── type-mappings-initializer.coffee
│ ├── user-injector-initializer.coffee
│ └── user-session-initializer.coffee
├── lib
│ ├── ajax.js
│ ├── bank-account-verification-message.js
│ ├── connections
│ │ ├── api-connection.js
│ │ ├── auth-connection.js
│ │ └── base-connection.coffee
│ ├── country-codes.js
│ ├── csv-writer.js
│ ├── error-messages-collection.js
│ ├── errors-logger.js
│ ├── file-readers
│ │ ├── base-validations.js
│ │ ├── credit-creator-csv-object-mapper.js
│ │ ├── credit-creator-fields.js
│ │ ├── credit-creator.js
│ │ ├── credit-creators-collection.js
│ │ ├── credit_creator.js
│ │ ├── csv-reader.js
│ │ ├── existing-customer-credit-creator.js
│ │ └── new-customer-credit-creator.js
│ └── utils.js
├── models
│ ├── api-key.coffee
│ ├── bank-account-validatable.coffee
│ ├── bank-account.js
│ ├── bk
│ │ ├── api-key-production.coffee
│ │ ├── bank-account.coffee
│ │ ├── customer.coffee
│ │ └── marketplace.coffee
│ ├── callback.js
│ ├── card-validatable.coffee
│ ├── card.js
│ ├── claim.js
│ ├── core
│ │ ├── linked-model-array.js
│ │ ├── mixins
│ │ │ └── load-promise.js
│ │ ├── model-array.js
│ │ ├── model.js
│ │ ├── search-model-array.js
│ │ └── type-mappings.coffee
│ ├── credit.js
│ ├── customer.js
│ ├── debit.js
│ ├── dispute-document.js
│ ├── dispute.js
│ ├── download.js
│ ├── event-callback.js
│ ├── event.js
│ ├── factories
│ │ ├── api-key.js
│ │ ├── base.js
│ │ ├── capture-hold-transaction-factory.js
│ │ ├── card-debit-base-transaction-factory.js
│ │ ├── credit-bank-account-transaction-factory.js
│ │ ├── credit-existing-funding-instrument-transaction-factory.js
│ │ ├── debit-card-transaction-factory.js
│ │ ├── debit-existing-bank-account-transaction-factory.js
│ │ ├── debit-existing-card-transaction-factory.js
│ │ ├── debit-existing-funding-instrument-transaction-factory.js
│ │ ├── hold-existing-funding-instrument-transaction-factory.js
│ │ ├── initial-deposit-transaction-factory.js
│ │ ├── marketplace-bank-account-factory.js
│ │ ├── marketplace-factory.js
│ │ ├── refund-debit-transaction-factory.js
│ │ ├── reverse-credit-transaction-factory.js
│ │ ├── transaction-factory.js
│ │ └── user-account-factory.js
│ ├── forgot-password.js
│ ├── funding-instrument.js
│ ├── helpers
│ │ └── meta-dictionary.js
│ ├── hold.js
│ ├── invoice.js
│ ├── justitia-dispute.js
│ ├── log.js
│ ├── login.coffee
│ ├── marketplace.js
│ ├── mixins
│ │ └── funding-instrument-validatable.coffee
│ ├── order.js
│ ├── otp-login.coffee
│ ├── refund.js
│ ├── reset-password.js
│ ├── results-loaders
│ │ ├── base.js
│ │ ├── credit-reversals.js
│ │ ├── customers.js
│ │ ├── dispute-transactions.js
│ │ ├── disputes.js
│ │ ├── funding-instruments.js
│ │ ├── invoice-transactions.js
│ │ ├── invoices.js
│ │ ├── logs.js
│ │ ├── marketplace-search.js
│ │ ├── orders.js
│ │ ├── results-loader-query-string-builder.coffee
│ │ ├── search-logs.js
│ │ └── transactions.js
│ ├── reversal.js
│ ├── session.coffee
│ ├── settlement.js
│ ├── transaction.js
│ ├── user-invite.js
│ ├── user-marketplace.js
│ ├── user.coffee
│ └── verification.js
├── router.coffee
├── routes
│ ├── application.js
│ ├── auth.coffee
│ ├── bank-accounts.js
│ ├── cards.js
│ ├── credits.js
│ ├── customer.js
│ ├── debits.js
│ ├── dispute.js
│ ├── events.js
│ ├── forgot-password.js
│ ├── holds.js
│ ├── index.coffee
│ ├── invalid.js
│ ├── invoice.js
│ ├── loading.coffee
│ ├── log.js
│ ├── login.coffee
│ ├── logout.js
│ ├── marketplace-application.coffee
│ ├── marketplace.coffee
│ ├── marketplace
│ │ ├── customers.js
│ │ ├── disputes.js
│ │ ├── funding-instruments.js
│ │ ├── import-payouts.js
│ │ ├── index.js
│ │ ├── invoices.js
│ │ ├── logs.js
│ │ ├── orders.js
│ │ ├── settings.js
│ │ └── transactions.js
│ ├── marketplaces
│ │ ├── apply.js
│ │ └── index.coffee
│ ├── migrate-connect.coffee
│ ├── migrate-success.coffee
│ ├── migrate.coffee
│ ├── model.js
│ ├── orders.js
│ ├── otp.coffee
│ ├── refunds.js
│ ├── reset-password.js
│ ├── reversals.js
│ ├── setup-guest-user.js
│ └── title.js
├── serializers
│ ├── rev0.js
│ └── rev1.js
├── stores
│ └── balanced.coffee
├── styles
│ ├── account_security.less
│ ├── alerts.less
│ ├── app.less
│ ├── components.less
│ ├── csv_upload.less
│ ├── custom_inputs.less
│ ├── custom_tables.less
│ ├── datepicker.less
│ ├── dropdowns.less
│ ├── events.less
│ ├── form_group.less
│ ├── forms.less
│ ├── google_prettify.less
│ ├── key_value.less
│ ├── loading-spinner.less
│ ├── loading.less
│ ├── login.less
│ ├── logs.less
│ ├── marketplace.less
│ ├── migrate.less
│ ├── pages.less
│ ├── popovers.less
│ ├── print.less
│ ├── progress_bar.less
│ ├── results.less
│ ├── scaffolding.less
│ └── search.less
├── templates
│ ├── accounts.hbs
│ ├── activity.hbs
│ ├── application.hbs
│ ├── bank-accounts.hbs
│ ├── cards.hbs
│ ├── clean-page-layout.hbs
│ ├── components
│ │ ├── api-key-secret-shower.hbs
│ │ ├── api-keys-table.hbs
│ │ ├── confirm-modal.hbs
│ │ ├── form-field-messages.hbs
│ │ ├── title-bar.hbs
│ │ ├── user-delete-modal.hbs
│ │ └── users-table.hbs
│ ├── credits.hbs
│ ├── customer.hbs
│ ├── debits.hbs
│ ├── detail-views
│ │ ├── key-value.hbs
│ │ ├── resource-summary.hbs
│ │ ├── side-panel-layout.hbs
│ │ ├── summary-items
│ │ │ ├── base.hbs
│ │ │ └── label-base.hbs
│ │ ├── summary-section-base.hbs
│ │ ├── tab.hbs
│ │ └── titled-key-values-section.hbs
│ ├── dispute.hbs
│ ├── events.hbs
│ ├── footer.hbs
│ ├── forgot-password.hbs
│ ├── form-fields
│ │ ├── amount-form-field.hbs
│ │ ├── base-form-field.hbs
│ │ ├── cents-form-field.hbs
│ │ ├── checkbox-form-field.hbs
│ │ ├── control-group-field.hbs
│ │ ├── credit-card-expiration-date-form-field.hbs
│ │ ├── credit-card-number-form-field.hbs
│ │ ├── date-picker.hbs
│ │ ├── date-select-form-field.hbs
│ │ ├── file-drop-field.hbs
│ │ ├── form-field-layout.hbs
│ │ ├── form-section.hbs
│ │ ├── meta-form-field.hbs
│ │ ├── month-year-select-form-field.hbs
│ │ ├── radio-form-field.hbs
│ │ ├── select-form-field.hbs
│ │ ├── static-text-form-field.hbs
│ │ └── textarea-form-field.hbs
│ ├── header.hbs
│ ├── holds.hbs
│ ├── import-payouts
│ │ ├── _account-summary.hbs
│ │ ├── _instructions.hbs
│ │ ├── _submit-area.hbs
│ │ ├── confirm-clear-all-modal.hbs
│ │ ├── confirm-remove-row-modal.hbs
│ │ ├── default-csv-upload-cell.hbs
│ │ ├── index.hbs
│ │ └── results-table.hbs
│ ├── invoice.hbs
│ ├── loading.hbs
│ ├── log.hbs
│ ├── login.hbs
│ ├── logout.hbs
│ ├── marketplace-application.hbs
│ ├── marketplace
│ │ ├── customers.hbs
│ │ ├── disputes.hbs
│ │ ├── funding-instruments.hbs
│ │ ├── invoices.hbs
│ │ ├── logs.hbs
│ │ ├── orders.hbs
│ │ ├── payments-layout.hbs
│ │ ├── search.hbs
│ │ ├── settings.hbs
│ │ └── transactions.hbs
│ ├── marketplaces-list.hbs
│ ├── marketplaces.hbs
│ ├── marketplaces
│ │ ├── add-existing-marketplace.hbs
│ │ ├── add-test-marketplace.hbs
│ │ ├── index.hbs
│ │ └── marketplace-link-bar.hbs
│ ├── menus
│ │ ├── base-menu-layout.hbs
│ │ ├── dropdown-menu-items
│ │ │ ├── open-modal.hbs
│ │ │ └── route-link.hbs
│ │ ├── marketplace-escrow-menu.hbs
│ │ ├── order-sort-menu.hbs
│ │ └── user-menu.hbs
│ ├── meta-list.hbs
│ ├── migrate-connect-success.hbs
│ ├── migrate-connect.hbs
│ ├── migrate-success.hbs
│ ├── migrate.hbs
│ ├── modals
│ │ ├── action-buttons.hbs
│ │ ├── add-callback-modal.hbs
│ │ ├── add-funds-modal.hbs
│ │ ├── api-key-create-modal.hbs
│ │ ├── api-key-delete-modal.hbs
│ │ ├── bank-account-credit-create-modal.hbs
│ │ ├── bank-account-verification-confirm-modal.hbs
│ │ ├── base-modal-layout.hbs
│ │ ├── callback-delete-modal.hbs
│ │ ├── capture-hold-modal.hbs
│ │ ├── card-debit-create-modal.hbs
│ │ ├── change-email-modal.hbs
│ │ ├── change-password-modal.hbs
│ │ ├── confirm-modal.hbs
│ │ ├── credit-customer-modal.hbs
│ │ ├── credit-funding-instrument.hbs
│ │ ├── credit-order-modal.hbs
│ │ ├── customer-bank-account-create-modal.hbs
│ │ ├── customer-card-create-modal.hbs
│ │ ├── customer-info-modal.hbs
│ │ ├── debit-customer-modal.hbs
│ │ ├── debit-funding-instrument.hbs
│ │ ├── edit-description-modal.hbs
│ │ ├── enable-auth-modal.hbs
│ │ ├── evidence-portal-modal.hbs
│ │ ├── export-csv-modal.hbs
│ │ ├── form-modal-layout.hbs
│ │ ├── full-modal-layout.hbs
│ │ ├── funding-instrument-delete-modal.hbs
│ │ ├── hold-card-modal.hbs
│ │ ├── invoice-funding-source-edit-modal.hbs
│ │ ├── marketplace-application-create.hbs
│ │ ├── marketplace-bank-account-create-modal.hbs
│ │ ├── marketplace-create.hbs
│ │ ├── marketplace-delete-modal.hbs
│ │ ├── marketplace-edit-modal.hbs
│ │ ├── marketplace-user-create-modal.hbs
│ │ ├── marketplace-user-delete-modal.hbs
│ │ ├── meta-edit-modal.hbs
│ │ ├── modal-base-footer.hbs
│ │ ├── modal-errors.hbs
│ │ ├── progress-bar-modal.hbs
│ │ ├── refund-debit-modal.hbs
│ │ ├── reverse-credit-modal.hbs
│ │ ├── search-modal-layout.hbs
│ │ ├── search-modal.hbs
│ │ ├── verify-bank-account.hbs
│ │ ├── void-hold-modal.hbs
│ │ └── withdraw-funds-modal.hbs
│ ├── notification-center.hbs
│ ├── orders.hbs
│ ├── otp.hbs
│ ├── page-form.hbs
│ ├── page-navigations
│ │ └── page-navigation-layout.hbs
│ ├── pretty-print.hbs
│ ├── refunds.hbs
│ ├── register-flow
│ │ ├── confirm-close-registration-modal.hbs
│ │ ├── next-step-modal.hbs
│ │ └── user-create-modal.hbs
│ ├── reset-password.hbs
│ ├── resource-documents.hbs
│ ├── resource-events.hbs
│ ├── resource-logs.hbs
│ ├── results
│ │ ├── associated-transactions-table.hbs
│ │ ├── customers-table.hbs
│ │ ├── date-filter-header.hbs
│ │ ├── disputes-table.hbs
│ │ ├── embedded-funding-instruments-table.hbs
│ │ ├── embedded-transactions-table.hbs
│ │ ├── funding-instruments-table.hbs
│ │ ├── grouped-transaction-row.hbs
│ │ ├── grouped-transactions-table-layout.hbs
│ │ ├── invoice-table.hbs
│ │ ├── invoice-transactions-table.hbs
│ │ ├── invoices-table.hbs
│ │ ├── keyboard-shortcuts.hbs
│ │ ├── logs-embedded-table.hbs
│ │ ├── logs-table.hbs
│ │ ├── no-results.hbs
│ │ ├── order-transactions-table.hbs
│ │ ├── orders-table.hbs
│ │ ├── results-dropdown-filter.hbs
│ │ ├── results-filter-list-item.hbs
│ │ ├── results-filters-header.hbs
│ │ ├── results-load-more.hbs
│ │ ├── sort-results-loader-header.hbs
│ │ └── transactions-table.hbs
│ ├── reversals.hbs
│ ├── sidebar
│ │ ├── basic-link-sidebar-item.hbs
│ │ └── sidebar.hbs
│ └── tables
│ │ └── cells
│ │ ├── linked-card.hbs
│ │ ├── linked-date-cell.hbs
│ │ ├── linked-text-cell.hbs
│ │ └── unlinked-status-cell.hbs
├── utils
│ ├── analytics_logger.coffee
│ ├── computed.js
│ ├── constants.js
│ ├── constants
│ │ └── cookie.coffee
│ ├── create-redirect-route.js
│ ├── error-handlers
│ │ ├── base.coffee
│ │ └── validation-server-error-handler.coffee
│ └── validation-helpers.js
└── views
│ ├── detail-views
│ ├── api-model-panel.js
│ ├── body-panel.js
│ ├── description-lists
│ │ ├── bank-account-titled-key-values-section.js
│ │ ├── card-titled-key-values-section.js
│ │ ├── customer-titled-key-values-section.js
│ │ ├── dispute-titled-key-values-section.js
│ │ ├── invoice-titled-key-values-section.js
│ │ ├── key-value-generator.coffee
│ │ ├── list-value-generator.coffee
│ │ ├── log-titled-key-values-section.js
│ │ ├── order-titled-key-values-section.js
│ │ ├── settings-marketplace-titled-key-values-section.js
│ │ ├── settings-owner-titled-key-values-section.js
│ │ ├── titled-key-values-section.js
│ │ └── transaction-titled-key-values-section.js
│ ├── key-value.js
│ ├── linked-key-value.js
│ ├── main-panel.js
│ ├── order-main-panel.js
│ ├── resource-summaries
│ │ └── resource-summary-base.coffee
│ ├── side-panel.js
│ ├── summary-items
│ │ ├── bank-account-status.coffee
│ │ ├── base-status.coffee
│ │ ├── base.coffee
│ │ ├── card-status.coffee
│ │ ├── customer-status.coffee
│ │ ├── customer.coffee
│ │ ├── dispute-status.coffee
│ │ ├── funding-instrument.coffee
│ │ ├── invoice-status.coffee
│ │ ├── label-base.coffee
│ │ ├── log-status.coffee
│ │ ├── model-description.coffee
│ │ ├── order-status.coffee
│ │ ├── order.coffee
│ │ ├── refund-status.coffee
│ │ ├── summary-item-view-generator.coffee
│ │ ├── transaction-status.coffee
│ │ └── transaction.coffee
│ ├── summary-sections
│ │ ├── bank-account-summary-section.js
│ │ ├── card-summary-section.js
│ │ ├── credit-summary-section.js
│ │ ├── customer-summary-section.js
│ │ ├── debit-summary-section.coffee
│ │ ├── dispute-summary-section.js
│ │ ├── hold-summary-section.coffee
│ │ ├── invoice-summary-section.js
│ │ ├── log-summary-section.coffee
│ │ ├── order-summary-section.js
│ │ ├── refund-summary-section.js
│ │ ├── reversal-summary-section.js
│ │ ├── summary-section-base.coffee
│ │ ├── summary-section-resource-list.coffee
│ │ └── transaction-base-summary-section.coffee
│ └── tabs
│ │ ├── order-tab.js
│ │ └── tab.js
│ ├── forgot-password.js
│ ├── form-fields
│ ├── amount-form-field.js
│ ├── base-form-field.coffee
│ ├── cents-form-field.js
│ ├── checkbox-form-field.js
│ ├── control-group-field.js
│ ├── country-select.js
│ ├── credit-card-expiration-date-form-field.coffee
│ ├── credit-card-number-form-field.coffee
│ ├── date-picker.js
│ ├── date-select-form-field.js
│ ├── file-drop-field.js
│ ├── form-section.js
│ ├── meta-form-field.js
│ ├── month-year-select-form-field.js
│ ├── radio-button.js
│ ├── radio-form-field.js
│ ├── search-date-picker.js
│ ├── select-form-field.js
│ ├── static-text-form-field.js
│ ├── text-field.js
│ ├── text-form-field.js
│ ├── textarea-form-field.js
│ └── toc-checkbox-form-field.js
│ ├── import-payouts
│ ├── completed-filter.js
│ ├── confirm-clear-all-modal.coffee
│ ├── confirm-remove-row-modal.coffee
│ ├── csv-progress-bar-modal.js
│ ├── csv-upload-cell.js
│ ├── currency-csv-upload-cell.js
│ ├── default-csv-upload-cell.js
│ ├── existing-customer-identity-csv-upload-cell.js
│ ├── import-payouts.js
│ ├── initialize-popover.js
│ ├── marketplace-csv-payments-table.js
│ ├── marketplace-invalid-csv-payments-table.js
│ ├── marketplace-valid-csv-payments-table.js
│ ├── parse-credits-csv-progress-bar-modal.js
│ └── save-credits-csv-progress-bar-modal.js
│ ├── login.coffee
│ ├── logout.coffee
│ ├── logs
│ └── log.js
│ ├── marketplace
│ ├── orders.js
│ ├── search.js
│ └── transactions.js
│ ├── marketplaces
│ ├── add-existing-marketplace.js
│ ├── add-test-marketplace.js
│ └── marketplace-link-bar.js
│ ├── menus
│ ├── base-menu.coffee
│ ├── dropdown-menu-items
│ │ ├── base.coffee
│ │ ├── open-modal.coffee
│ │ ├── otp-setting-trigger.coffee
│ │ └── route-link.coffee
│ ├── marketplace-escrow-menu.coffee
│ ├── order-sort-menu.coffee
│ └── user-menu.coffee
│ ├── meta-list.js
│ ├── migrate-connect-success.coffee
│ ├── migrate-connect.coffee
│ ├── migrate-success.coffee
│ ├── migrate.coffee
│ ├── modal-notification-center.js
│ ├── modals-container.coffee
│ ├── modals
│ ├── action-buttons.js
│ ├── add-callback-modal.js
│ ├── add-customer-modal.js
│ ├── add-funds-modal.js
│ ├── api-key-create-modal.js
│ ├── api-key-delete-modal.js
│ ├── bank-account-credit-create-modal.js
│ ├── bank-account-verification-confirm-modal.js
│ ├── base-funding-instrument-modal.js
│ ├── callback-delete-modal.js
│ ├── capture-hold-modal.js
│ ├── card-debit-create-modal.js
│ ├── change-email-modal.js
│ ├── change-password-modal.js
│ ├── credit-customer-modal.js
│ ├── credit-funding-instrument-modal.js
│ ├── credit-order-modal.js
│ ├── customer-bank-account-create-modal.js
│ ├── customer-card-create-modal.js
│ ├── debit-customer-modal.js
│ ├── debit-funding-instrument-modal.js
│ ├── disable-auth-modal.js
│ ├── edit-customer-info-modal.js
│ ├── edit-description-modal.js
│ ├── enable-auth-modal.coffee
│ ├── evidence-portal-modal.js
│ ├── export-csv-modal.js
│ ├── funding-instrument-delete-modal.js
│ ├── hold-card-modal.js
│ ├── invoice-funding-source-edit-modal.js
│ ├── marketplace-application-create.coffee
│ ├── marketplace-bank-account-create-modal.coffee
│ ├── marketplace-create-modal.coffee
│ ├── marketplace-delete-modal.js
│ ├── marketplace-edit-modal.js
│ ├── marketplace-user-create-modal.js
│ ├── marketplace-user-delete-modal.js
│ ├── meta-edit-modal.js
│ ├── mixins
│ │ ├── display-model-errors-modal-mixin.js
│ │ ├── form-modal-mixin.coffee
│ │ ├── full-modal-mixin.coffee
│ │ ├── object-action-mixin.coffee
│ │ ├── object-validate-and-save-mixin.js
│ │ ├── open-next-modal-mixin.coffee
│ │ ├── search-modal-mixin.coffee
│ │ └── wide-modal-mixin.js
│ ├── modal-base-footer.js
│ ├── modal-base.js
│ ├── modal.js
│ ├── object-creator-modal-base.js
│ ├── progress-bar-modal.js
│ ├── refund-debit-modal.js
│ ├── reverse-credit-modal.js
│ ├── search-modal.coffee
│ ├── verify-bank-account-modal.js
│ ├── void-hold-modal.js
│ └── withdraw-funds-modal.js
│ ├── notification-center.coffee
│ ├── otp.coffee
│ ├── page-navigations
│ ├── invoice-page-navigation.js
│ ├── log-page-navigation.js
│ ├── page-navigation.js
│ └── transaction-page-navigation.js
│ ├── popover.coffee
│ ├── pretty-print.js
│ ├── register-flow
│ ├── confirm-close-registration-modal.coffee
│ ├── next-step.js
│ ├── register-flow-base-modal.js
│ └── user-create-modal.js
│ ├── reset-password.js
│ ├── resource-documents.js
│ ├── resource-events.js
│ ├── resource-logs.js
│ ├── results
│ ├── associated-transactions-table.js
│ ├── customers-table.js
│ ├── date-filter-header.js
│ ├── disputes-status-results-dropdown-filter.js
│ ├── disputes-table.js
│ ├── embedded-disputes-table.js
│ ├── embedded-funding-instruments-table.js
│ ├── embedded-transactions-table.js
│ ├── funding-instruments-table.js
│ ├── grouped-order-row.js
│ ├── grouped-transaction-row.js
│ ├── grouped-transactions-table.js
│ ├── invoice-table.js
│ ├── invoice-transactions-table.js
│ ├── invoices-table.js
│ ├── keyboard-shortcuts.js
│ ├── logs-embedded-table.js
│ ├── logs-endpoint-results-dropdown-filter.js
│ ├── logs-status-results-dropdown-filter.js
│ ├── logs-table.js
│ ├── no-results.js
│ ├── order-transactions-table.js
│ ├── orders-table.js
│ ├── payment-methods-results-dropdown-filter.js
│ ├── results-dropdown-filter.js
│ ├── results-filter-list-item.js
│ ├── results-load-more.js
│ ├── results-loader-sort-column-header.js
│ ├── results-sortable-column-header.js
│ ├── results-table.js
│ ├── search-payment-methods-results-dropdown-filter.js
│ ├── search-results-dropdown-filter.js
│ ├── search-results-loader-sort-column-header.js
│ ├── search-transactions-status-results-dropdown-filter.js
│ ├── transactions-status-results-dropdown-filter.js
│ ├── transactions-table.js
│ ├── transactions-type-results-dropdown-filter.js
│ └── transactions-type-search-results-dropdown-filter.js
│ ├── sidebar
│ ├── base.coffee
│ ├── basic-link-sidebar-item.js
│ ├── marketplace-sidebar.js
│ ├── sidebar-item.js
│ └── sidebar.coffee
│ └── tables
│ └── cells
│ ├── linked-card.js
│ ├── linked-date-cell.js
│ ├── linked-text-cell.js
│ ├── linked-two-lines-cell.js
│ ├── logs
│ ├── log-description-cell.js
│ └── log-status-cell.js
│ ├── table-cell-base.js
│ ├── titled-linked-cell.js
│ └── transaction
│ ├── amount-cell.js
│ ├── customer-cell.js
│ └── unlinked-status-cell.js
├── bower.json
├── config
└── environment.js
├── package.json
├── public
├── crossdomain.xml
├── images
│ ├── bank-account-instructions.png
│ ├── credit-card-instructions.png
│ ├── csv_table_existing.png
│ ├── csv_table_new_1.png
│ ├── csv_table_new_2.png
│ ├── google_authenticator.png
│ ├── loading.png
│ └── logo_3dots.png
├── notfound
│ ├── css
│ │ └── style.min.css
│ ├── fonts
│ │ ├── PlantinStd-Italic.css
│ │ ├── PlantinStd-Italic.eot
│ │ ├── PlantinStd-Italic.svg
│ │ ├── PlantinStd-Italic.ttf
│ │ ├── PlantinStd-Italic.woff
│ │ ├── Proxima Nova Bold.eot
│ │ ├── Proxima Nova Bold.svg
│ │ ├── Proxima Nova Bold.ttf
│ │ ├── Proxima Nova Bold.woff
│ │ ├── Proxima Nova Light.eot
│ │ ├── Proxima Nova Light.svg
│ │ ├── Proxima Nova Light.ttf
│ │ ├── Proxima Nova Light.woff
│ │ ├── Proxima Nova Reg It.eot
│ │ ├── Proxima Nova Reg It.svg
│ │ ├── Proxima Nova Reg It.ttf
│ │ ├── Proxima Nova Reg It.woff
│ │ ├── Proxima Nova Reg.eot
│ │ ├── Proxima Nova Reg.svg
│ │ ├── Proxima Nova Reg.ttf
│ │ ├── Proxima Nova Reg.woff
│ │ ├── Proxima Nova Sbold.eot
│ │ ├── Proxima Nova Sbold.svg
│ │ ├── Proxima Nova Sbold.ttf
│ │ ├── Proxima Nova Sbold.woff
│ │ ├── balanced-icon.eot
│ │ ├── balanced-icon.svg
│ │ ├── balanced-icon.ttf
│ │ ├── balanced-icon.woff
│ │ ├── balanced.eot
│ │ ├── balanced.svg
│ │ ├── balanced.ttf
│ │ └── balanced.woff
│ ├── images
│ │ ├── balanced_logo_large.png
│ │ ├── clouds.png
│ │ ├── green_balloon.png
│ │ ├── red_balloon.png
│ │ └── yellow_balloon.png
│ └── notfound.html
└── robots.txt
├── testem.json
├── tests
├── .jshintrc
├── fixtures
│ ├── dispute-documents.js
│ ├── disputes.js
│ ├── invoices.js
│ ├── marketplace-users.js
│ ├── marketplace.js
│ ├── registration.js
│ └── user.js
├── helpers
│ ├── check-elements.coffee
│ ├── create-objects.coffee
│ ├── fixtures-adapter.coffee
│ ├── helpers.js
│ ├── models.coffee
│ ├── resolver.js
│ ├── setup-created-marketplace.coffee
│ ├── setup-marketplace.coffee
│ ├── sinon-restore.coffee
│ ├── start-app.js
│ └── testing.js
├── index.html
├── integration
│ ├── account-security-test.coffee
│ ├── add-customer-test.coffee
│ ├── bank-account-test.js
│ ├── card-test.js
│ ├── change-email-test.js
│ ├── change-password-test.js
│ ├── charge-card-test.js
│ ├── credits-test.js
│ ├── customer-page-add-test.js
│ ├── customer-page-credit-test.js
│ ├── customer-page-delete-test.js
│ ├── customer-test.js
│ ├── debits-test.js
│ ├── disputes-test.js
│ ├── forgot-password-test.js
│ ├── guest-user-flow-test.js
│ ├── holds-test.js
│ ├── import-payments-test.js
│ ├── invoices-test.js
│ ├── login-test.js
│ ├── logs-test.js
│ ├── marketplace-api-key-create-test.js
│ ├── marketplace-registration-test.coffee
│ ├── marketplace-settings-api-keys-test.js
│ ├── marketplace-settings-guest-test.js
│ ├── marketplace-settings-test.js
│ ├── marketplace-settings-webhooks-test.js
│ ├── marketplaces-test.js
│ ├── orders-test.js
│ ├── pay-seller-test.js
│ ├── refunds-test.js
│ ├── reset-password-test.js
│ ├── reversals-test.js
│ ├── search-test.js
│ └── transactions-test.js
├── phantom-runner.js
├── test-helper.js
└── unit
│ ├── helpers
│ └── colorize-status-test.coffee
│ ├── models
│ ├── associations-test.js
│ ├── bank-account-test.js
│ ├── credit-test.js
│ ├── customer-test.js
│ ├── dispute-test.js
│ ├── factories
│ │ ├── api-key-factory-test.js
│ │ ├── base-factory-test.js
│ │ ├── credit-bank-account-transaction-factory-test.js
│ │ ├── debit-card-transaction-factory-test.js
│ │ ├── marketplace-bank-account-factory-test.js
│ │ ├── marketplace-factory-test.js
│ │ ├── transaction-factory-test.js
│ │ └── user-account-factory-test.js
│ ├── hold-test.coffee
│ ├── marketplace-test.js
│ ├── meta-dictionary-test.js
│ ├── model-test.js
│ ├── otp-login-test.coffee
│ ├── results-loaders
│ │ ├── marketplace-search-results-loader-test.js
│ │ ├── results-loader-query-string-builder-test.js
│ │ └── results-loader-test.js
│ ├── rev1-serializer-test.js
│ └── transaction-test.js
│ ├── utils
│ ├── analytics-logger-test.coffee
│ └── computed-test.js
│ └── views
│ ├── detail-views
│ ├── description-lists
│ │ └── titled-key-values-section-test.js
│ ├── resource-summary-base-test.coffee
│ └── summary-items
│ │ └── bank-account-status-test.coffee
│ ├── import-payouts
│ └── import-payouts-test.js
│ ├── modals
│ ├── customer-bank-account-create-modal-test.js
│ ├── meta-edit-modal-view-test.js
│ ├── object-creator-modal-base-test.js
│ └── search-modal-test.coffee
│ ├── results
│ └── order-transactions-table-test.js
│ └── sidebar
│ ├── marketplace-sidebar-test.js
│ └── sidebar-test.js
└── vendor
├── daterangepicker.js
├── ember-validations.prod.js
└── moment-business-days.js
/.bowerrc:
--------------------------------------------------------------------------------
1 | {
2 | "directory": "bower_components",
3 | "analytics": false
4 | }
5 |
--------------------------------------------------------------------------------
/.coveralls.yml:
--------------------------------------------------------------------------------
1 | service_name: travis-ci
2 | repo_token: m3Z9p5t4SQLKw22IE9mkdr1iFSVpeJPoV
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # EditorConfig helps developers define and maintain consistent
2 | # coding styles between different editors and IDEs
3 | # editorconfig.org
4 |
5 | root = true
6 |
7 | [*]
8 |
9 | # Change these settings to your own preference
10 | indent_style = tab
11 | indent_size = 4
12 |
13 | # We recommend you to keep these unchanged
14 | end_of_line = lf
15 | charset = utf-8
16 | trim_trailing_whitespace = true
17 | insert_final_newline = true
18 |
19 | [*.md]
20 | trim_trailing_whitespace = false
21 |
22 | [*.hbs]
23 | indent_style = tab
24 | indent_size = 4
25 |
26 | [*.less]
27 | indent_style = space
28 | indent_size = 2
29 |
30 | [*.js]
31 | indent_style = tab
32 | indent_size = 4
33 |
34 | [*.json]
35 | indent_style = tab
36 | indent_size = 4
37 |
--------------------------------------------------------------------------------
/.ember-cli:
--------------------------------------------------------------------------------
1 | {
2 | "disableAnalytics": true
3 | }
4 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | lib-cov
3 | *.seed
4 | *.log
5 | *.csv
6 | *.dat
7 | *.out
8 | *.pid
9 | *.gz
10 |
11 | tmp
12 | bower_components
13 |
14 | pids
15 | logs/*
16 | ./results
17 | build/*
18 | dist/*
19 | js/*
20 | report/*
21 | coverage/*
22 | temp/*
23 | config/extensions.json
24 |
25 | ext.json
26 | npm-debug.log
27 | node_modules
28 |
29 | # bower
30 | static/javascripts
31 | .bower-cache
32 | .bower-registry
33 | .bower-tmp
34 |
35 | # emacs and other IDEs
36 | *~
37 | *.iml
38 |
39 | # sublime project files
40 | *.sublime-project
41 | *.sublime-workspace
42 |
43 | # development ssl certificate
44 | *.crt
45 | *.key
46 |
47 |
--------------------------------------------------------------------------------
/.jsbeautifyrc:
--------------------------------------------------------------------------------
1 | {
2 | "indentChar": "\t",
3 | "indentSize": 1,
4 | "breakChainedMethods": false
5 | }
6 |
--------------------------------------------------------------------------------
/.jshintrc:
--------------------------------------------------------------------------------
1 | {
2 | "indent": 4,
3 | "white": false,
4 | "curly": true,
5 | "eqeqeq": true,
6 | "immed": true,
7 | "latedef": true,
8 | "newcap": true,
9 | "noarg": true,
10 | "sub": true,
11 | "undef": true,
12 | "boss": true,
13 | "eqnull": true,
14 | "esnext": true,
15 | "browser": true,
16 | "jquery": true,
17 | "camelcase": false,
18 | "predef": {
19 | "BalancedApp": true,
20 | "module": true,
21 | "require": true,
22 | "Ember": true,
23 | "balanced": true,
24 | "moment": true,
25 | "DS": true,
26 | "ENV": true,
27 | "_": true,
28 | "Testing": true,
29 | "Raven": true,
30 | "prettyPrint": true
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | ---
2 | language: node_js
3 |
4 | sudo: false
5 |
6 | install:
7 | - npm install phantomjs
8 | - npm install -g bower
9 | - npm install
10 | - bower install
11 |
12 | script:
13 | - npm test
14 |
--------------------------------------------------------------------------------
/app/app.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import Resolver from 'ember/resolver';
3 | import loadInitializers from 'ember/load-initializers';
4 | import config from './config/environment';
5 |
6 | Ember.MODEL_FACTORY_INJECTIONS = true;
7 | Ember.deprecate = function() {};
8 |
9 | var App = Ember.Application.extend({
10 | modulePrefix: config.modulePrefix,
11 | podModulePrefix: config.podModulePrefix,
12 | Resolver: Resolver,
13 | customEvents: {
14 | changeDate: 'changeDate'
15 | },
16 | ready: function() {
17 | $('#balanced-loading').remove();
18 | }
19 | });
20 |
21 | loadInitializers(App, config.modulePrefix);
22 |
23 | export default App;
24 |
--------------------------------------------------------------------------------
/app/components/api-key-secret-shower.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | var ApiKeySecretShowerComponent = Ember.Component.extend({
4 | showSecret: false,
5 | actions: {
6 | showKeySecret: function() {
7 | this.set('showSecret', true);
8 | }
9 | }
10 | });
11 |
12 | export default ApiKeySecretShowerComponent;
13 |
--------------------------------------------------------------------------------
/app/components/api-keys-table.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 | import Auth from "balanced-dashboard/auth";
3 |
4 | var ApiKeysTableComponent = Ember.Component.extend({
5 | oneKey: Ember.computed.equal('keys', 1),
6 | haveOtherSecrets: function() {
7 | return this.get('keys').filterBy('secret').length > 1;
8 | }.property('keys.@each'),
9 |
10 | knownApiKeys: Ember.computed.filterBy("keys", "secret"),
11 | canDeleteApiKeys: Ember.computed.gt("knownApiKeys.length", 1),
12 |
13 | actions: {
14 | delete: function(key) {
15 | this.get("container").lookup("controller:application").send("openModal", "modals/api-key-delete-modal", key);
16 | }
17 | }
18 | });
19 |
20 | export default ApiKeysTableComponent;
21 |
--------------------------------------------------------------------------------
/app/components/confirm-modal.js:
--------------------------------------------------------------------------------
1 | import ModalComponent from "./modal";
2 |
3 | var ConfirmModalComponent = ModalComponent.extend({
4 |
5 | reset: function() {
6 | this.off("cancel");
7 | this.off("confirm");
8 | },
9 |
10 | actions: {
11 | cancel: function() {
12 | this.trigger("cancel");
13 | },
14 | confirm: function() {
15 | this.trigger("confirm");
16 | }
17 | }
18 | });
19 |
20 | export default ConfirmModalComponent;
21 |
--------------------------------------------------------------------------------
/app/components/formatted-credit-card-input.coffee:
--------------------------------------------------------------------------------
1 | `import FormattedInputComponent from "./formatted-input";`
2 |
3 | FormattedCreditCardInputComponent = FormattedInputComponent.extend(
4 | format: '{{9999}} {{9999}} {{9999}} {{9999}}'
5 | )
6 |
7 | `export default FormattedCreditCardInputComponent;`
8 |
--------------------------------------------------------------------------------
/app/components/formatted-input.coffee:
--------------------------------------------------------------------------------
1 | `import Ember from "ember";`
2 |
3 | FormattedInputComponent = Ember.TextField.extend(
4 | tagName: "input"
5 | type: "text"
6 |
7 | getFormatterAttributes: ->
8 | value = @get("format")
9 | if Ember.typeOf(value) == "array"
10 | return patterns: value
11 | else
12 | return pattern: value
13 |
14 | didInsertElement: ->
15 | @_super()
16 | formatter = new window.Formatter(@element, @getFormatterAttributes())
17 | )
18 |
19 | `export default FormattedInputComponent;`
20 |
--------------------------------------------------------------------------------
/app/components/formatted-month-year-input.coffee:
--------------------------------------------------------------------------------
1 | `import FormattedInputComponent from "./formatted-input";`
2 |
3 | defineFormat = (regexp, value) ->
4 | object = {}
5 | object[regexp] = value
6 | return object
7 |
8 | FormattedMonthYearInputComponent = FormattedInputComponent.extend(
9 | format: [
10 | defineFormat("^[2-9]", "0{{9}} / {{9999}}")
11 | defineFormat("*", "{{99}} / {{9999}}")
12 | ]
13 | placeholder: "MM / YYYY"
14 | )
15 |
16 | `export default FormattedMonthYearInputComponent;`
17 |
--------------------------------------------------------------------------------
/app/components/title-bar.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | var TitleBarComponent = Ember.Component.extend({
4 | wrapperClasses: "tb-default"
5 | });
6 |
7 | export default TitleBarComponent;
8 |
--------------------------------------------------------------------------------
/app/components/users-table.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 | import Auth from "balanced-dashboard/auth";
3 |
4 | var UsersTableComponent = Ember.Component.extend({
5 | actions: {
6 | delete: function(userInvite) {
7 | this.get("container").lookup("controller:application")
8 | .send("openModal", "modals/marketplace-user-delete-modal", userInvite);
9 | }
10 | }
11 | });
12 |
13 | export default UsersTableComponent;
14 |
--------------------------------------------------------------------------------
/app/controllers/accounts.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | var AccountsIndexController = Ember.ObjectController.extend({
4 | needs: ['marketplace']
5 | });
6 |
7 | export default AccountsIndexController;
8 |
--------------------------------------------------------------------------------
/app/controllers/credits.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 | import CreditReversalsResultsLoader from "balanced-dashboard/models/results-loaders/credit-reversals";
3 |
4 | var CreditsController = Ember.ObjectController.extend({
5 | needs: ['marketplace'],
6 |
7 | reversalsLoader: function() {
8 | return CreditReversalsResultsLoader.create({
9 | credit: this.get("model")
10 | });
11 | }.property("model")
12 | });
13 |
14 | export default CreditsController;
15 |
--------------------------------------------------------------------------------
/app/controllers/debits.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | var DebitsController = Ember.ObjectController.extend({
4 | needs: ['marketplace'],
5 | });
6 |
7 | export default DebitsController;
8 |
--------------------------------------------------------------------------------
/app/controllers/dispute.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | var DisputeController = Ember.ObjectController.extend(Ember.Evented, {
4 | needs: ['marketplace']
5 | });
6 |
7 | export default DisputeController;
8 |
--------------------------------------------------------------------------------
/app/controllers/events.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | var EventsController = Ember.ObjectController.extend({
4 | eventData: Ember.computed.alias('model.entity'),
5 |
6 | actions: {
7 | replay: function(eventCallback) {
8 | if (!eventCallback) {
9 | return;
10 | }
11 |
12 | eventCallback.save();
13 | }
14 | }
15 | });
16 |
17 | export default EventsController;
18 |
--------------------------------------------------------------------------------
/app/controllers/holds.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | var HoldsController = Ember.ObjectController.extend({
4 | needs: ['marketplace']
5 | });
6 |
7 | export default HoldsController;
8 |
--------------------------------------------------------------------------------
/app/controllers/loading.coffee:
--------------------------------------------------------------------------------
1 | `import Ember from "ember";`
2 |
3 | LoadingController = Ember.Controller.extend()
4 |
5 | `export default LoadingController;`
6 |
--------------------------------------------------------------------------------
/app/controllers/log.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | var LogController = Ember.ObjectController.extend({
4 | needs: ['marketplace']
5 | });
6 |
7 | export default LogController;
8 |
--------------------------------------------------------------------------------
/app/controllers/marketplace/credits.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | var MarketplaceCreditsController = Ember.ObjectController.extend({
4 | needs: ["marketplace"]
5 | });
6 |
7 | export default MarketplaceCreditsController;
8 |
--------------------------------------------------------------------------------
/app/controllers/marketplace/customers.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | var MarketplaceCustomersController = Ember.ObjectController.extend({
4 | needs: ['marketplace'],
5 | noDownloadsUri: true,
6 | resultsLoader: Ember.computed.oneWay("model"),
7 | actions: {
8 | changeSortOrder: function(column) {
9 | this.get("resultsLoader").setSortField(column);
10 | },
11 | changeDateFilter: function(startTime, endTime) {
12 | this.get("resultsLoader").setProperties({
13 | endTime: endTime,
14 | startTime: startTime
15 | });
16 | },
17 | }
18 | });
19 |
20 | export default MarketplaceCustomersController;
21 |
--------------------------------------------------------------------------------
/app/controllers/marketplace/debits.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | var MarketplaceDebitsController = Ember.ObjectController.extend({
4 | needs: ["marketplace"]
5 | });
6 |
7 | export default MarketplaceDebitsController;
8 |
--------------------------------------------------------------------------------
/app/controllers/marketplace/disputes.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | var MarketplaceDisputesController = Ember.ObjectController.extend(Ember.Evented, {
4 | needs: ['marketplace'],
5 | resultsLoader: Ember.computed.oneWay("model"),
6 | actions: {
7 | changeDisputesSort: function(column) {
8 | this.get("resultsLoader").setSortField(column);
9 | },
10 | changeDisputeStatusFilter: function(status) {
11 | this.set('resultsLoader.statusFilters', status);
12 | },
13 | changeDateFilter: function(startTime, endTime) {
14 | this.get("resultsLoader").setProperties({
15 | endTime: endTime,
16 | startTime: startTime
17 | });
18 | },
19 | }
20 | });
21 |
22 | export default MarketplaceDisputesController;
23 |
--------------------------------------------------------------------------------
/app/controllers/marketplace/holds.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | var MarketplaceHoldsController = Ember.ObjectController.extend({
4 | needs: ["marketplace"]
5 | });
6 |
7 | export default MarketplaceHoldsController;
8 |
--------------------------------------------------------------------------------
/app/controllers/marketplace/invoices.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | var MarketplaceInvoicesController = Ember.ObjectController.extend(Ember.Evented, {
4 | needs: ['marketplace', "notification_center"],
5 |
6 | resultsLoader: Ember.computed.oneWay("model"),
7 | actions: {
8 | changeSortOrder: function(column) {
9 | this.get("resultsLoader").setSortField(column);
10 | },
11 | changeDateFilter: function(startTime, endTime) {
12 | this.get("resultsLoader").setProperties({
13 | endTime: endTime,
14 | startTime: startTime
15 | });
16 | },
17 | }
18 | });
19 |
20 | export default MarketplaceInvoicesController;
21 |
--------------------------------------------------------------------------------
/app/controllers/marketplace/logs-embedded.js:
--------------------------------------------------------------------------------
1 | import MarketplaceLogsController from "./logs";
2 | import LogsResultsLoader from "balanced-dashboard/models/results-loaders/logs";
3 |
4 | /*
5 | This controller provides embedded log records in resource pages
6 | */
7 | var LogsEmbeddedController = MarketplaceLogsController.extend({
8 | resultsLoader: function() {
9 | var marketplace = this.modelFor("marketplace");
10 | return LogsResultsLoader.create({
11 | limit: 5,
12 | resource: this.get("model"),
13 | marketplace: marketplace
14 | });
15 | }.property(),
16 | });
17 |
18 | export default LogsEmbeddedController;
19 |
--------------------------------------------------------------------------------
/app/controllers/marketplace/orders.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | var MarketplaceOrdersController = Ember.ObjectController.extend({
4 | needs: ['marketplace'],
5 | resultsLoader: Ember.computed.oneWay("model"),
6 |
7 | actions: {
8 | changeOrdersSort: function(field, direction) {
9 | this.get("resultsLoader").setProperties({
10 | sortField: field,
11 | sortDirection: direction
12 | });
13 | },
14 | changeDateFilter: function(startTime, endTime) {
15 | this.get("resultsLoader").setProperties({
16 | endTime: endTime,
17 | startTime: startTime
18 | });
19 | },
20 | }
21 | });
22 |
23 | export default MarketplaceOrdersController;
24 |
--------------------------------------------------------------------------------
/app/controllers/marketplace/refunds.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | var MarketplaceRefundsController = Ember.ObjectController.extend({
4 | needs: ["marketplace"]
5 | });
6 |
7 | export default MarketplaceRefundsController;
8 |
--------------------------------------------------------------------------------
/app/controllers/marketplaces.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | var MarketplacesController = Ember.ArrayController.extend({
4 | needs: ["marketplace", "application"]
5 | });
6 |
7 |
8 | export default MarketplacesController;
9 |
--------------------------------------------------------------------------------
/app/controllers/marketplaces/index.coffee:
--------------------------------------------------------------------------------
1 | `import Ember from "ember";`
2 |
3 | MarketplacesIndexController = Ember.ArrayController.extend
4 | needs: ["application"]
5 | testMarketplaces: Ember.computed.filterBy("auth.user.user_marketplaces", "production", false)
6 | productionMarketplaces: Ember.computed.filterBy("auth.user.user_marketplaces", "production", true)
7 |
8 | actions:
9 | goToMarketplace: (marketplace) ->
10 | @transitionTo('marketplace', marketplace)
11 |
12 | `export default MarketplacesIndexController;`
13 |
--------------------------------------------------------------------------------
/app/controllers/menus/base-menu.coffee:
--------------------------------------------------------------------------------
1 | `import Ember from "ember";`
2 |
3 | BaseMenuController = Ember.Controller.extend()
4 |
5 | `export default BaseMenuController;`
6 |
--------------------------------------------------------------------------------
/app/controllers/menus/user-menu.coffee:
--------------------------------------------------------------------------------
1 | `import BaseMenuController from "./base-menu";`
2 |
3 | UserMenuController = BaseMenuController.extend()
4 |
5 | `export default UserMenuController;`
6 |
--------------------------------------------------------------------------------
/app/controllers/mixins/action-evented.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | var ActionEvented = function() {
4 | var arr = _.toArray(arguments);
5 |
6 | var obj = {};
7 |
8 | _.each(arr, function(val, key) {
9 | obj[val] = function() {
10 | var args = _.toArray(arguments);
11 | args.unshift(val);
12 | return this.trigger.apply(this, args);
13 | };
14 | });
15 |
16 | return Ember.Mixin.create(Ember.Evented, {
17 | actions: obj
18 | });
19 | };
20 |
21 | export default ActionEvented;
22 |
--------------------------------------------------------------------------------
/app/controllers/modal-notification-center.coffee:
--------------------------------------------------------------------------------
1 | `import NotificationCenterController from "./notification-center";`
2 |
3 | ModalNotificationCenterController = NotificationCenterController.extend(
4 | model: [],
5 | )
6 |
7 | `export default ModalNotificationCenterController;`
8 |
--------------------------------------------------------------------------------
/app/controllers/orders.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 | import Utils from "balanced-dashboard/lib/utils";
3 |
4 | var resultsLoaderProperty = function(methodName) {
5 | return function() {
6 | return this.get("model")[methodName]();
7 | }.property("model");
8 | };
9 |
10 | var OrdersController = Ember.ObjectController.extend({
11 | needs: ['marketplace'],
12 |
13 | debitsResultsLoader: resultsLoaderProperty("getOrderDebitsResultsLoader"),
14 | creditsResultsLoader: resultsLoaderProperty("getOrderCreditsResultsLoader")
15 | });
16 |
17 | export default OrdersController;
18 |
--------------------------------------------------------------------------------
/app/controllers/refunds.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | var RefundsController = Ember.ObjectController.extend({
4 | needs: ['marketplace']
5 | });
6 |
7 | export default RefundsController;
8 |
--------------------------------------------------------------------------------
/app/controllers/reversals.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | var ReversalsController = Ember.ObjectController.extend({
4 | needs: ['marketplace']
5 | });
6 |
7 | export default ReversalsController;
8 |
--------------------------------------------------------------------------------
/app/helpers/colorize-status.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | var colorizeStatus = Ember.Handlebars.makeBoundHelper(function(status) {
4 | var statusClass = status.match(/2\d\d/) ? "ok" : "error";
5 | var string = '%@ '.fmt(statusClass, status);
6 | return new Ember.Handlebars.SafeString(string);
7 | });
8 |
9 | export default colorizeStatus;
10 |
--------------------------------------------------------------------------------
/app/helpers/current-year.js:
--------------------------------------------------------------------------------
1 | import Utils from 'balanced-dashboard/lib/utils';
2 |
3 | export default Ember.Handlebars.makeBoundHelper(Utils.getCurrentYear);
4 |
--------------------------------------------------------------------------------
/app/helpers/format-currency.js:
--------------------------------------------------------------------------------
1 | import Utils from 'balanced-dashboard/lib/utils';
2 |
3 | export default Ember.Handlebars.makeBoundHelper(Utils.formatCurrency);
4 |
--------------------------------------------------------------------------------
/app/helpers/format-error.js:
--------------------------------------------------------------------------------
1 | import Utils from 'balanced-dashboard/lib/utils';
2 |
3 | export default Ember.Handlebars.makeBoundHelper(Utils.formatError);
4 |
--------------------------------------------------------------------------------
/app/helpers/format-file-size.js:
--------------------------------------------------------------------------------
1 | import Utils from 'balanced-dashboard/lib/utils';
2 |
3 | export default Ember.Handlebars.makeBoundHelper(Utils.formatFileSize);
4 |
--------------------------------------------------------------------------------
/app/helpers/format-number.js:
--------------------------------------------------------------------------------
1 | import Utils from 'balanced-dashboard/lib/utils';
2 |
3 | export default Ember.Handlebars.makeBoundHelper(Utils.formatNumber);
4 |
--------------------------------------------------------------------------------
/app/helpers/human-readable-date-long.js:
--------------------------------------------------------------------------------
1 | import Utils from 'balanced-dashboard/lib/utils';
2 |
3 | export default Ember.Handlebars.makeBoundHelper(Utils.humanReadableDateLong);
4 |
--------------------------------------------------------------------------------
/app/helpers/human-readable-date-short.js:
--------------------------------------------------------------------------------
1 | import Utils from 'balanced-dashboard/lib/utils';
2 |
3 | export default Ember.Handlebars.makeBoundHelper(Utils.humanReadableDateShort);
4 |
--------------------------------------------------------------------------------
/app/helpers/human-readable-date-time.js:
--------------------------------------------------------------------------------
1 | import Utils from 'balanced-dashboard/lib/utils';
2 |
3 | export default Ember.Handlebars.makeBoundHelper(Utils.humanReadableDateTime);
4 |
--------------------------------------------------------------------------------
/app/helpers/human-readable-date.js:
--------------------------------------------------------------------------------
1 | import Utils from 'balanced-dashboard/lib/utils';
2 |
3 | export default Ember.Handlebars.makeBoundHelper(Utils.humanReadableDate);
4 |
--------------------------------------------------------------------------------
/app/helpers/human-readable-time.js:
--------------------------------------------------------------------------------
1 | import Utils from 'balanced-dashboard/lib/utils';
2 |
3 | export default Ember.Handlebars.makeBoundHelper(Utils.humanReadableTime);
4 |
--------------------------------------------------------------------------------
/app/helpers/inflection.js:
--------------------------------------------------------------------------------
1 | export default Ember.Handlebars.makeBoundHelper(function(property, options) {
2 | var str;
3 |
4 | if (options) {
5 | var length = property;
6 | var singularForm = options.hash["singular"];
7 |
8 | if ((parseInt(length, 10) > 1) || (parseInt(length, 10) === 0)) {
9 | str = length + " " + singularForm + "s";
10 | } else {
11 | str = length + " " + singularForm;
12 | }
13 | }
14 |
15 | return new Ember.Handlebars.SafeString(str);
16 | });
17 |
--------------------------------------------------------------------------------
/app/helpers/lower-case.js:
--------------------------------------------------------------------------------
1 | import Utils from 'balanced-dashboard/lib/utils';
2 |
3 | export default Ember.Handlebars.makeBoundHelper(Utils.toLowerCase);
4 |
--------------------------------------------------------------------------------
/app/helpers/modal-field-errors.js:
--------------------------------------------------------------------------------
1 | import Utils from 'balanced-dashboard/lib/utils';
2 |
3 | export default Ember.Handlebars.makeBoundHelper(function(errorsList) {
4 | var errors = Utils.formatError(errorsList);
5 | errors = Ember.Handlebars.Utils.escapeExpression(errors);
6 | return new Ember.Handlebars.SafeString(
7 | '
%@
'.fmt(errors)
8 | );
9 | });
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/helpers/pretty-print.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 | import Utils from "balanced-dashboard/lib/utils";
3 |
4 | export default Ember.Handlebars.makeBoundHelper(Utils.prettyPrint);
5 |
--------------------------------------------------------------------------------
/app/helpers/sentence-case.js:
--------------------------------------------------------------------------------
1 | import Utils from 'balanced-dashboard/lib/utils';
2 |
3 | export default Ember.Handlebars.makeBoundHelper(Utils.capitalize);
4 |
--------------------------------------------------------------------------------
/app/helpers/stringify.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | export default Ember.Handlebars.makeBoundHelper(function(obj) {
4 | return new Ember.Handlebars.SafeString(JSON.stringify(obj, null, 4));
5 | });
6 |
--------------------------------------------------------------------------------
/app/helpers/title-case.js:
--------------------------------------------------------------------------------
1 | import Utils from 'balanced-dashboard/lib/utils';
2 |
3 | export default Ember.Handlebars.makeBoundHelper(Utils.toTitleCase);
4 |
--------------------------------------------------------------------------------
/app/initializers/analytics-initializer.coffee:
--------------------------------------------------------------------------------
1 | `import AnalyticsLogger from "balanced-dashboard/utils/analytics_logger";`
2 | `import ENV from "balanced-dashboard/config/environment";`
3 |
4 | Initializer =
5 | name: "analytics"
6 | initialize: ->
7 | AnalyticsLogger.init(ENV.BALANCED)
8 |
9 | `export default Initializer`
10 |
--------------------------------------------------------------------------------
/app/initializers/auth-injector-initializer.coffee:
--------------------------------------------------------------------------------
1 | `import Auth from "balanced-dashboard/auth";`
2 |
3 | AuthInjectorInitializer =
4 | name: 'injectAuth'
5 | initialize: (container, App) ->
6 | Auth.applicationContainer = container
7 | container.register('auth:main', Auth,
8 | instantiate: false,
9 | singleton: true
10 | )
11 | container.typeInjection('controller', 'auth', 'auth:main')
12 | container.typeInjection('route', 'auth', 'auth:main')
13 |
14 | `export default AuthInjectorInitializer`
15 |
--------------------------------------------------------------------------------
/app/initializers/balanced-app-global-initializer.coffee:
--------------------------------------------------------------------------------
1 | BalancedAppGlobalInitializer =
2 | name: 'balanced-app-global'
3 | initialize: (container, App) ->
4 | window.BalancedApp = App
5 |
6 | `export default BalancedAppGlobalInitializer`
7 |
--------------------------------------------------------------------------------
/app/initializers/link-view-extensions-initializer.coffee:
--------------------------------------------------------------------------------
1 | `import Ember from "ember";`
2 |
3 | Initializer =
4 | name: "LinkViewExtensions"
5 | initialize: ->
6 | Ember.LinkView.reopen(
7 | attributeBindings: ['data-track-event']
8 | )
9 |
10 | `export default Initializer`
11 |
--------------------------------------------------------------------------------
/app/initializers/result-loaders-initializer.coffee:
--------------------------------------------------------------------------------
1 | LOADER_NAMES = [
2 | "base"
3 | "credit-reversals"
4 | "customers"
5 | "dispute-transactions"
6 | "disputes"
7 | "funding-instruments"
8 | "invoice-transactions"
9 | "invoices"
10 | "logs"
11 | "search-logs"
12 | "marketplace-search"
13 | "orders"
14 | "transactions"
15 | ]
16 |
17 | ResultLoadersInitializer =
18 | name: "resultLoaders"
19 | initialize: (container) ->
20 | for name in LOADER_NAMES
21 | klass = require("balanced-dashboard/models/results-loaders/#{name}").default
22 | container.register("results-loader:#{name}", klass)
23 |
24 | `export default ResultLoadersInitializer;`
25 |
--------------------------------------------------------------------------------
/app/initializers/user-injector-initializer.coffee:
--------------------------------------------------------------------------------
1 | `import Auth from "balanced-dashboard/auth";`
2 |
3 | UserInjectorInitializer =
4 | name: "injectUser"
5 | initialize: (container, App) ->
6 | container.typeInjection('controller', 'user', 'user:main')
7 | container.typeInjection('route', 'user', 'user:main')
8 |
9 | container.register('user:main', null,
10 | instantiate: false,
11 | singleton: true
12 | )
13 |
14 | `export default UserInjectorInitializer`
15 |
--------------------------------------------------------------------------------
/app/initializers/user-session-initializer.coffee:
--------------------------------------------------------------------------------
1 | `import Auth from "balanced-dashboard/auth"`
2 |
3 | UserSessionInitializer =
4 | name: "userSession"
5 | after: "modelsAdapter"
6 | initialize: (container, App) ->
7 | App.deferReadiness()
8 | Auth.loadCsrfTokenIfNotLoaded()
9 | .then ->
10 | Auth.getCurrentLogin()
11 | .finally ->
12 | App.advanceReadiness()
13 |
14 | `export default UserSessionInitializer`
15 |
--------------------------------------------------------------------------------
/app/lib/connections/base-connection.coffee:
--------------------------------------------------------------------------------
1 | `import Ember from "ember";`
2 |
3 | BaseConnection = Ember.Object.extend
4 | # This function can be overriden by descendant classes so they can add default arguments
5 | settings: (settings) ->
6 | settings
7 |
8 | post: (url, data) ->
9 | @ajax(
10 | url: url
11 | data: data
12 | type: "POST"
13 | )
14 |
15 | delete: (url) ->
16 | @ajax(
17 | url: url
18 | type: "DELETE"
19 | )
20 |
21 | ajax: (settings) ->
22 | Adapter = BalancedApp.__container__.lookup("adapter:main")
23 | Adapter.load(@settings(settings))
24 |
25 | `export default BaseConnection;`
26 |
--------------------------------------------------------------------------------
/app/lib/file-readers/base-validations.js:
--------------------------------------------------------------------------------
1 | import ValidationHelpers from "balanced-dashboard/utils/validation-helpers";
2 |
3 | var baseValidationsObject = {
4 | "csvFields.appears_on_statement_as": ValidationHelpers.bankTransactionAppearsOnStatementAs,
5 | "csvFields.amount": ValidationHelpers.positiveDollarAmount,
6 | };
7 |
8 | export default baseValidationsObject;
9 |
10 |
--------------------------------------------------------------------------------
/app/lib/file-readers/credit-creator-fields.js:
--------------------------------------------------------------------------------
1 | var CreditCreatorFields = {
2 | NEW_CUSTOMER_FIELDS: ["new_customer_name", "new_customer_email", "new_bank_routing_number", "new_bank_account_number", "new_bank_account_holders_name", "new_bank_account_type", "amount", "appears_on_statement_as", "description"],
3 | EXISTING_CUSTOMER_FIELDS: ["existing_customer_name_or_email", "amount", "appears_on_statement_as", "description"],
4 | };
5 |
6 | export default CreditCreatorFields;
7 |
--------------------------------------------------------------------------------
/app/models/api-key.coffee:
--------------------------------------------------------------------------------
1 | `import Model from "./core/model";`
2 |
3 | ApiKey = Model.extend(
4 | uri: '/api_keys'
5 | )
6 |
7 | `export default ApiKey;`
8 |
--------------------------------------------------------------------------------
/app/models/bank-account-validatable.coffee:
--------------------------------------------------------------------------------
1 | `import BankAccount from "./bank-account";`
2 | `import FundingInstrumentValidatable from "./mixins/funding-instrument-validatable";`
3 |
4 | BankAccountValidatable = BankAccount.extend(Ember.Validations, FundingInstrumentValidatable,
5 | getTokenizingResponseHref: (response) ->
6 | response.bank_accounts[0].href
7 | getTokenizingObject: ->
8 | balanced.bankAccount
9 | getTokenizingData: ->
10 | account_type: @get('account_type')
11 | name: @get('name')
12 | account_number: $.trim(@get('account_number'))
13 | routing_number: $.trim(@get('routing_number'))
14 | )
15 |
16 | `export default BankAccountValidatable;`
17 |
--------------------------------------------------------------------------------
/app/models/bk/api-key-production.coffee:
--------------------------------------------------------------------------------
1 | `import Ember from "ember";`
2 | `import BkApiKeyProduction from "balanced-addon-models/models/api-key-production";`
3 |
4 | ApiKeyProduction = BkApiKeyProduction.extend
5 | marketplaceCategory: "goods_services"
6 | businessType: "llc"
7 |
8 | getStore: ->
9 | @get("container")
10 | .lookupFactory("store:balanced")
11 | .create(apiKey: @get("secret"))
12 |
13 | `export default ApiKeyProduction;`
14 |
--------------------------------------------------------------------------------
/app/models/bk/bank-account.coffee:
--------------------------------------------------------------------------------
1 | `import Ember from "ember";`
2 | `import BankAccount from "balanced-addon-models/models/bank-account";`
3 |
4 | BkBankAccount = BankAccount.extend(
5 | )
6 |
7 | `export default BkBankAccount;`
8 |
--------------------------------------------------------------------------------
/app/models/bk/customer.coffee:
--------------------------------------------------------------------------------
1 | `import Ember from "ember";`
2 | `import BkCustomer from "balanced-addon-models/models/customer";`
3 |
4 | Customer = BkCustomer.extend(
5 | routeName: "customer"
6 | )
7 |
8 | `export default Customer;`
9 |
--------------------------------------------------------------------------------
/app/models/bk/marketplace.coffee:
--------------------------------------------------------------------------------
1 | `import Ember from "ember";`
2 | `import BkMarketplace from "balanced-addon-models/models/marketplace";`
3 |
4 | Marketplace = BkMarketplace.extend()
5 |
6 | `export default Marketplace`
7 |
--------------------------------------------------------------------------------
/app/models/callback.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 | import Model from "./core/model";
3 |
4 | var Callback = Model.extend(Ember.Validations, {
5 | validations: {
6 | url: {
7 | presence: true
8 | }
9 | }
10 | });
11 |
12 | export default Callback;
13 |
--------------------------------------------------------------------------------
/app/models/card-validatable.coffee:
--------------------------------------------------------------------------------
1 | `import Card from "./card";`
2 | `import FundingInstrumentValidatable from "./mixins/funding-instrument-validatable";`
3 |
4 | CardValidatable = Card.extend(Ember.Validations, FundingInstrumentValidatable,
5 | getTokenizingResponseHref: (response) ->
6 | response.cards[0].href
7 | getTokenizingObject: ->
8 | balanced.card
9 | getTokenizingData: ->
10 | number: @get('number'),
11 | expiration_month: @get('expiration_month'),
12 | expiration_year: @get('expiration_year'),
13 | cvv: @get('cvv'),
14 | name: @get('name'),
15 | address: @get('address') || {}
16 | )
17 |
18 | `export default CardValidatable;`
19 |
--------------------------------------------------------------------------------
/app/models/core/type-mappings.coffee:
--------------------------------------------------------------------------------
1 | `import Ember from "ember"`
2 |
3 | TypeMapping = Ember.Object.extend
4 | init: ->
5 | @typesMap = {}
6 |
7 | addTypeMapping: (typeCode, className) ->
8 | @typesMap[typeCode] = className
9 |
10 | classForType: (typeCode) ->
11 | mappedType = @typesMap[typeCode]
12 | if !mappedType
13 | Ember.Logger.warn "Couldn't map typeCode %@".fmt(typeCode)
14 | return @typeClass(mappedType)
15 |
16 | typeClass: (type) ->
17 | if _.isString(type)
18 | return @classForType(type)
19 | else
20 | return type
21 |
22 | TypeMappings = TypeMapping.create()
23 |
24 | `export default TypeMappings`
25 |
--------------------------------------------------------------------------------
/app/models/event-callback.js:
--------------------------------------------------------------------------------
1 | import Model from "./core/model";
2 |
3 | var EventCallback = Model.extend({
4 | callback: Model.belongsTo('callback', 'callback'),
5 | });
6 |
7 | export default EventCallback;
8 |
--------------------------------------------------------------------------------
/app/models/event.js:
--------------------------------------------------------------------------------
1 | import Model from "./core/model";
2 | import Computed from "balanced-dashboard/utils/computed";
3 |
4 | var EventModel = Model.extend({
5 | transaction: Model.belongsTo('entity', 'transaction'),
6 | eventCallbacks: Model.hasMany('callbacks', 'event_callback'),
7 | uri: '/events',
8 | route_name: 'events',
9 | page_title: Computed.fmt('type', 'id', '%@ #%@'),
10 | status: function() {
11 | return this.get('type').split('.')[1];
12 | }.property('type')
13 | });
14 |
15 | export default EventModel;
16 |
--------------------------------------------------------------------------------
/app/models/factories/card-debit-base-transaction-factory.js:
--------------------------------------------------------------------------------
1 | import TransactionFactory from "./transaction-factory";
2 | import Card from "../card";
3 | import Debit from "../debit";
4 |
5 | var CardDebitBaseTransactionFactory = TransactionFactory.extend({
6 | save: function() {
7 | var self = this;
8 | var card = Card.create(this.getDestinationAttributes());
9 | return card.tokenizeAndCreate().then(function(card) {
10 | var debitAttributes = _.extend(self.getDebitAttributes(), {
11 | uri: card.get('debits_uri'),
12 | source_uri: card.get('uri')
13 | });
14 |
15 | return Debit.create(debitAttributes).save();
16 | });
17 | }
18 | });
19 |
20 | export default CardDebitBaseTransactionFactory;
21 |
--------------------------------------------------------------------------------
/app/models/factories/debit-existing-bank-account-transaction-factory.js:
--------------------------------------------------------------------------------
1 | import DebitExistingFundingInstrumentTransactionFactory from "./debit-existing-funding-instrument-transaction-factory";
2 | import ValidationHelpers from "balanced-dashboard/utils/validation-helpers";
3 |
4 | var DebitExistingBankAccountTransactionFactory = DebitExistingFundingInstrumentTransactionFactory.extend({
5 | validations: {
6 | dollar_amount: ValidationHelpers.positiveDollarAmount,
7 | appears_on_statement_as: ValidationHelpers.bankTransactionAppearsOnStatementAs,
8 |
9 | source_uri: {
10 | presence: true
11 | }
12 | }
13 | });
14 |
15 | export default DebitExistingBankAccountTransactionFactory;
16 |
--------------------------------------------------------------------------------
/app/models/factories/debit-existing-card-transaction-factory.js:
--------------------------------------------------------------------------------
1 | import DebitExistingFundingInstrumentTransactionFactory from "./debit-existing-funding-instrument-transaction-factory";
2 | import ValidationHelpers from "balanced-dashboard/utils/validation-helpers";
3 | import Card from "../card";
4 | import Debit from "../debit";
5 |
6 | var DebitExistingCardTransactionFactory = DebitExistingFundingInstrumentTransactionFactory.extend({
7 | validations: {
8 | dollar_amount: ValidationHelpers.positiveDollarAmount,
9 | appears_on_statement_as: ValidationHelpers.cardTransactionAppearsOnStatementAs,
10 |
11 | source_uri: {
12 | presence: true
13 | }
14 | }
15 | });
16 |
17 | export default DebitExistingCardTransactionFactory;
18 |
--------------------------------------------------------------------------------
/app/models/forgot-password.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 | import Rev0Serializer from "../serializers/rev0";
3 | import Model from "./core/model";
4 |
5 | var ForgotPassword = Model.extend(Ember.Validations, {
6 | uri: '/password',
7 |
8 | validations: {
9 | email_address: {
10 | presence: true,
11 | length: {
12 | minimum: 6
13 | },
14 | format: /.+@.+\..{2,4}/
15 | }
16 | }
17 | });
18 |
19 | ForgotPassword.reopenClass({
20 | serializer: Rev0Serializer.create()
21 | });
22 |
23 | export default ForgotPassword;
24 |
--------------------------------------------------------------------------------
/app/models/justitia-dispute.js:
--------------------------------------------------------------------------------
1 | import Model from "./core/model";
2 | import ModelArray from "./core/model-array";
3 |
4 | var JustitiaDispute = Model.extend({});
5 |
6 | JustitiaDispute.reopenClass({
7 | loadFromUri: function(uri) {
8 | return ModelArray.newArrayLoadedFromUri(uri, JustitiaDispute, "disputes");
9 | }
10 | });
11 |
12 | export default JustitiaDispute;
13 |
--------------------------------------------------------------------------------
/app/models/results-loaders/credit-reversals.js:
--------------------------------------------------------------------------------
1 | import BaseResultsLoader from "./base";
2 | import ResultsLoaderQueryStringBuilder from "./results-loader-query-string-builder";
3 | import Reversal from "../reversal";
4 |
5 | var CreditReversalsResultsLoader = BaseResultsLoader.extend({
6 | resultsType: Reversal,
7 | path: Ember.computed.oneWay("credit.reversals_uri"),
8 | statusFilters: ["failed", "succeeded", "pending"],
9 | queryStringArguments: function() {
10 | var queryStringBuilder = new ResultsLoaderQueryStringBuilder();
11 | queryStringBuilder.addValue("status", this.get("statusFilters"));
12 | return queryStringBuilder.getQueryStringAttributes();
13 | }.property("statusFilters")
14 | });
15 |
16 | export default CreditReversalsResultsLoader;
17 |
--------------------------------------------------------------------------------
/app/models/results-loaders/customers.js:
--------------------------------------------------------------------------------
1 | import BaseResultsLoader from "./base";
2 | import Customer from "../customer";
3 |
4 | var CustomersResultsLoader = BaseResultsLoader.extend({
5 | resultsType: Customer,
6 | });
7 |
8 | export default CustomersResultsLoader;
9 |
--------------------------------------------------------------------------------
/app/models/results-loaders/disputes.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 | import BaseResultsLoader from "./base";
3 | import Dispute from "balanced-dashboard/models/dispute";
4 |
5 | var DisputesResultsLoader = BaseResultsLoader.extend({
6 | resultsType: Dispute,
7 | path: Ember.computed.oneWay("marketplace.disputes_uri"),
8 |
9 | sortField: "initiated_at",
10 | statusFilters: null
11 | });
12 |
13 | export default DisputesResultsLoader;
14 |
--------------------------------------------------------------------------------
/app/models/results-loaders/invoices.js:
--------------------------------------------------------------------------------
1 | import BaseResultsLoader from "./base";
2 | import Invoice from "balanced-dashboard/models/invoice";
3 |
4 | var InvoicesResultsLoader = BaseResultsLoader.extend({
5 | resultsType: Invoice,
6 | });
7 |
8 | export default InvoicesResultsLoader;
9 |
--------------------------------------------------------------------------------
/app/models/results-loaders/logs.js:
--------------------------------------------------------------------------------
1 | import BaseResultsLoader from "./base";
2 | import Log from "balanced-dashboard/models/log";
3 |
4 | var LogsResultsLoader = BaseResultsLoader.extend({
5 | resultsType: Log,
6 | path: "/logs",
7 | methodFilters: ["post", "put", "delete"],
8 | queryStringArguments: function() {
9 | var attributes = this._super();
10 |
11 | if (this.get("resource.id")) {
12 | attributes.resource_id = this.get("resource.id");
13 | }
14 | return attributes;
15 | }.property("sort", "startTime", "endTime", "typeFilters", "statusFilters", "endpointFilters", "statusRollupFilters", "limit", "resource", "resource.id")
16 | });
17 |
18 | export default LogsResultsLoader;
19 |
--------------------------------------------------------------------------------
/app/models/reversal.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 | import Transaction from "./transaction";
3 | import Model from "./core/model";
4 |
5 | var Reversal = Transaction.extend({
6 | credit: Model.belongsTo('credit', 'credit'),
7 |
8 | type_name: 'Reversal',
9 | route_name: 'reversals',
10 | last_four: Ember.computed.readOnly('credit.last_four'),
11 | funding_instrument_name: Ember.computed.readOnly('credit.funding_instrument_name'),
12 | funding_instrument_description: Ember.computed.readOnly('credit.funding_instrument_description'),
13 | funding_instrument_type: Ember.computed.alias('credit.funding_instrument_type'),
14 | customer: Ember.computed.readOnly('credit.customer')
15 | });
16 |
17 | export default Reversal;
18 |
--------------------------------------------------------------------------------
/app/models/session.coffee:
--------------------------------------------------------------------------------
1 | `import Ember from "ember";`
2 | `import User from "./user";`
3 |
4 | Session = Ember.Object.extend()
5 |
6 | Session.reopenClass(
7 | fromJsonResponse: (response) =>
8 | user = User.create()
9 | user.populateFromJsonResponse(response.user)
10 | session = Session.create(
11 | user: user
12 | userId: response.user_id
13 | admin: response.admin
14 | uri: response.uri
15 | isGuest: false
16 | )
17 | session
18 | )
19 |
20 | `export default Session;`
21 |
--------------------------------------------------------------------------------
/app/models/settlement.js:
--------------------------------------------------------------------------------
1 | import Transaction from "./transaction";
2 | import Model from "./core/model";
3 |
4 | var Settlement = Transaction.extend({
5 | debit: Model.belongsTo('debit', 'debit'),
6 | type_name: 'settlement',
7 | route_name: 'Settlement'
8 | });
9 |
10 | export default Settlement;
11 |
--------------------------------------------------------------------------------
/app/models/user-invite.js:
--------------------------------------------------------------------------------
1 | import Rev0Serializer from "../serializers/rev0";
2 | import Model from "./core/model";
3 | import Ember from "ember";
4 |
5 | var UserInvite = Model.extend(Ember.Validations, {
6 | validations: {
7 | email_address: {
8 | presence: true,
9 | length: {
10 | minimum: 6
11 | },
12 | format: /.+@.+\..{2,4}/
13 | }
14 | },
15 |
16 | delete: function(settings) {
17 | settings = _.extend({
18 | data: {
19 | email_address: this.get('email_address')
20 | }
21 | }, settings || {});
22 |
23 | return this._super(settings);
24 | }
25 | });
26 |
27 | UserInvite.reopenClass({
28 | serializer: Rev0Serializer.create()
29 | });
30 |
31 | export default UserInvite;
32 |
--------------------------------------------------------------------------------
/app/routes/auth.coffee:
--------------------------------------------------------------------------------
1 | `import Ember from "ember";`
2 |
3 | AuthRoute = Ember.Route.extend
4 | beforeModel: (transition) ->
5 | sessionsController = this.controllerFor("sessions")
6 | if !this.controllerFor("sessions").get("isUserPresent")
7 | this.controllerFor("sessions").set("transitionPendingLogin", transition)
8 | this.transitionTo('login')
9 |
10 | `export default AuthRoute;`
11 |
--------------------------------------------------------------------------------
/app/routes/bank-accounts.js:
--------------------------------------------------------------------------------
1 | import ModelRoute from "./model";
2 | import BankAccount from "../models/bank-account";
3 | import TransactionsResultsLoader from "../models/results-loaders/transactions";
4 |
5 | var BankAccountsRoute = ModelRoute.extend({
6 | title: 'Bank Account',
7 | modelObject: BankAccount,
8 | marketplaceUri: 'bank_accounts_uri',
9 |
10 | setupController: function(controller, model) {
11 | this._super(controller, model);
12 |
13 | var transactions = TransactionsResultsLoader.create({
14 | path: model.get("transactions_uri"),
15 | limit: 10,
16 | });
17 |
18 | controller.setProperties({
19 | transactionsResultsLoader: transactions
20 | });
21 | },
22 | });
23 |
24 | export default BankAccountsRoute;
25 |
--------------------------------------------------------------------------------
/app/routes/cards.js:
--------------------------------------------------------------------------------
1 | import ModelRoute from "./model";
2 | import Card from "../models/card";
3 | import TransactionsResultsLoader from "../models/results-loaders/transactions";
4 |
5 | var CardsRoute = ModelRoute.extend({
6 | title: 'Card',
7 | modelObject: Card,
8 | marketplaceUri: 'cards_uri',
9 |
10 | setupController: function(controller, model) {
11 | this._super(controller, model);
12 |
13 | var transactions = TransactionsResultsLoader.create({
14 | path: model.get("transactions_uri"),
15 | limit: 10,
16 | });
17 |
18 | controller.setProperties({
19 | transactionsResultsLoader: transactions
20 | });
21 | },
22 | });
23 |
24 | export default CardsRoute;
25 |
--------------------------------------------------------------------------------
/app/routes/credits.js:
--------------------------------------------------------------------------------
1 | import ModelRoute from "./model";
2 | import Credit from "../models/credit";
3 |
4 | var CreditsRoute = ModelRoute.extend({
5 | title: 'Credit',
6 | modelObject: Credit,
7 | marketplaceUri: 'credits_uri'
8 | });
9 |
10 | export default CreditsRoute;
11 |
--------------------------------------------------------------------------------
/app/routes/debits.js:
--------------------------------------------------------------------------------
1 | import ModelRoute from "./model";
2 | import Debit from "../models/debit";
3 |
4 | var DebitsRoute = ModelRoute.extend({
5 | title: 'Debit',
6 | modelObject: Debit,
7 | marketplaceUri: 'debits_uri',
8 | setupController: function(controller, model) {
9 | this._super(controller, model);
10 | controller.setProperties({
11 | disputesResultsLoader: model.getDisputesLoader()
12 | });
13 | }
14 | });
15 |
16 | export default DebitsRoute;
17 |
--------------------------------------------------------------------------------
/app/routes/dispute.js:
--------------------------------------------------------------------------------
1 | import ModelRoute from "./model";
2 | import Dispute from "../models/dispute";
3 |
4 | var DisputeRoute = ModelRoute.extend({
5 | title: 'Dispute',
6 | modelObject: Dispute,
7 | marketplaceUri: 'disputes_uri',
8 | setupController: function(controller, dispute) {
9 | this._super(controller, dispute);
10 |
11 | controller.setProperties({
12 | transactionsResultsLoader: dispute.getTransactionsLoader()
13 | });
14 | }
15 | });
16 |
17 | export default DisputeRoute;
18 |
--------------------------------------------------------------------------------
/app/routes/events.js:
--------------------------------------------------------------------------------
1 | import ModelRoute from "./model";
2 | import Event from "../models/event";
3 |
4 | var EventsRoute = ModelRoute.extend({
5 | title: 'Event',
6 | modelObject: Event,
7 | marketplaceUri: 'events_uri'
8 | });
9 |
10 | export default EventsRoute;
11 |
--------------------------------------------------------------------------------
/app/routes/forgot-password.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | var ForgotPasswordRoute = Ember.Route.extend({
4 | setupController: function(controller, model) {
5 | controller.set("hasError", false);
6 | this._super(controller, model.fp);
7 | },
8 |
9 | model: function() {
10 | var fp = this.get("container").lookup("model:forgot-password");
11 | return {
12 | fp: fp
13 | };
14 | }
15 | });
16 |
17 | export default ForgotPasswordRoute;
18 |
--------------------------------------------------------------------------------
/app/routes/holds.js:
--------------------------------------------------------------------------------
1 | import ModelRoute from "./model";
2 | import Hold from "../models/hold";
3 |
4 | var HoldsRoute = ModelRoute.extend({
5 | title: 'Hold',
6 | modelObject: Hold,
7 | marketplaceUri: 'card_holds_uri'
8 | });
9 |
10 | export default HoldsRoute;
11 |
--------------------------------------------------------------------------------
/app/routes/index.coffee:
--------------------------------------------------------------------------------
1 | `import AuthRoute from "./auth";`
2 |
3 | IndexRoute = AuthRoute.extend
4 | redirect: ->
5 | sessions = @controllerFor("sessions")
6 |
7 | if sessions.get("isUserRegistered")
8 | @transitionTo('marketplaces')
9 | else
10 | @transitionTo("login")
11 |
12 | `export default IndexRoute;`
13 |
--------------------------------------------------------------------------------
/app/routes/invoice.js:
--------------------------------------------------------------------------------
1 | import ModelRoute from "./model";
2 | import Invoice from "../models/invoice";
3 |
4 | var InvoiceRoute = ModelRoute.extend({
5 | title: 'Account statement',
6 | modelObject: Invoice,
7 | marketplaceUri: 'invoices_uri',
8 | setupController: function(controller, model) {
9 | this._super(controller, model);
10 | controller.setProperties({
11 | disputesResultsLoader: model.getInvoicesLoader(),
12 | transactionsResultsLoader: model.getTransactionsLoader()
13 | });
14 | }
15 | });
16 |
17 | export default InvoiceRoute;
18 |
--------------------------------------------------------------------------------
/app/routes/loading.coffee:
--------------------------------------------------------------------------------
1 | `import Ember from "ember";`
2 |
3 | LoadingRoute = Ember.Route.extend()
4 |
5 | `export default LoadingRoute`
6 |
--------------------------------------------------------------------------------
/app/routes/log.js:
--------------------------------------------------------------------------------
1 | import TitleRoute from "./title";
2 |
3 | var LogRoute = TitleRoute.extend({
4 | title: 'Log',
5 |
6 | model: function(params) {
7 | var Log = this.get("container").lookupFactory("model:log");
8 | var logUri = Log.constructUri(params.item_id);
9 | return Log.find(logUri);
10 | }
11 | });
12 |
13 | export default LogRoute;
14 |
--------------------------------------------------------------------------------
/app/routes/login.coffee:
--------------------------------------------------------------------------------
1 | `import Ember from 'ember';`
2 |
3 | LoginRoute = Ember.Route.extend
4 | pageTitle: 'Login'
5 |
6 | beforeModel: ->
7 | sessionsController = this.controllerFor("sessions")
8 | if sessionsController.get("isUserRegistered")
9 | @transitionTo("marketplaces.index")
10 |
11 | setupController: (controller, model) ->
12 | @_super(controller, model)
13 | @controllerFor("notification-center").clearAlerts()
14 | controller.focus()
15 |
16 | model: ->
17 | @get("container").lookup("model:login")
18 |
19 | `export default LoginRoute;`
20 |
--------------------------------------------------------------------------------
/app/routes/logout.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | // We need a temporary route for logout so the views don't have to assume that
4 | // the Balanced.Auth.user can be null for logged in pages
5 | var LogoutRoute = Ember.Route.extend({
6 | pageTitle: 'Logout',
7 |
8 | redirect: function() {
9 | var self = this;
10 | if (self.controllerFor("sessions").get("isUserRegistered")) {
11 | this.get('auth').signOut().then(function() {
12 | self.transitionTo('login');
13 | self.controllerFor("notification_center").clearAlerts();
14 | });
15 | } else {
16 | self.transitionTo('login');
17 | }
18 | }
19 | });
20 |
21 | export default LogoutRoute;
22 |
--------------------------------------------------------------------------------
/app/routes/marketplace/customers.js:
--------------------------------------------------------------------------------
1 | import AuthRoute from "../auth";
2 |
3 | var MarketplaceCustomersRoute = AuthRoute.extend({
4 | pageTitle: 'Customers',
5 | model: function() {
6 | var marketplace = this.modelFor("marketplace");
7 | return marketplace.getCustomersLoader();
8 | },
9 | });
10 |
11 | export default MarketplaceCustomersRoute;
12 |
--------------------------------------------------------------------------------
/app/routes/marketplace/disputes.js:
--------------------------------------------------------------------------------
1 | import AuthRoute from "../auth";
2 |
3 | var MarketplaceDisputesRoute = AuthRoute.extend({
4 | pageTitle: 'Disputes',
5 | model: function() {
6 | var marketplace = this.modelFor("marketplace");
7 | var attributes = this.getProperties("startTime", "endTime");
8 | return marketplace.getDisputesLoader(attributes);
9 | },
10 | });
11 |
12 | export default MarketplaceDisputesRoute;
13 |
--------------------------------------------------------------------------------
/app/routes/marketplace/funding-instruments.js:
--------------------------------------------------------------------------------
1 | import TitleRoute from "../title";
2 |
3 | var MarketplaceFundingInstrumentsRoute = TitleRoute.extend({
4 | pageTitle: 'Payment methods',
5 | model: function() {
6 | var marketplace = this.modelFor("marketplace");
7 | return marketplace.getFundingInstrumentsLoader({});
8 | },
9 | });
10 |
11 | export default MarketplaceFundingInstrumentsRoute;
12 |
--------------------------------------------------------------------------------
/app/routes/marketplace/import-payouts.js:
--------------------------------------------------------------------------------
1 | import AuthRoute from "../auth";
2 |
3 | var MarketplaceImportPayoutsRoute = AuthRoute.extend({
4 | pageTitle: 'Import payouts',
5 |
6 | setupController: function(controller, model) {
7 | controller.refresh();
8 | this._super(controller, model);
9 | },
10 |
11 | renderTemplate: function() {
12 | this.render('import_payouts/index');
13 | }
14 | });
15 |
16 | export default MarketplaceImportPayoutsRoute;
17 |
--------------------------------------------------------------------------------
/app/routes/marketplace/index.js:
--------------------------------------------------------------------------------
1 | import AuthRoute from "balanced-dashboard/routes/auth";
2 |
3 | var MarketplaceIndexRoute = AuthRoute.extend({
4 | beforeModel: function() {
5 | var mp = this.modelFor("marketplace");
6 | if (mp.get("isOrdersRequired")) {
7 | this.transitionTo('marketplace.orders');
8 | }
9 | else {
10 | this.transitionTo('marketplace.transactions');
11 | }
12 | }
13 | });
14 |
15 | export default MarketplaceIndexRoute;
16 |
--------------------------------------------------------------------------------
/app/routes/marketplace/invoices.js:
--------------------------------------------------------------------------------
1 | import AuthRoute from "../auth";
2 |
3 | var MarketplaceInvoicesRoute = AuthRoute.extend({
4 | pageTitle: 'Account statements',
5 | model: function() {
6 | var marketplace = this.modelFor("marketplace");
7 | return marketplace.getInvoicesLoader();
8 | },
9 | });
10 |
11 | export default MarketplaceInvoicesRoute;
12 |
--------------------------------------------------------------------------------
/app/routes/marketplace/logs.js:
--------------------------------------------------------------------------------
1 | import AuthRoute from "../auth";
2 |
3 | var MarketplaceLogsRoute = AuthRoute.extend({
4 | pageTitle: 'Logs',
5 | model: function() {
6 | var marketplace = this.modelFor("marketplace");
7 | return marketplace.getLogsLoader();
8 | },
9 | });
10 |
11 | export default MarketplaceLogsRoute;
12 |
--------------------------------------------------------------------------------
/app/routes/marketplace/orders.js:
--------------------------------------------------------------------------------
1 | import AuthRoute from "../auth";
2 |
3 | var MarketplaceOrdersRoute = AuthRoute.extend({
4 | pageTitle: 'Orders',
5 | model: function() {
6 | var marketplace = this.modelFor("marketplace");
7 | return marketplace.getOrdersLoader();
8 | },
9 | });
10 |
11 | export default MarketplaceOrdersRoute;
12 |
--------------------------------------------------------------------------------
/app/routes/marketplace/settings.js:
--------------------------------------------------------------------------------
1 | import AuthRoute from "../auth";
2 |
3 | var MarketplaceSettingsRoute = AuthRoute.extend({
4 | pageTitle: 'Settings',
5 | });
6 |
7 | export default MarketplaceSettingsRoute;
8 |
--------------------------------------------------------------------------------
/app/routes/marketplace/transactions.js:
--------------------------------------------------------------------------------
1 | import AuthRoute from "../auth";
2 |
3 | var MarketplaceTransactionsRoute = AuthRoute.extend({
4 | pageTitle: 'Transactions',
5 | model: function() {
6 | var marketplace = this.modelFor("marketplace");
7 | return marketplace.getTransactionsLoader();
8 | },
9 | });
10 |
11 | export default MarketplaceTransactionsRoute;
12 |
--------------------------------------------------------------------------------
/app/routes/marketplaces/apply.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | var MarketplacesApplyRoute = Ember.Route.extend({
4 | beforeModel: function(transition) {
5 | transition.abort();
6 |
7 | if (transition.sequence > 0) {
8 | this.send("openModal", "modals/marketplace-application-create");
9 | } else {
10 | var self = this;
11 | this.transitionTo("marketplaces.index")
12 | .then(function(r) {
13 | return Ember.run.next(function() {
14 | self.transitionTo("marketplaces.apply");
15 | });
16 | });
17 | }
18 | },
19 | });
20 |
21 | export default MarketplacesApplyRoute;
22 |
--------------------------------------------------------------------------------
/app/routes/marketplaces/index.coffee:
--------------------------------------------------------------------------------
1 | `import Utils from "balanced-dashboard/lib/utils";`
2 | `import Ember from "ember";`
3 |
4 | MarketplacesIndexRoute = Ember.Route.extend
5 | needs: ["application"]
6 | pageTitle: 'Marketplaces'
7 |
8 | beforeModel: ->
9 | sessionsController = @controllerFor("sessions")
10 | if !sessionsController.get("isUserRegistered")
11 | @transitionTo("setup_guest_user")
12 |
13 | afterModel: ->
14 | Utils.setCurrentMarketplace(null)
15 | @controllerFor('marketplace').set('content', null)
16 |
17 | `export default MarketplacesIndexRoute;`
18 |
--------------------------------------------------------------------------------
/app/routes/migrate-connect.coffee:
--------------------------------------------------------------------------------
1 | `import Ember from "ember";`
2 | `import TitleRoute from "./title";`
3 |
4 | Route = TitleRoute.extend(
5 | pageTitle: "Connect Stripe account"
6 |
7 | model: (params) ->
8 | @container
9 | .lookupFactory("model:marketplace")
10 | .findById(params.marketplace_id)
11 |
12 | setupController: (controller, model) ->
13 | controller.set("model", model)
14 | )
15 |
16 | `export default Route;`
17 |
--------------------------------------------------------------------------------
/app/routes/migrate-success.coffee:
--------------------------------------------------------------------------------
1 | `import Ember from "ember";`
2 | `import TitleRoute from "./title";`
3 |
4 | SUCCESS_MESSAGE =
5 | "Migration request received: The migration process will take 2-3 business days. You'll receive an email confirmation upon completion."
6 |
7 | Route = TitleRoute.extend(
8 | pageTitle: "Migrate"
9 |
10 | model: (params) ->
11 | @container
12 | .lookupFactory("model:marketplace")
13 | .findById(params.marketplace_id)
14 |
15 | setupController: (controller, model) ->
16 | controller.set("model", model)
17 | @controllerFor("notification_center").alertSuccess(SUCCESS_MESSAGE)
18 | )
19 |
20 | `export default Route;`
21 |
--------------------------------------------------------------------------------
/app/routes/migrate.coffee:
--------------------------------------------------------------------------------
1 | `import Ember from "ember";`
2 | `import AuthRoute from "./auth";`
3 |
4 | Route = AuthRoute.extend(
5 | pageTitle: "Migrate"
6 | setupController: (controller) ->
7 | @controllerFor("notification_center").clearAlerts()
8 | )
9 |
10 | `export default Route;`
11 |
--------------------------------------------------------------------------------
/app/routes/model.js:
--------------------------------------------------------------------------------
1 | import TitleRoute from "./title";
2 | import Utils from "balanced-dashboard/lib/utils";
3 |
4 | var ModelRoute = TitleRoute.extend({
5 | model: function(params) {
6 | var marketplace = this.modelFor('marketplace');
7 | var modelObject = this.get('modelObject');
8 | var uri = this.get('marketplaceUri');
9 |
10 | return marketplace.then(function(marketplace) {
11 | var modelUri = Utils.combineUri(marketplace.get(uri), params.item_id);
12 | return modelObject.find(modelUri);
13 | });
14 | }
15 | });
16 |
17 | export default ModelRoute;
18 |
--------------------------------------------------------------------------------
/app/routes/orders.js:
--------------------------------------------------------------------------------
1 | import TitleRoute from "./title";
2 |
3 | var OrdersRoute = TitleRoute.extend({
4 | title: 'Order',
5 |
6 | model: function(params) {
7 | var Order = this.get("container").lookupFactory("model:order");
8 | var marketplace = this.modelFor('marketplace');
9 | var orderUri = Order.constructUri(params.item_id);
10 | return Order.find(orderUri);
11 | }
12 | });
13 |
14 | export default OrdersRoute;
15 |
--------------------------------------------------------------------------------
/app/routes/otp.coffee:
--------------------------------------------------------------------------------
1 | `import Ember from "ember";`
2 |
3 | OtpRoute = Ember.Route.extend(
4 | pageTitle: 'Login'
5 | beforeModel: ->
6 | sessionsController = this.controllerFor("sessions")
7 | if sessionsController.get("isUserRegistered")
8 | @transitionTo("marketplaces.index")
9 |
10 | setupController: (controller, model) ->
11 | @_super(controller, model)
12 | Auth = @get("container").lookup("auth:main")
13 | model.set "path", Auth.get("lastLoginUri")
14 | @controllerFor("notification-center").clearAlerts()
15 |
16 | model: ->
17 | @get("container").lookup("model:otp-login")
18 | )
19 |
20 | `export default OtpRoute;`
21 |
--------------------------------------------------------------------------------
/app/routes/refunds.js:
--------------------------------------------------------------------------------
1 | import ModelRoute from "./model";
2 | import Refund from "../models/refund" ;
3 |
4 | var RefundsRoute = ModelRoute.extend({
5 | title: 'Refund',
6 | modelObject: Refund,
7 | marketplaceUri: 'refunds_uri'
8 | });
9 |
10 | export default RefundsRoute;
11 |
--------------------------------------------------------------------------------
/app/routes/reset-password.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | var ResetPasswordRoute = Ember.Route.extend({
4 | setupController: function(controller, model) {
5 | this._super(controller, model);
6 | controller.set("hasError", false);
7 | },
8 |
9 | model: function(params) {
10 | return this.container.lookupFactory("model:reset-password").create({
11 | isLoaded: true,
12 | isNew: false,
13 | token: params.token
14 | });
15 | }
16 | });
17 |
18 | export default ResetPasswordRoute;
19 |
--------------------------------------------------------------------------------
/app/routes/reversals.js:
--------------------------------------------------------------------------------
1 | import ModelRoute from "./model";
2 | import Reversal from "../models/reversal";
3 |
4 | var ReversalsRoute = ModelRoute.extend({
5 | title: 'Reversal',
6 | modelObject: Reversal,
7 | marketplaceUri: 'reversals_uri'
8 | });
9 |
10 | export default ReversalsRoute;
11 |
--------------------------------------------------------------------------------
/app/routes/title.js:
--------------------------------------------------------------------------------
1 | import Utils from "balanced-dashboard/lib/utils";
2 | import AuthRoute from "./auth";
3 |
4 | var TitleRoute = AuthRoute.extend({
5 | title: 'Model',
6 |
7 | pageTitle: function(route, setTitle) {
8 | var model = route.controller.get("content");
9 | var title = route.get('title');
10 |
11 | return Utils.maybeDeferredLoading(model, setTitle, function() {
12 | return title + ': loading ...';
13 | }, function() {
14 | return title + ': %@'.fmt(model.get('page_title'));
15 | });
16 | }
17 | });
18 |
19 | export default TitleRoute;
20 |
--------------------------------------------------------------------------------
/app/stores/balanced.coffee:
--------------------------------------------------------------------------------
1 | `import Store from "balanced-addon-models/stores/balanced";`
2 |
3 | BalancedStore = Store.extend(
4 | modelMaps:
5 | bank_account: "model:bk/bank-account"
6 | customer: "model:bk/customer"
7 | api_key_production: "model:bk/api-key-production"
8 | marketplace: "model:bk/marketplace"
9 | )
10 |
11 | `export default BalancedStore;`
12 |
--------------------------------------------------------------------------------
/app/styles/account_security.less:
--------------------------------------------------------------------------------
1 | #enable-mfa {
2 |
3 | #google-authenticator {
4 | width: 110px;
5 | margin-bottom: 40px;
6 | }
7 |
8 | #qrcode {
9 | margin-bottom: 40px;
10 |
11 | canvas {
12 | width: 180px;
13 | height: 180px;
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/app/styles/custom_inputs.less:
--------------------------------------------------------------------------------
1 | .full-page-form label.control-styled-upload {
2 | width: 100%;
3 |
4 | &:after {
5 | content: "";
6 | }
7 | padding-top: 0;
8 | }
9 |
10 | label.control-styled-upload {
11 | float: none;
12 | text-align: right;
13 | .btn {
14 | margin-left: 15px;
15 | }
16 | input[type=file] {
17 | left: 0;
18 | opacity: 0;
19 | position: absolute;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/app/styles/dropdowns.less:
--------------------------------------------------------------------------------
1 | .dropdown-menu.right {
2 | left:auto;
3 | right:0;
4 | &::before {left:auto !important; right:9px;}
5 | &::after {left:auto !important; right:10px;}
6 | }
7 |
--------------------------------------------------------------------------------
/app/styles/events.less:
--------------------------------------------------------------------------------
1 | .event-info {
2 | header {
3 | margin-bottom:20px !important;
4 | h1{
5 | margin-bottom:0;
6 | }
7 | }
8 | label.control-label{
9 | width:110px !important;
10 | }
11 | .controls {
12 | width:100% !important;
13 | margin-left:0 !important;
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/app/styles/google_prettify.less:
--------------------------------------------------------------------------------
1 | .pun, .opn, .clo { color: @burntOrange100; }
2 | .lit, .str, .atv { color: @black; }
3 | .kwd, .prettyprint .tag { color: @black; }
4 | .pln { color: @black; line-height: 21px; }
5 |
6 | .prettyprint {
7 | width: 100%;
8 | padding: 20px;
9 | margin-bottom: 40px;
10 | background-color: @white;
11 | border: 1px solid @gray2;
12 | .border-radius(0);
13 | }
14 | /* Specify class=linenums on a pre to get line numbering */
15 | ol.linenums {
16 | margin: 0 0 0 51px; /* IE indents via margin-left */
17 | }
18 | ol.linenums li {
19 | padding-left: 12px;
20 | color: @gray2;
21 | line-height: 18px;
22 | text-shadow: 0 1px 0 @white;
23 | }
24 |
--------------------------------------------------------------------------------
/app/styles/loading-spinner.less:
--------------------------------------------------------------------------------
1 | .spin-animation {
2 | -webkit-animation: fa-spin 2s infinite linear;
3 | animation: fa-spin 2s infinite linear;
4 | }
5 |
6 | @-moz-keyframes fa-spin {
7 | from { -moz-transform: rotate(0deg); }
8 | to { -moz-transform: rotate(360deg); }
9 | }
10 | @-webkit-keyframes fa-spin {
11 | from { -webkit-transform: rotate(0deg); }
12 | to { -webkit-transform: rotate(360deg); }
13 | }
14 | @keyframes fa-spin {
15 | from {transform:rotate(0deg);}
16 | to {transform:rotate(360deg);}
17 | }
18 |
--------------------------------------------------------------------------------
/app/styles/logs.less:
--------------------------------------------------------------------------------
1 | .mb-large {
2 | margin-bottom: 20px;
3 | }
4 |
5 | pre {
6 | overflow-y: auto;
7 | }
8 |
9 | section.mb-none {
10 | margin-bottom: 0px
11 | }
12 |
--------------------------------------------------------------------------------
/app/templates/accounts.hbs:
--------------------------------------------------------------------------------
1 | {{outlet}}
2 |
--------------------------------------------------------------------------------
/app/templates/activity.hbs:
--------------------------------------------------------------------------------
1 |
2 | {{outlet}}
3 |
4 |
--------------------------------------------------------------------------------
/app/templates/application.hbs:
--------------------------------------------------------------------------------
1 | {{outlet}}
2 |
3 | {{render "modals-container"}}
4 |
--------------------------------------------------------------------------------
/app/templates/clean-page-layout.hbs:
--------------------------------------------------------------------------------
1 | {{render "notification_center"}}
2 |
3 |
8 |
9 |
10 | {{yield}}
11 |
12 |
13 |
--------------------------------------------------------------------------------
/app/templates/components/api-key-secret-shower.hbs:
--------------------------------------------------------------------------------
1 | {{#if showSecret}}
2 | {{key.secret}}
3 | {{else}}
4 | Show key secret
5 | {{/if}}
6 |
--------------------------------------------------------------------------------
/app/templates/components/confirm-modal.hbs:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
{{mainText}}
7 |
8 | Cancel
9 | Yes
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/app/templates/components/form-field-messages.hbs:
--------------------------------------------------------------------------------
1 | {{#if isDisplayList}}
2 |
3 | {{#each message in messages}}
4 | {{message}}
5 | {{/each}}
6 |
7 | {{else}}
8 | {{messages}}
9 | {{/if}}
10 |
--------------------------------------------------------------------------------
/app/templates/components/title-bar.hbs:
--------------------------------------------------------------------------------
1 |
2 | {{#if icon}}
3 |
4 |
5 |
6 | {{/if}}
7 |
8 | {{title}}
9 |
10 |
11 |
--------------------------------------------------------------------------------
/app/templates/detail-views/key-value.hbs:
--------------------------------------------------------------------------------
1 | {{#if view.value}}
2 |
3 | {{view.key}}
4 |
5 | {{#if view.hasLink}}
6 | {{view.value}}
7 | {{else}}
8 | {{view.value}}
9 | {{/if}}
10 | {{/if}}
11 |
--------------------------------------------------------------------------------
/app/templates/detail-views/resource-summary.hbs:
--------------------------------------------------------------------------------
1 | {{#if view.isDescription}}
2 | {{#if view.hasDescription}}
3 | {{view.model.description}}
4 | {{else}}
5 | none
6 | {{/if}}
7 | {{else}}
8 | {{#if view.model}}
9 | {{#link-to view.model.route_name view.model title=view.hoverValue}}
10 | {{view.value}}
11 | {{/link-to}}
12 | {{else}}
13 | none
14 | {{/if}}
15 | {{/if}}
16 |
--------------------------------------------------------------------------------
/app/templates/detail-views/side-panel-layout.hbs:
--------------------------------------------------------------------------------
1 | {{#if view.panelTitle}}
2 | {{view.panelTitle}}
3 | {{/if}}
4 |
5 | {{yield}}
6 |
--------------------------------------------------------------------------------
/app/templates/detail-views/summary-items/label-base.hbs:
--------------------------------------------------------------------------------
1 | {{view.text}}
2 |
3 | {{#if view.isModalEditLink}}
4 |
5 |
6 |
7 | {{/if}}
8 |
--------------------------------------------------------------------------------
/app/templates/detail-views/summary-section-base.hbs:
--------------------------------------------------------------------------------
1 |
2 | {{view "detail-views/summary-sections/summary-section-resource-list"
3 | viewName="resourcesList"
4 | }}
5 |
6 |
--------------------------------------------------------------------------------
/app/templates/detail-views/tab.hbs:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/app/templates/detail-views/titled-key-values-section.hbs:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{view.title}}
4 |
5 | {{#if view.editModelModalClass}}
6 |
7 |
8 |
9 | {{/if}}
10 |
11 |
12 | {{#each item in view.keyValueListViews}}
13 | {{view item}}
14 | {{/each}}
15 | {{yield}}
16 |
17 |
18 |
--------------------------------------------------------------------------------
/app/templates/footer.hbs:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/app/templates/forgot-password.hbs:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/app/templates/form-fields/amount-form-field.hbs:
--------------------------------------------------------------------------------
1 |
2 | $
3 | {{input viewName="inputElement" name=view.inputName type="text" value=view.value class=view.inputClassNames}}
4 |
5 |
--------------------------------------------------------------------------------
/app/templates/form-fields/base-form-field.hbs:
--------------------------------------------------------------------------------
1 | {{input viewName="inputElement" name=view.inputName typeBinding="view.inputType" value=view.value class=view.inputClassNames maxlength=view.maxlength}}
2 |
--------------------------------------------------------------------------------
/app/templates/form-fields/cents-form-field.hbs:
--------------------------------------------------------------------------------
1 |
2 | $ 0.
3 | {{input viewName="inputElement" name=view.inputName type="text" value=view.value class=view.inputClassNames}}
4 |
5 |
--------------------------------------------------------------------------------
/app/templates/form-fields/checkbox-form-field.hbs:
--------------------------------------------------------------------------------
1 |
2 | {{input type="checkbox" checked=view.value name=view.inputName}}
3 | {{view.labelText}}
4 |
5 |
6 | {{#each message in view.errorMessages}}
7 | {{message}}
8 | {{/each}}
9 |
10 | {{#if view.explanationText}}
11 | {{view.explanationText}}
12 | {{/if}}
13 |
--------------------------------------------------------------------------------
/app/templates/form-fields/control-group-field.hbs:
--------------------------------------------------------------------------------
1 |
2 | {{view Ember.TextField value=view.value placeholder=view.placeholder name=view.field type=view.type}}
3 |
4 |
5 | {{view.labelForField}}
6 |
7 | {{#if view.recommendedField}}
8 | Recommended field
9 | {{/if}}
10 |
11 |
--------------------------------------------------------------------------------
/app/templates/form-fields/credit-card-expiration-date-form-field.hbs:
--------------------------------------------------------------------------------
1 | {{formatted-month-year-input
2 | viewName="inputElement"
3 | name=view.inputName
4 | value=view.value
5 | class=view.inputClassNames
6 | }}
7 |
--------------------------------------------------------------------------------
/app/templates/form-fields/credit-card-number-form-field.hbs:
--------------------------------------------------------------------------------
1 | {{formatted-credit-card-input
2 | viewName="inputElement"
3 | name=view.inputName
4 | value=view.value
5 | class=view.inputClassNames
6 | }}
7 |
--------------------------------------------------------------------------------
/app/templates/form-fields/date-picker.hbs:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/app/templates/form-fields/date-select-form-field.hbs:
--------------------------------------------------------------------------------
1 |
2 | {{view Ember.Select
3 | content=view.dateYears
4 | value=view.year
5 | name="dobYear"
6 | class="col-md-4"}}
7 | {{view Ember.Select
8 | content=view.dateMonths
9 | value=view.month
10 | name="dobMonth"
11 | class="col-md-4"}}
12 |
13 |
--------------------------------------------------------------------------------
/app/templates/form-fields/file-drop-field.hbs:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/app/templates/form-fields/form-section.hbs:
--------------------------------------------------------------------------------
1 | {{view.sectionTitle}}
2 | {{#if view.sectionDescription}}
3 | {{view.sectionDescription}}
4 | {{/if}}
5 |
6 | {{yield}}
7 |
8 |
--------------------------------------------------------------------------------
/app/templates/form-fields/meta-form-field.hbs:
--------------------------------------------------------------------------------
1 |
2 | {{input viewName="keyInputElement" name="key" typeBinding="view.inputType" value=view.key class="key-value"}}
3 |
4 | {{input viewName="keyInputElement" name="value" typeBinding="view.inputType" value=view.value class="key-value"}}
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/templates/form-fields/month-year-select-form-field.hbs:
--------------------------------------------------------------------------------
1 |
2 | {{view Ember.Select
3 | name=view.monthName
4 | contentBinding="view.validMonths"
5 | valueBinding="view.monthValue"
6 | class="col-md-4"}}
7 | {{view Ember.Select
8 | name=view.yearName
9 | contentBinding="view.validYears"
10 | valueBinding="view.yearValue"
11 | class="col-md-4"}}
12 |
13 |
--------------------------------------------------------------------------------
/app/templates/form-fields/radio-form-field.hbs:
--------------------------------------------------------------------------------
1 | {{#each option in view.options}}
2 |
3 | {{radio-button viewName="inputElement" name=view.inputName value=option.value checked=view.value class=view.inputClassNames}} {{option.label}}
4 |
5 | {{/each}}
6 |
7 |
--------------------------------------------------------------------------------
/app/templates/form-fields/select-form-field.hbs:
--------------------------------------------------------------------------------
1 | {{view Ember.Select
2 | class="full"
3 | content=view.content
4 | optionValuePath=view.optionValuePath
5 | optionLabelPath=view.optionLabelPath
6 | value=view.value
7 | name=view.name
8 | prompt=view.prompt
9 | }}
10 |
--------------------------------------------------------------------------------
/app/templates/form-fields/static-text-form-field.hbs:
--------------------------------------------------------------------------------
1 | {{#if view.value}}
2 | {{view.value}}
3 | {{else}}
4 | {{view.emptyText}}
5 | {{/if}}
6 |
--------------------------------------------------------------------------------
/app/templates/form-fields/textarea-form-field.hbs:
--------------------------------------------------------------------------------
1 | {{textarea viewName="textAreaElement" name=view.inputName value=view.value class=view.inputClassNames maxlength=view.maxlength}}
2 |
--------------------------------------------------------------------------------
/app/templates/import-payouts/_submit-area.hbs:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/app/templates/import-payouts/confirm-clear-all-modal.hbs:
--------------------------------------------------------------------------------
1 |
2 |
Are you sure you want to clear all error entries?
3 |
4 |
10 |
--------------------------------------------------------------------------------
/app/templates/import-payouts/confirm-remove-row-modal.hbs:
--------------------------------------------------------------------------------
1 |
2 |
Are you sure you want to remove this entry?
3 |
4 |
10 |
--------------------------------------------------------------------------------
/app/templates/import-payouts/default-csv-upload-cell.hbs:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{view.displayValue}}
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/templates/loading.hbs:
--------------------------------------------------------------------------------
1 |
9 |
--------------------------------------------------------------------------------
/app/templates/log.hbs:
--------------------------------------------------------------------------------
1 | {{view "page-navigations/log-page-navigation" model=model hideDateFilter=true}}
2 |
3 | {{#view "detail-views/body-panel"}}
4 | {{#view "detail-views/api-model-panel" model=model}}
5 | {{view detail-views/summary-sections/log-summary-section model=model}}
6 | {{view "detail-views/description-lists/log-titled-key-values-section" model=model}}
7 | {{/view}}
8 |
9 | {{#view "detail-views/main-panel"}}
10 | Request
11 | {{view "pretty-print" contentBinding="model.message.request.payload"}}
12 |
13 | Response
14 | {{view "pretty-print" contentBinding="model.message.response.body"}}
15 | {{/view}}
16 | {{/view}}
17 |
--------------------------------------------------------------------------------
/app/templates/login.hbs:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/app/templates/logout.hbs:
--------------------------------------------------------------------------------
1 | You have successfully logged out.
2 |
--------------------------------------------------------------------------------
/app/templates/marketplace-application.hbs:
--------------------------------------------------------------------------------
1 | {{model.href}} - {{model.api_key}}
2 |
3 | {{model.status}}
4 | {{model.isAccepted}}
5 | {{#if model.isAccepted}}
6 | Your application has been accepted.
7 |
8 | Click here to bind
9 |
10 | {{/if}}
11 |
--------------------------------------------------------------------------------
/app/templates/marketplace/customers.hbs:
--------------------------------------------------------------------------------
1 | {{#view "page-navigations/page-navigation" title="Customers"}}
2 |
5 | {{/view}}
6 |
7 |
8 |
9 |
10 |
11 | {{view "results/customers-table" loader=resultsLoader}}
12 |
13 |
14 |
--------------------------------------------------------------------------------
/app/templates/marketplace/disputes.hbs:
--------------------------------------------------------------------------------
1 | {{view "page-navigations/page-navigation" title="Disputes"}}
2 |
3 |
4 |
10 |
11 |
12 |
13 |
14 | {{view "results/disputes-table" loader=resultsLoader}}
15 |
16 |
17 |
--------------------------------------------------------------------------------
/app/templates/marketplace/funding-instruments.hbs:
--------------------------------------------------------------------------------
1 | {{view "page-navigations/page-navigation" title="Payment methods"}}
2 |
3 |
4 |
5 |
6 | {{view "results/embedded-funding-instruments-table" loader=resultsLoader}}
7 |
8 |
--------------------------------------------------------------------------------
/app/templates/marketplace/invoices.hbs:
--------------------------------------------------------------------------------
1 | {{view "page-navigations/page-navigation" title="Account statements"}}
2 |
3 |
4 |
10 |
11 |
12 |
13 |
14 | {{view "results/invoices-table" loader=resultsLoader}}
15 |
16 |
17 |
--------------------------------------------------------------------------------
/app/templates/marketplace/logs.hbs:
--------------------------------------------------------------------------------
1 | {{view "page-navigations/page-navigation" title="Logs"}}
2 |
3 |
4 |
5 |
6 | {{view "results/logs-table" loader=resultsLoader}}
7 |
8 |
--------------------------------------------------------------------------------
/app/templates/marketplace/orders.hbs:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{view "results/orders-table" loader=resultsLoader}}
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/templates/marketplace/search.hbs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{input type="text" class="q" value=view.query disabled=true}}
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/templates/marketplace/transactions.hbs:
--------------------------------------------------------------------------------
1 |
2 | {{#if hasUnlinkedTransactions}}
3 |
4 |
5 |
6 | You have unlinked transactions. Use Orders to link related transactions between buyer and merchant.
7 |
8 |
9 |
10 | {{/if}}
11 | {{view "results/transactions-table"
12 | loader=resultsLoader
13 | showUnlinkedTransactionsIcon=marketplace.isOrdersRequired
14 | }}
15 |
16 |
--------------------------------------------------------------------------------
/app/templates/marketplaces.hbs:
--------------------------------------------------------------------------------
1 |
2 | {{view "sidebar/marketplace-sidebar" marketplace=controllers.marketplace.marketplace}}
3 | {{partial "header"}}
4 |
5 | {{outlet}}
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/templates/marketplaces/add-existing-marketplace.hbs:
--------------------------------------------------------------------------------
1 |
2 | {{#if view.isSubmitting}}
3 |
4 | {{else}}
5 | Add
6 | {{/if}}
7 | {{view "form-fields/text-field" valueBinding="view.secret" name="secret" placeholder="Enter API key of existing marketplace"}}
8 |
9 |
--------------------------------------------------------------------------------
/app/templates/marketplaces/add-test-marketplace.hbs:
--------------------------------------------------------------------------------
1 |
2 | {{#if view.isSubmitting}}
3 |
4 | {{else}}
5 | Add
6 | {{/if}}
7 | {{view "form-fields/text-field" valueBinding="view.name" name="name" placeholder="Enter test marketplace name"}}
8 |
9 |
--------------------------------------------------------------------------------
/app/templates/marketplaces/marketplace-link-bar.hbs:
--------------------------------------------------------------------------------
1 | {{#if view.isTest}}
2 | ×
3 | {{/if}}
4 |
5 |
6 |
7 |
8 | {{#link-to 'marketplace' view.marketplace.id class="name"}}
9 | {{view.marketplace.name}}
10 | {{/link-to}}
11 |
12 |
--------------------------------------------------------------------------------
/app/templates/menus/base-menu-layout.hbs:
--------------------------------------------------------------------------------
1 |
2 | {{#if view.iconName}}
3 |
4 | {{/if}}
5 | {{view.menuTitle}}
6 |
7 |
8 | {{yield}}
9 |
--------------------------------------------------------------------------------
/app/templates/menus/dropdown-menu-items/open-modal.hbs:
--------------------------------------------------------------------------------
1 | {{view.text}}
2 |
--------------------------------------------------------------------------------
/app/templates/menus/dropdown-menu-items/route-link.hbs:
--------------------------------------------------------------------------------
1 | {{#link-to view.routeName}}{{view.text}}{{/link-to}}
2 |
--------------------------------------------------------------------------------
/app/templates/menus/marketplace-escrow-menu.hbs:
--------------------------------------------------------------------------------
1 |
9 |
--------------------------------------------------------------------------------
/app/templates/menus/order-sort-menu.hbs:
--------------------------------------------------------------------------------
1 |
9 |
--------------------------------------------------------------------------------
/app/templates/meta-list.hbs:
--------------------------------------------------------------------------------
1 |
2 |
3 | Meta information
4 |
5 |
6 |
7 |
8 |
9 | {{#if view.meta_array}}
10 |
11 | {{#each meta in view.meta_array}}
12 | {{meta.key}}
13 | {{meta.value}}
14 | {{/each}}
15 |
16 | {{else}}
17 |
none
18 | {{/if}}
19 |
20 |
--------------------------------------------------------------------------------
/app/templates/migrate-connect-success.hbs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
We have connected to your Stripe account
4 |
5 |
6 | We will migrate your information to your Stripe account and email you when the migration process is completed.
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/templates/migrate-success.hbs:
--------------------------------------------------------------------------------
1 | Next step
2 |
3 |
4 |
5 |
Activate your stripe account
6 |
7 |
8 | Provide your personal and business information to obtain process access to stripe.
9 | You will not be able to process live until you've activated your account.
10 |
13 |
14 |
--------------------------------------------------------------------------------
/app/templates/modals/action-buttons.hbs:
--------------------------------------------------------------------------------
1 | Cancel
2 | {{view._submitTitle}}
3 |
--------------------------------------------------------------------------------
/app/templates/modals/api-key-create-modal.hbs:
--------------------------------------------------------------------------------
1 | {{#view "form-fields/form-section" model=view.model}}
2 | {{view "form-fields/text-form-field"
3 | model=view.parentView
4 | inputClassNames="full"
5 | labelText="Name (optional)"
6 | field="keyName"
7 | name="keyName"
8 | }}
9 | {{/view}}
10 |
--------------------------------------------------------------------------------
/app/templates/modals/api-key-delete-modal.hbs:
--------------------------------------------------------------------------------
1 |
17 |
--------------------------------------------------------------------------------
/app/templates/modals/base-modal-layout.hbs:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{render "modal_notification_center"}}
4 |
8 | {{yield}}
9 |
10 |
11 |
--------------------------------------------------------------------------------
/app/templates/modals/callback-delete-modal.hbs:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/app/templates/modals/change-email-modal.hbs:
--------------------------------------------------------------------------------
1 | {{#view "form-fields/form-section" model=view.model sectionTitle="Email information"}}
2 | {{view "form-fields/static-text-form-field" value=view.parentView.currentEmailAddress labelText="Current email address" inputClassNames="full"}}
3 | {{view "form-fields/text-form-field" model=view.model field="email" labelText="New email address" name="email_address" inputClassNames="full"}}
4 | {{view "form-fields/base-form-field" model=view.model field="existing_password" labelText="Current password" name="existing_password" inputClassNames="full" inputType="password"}}
5 | {{/view}}
6 |
--------------------------------------------------------------------------------
/app/templates/modals/change-password-modal.hbs:
--------------------------------------------------------------------------------
1 | {{#view "form-fields/form-section" model=view.model sectionTitle="Password information"}}
2 | {{view "form-fields/text-form-field" model=view.model field="existing_password" labelText="Current password" name="existing_password" inputClassNames="full" inputType="password"}}
3 | {{view "form-fields/text-form-field" model=view.model field="password" labelText="New password" name="password" inputClassNames="full" inputType="password"}}
4 | {{view "form-fields/text-form-field" model=view.model field="confirm_password" labelText="Confirm password" name="confirm_password" inputClassNames="full" inputType="password"}}
5 | {{/view}}
6 |
--------------------------------------------------------------------------------
/app/templates/modals/confirm-modal.hbs:
--------------------------------------------------------------------------------
1 |
2 |
{{view.confirmMessage}}
3 |
4 |
--------------------------------------------------------------------------------
/app/templates/modals/edit-description-modal.hbs:
--------------------------------------------------------------------------------
1 | {{#view "form-fields/form-section" model=view.model}}
2 | {{view "form-fields/text-form-field" model=view.model field="description" labelText="Internal description" maxlength=Constants.MAXLENGTH.DESCRIPTION inputClassNames="full"}}
3 | {{/view}}
4 |
--------------------------------------------------------------------------------
/app/templates/modals/export-csv-modal.hbs:
--------------------------------------------------------------------------------
1 | {{#view "form-fields/form-section" model=view.model sectionTitle="Destination for your CSV file"}}
2 | {{view "form-fields/text-form-field" model=view.model field="emailAddress" labelText="Email address" inputClassNames="full"}}
3 | {{/view}}
4 |
--------------------------------------------------------------------------------
/app/templates/modals/full-modal-layout.hbs:
--------------------------------------------------------------------------------
1 |
5 | {{yield}}
6 |
--------------------------------------------------------------------------------
/app/templates/modals/funding-instrument-delete-modal.hbs:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/app/templates/modals/marketplace-delete-modal.hbs:
--------------------------------------------------------------------------------
1 | Are you sure you want to remove the marketplace {{view.marketplace.name}} from your access list?
2 |
--------------------------------------------------------------------------------
/app/templates/modals/marketplace-user-create-modal.hbs:
--------------------------------------------------------------------------------
1 | {{#view "form-fields/form-section" userInvite=view.userInvite model=view.model}}
2 | {{view "form-fields/text-form-field"
3 | model=view.userInvite
4 | inputClassNames="full"
5 | labelText="Email address"
6 | field="email_address"
7 | name="email_address"
8 | }}
9 | {{/view}}
10 |
--------------------------------------------------------------------------------
/app/templates/modals/marketplace-user-delete-modal.hbs:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/app/templates/modals/meta-edit-modal.hbs:
--------------------------------------------------------------------------------
1 | {{#view "form-fields/form-section" sectionTitle="Meta information" metaFields=view.metaDictionary.fields}}
2 |
3 | {{view.parentView.firstLabelText}}
4 |
5 |
6 |
7 | {{view.parentView.secondLabelText}}
8 |
9 |
10 | {{#each metaField in view.metaFields}}
11 | {{view "form-fields/meta-form-field" model=metaField}}
12 | {{/each}}
13 |
16 | {{/view}}
17 |
--------------------------------------------------------------------------------
/app/templates/modals/modal-base-footer.hbs:
--------------------------------------------------------------------------------
1 | {{view.beforeSubmitText}}
2 | {{#if view.cancelButtonText}}
3 | {{view.cancelButtonText}}
4 | {{/if}}
5 | {{view.submitButtonText}}
6 |
--------------------------------------------------------------------------------
/app/templates/modals/modal-errors.hbs:
--------------------------------------------------------------------------------
1 | {{#if view.model.displayErrorDescription}}
2 |
3 | {{view.model.errorDescription}}
4 |
5 | {{/if}}
6 |
--------------------------------------------------------------------------------
/app/templates/modals/progress-bar-modal.hbs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {{view.progressText}}
6 |
7 | {{#if view.isCancelable}}
8 |
9 | Cancel Upload
10 |
11 | {{/if}}
12 |
--------------------------------------------------------------------------------
/app/templates/modals/refund-debit-modal.hbs:
--------------------------------------------------------------------------------
1 | {{#view "form-fields/form-section" recipientLabel=view.recipientLabel recipientDisplay=view.recipientDisplay model=view.model sectionTitle="Payment information"}}
2 | {{view "form-fields/static-text-form-field"
3 | labelText=view.recipientLabel
4 | value=view.recipientDisplay
5 | }}
6 | {{view "form-fields/amount-form-field" model=view.model field="dollar_amount" labelText="Amount"}}
7 | {{view "form-fields/text-form-field" model=view.model field="description" labelText="Internal description" maxlength=Constants.MAXLENGTH.DESCRIPTION inputClassNames="full"}}
8 | {{/view}}
9 |
--------------------------------------------------------------------------------
/app/templates/modals/search-modal-layout.hbs:
--------------------------------------------------------------------------------
1 |
8 | {{yield}}
9 |
--------------------------------------------------------------------------------
/app/templates/modals/verify-bank-account.hbs:
--------------------------------------------------------------------------------
1 | {{#view "form-fields/form-section" model=view.model sectionTitle="Bank account verification required"}}
2 |
5 | {{/view}}
6 |
--------------------------------------------------------------------------------
/app/templates/modals/void-hold-modal.hbs:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/app/templates/notification-center.hbs:
--------------------------------------------------------------------------------
1 | {{#each alert in controller}}
2 |
3 |
4 |
5 | {{alert.message}}
6 | {{#if alert.linkText}}
7 | {{#link-to alert.linkTo}}{{alert.linkText}}{{/link-to}}
8 | {{/if}}
9 |
10 |
11 |
12 | {{/each}}
13 |
--------------------------------------------------------------------------------
/app/templates/otp.hbs:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/app/templates/page-form.hbs:
--------------------------------------------------------------------------------
1 |
2 | {{render "notification_center"}}
3 |
4 |
5 |
6 | {{#if view.pageTitle}}
7 |
{{view.pageTitle}}
8 | {{/if}}
9 |
10 | {{yield}}
11 |
12 |
13 |
14 | {{#link-to view.afterFormLink.linkTo}}{{view.afterFormLink.linkText}}{{/link-to}}
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/app/templates/page-navigations/page-navigation-layout.hbs:
--------------------------------------------------------------------------------
1 |
2 | {{#if view.order}}
3 |
{{#link-to view.order.route_name view.order title=view.order.description}}Order{{/link-to}} ›
4 | {{/if}}
5 | {{#if view.pageType}}
6 |
{{view.pageType}}
7 | {{/if}}
8 |
9 | {{yield}}
10 |
11 |
12 | {{view.title}}
13 |
14 |
15 | {{#unless view.hideDateFilter}}
16 | {{#unless view.pageType}}
17 | {{view "form-fields/date-picker" viewName="dateTimePicker"}}
18 | {{/unless}}
19 | {{/unless}}
20 |
21 |
--------------------------------------------------------------------------------
/app/templates/pretty-print.hbs:
--------------------------------------------------------------------------------
1 | {{pretty-print view.content}}
2 |
--------------------------------------------------------------------------------
/app/templates/register-flow/next-step-modal.hbs:
--------------------------------------------------------------------------------
1 |
2 | {{#view "form-fields/form-section" model=view.model
3 | sectionTitle="Explore my test marketplace"
4 | sectionDescription="Explore the dashboard and interact with the Balanced API in test mode."}}
5 |
{{view.parentView.cancelButtonText}}
6 | {{/view}}
7 |
8 |
--------------------------------------------------------------------------------
/app/templates/register-flow/user-create-modal.hbs:
--------------------------------------------------------------------------------
1 | {{#view "form-fields/form-section" model=view.model sectionTitle="Create your account"}}
2 | {{view "form-fields/text-form-field" model=view.model inputClassNames="full"
3 | field="email_address"
4 | labelText="Email"
5 | inputName="email_address"
6 | }}
7 |
8 | {{view "form-fields/base-form-field" model=view.model inputClassNames="full" inputType="password"
9 | inputName="password" field="password" labelText="Password"}}
10 |
11 | {{view "form-fields/base-form-field" model=view.model inputClassNames="full" inputType="password"
12 | inputName="passwordConfirm" field="passwordConfirm" labelText="Re-enter password"}}
13 | {{/view}}
14 |
--------------------------------------------------------------------------------
/app/templates/reset-password.hbs:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/app/templates/resource-logs.hbs:
--------------------------------------------------------------------------------
1 |
2 | {{view "results/logs-embedded-table" results=view.results}}
3 |
4 |
--------------------------------------------------------------------------------
/app/templates/results/date-filter-header.hbs:
--------------------------------------------------------------------------------
1 | {{view "form-fields/date-picker" viewName="dateTimePicker"}}
2 |
--------------------------------------------------------------------------------
/app/templates/results/grouped-transaction-row.hbs:
--------------------------------------------------------------------------------
1 |
2 | {{#link-to view.routeName view.item}}
3 |
4 | {{view.displayValue}}
5 |
6 | {{/link-to}}
7 |
8 |
9 | {{#link-to view.routeName view.item}}
10 |
11 | {{view.paymentMethodText}}
12 |
13 | {{/link-to}}
14 |
15 |
16 | {{#link-to view.routeName view.item}}
17 |
18 | {{view.amountText}}
19 |
20 | {{/link-to}}
21 |
22 |
--------------------------------------------------------------------------------
/app/templates/results/grouped-transactions-table-layout.hbs:
--------------------------------------------------------------------------------
1 |
2 | {{yield}}
3 |
4 |
--------------------------------------------------------------------------------
/app/templates/results/keyboard-shortcuts.hbs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
Search for payments, customers, payment methods, disputes, or logs
4 |
5 |
6 |
Search keyboard shortcuts
7 |
8 |
9 | {{#each shortcut in view.shortcuts}}
10 | {{shortcut.key}}
11 | {{{shortcut.value}}}
12 | {{/each}}
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/templates/results/no-results.hbs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
No results
4 |
5 |
6 |
Example searches
7 |
8 |
9 | {{#each example in view.examples}}
10 | {{example.key}}
11 | {{example.value}}
12 | {{/each}}
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/templates/results/results-dropdown-filter.hbs:
--------------------------------------------------------------------------------
1 |
2 | {{view.toggleText}}
3 |
4 |
5 |
10 |
--------------------------------------------------------------------------------
/app/templates/results/results-filter-list-item.hbs:
--------------------------------------------------------------------------------
1 | {{view.text}}
2 |
--------------------------------------------------------------------------------
/app/templates/results/results-filters-header.hbs:
--------------------------------------------------------------------------------
1 |
2 | {{view "form-fields/date-picker" viewName="dateTimePicker"}}
3 |
4 |
5 | {{#if view.show_download_button}}
6 | {{view "modals/download/download-modal" noURIBinding="controller.noDownloadsUri"}}
7 | {{/if}}
8 |
9 | {{#unless auth.isGuest}}
10 | {{#unless controllers.marketplace.production}}
11 | {{#link-to "marketplace.import_payouts" class="btn-link sm pull-right"}}
12 | Import payouts
13 | {{/link-to}}
14 | {{/unless}}
15 | {{/unless}}
16 |
17 |
18 |
--------------------------------------------------------------------------------
/app/templates/results/results-load-more.hbs:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{#if view.results.loadingNextPage}}
4 |
5 |
6 |
7 | {{else}} {{#if view.results.hasNextPage}}
8 | Load more
9 | {{/if}} {{/if}}
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/templates/results/sort-results-loader-header.hbs:
--------------------------------------------------------------------------------
1 | {{view.titleText}}
2 |
--------------------------------------------------------------------------------
/app/templates/sidebar/basic-link-sidebar-item.hbs:
--------------------------------------------------------------------------------
1 | {{#link-to view.routeName active=view.isSelected classBinding="view.childViewItems.length:expanded"}}
2 | {{#if view.linkIcon}}
3 |
4 | {{/if}}
5 | {{view.linkText}}
6 |
7 | {{#if view.alertCount}}
8 | {{view.alertCount}}
9 | {{/if}}
10 | {{/link-to}}
11 |
12 | {{#if view.childViewItems.length}}
13 |
14 | {{#each childView in view.childViewItems}}
15 | {{view childView}}
16 | {{/each}}
17 |
18 | {{/if}}
19 |
--------------------------------------------------------------------------------
/app/templates/sidebar/sidebar.hbs:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
18 | {{partial "footer"}}
19 |
20 |
--------------------------------------------------------------------------------
/app/templates/tables/cells/linked-card.hbs:
--------------------------------------------------------------------------------
1 | {{#if view.item.isOverdue}}
2 |
3 | {{#view "popover" data-trigger="hover" data-placement="top" data-original-title="Overdue order" data-content="Funds in this order are older than 30 days." data-html="true"}}
4 |
5 | {{/view}}
6 |
7 | {{/if}}
8 |
9 | {{#link-to view.routeName view.item}}
10 | {{view.dateLabel}}: {{human-readable-date-time view.date}}
11 | {{view.title}}
12 |
13 |
{{view.amountLabel}}
14 |
{{view.amount}}
15 |
16 | {{/link-to}}
17 |
--------------------------------------------------------------------------------
/app/templates/tables/cells/linked-text-cell.hbs:
--------------------------------------------------------------------------------
1 | {{#link-to view.routeName view.item data-track-event=view.eventTrackerText}}
2 |
3 | {{#if view.isStatusCell}}
4 | {{sentence-case view.displayValue}}
5 | {{else}}
6 | {{view.displayValue}}
7 | {{/if}}
8 |
9 | {{/link-to}}
10 |
--------------------------------------------------------------------------------
/app/templates/tables/cells/unlinked-status-cell.hbs:
--------------------------------------------------------------------------------
1 |
2 | {{view.order}}
3 | {{#if view.isUnlinked}}
4 | {{#view "popover" data-trigger="click" data-placement="right" data-original-title=view.tooltipTitle data-content=view.tooltipContent data-html="true"}}
5 |
6 | {{/view}}
7 | {{/if}}
8 |
9 |
--------------------------------------------------------------------------------
/app/utils/constants/cookie.coffee:
--------------------------------------------------------------------------------
1 | COOKIE =
2 | # cookies set by the Ember dashboard app
3 | EMBER_AUTH_TOKEN: 'ember-auth-rememberable',
4 | MARKETPLACE_URI: 'mru',
5 | API_KEY_SECRET: 'apiKeySecret',
6 | NEW_UPDATES: 'new-updates',
7 |
8 | # read only (set by the auth proxy)
9 | CSRF_TOKEN: 'csrftoken',
10 | SESSION: 'session'
11 |
12 | `export default COOKIE`
13 |
--------------------------------------------------------------------------------
/app/utils/create-redirect-route.js:
--------------------------------------------------------------------------------
1 | import AuthRoute from "balanced-dashboard/routes/auth";
2 |
3 | function createRedirectRoute(routeName, modelFor, baseRoute) {
4 | baseRoute = baseRoute || AuthRoute;
5 | modelFor = modelFor || 'marketplace';
6 |
7 | return baseRoute.extend({
8 | redirect: function() {
9 | this.transitionTo(routeName, this.modelFor(modelFor));
10 | }
11 | });
12 | }
13 |
14 | export default createRedirectRoute;
15 |
--------------------------------------------------------------------------------
/app/utils/error-handlers/base.coffee:
--------------------------------------------------------------------------------
1 | class BaseErrorHandler
2 | addErrorMessage: (key, message) ->
3 | @model.get("validationErrors").add(key, "serverError", null, message)
4 |
5 | clear: ->
6 | @model.get("validationErrors").clear()
7 |
8 | `export default BaseErrorHandler;`
9 |
--------------------------------------------------------------------------------
/app/views/detail-views/api-model-panel.js:
--------------------------------------------------------------------------------
1 | import SidePanelView from "./side-panel";
2 | import Utils from "balanced-dashboard/lib/utils";
3 |
4 | var ApiModelPanelView = SidePanelView.extend({});
5 |
6 | export default ApiModelPanelView;
7 |
--------------------------------------------------------------------------------
/app/views/detail-views/description-lists/dispute-titled-key-values-section.js:
--------------------------------------------------------------------------------
1 | import TransactionTitledKeyValuesSectionView from "./transaction-titled-key-values-section";
2 | import ListValueGenerator from "./list-value-generator";
3 |
4 | var DisputeTitledKeyValuesSectionView = TransactionTitledKeyValuesSectionView.extend({
5 | editModelModalClass: function() {
6 | return undefined;
7 | }.property(),
8 |
9 | keyValueListViews: ListValueGenerator.create()
10 | .add("Created at", "created_at")
11 | .add("Dispute ID", "id")
12 | .add("Initiated at", "initiated_at")
13 | .add("Respond by", "respond_by")
14 | .add("Reason", "reason")
15 | .toProperty()
16 | });
17 |
18 | export default DisputeTitledKeyValuesSectionView;
19 |
--------------------------------------------------------------------------------
/app/views/detail-views/description-lists/invoice-titled-key-values-section.js:
--------------------------------------------------------------------------------
1 | import TitledKeyValuesSectionView from "./titled-key-values-section";
2 | import ListValueGenerator from "./list-value-generator";
3 |
4 | var InvoiceTitledKeyValuesSectionView = TitledKeyValuesSectionView.extend({
5 | keyValueListViews: ListValueGenerator.create()
6 | .add("Created at", "created_at")
7 | .add("Invoice ID", "id")
8 | .add("From", "from_date")
9 | .add("To", "to_date")
10 | .toProperty()
11 | });
12 |
13 | export default InvoiceTitledKeyValuesSectionView;
14 |
--------------------------------------------------------------------------------
/app/views/detail-views/description-lists/key-value-generator.coffee:
--------------------------------------------------------------------------------
1 | class KeyValueGenerator
2 | @create: ->
3 | new @
4 |
5 | constructor: ->
6 | @values = []
7 |
8 | add: (key, value) ->
9 | @values.push(
10 | key: key,
11 | value: value
12 | )
13 | @
14 |
15 | `export default KeyValueGenerator;`
16 |
--------------------------------------------------------------------------------
/app/views/detail-views/description-lists/order-titled-key-values-section.js:
--------------------------------------------------------------------------------
1 | import TitledKeyValuesSectionView from "./titled-key-values-section";
2 | import ListValueGenerator from "./list-value-generator";
3 |
4 | var OrderTitledKeyValuesSectionView = TitledKeyValuesSectionView.extend({
5 | keyValueListViews: ListValueGenerator.create()
6 | .add("Created at", "created_at")
7 | .add("Order ID", "id")
8 | .toProperty()
9 | });
10 |
11 | export default OrderTitledKeyValuesSectionView;
12 |
--------------------------------------------------------------------------------
/app/views/detail-views/key-value.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | var KeyValueView = Ember.View.extend({
4 | templateName: "detail-views/key-value",
5 | hasLink: false,
6 | });
7 |
8 | export default KeyValueView;
9 |
--------------------------------------------------------------------------------
/app/views/detail-views/linked-key-value.js:
--------------------------------------------------------------------------------
1 | import KeyValueView from "./key-value";
2 |
3 | var LinkedKeyValueView = KeyValueView.extend({
4 | hasLink: true
5 | });
6 |
7 | export default LinkedKeyValueView;
8 |
--------------------------------------------------------------------------------
/app/views/detail-views/main-panel.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | var MainPanelView = Ember.View.extend({
4 | classNameBindings: [":main-panel", ":span"]
5 | });
6 |
7 | export default MainPanelView;
8 |
--------------------------------------------------------------------------------
/app/views/detail-views/order-main-panel.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 | import MainPanelView from "./main-panel";
3 |
4 | var OrderMainPanelView = MainPanelView.extend({
5 | isActivityTabSelected: true
6 | });
7 |
8 | export default OrderMainPanelView;
9 |
--------------------------------------------------------------------------------
/app/views/detail-views/side-panel.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | var SidePanelView = Ember.View.extend({
4 | classNameBindings: [":side-panel"],
5 | layoutName: "detail-views/side-panel-layout"
6 | });
7 |
8 | export default SidePanelView;
9 |
--------------------------------------------------------------------------------
/app/views/detail-views/summary-items/card-status.coffee:
--------------------------------------------------------------------------------
1 | `import Base from "./base-status";`
2 |
3 | CardStatus = Base.extend()
4 |
5 | `export default CardStatus;`
6 |
--------------------------------------------------------------------------------
/app/views/detail-views/summary-items/customer-status.coffee:
--------------------------------------------------------------------------------
1 | `import Base from "./base-status";`
2 |
3 | CustomerStatus = Base.extend(
4 | isUnverified: Ember.computed.equal("status", "unverified")
5 |
6 | description: Ember.computed "isUnverified", ->
7 | if @get("isUnverified")
8 | 'You may credit this customer, but we recommend collecting more information from this customer for underwriting purposes.'
9 |
10 | learnMoreText: Ember.computed "isUnverified", ->
11 | if @get("isUnverified")
12 | "For an individual, you may collect full legal name, email, permanent street address, and last four digits of SSN. For a business, we also recommend collecting the full business name and EIN number."
13 | )
14 |
15 | `export default CustomerStatus;`
16 |
--------------------------------------------------------------------------------
/app/views/detail-views/summary-items/customer.coffee:
--------------------------------------------------------------------------------
1 | `import Base from "./base";`
2 |
3 | Customer = Base.extend(
4 | isLoading: Ember.computed.reads("model.isLoading")
5 | isLink: true
6 |
7 | text: Ember.computed.reads("model.display_me")
8 | hoverValue: Ember.computed.reads("model.display_me_with_email")
9 | )
10 |
11 | `export default Customer;`
12 |
--------------------------------------------------------------------------------
/app/views/detail-views/summary-items/dispute-status.coffee:
--------------------------------------------------------------------------------
1 | `import Base from "./base-status";`
2 |
3 | DisputeStatus = Base.extend(
4 | description: Ember.computed "model.status", ->
5 | switch @get('model.status')
6 | when "needs_attention"
7 | 'Provide documentation to fight this dispute'
8 | when "under_review"
9 | 'This dispute is under review. Once the card reviewer issues a decision, the status will update to won or lost.'
10 | )
11 |
12 | `export default DisputeStatus;`
13 |
--------------------------------------------------------------------------------
/app/views/detail-views/summary-items/invoice-status.coffee:
--------------------------------------------------------------------------------
1 | `import Base from "./base-status";`
2 | `import Utils from "balanced-dashboard/lib/utils";`
3 |
4 | InvoiceStatus = Base.extend(
5 | status: Ember.computed.reads("model.state")
6 | description: Ember.computed "model.settle_at", ->
7 | return "on #{Utils.humanReadableDateLong(@get('model.settle_at'))}"
8 | )
9 |
10 | `export default InvoiceStatus;`
11 |
--------------------------------------------------------------------------------
/app/views/detail-views/summary-items/label-base.coffee:
--------------------------------------------------------------------------------
1 | `import Ember from "ember";`
2 |
3 | LabelBaseView = Ember.View.extend(
4 | tagName: "dt"
5 | templateName: "detail-views/summary-items/label-base"
6 |
7 | isModalEditLink: Ember.computed "modalEditClass", ->
8 | !Ember.isBlank(@get("modalEditClass"))
9 |
10 | iconClasses: Ember.computed "icon", ->
11 | icons = ["icon-#{@get("icon")}"]
12 | icons.join(" ")
13 | )
14 |
15 | `export default LabelBaseView;`
16 |
--------------------------------------------------------------------------------
/app/views/detail-views/summary-items/log-status.coffee:
--------------------------------------------------------------------------------
1 | `import Base from "./base-status";`
2 |
3 | LogStatus = Base.extend(
4 | text: Ember.computed.reads("model.status_code"),
5 | description: Ember.computed.reads("model.additional"),
6 | status: Ember.computed.reads("model.status"),
7 | )
8 |
9 | `export default LogStatus;`
10 |
--------------------------------------------------------------------------------
/app/views/detail-views/summary-items/model-description.coffee:
--------------------------------------------------------------------------------
1 | `import Base from "./base";`
2 |
3 | ModelDescription = Base.extend(
4 | isLoading: Ember.computed.reads("model.isLoading")
5 | isBlank: Ember.computed.empty("model.description")
6 | text: Ember.computed.reads("model.description")
7 | )
8 |
9 | `export default ModelDescription;`
10 |
--------------------------------------------------------------------------------
/app/views/detail-views/summary-items/order-status.coffee:
--------------------------------------------------------------------------------
1 | `import Base from "./base-status";`
2 |
3 | OrderStatus = Base.extend(
4 | description: Ember.computed("isOverdue", ->
5 | if @get("isOverdue")
6 | "Funds in this order are older than 30 days. Pay out your outstanding balance now."
7 | )
8 | )
9 |
10 | `export default OrderStatus;`
11 |
--------------------------------------------------------------------------------
/app/views/detail-views/summary-items/order.coffee:
--------------------------------------------------------------------------------
1 | `import Base from "./base";`
2 | `import Utils from "balanced-dashboard/lib/utils";`
3 |
4 | Order = Base.extend(
5 | isLoading: Ember.computed.reads("model.isLoading")
6 | isLink: true
7 |
8 | text: Ember.computed "model.amount_escrowed", ->
9 | amount = @get("model.amount_escrowed")
10 | "$#{Utils.centsToDollars(amount)}"
11 |
12 | hoverValue: Ember.computed "model.created_at", ->
13 | date = @get("model.created_at")
14 | "Created at #{Utils.humanReadableDateShort(date)}"
15 | )
16 |
17 | `export default Order;`
18 |
--------------------------------------------------------------------------------
/app/views/detail-views/summary-items/refund-status.coffee:
--------------------------------------------------------------------------------
1 | `import Base from "./transaction-status";`
2 |
3 | RefundStatus = Base.extend()
4 |
5 | `export default RefundStatus;`
6 |
--------------------------------------------------------------------------------
/app/views/detail-views/summary-items/summary-item-view-generator.coffee:
--------------------------------------------------------------------------------
1 | class SummaryItemViewGenerator
2 | @view: (template, model) ->
3 | new @(template, model)
4 |
5 | constructor: (@template, @model) ->
6 |
7 | addTo: (summarySectionView) ->
8 | summarySectionView.addItem("detail-views/resource-summary",
9 | model: @model
10 | valueBinding: "model.source"
11 | hoverValueBinding: "model"
12 | )
13 |
14 | `export default SummaryItemViewGenerator;`
15 |
--------------------------------------------------------------------------------
/app/views/detail-views/summary-items/transaction-status.coffee:
--------------------------------------------------------------------------------
1 | `import Base from "./base-status";`
2 |
3 | TransactionStatus = Base.extend()
4 |
5 | `export default TransactionStatus;`
6 |
--------------------------------------------------------------------------------
/app/views/detail-views/summary-items/transaction.coffee:
--------------------------------------------------------------------------------
1 | `import Base from "./base";`
2 | `import Utils from "balanced-dashboard/lib/utils";`
3 |
4 | Transaction = Base.extend(
5 | isLoading: Ember.computed.reads("model.isLoading")
6 | isLink: true
7 |
8 | text: Ember.computed "model.amount", ->
9 | amount = @get("model.amount")
10 | "$#{Utils.centsToDollars(amount)}"
11 |
12 | hoverValue: Ember.computed "model.created_at", ->
13 | date = @get("model.created_at")
14 | "Created at #{Utils.humanReadableDateShort(date)}"
15 | )
16 |
17 | `export default Transaction;`
18 |
--------------------------------------------------------------------------------
/app/views/detail-views/summary-sections/bank-account-summary-section.js:
--------------------------------------------------------------------------------
1 | import BaseSummarySection from "./summary-section-base";
2 | import Utils from "balanced-dashboard/lib/utils";
3 |
4 | var BankAccountSummarySectionView = BaseSummarySection.extend({
5 | generateItems: function() {
6 | var model = this.get("model");
7 | this.addLabel("Status", "status");
8 | this.addSummaryItem("bank-account-status", {
9 | model: model
10 | });
11 |
12 | this.addLabel("Customer", "customers");
13 | this.addSummaryItem("customer", {
14 | modelBinding: "fundingInstrument.customer", fundingInstrument: model
15 | });
16 | },
17 | });
18 |
19 |
20 | export default BankAccountSummarySectionView;
21 |
--------------------------------------------------------------------------------
/app/views/detail-views/summary-sections/card-summary-section.js:
--------------------------------------------------------------------------------
1 | import BaseSummarySection from "./summary-section-base";
2 |
3 | var CardSummarySectionView = BaseSummarySection.extend({
4 | generateItems: function() {
5 | var model = this.get("model");
6 | this.addLabel("Status", "status");
7 | this.addSummaryItem("card-status", {
8 | model: model
9 | });
10 |
11 | this.addLabel("Customer", "customers");
12 | this.addSummaryItem("customer", {
13 | modelBinding: "fundingInstrument.customer", fundingInstrument: model
14 | });
15 | },
16 | });
17 |
18 | export default CardSummarySectionView;
19 |
--------------------------------------------------------------------------------
/app/views/detail-views/summary-sections/credit-summary-section.js:
--------------------------------------------------------------------------------
1 | import TransactionBaseSummarySection from "./transaction-base-summary-section";
2 |
3 | var CreditSummarySectionView = TransactionBaseSummarySection.extend();
4 |
5 | export default CreditSummarySectionView;
6 |
--------------------------------------------------------------------------------
/app/views/detail-views/summary-sections/customer-summary-section.js:
--------------------------------------------------------------------------------
1 | import SummarySectionBase from "./summary-section-base";
2 |
3 | var CustomerSummarySectionView = SummarySectionBase.extend({
4 | generateItems: function() {
5 | var model = this.get("model");
6 | this.addLabel("Status", "status");
7 | this.addSummaryItem("customer-status", {
8 | model: model,
9 | });
10 | },
11 | });
12 |
13 | export default CustomerSummarySectionView;
14 |
--------------------------------------------------------------------------------
/app/views/detail-views/summary-sections/debit-summary-section.coffee:
--------------------------------------------------------------------------------
1 | `import Ember from "ember";`
2 | `import TransactionBaseSummarySection from "./transaction-base-summary-section";`
3 |
4 | DebitSummarySectionView = TransactionBaseSummarySection.extend(
5 | fundingInstrument: Ember.computed.reads("model.source")
6 | isSource: true
7 | )
8 |
9 | `export default DebitSummarySectionView;`
10 |
--------------------------------------------------------------------------------
/app/views/detail-views/summary-sections/hold-summary-section.coffee:
--------------------------------------------------------------------------------
1 | `import Ember from "ember";`
2 | `import TransactionBaseSummarySection from "./transaction-base-summary-section";`
3 |
4 | HoldSummarySectionView = TransactionBaseSummarySection.extend(
5 | fundingInstrument: Ember.computed.reads("model.source")
6 | isSource: true
7 | )
8 |
9 | `export default HoldSummarySectionView;`
10 |
--------------------------------------------------------------------------------
/app/views/detail-views/summary-sections/reversal-summary-section.js:
--------------------------------------------------------------------------------
1 | import TransactionBaseSummarySection from "./transaction-base-summary-section";
2 |
3 | var ReversalSummarySectionView = TransactionBaseSummarySection.extend({
4 | fundingInstrument: Ember.computed.reads("model.credit.destination")
5 | });
6 |
7 | export default ReversalSummarySectionView;
8 |
9 |
--------------------------------------------------------------------------------
/app/views/detail-views/summary-sections/summary-section-resource-list.coffee:
--------------------------------------------------------------------------------
1 | `import Ember from "ember";`
2 |
3 | SummarySectionResourceList = Ember.ContainerView.extend(
4 | tagName: "dl"
5 | classNames: ["linked-resources"]
6 |
7 | addItem: (viewName, attributes) ->
8 | view = @createChildView(viewName, attributes)
9 | @pushObject view
10 | view
11 |
12 | addLabel: (labelText, labelIcon) ->
13 | if Ember.typeOf(labelIcon) == "string"
14 | attributes =
15 | icon: labelIcon
16 | else
17 | attributes = labelIcon
18 | attributes.text = labelText
19 | @addItem("detail-views/summary-items/label-base", attributes)
20 | )
21 |
22 | `export default SummarySectionResourceList;`
23 |
--------------------------------------------------------------------------------
/app/views/detail-views/tabs/tab.js:
--------------------------------------------------------------------------------
1 | var TabView = Ember.View.extend({
2 | templateName: "detail-views/tab",
3 | isSelected: false,
4 |
5 | toggleSelected: function(tabLink) {
6 | var tabs = this.get("tabs");
7 | tabs.map(function(tab) {
8 | tab.set("isSelected", false);
9 | });
10 |
11 | tabLink.set("isSelected", true);
12 | }
13 | });
14 |
15 | export default TabView;
16 |
--------------------------------------------------------------------------------
/app/views/forgot-password.js:
--------------------------------------------------------------------------------
1 | import LoginView from "./login";
2 |
3 | var ForgotPasswordView = LoginView.extend({
4 | templateName: 'forgot-password',
5 | pageTitle: 'Reset password',
6 | afterFormLink: function() {
7 | return {
8 | linkTo: 'login',
9 | linkText: 'Back to sign in'
10 | };
11 | }.property(),
12 | });
13 |
14 | export default ForgotPasswordView;
15 |
--------------------------------------------------------------------------------
/app/views/form-fields/amount-form-field.js:
--------------------------------------------------------------------------------
1 | import BaseFormFieldView from './base-form-field';
2 |
3 | var AmountFormFieldView = BaseFormFieldView.extend({
4 | templateName: "form-fields/amount-form-field",
5 | inputName: "dollar_amount"
6 | });
7 |
8 | export default AmountFormFieldView;
9 |
--------------------------------------------------------------------------------
/app/views/form-fields/cents-form-field.js:
--------------------------------------------------------------------------------
1 | import BaseFormFieldView from './base-form-field';
2 |
3 | var CentsFormFieldView = BaseFormFieldView.extend({
4 | templateName: "form-fields/cents-form-field",
5 | });
6 |
7 | export default CentsFormFieldView;
8 |
--------------------------------------------------------------------------------
/app/views/form-fields/country-select.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 | import SelectFormFieldView from "./select-form-field";
3 | import { CountryCodes } from "balanced-dashboard/lib/country-codes";
4 |
5 | var CountrySelectView = SelectFormFieldView.extend({
6 | content: Ember.computed(function() {
7 | var result = [{
8 | name: "",
9 | code: null
10 | }];
11 | return result.concat(CountryCodes);
12 | }),
13 | inputClassNames: ["country-select", "full"],
14 | optionValuePath: "content.code",
15 | optionLabelPath: "content.name"
16 | });
17 |
18 | export default CountrySelectView;
19 |
--------------------------------------------------------------------------------
/app/views/form-fields/credit-card-expiration-date-form-field.coffee:
--------------------------------------------------------------------------------
1 | `import BaseFormField from "./base-form-field";`
2 |
3 | CreditCardExpirationDateFormFieldView = BaseFormField.extend(
4 | attributeBindings: ['placeholder', 'autofocus']
5 | templateName: "form-fields/credit-card-expiration-date-form-field"
6 | )
7 |
8 | `export default CreditCardExpirationDateFormFieldView;`
9 |
--------------------------------------------------------------------------------
/app/views/form-fields/credit-card-number-form-field.coffee:
--------------------------------------------------------------------------------
1 | `import BaseFormField from "./base-form-field";`
2 |
3 | CreditCardNumberFormFieldView = BaseFormField.extend(
4 | attributeBindings: ['placeholder', 'autofocus']
5 | templateName: "formFields/credit-card-number-form-field"
6 | )
7 |
8 | `export default CreditCardNumberFormFieldView;`
9 |
--------------------------------------------------------------------------------
/app/views/form-fields/file-drop-field.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | var FileDropFieldView = Ember.View.extend({
4 | templateName: 'form-fields/file-drop-field',
5 | dropMessage: 'Drag and drop files',
6 |
7 | dragEnter: function() {
8 | this.set('isDragging', true);
9 | },
10 | dragLeave: function() {
11 | this.set('isDragging', false);
12 | },
13 | dragOver: function(event) {
14 | event.preventDefault();
15 | },
16 | drop: function(event) {
17 | event.preventDefault();
18 | this.set('isDragging', false);
19 | }
20 | });
21 |
22 | export default FileDropFieldView;
23 |
--------------------------------------------------------------------------------
/app/views/form-fields/form-section.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | var FormSectionView = Ember.View.extend({
4 | classNameBindings: [":form-section", ":clearfix"],
5 | layoutName: "form-fields/form-section"
6 | });
7 |
8 | export default FormSectionView;
9 |
--------------------------------------------------------------------------------
/app/views/form-fields/radio-button.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | export default Ember.View.extend({
4 | tagName: 'input',
5 | type: 'radio',
6 | attributeBindings: ['required', 'type', 'htmlChecked:checked', 'value', 'name', 'disabled:disabled'],
7 |
8 | htmlChecked: function() {
9 | return this.get('value') === this.get('checked');
10 | }.property('value', 'checked'),
11 |
12 | change: function() {
13 | this.set('checked', this.get('value'));
14 | },
15 |
16 | _updateElementValue: function() {
17 | Ember.run.next(this, function() {
18 | this.$().prop('checked', this.get('htmlChecked'));
19 | });
20 | }.observes('htmlChecked')
21 | });
22 |
--------------------------------------------------------------------------------
/app/views/form-fields/radio-form-field.js:
--------------------------------------------------------------------------------
1 | import BaseFormFieldView from './base-form-field';
2 |
3 | var RadioFormFieldView = BaseFormFieldView.extend({
4 | templateName: "form-fields/radio-form-field",
5 | inputName: "radio",
6 | });
7 |
8 | export default RadioFormFieldView;
9 |
--------------------------------------------------------------------------------
/app/views/form-fields/search-date-picker.js:
--------------------------------------------------------------------------------
1 | import DatePickerView from './date-picker';
2 |
3 | var SearchDatePickerView = DatePickerView.extend({
4 | _changeDateFilter: function(label) {
5 | var maxTime = new Date(this.get('maxTime'));
6 | var minTime = new Date(this.get('minTime'));
7 | this.get('parentView').send('changeDateFilter', minTime, maxTime, label);
8 | }
9 | });
10 |
11 | export default SearchDatePickerView;
12 |
--------------------------------------------------------------------------------
/app/views/form-fields/select-form-field.js:
--------------------------------------------------------------------------------
1 | import BaseFormFieldView from "./base-form-field";
2 |
3 | var SelectFormFieldView = BaseFormFieldView.extend({
4 | templateName: "form-fields/select-form-field",
5 | optionValuePath: "content.value",
6 | optionLabelPath: "content.label"
7 | });
8 |
9 | export default SelectFormFieldView;
10 |
--------------------------------------------------------------------------------
/app/views/form-fields/static-text-form-field.js:
--------------------------------------------------------------------------------
1 | import BaseFormFieldView from './base-form-field';
2 |
3 | var StaticTextFormFieldView = BaseFormFieldView.extend({
4 | templateName: "form-fields/static-text-form-field",
5 | emptyText: "none",
6 | value: ""
7 | });
8 |
9 | export default StaticTextFormFieldView;
10 |
--------------------------------------------------------------------------------
/app/views/form-fields/text-field.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | var TextFieldView = Ember.TextField.extend({
4 | attributeBindings: ['autocomplete', 'placeholder', 'autofocus']
5 | });
6 |
7 | export default TextFieldView;
8 |
--------------------------------------------------------------------------------
/app/views/form-fields/text-form-field.js:
--------------------------------------------------------------------------------
1 | import BaseFormFieldView from "./base-form-field";
2 |
3 | var TextFormFieldView = BaseFormFieldView.extend({
4 | inputType: "text",
5 | inputClassNames: "full"
6 | });
7 |
8 | export default TextFormFieldView;
9 |
--------------------------------------------------------------------------------
/app/views/form-fields/textarea-form-field.js:
--------------------------------------------------------------------------------
1 | import BaseFormFieldView from "./base-form-field";
2 |
3 | var TextAreaFormFieldView = BaseFormFieldView.extend({
4 | templateName: "form-fields/textarea-form-field",
5 | maxlength: 0,
6 | explanationText: function() {
7 | var maxLength = this.get('maxlength');
8 |
9 | if (maxLength > 0) {
10 | var noteLength = this.get('value') ? this.get('value.length') : 0;
11 | var remaining = maxLength - noteLength;
12 | return "%@ characters remaining".fmt(remaining);
13 | }
14 | }.property('value.length'),
15 |
16 | });
17 |
18 | export default TextAreaFormFieldView;
19 |
--------------------------------------------------------------------------------
/app/views/import-payouts/completed-filter.js:
--------------------------------------------------------------------------------
1 | var completedFilter = function(propertyName) {
2 | return function() {
3 | return (this.get("collection") || []).filterBy(propertyName);
4 | }.property("collection.@each." + propertyName);
5 | };
6 |
7 | export default completedFilter;
8 |
--------------------------------------------------------------------------------
/app/views/import-payouts/confirm-clear-all-modal.coffee:
--------------------------------------------------------------------------------
1 | `import Ember from "ember";`
2 | `import ModalBaseView from "../modals/modal-base";`
3 |
4 | ConfirmClearAllModal = ModalBaseView.extend(
5 | title: "Clear all entries"
6 | elementId: "confirm-clear-all"
7 |
8 | templateName: "import-payouts/confirm-clear-all-modal"
9 |
10 | cancelButtonText: "Cancel"
11 | submitButtonText: "Clear"
12 |
13 | actions:
14 | confirm: ->
15 | controller = @get("container").lookup("controller:marketplace/import-payouts")
16 | controller.send("clearAll")
17 | @close()
18 | )
19 |
20 | `export default ConfirmClearAllModal;`
21 |
--------------------------------------------------------------------------------
/app/views/import-payouts/currency-csv-upload-cell.js:
--------------------------------------------------------------------------------
1 | import CsvUploadCellView from "./csv-upload-cell";
2 | import Utils from "balanced-dashboard/lib/utils";
3 |
4 | var CurrencyCsvUploadCellView = CsvUploadCellView.extend({
5 | templateName: "import-payouts/default-csv-upload-cell",
6 |
7 | amount: Ember.computed.reads("item.credit.amount"),
8 |
9 | displayValue: function() {
10 | if (this.get("isError")) {
11 | return this._super();
12 | } else {
13 | return Utils.formatCurrency(this.get("amount"));
14 | }
15 | }.property("amount", "isError")
16 | });
17 |
18 | export default CurrencyCsvUploadCellView;
19 |
--------------------------------------------------------------------------------
/app/views/import-payouts/default-csv-upload-cell.js:
--------------------------------------------------------------------------------
1 | import CsvUploadCellView from "./csv-upload-cell";
2 |
3 | var DefaultCsvUploadCellView = CsvUploadCellView.extend({
4 | templateName: "import-payouts/default-csv-upload-cell"
5 | });
6 |
7 | export default DefaultCsvUploadCellView;
8 |
--------------------------------------------------------------------------------
/app/views/import-payouts/initialize-popover.js:
--------------------------------------------------------------------------------
1 | var initializePopover = function(self, label, selector, messagesProperty) {
2 | var $element = self.$(selector);
3 | var position = $element.attr("data-position") || "top";
4 | return $element.popover({
5 | trigger: "hover",
6 | placement: position,
7 | html: true,
8 | content: function() {
9 | var messages = self.get(messagesProperty);
10 | return "%@: %@".fmt(
11 | label,
12 | messages.join(", ")
13 | );
14 | }
15 | });
16 | };
17 |
18 | export default initializePopover;
19 |
--------------------------------------------------------------------------------
/app/views/import-payouts/marketplace-invalid-csv-payments-table.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 | import MarketplaceCsvPaymentsTableView from "./marketplace-csv-payments-table";
3 |
4 | var MarketplaceInvalidCsvPaymentsTableView = MarketplaceCsvPaymentsTableView.extend({
5 | validityAdjective: "invalid",
6 | isError: true,
7 | });
8 |
9 | export default MarketplaceInvalidCsvPaymentsTableView;
10 |
--------------------------------------------------------------------------------
/app/views/import-payouts/marketplace-valid-csv-payments-table.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 | import MarketplaceCsvPaymentsTableView from "./marketplace-csv-payments-table";
3 |
4 | var MarketplaceValidCsvPaymentsTableView = MarketplaceCsvPaymentsTableView.extend({
5 | validityAdjective: "valid",
6 | });
7 |
8 | export default MarketplaceCsvPaymentsTableView;
9 |
--------------------------------------------------------------------------------
/app/views/import-payouts/save-credits-csv-progress-bar-modal.js:
--------------------------------------------------------------------------------
1 | import completedFilter from "./completed-filter";
2 | import CsvProgressBarModalView from "./csv-progress-bar-modal";
3 |
4 | var SaveCreditsCsvProgressBarModalView = CsvProgressBarModalView.extend({
5 | title: "Processing",
6 | isCancelable: false,
7 | completed: completedFilter("isSaved")
8 | });
9 |
10 | export default SaveCreditsCsvProgressBarModalView;
11 |
--------------------------------------------------------------------------------
/app/views/login.coffee:
--------------------------------------------------------------------------------
1 | `import Ember from "ember";`
2 |
3 | LoginView = Ember.View.extend
4 | layoutName: 'page-form'
5 | pageTitle: 'Sign in'
6 | afterFormLink:
7 | linkTo: 'setup_guest_user'
8 | linkText: 'Create an account'
9 | didInsertElement: ->
10 | @$('input:first').focus()
11 |
12 | `export default LoginView;`
13 |
--------------------------------------------------------------------------------
/app/views/logout.coffee:
--------------------------------------------------------------------------------
1 | `import Ember from "ember";`
2 |
3 | LogoutView = Ember.View.extend
4 | templateName: 'logout'
5 | pageTitle: 'Logout'
6 | afterFormLink:
7 | linkTo: 'login'
8 | linkText: 'Back to sign in'
9 |
10 | `export default LogoutView;`
11 |
--------------------------------------------------------------------------------
/app/views/logs/log.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | var LogsLogView = Ember.View.extend({
4 | templateName: 'logs/log'
5 | });
6 |
7 | export default LogsLogView;
8 |
--------------------------------------------------------------------------------
/app/views/marketplace/orders.js:
--------------------------------------------------------------------------------
1 | var MarketplaceOrdersView = Ember.View.extend({
2 | layoutName: "marketplace/payments-layout",
3 | templateName: "marketplace/orders",
4 | });
5 |
6 | export default MarketplaceOrdersView;
7 |
--------------------------------------------------------------------------------
/app/views/marketplace/search.js:
--------------------------------------------------------------------------------
1 | var MarketplaceSearchView = Ember.View.extend({
2 | searchController: function() {
3 | return this.container.lookup("controller:marketplace/search");
4 | }.property(),
5 |
6 | query: Ember.computed.alias("searchController.query")
7 | });
8 |
9 | export default MarketplaceSearchView;
10 |
--------------------------------------------------------------------------------
/app/views/marketplace/transactions.js:
--------------------------------------------------------------------------------
1 | var MarketplaceTransactionsView = Ember.View.extend({
2 | layoutName: "marketplace/payments-layout",
3 | templateName: "marketplace/transactions",
4 | showActionButtons: true
5 | });
6 |
7 | export default MarketplaceTransactionsView;
8 |
--------------------------------------------------------------------------------
/app/views/marketplaces/marketplace-link-bar.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | var MarketplaceLinkBarView = Ember.View.extend({
4 | tagName: "li",
5 | templateName: "marketplaces/marketplace-link-bar",
6 | isProduction: Ember.computed.oneWay("marketplace.production"),
7 | isTest: Ember.computed.not("isProduction"),
8 | classNameBindings: [":mp-production", "isProduction:mp-production:mp-test"],
9 | });
10 |
11 | export default MarketplaceLinkBarView;
12 |
--------------------------------------------------------------------------------
/app/views/menus/base-menu.coffee:
--------------------------------------------------------------------------------
1 | `import Ember from "ember";`
2 |
3 | BaseMenuView = Ember.View.extend(
4 | layoutName: "menus/base-menu-layout"
5 | classNames: "dropdown borderless"
6 | )
7 |
8 | `export default BaseMenuView;`
9 |
--------------------------------------------------------------------------------
/app/views/menus/dropdown-menu-items/base.coffee:
--------------------------------------------------------------------------------
1 | `import Ember from "ember";`
2 |
3 | DropdownMenuItemView = Ember.View.extend(
4 | tagName: "li"
5 | )
6 |
7 | `export default DropdownMenuItemView;`
8 |
--------------------------------------------------------------------------------
/app/views/menus/dropdown-menu-items/open-modal.coffee:
--------------------------------------------------------------------------------
1 | `import DropdownMenuItemView from "./base";`
2 |
3 | OpenModalView = DropdownMenuItemView.extend(
4 | templateName: "menus/dropdown-menu-items/open-modal"
5 | )
6 |
7 | `export default OpenModalView;`
8 |
--------------------------------------------------------------------------------
/app/views/menus/dropdown-menu-items/otp-setting-trigger.coffee:
--------------------------------------------------------------------------------
1 | `import OpenModalView from "./open-modal";`
2 |
3 | OtpSettingTriggerView = OpenModalView.extend(
4 | isOtpEnabled: Ember.computed.reads("auth.user.otp_enabled")
5 | auth: (->
6 | return @get("container").lookup("auth:main")
7 | ).property()
8 |
9 | modalName: (->
10 | if @get("isOtpEnabled")
11 | return "modals/disable-auth-modal"
12 | else
13 | return "modals/enable-auth-modal"
14 | ).property("isOtpEnabled")
15 |
16 | text: (->
17 | if @get("isOtpEnabled")
18 | return "Disable two-factor authentication"
19 | else
20 | return "Enable two-factor authentication"
21 | ).property("isOtpEnabled")
22 | )
23 |
24 | `export default OtpSettingTriggerView;`
25 |
--------------------------------------------------------------------------------
/app/views/menus/dropdown-menu-items/route-link.coffee:
--------------------------------------------------------------------------------
1 | `import DropdownMenuItemView from "./base";`
2 |
3 | RouteLinkView = DropdownMenuItemView.extend(
4 | templateName: "menus/dropdown-menu-items/route-link"
5 | )
6 |
7 | `export default RouteLinkView;`
8 |
--------------------------------------------------------------------------------
/app/views/menus/marketplace-escrow-menu.coffee:
--------------------------------------------------------------------------------
1 | `import BaseMenuView from "./base-menu";`
2 | `import Utils from "balanced-dashboard/lib/utils";`
3 |
4 | MarketplaceEscrowMenuView = BaseMenuView.extend(
5 | templateName: "menus/marketplace-escrow-menu"
6 | elementId: "marketplace-escrow-menu"
7 |
8 | escrowAmount: Ember.computed.reads("marketplace.formattedEscrowAmount")
9 | iconName: "icon-escrow",
10 | menuTitle: (->
11 | "Total balance (without orders): #{@get("escrowAmount")}"
12 | ).property("escrowAmount")
13 | )
14 |
15 | `export default MarketplaceEscrowMenuView;`
16 |
--------------------------------------------------------------------------------
/app/views/menus/order-sort-menu.coffee:
--------------------------------------------------------------------------------
1 | `import BaseMenuView from "./base-menu";`
2 | `import Utils from "balanced-dashboard/lib/utils";`
3 |
4 | OrderSortMenuView = BaseMenuView.extend(
5 | templateName: "menus/order-sort-menu"
6 | elementId: "order-sort-menu"
7 | descMenuText: "Date created: newest"
8 | ascMenuText: "Date created: oldest"
9 |
10 | menuTitle: (->
11 | if @get("controller.resultsLoader.sortDirection") == "desc"
12 | return @get("descMenuText")
13 | else
14 | return @get("ascMenuText")
15 | ).property("controller.resultsLoader.sortDirection", "ascMenuText", "descMenuText")
16 | )
17 |
18 | `export default OrderSortMenuView;`
19 |
--------------------------------------------------------------------------------
/app/views/meta-list.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | var MetaListView = Ember.View.extend({
4 | templateName: "meta-list",
5 | meta_array: function() {
6 | var meta = this.get('type.meta');
7 | if (!meta) {
8 | return meta;
9 | }
10 |
11 | return _.map(meta, function(val, key) {
12 | return {
13 | key: key,
14 | value: val
15 | };
16 | }) || [];
17 | }.property('type.meta')
18 | });
19 |
20 | export default MetaListView;
21 |
--------------------------------------------------------------------------------
/app/views/migrate-connect-success.coffee:
--------------------------------------------------------------------------------
1 | `import Ember from "ember";`
2 |
3 | View = Ember.View.extend
4 | layoutName: 'clean-page-layout'
5 | pageTitle: 'Migrate success'
6 |
7 | `export default View;`
8 |
--------------------------------------------------------------------------------
/app/views/modal-notification-center.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | var ModalNotificationCenterView = Ember.View.extend({
4 | templateName: "notification-center"
5 | });
6 |
7 | export default ModalNotificationCenterView;
8 |
--------------------------------------------------------------------------------
/app/views/modals-container.coffee:
--------------------------------------------------------------------------------
1 | `import Ember from "ember";`
2 |
3 | ModalsContainerView = Ember.ContainerView.extend
4 | didInsertElement: ->
5 | @get("controller").registerContainer(@)
6 |
7 | `export default ModalsContainerView;`
8 |
--------------------------------------------------------------------------------
/app/views/modals/base-funding-instrument-modal.js:
--------------------------------------------------------------------------------
1 | import ModalBaseView from "./modal-base";
2 | import Form from "balanced-dashboard/views/modals/mixins/form-modal-mixin";
3 | import Full from "balanced-dashboard/views/modals/mixins/full-modal-mixin";
4 | import Save from "balanced-dashboard/views/modals/mixins/object-action-mixin";
5 |
6 | var BaseFundingInstrumentModalView = ModalBaseView.extend(Full, Form, Save, {
7 | actions: {
8 | save: function() {
9 | var controller = this.get("controller");
10 |
11 | this.save(this.get("model"))
12 | .then(function(model) {
13 | controller.transitionToRoute(model.get("route_name"), model);
14 | });
15 | },
16 | }
17 | });
18 |
19 | export default BaseFundingInstrumentModalView;
20 |
--------------------------------------------------------------------------------
/app/views/modals/mixins/form-modal-mixin.coffee:
--------------------------------------------------------------------------------
1 | `import Ember from "ember";`
2 | `import DisplayModelErrors from "balanced-dashboard/views/modals/mixins/display-model-errors-modal-mixin";`
3 |
4 | FormModalMixin = Ember.Mixin.create DisplayModelErrors,
5 | layoutName: "modals/form-modal-layout"
6 |
7 | `export default FormModalMixin;`
8 |
--------------------------------------------------------------------------------
/app/views/modals/mixins/full-modal-mixin.coffee:
--------------------------------------------------------------------------------
1 | `import Ember from "ember";`
2 |
3 | FullModalMixin = Ember.Mixin.create
4 | layoutName: "modals/full-modal-layout"
5 | classNameBindings: [":half-screen-modal"]
6 |
7 | `export default FullModalMixin;`
8 |
--------------------------------------------------------------------------------
/app/views/modals/mixins/open-next-modal-mixin.coffee:
--------------------------------------------------------------------------------
1 | `import Ember from "ember";`
2 |
3 | OpenNextModalMixin = Ember.Mixin.create(
4 | openNext: ->
5 | applicationController = @get("container").lookup("controller:application")
6 | args = _.toArray(arguments)
7 | args.unshift("openModal")
8 | applicationController.send.apply(applicationController, args)
9 |
10 | openInstance: (instance) ->
11 | @get("container")
12 | .lookup("controller:modals-container")
13 | .openInstance(instance)
14 | )
15 |
16 | `export default OpenNextModalMixin;`
17 |
--------------------------------------------------------------------------------
/app/views/modals/mixins/search-modal-mixin.coffee:
--------------------------------------------------------------------------------
1 | `import Ember from "ember";`
2 |
3 | SearchModalMixin = Ember.Mixin.create
4 | layoutName: "modals/search-modal-layout"
5 | classNameBindings: [":search-screen-modal"]
6 |
7 | `export default SearchModalMixin;`
8 |
--------------------------------------------------------------------------------
/app/views/modals/mixins/wide-modal-mixin.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | var WideModalMixin = Ember.Mixin.create({
4 | classNameBindings: [":wide-modal", ":modal-overflow"],
5 | });
6 |
7 | export default WideModalMixin;
8 |
--------------------------------------------------------------------------------
/app/views/modals/modal-base-footer.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | var ModalBaseFooter = Ember.View.extend({
4 | classNameBindings: [":modal-footer"],
5 | templateName: "modals/modal-base-footer"
6 | });
7 |
8 | export default ModalBaseFooter;
9 |
--------------------------------------------------------------------------------
/app/views/modals/progress-bar-modal.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 | import ModalBaseView from "./modal-base";
3 |
4 | var ProgressBarModalView = ModalBaseView.extend({
5 | templateName: "modals/progress-bar-modal",
6 | classNames: ["modal-progress"],
7 |
8 | getProgressBar: function() {
9 | return this.$(".progress-bar");
10 | },
11 |
12 | setProgressBarFraction: function(fractionValue) {
13 | var element = this.getProgressBar();
14 | if (element) {
15 | element.width((fractionValue * 100) + "%");
16 | }
17 | },
18 |
19 | actions: {
20 | cancel: function() {
21 | this.hide();
22 | this.trigger("cancel");
23 | },
24 | }
25 | });
26 |
27 | export default ProgressBarModalView;
28 |
--------------------------------------------------------------------------------
/app/views/notification-center.coffee:
--------------------------------------------------------------------------------
1 | `import Ember from "ember";`
2 |
3 | NotificationCenterView = Ember.View.extend()
4 |
5 | `export default NotificationCenterView;`
6 |
--------------------------------------------------------------------------------
/app/views/otp.coffee:
--------------------------------------------------------------------------------
1 | `import Ember from "ember";`
2 |
3 | OtpView = Ember.View.extend
4 | layoutName: "page-form"
5 | pageTitle: 'Two-factor authentication'
6 | afterFormLink:
7 | linkTo: 'login'
8 | linkText: 'Back to sign in'
9 | didInsertElement: ->
10 | @$('input:first').focus()
11 |
12 | `export default OtpView;`
13 |
--------------------------------------------------------------------------------
/app/views/page-navigations/invoice-page-navigation.js:
--------------------------------------------------------------------------------
1 | import PageNavigationView from "./page-navigation";
2 |
3 | var InvoicePageNavigationView = PageNavigationView.extend({
4 | pageType: function() {
5 | return '%@: %@'.fmt(this.get('model.type_name'), this.get('model.invoice_type'));
6 | }.property("model.type_name", "model.invoice_type"),
7 |
8 | title: function() {
9 | return this.get("model.page_title");
10 | }.property("model.page_title"),
11 | });
12 |
13 | export default InvoicePageNavigationView;
14 |
--------------------------------------------------------------------------------
/app/views/page-navigations/log-page-navigation.js:
--------------------------------------------------------------------------------
1 | import PageNavigationView from "./page-navigation";
2 |
3 | var LogPageNavigationView = PageNavigationView.extend({
4 | pageType: Ember.computed.reads('model.type_name'),
5 |
6 | title: function() {
7 | return "%@ %@".fmt(this.get("model.message.request.method"), this.get("model.condensed_request_url"));
8 | }.property("model.message.request.method", "model.condensed_request_url"),
9 | });
10 |
11 | export default LogPageNavigationView;
12 |
--------------------------------------------------------------------------------
/app/views/page-navigations/page-navigation.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | var PageNavigationView = Ember.View.extend({
4 | layoutName: "page-navigations/page-navigation-layout",
5 | });
6 |
7 | export default PageNavigationView;
8 |
--------------------------------------------------------------------------------
/app/views/popover.coffee:
--------------------------------------------------------------------------------
1 | `import Ember from "ember";`
2 |
3 | PopoverView = Ember.View.extend
4 | tagName: 'a'
5 | attributeBindings: ['class', 'data-toggle', 'data-placement', 'data-original-title', 'data-content', 'data-html', 'data-trigger', 'data-template']
6 | 'data-toggle': 'popover'
7 | selector: '[rel="popover"]'
8 |
9 | didInsertElement: ->
10 | @$().popover().parent().on 'click', '.close', (e) =>
11 | $(e.target).parents(".popover").popover('hide')
12 |
13 | @_super()
14 |
15 | `export default PopoverView;`
16 |
--------------------------------------------------------------------------------
/app/views/pretty-print.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 | import Utils from "balanced-dashboard/lib/utils";
3 |
4 | var PrettyPrintView = Ember.View.extend({
5 | templateName: 'pretty-print',
6 | content: null,
7 |
8 | didInsertElement: function() {
9 | Ember.run.scheduleOnce('afterRender', this, this.format);
10 | this._super();
11 | },
12 |
13 | format: function() {
14 | this.$('.prettyprinted').removeClass('prettyprinted');
15 | this.$('.prettyprint').text(Utils.prettyPrint(this.get('content')));
16 | prettyPrint();
17 | }.observes('content')
18 | });
19 |
20 | export default PrettyPrintView;
21 |
--------------------------------------------------------------------------------
/app/views/register-flow/next-step.js:
--------------------------------------------------------------------------------
1 | import RegisterFlowBaseModalView from "./register-flow-base-modal";
2 |
3 | var NextStepView = RegisterFlowBaseModalView.extend({
4 | layoutName: "modals/base-modal-layout",
5 | templateName: "register-flow/next-step-modal",
6 | title: "Next step",
7 | continueButtonText: "Register",
8 | cancelButtonText: "Go to dashboard",
9 | elementId: "next-step",
10 |
11 | actions: {
12 | nextStep: function() {
13 | this.openModal("modals/marketplace-application-create");
14 | },
15 |
16 | goToDashboard: function() {
17 | this.close();
18 | }
19 | }
20 | });
21 |
22 | export default NextStepView;
23 |
--------------------------------------------------------------------------------
/app/views/reset-password.js:
--------------------------------------------------------------------------------
1 | import LoginView from "./login";
2 |
3 | var ResetPasswordView = LoginView.extend({
4 | templateName: 'reset-password',
5 | pageTitle: 'Reset password',
6 | afterFormLink: null,
7 | });
8 |
9 | export default ResetPasswordView;
10 |
--------------------------------------------------------------------------------
/app/views/resource-documents.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | var ResourceDocumentsView = Ember.View.extend({
4 | templateName: 'resource-documents'
5 | });
6 |
7 | export default ResourceDocumentsView;
8 |
--------------------------------------------------------------------------------
/app/views/resource-events.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | var ResourceEventsView = Ember.View.extend({
4 | templateName: 'resource-events'
5 | });
6 |
7 | export default ResourceEventsView;
8 |
--------------------------------------------------------------------------------
/app/views/resource-logs.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 | import LogsResultsLoader from "../models/results-loaders/logs";
3 |
4 | var ResourceLogsView = Ember.View.extend({
5 | templateName: 'resource-logs',
6 | results: Ember.computed.oneWay("resultsLoader.results"),
7 | resultsLoader: function() {
8 | var content = this.get("content");
9 | return LogsResultsLoader.create({
10 | limit: 5,
11 | resource: content,
12 | });
13 | }.property("content"),
14 | });
15 |
16 | export default ResourceLogsView;
17 |
--------------------------------------------------------------------------------
/app/views/results/associated-transactions-table.js:
--------------------------------------------------------------------------------
1 | import TransactionsTableView from "./transactions-table";
2 |
3 | var AssociatedTransactionsTableView = TransactionsTableView.extend({
4 | templateName: "results/associated-transactions-table",
5 | classNames: ["non-interactive"]
6 | });
7 |
8 | export default AssociatedTransactionsTableView;
9 |
--------------------------------------------------------------------------------
/app/views/results/customers-table.js:
--------------------------------------------------------------------------------
1 | import ResultsTableView from "./results-table";
2 |
3 | var CustomersResultsView = ResultsTableView.extend({
4 | classNames: 'customers',
5 | templateName: 'results/customers-table'
6 | });
7 |
8 | export default CustomersResultsView;
9 |
--------------------------------------------------------------------------------
/app/views/results/date-filter-header.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | var DateFilterHeaderView = Ember.View.extend({
4 | tagName: 'header'
5 | });
6 |
7 | export default DateFilterHeaderView;
8 |
--------------------------------------------------------------------------------
/app/views/results/disputes-table.js:
--------------------------------------------------------------------------------
1 | import ResultsTableView from "./results-table";
2 |
3 | var DisputesTableView = ResultsTableView.extend({
4 | classNames: 'disputes',
5 | templateName: 'results/disputes-table',
6 | colspan: 6
7 | });
8 |
9 | export default DisputesTableView;
10 |
--------------------------------------------------------------------------------
/app/views/results/embedded-disputes-table.js:
--------------------------------------------------------------------------------
1 | import DisputesTableView from "./disputes-table";
2 |
3 | var EmbeddedDisputesTableView = DisputesTableView.extend({
4 | isSmallTable: true,
5 | colspan: 5
6 | });
7 |
8 | export default EmbeddedDisputesTableView;
9 |
--------------------------------------------------------------------------------
/app/views/results/embedded-funding-instruments-table.js:
--------------------------------------------------------------------------------
1 | import FundingInstrumentsTableView from "./funding-instruments-table";
2 |
3 | var EmbeddedFundingInstrumentsTable = FundingInstrumentsTableView.extend({
4 | templateName: 'results/embedded-funding-instruments-table'
5 | });
6 |
7 | export default EmbeddedFundingInstrumentsTable;
8 |
--------------------------------------------------------------------------------
/app/views/results/embedded-transactions-table.js:
--------------------------------------------------------------------------------
1 | import TransactionsTableView from "./transactions-table";
2 |
3 | var EmbeddedTransactionsTableView = TransactionsTableView.extend({
4 | templateName: "results/embedded-transactions-table",
5 | classNames: ["non-interactive"],
6 | filteredResults: Ember.computed.filter("loader.results", function(transaction) {
7 | var IGNOREABLE_TRANSACTIONS = ["Hold", "Refund", "Reversal"];
8 | var transactionType = transaction.get("type_name");
9 | return !IGNOREABLE_TRANSACTIONS.contains(transactionType) || (transactionType === "Hold" && transaction.get("debit_uri") === null);
10 | }),
11 | });
12 |
13 | export default EmbeddedTransactionsTableView;
14 |
--------------------------------------------------------------------------------
/app/views/results/funding-instruments-table.js:
--------------------------------------------------------------------------------
1 | import ResultsTableView from "./results-table";
2 |
3 | var FundingInstrumentsTableView = ResultsTableView.extend({
4 | classNames: 'funding-instruments',
5 | templateName: 'results/funding-instruments-table'
6 | });
7 |
8 | export default FundingInstrumentsTableView;
9 |
--------------------------------------------------------------------------------
/app/views/results/grouped-transactions-table.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | var GroupedTransactionsTableView = Ember.View.extend({
4 | layoutName: 'results/grouped-transactions-table-layout',
5 | tagName: 'table',
6 | classNames: ["items", "grouped-transactions"],
7 | });
8 |
9 | export default GroupedTransactionsTableView;
10 |
--------------------------------------------------------------------------------
/app/views/results/invoice-transactions-table.js:
--------------------------------------------------------------------------------
1 | import ResultsTableView from "././results-table";
2 |
3 | var InvoiceTransactionsTableView = ResultsTableView.extend({
4 | templateName: "results/invoice-transactions-table"
5 | });
6 |
7 | export default InvoiceTransactionsTableView;
8 |
--------------------------------------------------------------------------------
/app/views/results/invoices-table.js:
--------------------------------------------------------------------------------
1 | import ResultsTableView from "././results-table";
2 |
3 | var InvoicesTableView = ResultsTableView.extend({
4 | classNames: 'invoices',
5 | classNameBindings: 'selected',
6 | templateName: 'results/invoices-table'
7 | });
8 |
9 | export default InvoicesTableView;
10 |
--------------------------------------------------------------------------------
/app/views/results/keyboard-shortcuts.js:
--------------------------------------------------------------------------------
1 | import KeyValueGenerator from "balanced-dashboard/views/detail-views/description-lists/key-value-generator";
2 |
3 | var KeyboardShortcutsView = Ember.View.extend({
4 | shortcuts: KeyValueGenerator.create()
5 | .add("Bring up search", "/")
6 | .add("Exit search", "esc")
7 | .values
8 | });
9 |
10 | export default KeyboardShortcutsView;
11 |
--------------------------------------------------------------------------------
/app/views/results/logs-embedded-table.js:
--------------------------------------------------------------------------------
1 | import ResultsTableView from "././results-table";
2 |
3 | var LogsEmbeddedTableView = ResultsTableView.extend({
4 | classNameBindings: 'selected',
5 | templateName: 'results/logs-embedded-table'
6 | });
7 |
8 | export default LogsEmbeddedTableView;
9 |
--------------------------------------------------------------------------------
/app/views/results/logs-status-results-dropdown-filter.js:
--------------------------------------------------------------------------------
1 | import ResultsDropdownFilterView from "./results-dropdown-filter";
2 | import { defineFilter } from "./results-dropdown-filter";
3 |
4 | var LogsStatusResultsDropdownFilterView = ResultsDropdownFilterView.extend({
5 | toggleText: "Status",
6 | filter: "statusRollupFilters",
7 | filters: function() {
8 | return [
9 | defineFilter("All", undefined, true),
10 | defineFilter("Succeeded", ["2xx"]),
11 | defineFilter("Failed", ["3xx", "4xx", "5xx"])
12 | ];
13 | }.property(),
14 | });
15 |
16 | export default LogsStatusResultsDropdownFilterView;
17 |
--------------------------------------------------------------------------------
/app/views/results/logs-table.js:
--------------------------------------------------------------------------------
1 | import ResultsTableView from "./results-table";
2 |
3 | var LogsTableView = ResultsTableView.extend({
4 | classNames: 'logs',
5 | classNameBindings: 'selected',
6 | templateName: 'results/logs-table'
7 | });
8 |
9 | export default LogsTableView;
10 |
--------------------------------------------------------------------------------
/app/views/results/no-results.js:
--------------------------------------------------------------------------------
1 | import KeyValueGenerator from "balanced-dashboard/views/detail-views/description-lists/key-value-generator";
2 |
3 | var NoResultsView = Ember.View.extend({
4 | examples: KeyValueGenerator.create()
5 | .add("Customer name", "John Miller")
6 | .add("Customer email", "john.miller@example.com")
7 | .add("Transaction ID", "CRVNt39ZeYJ6ff6IamPNb9o")
8 | .add("Log ID", "OHMafdf423c658d11e484b40230f00c")
9 | .add("Description", "Item 251859")
10 | .add("Payment method (last 4)", "2851")
11 | .add("Amount", "261.23")
12 | .values
13 | });
14 |
15 | export default NoResultsView;
16 |
--------------------------------------------------------------------------------
/app/views/results/orders-table.js:
--------------------------------------------------------------------------------
1 | import ResultsTableView from "./results-table";
2 |
3 | var OrdersTableView = ResultsTableView.extend({
4 | tagName: 'div',
5 | classNames: 'orders',
6 | templateName: "results/orders-table"
7 | });
8 |
9 | export default OrdersTableView;
10 |
--------------------------------------------------------------------------------
/app/views/results/results-filter-list-item.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | var ResultsFilterListItemView = Ember.View.extend({
4 | templateName: "results/results-filter-list-item",
5 | tagName: "li",
6 | classNameBindings: ["isActive:selected", ":filter"],
7 | isActive: function() {
8 | var filterValue = this.get("filterValue");
9 | var currentValue = this.get("resultsLoader.type");
10 | return filterValue === currentValue;
11 | }.property("filterValue", "resultsLoader.type")
12 | });
13 |
14 | export default ResultsFilterListItemView;
15 |
--------------------------------------------------------------------------------
/app/views/results/results-load-more.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | var ResultsLoadMoreView = Ember.View.extend({
4 | tagName: "tfoot",
5 | templateName: "results/results-load-more",
6 | actions: {
7 | loadMore: function(results) {
8 | results.loadNextPage();
9 | }
10 | }
11 | });
12 |
13 | export default ResultsLoadMoreView;
14 |
--------------------------------------------------------------------------------
/app/views/results/results-table.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | var ResultsTableView = Ember.View.extend({
4 | tagName: 'table',
5 | classNames: 'items',
6 |
7 | eventTrackerText: function() {
8 | var templateName= this.get("templateName");
9 |
10 | return this.get("isSearch") ?
11 | "Clicked a row in %@ via search".fmt(templateName) :
12 | "Clicked a row in %@".fmt(templateName);
13 | }.property("isSearch", "templateName")
14 | });
15 |
16 | export default ResultsTableView;
17 |
--------------------------------------------------------------------------------
/app/views/results/search-payment-methods-results-dropdown-filter.js:
--------------------------------------------------------------------------------
1 | import SearchResultsDropdownFilterView from "./search-results-dropdown-filter";
2 | import { defineFilter } from "./results-dropdown-filter";
3 |
4 | var SearchPaymentMethodsResultsDropdownFilterView = SearchResultsDropdownFilterView.extend({
5 | toggleText: "Payment method",
6 | actionName: "changePaymentMethodFilter",
7 |
8 | filters: function() {
9 | return [
10 | defineFilter("All", null, true),
11 | defineFilter("Card", "card"),
12 | defineFilter("Bank accounts", "bank_account")
13 | ];
14 | }.property(),
15 | });
16 |
17 | export default SearchPaymentMethodsResultsDropdownFilterView;
18 |
--------------------------------------------------------------------------------
/app/views/results/search-transactions-status-results-dropdown-filter.js:
--------------------------------------------------------------------------------
1 | import SearchResultsDropdownFilterView from "./search-results-dropdown-filter";
2 | import { defineFilter } from "./results-dropdown-filter";
3 |
4 | var SearchTransactionsTypeResultsDropdownFilterView = SearchResultsDropdownFilterView.extend({
5 | toggleText: "Status",
6 | actionName: "changeStatusFilter",
7 |
8 | filters: function() {
9 | return [
10 | defineFilter("All", undefined, true),
11 | defineFilter("Pending", "pending"),
12 | defineFilter("Succeeded", "succeeded"),
13 | defineFilter("Failed", "failed")
14 | ];
15 | }.property(),
16 | });
17 |
18 | export default SearchTransactionsTypeResultsDropdownFilterView;
19 |
--------------------------------------------------------------------------------
/app/views/results/transactions-table.js:
--------------------------------------------------------------------------------
1 | import ResultsTableView from "./results-table";
2 |
3 | var TransactionsTableView = ResultsTableView.extend({
4 | templateName: "results/transactions-table",
5 | classNames: 'transactions',
6 | });
7 |
8 | export default TransactionsTableView;
9 |
--------------------------------------------------------------------------------
/app/views/sidebar/base.coffee:
--------------------------------------------------------------------------------
1 | `import Ember from "ember";`
2 |
3 | BaseView = Ember.View.extend(
4 | templateName: "sidebar/base"
5 | )
6 |
7 | `export default BaseView`
8 |
--------------------------------------------------------------------------------
/app/views/sidebar/basic-link-sidebar-item.js:
--------------------------------------------------------------------------------
1 | import SidebarItemView from "./sidebar-item";
2 |
3 | var BasicLinkSidebarItemView = SidebarItemView.extend({
4 | templateName: "sidebar/basic-link-sidebar-item",
5 | });
6 |
7 | export default BasicLinkSidebarItemView;
8 |
--------------------------------------------------------------------------------
/app/views/sidebar/sidebar-item.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | var SidebarItemView = Ember.View.extend({
4 | tagName: "li",
5 | classNameBindings: ["isSelected:menu-active"],
6 |
7 | children: function() {
8 | return [];
9 | }.property(),
10 |
11 | childViewItems: function() {
12 | var container = this.container.lookupFactory("view:sidebar/basic-link-sidebar-item");
13 | return this.get("children").map(function(child) {
14 | return container.extend(child);
15 | });
16 | }.property("children.@each"),
17 |
18 | getRoute: function(routeName, model) {
19 | var router = this.get("container").lookup("router:main");
20 | return router.generate.apply(router, arguments);
21 | },
22 | });
23 |
24 | export default SidebarItemView;
25 |
--------------------------------------------------------------------------------
/app/views/sidebar/sidebar.coffee:
--------------------------------------------------------------------------------
1 | `import Ember from "ember";`
2 |
3 | SidebarView = Ember.View.extend(
4 | templateName: "sidebar/sidebar"
5 |
6 | items: (->
7 | []
8 | ).property()
9 |
10 | dropdownDisplayLabel: (->
11 | if @get("marketplace")
12 | @get("marketplace.name")
13 | else
14 | "Marketplaces"
15 | ).property("marketplace", "marketplace.name")
16 | )
17 |
18 | `export default SidebarView;`
19 |
--------------------------------------------------------------------------------
/app/views/tables/cells/linked-card.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | var LinkedCardView = Ember.View.extend({
4 | tagName: "div",
5 | templateName: "tables/cells/linked-card",
6 | classNameBindings: [":card", ":col-md-3"],
7 | });
8 |
9 | export default LinkedCardView;
10 |
--------------------------------------------------------------------------------
/app/views/tables/cells/linked-date-cell.js:
--------------------------------------------------------------------------------
1 | import TableCellBaseView from "./table-cell-base";
2 |
3 | var LinkedDateCellView = TableCellBaseView.extend({
4 | templateName: "tables/cells/linked-date-cell",
5 | classNames: ["two-lines"],
6 | eventTrackerText: Ember.computed.reads("parentView.eventTrackerText")
7 | });
8 |
9 | export default LinkedDateCellView;
10 |
--------------------------------------------------------------------------------
/app/views/tables/cells/linked-text-cell.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 | import TableCellBaseView from "./table-cell-base";
3 |
4 | var LinkedTextCellView = TableCellBaseView.extend({
5 | templateName: "tables/cells/linked-text-cell",
6 | blankText: 'none',
7 | attributeBindings: ['title'],
8 | isBlank: Ember.computed.empty('labelText'),
9 | displayValue: function() {
10 | if (this.get('isBlank')) {
11 | return this.get('blankText');
12 | } else {
13 | return this.get('labelText');
14 | }
15 | }.property('blankText', 'isBlank', 'labelText'),
16 | eventTrackerText: Ember.computed.reads("parentView.eventTrackerText"),
17 | });
18 |
19 | export default LinkedTextCellView;
20 |
--------------------------------------------------------------------------------
/app/views/tables/cells/linked-two-lines-cell.js:
--------------------------------------------------------------------------------
1 | import LinkedTextCellView from "./linked-text-cell";
2 | import Utils from "balanced-dashboard/lib/utils";
3 |
4 | var LinkedTwoLinesCellView = LinkedTextCellView.extend({
5 | classNames: ["two-lines"],
6 | isBlank: Ember.computed.empty('primaryLabelText'),
7 | labelText: function() {
8 | var label = '%@ %@ ';
9 | var secondaryLabel = this.get('secondaryLabelText') || '';
10 | return Utils.safeFormat(label, this.get('primaryLabelText'), secondaryLabel).htmlSafe();
11 | }.property('primaryLabelText', 'secondaryLabelText')
12 | });
13 |
14 | export default LinkedTwoLinesCellView;
15 |
--------------------------------------------------------------------------------
/app/views/tables/cells/logs/log-description-cell.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 | import LinkedTextCellView from "../linked-text-cell";
3 |
4 | var LogDescriptionCellView = LinkedTextCellView.extend({
5 | routeName: Ember.computed.oneWay("item.route_name"),
6 | labelText: function() {
7 | return "%@ %@".fmt(
8 | this.get("item.message.request.method"),
9 | this.get("item.condensed_request_url")
10 | );
11 | }.property("item.condensed_request_url", "item.message.request.method"),
12 | });
13 |
14 | export default LogDescriptionCellView;
15 |
--------------------------------------------------------------------------------
/app/views/tables/cells/table-cell-base.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 |
3 | var TableCellBaseView = Ember.View.extend({
4 | tagName: "td",
5 | });
6 |
7 | export default TableCellBaseView;
8 |
--------------------------------------------------------------------------------
/app/views/tables/cells/titled-linked-cell.js:
--------------------------------------------------------------------------------
1 | import LinkedTextCellView from "./linked-text-cell";
2 |
3 | var TitledLinkedCellView = LinkedTextCellView.extend({
4 | title: Ember.computed.oneWay("labelText"),
5 | });
6 |
7 | export default TitledLinkedCellView;
8 |
--------------------------------------------------------------------------------
/app/views/tables/cells/transaction/amount-cell.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 | import LinkedTextCellView from "../linked-text-cell";
3 | import Utils from "balanced-dashboard/lib/utils";
4 |
5 | var AmountCellView = LinkedTextCellView.extend({
6 | routeName: Ember.computed.oneWay("item.route_name"),
7 | classNameBindings: [":amount", ":num"],
8 | labelText: function() {
9 | return Utils.formatCurrency(this.get("item.amount"));
10 | }.property("item.amount"),
11 | });
12 |
13 | export default AmountCellView;
14 |
--------------------------------------------------------------------------------
/app/views/tables/cells/transaction/customer-cell.js:
--------------------------------------------------------------------------------
1 | import Ember from "ember";
2 | import LinkedTwoLinesCellView from "../linked-two-lines-cell";
3 |
4 | var CustomerCellView = LinkedTwoLinesCellView.extend({
5 | routeName: Ember.computed.oneWay("item.route_name"),
6 | title: Ember.computed.oneWay("item.customer_name_summary"),
7 | classNameBindings: [":account", "item.customer::null-field", ":two-lines"],
8 | primaryLabelText: Ember.computed.oneWay("item.customer_display_me"),
9 | secondaryLabelText: Ember.computed.oneWay("item.customer_email"),
10 | });
11 |
12 | export default CustomerCellView;
13 |
--------------------------------------------------------------------------------
/public/crossdomain.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
15 |
16 |
--------------------------------------------------------------------------------
/public/images/bank-account-instructions.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/balanced/balanced-dashboard/8258b9cdc72ed0ec2dbfe40d31836ac710a03cbd/public/images/bank-account-instructions.png
--------------------------------------------------------------------------------
/public/images/credit-card-instructions.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/balanced/balanced-dashboard/8258b9cdc72ed0ec2dbfe40d31836ac710a03cbd/public/images/credit-card-instructions.png
--------------------------------------------------------------------------------
/public/images/csv_table_existing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/balanced/balanced-dashboard/8258b9cdc72ed0ec2dbfe40d31836ac710a03cbd/public/images/csv_table_existing.png
--------------------------------------------------------------------------------
/public/images/csv_table_new_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/balanced/balanced-dashboard/8258b9cdc72ed0ec2dbfe40d31836ac710a03cbd/public/images/csv_table_new_1.png
--------------------------------------------------------------------------------
/public/images/csv_table_new_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/balanced/balanced-dashboard/8258b9cdc72ed0ec2dbfe40d31836ac710a03cbd/public/images/csv_table_new_2.png
--------------------------------------------------------------------------------
/public/images/google_authenticator.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/balanced/balanced-dashboard/8258b9cdc72ed0ec2dbfe40d31836ac710a03cbd/public/images/google_authenticator.png
--------------------------------------------------------------------------------
/public/images/loading.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/balanced/balanced-dashboard/8258b9cdc72ed0ec2dbfe40d31836ac710a03cbd/public/images/loading.png
--------------------------------------------------------------------------------
/public/images/logo_3dots.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/balanced/balanced-dashboard/8258b9cdc72ed0ec2dbfe40d31836ac710a03cbd/public/images/logo_3dots.png
--------------------------------------------------------------------------------
/public/notfound/fonts/PlantinStd-Italic.css:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: 'PlantinStdItalic';
3 | src: url('plantinstd-italic.eot');
4 | src: url('plantinstd-italic.eot') format('embedded-opentype'),
5 | url('plantinstd-italic.woff') format('woff'),
6 | url('plantinstd-italic.ttf') format('truetype'),
7 | url('plantinstd-italic.svg#PlantinStdItalic') format('svg');
8 | }
9 |
--------------------------------------------------------------------------------
/public/notfound/fonts/PlantinStd-Italic.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/balanced/balanced-dashboard/8258b9cdc72ed0ec2dbfe40d31836ac710a03cbd/public/notfound/fonts/PlantinStd-Italic.eot
--------------------------------------------------------------------------------
/public/notfound/fonts/PlantinStd-Italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/balanced/balanced-dashboard/8258b9cdc72ed0ec2dbfe40d31836ac710a03cbd/public/notfound/fonts/PlantinStd-Italic.ttf
--------------------------------------------------------------------------------
/public/notfound/fonts/PlantinStd-Italic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/balanced/balanced-dashboard/8258b9cdc72ed0ec2dbfe40d31836ac710a03cbd/public/notfound/fonts/PlantinStd-Italic.woff
--------------------------------------------------------------------------------
/public/notfound/fonts/Proxima Nova Bold.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/balanced/balanced-dashboard/8258b9cdc72ed0ec2dbfe40d31836ac710a03cbd/public/notfound/fonts/Proxima Nova Bold.eot
--------------------------------------------------------------------------------
/public/notfound/fonts/Proxima Nova Bold.svg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/balanced/balanced-dashboard/8258b9cdc72ed0ec2dbfe40d31836ac710a03cbd/public/notfound/fonts/Proxima Nova Bold.svg
--------------------------------------------------------------------------------
/public/notfound/fonts/Proxima Nova Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/balanced/balanced-dashboard/8258b9cdc72ed0ec2dbfe40d31836ac710a03cbd/public/notfound/fonts/Proxima Nova Bold.ttf
--------------------------------------------------------------------------------
/public/notfound/fonts/Proxima Nova Bold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/balanced/balanced-dashboard/8258b9cdc72ed0ec2dbfe40d31836ac710a03cbd/public/notfound/fonts/Proxima Nova Bold.woff
--------------------------------------------------------------------------------
/public/notfound/fonts/Proxima Nova Light.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/balanced/balanced-dashboard/8258b9cdc72ed0ec2dbfe40d31836ac710a03cbd/public/notfound/fonts/Proxima Nova Light.eot
--------------------------------------------------------------------------------
/public/notfound/fonts/Proxima Nova Light.svg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/balanced/balanced-dashboard/8258b9cdc72ed0ec2dbfe40d31836ac710a03cbd/public/notfound/fonts/Proxima Nova Light.svg
--------------------------------------------------------------------------------
/public/notfound/fonts/Proxima Nova Light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/balanced/balanced-dashboard/8258b9cdc72ed0ec2dbfe40d31836ac710a03cbd/public/notfound/fonts/Proxima Nova Light.ttf
--------------------------------------------------------------------------------
/public/notfound/fonts/Proxima Nova Light.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/balanced/balanced-dashboard/8258b9cdc72ed0ec2dbfe40d31836ac710a03cbd/public/notfound/fonts/Proxima Nova Light.woff
--------------------------------------------------------------------------------
/public/notfound/fonts/Proxima Nova Reg It.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/balanced/balanced-dashboard/8258b9cdc72ed0ec2dbfe40d31836ac710a03cbd/public/notfound/fonts/Proxima Nova Reg It.eot
--------------------------------------------------------------------------------
/public/notfound/fonts/Proxima Nova Reg It.svg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/balanced/balanced-dashboard/8258b9cdc72ed0ec2dbfe40d31836ac710a03cbd/public/notfound/fonts/Proxima Nova Reg It.svg
--------------------------------------------------------------------------------
/public/notfound/fonts/Proxima Nova Reg It.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/balanced/balanced-dashboard/8258b9cdc72ed0ec2dbfe40d31836ac710a03cbd/public/notfound/fonts/Proxima Nova Reg It.ttf
--------------------------------------------------------------------------------
/public/notfound/fonts/Proxima Nova Reg It.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/balanced/balanced-dashboard/8258b9cdc72ed0ec2dbfe40d31836ac710a03cbd/public/notfound/fonts/Proxima Nova Reg It.woff
--------------------------------------------------------------------------------
/public/notfound/fonts/Proxima Nova Reg.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/balanced/balanced-dashboard/8258b9cdc72ed0ec2dbfe40d31836ac710a03cbd/public/notfound/fonts/Proxima Nova Reg.eot
--------------------------------------------------------------------------------
/public/notfound/fonts/Proxima Nova Reg.svg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/balanced/balanced-dashboard/8258b9cdc72ed0ec2dbfe40d31836ac710a03cbd/public/notfound/fonts/Proxima Nova Reg.svg
--------------------------------------------------------------------------------
/public/notfound/fonts/Proxima Nova Reg.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/balanced/balanced-dashboard/8258b9cdc72ed0ec2dbfe40d31836ac710a03cbd/public/notfound/fonts/Proxima Nova Reg.ttf
--------------------------------------------------------------------------------
/public/notfound/fonts/Proxima Nova Reg.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/balanced/balanced-dashboard/8258b9cdc72ed0ec2dbfe40d31836ac710a03cbd/public/notfound/fonts/Proxima Nova Reg.woff
--------------------------------------------------------------------------------
/public/notfound/fonts/Proxima Nova Sbold.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/balanced/balanced-dashboard/8258b9cdc72ed0ec2dbfe40d31836ac710a03cbd/public/notfound/fonts/Proxima Nova Sbold.eot
--------------------------------------------------------------------------------
/public/notfound/fonts/Proxima Nova Sbold.svg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/balanced/balanced-dashboard/8258b9cdc72ed0ec2dbfe40d31836ac710a03cbd/public/notfound/fonts/Proxima Nova Sbold.svg
--------------------------------------------------------------------------------
/public/notfound/fonts/Proxima Nova Sbold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/balanced/balanced-dashboard/8258b9cdc72ed0ec2dbfe40d31836ac710a03cbd/public/notfound/fonts/Proxima Nova Sbold.ttf
--------------------------------------------------------------------------------
/public/notfound/fonts/Proxima Nova Sbold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/balanced/balanced-dashboard/8258b9cdc72ed0ec2dbfe40d31836ac710a03cbd/public/notfound/fonts/Proxima Nova Sbold.woff
--------------------------------------------------------------------------------
/public/notfound/fonts/balanced-icon.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/balanced/balanced-dashboard/8258b9cdc72ed0ec2dbfe40d31836ac710a03cbd/public/notfound/fonts/balanced-icon.eot
--------------------------------------------------------------------------------
/public/notfound/fonts/balanced-icon.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/balanced/balanced-dashboard/8258b9cdc72ed0ec2dbfe40d31836ac710a03cbd/public/notfound/fonts/balanced-icon.ttf
--------------------------------------------------------------------------------
/public/notfound/fonts/balanced-icon.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/balanced/balanced-dashboard/8258b9cdc72ed0ec2dbfe40d31836ac710a03cbd/public/notfound/fonts/balanced-icon.woff
--------------------------------------------------------------------------------
/public/notfound/fonts/balanced.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/balanced/balanced-dashboard/8258b9cdc72ed0ec2dbfe40d31836ac710a03cbd/public/notfound/fonts/balanced.eot
--------------------------------------------------------------------------------
/public/notfound/fonts/balanced.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/balanced/balanced-dashboard/8258b9cdc72ed0ec2dbfe40d31836ac710a03cbd/public/notfound/fonts/balanced.ttf
--------------------------------------------------------------------------------
/public/notfound/fonts/balanced.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/balanced/balanced-dashboard/8258b9cdc72ed0ec2dbfe40d31836ac710a03cbd/public/notfound/fonts/balanced.woff
--------------------------------------------------------------------------------
/public/notfound/images/balanced_logo_large.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/balanced/balanced-dashboard/8258b9cdc72ed0ec2dbfe40d31836ac710a03cbd/public/notfound/images/balanced_logo_large.png
--------------------------------------------------------------------------------
/public/notfound/images/clouds.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/balanced/balanced-dashboard/8258b9cdc72ed0ec2dbfe40d31836ac710a03cbd/public/notfound/images/clouds.png
--------------------------------------------------------------------------------
/public/notfound/images/green_balloon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/balanced/balanced-dashboard/8258b9cdc72ed0ec2dbfe40d31836ac710a03cbd/public/notfound/images/green_balloon.png
--------------------------------------------------------------------------------
/public/notfound/images/red_balloon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/balanced/balanced-dashboard/8258b9cdc72ed0ec2dbfe40d31836ac710a03cbd/public/notfound/images/red_balloon.png
--------------------------------------------------------------------------------
/public/notfound/images/yellow_balloon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/balanced/balanced-dashboard/8258b9cdc72ed0ec2dbfe40d31836ac710a03cbd/public/notfound/images/yellow_balloon.png
--------------------------------------------------------------------------------
/public/robots.txt:
--------------------------------------------------------------------------------
1 | # robotstxt.org/
2 |
3 | User-agent: *
4 |
--------------------------------------------------------------------------------
/testem.json:
--------------------------------------------------------------------------------
1 | {
2 | "framework": "qunit",
3 | "test_page": "tests/index.html",
4 | "launchers": {
5 | "PhantomJsSslAny": {
6 | "command": "phantomjs --ssl-protocol=any ./tests/phantom-runner.js http://localhost:7357/",
7 | "protocol": "tap"
8 | }
9 | },
10 | "launch_in_ci": [
11 | "PhantomJs"
12 | ],
13 | "launch_in_dev": [
14 | "PhantomJs",
15 | "Chrome"
16 | ]
17 | }
18 |
--------------------------------------------------------------------------------
/tests/fixtures/dispute-documents.js:
--------------------------------------------------------------------------------
1 | export default [{
2 | "uri": "disputes/"
3 | }];
4 |
--------------------------------------------------------------------------------
/tests/helpers/fixtures-adapter.coffee:
--------------------------------------------------------------------------------
1 | `import FixtureAdapter from "balanced-dashboard/adapters/fixture"`
2 |
3 | adapter = FixtureAdapter.create()
4 | adapter.asyncCallbacks = true
5 |
6 | files = "registration dispute-documents disputes invoices marketplace marketplace-users user".split(" ")
7 |
8 | for file in files
9 | fixtures = require("balanced-dashboard/tests/fixtures/#{file}").default
10 | adapter.addFixtures(fixtures)
11 |
12 | `export default adapter`
13 |
--------------------------------------------------------------------------------
/tests/helpers/resolver.js:
--------------------------------------------------------------------------------
1 | import Resolver from 'ember/resolver';
2 | import config from '../../config/environment';
3 |
4 | var resolver = Resolver.create();
5 |
6 | resolver.namespace = {
7 | modulePrefix: config.modulePrefix,
8 | podModulePrefix: config.podModulePrefix
9 | };
10 |
11 | export default resolver;
12 |
--------------------------------------------------------------------------------
/tests/helpers/setup-marketplace.coffee:
--------------------------------------------------------------------------------
1 | setupMarketplace = (App) ->
2 | secret = undefined
3 | marketplace = undefined
4 |
5 | container = App.__container__
6 |
7 | registrationController = container.lookup("controller:registration")
8 | auth = container.lookup("auth:main")
9 |
10 | registrationController.createApiKeySecret()
11 | .then (s) ->
12 | secret = s
13 | registrationController.createMarketplaceForApiKeySecret(secret)
14 | .then (mp) ->
15 | marketplace = mp
16 | auth.loginGuestUser(secret)
17 | .then ->
18 | auth.setupGuestUserMarketplace(marketplace)
19 | .then ->
20 | marketplace
21 |
22 | `export default setupMarketplace;`
23 |
--------------------------------------------------------------------------------
/tests/helpers/sinon-restore.coffee:
--------------------------------------------------------------------------------
1 | sinonRestore = (methods...) ->
2 | for method in methods
3 | if method && method.restore
4 | method.restore()
5 |
6 | `export default sinonRestore;`
7 |
--------------------------------------------------------------------------------
/tests/helpers/start-app.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import Application from '../../app';
3 | import Router from '../../router';
4 | import config from '../../config/environment';
5 |
6 | export default function (attrs) {
7 | var App;
8 |
9 | var attributes = Ember.merge(config, {
10 | ADAPTER: null
11 | });
12 | attributes = Ember.merge(attributes, attrs);
13 |
14 | Router.reopen({
15 | location: 'none'
16 | });
17 |
18 | Ember.run(function() {
19 | App = Application.create(attributes);
20 | window.BalancedApp = App;
21 | App.setupForTesting();
22 | App.injectTestHelpers();
23 | });
24 |
25 | App.reset();
26 | return App;
27 | }
28 |
--------------------------------------------------------------------------------
/tests/test-helper.js:
--------------------------------------------------------------------------------
1 | import resolver from './helpers/resolver';
2 | import {
3 | setResolver
4 | } from 'ember-qunit';
5 |
6 | setResolver(resolver);
7 |
8 | document.write('');
9 |
10 | QUnit.config.urlConfig.push({ id: 'nocontainer', label: 'Hide container'});
11 | var containerVisibility = QUnit.urlParams.nocontainer ? 'hidden' : 'visible';
12 | document.getElementById('ember-testing-container').style.visibility = containerVisibility;
13 |
--------------------------------------------------------------------------------
/tests/unit/helpers/colorize-status-test.coffee:
--------------------------------------------------------------------------------
1 | `import colorizeStatus from "balanced-dashboard/helpers/colorize-status";`
2 |
3 | module "Helper - colorize-status"
4 |
5 | test "colorize-status", ->
6 | value = "200"
7 | rendered = colorizeStatus._rawFunction(value)
8 | equal(rendered.string, "200 ")
9 |
--------------------------------------------------------------------------------
/tests/unit/models/credit-test.js:
--------------------------------------------------------------------------------
1 | import Credit from "balanced-dashboard/models/credit";
2 |
3 | module('Model - Credit');
4 |
5 | test('#serialize', function() {
6 | var credit = Credit.create({
7 | name: "Cool Customer",
8 | destination_uri: "/destination.ddd",
9 | order_uri: "orders/ORxxx"
10 | });
11 |
12 | var serializedJson = credit.constructor.serializer.serialize(credit);
13 | equal(serializedJson.order, "orders/ORxxx");
14 | equal(serializedJson.name, "Cool Customer");
15 | equal(serializedJson.destination_uri, "/destination.ddd");
16 | });
17 |
--------------------------------------------------------------------------------
/tests/unit/models/customer-test.js:
--------------------------------------------------------------------------------
1 | import Customer from "balanced-dashboard/models/customer";
2 |
3 | module('Model - Customer');
4 |
5 | test('displayName', function() {
6 | var emailAddress = 'bob@example.org';
7 | var name = 'Bob';
8 | var businessName = 'Balanced';
9 | var customer = Customer.create();
10 | customer.set('email', emailAddress);
11 | equal(customer.get('displayName'), emailAddress);
12 | customer.set('name', name);
13 | equal(customer.get('displayName'), '%@ (%@)'.fmt(name, emailAddress));
14 | customer.set('email', null);
15 | equal(customer.get('displayName'), name);
16 | customer.set('business_name', businessName);
17 | customer.set('type', 'Business');
18 | equal(customer.get('displayName'), businessName);
19 | });
20 |
--------------------------------------------------------------------------------
/tests/unit/models/marketplace-test.js:
--------------------------------------------------------------------------------
1 | import Marketplace from "balanced-dashboard/models/marketplace";
2 |
3 | module('Model - Marketplace');
4 |
5 | test('#isOrdersRequired', function() {
6 | var t = function(dateStr, expectedValue) {
7 | var mp = Marketplace.create({
8 | created_at: dateStr
9 | });
10 | deepEqual(mp.get("isOrdersRequired"), expectedValue, "Date %@ isOrdersRequired".fmt(dateStr));
11 | };
12 |
13 | t("2014-06-10T02:15:39.415520Z", false);
14 | t("2014-11-07T00:00:00.000000Z", false);
15 | t("2014-11-07T00:00:01Z", true);
16 | t("2014-11-10T02:15:39.415520Z", true);
17 | t("2014-11-10T02:15:39.415520Z", true);
18 | });
19 |
--------------------------------------------------------------------------------
/tests/unit/models/transaction-test.js:
--------------------------------------------------------------------------------
1 | import Transaction from "balanced-dashboard/models/transaction";
2 |
3 | module('Model - Transaction');
4 |
5 | test(".findAppearsOnStatementAsInvalidCharacters", function() {
6 | var tests = {
7 | "BALANCED, INC.": ",",
8 | "BALANCED-INC": "",
9 | "///,,,MMM": "/,"
10 | };
11 |
12 | _.each(tests, function(expected, value) {
13 | equal(Transaction.findAppearsOnStatementAsInvalidCharacters(value), expected);
14 | });
15 | });
16 |
--------------------------------------------------------------------------------
/tests/unit/views/detail-views/description-lists/titled-key-values-section-test.js:
--------------------------------------------------------------------------------
1 | import { test, moduleFor } from 'ember-qunit';
2 |
3 | moduleFor("view:detail-views/description-lists/titled-key-values-section", "View - TitledKeyValuesSection");
4 |
5 | test("#getFieldValue", function() {
6 | var subject = this.subject({
7 | model: {
8 | created_at: moment('2011-04-01').startOf('day').toDate(),
9 | id: "GG123123123"
10 | }
11 | });
12 | deepEqual(subject.getFieldValue("created_at"), "Apr 1, 2011, 12:00 AM");
13 | deepEqual(subject.getFieldValue("id"), "GG123123123");
14 | });
15 |
--------------------------------------------------------------------------------
/tests/unit/views/sidebar/marketplace-sidebar-test.js:
--------------------------------------------------------------------------------
1 | import { test, moduleFor } from 'ember-qunit';
2 | moduleFor("view:sidebar/marketplace-sidebar", "View - MarketplaceSidebar", {
3 | needs: ["view:sidebar/basic-link-sidebar-item"]
4 | });
5 |
6 | test("#sidebarItemsDefinition", function() {
7 | var view = this.subject({
8 | marketplace: {
9 | name: "Super Cool MP"
10 | }
11 | });
12 |
13 | deepEqual(view.get("items.length"), 7);
14 | view.set("marketplace", null);
15 | deepEqual(view.get("items.length"), 0);
16 | });
17 |
--------------------------------------------------------------------------------
/tests/unit/views/sidebar/sidebar-test.js:
--------------------------------------------------------------------------------
1 | import { test, moduleFor } from 'ember-qunit';
2 | moduleFor("view:sidebar/sidebar", "View - Sidebar");
3 |
4 | test("#dropdownDisplayLabel", function() {
5 | var view = this.subject();
6 |
7 | deepEqual(view.get("dropdownDisplayLabel"), "Marketplaces");
8 |
9 | view.set("marketplace", {
10 | name: "Super Cool MP"
11 | });
12 |
13 | deepEqual(view.get("dropdownDisplayLabel"), "Super Cool MP");
14 | view.set("marketplace", null);
15 | deepEqual(view.get("dropdownDisplayLabel"), "Marketplaces");
16 | });
17 |
18 |
--------------------------------------------------------------------------------