@vendure/admin-ui 3.0.2 → 3.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/catalog/components/collection-data-table/collection-data-table.component.d.ts +3 -5
- package/catalog/components/collection-list/collection-list.component.d.ts +1 -0
- package/catalog/components/facet-list/facet-list.component.d.ts +1 -0
- package/catalog/components/product-list/product-list.component.d.ts +2 -0
- package/catalog/components/product-variant-list/product-variant-list.component.d.ts +1 -1
- package/core/common/base-list.component.d.ts +13 -0
- package/core/common/version.d.ts +1 -1
- package/core/data/providers/base-data.service.d.ts +19 -2
- package/core/data/providers/collection-data.service.d.ts +2 -2
- package/core/data/providers/data.service.d.ts +3 -3
- package/core/data/query-result.d.ts +60 -4
- package/core/data/utils/add-custom-fields.d.ts +1 -1
- package/core/extension/register-route-component.d.ts +1 -1
- package/core/providers/alerts/alerts.service.d.ts +3 -0
- package/core/providers/auth/auth.service.d.ts +3 -1
- package/core/providers/data-table/data-table-config.service.d.ts +12 -0
- package/core/public_api.d.ts +1 -0
- package/core/shared/components/data-table-2/data-table2.component.d.ts +5 -5
- package/core/shared/components/data-table-filter-presets/filter-preset.service.d.ts +3 -4
- package/core/shared/components/order-state-label/order-state-label.component.d.ts +1 -1
- package/core/shared/dynamic-form-inputs/default-form-inputs.d.ts +1 -1
- package/customer/components/customer-group-list/customer-group-list.component.d.ts +2 -0
- package/customer/components/customer-list/customer-list.component.d.ts +1 -0
- package/esm2022/catalog/catalog.module.mjs +5 -5
- package/esm2022/catalog/components/apply-facet-dialog/apply-facet-dialog.component.mjs +4 -4
- package/esm2022/catalog/components/asset-detail/asset-detail.component.mjs +4 -4
- package/esm2022/catalog/components/asset-list/asset-list.component.mjs +4 -4
- package/esm2022/catalog/components/assign-products-to-channel-dialog/assign-products-to-channel-dialog.component.mjs +4 -4
- package/esm2022/catalog/components/bulk-add-facet-values-dialog/bulk-add-facet-values-dialog.component.mjs +4 -4
- package/esm2022/catalog/components/collection-contents/collection-contents.component.mjs +4 -4
- package/esm2022/catalog/components/collection-data-table/collection-data-table.component.mjs +11 -13
- package/esm2022/catalog/components/collection-detail/collection-detail.component.mjs +4 -4
- package/esm2022/catalog/components/collection-list/collection-breadcrumb.pipe.mjs +4 -4
- package/esm2022/catalog/components/collection-list/collection-list.component.mjs +6 -5
- package/esm2022/catalog/components/collection-tree/collection-tree-node.component.mjs +4 -4
- package/esm2022/catalog/components/collection-tree/collection-tree.component.mjs +4 -4
- package/esm2022/catalog/components/collection-tree/collection-tree.service.mjs +4 -4
- package/esm2022/catalog/components/confirm-variant-deletion-dialog/confirm-variant-deletion-dialog.component.mjs +4 -4
- package/esm2022/catalog/components/create-facet-value-dialog/create-facet-value-dialog.component.mjs +4 -4
- package/esm2022/catalog/components/create-product-option-group-dialog/create-product-option-group-dialog.component.mjs +4 -4
- package/esm2022/catalog/components/create-product-variant-dialog/create-product-variant-dialog.component.mjs +4 -4
- package/esm2022/catalog/components/facet-detail/facet-detail.component.mjs +4 -4
- package/esm2022/catalog/components/facet-list/facet-list.component.mjs +6 -5
- package/esm2022/catalog/components/generate-product-variants/generate-product-variants.component.mjs +4 -4
- package/esm2022/catalog/components/move-collections-dialog/move-collections-dialog.component.mjs +4 -4
- package/esm2022/catalog/components/option-value-input/option-value-input.component.mjs +4 -4
- package/esm2022/catalog/components/product-detail/product-detail.component.mjs +4 -4
- package/esm2022/catalog/components/product-list/product-list.component.mjs +7 -5
- package/esm2022/catalog/components/product-options-editor/product-options-editor.component.mjs +4 -4
- package/esm2022/catalog/components/product-variant-detail/product-variant-detail.component.mjs +4 -4
- package/esm2022/catalog/components/product-variant-list/product-variant-list.component.mjs +4 -4
- package/esm2022/catalog/components/product-variant-quick-jump/product-variant-quick-jump.component.mjs +4 -4
- package/esm2022/catalog/components/product-variants-editor/product-variants-editor.component.mjs +4 -4
- package/esm2022/catalog/components/product-variants-table/product-variants-table.component.mjs +4 -4
- package/esm2022/catalog/components/update-product-option-dialog/update-product-option-dialog.component.mjs +4 -4
- package/esm2022/catalog/components/variant-price-detail/variant-price-detail.component.mjs +4 -4
- package/esm2022/catalog/components/variant-price-strategy-detail/variant-price-strategy-detail.component.mjs +4 -4
- package/esm2022/catalog/providers/product-detail/product-detail.service.mjs +4 -4
- package/esm2022/catalog/providers/routing/product-variants-resolver.mjs +4 -4
- package/esm2022/core/app.component.mjs +4 -4
- package/esm2022/core/app.component.module.mjs +5 -5
- package/esm2022/core/common/base-list.component.mjs +26 -10
- package/esm2022/core/common/version.mjs +2 -2
- package/esm2022/core/components/alerts/alerts.component.mjs +4 -4
- package/esm2022/core/components/app-shell/app-shell.component.mjs +5 -5
- package/esm2022/core/components/base-nav/base-nav.component.mjs +4 -4
- package/esm2022/core/components/breadcrumb/breadcrumb.component.mjs +4 -4
- package/esm2022/core/components/channel-switcher/channel-switcher.component.mjs +4 -4
- package/esm2022/core/components/main-nav/main-nav.component.mjs +4 -4
- package/esm2022/core/components/notification/notification.component.mjs +4 -4
- package/esm2022/core/components/overlay-host/overlay-host.component.mjs +4 -4
- package/esm2022/core/components/settings-nav/settings-nav.component.mjs +4 -4
- package/esm2022/core/components/theme-switcher/theme-switcher.component.mjs +4 -4
- package/esm2022/core/components/ui-language-switcher-dialog/ui-language-switcher-dialog.component.mjs +4 -4
- package/esm2022/core/components/user-menu/user-menu.component.mjs +4 -4
- package/esm2022/core/core.module.mjs +5 -5
- package/esm2022/core/data/data.module.mjs +7 -7
- package/esm2022/core/data/providers/base-data.service.mjs +10 -11
- package/esm2022/core/data/providers/collection-data.service.mjs +3 -3
- package/esm2022/core/data/providers/data.service.mjs +8 -8
- package/esm2022/core/data/providers/fetch-adapter.mjs +4 -4
- package/esm2022/core/data/providers/interceptor.mjs +4 -4
- package/esm2022/core/data/providers/product-data.service.mjs +4 -2
- package/esm2022/core/data/query-result.mjs +96 -10
- package/esm2022/core/data/server-config.mjs +4 -4
- package/esm2022/core/data/utils/add-custom-fields.mjs +48 -30
- package/esm2022/core/extension/components/angular-route.component.mjs +7 -7
- package/esm2022/core/extension/components/route.component.mjs +4 -4
- package/esm2022/core/extension/providers/page-metadata.service.mjs +4 -4
- package/esm2022/core/providers/alerts/alerts.service.mjs +16 -6
- package/esm2022/core/providers/auth/auth.service.mjs +13 -9
- package/esm2022/core/providers/breadcrumb/breadcrumb.service.mjs +4 -4
- package/esm2022/core/providers/bulk-action-registry/bulk-action-registry.service.mjs +4 -4
- package/esm2022/core/providers/channel/channel.service.mjs +4 -4
- package/esm2022/core/providers/component-registry/component-registry.service.mjs +4 -4
- package/esm2022/core/providers/currency/currency.service.mjs +4 -4
- package/esm2022/core/providers/custom-detail-component/custom-detail-component.service.mjs +4 -4
- package/esm2022/core/providers/custom-field-component/custom-field-component.service.mjs +4 -4
- package/esm2022/core/providers/custom-history-entry-component/history-entry-component.service.mjs +4 -4
- package/esm2022/core/providers/dashboard-widget/dashboard-widget.service.mjs +4 -4
- package/esm2022/core/providers/data-table/data-table-config.service.mjs +43 -0
- package/esm2022/core/providers/guard/auth.guard.mjs +4 -4
- package/esm2022/core/providers/health-check/health-check.service.mjs +4 -4
- package/esm2022/core/providers/i18n/custom-message-format-compiler.mjs +4 -4
- package/esm2022/core/providers/i18n/i18n.service.mjs +4 -4
- package/esm2022/core/providers/job-queue/job-queue.service.mjs +4 -4
- package/esm2022/core/providers/local-storage/local-storage.service.mjs +4 -4
- package/esm2022/core/providers/localization/localization.service.mjs +4 -4
- package/esm2022/core/providers/modal/modal.service.mjs +4 -4
- package/esm2022/core/providers/nav-builder/nav-builder.service.mjs +4 -4
- package/esm2022/core/providers/notification/notification.service.mjs +4 -4
- package/esm2022/core/providers/overlay-host/overlay-host.service.mjs +4 -4
- package/esm2022/core/providers/page/page.service.mjs +4 -4
- package/esm2022/core/providers/permissions/permissions.service.mjs +4 -4
- package/esm2022/core/public_api.mjs +2 -1
- package/esm2022/core/shared/components/action-bar/action-bar.component.mjs +10 -10
- package/esm2022/core/shared/components/action-bar-dropdown-menu/action-bar-dropdown-menu.component.mjs +4 -4
- package/esm2022/core/shared/components/action-bar-items/action-bar-base.component.mjs +4 -4
- package/esm2022/core/shared/components/action-bar-items/action-bar-items.component.mjs +4 -4
- package/esm2022/core/shared/components/address-form/address-form.component.mjs +4 -4
- package/esm2022/core/shared/components/affixed-input/affixed-input.component.mjs +4 -4
- package/esm2022/core/shared/components/affixed-input/percentage-suffix-input.component.mjs +4 -4
- package/esm2022/core/shared/components/asset-file-input/asset-file-input.component.mjs +4 -4
- package/esm2022/core/shared/components/asset-gallery/asset-gallery.component.mjs +4 -4
- package/esm2022/core/shared/components/asset-picker-dialog/asset-picker-dialog.component.mjs +4 -4
- package/esm2022/core/shared/components/asset-preview/asset-preview.component.mjs +4 -4
- package/esm2022/core/shared/components/asset-preview-dialog/asset-preview-dialog.component.mjs +4 -4
- package/esm2022/core/shared/components/asset-preview-links/asset-preview-links.component.mjs +4 -4
- package/esm2022/core/shared/components/asset-search-input/asset-search-input.component.mjs +4 -4
- package/esm2022/core/shared/components/assets/assets.component.mjs +4 -4
- package/esm2022/core/shared/components/assign-to-channel-dialog/assign-to-channel-dialog.component.mjs +4 -4
- package/esm2022/core/shared/components/bulk-action-menu/bulk-action-menu.component.mjs +4 -4
- package/esm2022/core/shared/components/card/card.component.mjs +7 -7
- package/esm2022/core/shared/components/channel-assignment-control/channel-assignment-control.component.mjs +4 -4
- package/esm2022/core/shared/components/channel-badge/channel-badge.component.mjs +4 -4
- package/esm2022/core/shared/components/chart/chart.component.mjs +4 -4
- package/esm2022/core/shared/components/chip/chip.component.mjs +4 -4
- package/esm2022/core/shared/components/configurable-input/configurable-input.component.mjs +4 -4
- package/esm2022/core/shared/components/currency-code-selector/currency-code-selector.component.mjs +4 -4
- package/esm2022/core/shared/components/currency-input/currency-input.component.mjs +4 -4
- package/esm2022/core/shared/components/custom-detail-component-host/custom-detail-component-host.component.mjs +4 -4
- package/esm2022/core/shared/components/custom-field-control/custom-field-control.component.mjs +4 -4
- package/esm2022/core/shared/components/customer-label/customer-label.component.mjs +4 -4
- package/esm2022/core/shared/components/data-table/data-table-column.component.mjs +4 -4
- package/esm2022/core/shared/components/data-table/data-table.component.mjs +4 -4
- package/esm2022/core/shared/components/data-table-2/data-table-column.component.mjs +4 -4
- package/esm2022/core/shared/components/data-table-2/data-table-custom-component.service.mjs +4 -4
- package/esm2022/core/shared/components/data-table-2/data-table-custom-field-column.component.mjs +5 -5
- package/esm2022/core/shared/components/data-table-2/data-table-search.component.mjs +4 -4
- package/esm2022/core/shared/components/data-table-2/data-table2.component.mjs +45 -53
- package/esm2022/core/shared/components/data-table-column-picker/data-table-column-picker.component.mjs +4 -4
- package/esm2022/core/shared/components/data-table-filter-label/data-table-filter-label.component.mjs +4 -4
- package/esm2022/core/shared/components/data-table-filter-presets/add-filter-preset-button.component.mjs +4 -4
- package/esm2022/core/shared/components/data-table-filter-presets/data-table-filter-presets.component.mjs +4 -4
- package/esm2022/core/shared/components/data-table-filter-presets/filter-preset.service.mjs +25 -37
- package/esm2022/core/shared/components/data-table-filter-presets/rename-filter-preset-dialog.component.mjs +4 -4
- package/esm2022/core/shared/components/data-table-filters/custom-filter-component.directive.mjs +4 -4
- package/esm2022/core/shared/components/data-table-filters/data-table-filters.component.mjs +4 -4
- package/esm2022/core/shared/components/datetime-picker/datetime-picker.component.mjs +4 -4
- package/esm2022/core/shared/components/datetime-picker/datetime-picker.service.mjs +4 -4
- package/esm2022/core/shared/components/dropdown/dropdown-item.directive.mjs +4 -4
- package/esm2022/core/shared/components/dropdown/dropdown-menu.component.mjs +4 -4
- package/esm2022/core/shared/components/dropdown/dropdown-trigger.directive.mjs +4 -4
- package/esm2022/core/shared/components/dropdown/dropdown.component.mjs +4 -4
- package/esm2022/core/shared/components/duplicate-entity-dialog/duplicate-entity-dialog.component.mjs +4 -4
- package/esm2022/core/shared/components/edit-note-dialog/edit-note-dialog.component.mjs +4 -4
- package/esm2022/core/shared/components/empty-placeholder/empty-placeholder.component.mjs +4 -4
- package/esm2022/core/shared/components/entity-info/entity-info.component.mjs +4 -4
- package/esm2022/core/shared/components/extension-host/extension-host.component.mjs +4 -4
- package/esm2022/core/shared/components/extension-host/extension-host.service.mjs +4 -4
- package/esm2022/core/shared/components/facet-value-chip/facet-value-chip.component.mjs +4 -4
- package/esm2022/core/shared/components/facet-value-selector/facet-value-selector.component.mjs +4 -4
- package/esm2022/core/shared/components/focal-point-control/focal-point-control.component.mjs +4 -4
- package/esm2022/core/shared/components/form-field/form-field-control.directive.mjs +4 -4
- package/esm2022/core/shared/components/form-field/form-field.component.mjs +4 -4
- package/esm2022/core/shared/components/form-item/form-item.component.mjs +4 -4
- package/esm2022/core/shared/components/formatted-address/formatted-address.component.mjs +4 -4
- package/esm2022/core/shared/components/help-tooltip/help-tooltip.component.mjs +4 -4
- package/esm2022/core/shared/components/history-entry-detail/history-entry-detail.component.mjs +4 -4
- package/esm2022/core/shared/components/items-per-page-controls/items-per-page-controls.component.mjs +4 -4
- package/esm2022/core/shared/components/labeled-data/labeled-data.component.mjs +4 -4
- package/esm2022/core/shared/components/language-code-selector/language-code-selector.component.mjs +4 -4
- package/esm2022/core/shared/components/language-selector/language-selector.component.mjs +4 -4
- package/esm2022/core/shared/components/localized-text/localized-text.component.mjs +4 -4
- package/esm2022/core/shared/components/manage-tags-dialog/manage-tags-dialog.component.mjs +4 -4
- package/esm2022/core/shared/components/modal-dialog/dialog-buttons.directive.mjs +4 -4
- package/esm2022/core/shared/components/modal-dialog/dialog-component-outlet.component.mjs +4 -4
- package/esm2022/core/shared/components/modal-dialog/dialog-title.directive.mjs +4 -4
- package/esm2022/core/shared/components/modal-dialog/modal-dialog.component.mjs +4 -4
- package/esm2022/core/shared/components/object-tree/object-tree.component.mjs +4 -4
- package/esm2022/core/shared/components/order-state-label/order-state-label.component.mjs +4 -4
- package/esm2022/core/shared/components/page/page.component.mjs +4 -4
- package/esm2022/core/shared/components/page-block/page-block.component.mjs +4 -4
- package/esm2022/core/shared/components/page-body/page-body.component.mjs +4 -4
- package/esm2022/core/shared/components/page-detail-layout/page-detail-layout.component.mjs +4 -4
- package/esm2022/core/shared/components/page-detail-layout/page-detail-sidebar.component.mjs +4 -4
- package/esm2022/core/shared/components/page-entity-info/page-entity-info.component.mjs +4 -4
- package/esm2022/core/shared/components/page-header/page-header.component.mjs +4 -4
- package/esm2022/core/shared/components/page-header-description/page-header-description.component.mjs +4 -4
- package/esm2022/core/shared/components/page-header-tabs/page-header-tabs.component.mjs +4 -4
- package/esm2022/core/shared/components/page-title/page-title.component.mjs +4 -4
- package/esm2022/core/shared/components/pagination-controls/pagination-controls.component.mjs +4 -4
- package/esm2022/core/shared/components/product-multi-selector-dialog/product-multi-selector-dialog.component.mjs +4 -4
- package/esm2022/core/shared/components/product-search-input/product-search-input.component.mjs +4 -4
- package/esm2022/core/shared/components/product-variant-selector/product-variant-selector.component.mjs +4 -4
- package/esm2022/core/shared/components/radio-card/radio-card-fieldset.component.mjs +4 -4
- package/esm2022/core/shared/components/radio-card/radio-card.component.mjs +4 -4
- package/esm2022/core/shared/components/rich-text-editor/external-image-dialog/external-image-dialog.component.mjs +4 -4
- package/esm2022/core/shared/components/rich-text-editor/link-dialog/link-dialog.component.mjs +4 -4
- package/esm2022/core/shared/components/rich-text-editor/prosemirror/context-menu/context-menu.component.mjs +4 -4
- package/esm2022/core/shared/components/rich-text-editor/prosemirror/context-menu/context-menu.service.mjs +4 -4
- package/esm2022/core/shared/components/rich-text-editor/prosemirror/prosemirror.service.mjs +4 -4
- package/esm2022/core/shared/components/rich-text-editor/raw-html-dialog/raw-html-dialog.component.mjs +4 -4
- package/esm2022/core/shared/components/rich-text-editor/rich-text-editor.component.mjs +4 -4
- package/esm2022/core/shared/components/select-toggle/select-toggle.component.mjs +4 -4
- package/esm2022/core/shared/components/simple-dialog/simple-dialog.component.mjs +4 -4
- package/esm2022/core/shared/components/split-view/split-view.component.mjs +4 -4
- package/esm2022/core/shared/components/split-view/split-view.directive.mjs +7 -7
- package/esm2022/core/shared/components/status-badge/status-badge.component.mjs +4 -4
- package/esm2022/core/shared/components/tabbed-custom-fields/tabbed-custom-fields.component.mjs +4 -4
- package/esm2022/core/shared/components/table-row-action/table-row-action.component.mjs +4 -4
- package/esm2022/core/shared/components/tag-selector/tag-selector.component.mjs +4 -4
- package/esm2022/core/shared/components/timeline-entry/timeline-entry.component.mjs +4 -4
- package/esm2022/core/shared/components/title-input/title-input.component.mjs +4 -4
- package/esm2022/core/shared/components/ui-extension-point/ui-extension-point.component.mjs +4 -4
- package/esm2022/core/shared/components/zone-selector/zone-selector.component.mjs +4 -4
- package/esm2022/core/shared/directives/disabled.directive.mjs +4 -4
- package/esm2022/core/shared/directives/if-default-channel-active.directive.mjs +4 -4
- package/esm2022/core/shared/directives/if-directive-base.mjs +4 -4
- package/esm2022/core/shared/directives/if-multichannel.directive.mjs +4 -4
- package/esm2022/core/shared/directives/if-permissions.directive.mjs +4 -4
- package/esm2022/core/shared/dynamic-form-inputs/boolean-form-input/boolean-form-input.component.mjs +4 -4
- package/esm2022/core/shared/dynamic-form-inputs/code-editor-form-input/base-code-editor-form-input.component.mjs +4 -4
- package/esm2022/core/shared/dynamic-form-inputs/code-editor-form-input/html-editor-form-input.component.mjs +4 -4
- package/esm2022/core/shared/dynamic-form-inputs/code-editor-form-input/json-editor-form-input.component.mjs +4 -4
- package/esm2022/core/shared/dynamic-form-inputs/combination-mode-form-input/combination-mode-form-input.component.mjs +4 -4
- package/esm2022/core/shared/dynamic-form-inputs/currency-form-input/currency-form-input.component.mjs +4 -4
- package/esm2022/core/shared/dynamic-form-inputs/customer-group-form-input/customer-group-form-input.component.mjs +4 -4
- package/esm2022/core/shared/dynamic-form-inputs/date-form-input/date-form-input.component.mjs +4 -4
- package/esm2022/core/shared/dynamic-form-inputs/dynamic-form-input/dynamic-form-input.component.mjs +4 -4
- package/esm2022/core/shared/dynamic-form-inputs/facet-value-form-input/facet-value-form-input.component.mjs +4 -4
- package/esm2022/core/shared/dynamic-form-inputs/number-form-input/number-form-input.component.mjs +4 -4
- package/esm2022/core/shared/dynamic-form-inputs/password-form-input/password-form-input.component.mjs +4 -4
- package/esm2022/core/shared/dynamic-form-inputs/product-multi-selector-form-input/product-multi-selector-form-input.component.mjs +4 -4
- package/esm2022/core/shared/dynamic-form-inputs/product-selector-form-input/product-selector-form-input.component.mjs +4 -4
- package/esm2022/core/shared/dynamic-form-inputs/relation-form-input/asset/relation-asset-input.component.mjs +4 -4
- package/esm2022/core/shared/dynamic-form-inputs/relation-form-input/customer/relation-customer-input.component.mjs +4 -4
- package/esm2022/core/shared/dynamic-form-inputs/relation-form-input/generic/relation-generic-input.component.mjs +4 -4
- package/esm2022/core/shared/dynamic-form-inputs/relation-form-input/product/relation-product-input.component.mjs +4 -4
- package/esm2022/core/shared/dynamic-form-inputs/relation-form-input/product-variant/relation-product-variant-input.component.mjs +4 -4
- package/esm2022/core/shared/dynamic-form-inputs/relation-form-input/relation-card/relation-card.component.mjs +10 -10
- package/esm2022/core/shared/dynamic-form-inputs/relation-form-input/relation-form-input.component.mjs +4 -4
- package/esm2022/core/shared/dynamic-form-inputs/relation-form-input/relation-selector-dialog/relation-selector-dialog.component.mjs +4 -4
- package/esm2022/core/shared/dynamic-form-inputs/rich-text-form-input/rich-text-form-input.component.mjs +4 -4
- package/esm2022/core/shared/dynamic-form-inputs/select-form-input/select-form-input.component.mjs +4 -4
- package/esm2022/core/shared/dynamic-form-inputs/text-form-input/text-form-input.component.mjs +4 -4
- package/esm2022/core/shared/dynamic-form-inputs/textarea-form-input/textarea-form-input.component.mjs +4 -4
- package/esm2022/core/shared/pipes/asset-preview.pipe.mjs +4 -4
- package/esm2022/core/shared/pipes/channel-label.pipe.mjs +4 -4
- package/esm2022/core/shared/pipes/custom-field-description.pipe.mjs +4 -4
- package/esm2022/core/shared/pipes/custom-field-label.pipe.mjs +4 -4
- package/esm2022/core/shared/pipes/duration.pipe.mjs +4 -4
- package/esm2022/core/shared/pipes/file-size.pipe.mjs +4 -4
- package/esm2022/core/shared/pipes/has-permission.pipe.mjs +4 -4
- package/esm2022/core/shared/pipes/locale-base.pipe.mjs +6 -6
- package/esm2022/core/shared/pipes/locale-currency-name.pipe.mjs +4 -4
- package/esm2022/core/shared/pipes/locale-currency.pipe.mjs +4 -4
- package/esm2022/core/shared/pipes/locale-date.pipe.mjs +4 -4
- package/esm2022/core/shared/pipes/locale-language-name.pipe.mjs +4 -4
- package/esm2022/core/shared/pipes/locale-region-name.pipe.mjs +4 -4
- package/esm2022/core/shared/pipes/sentence-case.pipe.mjs +4 -4
- package/esm2022/core/shared/pipes/sort.pipe.mjs +4 -4
- package/esm2022/core/shared/pipes/state-i18n-token.pipe.mjs +4 -4
- package/esm2022/core/shared/pipes/string-to-color.pipe.mjs +4 -4
- package/esm2022/core/shared/pipes/time-ago.pipe.mjs +4 -4
- package/esm2022/core/shared/providers/routing/can-deactivate-detail-guard.mjs +4 -4
- package/esm2022/core/shared/shared.module.mjs +5 -5
- package/esm2022/customer/components/add-customer-to-group-dialog/add-customer-to-group-dialog.component.mjs +4 -4
- package/esm2022/customer/components/address-card/address-card.component.mjs +4 -4
- package/esm2022/customer/components/address-detail-dialog/address-detail-dialog.component.mjs +4 -4
- package/esm2022/customer/components/customer-detail/customer-detail.component.mjs +4 -4
- package/esm2022/customer/components/customer-group-detail/customer-group-detail.component.mjs +4 -4
- package/esm2022/customer/components/customer-group-detail-dialog/customer-group-detail-dialog.component.mjs +4 -4
- package/esm2022/customer/components/customer-group-list/customer-group-list.component.mjs +7 -5
- package/esm2022/customer/components/customer-group-member-list/customer-group-member-list.component.mjs +4 -4
- package/esm2022/customer/components/customer-history/customer-history-entry-host.component.mjs +4 -4
- package/esm2022/customer/components/customer-history/customer-history.component.mjs +4 -4
- package/esm2022/customer/components/customer-list/customer-list.component.mjs +6 -5
- package/esm2022/customer/components/customer-status-label/customer-status-label.component.mjs +4 -4
- package/esm2022/customer/components/select-customer-group-dialog/select-customer-group-dialog.component.mjs +4 -4
- package/esm2022/customer/customer.module.mjs +5 -5
- package/esm2022/dashboard/components/dashboard/dashboard.component.mjs +4 -4
- package/esm2022/dashboard/components/dashboard-widget/dashboard-widget.component.mjs +4 -4
- package/esm2022/dashboard/dashboard.module.mjs +5 -5
- package/esm2022/dashboard/widgets/latest-orders-widget/latest-orders-widget.component.mjs +8 -8
- package/esm2022/dashboard/widgets/order-chart-widget/order-chart-widget.component.mjs +4 -4
- package/esm2022/dashboard/widgets/order-summary-widget/order-summary-widget.component.mjs +8 -8
- package/esm2022/dashboard/widgets/test-widget/test-widget.component.mjs +8 -8
- package/esm2022/dashboard/widgets/welcome-widget/welcome-widget.component.mjs +8 -8
- package/esm2022/login/components/login/login.component.mjs +4 -4
- package/esm2022/login/login.module.mjs +5 -5
- package/esm2022/login/providers/login.guard.mjs +4 -4
- package/esm2022/marketing/components/promotion-detail/promotion-detail.component.mjs +4 -4
- package/esm2022/marketing/components/promotion-list/promotion-list.component.mjs +6 -5
- package/esm2022/marketing/marketing.module.mjs +5 -5
- package/esm2022/order/components/add-manual-payment-dialog/add-manual-payment-dialog.component.mjs +4 -4
- package/esm2022/order/components/cancel-order-dialog/cancel-order-dialog.component.mjs +4 -4
- package/esm2022/order/components/coupon-code-selector/coupon-code-selector.component.mjs +4 -4
- package/esm2022/order/components/draft-order-detail/draft-order-detail.component.mjs +4 -4
- package/esm2022/order/components/draft-order-variant-selector/draft-order-variant-selector.component.mjs +4 -4
- package/esm2022/order/components/fulfill-order-dialog/fulfill-order-dialog.component.mjs +4 -4
- package/esm2022/order/components/fulfillment-card/fulfillment-card.component.mjs +4 -4
- package/esm2022/order/components/fulfillment-detail/fulfillment-detail.component.mjs +4 -4
- package/esm2022/order/components/fulfillment-state-label/fulfillment-state-label.component.mjs +4 -4
- package/esm2022/order/components/line-fulfillment/line-fulfillment.component.mjs +4 -4
- package/esm2022/order/components/line-refunds/line-refunds.component.mjs +4 -4
- package/esm2022/order/components/modification-detail/modification-detail.component.mjs +4 -4
- package/esm2022/order/components/order-custom-fields-card/order-custom-fields-card.component.mjs +4 -4
- package/esm2022/order/components/order-data-table/order-data-table.component.mjs +4 -17
- package/esm2022/order/components/order-data-table/order-total-column.component.mjs +4 -4
- package/esm2022/order/components/order-detail/order-detail.component.mjs +5 -5
- package/esm2022/order/components/order-editor/order-editor.component.mjs +4 -4
- package/esm2022/order/components/order-edits-preview-dialog/order-edits-preview-dialog.component.mjs +4 -4
- package/esm2022/order/components/order-history/order-history-entry-host.component.mjs +4 -4
- package/esm2022/order/components/order-history/order-history.component.mjs +4 -4
- package/esm2022/order/components/order-list/order-list.component.mjs +6 -5
- package/esm2022/order/components/order-modification-summary/order-modification-summary.component.mjs +4 -4
- package/esm2022/order/components/order-payment-card/order-payment-card.component.mjs +4 -4
- package/esm2022/order/components/order-process-graph/order-process-edge.component.mjs +4 -4
- package/esm2022/order/components/order-process-graph/order-process-graph.component.mjs +4 -4
- package/esm2022/order/components/order-process-graph/order-process-node.component.mjs +4 -4
- package/esm2022/order/components/order-process-graph-dialog/order-process-graph-dialog.component.mjs +4 -4
- package/esm2022/order/components/order-state-select-dialog/order-state-select-dialog.component.mjs +4 -4
- package/esm2022/order/components/order-table/order-table.component.mjs +4 -4
- package/esm2022/order/components/payment-detail/payment-detail.component.mjs +4 -4
- package/esm2022/order/components/payment-for-refund-selector/payment-for-refund-selector.component.mjs +4 -4
- package/esm2022/order/components/payment-state-label/payment-state-label.component.mjs +4 -4
- package/esm2022/order/components/refund-detail/refund-detail.component.mjs +4 -4
- package/esm2022/order/components/refund-order-dialog/refund-order-dialog.component.mjs +4 -4
- package/esm2022/order/components/refund-state-label/refund-state-label.component.mjs +4 -4
- package/esm2022/order/components/select-address-dialog/select-address-dialog.component.mjs +4 -4
- package/esm2022/order/components/select-customer-dialog/select-customer-dialog.component.mjs +4 -4
- package/esm2022/order/components/select-shipping-method-dialog/select-shipping-method-dialog.component.mjs +4 -4
- package/esm2022/order/components/seller-orders-card/seller-orders-card.component.mjs +4 -4
- package/esm2022/order/components/settle-refund-dialog/settle-refund-dialog.component.mjs +4 -4
- package/esm2022/order/components/simple-item-list/simple-item-list.component.mjs +4 -4
- package/esm2022/order/order.module.mjs +5 -5
- package/esm2022/order/providers/order-transition.service.mjs +4 -4
- package/esm2022/order/providers/routing/order.guard.mjs +4 -4
- package/esm2022/react/components/react-custom-column.component.mjs +4 -4
- package/esm2022/react/components/react-custom-detail.component.mjs +4 -4
- package/esm2022/react/components/react-form-input.component.mjs +4 -4
- package/esm2022/react/components/react-route.component.mjs +4 -4
- package/esm2022/react/directives/react-component-host.directive.mjs +4 -4
- package/esm2022/settings/components/add-country-to-zone-dialog/add-country-to-zone-dialog.component.mjs +4 -4
- package/esm2022/settings/components/admin-detail/admin-detail.component.mjs +4 -4
- package/esm2022/settings/components/administrator-list/administrator-list.component.mjs +6 -5
- package/esm2022/settings/components/channel-detail/channel-detail.component.mjs +4 -4
- package/esm2022/settings/components/channel-list/channel-list.component.mjs +6 -5
- package/esm2022/settings/components/country-detail/country-detail.component.mjs +4 -4
- package/esm2022/settings/components/country-list/country-list.component.mjs +6 -5
- package/esm2022/settings/components/global-settings/global-settings.component.mjs +4 -4
- package/esm2022/settings/components/payment-method-detail/payment-method-detail.component.mjs +4 -4
- package/esm2022/settings/components/payment-method-list/payment-method-list.component.mjs +6 -5
- package/esm2022/settings/components/permission-grid/permission-grid.component.mjs +4 -4
- package/esm2022/settings/components/profile/profile.component.mjs +4 -4
- package/esm2022/settings/components/role-detail/role-detail.component.mjs +4 -4
- package/esm2022/settings/components/role-list/role-list.component.mjs +6 -5
- package/esm2022/settings/components/seller-detail/seller-detail.component.mjs +4 -4
- package/esm2022/settings/components/seller-list/seller-list.component.mjs +6 -5
- package/esm2022/settings/components/shipping-eligibility-test-result/shipping-eligibility-test-result.component.mjs +4 -4
- package/esm2022/settings/components/shipping-method-detail/shipping-method-detail.component.mjs +4 -4
- package/esm2022/settings/components/shipping-method-list/shipping-method-list.component.mjs +6 -5
- package/esm2022/settings/components/shipping-method-test-result/shipping-method-test-result.component.mjs +4 -4
- package/esm2022/settings/components/stock-location-detail/stock-location-detail.component.mjs +4 -4
- package/esm2022/settings/components/stock-location-list/stock-location-list.component.mjs +6 -5
- package/esm2022/settings/components/tax-category-detail/tax-category-detail.component.mjs +4 -4
- package/esm2022/settings/components/tax-category-list/tax-category-list.component.mjs +6 -5
- package/esm2022/settings/components/tax-rate-detail/tax-rate-detail.component.mjs +4 -4
- package/esm2022/settings/components/tax-rate-list/tax-rate-list.component.mjs +6 -5
- package/esm2022/settings/components/test-address-form/test-address-form.component.mjs +4 -4
- package/esm2022/settings/components/test-order-builder/test-order-builder.component.mjs +4 -4
- package/esm2022/settings/components/test-shipping-methods/test-shipping-methods.component.mjs +4 -4
- package/esm2022/settings/components/zone-detail/zone-detail.component.mjs +4 -4
- package/esm2022/settings/components/zone-list/zone-list.component.mjs +6 -5
- package/esm2022/settings/components/zone-member-list/zone-member-controls.directive.mjs +4 -4
- package/esm2022/settings/components/zone-member-list/zone-member-list-header.directive.mjs +4 -4
- package/esm2022/settings/components/zone-member-list/zone-member-list.component.mjs +4 -4
- package/esm2022/settings/providers/routing/profile-resolver.mjs +4 -4
- package/esm2022/settings/settings.module.mjs +5 -5
- package/esm2022/system/components/health-check/health-check.component.mjs +4 -4
- package/esm2022/system/components/job-list/job-list.component.mjs +4 -4
- package/esm2022/system/components/job-state-label/job-state-label.component.mjs +4 -4
- package/esm2022/system/system.module.mjs +5 -5
- package/fesm2022/vendure-admin-ui-catalog.mjs +120 -118
- package/fesm2022/vendure-admin-ui-catalog.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-core.mjs +1027 -876
- package/fesm2022/vendure-admin-ui-core.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-customer.mjs +48 -45
- package/fesm2022/vendure-admin-ui-customer.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-dashboard.mjs +41 -41
- package/fesm2022/vendure-admin-ui-dashboard.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-login.mjs +10 -10
- package/fesm2022/vendure-admin-ui-login.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-marketing.mjs +12 -11
- package/fesm2022/vendure-admin-ui-marketing.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-order.mjs +136 -148
- package/fesm2022/vendure-admin-ui-order.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-react.mjs +15 -15
- package/fesm2022/vendure-admin-ui-react.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-settings.mjs +131 -120
- package/fesm2022/vendure-admin-ui-settings.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-system.mjs +13 -13
- package/fesm2022/vendure-admin-ui-system.mjs.map +1 -1
- package/marketing/components/promotion-list/promotion-list.component.d.ts +1 -0
- package/order/components/order-data-table/order-data-table.component.d.ts +2 -3
- package/order/components/order-list/order-list.component.d.ts +1 -0
- package/package.json +13 -13
- package/settings/components/administrator-list/administrator-list.component.d.ts +1 -0
- package/settings/components/channel-list/channel-list.component.d.ts +1 -0
- package/settings/components/country-list/country-list.component.d.ts +1 -0
- package/settings/components/payment-method-list/payment-method-list.component.d.ts +1 -0
- package/settings/components/role-list/role-list.component.d.ts +1 -0
- package/settings/components/seller-list/seller-list.component.d.ts +1 -0
- package/settings/components/shipping-method-list/shipping-method-list.component.d.ts +1 -0
- package/settings/components/stock-location-list/stock-location-list.component.d.ts +1 -0
- package/settings/components/tax-category-list/tax-category-list.component.d.ts +1 -0
- package/settings/components/tax-rate-list/tax-rate-list.component.d.ts +1 -0
- package/settings/components/zone-list/zone-list.component.d.ts +1 -0
- package/static/theme.min.css +1 -1
|
@@ -81,10 +81,10 @@ class AddManualPaymentDialogComponent {
|
|
|
81
81
|
cancel() {
|
|
82
82
|
this.resolveWith();
|
|
83
83
|
}
|
|
84
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
85
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.
|
|
84
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AddManualPaymentDialogComponent, deps: [{ token: i1.DataService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
85
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: AddManualPaymentDialogComponent, selector: "vdr-add-manual-payment-dialog", ngImport: i0, template: "<ng-template vdrDialogTitle>{{ 'order.add-payment-to-order' | translate }}</ng-template>\r\n<form [formGroup]=\"form\">\r\n <vdr-form-field [label]=\"'order.payment-method' | translate\" for=\"method\">\r\n <ng-select\r\n [items]=\"paymentMethods$ | async\"\r\n bindLabel=\"code\"\r\n appendTo=\"body\"\r\n autofocus\r\n bindValue=\"code\"\r\n [addTag]=\"true\"\r\n formControlName=\"method\"\r\n ></ng-select>\r\n </vdr-form-field>\r\n <vdr-form-field [label]=\"'order.transaction-id' | translate\" for=\"transactionId\">\r\n <input id=\"transactionId\" type=\"text\" formControlName=\"transactionId\" />\r\n </vdr-form-field>\r\n</form>\r\n<ng-template vdrDialogButtons>\r\n <button type=\"button\" class=\"btn\" (click)=\"cancel()\">{{ 'common.cancel' | translate }}</button>\r\n <button type=\"submit\" (click)=\"submit()\" class=\"btn btn-primary\" [disabled]=\"form.invalid || form.pristine\">\r\n {{ 'order.add-payment' | translate }} ({{ outstandingAmount | localeCurrency: currencyCode }})\r\n </button>\r\n</ng-template>\r\n", styles: [".ng-select{min-width:100%}\n"], dependencies: [{ kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i5.NgSelectComponent, selector: "ng-select", inputs: ["bindLabel", "bindValue", "markFirst", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "deselectOnClick"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { kind: "component", type: i1.FormFieldComponent, selector: "vdr-form-field", inputs: ["label", "for", "tooltip", "errors", "readOnlyToggle"], outputs: ["readOnlyToggleChange"] }, { kind: "directive", type: i1.FormFieldControlDirective, selector: "input, textarea, select, vdr-currency-input" }, { kind: "directive", type: i1.DialogButtonsDirective, selector: "[vdrDialogButtons]" }, { kind: "directive", type: i1.DialogTitleDirective, selector: "[vdrDialogTitle]" }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.LocaleCurrencyPipe, name: "localeCurrency" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
86
86
|
}
|
|
87
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
87
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AddManualPaymentDialogComponent, decorators: [{
|
|
88
88
|
type: Component,
|
|
89
89
|
args: [{ selector: 'vdr-add-manual-payment-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template vdrDialogTitle>{{ 'order.add-payment-to-order' | translate }}</ng-template>\r\n<form [formGroup]=\"form\">\r\n <vdr-form-field [label]=\"'order.payment-method' | translate\" for=\"method\">\r\n <ng-select\r\n [items]=\"paymentMethods$ | async\"\r\n bindLabel=\"code\"\r\n appendTo=\"body\"\r\n autofocus\r\n bindValue=\"code\"\r\n [addTag]=\"true\"\r\n formControlName=\"method\"\r\n ></ng-select>\r\n </vdr-form-field>\r\n <vdr-form-field [label]=\"'order.transaction-id' | translate\" for=\"transactionId\">\r\n <input id=\"transactionId\" type=\"text\" formControlName=\"transactionId\" />\r\n </vdr-form-field>\r\n</form>\r\n<ng-template vdrDialogButtons>\r\n <button type=\"button\" class=\"btn\" (click)=\"cancel()\">{{ 'common.cancel' | translate }}</button>\r\n <button type=\"submit\" (click)=\"submit()\" class=\"btn btn-primary\" [disabled]=\"form.invalid || form.pristine\">\r\n {{ 'order.add-payment' | translate }} ({{ outstandingAmount | localeCurrency: currencyCode }})\r\n </button>\r\n</ng-template>\r\n", styles: [".ng-select{min-width:100%}\n"] }]
|
|
90
90
|
}], ctorParameters: () => [{ type: i1.DataService }] });
|
|
@@ -151,10 +151,10 @@ class CancelOrderDialogComponent {
|
|
|
151
151
|
}))
|
|
152
152
|
.filter(l => 0 < l.quantity);
|
|
153
153
|
}
|
|
154
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
155
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.
|
|
154
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CancelOrderDialogComponent, deps: [{ token: i1.I18nService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
155
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: CancelOrderDialogComponent, selector: "vdr-cancel-order-dialog", ngImport: i0, template: "<ng-template vdrDialogTitle>{{ 'order.cancel-order' | translate }}</ng-template>\r\n\r\n<div class=\"fulfillment-wrapper\">\r\n <div class=\"order-lines\">\r\n <table class=\"table\">\r\n <thead>\r\n <tr>\r\n <th></th>\r\n <th>{{ 'order.product-name' | translate }}</th>\r\n <th>{{ 'order.product-sku' | translate }}</th>\r\n <th>{{ 'order.quantity' | translate }}</th>\r\n <th>{{ 'order.unit-price' | translate }}</th>\r\n <th>{{ 'order.cancel' | translate }}</th>\r\n </tr>\r\n </thead>\r\n <tr\r\n *ngFor=\"let line of order.lines\"\r\n class=\"order-line\"\r\n [class.is-disabled]=\"cancelAll\"\r\n [class.is-cancelled]=\"line.quantity === 0\"\r\n >\r\n <td class=\"align-middle thumb\">\r\n <img [src]=\"line.featuredAsset | assetPreview: 'tiny'\" />\r\n </td>\r\n <td class=\"align-middle name\">{{ line.productVariant.name }}</td>\r\n <td class=\"align-middle sku\">{{ line.productVariant.sku }}</td>\r\n <td class=\"align-middle quantity\">{{ line.quantity }}</td>\r\n <td class=\"align-middle quantity\">\r\n {{ line.unitPriceWithTax | localeCurrency: order.currencyCode }}\r\n </td>\r\n <td class=\"align-middle fulfil\">\r\n <input\r\n *ngIf=\"line.quantity > 0 && !order.active; else nonEditable\"\r\n [(ngModel)]=\"lineQuantities[line.id]\"\r\n (input)=\"checkIfAllSelected()\"\r\n [disabled]=\"cancelAll\"\r\n type=\"number\"\r\n [max]=\"line.quantity\"\r\n min=\"0\"\r\n />\r\n <ng-template #nonEditable>{{ line.quantity }}</ng-template>\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n <div class=\"cancellation-details\">\r\n <ng-container *ngIf=\"order.active !== true\">\r\n <clr-radio-wrapper>\r\n <input\r\n type=\"radio\"\r\n clrRadio\r\n [value]=\"true\"\r\n [(ngModel)]=\"cancelAll\"\r\n name=\"options\"\r\n (ngModelChange)=\"radioChanged()\"\r\n />\r\n <label>{{ 'order.cancel-entire-order' | translate }}</label>\r\n </clr-radio-wrapper>\r\n <clr-radio-wrapper>\r\n <input\r\n type=\"radio\"\r\n clrRadio\r\n [value]=\"false\"\r\n [(ngModel)]=\"cancelAll\"\r\n name=\"options\"\r\n (ngModelChange)=\"radioChanged()\"\r\n />\r\n <label>{{ 'order.cancel-specified-items' | translate }}</label>\r\n </clr-radio-wrapper>\r\n </ng-container>\r\n <label class=\"clr-control-label\">{{ 'order.cancellation-reason' | translate }}</label>\r\n <ng-select\r\n [items]=\"reasons\"\r\n bindLabel=\"name\"\r\n autofocus\r\n bindValue=\"id\"\r\n [addTag]=\"true\"\r\n [(ngModel)]=\"reason\"\r\n ></ng-select>\r\n </div>\r\n</div>\r\n\r\n<ng-template vdrDialogButtons>\r\n <button type=\"button\" class=\"btn\" (click)=\"cancel()\">{{ 'common.cancel' | translate }}</button>\r\n <button\r\n type=\"submit\"\r\n (click)=\"select()\"\r\n [disabled]=\"!reason || (!order.active && selectionCount === 0)\"\r\n class=\"btn btn-primary\"\r\n >\r\n <ng-container *ngIf=\"!order.active\">\r\n {{ 'order.cancel-selected-items' | translate }}\r\n </ng-container>\r\n <ng-container *ngIf=\"order.active\">\r\n {{ 'order.cancel-order' | translate }}\r\n </ng-container>\r\n </button>\r\n</ng-template>\r\n", styles: [":host{height:100%;display:flex;min-height:64vh}.fulfillment-wrapper{flex:1}@media screen and (min-width: 768px){.fulfillment-wrapper{display:flex;flex-direction:row}}@media screen and (min-width: 768px){.fulfillment-wrapper .cancellation-details{margin-top:0;margin-inline-start:24px;width:250px}}.fulfillment-wrapper .order-lines{flex:1;overflow-y:auto}.fulfillment-wrapper .order-lines table{margin-top:0}.fulfillment-wrapper tr.ignore{color:var(--color-grey-300)}.fulfillment-wrapper .is-cancelled td{text-decoration:line-through;background-color:var(--color-component-bg-200)}.fulfillment-wrapper .is-disabled td,.fulfillment-wrapper .is-disabled td input{background-color:var(--color-component-bg-200)}\n"], dependencies: [{ kind: "directive", type: i3.ClrLabel, selector: "label", inputs: ["for"] }, { kind: "directive", type: i3.ClrRadio, selector: "[clrRadio]" }, { kind: "component", type: i3.ClrRadioWrapper, selector: "clr-radio-wrapper" }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i2.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5.NgSelectComponent, selector: "ng-select", inputs: ["bindLabel", "bindValue", "markFirst", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "deselectOnClick"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { kind: "directive", type: i1.FormFieldControlDirective, selector: "input, textarea, select, vdr-currency-input" }, { kind: "directive", type: i1.DialogButtonsDirective, selector: "[vdrDialogButtons]" }, { kind: "directive", type: i1.DialogTitleDirective, selector: "[vdrDialogTitle]" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.AssetPreviewPipe, name: "assetPreview" }, { kind: "pipe", type: i1.LocaleCurrencyPipe, name: "localeCurrency" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
156
156
|
}
|
|
157
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
157
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CancelOrderDialogComponent, decorators: [{
|
|
158
158
|
type: Component,
|
|
159
159
|
args: [{ selector: 'vdr-cancel-order-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template vdrDialogTitle>{{ 'order.cancel-order' | translate }}</ng-template>\r\n\r\n<div class=\"fulfillment-wrapper\">\r\n <div class=\"order-lines\">\r\n <table class=\"table\">\r\n <thead>\r\n <tr>\r\n <th></th>\r\n <th>{{ 'order.product-name' | translate }}</th>\r\n <th>{{ 'order.product-sku' | translate }}</th>\r\n <th>{{ 'order.quantity' | translate }}</th>\r\n <th>{{ 'order.unit-price' | translate }}</th>\r\n <th>{{ 'order.cancel' | translate }}</th>\r\n </tr>\r\n </thead>\r\n <tr\r\n *ngFor=\"let line of order.lines\"\r\n class=\"order-line\"\r\n [class.is-disabled]=\"cancelAll\"\r\n [class.is-cancelled]=\"line.quantity === 0\"\r\n >\r\n <td class=\"align-middle thumb\">\r\n <img [src]=\"line.featuredAsset | assetPreview: 'tiny'\" />\r\n </td>\r\n <td class=\"align-middle name\">{{ line.productVariant.name }}</td>\r\n <td class=\"align-middle sku\">{{ line.productVariant.sku }}</td>\r\n <td class=\"align-middle quantity\">{{ line.quantity }}</td>\r\n <td class=\"align-middle quantity\">\r\n {{ line.unitPriceWithTax | localeCurrency: order.currencyCode }}\r\n </td>\r\n <td class=\"align-middle fulfil\">\r\n <input\r\n *ngIf=\"line.quantity > 0 && !order.active; else nonEditable\"\r\n [(ngModel)]=\"lineQuantities[line.id]\"\r\n (input)=\"checkIfAllSelected()\"\r\n [disabled]=\"cancelAll\"\r\n type=\"number\"\r\n [max]=\"line.quantity\"\r\n min=\"0\"\r\n />\r\n <ng-template #nonEditable>{{ line.quantity }}</ng-template>\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n <div class=\"cancellation-details\">\r\n <ng-container *ngIf=\"order.active !== true\">\r\n <clr-radio-wrapper>\r\n <input\r\n type=\"radio\"\r\n clrRadio\r\n [value]=\"true\"\r\n [(ngModel)]=\"cancelAll\"\r\n name=\"options\"\r\n (ngModelChange)=\"radioChanged()\"\r\n />\r\n <label>{{ 'order.cancel-entire-order' | translate }}</label>\r\n </clr-radio-wrapper>\r\n <clr-radio-wrapper>\r\n <input\r\n type=\"radio\"\r\n clrRadio\r\n [value]=\"false\"\r\n [(ngModel)]=\"cancelAll\"\r\n name=\"options\"\r\n (ngModelChange)=\"radioChanged()\"\r\n />\r\n <label>{{ 'order.cancel-specified-items' | translate }}</label>\r\n </clr-radio-wrapper>\r\n </ng-container>\r\n <label class=\"clr-control-label\">{{ 'order.cancellation-reason' | translate }}</label>\r\n <ng-select\r\n [items]=\"reasons\"\r\n bindLabel=\"name\"\r\n autofocus\r\n bindValue=\"id\"\r\n [addTag]=\"true\"\r\n [(ngModel)]=\"reason\"\r\n ></ng-select>\r\n </div>\r\n</div>\r\n\r\n<ng-template vdrDialogButtons>\r\n <button type=\"button\" class=\"btn\" (click)=\"cancel()\">{{ 'common.cancel' | translate }}</button>\r\n <button\r\n type=\"submit\"\r\n (click)=\"select()\"\r\n [disabled]=\"!reason || (!order.active && selectionCount === 0)\"\r\n class=\"btn btn-primary\"\r\n >\r\n <ng-container *ngIf=\"!order.active\">\r\n {{ 'order.cancel-selected-items' | translate }}\r\n </ng-container>\r\n <ng-container *ngIf=\"order.active\">\r\n {{ 'order.cancel-order' | translate }}\r\n </ng-container>\r\n </button>\r\n</ng-template>\r\n", styles: [":host{height:100%;display:flex;min-height:64vh}.fulfillment-wrapper{flex:1}@media screen and (min-width: 768px){.fulfillment-wrapper{display:flex;flex-direction:row}}@media screen and (min-width: 768px){.fulfillment-wrapper .cancellation-details{margin-top:0;margin-inline-start:24px;width:250px}}.fulfillment-wrapper .order-lines{flex:1;overflow-y:auto}.fulfillment-wrapper .order-lines table{margin-top:0}.fulfillment-wrapper tr.ignore{color:var(--color-grey-300)}.fulfillment-wrapper .is-cancelled td{text-decoration:line-through;background-color:var(--color-component-bg-200)}.fulfillment-wrapper .is-disabled td,.fulfillment-wrapper .is-disabled td input{background-color:var(--color-component-bg-200)}\n"] }]
|
|
160
160
|
}], ctorParameters: () => [{ type: i1.I18nService }] });
|
|
@@ -197,10 +197,10 @@ class CouponCodeSelectorComponent {
|
|
|
197
197
|
remove(code) {
|
|
198
198
|
this.removeCouponCode.emit(code);
|
|
199
199
|
}
|
|
200
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
201
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.
|
|
200
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CouponCodeSelectorComponent, deps: [{ token: i1.DataService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
201
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: CouponCodeSelectorComponent, selector: "vdr-coupon-code-selector", inputs: { couponCodes: "couponCodes", control: "control" }, outputs: { addCouponCode: "addCouponCode", removeCouponCode: "removeCouponCode" }, ngImport: i0, template: "<ng-select\r\n [items]=\"availableCouponCodes$ | async\"\r\n appendTo=\"body\"\r\n bindLabel=\"code\"\r\n bindValue=\"code\"\r\n [addTag]=\"false\"\r\n [multiple]=\"true\"\r\n [hideSelected]=\"true\"\r\n [minTermLength]=\"2\"\r\n typeToSearchText=\"\"\r\n [typeahead]=\"couponCodeInput$\"\r\n [formControl]=\"control\"\r\n (add)=\"addCouponCode.emit($event.code)\"\r\n (remove)=\"remove($event.code)\"\r\n>\r\n <ng-template ng-option-tmp let-item=\"item\">\r\n <div class=\"flex items-center\">\r\n <vdr-chip class=\"mr-1\">{{ item.code }}</vdr-chip>\r\n <span>{{ item.promotionName }}</span>\r\n </div>\r\n </ng-template>\r\n</ng-select>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i5.NgSelectComponent, selector: "ng-select", inputs: ["bindLabel", "bindValue", "markFirst", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "deselectOnClick"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { kind: "directive", type: i5.NgOptionTemplateDirective, selector: "[ng-option-tmp]" }, { kind: "component", type: i1.ChipComponent, selector: "vdr-chip", inputs: ["icon", "invert", "colorFrom", "colorType"], outputs: ["iconClick"] }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
202
202
|
}
|
|
203
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
203
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CouponCodeSelectorComponent, decorators: [{
|
|
204
204
|
type: Component,
|
|
205
205
|
args: [{ selector: 'vdr-coupon-code-selector', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-select\r\n [items]=\"availableCouponCodes$ | async\"\r\n appendTo=\"body\"\r\n bindLabel=\"code\"\r\n bindValue=\"code\"\r\n [addTag]=\"false\"\r\n [multiple]=\"true\"\r\n [hideSelected]=\"true\"\r\n [minTermLength]=\"2\"\r\n typeToSearchText=\"\"\r\n [typeahead]=\"couponCodeInput$\"\r\n [formControl]=\"control\"\r\n (add)=\"addCouponCode.emit($event.code)\"\r\n (remove)=\"remove($event.code)\"\r\n>\r\n <ng-template ng-option-tmp let-item=\"item\">\r\n <div class=\"flex items-center\">\r\n <vdr-chip class=\"mr-1\">{{ item.code }}</vdr-chip>\r\n <span>{{ item.promotionName }}</span>\r\n </div>\r\n </ng-template>\r\n</ng-select>\r\n" }]
|
|
206
206
|
}], ctorParameters: () => [{ type: i1.DataService }], propDecorators: { couponCodes: [{
|
|
@@ -282,10 +282,10 @@ class SelectAddressDialogComponent {
|
|
|
282
282
|
this.resolveWith(formValue);
|
|
283
283
|
}
|
|
284
284
|
}
|
|
285
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
286
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.
|
|
285
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SelectAddressDialogComponent, deps: [{ token: i1.DataService }, { token: i2.UntypedFormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
286
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SelectAddressDialogComponent, selector: "vdr-select-address-dialog", ngImport: i0, template: "<ng-template vdrDialogTitle>{{ 'order.select-address' | translate }}</ng-template>\r\n\r\n<clr-tabs *ngIf=\"addresses$ | async as addresses\">\r\n <clr-tab *ngIf=\"customerId && addresses.length\">\r\n <button clrTabLink>{{ 'order.existing-address' | translate }}</button>\r\n <ng-template [(clrIfActive)]=\"useExisting\">\r\n <clr-tab-content>\r\n <vdr-radio-card-fieldset\r\n class=\"block mt-4\"\r\n [idFn]=\"addressIdFn\"\r\n [selectedItemId]=\"selectedAddress && addressIdFn(selectedAddress)\"\r\n (selectItem)=\"selectedAddress = $event\"\r\n >\r\n <vdr-radio-card *ngFor=\"let address of addresses\" [item]=\"address\">\r\n <vdr-formatted-address [address]=\"address\"></vdr-formatted-address>\r\n </vdr-radio-card>\r\n </vdr-radio-card-fieldset>\r\n </clr-tab-content>\r\n </ng-template>\r\n </clr-tab>\r\n <clr-tab>\r\n <button clrTabLink>{{ 'customer.create-new-address' | translate }}</button>\r\n\r\n <ng-template [(clrIfActive)]=\"createNew\">\r\n <clr-tab-content>\r\n <vdr-address-form\r\n [formGroup]=\"addressForm\"\r\n [availableCountries]=\"availableCountries$ | async\"\r\n ></vdr-address-form>\r\n </clr-tab-content>\r\n </ng-template>\r\n </clr-tab>\r\n</clr-tabs>\r\n\r\n<ng-template vdrDialogButtons>\r\n <button type=\"button\" class=\"btn\" (click)=\"cancel()\">{{ 'common.cancel' | translate }}</button>\r\n <button\r\n type=\"submit\"\r\n (click)=\"select()\"\r\n [disabled]=\"(useExisting && !selectedAddress) || (createNew && addressForm.invalid)\"\r\n class=\"btn btn-primary\"\r\n >\r\n {{ 'common.okay' | translate }}\r\n </button>\r\n</ng-template>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i3.ClrIfActive, selector: "[clrIfActive]", inputs: ["clrIfActive"], outputs: ["clrIfActiveChange"] }, { kind: "component", type: i3.ClrTabContent, selector: "clr-tab-content", inputs: ["id"] }, { kind: "component", type: i3.ClrTab, selector: "clr-tab" }, { kind: "component", type: i3.ClrTabs, selector: "clr-tabs", inputs: ["clrLayout"] }, { kind: "directive", type: i3.ClrTabLink, selector: "[clrTabLink]", inputs: ["id", "clrTabLinkInOverflow"] }, { kind: "directive", type: i3.ÇlrTabsWillyWonka, selector: "clr-tabs" }, { kind: "directive", type: i3.ÇlrActiveOompaLoompa, selector: "[clrTabLink], clr-tab-content" }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.DialogButtonsDirective, selector: "[vdrDialogButtons]" }, { kind: "directive", type: i1.DialogTitleDirective, selector: "[vdrDialogTitle]" }, { kind: "component", type: i1.FormattedAddressComponent, selector: "vdr-formatted-address", inputs: ["address"] }, { kind: "component", type: i1.AddressFormComponent, selector: "vdr-address-form", inputs: ["customFields", "formGroup", "availableCountries"] }, { kind: "component", type: i1.RadioCardComponent, selector: "vdr-radio-card", inputs: ["item"], exportAs: ["VdrRadioCard"] }, { kind: "component", type: i1.RadioCardFieldsetComponent, selector: "vdr-radio-card-fieldset", inputs: ["selectedItemId", "idFn"], outputs: ["selectItem"] }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
287
287
|
}
|
|
288
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
288
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SelectAddressDialogComponent, decorators: [{
|
|
289
289
|
type: Component,
|
|
290
290
|
args: [{ selector: 'vdr-select-address-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template vdrDialogTitle>{{ 'order.select-address' | translate }}</ng-template>\r\n\r\n<clr-tabs *ngIf=\"addresses$ | async as addresses\">\r\n <clr-tab *ngIf=\"customerId && addresses.length\">\r\n <button clrTabLink>{{ 'order.existing-address' | translate }}</button>\r\n <ng-template [(clrIfActive)]=\"useExisting\">\r\n <clr-tab-content>\r\n <vdr-radio-card-fieldset\r\n class=\"block mt-4\"\r\n [idFn]=\"addressIdFn\"\r\n [selectedItemId]=\"selectedAddress && addressIdFn(selectedAddress)\"\r\n (selectItem)=\"selectedAddress = $event\"\r\n >\r\n <vdr-radio-card *ngFor=\"let address of addresses\" [item]=\"address\">\r\n <vdr-formatted-address [address]=\"address\"></vdr-formatted-address>\r\n </vdr-radio-card>\r\n </vdr-radio-card-fieldset>\r\n </clr-tab-content>\r\n </ng-template>\r\n </clr-tab>\r\n <clr-tab>\r\n <button clrTabLink>{{ 'customer.create-new-address' | translate }}</button>\r\n\r\n <ng-template [(clrIfActive)]=\"createNew\">\r\n <clr-tab-content>\r\n <vdr-address-form\r\n [formGroup]=\"addressForm\"\r\n [availableCountries]=\"availableCountries$ | async\"\r\n ></vdr-address-form>\r\n </clr-tab-content>\r\n </ng-template>\r\n </clr-tab>\r\n</clr-tabs>\r\n\r\n<ng-template vdrDialogButtons>\r\n <button type=\"button\" class=\"btn\" (click)=\"cancel()\">{{ 'common.cancel' | translate }}</button>\r\n <button\r\n type=\"submit\"\r\n (click)=\"select()\"\r\n [disabled]=\"(useExisting && !selectedAddress) || (createNew && addressForm.invalid)\"\r\n class=\"btn btn-primary\"\r\n >\r\n {{ 'common.okay' | translate }}\r\n </button>\r\n</ng-template>\r\n" }]
|
|
291
291
|
}], ctorParameters: () => [{ type: i1.DataService }, { type: i2.UntypedFormBuilder }] });
|
|
@@ -335,10 +335,10 @@ class SelectCustomerDialogComponent {
|
|
|
335
335
|
this.resolveWith({ ...formValue, note: this.note });
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
339
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.
|
|
338
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SelectCustomerDialogComponent, deps: [{ token: i1.DataService }, { token: i2.UntypedFormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
339
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SelectCustomerDialogComponent, selector: "vdr-select-customer-dialog", ngImport: i0, template: "<ng-template vdrDialogTitle>{{ title | translate }}</ng-template>\r\n\r\n<ng-container *ngIf=\"!canCreateNew\">\r\n <ng-container *ngTemplateOutlet=\"customerSelect\"></ng-container>\r\n <vdr-form-field [label]=\"'common.add-note' | translate\" *ngIf=\"includeNoteInput\" class=\"mt-4\">\r\n <textarea [(ngModel)]=\"note\"></textarea>\r\n </vdr-form-field>\r\n</ng-container>\r\n\r\n<clr-tabs *ngIf=\"canCreateNew\" class=\"pt-1\">\r\n <clr-tab>\r\n <button clrTabLink>{{ 'order.existing-customer' | translate }}</button>\r\n\r\n <ng-template [(clrIfActive)]=\"useExisting\">\r\n <clr-tab-content>\r\n <div class=\"mt-4\">\r\n <ng-container *ngTemplateOutlet=\"customerSelect\"></ng-container>\r\n </div>\r\n </clr-tab-content>\r\n </ng-template>\r\n </clr-tab>\r\n <clr-tab *ngIf=\"canCreateNew\">\r\n <button clrTabLink>{{ 'customer.create-new-customer' | translate }}</button>\r\n\r\n <ng-template [(clrIfActive)]=\"createNew\">\r\n <clr-tab-content>\r\n <form [formGroup]=\"customerForm\">\r\n <vdr-form-field [label]=\"'customer.title' | translate\" for=\"title\">\r\n <input id=\"title\" type=\"text\" formControlName=\"title\" />\r\n </vdr-form-field>\r\n <vdr-form-field [label]=\"'customer.first-name' | translate\" for=\"firstName\">\r\n <input id=\"firstName\" type=\"text\" formControlName=\"firstName\" />\r\n </vdr-form-field>\r\n <vdr-form-field [label]=\"'customer.last-name' | translate\" for=\"lastName\">\r\n <input id=\"lastName\" type=\"text\" formControlName=\"lastName\" />\r\n </vdr-form-field>\r\n <vdr-form-field [label]=\"'customer.email-address' | translate\" for=\"emailAddress\">\r\n <input id=\"emailAddress\" type=\"text\" formControlName=\"emailAddress\" />\r\n </vdr-form-field>\r\n <vdr-form-field [label]=\"'customer.phone-number' | translate\" for=\"phoneNumber\">\r\n <input id=\"phoneNumber\" type=\"text\" formControlName=\"phoneNumber\" />\r\n </vdr-form-field>\r\n </form>\r\n </clr-tab-content>\r\n </ng-template>\r\n </clr-tab>\r\n</clr-tabs>\r\n\r\n<ng-template #customerSelect>\r\n <ng-select\r\n [items]=\"customers$ | async\"\r\n appendTo=\"body\"\r\n bindLabel=\"name\"\r\n [addTag]=\"false\"\r\n [multiple]=\"true\"\r\n [hideSelected]=\"true\"\r\n [trackByFn]=\"trackByFn\"\r\n [minTermLength]=\"2\"\r\n [loading]=\"isLoading\"\r\n [typeahead]=\"input$\"\r\n [(ngModel)]=\"selectedCustomer\"\r\n >\r\n <ng-template ng-label-tmp let-item=\"item\" let-clear=\"clear\">\r\n <span class=\"item-row\">\r\n <clr-icon shape=\"user\" class=\"is-solid\"></clr-icon\r\n ><span class=\"mx-1\">{{ item.firstName }} {{ item.lastName }}</span>\r\n <vdr-chip>{{ item.emailAddress }}</vdr-chip>\r\n </span>\r\n </ng-template>\r\n <ng-template ng-option-tmp let-item=\"item\">\r\n <span class=\"item-row\">\r\n <clr-icon shape=\"user\" class=\"is-solid\"></clr-icon\r\n ><span class=\"mx-1\">{{ item.firstName }} {{ item.lastName }}</span>\r\n <vdr-chip>{{ item.emailAddress }}</vdr-chip>\r\n </span>\r\n </ng-template>\r\n </ng-select>\r\n</ng-template>\r\n\r\n<ng-template vdrDialogButtons>\r\n <button type=\"button\" class=\"btn\" (click)=\"cancel()\">{{ 'common.cancel' | translate }}</button>\r\n <button\r\n type=\"submit\"\r\n (click)=\"select()\"\r\n [disabled]=\"(useExisting && selectedCustomer.length === 0) || (createNew && customerForm.invalid)\"\r\n class=\"btn btn-primary\"\r\n >\r\n {{ 'common.okay' | translate }}\r\n </button>\r\n</ng-template>\r\n", styles: [".item-row{display:flex;align-items:center}clr-tabs{display:block}\n"], dependencies: [{ kind: "directive", type: i3.ClrIconCustomTag, selector: "clr-icon" }, { kind: "directive", type: i3.ClrIfActive, selector: "[clrIfActive]", inputs: ["clrIfActive"], outputs: ["clrIfActiveChange"] }, { kind: "component", type: i3.ClrTabContent, selector: "clr-tab-content", inputs: ["id"] }, { kind: "component", type: i3.ClrTab, selector: "clr-tab" }, { kind: "component", type: i3.ClrTabs, selector: "clr-tabs", inputs: ["clrLayout"] }, { kind: "directive", type: i3.ClrTabLink, selector: "[clrTabLink]", inputs: ["id", "clrTabLinkInOverflow"] }, { kind: "directive", type: i3.ÇlrTabsWillyWonka, selector: "clr-tabs" }, { kind: "directive", type: i3.ÇlrActiveOompaLoompa, selector: "[clrTabLink], clr-tab-content" }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i5.NgSelectComponent, selector: "ng-select", inputs: ["bindLabel", "bindValue", "markFirst", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "deselectOnClick"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { kind: "directive", type: i5.NgOptionTemplateDirective, selector: "[ng-option-tmp]" }, { kind: "directive", type: i5.NgLabelTemplateDirective, selector: "[ng-label-tmp]" }, { kind: "component", type: i1.ChipComponent, selector: "vdr-chip", inputs: ["icon", "invert", "colorFrom", "colorType"], outputs: ["iconClick"] }, { kind: "component", type: i1.FormFieldComponent, selector: "vdr-form-field", inputs: ["label", "for", "tooltip", "errors", "readOnlyToggle"], outputs: ["readOnlyToggleChange"] }, { kind: "directive", type: i1.FormFieldControlDirective, selector: "input, textarea, select, vdr-currency-input" }, { kind: "directive", type: i1.DialogButtonsDirective, selector: "[vdrDialogButtons]" }, { kind: "directive", type: i1.DialogTitleDirective, selector: "[vdrDialogTitle]" }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
340
340
|
}
|
|
341
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
341
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SelectCustomerDialogComponent, decorators: [{
|
|
342
342
|
type: Component,
|
|
343
343
|
args: [{ selector: 'vdr-select-customer-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template vdrDialogTitle>{{ title | translate }}</ng-template>\r\n\r\n<ng-container *ngIf=\"!canCreateNew\">\r\n <ng-container *ngTemplateOutlet=\"customerSelect\"></ng-container>\r\n <vdr-form-field [label]=\"'common.add-note' | translate\" *ngIf=\"includeNoteInput\" class=\"mt-4\">\r\n <textarea [(ngModel)]=\"note\"></textarea>\r\n </vdr-form-field>\r\n</ng-container>\r\n\r\n<clr-tabs *ngIf=\"canCreateNew\" class=\"pt-1\">\r\n <clr-tab>\r\n <button clrTabLink>{{ 'order.existing-customer' | translate }}</button>\r\n\r\n <ng-template [(clrIfActive)]=\"useExisting\">\r\n <clr-tab-content>\r\n <div class=\"mt-4\">\r\n <ng-container *ngTemplateOutlet=\"customerSelect\"></ng-container>\r\n </div>\r\n </clr-tab-content>\r\n </ng-template>\r\n </clr-tab>\r\n <clr-tab *ngIf=\"canCreateNew\">\r\n <button clrTabLink>{{ 'customer.create-new-customer' | translate }}</button>\r\n\r\n <ng-template [(clrIfActive)]=\"createNew\">\r\n <clr-tab-content>\r\n <form [formGroup]=\"customerForm\">\r\n <vdr-form-field [label]=\"'customer.title' | translate\" for=\"title\">\r\n <input id=\"title\" type=\"text\" formControlName=\"title\" />\r\n </vdr-form-field>\r\n <vdr-form-field [label]=\"'customer.first-name' | translate\" for=\"firstName\">\r\n <input id=\"firstName\" type=\"text\" formControlName=\"firstName\" />\r\n </vdr-form-field>\r\n <vdr-form-field [label]=\"'customer.last-name' | translate\" for=\"lastName\">\r\n <input id=\"lastName\" type=\"text\" formControlName=\"lastName\" />\r\n </vdr-form-field>\r\n <vdr-form-field [label]=\"'customer.email-address' | translate\" for=\"emailAddress\">\r\n <input id=\"emailAddress\" type=\"text\" formControlName=\"emailAddress\" />\r\n </vdr-form-field>\r\n <vdr-form-field [label]=\"'customer.phone-number' | translate\" for=\"phoneNumber\">\r\n <input id=\"phoneNumber\" type=\"text\" formControlName=\"phoneNumber\" />\r\n </vdr-form-field>\r\n </form>\r\n </clr-tab-content>\r\n </ng-template>\r\n </clr-tab>\r\n</clr-tabs>\r\n\r\n<ng-template #customerSelect>\r\n <ng-select\r\n [items]=\"customers$ | async\"\r\n appendTo=\"body\"\r\n bindLabel=\"name\"\r\n [addTag]=\"false\"\r\n [multiple]=\"true\"\r\n [hideSelected]=\"true\"\r\n [trackByFn]=\"trackByFn\"\r\n [minTermLength]=\"2\"\r\n [loading]=\"isLoading\"\r\n [typeahead]=\"input$\"\r\n [(ngModel)]=\"selectedCustomer\"\r\n >\r\n <ng-template ng-label-tmp let-item=\"item\" let-clear=\"clear\">\r\n <span class=\"item-row\">\r\n <clr-icon shape=\"user\" class=\"is-solid\"></clr-icon\r\n ><span class=\"mx-1\">{{ item.firstName }} {{ item.lastName }}</span>\r\n <vdr-chip>{{ item.emailAddress }}</vdr-chip>\r\n </span>\r\n </ng-template>\r\n <ng-template ng-option-tmp let-item=\"item\">\r\n <span class=\"item-row\">\r\n <clr-icon shape=\"user\" class=\"is-solid\"></clr-icon\r\n ><span class=\"mx-1\">{{ item.firstName }} {{ item.lastName }}</span>\r\n <vdr-chip>{{ item.emailAddress }}</vdr-chip>\r\n </span>\r\n </ng-template>\r\n </ng-select>\r\n</ng-template>\r\n\r\n<ng-template vdrDialogButtons>\r\n <button type=\"button\" class=\"btn\" (click)=\"cancel()\">{{ 'common.cancel' | translate }}</button>\r\n <button\r\n type=\"submit\"\r\n (click)=\"select()\"\r\n [disabled]=\"(useExisting && selectedCustomer.length === 0) || (createNew && customerForm.invalid)\"\r\n class=\"btn btn-primary\"\r\n >\r\n {{ 'common.okay' | translate }}\r\n </button>\r\n</ng-template>\r\n", styles: [".item-row{display:flex;align-items:center}clr-tabs{display:block}\n"] }]
|
|
344
344
|
}], ctorParameters: () => [{ type: i1.DataService }, { type: i2.UntypedFormBuilder }] });
|
|
@@ -360,10 +360,10 @@ class SelectShippingMethodDialogComponent {
|
|
|
360
360
|
this.resolveWith(this.selectedMethod.id);
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
364
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.
|
|
363
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SelectShippingMethodDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
364
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SelectShippingMethodDialogComponent, selector: "vdr-select-shipping-method-dialog", ngImport: i0, template: "<ng-template vdrDialogTitle>{{ 'order.select-shipping-method' | translate }}</ng-template>\r\n<vdr-radio-card-fieldset\r\n [idFn]=\"methodIdFn\"\r\n [selectedItemId]=\"selectedMethod?.id\"\r\n (selectItem)=\"selectedMethod = $event\"\r\n>\r\n <vdr-radio-card *ngFor=\"let quote of eligibleShippingMethods\" [item]=\"quote\">\r\n <div class=\"result-details\">\r\n <vdr-labeled-data [label]=\"'settings.shipping-method' | translate\">\r\n {{ quote.name }}\r\n </vdr-labeled-data>\r\n <div class=\"price-row\">\r\n <vdr-labeled-data [label]=\"'common.price' | translate\">\r\n {{ quote.price | localeCurrency: currencyCode }}\r\n </vdr-labeled-data>\r\n <vdr-labeled-data [label]=\"'common.price-with-tax' | translate\">\r\n {{ quote.priceWithTax | localeCurrency: currencyCode }}\r\n </vdr-labeled-data>\r\n </div>\r\n <vdr-object-tree *ngIf=\"quote.metadata\" [value]=\"quote.metadata\"></vdr-object-tree>\r\n </div>\r\n </vdr-radio-card>\r\n</vdr-radio-card-fieldset>\r\n\r\n<ng-template vdrDialogButtons>\r\n <button type=\"button\" class=\"btn\" (click)=\"cancel()\">{{ 'common.cancel' | translate }}</button>\r\n <button\r\n type=\"submit\"\r\n (click)=\"select()\"\r\n [disabled]=\"!selectedMethod\"\r\n class=\"btn btn-primary\"\r\n >\r\n {{ 'common.okay' | translate }}\r\n </button>\r\n</ng-template>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.DialogButtonsDirective, selector: "[vdrDialogButtons]" }, { kind: "directive", type: i1.DialogTitleDirective, selector: "[vdrDialogTitle]" }, { kind: "component", type: i1.LabeledDataComponent, selector: "vdr-labeled-data", inputs: ["label"] }, { kind: "component", type: i1.ObjectTreeComponent, selector: "vdr-object-tree", inputs: ["value", "isArrayItem"] }, { kind: "component", type: i1.RadioCardComponent, selector: "vdr-radio-card", inputs: ["item"], exportAs: ["VdrRadioCard"] }, { kind: "component", type: i1.RadioCardFieldsetComponent, selector: "vdr-radio-card-fieldset", inputs: ["selectedItemId", "idFn"], outputs: ["selectItem"] }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.LocaleCurrencyPipe, name: "localeCurrency" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
365
365
|
}
|
|
366
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
366
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SelectShippingMethodDialogComponent, decorators: [{
|
|
367
367
|
type: Component,
|
|
368
368
|
args: [{ selector: 'vdr-select-shipping-method-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template vdrDialogTitle>{{ 'order.select-shipping-method' | translate }}</ng-template>\r\n<vdr-radio-card-fieldset\r\n [idFn]=\"methodIdFn\"\r\n [selectedItemId]=\"selectedMethod?.id\"\r\n (selectItem)=\"selectedMethod = $event\"\r\n>\r\n <vdr-radio-card *ngFor=\"let quote of eligibleShippingMethods\" [item]=\"quote\">\r\n <div class=\"result-details\">\r\n <vdr-labeled-data [label]=\"'settings.shipping-method' | translate\">\r\n {{ quote.name }}\r\n </vdr-labeled-data>\r\n <div class=\"price-row\">\r\n <vdr-labeled-data [label]=\"'common.price' | translate\">\r\n {{ quote.price | localeCurrency: currencyCode }}\r\n </vdr-labeled-data>\r\n <vdr-labeled-data [label]=\"'common.price-with-tax' | translate\">\r\n {{ quote.priceWithTax | localeCurrency: currencyCode }}\r\n </vdr-labeled-data>\r\n </div>\r\n <vdr-object-tree *ngIf=\"quote.metadata\" [value]=\"quote.metadata\"></vdr-object-tree>\r\n </div>\r\n </vdr-radio-card>\r\n</vdr-radio-card-fieldset>\r\n\r\n<ng-template vdrDialogButtons>\r\n <button type=\"button\" class=\"btn\" (click)=\"cancel()\">{{ 'common.cancel' | translate }}</button>\r\n <button\r\n type=\"submit\"\r\n (click)=\"select()\"\r\n [disabled]=\"!selectedMethod\"\r\n class=\"btn btn-primary\"\r\n >\r\n {{ 'common.okay' | translate }}\r\n </button>\r\n</ng-template>\r\n" }]
|
|
369
369
|
}] });
|
|
@@ -382,10 +382,10 @@ class OrderStateSelectDialogComponent {
|
|
|
382
382
|
cancel() {
|
|
383
383
|
this.resolveWith();
|
|
384
384
|
}
|
|
385
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
386
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.
|
|
385
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: OrderStateSelectDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
386
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: OrderStateSelectDialogComponent, selector: "vdr-order-state-select-dialog", ngImport: i0, template: "<ng-template vdrDialogTitle>{{ 'order.select-state' | translate }}</ng-template>\r\n<p>{{ message | translate }}</p>\r\n<vdr-form-field>\r\n <select name=\"state\" [(ngModel)]=\"selectedState\">\r\n <option *ngFor=\"let state of nextStates\" [value]=\"state\">\r\n {{ state | stateI18nToken | translate }}\r\n </option>\r\n </select>\r\n</vdr-form-field>\r\n<ng-template vdrDialogButtons>\r\n <button type=\"submit\" *ngIf=\"cancellable\" (click)=\"cancel()\" class=\"btn btn-secondary\">\r\n {{ 'common.cancel' | translate }}\r\n </button>\r\n <button type=\"submit\" (click)=\"select()\" class=\"btn btn-primary\" [disabled]=\"!selectedState\">\r\n {{ 'order.transition-to-state' | translate: { state: (selectedState | stateI18nToken | translate) } }}\r\n </button>\r\n</ng-template>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i1.FormFieldComponent, selector: "vdr-form-field", inputs: ["label", "for", "tooltip", "errors", "readOnlyToggle"], outputs: ["readOnlyToggleChange"] }, { kind: "directive", type: i1.FormFieldControlDirective, selector: "input, textarea, select, vdr-currency-input" }, { kind: "directive", type: i1.DialogButtonsDirective, selector: "[vdrDialogButtons]" }, { kind: "directive", type: i1.DialogTitleDirective, selector: "[vdrDialogTitle]" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.StateI18nTokenPipe, name: "stateI18nToken" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
387
387
|
}
|
|
388
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
388
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: OrderStateSelectDialogComponent, decorators: [{
|
|
389
389
|
type: Component,
|
|
390
390
|
args: [{ selector: 'vdr-order-state-select-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template vdrDialogTitle>{{ 'order.select-state' | translate }}</ng-template>\r\n<p>{{ message | translate }}</p>\r\n<vdr-form-field>\r\n <select name=\"state\" [(ngModel)]=\"selectedState\">\r\n <option *ngFor=\"let state of nextStates\" [value]=\"state\">\r\n {{ state | stateI18nToken | translate }}\r\n </option>\r\n </select>\r\n</vdr-form-field>\r\n<ng-template vdrDialogButtons>\r\n <button type=\"submit\" *ngIf=\"cancellable\" (click)=\"cancel()\" class=\"btn btn-secondary\">\r\n {{ 'common.cancel' | translate }}\r\n </button>\r\n <button type=\"submit\" (click)=\"select()\" class=\"btn btn-primary\" [disabled]=\"!selectedState\">\r\n {{ 'order.transition-to-state' | translate: { state: (selectedState | stateI18nToken | translate) } }}\r\n </button>\r\n</ng-template>\r\n" }]
|
|
391
391
|
}] });
|
|
@@ -484,10 +484,10 @@ class OrderTransitionService {
|
|
|
484
484
|
}
|
|
485
485
|
}));
|
|
486
486
|
}
|
|
487
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
488
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.
|
|
487
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: OrderTransitionService, deps: [{ token: i1.DataService }, { token: i1.ModalService }, { token: i1.NotificationService }, { token: i1.I18nService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
488
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: OrderTransitionService, providedIn: 'root' }); }
|
|
489
489
|
}
|
|
490
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
490
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: OrderTransitionService, decorators: [{
|
|
491
491
|
type: Injectable,
|
|
492
492
|
args: [{
|
|
493
493
|
providedIn: 'root',
|
|
@@ -536,10 +536,10 @@ class OrderCustomFieldsCardComponent {
|
|
|
536
536
|
this.editable = false;
|
|
537
537
|
}
|
|
538
538
|
}
|
|
539
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
540
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.
|
|
539
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: OrderCustomFieldsCardComponent, deps: [{ token: i2.UntypedFormBuilder }, { token: i1.ModalService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
540
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: OrderCustomFieldsCardComponent, selector: "vdr-order-custom-fields-card", inputs: { customFieldsConfig: "customFieldsConfig", customFieldValues: "customFieldValues" }, outputs: { updateClick: "updateClick" }, ngImport: i0, template: "<div class=\"card\" *ngIf=\"customFieldsConfig.length\">\r\n <div class=\"card-header\">\r\n {{ 'common.custom-fields' | translate }}\r\n </div>\r\n <div class=\"card-block\">\r\n <div class=\"card-text custom-field-form\" [class.editable]=\"editable\">\r\n <vdr-tabbed-custom-fields\r\n entityName=\"Order\"\r\n [customFields]=\"customFieldsConfig\"\r\n [customFieldsFormGroup]=\"customFieldForm\"\r\n [readonly]=\"!editable\"\r\n [compact]=\"true\"\r\n ></vdr-tabbed-custom-fields>\r\n </div>\r\n </div>\r\n <div class=\"card-footer\">\r\n <button class=\"btn btn-sm btn-secondary\" (click)=\"editable = true\" *ngIf=\"!editable\">\r\n <clr-icon shape=\"pencil\"></clr-icon>\r\n {{ 'common.edit' | translate }}\r\n </button>\r\n <button\r\n class=\"btn btn-sm btn-primary\"\r\n (click)=\"onUpdateClick()\"\r\n *ngIf=\"editable\"\r\n [disabled]=\"customFieldForm.pristine || customFieldForm.invalid\"\r\n >\r\n <clr-icon shape=\"check\"></clr-icon>\r\n {{ 'common.update' | translate }}\r\n </button>\r\n <button\r\n class=\"btn btn-sm btn-secondary\"\r\n (click)=\"onCancelClick()\"\r\n *ngIf=\"editable\"\r\n >\r\n <clr-icon shape=\"times\"></clr-icon>\r\n {{ 'common.cancel' | translate }}\r\n </button>\r\n </div>\r\n</div>\r\n", styles: ["vdr-custom-field-control{margin-bottom:6px;display:block}.custom-field-form ::ng-deep .clr-control-label{color:var(--color-grey-400)}.custom-field-form.editable ::ng-deep .clr-control-label{color:inherit}\n"], dependencies: [{ kind: "directive", type: i3.ClrIconCustomTag, selector: "clr-icon" }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1.TabbedCustomFieldsComponent, selector: "vdr-tabbed-custom-fields", inputs: ["entityName", "customFields", "customFieldsFormGroup", "readonly", "compact", "showLabel"] }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
541
541
|
}
|
|
542
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
542
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: OrderCustomFieldsCardComponent, decorators: [{
|
|
543
543
|
type: Component,
|
|
544
544
|
args: [{ selector: 'vdr-order-custom-fields-card', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"card\" *ngIf=\"customFieldsConfig.length\">\r\n <div class=\"card-header\">\r\n {{ 'common.custom-fields' | translate }}\r\n </div>\r\n <div class=\"card-block\">\r\n <div class=\"card-text custom-field-form\" [class.editable]=\"editable\">\r\n <vdr-tabbed-custom-fields\r\n entityName=\"Order\"\r\n [customFields]=\"customFieldsConfig\"\r\n [customFieldsFormGroup]=\"customFieldForm\"\r\n [readonly]=\"!editable\"\r\n [compact]=\"true\"\r\n ></vdr-tabbed-custom-fields>\r\n </div>\r\n </div>\r\n <div class=\"card-footer\">\r\n <button class=\"btn btn-sm btn-secondary\" (click)=\"editable = true\" *ngIf=\"!editable\">\r\n <clr-icon shape=\"pencil\"></clr-icon>\r\n {{ 'common.edit' | translate }}\r\n </button>\r\n <button\r\n class=\"btn btn-sm btn-primary\"\r\n (click)=\"onUpdateClick()\"\r\n *ngIf=\"editable\"\r\n [disabled]=\"customFieldForm.pristine || customFieldForm.invalid\"\r\n >\r\n <clr-icon shape=\"check\"></clr-icon>\r\n {{ 'common.update' | translate }}\r\n </button>\r\n <button\r\n class=\"btn btn-sm btn-secondary\"\r\n (click)=\"onCancelClick()\"\r\n *ngIf=\"editable\"\r\n >\r\n <clr-icon shape=\"times\"></clr-icon>\r\n {{ 'common.cancel' | translate }}\r\n </button>\r\n </div>\r\n</div>\r\n", styles: ["vdr-custom-field-control{margin-bottom:6px;display:block}.custom-field-form ::ng-deep .clr-control-label{color:var(--color-grey-400)}.custom-field-form.editable ::ng-deep .clr-control-label{color:inherit}\n"] }]
|
|
545
545
|
}], ctorParameters: () => [{ type: i2.UntypedFormBuilder }, { type: i1.ModalService }], propDecorators: { customFieldsConfig: [{
|
|
@@ -591,10 +591,10 @@ class LineFulfillmentComponent {
|
|
|
591
591
|
})
|
|
592
592
|
.filter(notNullOrUndefined) ?? []);
|
|
593
593
|
}
|
|
594
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
595
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.
|
|
594
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LineFulfillmentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
595
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: LineFulfillmentComponent, selector: "vdr-line-fulfillment", inputs: { line: "line", allOrderFulfillments: "allOrderFulfillments", orderState: "orderState" }, usesOnChanges: true, ngImport: i0, template: "<vdr-dropdown class=\"search-settings-menu\" *ngIf=\"fulfilledCount || orderState === 'PartiallyDelivered'\">\r\n <button type=\"button\" class=\"icon-button\" vdrDropdownTrigger>\r\n <clr-icon *ngIf=\"fulfillmentStatus === 'full'\" class=\"item-fulfilled\" shape=\"check-circle\"></clr-icon>\r\n <clr-icon\r\n *ngIf=\"fulfillmentStatus === 'partial'\"\r\n class=\"item-partially-fulfilled\"\r\n shape=\"check-circle\"\r\n ></clr-icon>\r\n <clr-icon\r\n *ngIf=\"fulfillmentStatus === 'none'\"\r\n class=\"item-not-fulfilled\"\r\n shape=\"exclamation-circle\"\r\n ></clr-icon>\r\n </button>\r\n <vdr-dropdown-menu vdrPosition=\"bottom-right\">\r\n <label class=\"dropdown-header\" *ngIf=\"fulfillmentStatus === 'full'\">\r\n {{ 'order.line-fulfillment-all' | translate }}\r\n </label>\r\n <label class=\"dropdown-header\" *ngIf=\"fulfillmentStatus === 'partial'\">\r\n {{\r\n 'order.line-fulfillment-partial' | translate: { total: line.quantity, count: fulfilledCount }\r\n }}\r\n </label>\r\n <label class=\"dropdown-header\" *ngIf=\"fulfillmentStatus === 'none'\">\r\n {{ 'order.line-fulfillment-none' | translate }}\r\n </label>\r\n <div class=\"fulfillment-detail\" *ngFor=\"let item of fulfillments\">\r\n <div class=\"fulfillment-title\">\r\n {{ 'order.fulfillment' | translate }} #{{ item.fulfillment.id }} ({{\r\n 'order.item-count' | translate: { count: item.count }\r\n }})\r\n </div>\r\n <vdr-labeled-data [label]=\"'common.created-at' | translate\">\r\n {{ item.fulfillment.createdAt | localeDate: 'medium' }}\r\n </vdr-labeled-data>\r\n <vdr-labeled-data [label]=\"'order.fulfillment-method' | translate\">\r\n {{ item.fulfillment.method }}\r\n </vdr-labeled-data>\r\n <vdr-labeled-data\r\n *ngIf=\"item.fulfillment.trackingCode\"\r\n [label]=\"'order.tracking-code' | translate\"\r\n >\r\n {{ item.fulfillment.trackingCode }}\r\n </vdr-labeled-data>\r\n </div>\r\n </vdr-dropdown-menu>\r\n</vdr-dropdown>\r\n", styles: [".item-fulfilled{color:var(--color-success-700)}.item-partially-fulfilled{color:var(--color-warning-700)}.item-not-fulfilled{color:var(--color-error-700)}.fulfillment-detail{margin:6px 12px}.fulfillment-detail:not(:last-of-type){border-bottom:1px dashed var(--color-component-border-200)}\n"], dependencies: [{ kind: "directive", type: i3.ClrIconCustomTag, selector: "clr-icon" }, { kind: "directive", type: i3.ClrLabel, selector: "label", inputs: ["for"] }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1.DropdownComponent, selector: "vdr-dropdown", inputs: ["manualToggle"] }, { kind: "component", type: i1.DropdownMenuComponent, selector: "vdr-dropdown-menu", inputs: ["vdrPosition", "customClasses"] }, { kind: "directive", type: i1.DropdownTriggerDirective, selector: "[vdrDropdownTrigger]" }, { kind: "component", type: i1.LabeledDataComponent, selector: "vdr-labeled-data", inputs: ["label"] }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.LocaleDatePipe, name: "localeDate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
596
596
|
}
|
|
597
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
597
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LineFulfillmentComponent, decorators: [{
|
|
598
598
|
type: Component,
|
|
599
599
|
args: [{ selector: 'vdr-line-fulfillment', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vdr-dropdown class=\"search-settings-menu\" *ngIf=\"fulfilledCount || orderState === 'PartiallyDelivered'\">\r\n <button type=\"button\" class=\"icon-button\" vdrDropdownTrigger>\r\n <clr-icon *ngIf=\"fulfillmentStatus === 'full'\" class=\"item-fulfilled\" shape=\"check-circle\"></clr-icon>\r\n <clr-icon\r\n *ngIf=\"fulfillmentStatus === 'partial'\"\r\n class=\"item-partially-fulfilled\"\r\n shape=\"check-circle\"\r\n ></clr-icon>\r\n <clr-icon\r\n *ngIf=\"fulfillmentStatus === 'none'\"\r\n class=\"item-not-fulfilled\"\r\n shape=\"exclamation-circle\"\r\n ></clr-icon>\r\n </button>\r\n <vdr-dropdown-menu vdrPosition=\"bottom-right\">\r\n <label class=\"dropdown-header\" *ngIf=\"fulfillmentStatus === 'full'\">\r\n {{ 'order.line-fulfillment-all' | translate }}\r\n </label>\r\n <label class=\"dropdown-header\" *ngIf=\"fulfillmentStatus === 'partial'\">\r\n {{\r\n 'order.line-fulfillment-partial' | translate: { total: line.quantity, count: fulfilledCount }\r\n }}\r\n </label>\r\n <label class=\"dropdown-header\" *ngIf=\"fulfillmentStatus === 'none'\">\r\n {{ 'order.line-fulfillment-none' | translate }}\r\n </label>\r\n <div class=\"fulfillment-detail\" *ngFor=\"let item of fulfillments\">\r\n <div class=\"fulfillment-title\">\r\n {{ 'order.fulfillment' | translate }} #{{ item.fulfillment.id }} ({{\r\n 'order.item-count' | translate: { count: item.count }\r\n }})\r\n </div>\r\n <vdr-labeled-data [label]=\"'common.created-at' | translate\">\r\n {{ item.fulfillment.createdAt | localeDate: 'medium' }}\r\n </vdr-labeled-data>\r\n <vdr-labeled-data [label]=\"'order.fulfillment-method' | translate\">\r\n {{ item.fulfillment.method }}\r\n </vdr-labeled-data>\r\n <vdr-labeled-data\r\n *ngIf=\"item.fulfillment.trackingCode\"\r\n [label]=\"'order.tracking-code' | translate\"\r\n >\r\n {{ item.fulfillment.trackingCode }}\r\n </vdr-labeled-data>\r\n </div>\r\n </vdr-dropdown-menu>\r\n</vdr-dropdown>\r\n", styles: [".item-fulfilled{color:var(--color-success-700)}.item-partially-fulfilled{color:var(--color-warning-700)}.item-not-fulfilled{color:var(--color-error-700)}.fulfillment-detail{margin:6px 12px}.fulfillment-detail:not(:last-of-type){border-bottom:1px dashed var(--color-component-border-200)}\n"] }]
|
|
600
600
|
}], propDecorators: { line: [{
|
|
@@ -615,10 +615,10 @@ class LineRefundsComponent {
|
|
|
615
615
|
.filter(i => i.orderLineId === this.line.id)
|
|
616
616
|
.reduce((sum, i) => sum + i.quantity, 0);
|
|
617
617
|
}
|
|
618
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
619
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.
|
|
618
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LineRefundsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
619
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: LineRefundsComponent, selector: "vdr-line-refunds", inputs: { line: "line", payments: "payments" }, ngImport: i0, template: "<span *ngIf=\"getRefundedCount()\" [title]=\"'order.refunded-count' | translate: { count: getRefundedCount() }\">\r\n <clr-icon shape=\"redo\" class=\"is-solid\" dir=\"down\"></clr-icon>\r\n</span>\r\n", styles: [":host{color:var(--color-error-500)}\n"], dependencies: [{ kind: "directive", type: i3.ClrIconCustomTag, selector: "clr-icon" }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.Dir, selector: "[dir]", inputs: ["dir"], outputs: ["dirChange"], exportAs: ["dir"] }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
620
620
|
}
|
|
621
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
621
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LineRefundsComponent, decorators: [{
|
|
622
622
|
type: Component,
|
|
623
623
|
args: [{ selector: 'vdr-line-refunds', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span *ngIf=\"getRefundedCount()\" [title]=\"'order.refunded-count' | translate: { count: getRefundedCount() }\">\r\n <clr-icon shape=\"redo\" class=\"is-solid\" dir=\"down\"></clr-icon>\r\n</span>\r\n", styles: [":host{color:var(--color-error-500)}\n"] }]
|
|
624
624
|
}], propDecorators: { line: [{
|
|
@@ -632,10 +632,10 @@ class OrderTotalColumnComponent extends DataTable2ColumnComponent {
|
|
|
632
632
|
super(...arguments);
|
|
633
633
|
this.orderable = false;
|
|
634
634
|
}
|
|
635
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
636
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.
|
|
635
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: OrderTotalColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
636
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: OrderTotalColumnComponent, selector: "vdr-order-total-column", exportAs: ["row"], usesInheritance: true, ngImport: i0, template: ``, isInline: true }); }
|
|
637
637
|
}
|
|
638
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
638
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: OrderTotalColumnComponent, decorators: [{
|
|
639
639
|
type: Component,
|
|
640
640
|
args: [{
|
|
641
641
|
selector: 'vdr-order-total-column',
|
|
@@ -648,19 +648,6 @@ class OrderDataTableComponent extends DataTable2Component {
|
|
|
648
648
|
get allColumns() {
|
|
649
649
|
return [...(this.columns ?? []), ...(this.customFieldColumns ?? []), ...(this.totalColumns ?? [])];
|
|
650
650
|
}
|
|
651
|
-
get sortedColumns() {
|
|
652
|
-
const columns = this.allColumns;
|
|
653
|
-
const dataTableConfig = this.getDataTableConfig();
|
|
654
|
-
for (const [id, index] of Object.entries(dataTableConfig[this.id].order)) {
|
|
655
|
-
const column = columns.find(c => c.id === id);
|
|
656
|
-
const currentIndex = columns.findIndex(c => c.id === id);
|
|
657
|
-
if (currentIndex !== -1 && column) {
|
|
658
|
-
columns.splice(currentIndex, 1);
|
|
659
|
-
columns.splice(index, 0, column);
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
return columns;
|
|
663
|
-
}
|
|
664
651
|
getPromotionLink(promotion) {
|
|
665
652
|
const id = promotion.adjustmentSource.split(':')[1];
|
|
666
653
|
return ['/marketing', 'promotions', id];
|
|
@@ -680,10 +667,10 @@ class OrderDataTableComponent extends DataTable2Component {
|
|
|
680
667
|
return '';
|
|
681
668
|
}
|
|
682
669
|
}
|
|
683
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
684
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.4", type: OrderDataTableComponent, selector: "vdr-order-data-table", inputs: { order: "order" }, queries: [{ propertyName: "totalColumns", predicate: OrderTotalColumnComponent }], usesInheritance: true, ngImport: i0, template: "<div class=\"bulk-actions\">\r\n <ng-content select=\"vdr-bulk-action-menu\"></ng-content>\r\n</div>\r\n<div class=\"table-wrapper\">\r\n <table\r\n class=\"\"\r\n [class.no-select]=\"disableSelect\"\r\n >\r\n <thead [class.items-selected]=\"selectionManager?.selection.length\">\r\n <tr class=\"heading-row\">\r\n <th *ngIf=\"selectionManager\" class=\"selection-col\">\r\n <input\r\n type=\"checkbox\"\r\n clrCheckbox\r\n [checked]=\"selectionManager?.areAllCurrentItemsSelected()\"\r\n (change)=\"onToggleAllClick()\"\r\n />\r\n </th>\r\n <th\r\n *ngFor=\"let column of visibleSortedColumns; last as isLast\"\r\n [class.expand]=\"column.expand\"\r\n >\r\n <div class=\"cell-content\" [ngClass]=\"column.align\">\r\n <vdr-ui-extension-point\r\n [locationId]=\"id\"\r\n [metadata]=\"column.id\"\r\n api=\"dataTable\"\r\n [topPx]=\"-6\"\r\n [leftPx]=\"-24\"\r\n display=\"block\"\r\n >\r\n <span>{{ column.heading }}</span>\r\n </vdr-ui-extension-point>\r\n <div *ngIf=\"column.sort as sort\" class=\"sort-toggle\">\r\n <button (click)=\"sort.toggleSortOrder()\" [class.active]=\"sort.sortOrder\">\r\n <clr-icon *ngIf=\"!sort.sortOrder\" shape=\"two-way-arrows left\"></clr-icon>\r\n <clr-icon *ngIf=\"sort.sortOrder === 'ASC'\" shape=\"arrow up\"></clr-icon>\r\n <clr-icon *ngIf=\"sort.sortOrder === 'DESC'\" shape=\"arrow down\"></clr-icon>\r\n </button>\r\n <div class=\"sort-label\" *ngIf=\"sort.sortOrder\">{{ sort.sortOrder }}</div>\r\n </div>\r\n </div>\r\n </th>\r\n <th>\r\n <div class=\"column-picker\">\r\n <vdr-data-table-colum-picker\r\n [uiLanguage]=\"uiLanguage$ | async\"\r\n [columns]=\"sortedColumns\"\r\n (reorder)=\"onColumnReorder($event)\"\r\n (resetColumns)=\"onColumnsReset()\"\r\n ></vdr-data-table-colum-picker>\r\n </div>\r\n </th>\r\n </tr>\r\n <tr *ngIf=\"searchComponent || customSearchTemplate || filters?.length\">\r\n <th\r\n [attr.colspan]=\"visibleSortedColumns.length + (selectionManager ? 2 : 1)\"\r\n class=\"filter-row\"\r\n [class.active]=\"showSearchFilterRow\"\r\n >\r\n <button\r\n class=\"button-ghost toggle-search-filter-row\"\r\n [class.active]=\"showSearchFilterRow\"\r\n (click)=\"toggleSearchFilterRow()\"\r\n [title]=\"'common.search-and-filter-list' | translate\"\r\n >\r\n <clr-icon shape=\"search\"></clr-icon>\r\n </button>\r\n <div class=\"filter-row-wrapper\" [class.hidden]=\"!showSearchFilterRow\">\r\n <ng-container *ngTemplateOutlet=\"searchComponent?.template\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"customSearchTemplate\"></ng-container>\r\n <ng-container *ngIf=\"filters\">\r\n <div class=\"filters\">\r\n <vdr-data-table-filters\r\n *ngFor=\"let activeFilter of filters.activeFilters\"\r\n [filterWithValue]=\"activeFilter\"\r\n [filters]=\"filters\"\r\n class=\"mt-1\"\r\n ></vdr-data-table-filters>\r\n <vdr-data-table-filters\r\n *ngIf=\"filters.length\"\r\n [filters]=\"filters\"\r\n class=\"mt-1\"\r\n ></vdr-data-table-filters>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr\r\n *ngFor=\"\r\n let item of items\r\n | paginate\r\n : {\r\n id: id,\r\n itemsPerPage: itemsPerPage,\r\n currentPage: currentPage,\r\n totalItems: totalItems\r\n };\r\n index as i;\r\n trackBy: trackByFn\r\n \"\r\n >\r\n <td *ngIf=\"selectionManager\" class=\"selection-col\" [class.active]=\"activeIndex === i\">\r\n <input\r\n type=\"checkbox\"\r\n clrCheckbox\r\n [checked]=\"selectionManager?.isSelected(item)\"\r\n (click)=\"onRowClick(item, $event)\"\r\n />\r\n </td>\r\n <td *ngFor=\"let column of visibleSortedColumns\" [class.active]=\"activeIndex === i\">\r\n <div class=\"cell-content\" [ngClass]=\"column.align\">\r\n <ng-container\r\n *ngIf=\"customComponents.get(column.id) as componentConfig; else defaultComponent\"\r\n >\r\n <ng-container\r\n *ngComponentOutlet=\"\r\n componentConfig.config.component;\r\n inputs: { rowItem: item };\r\n injector: componentConfig.injector\r\n \"\r\n ></ng-container>\r\n </ng-container>\r\n <ng-template #defaultComponent>\r\n <ng-container\r\n *ngTemplateOutlet=\"column.template; context: { item: item, index: i }\"\r\n ></ng-container>\r\n </ng-template>\r\n </div>\r\n </td>\r\n <td [class.active]=\"activeIndex === i\"><!-- column select --></td>\r\n </tr>\r\n <ng-container>\r\n <tr *ngIf=\"!items?.length\">\r\n <td [attr.colspan]=\"visibleSortedColumns.length + (selectionManager ? 2 : 1)\">\r\n <vdr-empty-placeholder [emptyStateLabel]=\"'order.order-is-empty' | translate\"></vdr-empty-placeholder>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n <tr class=\"surcharge\" *ngFor=\"let surcharge of order.surcharges\">\r\n <td class=\"align-middle name left\" colspan=\"2\">{{ surcharge.description }}</td>\r\n <td class=\"align-middle sku\">{{ surcharge.sku }}</td>\r\n <td class=\"align-middle\" [attr.colspan]=\"visibleSortedColumns.length - 4\"></td>\r\n <td class=\"align-middle total\">\r\n {{ surcharge.priceWithTax | localeCurrency : order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ surcharge.price | localeCurrency : order.currencyCode }}\r\n </div>\r\n </td>\r\n <td><!-- column select --></td>\r\n </tr>\r\n <ng-container *ngFor=\"let discount of order.discounts\">\r\n <tr class=\"order-adjustment\" *ngIf=\"discount.type !== 'OTHER'\">\r\n <td [attr.colspan]=\"visibleSortedColumns.length - 1\" class=\"\">\r\n <a [routerLink]=\"getPromotionLink(discount)\">{{ discount.description }}</a>\r\n <vdr-chip *ngIf=\"getCouponCodeForAdjustment(order, discount) as couponCode\">{{\r\n couponCode\r\n }}</vdr-chip>\r\n </td>\r\n <td class=\"\">\r\n {{ discount.amountWithTax | localeCurrency : order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ discount.amount | localeCurrency : order.currencyCode }}\r\n </div>\r\n </td>\r\n <td><!-- column select --></td>\r\n </tr>\r\n </ng-container>\r\n <tr class=\"sub-total\">\r\n <td class=\"\">{{ 'order.sub-total' | translate }}</td>\r\n <td [attr.colspan]=\"visibleSortedColumns.length - 2\"></td>\r\n <td class=\"clr-align-middle\">\r\n {{ order.subTotalWithTax | localeCurrency : order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ order.subTotal | localeCurrency : order.currencyCode }}\r\n </div>\r\n </td>\r\n <td><!-- column select --></td>\r\n </tr>\r\n <tr class=\"shipping\">\r\n <td class=\"\">{{ 'order.shipping' | translate }}</td>\r\n <td [attr.colspan]=\"visibleSortedColumns.length - 2\">\r\n <vdr-chip *ngFor=\"let shippingLine of order.shippingLines\" class=\"shipping-method-name\">\r\n {{ shippingLine.shippingMethod.name }}\r\n </vdr-chip>\r\n </td>\r\n <td class=\"clr-align-middle\">\r\n {{ order.shippingWithTax | localeCurrency : order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ order.shipping | localeCurrency : order.currencyCode }}\r\n </div>\r\n </td>\r\n <td><!-- column select --></td>\r\n </tr>\r\n <tr class=\"total\">\r\n <td class=\"\">{{ 'order.total' | translate }}</td>\r\n <td [attr.colspan]=\"visibleSortedColumns.length - 2\"></td>\r\n <td class=\"clr-align-middle\">\r\n {{ order.totalWithTax | localeCurrency : order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ order.total | localeCurrency : order.currencyCode }}\r\n </div>\r\n </td>\r\n <td><!-- column select --></td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n</div>\r\n", styles: [":host{display:block;max-width:100%;position:relative;margin-bottom:calc(var(--space-unit) * 4);container-type:inline-size}th{border-bottom:1px solid var(--color-table-header-border);color:var(--color-weight-700);font-size:var(--font-size-xs);font-weight:600;text-transform:uppercase;position:relative;white-space:nowrap;background-color:transparent}th,td{padding:calc(var(--space-unit) * 1.5) calc(var(--space-unit) * 1);color:var(--color-text-100)}tr td:first-of-type,tr th:first-of-type{text-align:center}@media screen and (min-width: 992px){tr td:first-of-type,tr th:first-of-type{padding-inline-start:var(--surface-margin-left);text-align:start}}th:last-of-type,td:last-of-type{border-inline-end:1px solid var(--color-table-header-border)}tr:first-of-type th:last-of-type{border-image:linear-gradient(0deg,var(--color-table-header-border),transparent) 1}tr:last-of-type td:last-of-type{border-image:linear-gradient(180deg,var(--color-table-header-border),transparent) 1}tbody td{border-bottom:1px solid var(--color-table-row-separator)}tbody tr:hover{background-color:var(--color-table-row-hover-bg)}.bulk-actions{margin-inline-start:calc(var(--space-unit) * 5);background-color:var(--color-surface-bg);z-index:10;display:flex;position:absolute;top:5px;height:40px}@media screen and (min-width: 992px){.bulk-actions{margin-inline-start:calc(var(--space-unit) * 8.5)}}@media screen and (min-width: 1280px){.bulk-actions{margin-inline-start:calc(var(--space-unit) * 10.5)}}.table-wrapper{display:block;overflow-y:hidden;overflow-x:auto;position:relative;width:100%;max-width:var(--surface-width)}table{width:100%}table.no-select{-webkit-user-select:none;user-select:none}.column-picker{width:24px}.sort-toggle{display:flex;align-items:center;margin-inline-start:calc(var(--space-unit) * .5)}.sort-toggle button{border:0;border-radius:var(--border-radius-lg);color:var(--color-weight-500);padding:0 2px;cursor:pointer;background-color:transparent}.sort-toggle button.active{color:var(--color-primary-700)}.sort-toggle .sort-label{margin-inline-start:calc(var(--space-unit) * .5);font-size:10px;color:var(--color-primary-600);font-weight:400}.toggle-search-filter-row{position:absolute;top:-12px;left:4px}@media screen and (min-width: 1280px){.toggle-search-filter-row{left:8px}}.toggle-search-filter-row.active{background-color:var(--color-primary-700);color:var(--color-primary-100);border-color:var(--color-primary-700)}th.filter-row{position:relative;font-size:var(--font-size-base);font-weight:400;background-color:var(--color-weight-100);box-shadow:var(--data-table-filter-box-shadow);border-left-width:0;border-right-width:0;text-align:initial;padding:0}th.filter-row input{width:100%}th.filter-row.active{border-bottom:1px solid var(--color-table-header-border)}th.filter-row .filters{margin-top:calc(var(--space-unit) * 1);display:flex;flex-wrap:wrap;gap:calc(var(--space-unit) * .5)}.filter-row-wrapper{padding:calc(var(--space-unit) * 4);padding-inline-start:0;max-height:150px;transition:max-height .2s,padding .2s,opacity .2s}.filter-row-wrapper.hidden{max-height:0px;padding-top:0;padding-bottom:0;overflow:hidden;opacity:0}.cell-link{display:block;width:100%;height:100%}td.active{background-color:var(--color-table-row-active-bg)}.cell-content{display:flex;align-items:center;line-height:var(--font-size-sm);color:var(--color-weight-700)}.cell-content.left{justify-content:flex-start}.cell-content.center{justify-content:center}.cell-content.right{justify-content:flex-end}.selection-col{width:calc(var(--space-unit) * 8)}vdr-empty-placeholder{width:100%}.table-footer{display:flex;align-items:baseline;justify-content:space-between;margin-top:var(--space-unit);margin-inline-start:var(--surface-margin-left);margin-inline-end:var(--space-unit)}.total-items-count{font-size:var(--font-size-xs)}@container (max-width: 500px){.total-items-count{display:none}}\n", ":host .is-cancelled td{text-decoration:line-through;background-color:var(--color-component-bg-200)}:host .sub-total td{border-top:1px dashed var(--color-component-border-200)}:host .total td{font-weight:700;border-top:1px dashed var(--color-component-border-200)}:host td.custom-fields-row{border-top-style:dashed;border-top-color:var(--color-grey-200)}:host img{border-radius:var(--border-radius-img)}:host .order-line-custom-fields{display:flex;flex-wrap:wrap}:host .order-line-custom-fields .custom-field{text-align:start;max-width:200px;overflow:hidden;text-overflow:ellipsis;margin-bottom:6px;margin-inline-end:18px}:host .draft-qty{max-width:48px}:host .order-line-custom-field{background-color:var(--color-component-bg-100)}:host .order-line-custom-field .custom-field-ellipsis{color:var(--color-text-300)}:host .net-price{font-size:11px;color:var(--color-text-300);line-height:14px}:host .promotions-label{text-decoration:underline dotted var(--color-text-200);font-size:11px;margin-top:6px;cursor:pointer;text-transform:lowercase}:host .thumb img{width:50px;height:50px}:host .shipping-method-name{font-size:var(--font-size-xs);margin-inline-end:2px}:host .order-placed-quantity{text-decoration:line-through;color:var(--color-text-300);margin-inline-end:2px}\n"], dependencies: [{ kind: "directive", type: i3.ClrIconCustomTag, selector: "clr-icon" }, { kind: "directive", type: i3.ClrCheckbox, selector: "[clrCheckbox],[clrToggle]" }, { kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i1.ChipComponent, selector: "vdr-chip", inputs: ["icon", "invert", "colorFrom", "colorType"], outputs: ["iconClick"] }, { kind: "directive", type: i1.FormFieldControlDirective, selector: "input, textarea, select, vdr-currency-input" }, { kind: "component", type: i1.EmptyPlaceholderComponent, selector: "vdr-empty-placeholder", inputs: ["emptyStateLabel"] }, { kind: "component", type: i1.UiExtensionPointComponent, selector: "vdr-ui-extension-point", inputs: ["locationId", "metadata", "topPx", "leftPx", "display", "api"] }, { kind: "component", type: i1.DataTableFiltersComponent, selector: "vdr-data-table-filters", inputs: ["filters", "filterWithValue"] }, { kind: "component", type: i1.DataTableColumnPickerComponent, selector: "vdr-data-table-colum-picker", inputs: ["columns", "uiLanguage"], outputs: ["reorder", "resetColumns"] }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5$1.PaginatePipe, name: "paginate" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.LocaleCurrencyPipe, name: "localeCurrency" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
670
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: OrderDataTableComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
671
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: OrderDataTableComponent, selector: "vdr-order-data-table", inputs: { order: "order" }, queries: [{ propertyName: "totalColumns", predicate: OrderTotalColumnComponent }], usesInheritance: true, ngImport: i0, template: "<div class=\"bulk-actions\">\r\n <ng-content select=\"vdr-bulk-action-menu\"></ng-content>\r\n</div>\r\n<div class=\"table-wrapper\">\r\n <table\r\n class=\"\"\r\n [class.no-select]=\"disableSelect\"\r\n >\r\n <thead [class.items-selected]=\"selectionManager?.selection.length\">\r\n <tr class=\"heading-row\">\r\n <th *ngIf=\"selectionManager\" class=\"selection-col\">\r\n <input\r\n type=\"checkbox\"\r\n clrCheckbox\r\n [checked]=\"selectionManager?.areAllCurrentItemsSelected()\"\r\n (change)=\"onToggleAllClick()\"\r\n />\r\n </th>\r\n <th\r\n *ngFor=\"let column of visibleSortedColumns; last as isLast\"\r\n [class.expand]=\"column.expand\"\r\n >\r\n <div class=\"cell-content\" [ngClass]=\"column.align\">\r\n <vdr-ui-extension-point\r\n [locationId]=\"id\"\r\n [metadata]=\"column.id\"\r\n api=\"dataTable\"\r\n [topPx]=\"-6\"\r\n [leftPx]=\"-24\"\r\n display=\"block\"\r\n >\r\n <span>{{ column.heading }}</span>\r\n </vdr-ui-extension-point>\r\n <div *ngIf=\"column.sort as sort\" class=\"sort-toggle\">\r\n <button (click)=\"sort.toggleSortOrder()\" [class.active]=\"sort.sortOrder\">\r\n <clr-icon *ngIf=\"!sort.sortOrder\" shape=\"two-way-arrows left\"></clr-icon>\r\n <clr-icon *ngIf=\"sort.sortOrder === 'ASC'\" shape=\"arrow up\"></clr-icon>\r\n <clr-icon *ngIf=\"sort.sortOrder === 'DESC'\" shape=\"arrow down\"></clr-icon>\r\n </button>\r\n <div class=\"sort-label\" *ngIf=\"sort.sortOrder\">{{ sort.sortOrder }}</div>\r\n </div>\r\n </div>\r\n </th>\r\n <th>\r\n <div class=\"column-picker\">\r\n <vdr-data-table-colum-picker\r\n [uiLanguage]=\"uiLanguage$ | async\"\r\n [columns]=\"sortedColumns\"\r\n (reorder)=\"onColumnReorder($event)\"\r\n (resetColumns)=\"onColumnsReset()\"\r\n ></vdr-data-table-colum-picker>\r\n </div>\r\n </th>\r\n </tr>\r\n <tr *ngIf=\"searchComponent || customSearchTemplate || filters?.length\">\r\n <th\r\n [attr.colspan]=\"visibleSortedColumns.length + (selectionManager ? 2 : 1)\"\r\n class=\"filter-row\"\r\n [class.active]=\"showSearchFilterRow\"\r\n >\r\n <button\r\n class=\"button-ghost toggle-search-filter-row\"\r\n [class.active]=\"showSearchFilterRow\"\r\n (click)=\"toggleSearchFilterRow()\"\r\n [title]=\"'common.search-and-filter-list' | translate\"\r\n >\r\n <clr-icon shape=\"search\"></clr-icon>\r\n </button>\r\n <div class=\"filter-row-wrapper\" [class.hidden]=\"!showSearchFilterRow\">\r\n <ng-container *ngTemplateOutlet=\"searchComponent?.template\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"customSearchTemplate\"></ng-container>\r\n <ng-container *ngIf=\"filters\">\r\n <div class=\"filters\">\r\n <vdr-data-table-filters\r\n *ngFor=\"let activeFilter of filters.activeFilters\"\r\n [filterWithValue]=\"activeFilter\"\r\n [filters]=\"filters\"\r\n class=\"mt-1\"\r\n ></vdr-data-table-filters>\r\n <vdr-data-table-filters\r\n *ngIf=\"filters.length\"\r\n [filters]=\"filters\"\r\n class=\"mt-1\"\r\n ></vdr-data-table-filters>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr\r\n *ngFor=\"\r\n let item of items\r\n | paginate\r\n : {\r\n id: id,\r\n itemsPerPage: itemsPerPage,\r\n currentPage: currentPage,\r\n totalItems: totalItems\r\n };\r\n index as i;\r\n trackBy: trackByFn\r\n \"\r\n >\r\n <td *ngIf=\"selectionManager\" class=\"selection-col\" [class.active]=\"activeIndex === i\">\r\n <input\r\n type=\"checkbox\"\r\n clrCheckbox\r\n [checked]=\"selectionManager?.isSelected(item)\"\r\n (click)=\"onRowClick(item, $event)\"\r\n />\r\n </td>\r\n <td *ngFor=\"let column of visibleSortedColumns\" [class.active]=\"activeIndex === i\">\r\n <div class=\"cell-content\" [ngClass]=\"column.align\">\r\n <ng-container\r\n *ngIf=\"customComponents.get(column.id) as componentConfig; else defaultComponent\"\r\n >\r\n <ng-container\r\n *ngComponentOutlet=\"\r\n componentConfig.config.component;\r\n inputs: { rowItem: item };\r\n injector: componentConfig.injector\r\n \"\r\n ></ng-container>\r\n </ng-container>\r\n <ng-template #defaultComponent>\r\n <ng-container\r\n *ngTemplateOutlet=\"column.template; context: { item: item, index: i }\"\r\n ></ng-container>\r\n </ng-template>\r\n </div>\r\n </td>\r\n <td [class.active]=\"activeIndex === i\"><!-- column select --></td>\r\n </tr>\r\n <ng-container>\r\n <tr *ngIf=\"!items?.length\">\r\n <td [attr.colspan]=\"visibleSortedColumns.length + (selectionManager ? 2 : 1)\">\r\n <vdr-empty-placeholder [emptyStateLabel]=\"'order.order-is-empty' | translate\"></vdr-empty-placeholder>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n <tr class=\"surcharge\" *ngFor=\"let surcharge of order.surcharges\">\r\n <td class=\"align-middle name left\" colspan=\"2\">{{ surcharge.description }}</td>\r\n <td class=\"align-middle sku\">{{ surcharge.sku }}</td>\r\n <td class=\"align-middle\" [attr.colspan]=\"visibleSortedColumns.length - 4\"></td>\r\n <td class=\"align-middle total\">\r\n {{ surcharge.priceWithTax | localeCurrency : order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ surcharge.price | localeCurrency : order.currencyCode }}\r\n </div>\r\n </td>\r\n <td><!-- column select --></td>\r\n </tr>\r\n <ng-container *ngFor=\"let discount of order.discounts\">\r\n <tr class=\"order-adjustment\" *ngIf=\"discount.type !== 'OTHER'\">\r\n <td [attr.colspan]=\"visibleSortedColumns.length - 1\" class=\"\">\r\n <a [routerLink]=\"getPromotionLink(discount)\">{{ discount.description }}</a>\r\n <vdr-chip *ngIf=\"getCouponCodeForAdjustment(order, discount) as couponCode\">{{\r\n couponCode\r\n }}</vdr-chip>\r\n </td>\r\n <td class=\"\">\r\n {{ discount.amountWithTax | localeCurrency : order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ discount.amount | localeCurrency : order.currencyCode }}\r\n </div>\r\n </td>\r\n <td><!-- column select --></td>\r\n </tr>\r\n </ng-container>\r\n <tr class=\"sub-total\">\r\n <td class=\"\">{{ 'order.sub-total' | translate }}</td>\r\n <td [attr.colspan]=\"visibleSortedColumns.length - 2\"></td>\r\n <td class=\"clr-align-middle\">\r\n {{ order.subTotalWithTax | localeCurrency : order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ order.subTotal | localeCurrency : order.currencyCode }}\r\n </div>\r\n </td>\r\n <td><!-- column select --></td>\r\n </tr>\r\n <tr class=\"shipping\">\r\n <td class=\"\">{{ 'order.shipping' | translate }}</td>\r\n <td [attr.colspan]=\"visibleSortedColumns.length - 2\">\r\n <vdr-chip *ngFor=\"let shippingLine of order.shippingLines\" class=\"shipping-method-name\">\r\n {{ shippingLine.shippingMethod.name }}\r\n </vdr-chip>\r\n </td>\r\n <td class=\"clr-align-middle\">\r\n {{ order.shippingWithTax | localeCurrency : order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ order.shipping | localeCurrency : order.currencyCode }}\r\n </div>\r\n </td>\r\n <td><!-- column select --></td>\r\n </tr>\r\n <tr class=\"total\">\r\n <td class=\"\">{{ 'order.total' | translate }}</td>\r\n <td [attr.colspan]=\"visibleSortedColumns.length - 2\"></td>\r\n <td class=\"clr-align-middle\">\r\n {{ order.totalWithTax | localeCurrency : order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ order.total | localeCurrency : order.currencyCode }}\r\n </div>\r\n </td>\r\n <td><!-- column select --></td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n</div>\r\n", styles: [":host{display:block;max-width:100%;position:relative;margin-bottom:calc(var(--space-unit) * 4);container-type:inline-size}th{border-bottom:1px solid var(--color-table-header-border);color:var(--color-weight-700);font-size:var(--font-size-xs);font-weight:600;text-transform:uppercase;position:relative;white-space:nowrap;background-color:transparent}th,td{padding:calc(var(--space-unit) * 1.5) calc(var(--space-unit) * 1);color:var(--color-text-100)}tr td:first-of-type,tr th:first-of-type{text-align:center}@media screen and (min-width: 992px){tr td:first-of-type,tr th:first-of-type{padding-inline-start:var(--surface-margin-left);text-align:start}}th:last-of-type,td:last-of-type{border-inline-end:1px solid var(--color-table-header-border)}tr:first-of-type th:last-of-type{border-image:linear-gradient(0deg,var(--color-table-header-border),transparent) 1}tr:last-of-type td:last-of-type{border-image:linear-gradient(180deg,var(--color-table-header-border),transparent) 1}tbody td{border-bottom:1px solid var(--color-table-row-separator)}tbody tr:hover{background-color:var(--color-table-row-hover-bg)}.bulk-actions{margin-inline-start:calc(var(--space-unit) * 5);background-color:var(--color-surface-bg);z-index:10;display:flex;position:absolute;top:5px;height:40px}@media screen and (min-width: 992px){.bulk-actions{margin-inline-start:calc(var(--space-unit) * 8.5)}}@media screen and (min-width: 1280px){.bulk-actions{margin-inline-start:calc(var(--space-unit) * 10.5)}}.table-wrapper{display:block;overflow-y:hidden;overflow-x:auto;position:relative;width:100%;max-width:var(--surface-width)}table{width:100%}table.no-select{-webkit-user-select:none;user-select:none}.column-picker{width:24px}.sort-toggle{display:flex;align-items:center;margin-inline-start:calc(var(--space-unit) * .5)}.sort-toggle button{border:0;border-radius:var(--border-radius-lg);color:var(--color-weight-500);padding:0 2px;cursor:pointer;background-color:transparent}.sort-toggle button.active{color:var(--color-primary-700)}.sort-toggle .sort-label{margin-inline-start:calc(var(--space-unit) * .5);font-size:10px;color:var(--color-primary-600);font-weight:400}.toggle-search-filter-row{position:absolute;top:-12px;left:4px}@media screen and (min-width: 1280px){.toggle-search-filter-row{left:8px}}.toggle-search-filter-row.active{background-color:var(--color-primary-700);color:var(--color-primary-100);border-color:var(--color-primary-700)}th.filter-row{position:relative;font-size:var(--font-size-base);font-weight:400;background-color:var(--color-weight-100);box-shadow:var(--data-table-filter-box-shadow);border-left-width:0;border-right-width:0;text-align:initial;padding:0}th.filter-row input{width:100%}th.filter-row.active{border-bottom:1px solid var(--color-table-header-border)}th.filter-row .filters{margin-top:calc(var(--space-unit) * 1);display:flex;flex-wrap:wrap;gap:calc(var(--space-unit) * .5)}.filter-row-wrapper{padding:calc(var(--space-unit) * 4);padding-inline-start:0;max-height:150px;transition:max-height .2s,padding .2s,opacity .2s}.filter-row-wrapper.hidden{max-height:0px;padding-top:0;padding-bottom:0;overflow:hidden;opacity:0}.cell-link{display:block;width:100%;height:100%}td.active{background-color:var(--color-table-row-active-bg)}.cell-content{display:flex;align-items:center;line-height:var(--font-size-sm);color:var(--color-weight-700)}.cell-content.left{justify-content:flex-start}.cell-content.center{justify-content:center}.cell-content.right{justify-content:flex-end}.selection-col{width:calc(var(--space-unit) * 8)}vdr-empty-placeholder{width:100%}.table-footer{display:flex;align-items:baseline;justify-content:space-between;margin-top:var(--space-unit);margin-inline-start:var(--surface-margin-left);margin-inline-end:var(--space-unit)}.total-items-count{font-size:var(--font-size-xs)}@container (max-width: 500px){.total-items-count{display:none}}\n", ":host .is-cancelled td{text-decoration:line-through;background-color:var(--color-component-bg-200)}:host .sub-total td{border-top:1px dashed var(--color-component-border-200)}:host .total td{font-weight:700;border-top:1px dashed var(--color-component-border-200)}:host td.custom-fields-row{border-top-style:dashed;border-top-color:var(--color-grey-200)}:host img{border-radius:var(--border-radius-img)}:host .order-line-custom-fields{display:flex;flex-wrap:wrap}:host .order-line-custom-fields .custom-field{text-align:start;max-width:200px;overflow:hidden;text-overflow:ellipsis;margin-bottom:6px;margin-inline-end:18px}:host .draft-qty{max-width:48px}:host .order-line-custom-field{background-color:var(--color-component-bg-100)}:host .order-line-custom-field .custom-field-ellipsis{color:var(--color-text-300)}:host .net-price{font-size:11px;color:var(--color-text-300);line-height:14px}:host .promotions-label{text-decoration:underline dotted var(--color-text-200);font-size:11px;margin-top:6px;cursor:pointer;text-transform:lowercase}:host .thumb img{width:50px;height:50px}:host .shipping-method-name{font-size:var(--font-size-xs);margin-inline-end:2px}:host .order-placed-quantity{text-decoration:line-through;color:var(--color-text-300);margin-inline-end:2px}\n"], dependencies: [{ kind: "directive", type: i3.ClrIconCustomTag, selector: "clr-icon" }, { kind: "directive", type: i3.ClrCheckbox, selector: "[clrCheckbox],[clrToggle]" }, { kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i1.ChipComponent, selector: "vdr-chip", inputs: ["icon", "invert", "colorFrom", "colorType"], outputs: ["iconClick"] }, { kind: "directive", type: i1.FormFieldControlDirective, selector: "input, textarea, select, vdr-currency-input" }, { kind: "component", type: i1.EmptyPlaceholderComponent, selector: "vdr-empty-placeholder", inputs: ["emptyStateLabel"] }, { kind: "component", type: i1.UiExtensionPointComponent, selector: "vdr-ui-extension-point", inputs: ["locationId", "metadata", "topPx", "leftPx", "display", "api"] }, { kind: "component", type: i1.DataTableFiltersComponent, selector: "vdr-data-table-filters", inputs: ["filters", "filterWithValue"] }, { kind: "component", type: i1.DataTableColumnPickerComponent, selector: "vdr-data-table-colum-picker", inputs: ["columns", "uiLanguage"], outputs: ["reorder", "resetColumns"] }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5$1.PaginatePipe, name: "paginate" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.LocaleCurrencyPipe, name: "localeCurrency" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
685
672
|
}
|
|
686
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
673
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: OrderDataTableComponent, decorators: [{
|
|
687
674
|
type: Component,
|
|
688
675
|
args: [{ selector: 'vdr-order-data-table', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"bulk-actions\">\r\n <ng-content select=\"vdr-bulk-action-menu\"></ng-content>\r\n</div>\r\n<div class=\"table-wrapper\">\r\n <table\r\n class=\"\"\r\n [class.no-select]=\"disableSelect\"\r\n >\r\n <thead [class.items-selected]=\"selectionManager?.selection.length\">\r\n <tr class=\"heading-row\">\r\n <th *ngIf=\"selectionManager\" class=\"selection-col\">\r\n <input\r\n type=\"checkbox\"\r\n clrCheckbox\r\n [checked]=\"selectionManager?.areAllCurrentItemsSelected()\"\r\n (change)=\"onToggleAllClick()\"\r\n />\r\n </th>\r\n <th\r\n *ngFor=\"let column of visibleSortedColumns; last as isLast\"\r\n [class.expand]=\"column.expand\"\r\n >\r\n <div class=\"cell-content\" [ngClass]=\"column.align\">\r\n <vdr-ui-extension-point\r\n [locationId]=\"id\"\r\n [metadata]=\"column.id\"\r\n api=\"dataTable\"\r\n [topPx]=\"-6\"\r\n [leftPx]=\"-24\"\r\n display=\"block\"\r\n >\r\n <span>{{ column.heading }}</span>\r\n </vdr-ui-extension-point>\r\n <div *ngIf=\"column.sort as sort\" class=\"sort-toggle\">\r\n <button (click)=\"sort.toggleSortOrder()\" [class.active]=\"sort.sortOrder\">\r\n <clr-icon *ngIf=\"!sort.sortOrder\" shape=\"two-way-arrows left\"></clr-icon>\r\n <clr-icon *ngIf=\"sort.sortOrder === 'ASC'\" shape=\"arrow up\"></clr-icon>\r\n <clr-icon *ngIf=\"sort.sortOrder === 'DESC'\" shape=\"arrow down\"></clr-icon>\r\n </button>\r\n <div class=\"sort-label\" *ngIf=\"sort.sortOrder\">{{ sort.sortOrder }}</div>\r\n </div>\r\n </div>\r\n </th>\r\n <th>\r\n <div class=\"column-picker\">\r\n <vdr-data-table-colum-picker\r\n [uiLanguage]=\"uiLanguage$ | async\"\r\n [columns]=\"sortedColumns\"\r\n (reorder)=\"onColumnReorder($event)\"\r\n (resetColumns)=\"onColumnsReset()\"\r\n ></vdr-data-table-colum-picker>\r\n </div>\r\n </th>\r\n </tr>\r\n <tr *ngIf=\"searchComponent || customSearchTemplate || filters?.length\">\r\n <th\r\n [attr.colspan]=\"visibleSortedColumns.length + (selectionManager ? 2 : 1)\"\r\n class=\"filter-row\"\r\n [class.active]=\"showSearchFilterRow\"\r\n >\r\n <button\r\n class=\"button-ghost toggle-search-filter-row\"\r\n [class.active]=\"showSearchFilterRow\"\r\n (click)=\"toggleSearchFilterRow()\"\r\n [title]=\"'common.search-and-filter-list' | translate\"\r\n >\r\n <clr-icon shape=\"search\"></clr-icon>\r\n </button>\r\n <div class=\"filter-row-wrapper\" [class.hidden]=\"!showSearchFilterRow\">\r\n <ng-container *ngTemplateOutlet=\"searchComponent?.template\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"customSearchTemplate\"></ng-container>\r\n <ng-container *ngIf=\"filters\">\r\n <div class=\"filters\">\r\n <vdr-data-table-filters\r\n *ngFor=\"let activeFilter of filters.activeFilters\"\r\n [filterWithValue]=\"activeFilter\"\r\n [filters]=\"filters\"\r\n class=\"mt-1\"\r\n ></vdr-data-table-filters>\r\n <vdr-data-table-filters\r\n *ngIf=\"filters.length\"\r\n [filters]=\"filters\"\r\n class=\"mt-1\"\r\n ></vdr-data-table-filters>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr\r\n *ngFor=\"\r\n let item of items\r\n | paginate\r\n : {\r\n id: id,\r\n itemsPerPage: itemsPerPage,\r\n currentPage: currentPage,\r\n totalItems: totalItems\r\n };\r\n index as i;\r\n trackBy: trackByFn\r\n \"\r\n >\r\n <td *ngIf=\"selectionManager\" class=\"selection-col\" [class.active]=\"activeIndex === i\">\r\n <input\r\n type=\"checkbox\"\r\n clrCheckbox\r\n [checked]=\"selectionManager?.isSelected(item)\"\r\n (click)=\"onRowClick(item, $event)\"\r\n />\r\n </td>\r\n <td *ngFor=\"let column of visibleSortedColumns\" [class.active]=\"activeIndex === i\">\r\n <div class=\"cell-content\" [ngClass]=\"column.align\">\r\n <ng-container\r\n *ngIf=\"customComponents.get(column.id) as componentConfig; else defaultComponent\"\r\n >\r\n <ng-container\r\n *ngComponentOutlet=\"\r\n componentConfig.config.component;\r\n inputs: { rowItem: item };\r\n injector: componentConfig.injector\r\n \"\r\n ></ng-container>\r\n </ng-container>\r\n <ng-template #defaultComponent>\r\n <ng-container\r\n *ngTemplateOutlet=\"column.template; context: { item: item, index: i }\"\r\n ></ng-container>\r\n </ng-template>\r\n </div>\r\n </td>\r\n <td [class.active]=\"activeIndex === i\"><!-- column select --></td>\r\n </tr>\r\n <ng-container>\r\n <tr *ngIf=\"!items?.length\">\r\n <td [attr.colspan]=\"visibleSortedColumns.length + (selectionManager ? 2 : 1)\">\r\n <vdr-empty-placeholder [emptyStateLabel]=\"'order.order-is-empty' | translate\"></vdr-empty-placeholder>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n <tr class=\"surcharge\" *ngFor=\"let surcharge of order.surcharges\">\r\n <td class=\"align-middle name left\" colspan=\"2\">{{ surcharge.description }}</td>\r\n <td class=\"align-middle sku\">{{ surcharge.sku }}</td>\r\n <td class=\"align-middle\" [attr.colspan]=\"visibleSortedColumns.length - 4\"></td>\r\n <td class=\"align-middle total\">\r\n {{ surcharge.priceWithTax | localeCurrency : order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ surcharge.price | localeCurrency : order.currencyCode }}\r\n </div>\r\n </td>\r\n <td><!-- column select --></td>\r\n </tr>\r\n <ng-container *ngFor=\"let discount of order.discounts\">\r\n <tr class=\"order-adjustment\" *ngIf=\"discount.type !== 'OTHER'\">\r\n <td [attr.colspan]=\"visibleSortedColumns.length - 1\" class=\"\">\r\n <a [routerLink]=\"getPromotionLink(discount)\">{{ discount.description }}</a>\r\n <vdr-chip *ngIf=\"getCouponCodeForAdjustment(order, discount) as couponCode\">{{\r\n couponCode\r\n }}</vdr-chip>\r\n </td>\r\n <td class=\"\">\r\n {{ discount.amountWithTax | localeCurrency : order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ discount.amount | localeCurrency : order.currencyCode }}\r\n </div>\r\n </td>\r\n <td><!-- column select --></td>\r\n </tr>\r\n </ng-container>\r\n <tr class=\"sub-total\">\r\n <td class=\"\">{{ 'order.sub-total' | translate }}</td>\r\n <td [attr.colspan]=\"visibleSortedColumns.length - 2\"></td>\r\n <td class=\"clr-align-middle\">\r\n {{ order.subTotalWithTax | localeCurrency : order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ order.subTotal | localeCurrency : order.currencyCode }}\r\n </div>\r\n </td>\r\n <td><!-- column select --></td>\r\n </tr>\r\n <tr class=\"shipping\">\r\n <td class=\"\">{{ 'order.shipping' | translate }}</td>\r\n <td [attr.colspan]=\"visibleSortedColumns.length - 2\">\r\n <vdr-chip *ngFor=\"let shippingLine of order.shippingLines\" class=\"shipping-method-name\">\r\n {{ shippingLine.shippingMethod.name }}\r\n </vdr-chip>\r\n </td>\r\n <td class=\"clr-align-middle\">\r\n {{ order.shippingWithTax | localeCurrency : order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ order.shipping | localeCurrency : order.currencyCode }}\r\n </div>\r\n </td>\r\n <td><!-- column select --></td>\r\n </tr>\r\n <tr class=\"total\">\r\n <td class=\"\">{{ 'order.total' | translate }}</td>\r\n <td [attr.colspan]=\"visibleSortedColumns.length - 2\"></td>\r\n <td class=\"clr-align-middle\">\r\n {{ order.totalWithTax | localeCurrency : order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ order.total | localeCurrency : order.currencyCode }}\r\n </div>\r\n </td>\r\n <td><!-- column select --></td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n</div>\r\n", styles: [":host{display:block;max-width:100%;position:relative;margin-bottom:calc(var(--space-unit) * 4);container-type:inline-size}th{border-bottom:1px solid var(--color-table-header-border);color:var(--color-weight-700);font-size:var(--font-size-xs);font-weight:600;text-transform:uppercase;position:relative;white-space:nowrap;background-color:transparent}th,td{padding:calc(var(--space-unit) * 1.5) calc(var(--space-unit) * 1);color:var(--color-text-100)}tr td:first-of-type,tr th:first-of-type{text-align:center}@media screen and (min-width: 992px){tr td:first-of-type,tr th:first-of-type{padding-inline-start:var(--surface-margin-left);text-align:start}}th:last-of-type,td:last-of-type{border-inline-end:1px solid var(--color-table-header-border)}tr:first-of-type th:last-of-type{border-image:linear-gradient(0deg,var(--color-table-header-border),transparent) 1}tr:last-of-type td:last-of-type{border-image:linear-gradient(180deg,var(--color-table-header-border),transparent) 1}tbody td{border-bottom:1px solid var(--color-table-row-separator)}tbody tr:hover{background-color:var(--color-table-row-hover-bg)}.bulk-actions{margin-inline-start:calc(var(--space-unit) * 5);background-color:var(--color-surface-bg);z-index:10;display:flex;position:absolute;top:5px;height:40px}@media screen and (min-width: 992px){.bulk-actions{margin-inline-start:calc(var(--space-unit) * 8.5)}}@media screen and (min-width: 1280px){.bulk-actions{margin-inline-start:calc(var(--space-unit) * 10.5)}}.table-wrapper{display:block;overflow-y:hidden;overflow-x:auto;position:relative;width:100%;max-width:var(--surface-width)}table{width:100%}table.no-select{-webkit-user-select:none;user-select:none}.column-picker{width:24px}.sort-toggle{display:flex;align-items:center;margin-inline-start:calc(var(--space-unit) * .5)}.sort-toggle button{border:0;border-radius:var(--border-radius-lg);color:var(--color-weight-500);padding:0 2px;cursor:pointer;background-color:transparent}.sort-toggle button.active{color:var(--color-primary-700)}.sort-toggle .sort-label{margin-inline-start:calc(var(--space-unit) * .5);font-size:10px;color:var(--color-primary-600);font-weight:400}.toggle-search-filter-row{position:absolute;top:-12px;left:4px}@media screen and (min-width: 1280px){.toggle-search-filter-row{left:8px}}.toggle-search-filter-row.active{background-color:var(--color-primary-700);color:var(--color-primary-100);border-color:var(--color-primary-700)}th.filter-row{position:relative;font-size:var(--font-size-base);font-weight:400;background-color:var(--color-weight-100);box-shadow:var(--data-table-filter-box-shadow);border-left-width:0;border-right-width:0;text-align:initial;padding:0}th.filter-row input{width:100%}th.filter-row.active{border-bottom:1px solid var(--color-table-header-border)}th.filter-row .filters{margin-top:calc(var(--space-unit) * 1);display:flex;flex-wrap:wrap;gap:calc(var(--space-unit) * .5)}.filter-row-wrapper{padding:calc(var(--space-unit) * 4);padding-inline-start:0;max-height:150px;transition:max-height .2s,padding .2s,opacity .2s}.filter-row-wrapper.hidden{max-height:0px;padding-top:0;padding-bottom:0;overflow:hidden;opacity:0}.cell-link{display:block;width:100%;height:100%}td.active{background-color:var(--color-table-row-active-bg)}.cell-content{display:flex;align-items:center;line-height:var(--font-size-sm);color:var(--color-weight-700)}.cell-content.left{justify-content:flex-start}.cell-content.center{justify-content:center}.cell-content.right{justify-content:flex-end}.selection-col{width:calc(var(--space-unit) * 8)}vdr-empty-placeholder{width:100%}.table-footer{display:flex;align-items:baseline;justify-content:space-between;margin-top:var(--space-unit);margin-inline-start:var(--surface-margin-left);margin-inline-end:var(--space-unit)}.total-items-count{font-size:var(--font-size-xs)}@container (max-width: 500px){.total-items-count{display:none}}\n", ":host .is-cancelled td{text-decoration:line-through;background-color:var(--color-component-bg-200)}:host .sub-total td{border-top:1px dashed var(--color-component-border-200)}:host .total td{font-weight:700;border-top:1px dashed var(--color-component-border-200)}:host td.custom-fields-row{border-top-style:dashed;border-top-color:var(--color-grey-200)}:host img{border-radius:var(--border-radius-img)}:host .order-line-custom-fields{display:flex;flex-wrap:wrap}:host .order-line-custom-fields .custom-field{text-align:start;max-width:200px;overflow:hidden;text-overflow:ellipsis;margin-bottom:6px;margin-inline-end:18px}:host .draft-qty{max-width:48px}:host .order-line-custom-field{background-color:var(--color-component-bg-100)}:host .order-line-custom-field .custom-field-ellipsis{color:var(--color-text-300)}:host .net-price{font-size:11px;color:var(--color-text-300);line-height:14px}:host .promotions-label{text-decoration:underline dotted var(--color-text-200);font-size:11px;margin-top:6px;cursor:pointer;text-transform:lowercase}:host .thumb img{width:50px;height:50px}:host .shipping-method-name{font-size:var(--font-size-xs);margin-inline-end:2px}:host .order-placed-quantity{text-decoration:line-through;color:var(--color-text-300);margin-inline-end:2px}\n"] }]
|
|
689
676
|
}], propDecorators: { totalColumns: [{
|
|
@@ -758,10 +745,10 @@ class OrderTableComponent {
|
|
|
758
745
|
return '';
|
|
759
746
|
}
|
|
760
747
|
}
|
|
761
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
762
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.4", type: OrderTableComponent, selector: "vdr-order-table", inputs: { order: "order", orderLineCustomFields: "orderLineCustomFields", isDraft: "isDraft" }, outputs: { adjust: "adjust", remove: "remove" }, ngImport: i0, template: "<vdr-order-data-table id=\"order-detail-list\" [items]=\"order.lines\" [order]=\"order\">\r\n <vdr-dt2-column id=\"id\" [heading]=\"'common.id' | translate\" [hiddenByDefault]=\"true\">\r\n <ng-template let-line=\"item\">\r\n {{ line.id }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column\r\n id=\"created-at\"\r\n [heading]=\"'common.created-at' | translate\"\r\n [hiddenByDefault]=\"true\"\r\n >\r\n <ng-template let-line=\"item\">\r\n {{ line.createdAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column\r\n id=\"updated-at\"\r\n [heading]=\"'common.updated-at' | translate\"\r\n [hiddenByDefault]=\"true\"\r\n >\r\n <ng-template let-line=\"item\">\r\n {{ line.updatedAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'common.image' | translate\" id=\"image\">\r\n <ng-template let-line=\"item\">\r\n <div class=\"image-placeholder\">\r\n <img\r\n *ngIf=\"line.featuredAsset as asset; else imagePlaceholder\"\r\n [src]=\"asset | assetPreview : 'tiny'\"\r\n />\r\n <ng-template #imagePlaceholder>\r\n <div class=\"placeholder\">\r\n <clr-icon shape=\"image\" size=\"48\"></clr-icon>\r\n </div>\r\n </ng-template>\r\n </div>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'order.product-name' | translate\" id=\"product-name\">\r\n <ng-template let-line=\"item\">\r\n {{ line.productVariant.name }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'order.product-sku' | translate\" id=\"product-sku\" [optional]=\"false\">\r\n <ng-template let-line=\"item\">\r\n {{ line.productVariant.sku }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'order.unit-price' | translate\" id=\"unit-price\">\r\n <ng-template let-line=\"item\">\r\n <div class=\"unit-price\">\r\n {{ line.unitPriceWithTax | localeCurrency : order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ line.unitPrice | localeCurrency : order.currencyCode }}\r\n </div>\r\n </div>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'order.quantity' | translate\" id=\"quantity\" [optional]=\"false\">\r\n <ng-template let-line=\"item\">\r\n <ng-container *ngIf=\"!isDraft; else draft\">\r\n <div class=\"flex\">\r\n <div\r\n *ngIf=\"line.orderPlacedQuantity && line.quantity !== line.orderPlacedQuantity\"\r\n class=\"order-placed-quantity\"\r\n [title]=\"'order.original-quantity-at-checkout' | translate\"\r\n >\r\n {{ line.orderPlacedQuantity }}\r\n </div>\r\n <div>{{ line.quantity }}</div>\r\n </div>\r\n </ng-container>\r\n <ng-template #draft>\r\n <div class=\"flex\">\r\n <input\r\n class=\"draft-qty\"\r\n type=\"number\"\r\n min=\"0\"\r\n #qtyInput\r\n [value]=\"line.quantity\"\r\n (blur)=\"draftInputBlur(line, qtyInput.valueAsNumber)\"\r\n />\r\n <button class=\"icon-button\" (click)=\"remove.emit({ lineId: line.id })\">\r\n <clr-icon shape=\"trash\"></clr-icon>\r\n </button>\r\n </div>\r\n </ng-template>\r\n <vdr-line-refunds [line]=\"line\" [payments]=\"order.payments\"></vdr-line-refunds>\r\n <vdr-line-fulfillment\r\n [line]=\"line\"\r\n [orderState]=\"order.state\"\r\n [allOrderFulfillments]=\"order.fulfillments\"\r\n ></vdr-line-fulfillment>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-custom-field-column\r\n *ngFor=\"let customField of orderLineCustomFields\"\r\n [customField]=\"customField\"\r\n />\r\n <vdr-order-total-column [heading]=\"'order.total' | translate\" id=\"total\" [optional]=\"false\">\r\n <ng-template let-line=\"item\">\r\n <div class=\"unit-price\">\r\n {{ line.linePriceWithTax | localeCurrency : order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ line.linePrice | localeCurrency : order.currencyCode }}\r\n </div>\r\n </div>\r\n\r\n <ng-container *ngIf=\"getLineDiscounts(line) as discounts\">\r\n <vdr-dropdown *ngIf=\"discounts.length\">\r\n <div class=\"promotions-label\" vdrDropdownTrigger>\r\n {{ 'order.promotions-applied' | translate }}\r\n </div>\r\n <vdr-dropdown-menu>\r\n <div class=\"line-promotion\" *ngFor=\"let discount of discounts\">\r\n <a class=\"promotion-name\" [routerLink]=\"getPromotionLink(discount)\">{{\r\n discount.description\r\n }}</a>\r\n <div class=\"promotion-amount\">\r\n {{ discount.amountWithTax | localeCurrency : order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ discount.amount | localeCurrency : order.currencyCode }}\r\n </div>\r\n </div>\r\n </div>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n </ng-container>\r\n </ng-template>\r\n </vdr-order-total-column>\r\n</vdr-order-data-table>\r\n", styles: [":host .is-cancelled td{text-decoration:line-through;background-color:var(--color-component-bg-200)}:host .sub-total td{border-top:1px dashed var(--color-component-border-200)}:host .total td{font-weight:700;border-top:1px dashed var(--color-component-border-200)}:host td.custom-fields-row{border-top-style:dashed;border-top-color:var(--color-grey-200)}:host img{border-radius:var(--border-radius-img)}:host .order-line-custom-fields{display:flex;flex-wrap:wrap}:host .order-line-custom-fields .custom-field{text-align:start;max-width:200px;overflow:hidden;text-overflow:ellipsis;margin-bottom:6px;margin-inline-end:18px}:host .draft-qty{max-width:48px}:host .order-line-custom-field{background-color:var(--color-component-bg-100)}:host .order-line-custom-field .custom-field-ellipsis{color:var(--color-text-300)}:host .net-price{font-size:11px;color:var(--color-text-300);line-height:14px}:host .promotions-label{text-decoration:underline dotted var(--color-text-200);font-size:11px;margin-top:6px;cursor:pointer;text-transform:lowercase}:host .thumb img{width:50px;height:50px}:host .shipping-method-name{font-size:var(--font-size-xs);margin-inline-end:2px}:host .order-placed-quantity{text-decoration:line-through;color:var(--color-text-300);margin-inline-end:2px}::ng-deep .line-promotion{display:flex;justify-content:space-between;padding:6px 12px}::ng-deep .line-promotion .promotion-amount{margin-inline-start:12px}::ng-deep .line-promotion .net-price{font-size:11px;color:var(--color-text-300)}\n"], dependencies: [{ kind: "directive", type: i3.ClrIconCustomTag, selector: "clr-icon" }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1.FormFieldControlDirective, selector: "input, textarea, select, vdr-currency-input" }, { kind: "component", type: i1.DropdownComponent, selector: "vdr-dropdown", inputs: ["manualToggle"] }, { kind: "component", type: i1.DropdownMenuComponent, selector: "vdr-dropdown-menu", inputs: ["vdrPosition", "customClasses"] }, { kind: "directive", type: i1.DropdownTriggerDirective, selector: "[vdrDropdownTrigger]" }, { kind: "component", type: i1.DataTable2ColumnComponent, selector: "vdr-dt2-column", inputs: ["id", "expand", "heading", "align", "sort", "optional", "hiddenByDefault", "orderable"], exportAs: ["row"] }, { kind: "component", type: i1.DataTableCustomFieldColumnComponent, selector: "vdr-dt2-custom-field-column", inputs: ["customField", "sorts"], exportAs: ["row"] }, { kind: "component", type: LineFulfillmentComponent, selector: "vdr-line-fulfillment", inputs: ["line", "allOrderFulfillments", "orderState"] }, { kind: "component", type: LineRefundsComponent, selector: "vdr-line-refunds", inputs: ["line", "payments"] }, { kind: "component", type: OrderDataTableComponent, selector: "vdr-order-data-table", inputs: ["order"] }, { kind: "component", type: OrderTotalColumnComponent, selector: "vdr-order-total-column", exportAs: ["row"] }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.AssetPreviewPipe, name: "assetPreview" }, { kind: "pipe", type: i1.LocaleDatePipe, name: "localeDate" }, { kind: "pipe", type: i1.LocaleCurrencyPipe, name: "localeCurrency" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
748
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: OrderTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
749
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: OrderTableComponent, selector: "vdr-order-table", inputs: { order: "order", orderLineCustomFields: "orderLineCustomFields", isDraft: "isDraft" }, outputs: { adjust: "adjust", remove: "remove" }, ngImport: i0, template: "<vdr-order-data-table id=\"order-detail-list\" [items]=\"order.lines\" [order]=\"order\">\r\n <vdr-dt2-column id=\"id\" [heading]=\"'common.id' | translate\" [hiddenByDefault]=\"true\">\r\n <ng-template let-line=\"item\">\r\n {{ line.id }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column\r\n id=\"created-at\"\r\n [heading]=\"'common.created-at' | translate\"\r\n [hiddenByDefault]=\"true\"\r\n >\r\n <ng-template let-line=\"item\">\r\n {{ line.createdAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column\r\n id=\"updated-at\"\r\n [heading]=\"'common.updated-at' | translate\"\r\n [hiddenByDefault]=\"true\"\r\n >\r\n <ng-template let-line=\"item\">\r\n {{ line.updatedAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'common.image' | translate\" id=\"image\">\r\n <ng-template let-line=\"item\">\r\n <div class=\"image-placeholder\">\r\n <img\r\n *ngIf=\"line.featuredAsset as asset; else imagePlaceholder\"\r\n [src]=\"asset | assetPreview : 'tiny'\"\r\n />\r\n <ng-template #imagePlaceholder>\r\n <div class=\"placeholder\">\r\n <clr-icon shape=\"image\" size=\"48\"></clr-icon>\r\n </div>\r\n </ng-template>\r\n </div>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'order.product-name' | translate\" id=\"product-name\">\r\n <ng-template let-line=\"item\">\r\n {{ line.productVariant.name }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'order.product-sku' | translate\" id=\"product-sku\" [optional]=\"false\">\r\n <ng-template let-line=\"item\">\r\n {{ line.productVariant.sku }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'order.unit-price' | translate\" id=\"unit-price\">\r\n <ng-template let-line=\"item\">\r\n <div class=\"unit-price\">\r\n {{ line.unitPriceWithTax | localeCurrency : order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ line.unitPrice | localeCurrency : order.currencyCode }}\r\n </div>\r\n </div>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'order.quantity' | translate\" id=\"quantity\" [optional]=\"false\">\r\n <ng-template let-line=\"item\">\r\n <ng-container *ngIf=\"!isDraft; else draft\">\r\n <div class=\"flex\">\r\n <div\r\n *ngIf=\"line.orderPlacedQuantity && line.quantity !== line.orderPlacedQuantity\"\r\n class=\"order-placed-quantity\"\r\n [title]=\"'order.original-quantity-at-checkout' | translate\"\r\n >\r\n {{ line.orderPlacedQuantity }}\r\n </div>\r\n <div>{{ line.quantity }}</div>\r\n </div>\r\n </ng-container>\r\n <ng-template #draft>\r\n <div class=\"flex\">\r\n <input\r\n class=\"draft-qty\"\r\n type=\"number\"\r\n min=\"0\"\r\n #qtyInput\r\n [value]=\"line.quantity\"\r\n (blur)=\"draftInputBlur(line, qtyInput.valueAsNumber)\"\r\n />\r\n <button class=\"icon-button\" (click)=\"remove.emit({ lineId: line.id })\">\r\n <clr-icon shape=\"trash\"></clr-icon>\r\n </button>\r\n </div>\r\n </ng-template>\r\n <vdr-line-refunds [line]=\"line\" [payments]=\"order.payments\"></vdr-line-refunds>\r\n <vdr-line-fulfillment\r\n [line]=\"line\"\r\n [orderState]=\"order.state\"\r\n [allOrderFulfillments]=\"order.fulfillments\"\r\n ></vdr-line-fulfillment>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-custom-field-column\r\n *ngFor=\"let customField of orderLineCustomFields\"\r\n [customField]=\"customField\"\r\n />\r\n <vdr-order-total-column [heading]=\"'order.total' | translate\" id=\"total\" [optional]=\"false\">\r\n <ng-template let-line=\"item\">\r\n <div class=\"unit-price\">\r\n {{ line.linePriceWithTax | localeCurrency : order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ line.linePrice | localeCurrency : order.currencyCode }}\r\n </div>\r\n </div>\r\n\r\n <ng-container *ngIf=\"getLineDiscounts(line) as discounts\">\r\n <vdr-dropdown *ngIf=\"discounts.length\">\r\n <div class=\"promotions-label\" vdrDropdownTrigger>\r\n {{ 'order.promotions-applied' | translate }}\r\n </div>\r\n <vdr-dropdown-menu>\r\n <div class=\"line-promotion\" *ngFor=\"let discount of discounts\">\r\n <a class=\"promotion-name\" [routerLink]=\"getPromotionLink(discount)\">{{\r\n discount.description\r\n }}</a>\r\n <div class=\"promotion-amount\">\r\n {{ discount.amountWithTax | localeCurrency : order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ discount.amount | localeCurrency : order.currencyCode }}\r\n </div>\r\n </div>\r\n </div>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n </ng-container>\r\n </ng-template>\r\n </vdr-order-total-column>\r\n</vdr-order-data-table>\r\n", styles: [":host .is-cancelled td{text-decoration:line-through;background-color:var(--color-component-bg-200)}:host .sub-total td{border-top:1px dashed var(--color-component-border-200)}:host .total td{font-weight:700;border-top:1px dashed var(--color-component-border-200)}:host td.custom-fields-row{border-top-style:dashed;border-top-color:var(--color-grey-200)}:host img{border-radius:var(--border-radius-img)}:host .order-line-custom-fields{display:flex;flex-wrap:wrap}:host .order-line-custom-fields .custom-field{text-align:start;max-width:200px;overflow:hidden;text-overflow:ellipsis;margin-bottom:6px;margin-inline-end:18px}:host .draft-qty{max-width:48px}:host .order-line-custom-field{background-color:var(--color-component-bg-100)}:host .order-line-custom-field .custom-field-ellipsis{color:var(--color-text-300)}:host .net-price{font-size:11px;color:var(--color-text-300);line-height:14px}:host .promotions-label{text-decoration:underline dotted var(--color-text-200);font-size:11px;margin-top:6px;cursor:pointer;text-transform:lowercase}:host .thumb img{width:50px;height:50px}:host .shipping-method-name{font-size:var(--font-size-xs);margin-inline-end:2px}:host .order-placed-quantity{text-decoration:line-through;color:var(--color-text-300);margin-inline-end:2px}::ng-deep .line-promotion{display:flex;justify-content:space-between;padding:6px 12px}::ng-deep .line-promotion .promotion-amount{margin-inline-start:12px}::ng-deep .line-promotion .net-price{font-size:11px;color:var(--color-text-300)}\n"], dependencies: [{ kind: "directive", type: i3.ClrIconCustomTag, selector: "clr-icon" }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1.FormFieldControlDirective, selector: "input, textarea, select, vdr-currency-input" }, { kind: "component", type: i1.DropdownComponent, selector: "vdr-dropdown", inputs: ["manualToggle"] }, { kind: "component", type: i1.DropdownMenuComponent, selector: "vdr-dropdown-menu", inputs: ["vdrPosition", "customClasses"] }, { kind: "directive", type: i1.DropdownTriggerDirective, selector: "[vdrDropdownTrigger]" }, { kind: "component", type: i1.DataTable2ColumnComponent, selector: "vdr-dt2-column", inputs: ["id", "expand", "heading", "align", "sort", "optional", "hiddenByDefault", "orderable"], exportAs: ["row"] }, { kind: "component", type: i1.DataTableCustomFieldColumnComponent, selector: "vdr-dt2-custom-field-column", inputs: ["customField", "sorts"], exportAs: ["row"] }, { kind: "component", type: LineFulfillmentComponent, selector: "vdr-line-fulfillment", inputs: ["line", "allOrderFulfillments", "orderState"] }, { kind: "component", type: LineRefundsComponent, selector: "vdr-line-refunds", inputs: ["line", "payments"] }, { kind: "component", type: OrderDataTableComponent, selector: "vdr-order-data-table", inputs: ["order"] }, { kind: "component", type: OrderTotalColumnComponent, selector: "vdr-order-total-column", exportAs: ["row"] }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.AssetPreviewPipe, name: "assetPreview" }, { kind: "pipe", type: i1.LocaleDatePipe, name: "localeDate" }, { kind: "pipe", type: i1.LocaleCurrencyPipe, name: "localeCurrency" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
763
750
|
}
|
|
764
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
751
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: OrderTableComponent, decorators: [{
|
|
765
752
|
type: Component,
|
|
766
753
|
args: [{ selector: 'vdr-order-table', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vdr-order-data-table id=\"order-detail-list\" [items]=\"order.lines\" [order]=\"order\">\r\n <vdr-dt2-column id=\"id\" [heading]=\"'common.id' | translate\" [hiddenByDefault]=\"true\">\r\n <ng-template let-line=\"item\">\r\n {{ line.id }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column\r\n id=\"created-at\"\r\n [heading]=\"'common.created-at' | translate\"\r\n [hiddenByDefault]=\"true\"\r\n >\r\n <ng-template let-line=\"item\">\r\n {{ line.createdAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column\r\n id=\"updated-at\"\r\n [heading]=\"'common.updated-at' | translate\"\r\n [hiddenByDefault]=\"true\"\r\n >\r\n <ng-template let-line=\"item\">\r\n {{ line.updatedAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'common.image' | translate\" id=\"image\">\r\n <ng-template let-line=\"item\">\r\n <div class=\"image-placeholder\">\r\n <img\r\n *ngIf=\"line.featuredAsset as asset; else imagePlaceholder\"\r\n [src]=\"asset | assetPreview : 'tiny'\"\r\n />\r\n <ng-template #imagePlaceholder>\r\n <div class=\"placeholder\">\r\n <clr-icon shape=\"image\" size=\"48\"></clr-icon>\r\n </div>\r\n </ng-template>\r\n </div>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'order.product-name' | translate\" id=\"product-name\">\r\n <ng-template let-line=\"item\">\r\n {{ line.productVariant.name }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'order.product-sku' | translate\" id=\"product-sku\" [optional]=\"false\">\r\n <ng-template let-line=\"item\">\r\n {{ line.productVariant.sku }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'order.unit-price' | translate\" id=\"unit-price\">\r\n <ng-template let-line=\"item\">\r\n <div class=\"unit-price\">\r\n {{ line.unitPriceWithTax | localeCurrency : order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ line.unitPrice | localeCurrency : order.currencyCode }}\r\n </div>\r\n </div>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'order.quantity' | translate\" id=\"quantity\" [optional]=\"false\">\r\n <ng-template let-line=\"item\">\r\n <ng-container *ngIf=\"!isDraft; else draft\">\r\n <div class=\"flex\">\r\n <div\r\n *ngIf=\"line.orderPlacedQuantity && line.quantity !== line.orderPlacedQuantity\"\r\n class=\"order-placed-quantity\"\r\n [title]=\"'order.original-quantity-at-checkout' | translate\"\r\n >\r\n {{ line.orderPlacedQuantity }}\r\n </div>\r\n <div>{{ line.quantity }}</div>\r\n </div>\r\n </ng-container>\r\n <ng-template #draft>\r\n <div class=\"flex\">\r\n <input\r\n class=\"draft-qty\"\r\n type=\"number\"\r\n min=\"0\"\r\n #qtyInput\r\n [value]=\"line.quantity\"\r\n (blur)=\"draftInputBlur(line, qtyInput.valueAsNumber)\"\r\n />\r\n <button class=\"icon-button\" (click)=\"remove.emit({ lineId: line.id })\">\r\n <clr-icon shape=\"trash\"></clr-icon>\r\n </button>\r\n </div>\r\n </ng-template>\r\n <vdr-line-refunds [line]=\"line\" [payments]=\"order.payments\"></vdr-line-refunds>\r\n <vdr-line-fulfillment\r\n [line]=\"line\"\r\n [orderState]=\"order.state\"\r\n [allOrderFulfillments]=\"order.fulfillments\"\r\n ></vdr-line-fulfillment>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-custom-field-column\r\n *ngFor=\"let customField of orderLineCustomFields\"\r\n [customField]=\"customField\"\r\n />\r\n <vdr-order-total-column [heading]=\"'order.total' | translate\" id=\"total\" [optional]=\"false\">\r\n <ng-template let-line=\"item\">\r\n <div class=\"unit-price\">\r\n {{ line.linePriceWithTax | localeCurrency : order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ line.linePrice | localeCurrency : order.currencyCode }}\r\n </div>\r\n </div>\r\n\r\n <ng-container *ngIf=\"getLineDiscounts(line) as discounts\">\r\n <vdr-dropdown *ngIf=\"discounts.length\">\r\n <div class=\"promotions-label\" vdrDropdownTrigger>\r\n {{ 'order.promotions-applied' | translate }}\r\n </div>\r\n <vdr-dropdown-menu>\r\n <div class=\"line-promotion\" *ngFor=\"let discount of discounts\">\r\n <a class=\"promotion-name\" [routerLink]=\"getPromotionLink(discount)\">{{\r\n discount.description\r\n }}</a>\r\n <div class=\"promotion-amount\">\r\n {{ discount.amountWithTax | localeCurrency : order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ discount.amount | localeCurrency : order.currencyCode }}\r\n </div>\r\n </div>\r\n </div>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n </ng-container>\r\n </ng-template>\r\n </vdr-order-total-column>\r\n</vdr-order-data-table>\r\n", styles: [":host .is-cancelled td{text-decoration:line-through;background-color:var(--color-component-bg-200)}:host .sub-total td{border-top:1px dashed var(--color-component-border-200)}:host .total td{font-weight:700;border-top:1px dashed var(--color-component-border-200)}:host td.custom-fields-row{border-top-style:dashed;border-top-color:var(--color-grey-200)}:host img{border-radius:var(--border-radius-img)}:host .order-line-custom-fields{display:flex;flex-wrap:wrap}:host .order-line-custom-fields .custom-field{text-align:start;max-width:200px;overflow:hidden;text-overflow:ellipsis;margin-bottom:6px;margin-inline-end:18px}:host .draft-qty{max-width:48px}:host .order-line-custom-field{background-color:var(--color-component-bg-100)}:host .order-line-custom-field .custom-field-ellipsis{color:var(--color-text-300)}:host .net-price{font-size:11px;color:var(--color-text-300);line-height:14px}:host .promotions-label{text-decoration:underline dotted var(--color-text-200);font-size:11px;margin-top:6px;cursor:pointer;text-transform:lowercase}:host .thumb img{width:50px;height:50px}:host .shipping-method-name{font-size:var(--font-size-xs);margin-inline-end:2px}:host .order-placed-quantity{text-decoration:line-through;color:var(--color-text-300);margin-inline-end:2px}::ng-deep .line-promotion{display:flex;justify-content:space-between;padding:6px 12px}::ng-deep .line-promotion .promotion-amount{margin-inline-start:12px}::ng-deep .line-promotion .net-price{font-size:11px;color:var(--color-text-300)}\n"] }]
|
|
767
754
|
}], propDecorators: { order: [{
|
|
@@ -812,10 +799,10 @@ class DraftOrderVariantSelectorComponent {
|
|
|
812
799
|
this.customFieldsFormGroup.reset();
|
|
813
800
|
}
|
|
814
801
|
}
|
|
815
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
816
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.
|
|
802
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DraftOrderVariantSelectorComponent, deps: [{ token: i1.DataService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
803
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: DraftOrderVariantSelectorComponent, selector: "vdr-draft-order-variant-selector", inputs: { currencyCode: "currencyCode", orderLineCustomFields: "orderLineCustomFields" }, outputs: { addItem: "addItem" }, ngImport: i0, template: "<div class=\"card\">\r\n <div class=\"card-block\">\r\n <h4 class=\"card-title\">{{ 'order.add-item-to-order' | translate }}</h4>\r\n <vdr-product-variant-selector\r\n (productSelected)=\"selectedVariantId$.next($event.productVariantId)\"\r\n ></vdr-product-variant-selector>\r\n </div>\r\n <div class=\"card-block\" *ngIf=\"selectedVariant$ | async as selectedVariant\">\r\n <div class=\"variant-details\">\r\n <img class=\"mr-2\" [src]=\"selectedVariant.featuredAsset || selectedVariant.product.featuredAsset | assetPreview: 32\">\r\n <div class=\"details\">\r\n <div>{{ selectedVariant?.name }}</div>\r\n <div class=\"small\">{{ selectedVariant?.sku }}</div>\r\n </div>\r\n <div class=\"details ml-4\">\r\n <div class=\"small\">\r\n {{ 'catalog.stock-on-hand' | translate }}: {{ selectedVariant.stockOnHand }}\r\n </div>\r\n <div class=\"small\">\r\n {{ 'catalog.stock-allocated' | translate }}: {{ selectedVariant.stockAllocated }}\r\n </div>\r\n </div>\r\n <div class=\"flex-spacer\"></div>\r\n <div class=\"details\">\r\n <div>{{ selectedVariant?.priceWithTax | localeCurrency: currencyCode }}</div>\r\n <div class=\"small\" [title]=\"'order.net-price' | translate\">\r\n {{ selectedVariant?.price | localeCurrency: currencyCode }}\r\n </div>\r\n </div>\r\n <div>\r\n <input [disabled]=\"!selectedVariant\" type=\"number\" min=\"0\" [(ngModel)]=\"quantity\" />\r\n </div>\r\n <button\r\n [disabled]=\"!selectedVariant\"\r\n class=\"btn btn-small btn-primary\"\r\n (click)=\"addItemClick(selectedVariant)\"\r\n >\r\n {{ 'order.add-item-to-order' | translate }}\r\n </button>\r\n </div>\r\n <ng-container *ngIf=\"orderLineCustomFields.length\">\r\n <div class=\"custom-field\" *ngFor=\"let field of orderLineCustomFields\">\r\n <vdr-custom-field-control\r\n [compact]=\"true\"\r\n [readonly]=\"false\"\r\n [customField]=\"field\"\r\n [customFieldsFormGroup]=\"customFieldsFormGroup\"\r\n ></vdr-custom-field-control>\r\n </div>\r\n </ng-container>\r\n </div>\r\n</div>\r\n", styles: [".variant-details{display:flex;align-items:center}.variant-details img{border-radius:var(--border-radius-img);width:32px;height:32px}.variant-details .details{font-size:.65rem;line-height:.7rem}.variant-details input{width:48px;margin:0 6px}.variant-details .small{font-size:11px;color:var(--color-text-300)}\n"], dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i1.CustomFieldControlComponent, selector: "vdr-custom-field-control", inputs: ["entityName", "customFieldsFormGroup", "customField", "compact", "showLabel", "readonly"] }, { kind: "directive", type: i1.FormFieldControlDirective, selector: "input, textarea, select, vdr-currency-input" }, { kind: "component", type: i1.ProductVariantSelectorComponent, selector: "vdr-product-variant-selector", outputs: ["productSelected"] }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.AssetPreviewPipe, name: "assetPreview" }, { kind: "pipe", type: i1.LocaleCurrencyPipe, name: "localeCurrency" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
817
804
|
}
|
|
818
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
805
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DraftOrderVariantSelectorComponent, decorators: [{
|
|
819
806
|
type: Component,
|
|
820
807
|
args: [{ selector: 'vdr-draft-order-variant-selector', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"card\">\r\n <div class=\"card-block\">\r\n <h4 class=\"card-title\">{{ 'order.add-item-to-order' | translate }}</h4>\r\n <vdr-product-variant-selector\r\n (productSelected)=\"selectedVariantId$.next($event.productVariantId)\"\r\n ></vdr-product-variant-selector>\r\n </div>\r\n <div class=\"card-block\" *ngIf=\"selectedVariant$ | async as selectedVariant\">\r\n <div class=\"variant-details\">\r\n <img class=\"mr-2\" [src]=\"selectedVariant.featuredAsset || selectedVariant.product.featuredAsset | assetPreview: 32\">\r\n <div class=\"details\">\r\n <div>{{ selectedVariant?.name }}</div>\r\n <div class=\"small\">{{ selectedVariant?.sku }}</div>\r\n </div>\r\n <div class=\"details ml-4\">\r\n <div class=\"small\">\r\n {{ 'catalog.stock-on-hand' | translate }}: {{ selectedVariant.stockOnHand }}\r\n </div>\r\n <div class=\"small\">\r\n {{ 'catalog.stock-allocated' | translate }}: {{ selectedVariant.stockAllocated }}\r\n </div>\r\n </div>\r\n <div class=\"flex-spacer\"></div>\r\n <div class=\"details\">\r\n <div>{{ selectedVariant?.priceWithTax | localeCurrency: currencyCode }}</div>\r\n <div class=\"small\" [title]=\"'order.net-price' | translate\">\r\n {{ selectedVariant?.price | localeCurrency: currencyCode }}\r\n </div>\r\n </div>\r\n <div>\r\n <input [disabled]=\"!selectedVariant\" type=\"number\" min=\"0\" [(ngModel)]=\"quantity\" />\r\n </div>\r\n <button\r\n [disabled]=\"!selectedVariant\"\r\n class=\"btn btn-small btn-primary\"\r\n (click)=\"addItemClick(selectedVariant)\"\r\n >\r\n {{ 'order.add-item-to-order' | translate }}\r\n </button>\r\n </div>\r\n <ng-container *ngIf=\"orderLineCustomFields.length\">\r\n <div class=\"custom-field\" *ngFor=\"let field of orderLineCustomFields\">\r\n <vdr-custom-field-control\r\n [compact]=\"true\"\r\n [readonly]=\"false\"\r\n [customField]=\"field\"\r\n [customFieldsFormGroup]=\"customFieldsFormGroup\"\r\n ></vdr-custom-field-control>\r\n </div>\r\n </ng-container>\r\n </div>\r\n</div>\r\n", styles: [".variant-details{display:flex;align-items:center}.variant-details img{border-radius:var(--border-radius-img);width:32px;height:32px}.variant-details .details{font-size:.65rem;line-height:.7rem}.variant-details input{width:48px;margin:0 6px}.variant-details .small{font-size:11px;color:var(--color-text-300)}\n"] }]
|
|
821
808
|
}], ctorParameters: () => [{ type: i1.DataService }], propDecorators: { currencyCode: [{
|
|
@@ -982,10 +969,10 @@ class DraftOrderDetailComponent extends TypedBaseDetailComponent {
|
|
|
982
969
|
setFormValues(entity) {
|
|
983
970
|
// empty
|
|
984
971
|
}
|
|
985
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
986
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.4", type: DraftOrderDetailComponent, selector: "vdr-draft-order-detail", usesInheritance: true, ngImport: i0, template: "<vdr-page-block>\r\n <vdr-action-bar *ngIf=\"entity$ | async as order\">\r\n <vdr-ab-left>\r\n <div class=\"flex clr-align-items-center\">\r\n <vdr-order-state-label [state]=\"order.state\"></vdr-order-state-label>\r\n </div>\r\n </vdr-ab-left>\r\n\r\n <vdr-ab-right>\r\n <vdr-action-bar-items locationId=\"draft-order-detail\" />\r\n <button\r\n class=\"btn btn-primary\"\r\n (click)=\"completeOrder()\"\r\n [disabled]=\"!order.customer || !order.lines.length || !order.shippingLines.length\"\r\n >\r\n <clr-icon shape=\"check\"></clr-icon>\r\n {{ 'order.complete-draft-order' | translate }}\r\n </button>\r\n <vdr-action-bar-dropdown-menu [alwaysShow]=\"true\" locationId=\"draft-order-detail\">\r\n <button type=\"button\" vdrDropdownItem (click)=\"deleteOrder()\">\r\n <clr-icon shape=\"trash\" class=\"is-danger\"></clr-icon>\r\n {{ 'order.delete-draft-order' | translate }}\r\n </button>\r\n </vdr-action-bar-dropdown-menu>\r\n </vdr-ab-right>\r\n </vdr-action-bar>\r\n</vdr-page-block>\r\n\r\n<vdr-page-detail-layout *ngIf=\"entity$ | async as order\">\r\n <vdr-page-detail-sidebar>\r\n <vdr-card [title]=\"'order.customer' | translate\">\r\n <ng-template vdrCardControls>\r\n <clr-icon *ngIf=\"!order.customer\" shape=\"unknown-status\" class=\"is-warning\"></clr-icon>\r\n <clr-icon *ngIf=\"order.customer\" shape=\"check\" class=\"is-success\"></clr-icon>\r\n </ng-template>\r\n <vdr-customer-label\r\n class=\"block mb-2\"\r\n *ngIf=\"order.customer\"\r\n [customer]=\"order.customer\"\r\n ></vdr-customer-label>\r\n <button class=\"button-small\" (click)=\"setCustomer()\">\r\n {{ 'order.set-customer-for-order' | translate }}\r\n </button>\r\n </vdr-card>\r\n <vdr-card [title]=\"'order.billing-address' | translate\">\r\n <ng-template vdrCardControls>\r\n <clr-icon\r\n *ngIf=\"!order.billingAddress.streetLine1\"\r\n shape=\"unknown-status\"\r\n class=\"is-warning\"\r\n ></clr-icon>\r\n <clr-icon\r\n *ngIf=\"order.billingAddress.streetLine1\"\r\n shape=\"check\"\r\n class=\"is-success\"\r\n ></clr-icon>\r\n </ng-template>\r\n <vdr-formatted-address\r\n class=\"block mb-2\"\r\n *ngIf=\"order.billingAddress\"\r\n [address]=\"order.billingAddress\"\r\n ></vdr-formatted-address>\r\n <button class=\"button-small\" (click)=\"setBillingAddress()\">\r\n {{ 'order.set-billing-address' | translate }}\r\n </button>\r\n </vdr-card>\r\n <vdr-card [title]=\"'order.shipping' | translate\">\r\n <ng-template vdrCardControls>\r\n <clr-icon\r\n *ngIf=\"!order.shippingAddress.streetLine1 || !order.shippingLines.length\"\r\n shape=\"unknown-status\"\r\n class=\"is-warning\"\r\n ></clr-icon>\r\n <clr-icon\r\n *ngIf=\"order.shippingAddress.streetLine1 && order.shippingLines.length\"\r\n shape=\"check\"\r\n class=\"is-success\"\r\n ></clr-icon>\r\n </ng-template>\r\n <vdr-formatted-address\r\n class=\"block mb-2\"\r\n *ngIf=\"order.shippingAddress\"\r\n [address]=\"order.shippingAddress\"\r\n ></vdr-formatted-address>\r\n <button class=\"button-small mr-2\" (click)=\"setShippingAddress()\">\r\n {{ 'order.set-shipping-address' | translate }}\r\n </button>\r\n\r\n <div *ngFor=\"let shippingLine of order.shippingLines\">\r\n {{ shippingLine.shippingMethod.name }}\r\n </div>\r\n <button class=\"button-small\" (click)=\"setShippingMethod()\">\r\n {{ 'order.set-shipping-method' | translate }}\r\n </button>\r\n </vdr-card>\r\n <vdr-card>\r\n <button\r\n *ngIf=\"order.couponCodes.length === 0 && !displayCouponCodeInput\"\r\n class=\"button-small\"\r\n (click)=\"displayCouponCodeInput = !displayCouponCodeInput\"\r\n >\r\n {{ 'order.set-coupon-codes' | translate }}\r\n </button>\r\n <div *ngIf=\"order.couponCodes.length || displayCouponCodeInput\">\r\n <label>{{ 'order.set-coupon-codes' | translate }}</label>\r\n <vdr-coupon-code-selector\r\n [couponCodes]=\"order.couponCodes\"\r\n (addCouponCode)=\"applyCouponCode($event)\"\r\n (removeCouponCode)=\"removeCouponCode($event)\"\r\n ></vdr-coupon-code-selector>\r\n </div>\r\n </vdr-card>\r\n <vdr-card>\r\n <vdr-page-entity-info *ngIf=\"entity$ | async as entity\" [entity]=\"entity\" />\r\n </vdr-card>\r\n </vdr-page-detail-sidebar>\r\n <vdr-page-block>\r\n <vdr-card>\r\n <vdr-draft-order-variant-selector\r\n [orderLineCustomFields]=\"orderLineCustomFields\"\r\n [currencyCode]=\"order.currencyCode\"\r\n (addItem)=\"addItemToOrder($event)\"\r\n ></vdr-draft-order-variant-selector>\r\n <vdr-order-table\r\n [order]=\"order\"\r\n [orderLineCustomFields]=\"orderLineCustomFields\"\r\n [isDraft]=\"true\"\r\n (adjust)=\"adjustOrderLine($event)\"\r\n (remove)=\"removeOrderLine($event)\"\r\n ></vdr-order-table>\r\n </vdr-card>\r\n <vdr-card [title]=\"'order.tax-summary' | translate\">\r\n <ng-container *ngIf=\"order.taxSummary.length\">\r\n <table class=\"table\">\r\n <thead>\r\n <tr>\r\n <th>{{ 'common.description' | translate }}</th>\r\n <th>{{ 'order.tax-rate' | translate }}</th>\r\n <th>{{ 'order.tax-base' | translate }}</th>\r\n <th>{{ 'order.tax-total' | translate }}</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let row of order.taxSummary\">\r\n <td>{{ row.description }}</td>\r\n <td>{{ row.taxRate / 100 | percent }}</td>\r\n <td>{{ row.taxBase | localeCurrency : order.currencyCode }}</td>\r\n <td>{{ row.taxTotal | localeCurrency : order.currencyCode }}</td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </ng-container>\r\n </vdr-card>\r\n <vdr-custom-detail-component-host\r\n locationId=\"draft-order-detail\"\r\n [entity$]=\"entity$\"\r\n [detailForm]=\"detailForm\"\r\n ></vdr-custom-detail-component-host>\r\n\r\n <vdr-order-custom-fields-card\r\n [customFieldsConfig]=\"customFields\"\r\n [customFieldValues]=\"order.customFields\"\r\n (updateClick)=\"updateCustomFields($event)\"\r\n ></vdr-order-custom-fields-card>\r\n </vdr-page-block>\r\n</vdr-page-detail-layout>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i3.ClrIconCustomTag, selector: "clr-icon" }, { kind: "directive", type: i3.ClrLabel, selector: "label", inputs: ["for"] }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1.ActionBarComponent, selector: "vdr-action-bar" }, { kind: "component", type: i1.ActionBarLeftComponent, selector: "vdr-ab-left", inputs: ["grow"] }, { kind: "component", type: i1.ActionBarRightComponent, selector: "vdr-ab-right", inputs: ["grow"] }, { kind: "component", type: i1.ActionBarDropdownMenuComponent, selector: "vdr-action-bar-dropdown-menu", inputs: ["alwaysShow"] }, { kind: "component", type: i1.CustomerLabelComponent, selector: "vdr-customer-label", inputs: ["customer"] }, { kind: "directive", type: i1.DropdownItemDirective, selector: "[vdrDropdownItem]" }, { kind: "component", type: i1.OrderStateLabelComponent, selector: "vdr-order-state-label", inputs: ["state"] }, { kind: "component", type: i1.FormattedAddressComponent, selector: "vdr-formatted-address", inputs: ["address"] }, { kind: "component", type: i1.ActionBarItemsComponent, selector: "vdr-action-bar-items" }, { kind: "component", type: i1.CustomDetailComponentHostComponent, selector: "vdr-custom-detail-component-host", inputs: ["locationId", "entity$", "detailForm"] }, { kind: "component", type: i1.PageBlockComponent, selector: "vdr-page-block" }, { kind: "component", type: i1.PageEntityInfoComponent, selector: "vdr-page-entity-info", inputs: ["entity"] }, { kind: "component", type: i1.PageDetailLayoutComponent, selector: "vdr-page-detail-layout" }, { kind: "component", type: i1.PageDetailSidebarComponent, selector: "vdr-page-detail-sidebar" }, { kind: "component", type: i1.CardComponent, selector: "vdr-card", inputs: ["title", "paddingX"] }, { kind: "directive", type: i1.CardControlsDirective, selector: "[vdrCardControls]" }, { kind: "component", type: OrderCustomFieldsCardComponent, selector: "vdr-order-custom-fields-card", inputs: ["customFieldsConfig", "customFieldValues"], outputs: ["updateClick"] }, { kind: "component", type: OrderTableComponent, selector: "vdr-order-table", inputs: ["order", "orderLineCustomFields", "isDraft"], outputs: ["adjust", "remove"] }, { kind: "component", type: DraftOrderVariantSelectorComponent, selector: "vdr-draft-order-variant-selector", inputs: ["currencyCode", "orderLineCustomFields"], outputs: ["addItem"] }, { kind: "component", type: CouponCodeSelectorComponent, selector: "vdr-coupon-code-selector", inputs: ["couponCodes", "control"], outputs: ["addCouponCode", "removeCouponCode"] }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i2$1.PercentPipe, name: "percent" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.LocaleCurrencyPipe, name: "localeCurrency" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
972
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DraftOrderDetailComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.DataService }, { token: i1.NotificationService }, { token: i1.ModalService }, { token: OrderTransitionService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
973
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: DraftOrderDetailComponent, selector: "vdr-draft-order-detail", usesInheritance: true, ngImport: i0, template: "<vdr-page-block>\r\n <vdr-action-bar *ngIf=\"entity$ | async as order\">\r\n <vdr-ab-left>\r\n <div class=\"flex clr-align-items-center\">\r\n <vdr-order-state-label [state]=\"order.state\"></vdr-order-state-label>\r\n </div>\r\n </vdr-ab-left>\r\n\r\n <vdr-ab-right>\r\n <vdr-action-bar-items locationId=\"draft-order-detail\" />\r\n <button\r\n class=\"btn btn-primary\"\r\n (click)=\"completeOrder()\"\r\n [disabled]=\"!order.customer || !order.lines.length || !order.shippingLines.length\"\r\n >\r\n <clr-icon shape=\"check\"></clr-icon>\r\n {{ 'order.complete-draft-order' | translate }}\r\n </button>\r\n <vdr-action-bar-dropdown-menu [alwaysShow]=\"true\" locationId=\"draft-order-detail\">\r\n <button type=\"button\" vdrDropdownItem (click)=\"deleteOrder()\">\r\n <clr-icon shape=\"trash\" class=\"is-danger\"></clr-icon>\r\n {{ 'order.delete-draft-order' | translate }}\r\n </button>\r\n </vdr-action-bar-dropdown-menu>\r\n </vdr-ab-right>\r\n </vdr-action-bar>\r\n</vdr-page-block>\r\n\r\n<vdr-page-detail-layout *ngIf=\"entity$ | async as order\">\r\n <vdr-page-detail-sidebar>\r\n <vdr-card [title]=\"'order.customer' | translate\">\r\n <ng-template vdrCardControls>\r\n <clr-icon *ngIf=\"!order.customer\" shape=\"unknown-status\" class=\"is-warning\"></clr-icon>\r\n <clr-icon *ngIf=\"order.customer\" shape=\"check\" class=\"is-success\"></clr-icon>\r\n </ng-template>\r\n <vdr-customer-label\r\n class=\"block mb-2\"\r\n *ngIf=\"order.customer\"\r\n [customer]=\"order.customer\"\r\n ></vdr-customer-label>\r\n <button class=\"button-small\" (click)=\"setCustomer()\">\r\n {{ 'order.set-customer-for-order' | translate }}\r\n </button>\r\n </vdr-card>\r\n <vdr-card [title]=\"'order.billing-address' | translate\">\r\n <ng-template vdrCardControls>\r\n <clr-icon\r\n *ngIf=\"!order.billingAddress.streetLine1\"\r\n shape=\"unknown-status\"\r\n class=\"is-warning\"\r\n ></clr-icon>\r\n <clr-icon\r\n *ngIf=\"order.billingAddress.streetLine1\"\r\n shape=\"check\"\r\n class=\"is-success\"\r\n ></clr-icon>\r\n </ng-template>\r\n <vdr-formatted-address\r\n class=\"block mb-2\"\r\n *ngIf=\"order.billingAddress\"\r\n [address]=\"order.billingAddress\"\r\n ></vdr-formatted-address>\r\n <button class=\"button-small\" (click)=\"setBillingAddress()\">\r\n {{ 'order.set-billing-address' | translate }}\r\n </button>\r\n </vdr-card>\r\n <vdr-card [title]=\"'order.shipping' | translate\">\r\n <ng-template vdrCardControls>\r\n <clr-icon\r\n *ngIf=\"!order.shippingAddress.streetLine1 || !order.shippingLines.length\"\r\n shape=\"unknown-status\"\r\n class=\"is-warning\"\r\n ></clr-icon>\r\n <clr-icon\r\n *ngIf=\"order.shippingAddress.streetLine1 && order.shippingLines.length\"\r\n shape=\"check\"\r\n class=\"is-success\"\r\n ></clr-icon>\r\n </ng-template>\r\n <vdr-formatted-address\r\n class=\"block mb-2\"\r\n *ngIf=\"order.shippingAddress\"\r\n [address]=\"order.shippingAddress\"\r\n ></vdr-formatted-address>\r\n <button class=\"button-small mr-2\" (click)=\"setShippingAddress()\">\r\n {{ 'order.set-shipping-address' | translate }}\r\n </button>\r\n\r\n <div *ngFor=\"let shippingLine of order.shippingLines\">\r\n {{ shippingLine.shippingMethod.name }}\r\n </div>\r\n <button class=\"button-small\" (click)=\"setShippingMethod()\">\r\n {{ 'order.set-shipping-method' | translate }}\r\n </button>\r\n </vdr-card>\r\n <vdr-card>\r\n <button\r\n *ngIf=\"order.couponCodes.length === 0 && !displayCouponCodeInput\"\r\n class=\"button-small\"\r\n (click)=\"displayCouponCodeInput = !displayCouponCodeInput\"\r\n >\r\n {{ 'order.set-coupon-codes' | translate }}\r\n </button>\r\n <div *ngIf=\"order.couponCodes.length || displayCouponCodeInput\">\r\n <label>{{ 'order.set-coupon-codes' | translate }}</label>\r\n <vdr-coupon-code-selector\r\n [couponCodes]=\"order.couponCodes\"\r\n (addCouponCode)=\"applyCouponCode($event)\"\r\n (removeCouponCode)=\"removeCouponCode($event)\"\r\n ></vdr-coupon-code-selector>\r\n </div>\r\n </vdr-card>\r\n <vdr-card>\r\n <vdr-page-entity-info *ngIf=\"entity$ | async as entity\" [entity]=\"entity\" />\r\n </vdr-card>\r\n </vdr-page-detail-sidebar>\r\n <vdr-page-block>\r\n <vdr-card>\r\n <vdr-draft-order-variant-selector\r\n [orderLineCustomFields]=\"orderLineCustomFields\"\r\n [currencyCode]=\"order.currencyCode\"\r\n (addItem)=\"addItemToOrder($event)\"\r\n ></vdr-draft-order-variant-selector>\r\n <vdr-order-table\r\n [order]=\"order\"\r\n [orderLineCustomFields]=\"orderLineCustomFields\"\r\n [isDraft]=\"true\"\r\n (adjust)=\"adjustOrderLine($event)\"\r\n (remove)=\"removeOrderLine($event)\"\r\n ></vdr-order-table>\r\n </vdr-card>\r\n <vdr-card [title]=\"'order.tax-summary' | translate\">\r\n <ng-container *ngIf=\"order.taxSummary.length\">\r\n <table class=\"table\">\r\n <thead>\r\n <tr>\r\n <th>{{ 'common.description' | translate }}</th>\r\n <th>{{ 'order.tax-rate' | translate }}</th>\r\n <th>{{ 'order.tax-base' | translate }}</th>\r\n <th>{{ 'order.tax-total' | translate }}</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let row of order.taxSummary\">\r\n <td>{{ row.description }}</td>\r\n <td>{{ row.taxRate / 100 | percent }}</td>\r\n <td>{{ row.taxBase | localeCurrency : order.currencyCode }}</td>\r\n <td>{{ row.taxTotal | localeCurrency : order.currencyCode }}</td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </ng-container>\r\n </vdr-card>\r\n <vdr-custom-detail-component-host\r\n locationId=\"draft-order-detail\"\r\n [entity$]=\"entity$\"\r\n [detailForm]=\"detailForm\"\r\n ></vdr-custom-detail-component-host>\r\n\r\n <vdr-order-custom-fields-card\r\n [customFieldsConfig]=\"customFields\"\r\n [customFieldValues]=\"order.customFields\"\r\n (updateClick)=\"updateCustomFields($event)\"\r\n ></vdr-order-custom-fields-card>\r\n </vdr-page-block>\r\n</vdr-page-detail-layout>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i3.ClrIconCustomTag, selector: "clr-icon" }, { kind: "directive", type: i3.ClrLabel, selector: "label", inputs: ["for"] }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1.ActionBarComponent, selector: "vdr-action-bar" }, { kind: "component", type: i1.ActionBarLeftComponent, selector: "vdr-ab-left", inputs: ["grow"] }, { kind: "component", type: i1.ActionBarRightComponent, selector: "vdr-ab-right", inputs: ["grow"] }, { kind: "component", type: i1.ActionBarDropdownMenuComponent, selector: "vdr-action-bar-dropdown-menu", inputs: ["alwaysShow"] }, { kind: "component", type: i1.CustomerLabelComponent, selector: "vdr-customer-label", inputs: ["customer"] }, { kind: "directive", type: i1.DropdownItemDirective, selector: "[vdrDropdownItem]" }, { kind: "component", type: i1.OrderStateLabelComponent, selector: "vdr-order-state-label", inputs: ["state"] }, { kind: "component", type: i1.FormattedAddressComponent, selector: "vdr-formatted-address", inputs: ["address"] }, { kind: "component", type: i1.ActionBarItemsComponent, selector: "vdr-action-bar-items" }, { kind: "component", type: i1.CustomDetailComponentHostComponent, selector: "vdr-custom-detail-component-host", inputs: ["locationId", "entity$", "detailForm"] }, { kind: "component", type: i1.PageBlockComponent, selector: "vdr-page-block" }, { kind: "component", type: i1.PageEntityInfoComponent, selector: "vdr-page-entity-info", inputs: ["entity"] }, { kind: "component", type: i1.PageDetailLayoutComponent, selector: "vdr-page-detail-layout" }, { kind: "component", type: i1.PageDetailSidebarComponent, selector: "vdr-page-detail-sidebar" }, { kind: "component", type: i1.CardComponent, selector: "vdr-card", inputs: ["title", "paddingX"] }, { kind: "directive", type: i1.CardControlsDirective, selector: "[vdrCardControls]" }, { kind: "component", type: OrderCustomFieldsCardComponent, selector: "vdr-order-custom-fields-card", inputs: ["customFieldsConfig", "customFieldValues"], outputs: ["updateClick"] }, { kind: "component", type: OrderTableComponent, selector: "vdr-order-table", inputs: ["order", "orderLineCustomFields", "isDraft"], outputs: ["adjust", "remove"] }, { kind: "component", type: DraftOrderVariantSelectorComponent, selector: "vdr-draft-order-variant-selector", inputs: ["currencyCode", "orderLineCustomFields"], outputs: ["addItem"] }, { kind: "component", type: CouponCodeSelectorComponent, selector: "vdr-coupon-code-selector", inputs: ["couponCodes", "control"], outputs: ["addCouponCode", "removeCouponCode"] }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i2$1.PercentPipe, name: "percent" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.LocaleCurrencyPipe, name: "localeCurrency" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
987
974
|
}
|
|
988
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
975
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DraftOrderDetailComponent, decorators: [{
|
|
989
976
|
type: Component,
|
|
990
977
|
args: [{ selector: 'vdr-draft-order-detail', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vdr-page-block>\r\n <vdr-action-bar *ngIf=\"entity$ | async as order\">\r\n <vdr-ab-left>\r\n <div class=\"flex clr-align-items-center\">\r\n <vdr-order-state-label [state]=\"order.state\"></vdr-order-state-label>\r\n </div>\r\n </vdr-ab-left>\r\n\r\n <vdr-ab-right>\r\n <vdr-action-bar-items locationId=\"draft-order-detail\" />\r\n <button\r\n class=\"btn btn-primary\"\r\n (click)=\"completeOrder()\"\r\n [disabled]=\"!order.customer || !order.lines.length || !order.shippingLines.length\"\r\n >\r\n <clr-icon shape=\"check\"></clr-icon>\r\n {{ 'order.complete-draft-order' | translate }}\r\n </button>\r\n <vdr-action-bar-dropdown-menu [alwaysShow]=\"true\" locationId=\"draft-order-detail\">\r\n <button type=\"button\" vdrDropdownItem (click)=\"deleteOrder()\">\r\n <clr-icon shape=\"trash\" class=\"is-danger\"></clr-icon>\r\n {{ 'order.delete-draft-order' | translate }}\r\n </button>\r\n </vdr-action-bar-dropdown-menu>\r\n </vdr-ab-right>\r\n </vdr-action-bar>\r\n</vdr-page-block>\r\n\r\n<vdr-page-detail-layout *ngIf=\"entity$ | async as order\">\r\n <vdr-page-detail-sidebar>\r\n <vdr-card [title]=\"'order.customer' | translate\">\r\n <ng-template vdrCardControls>\r\n <clr-icon *ngIf=\"!order.customer\" shape=\"unknown-status\" class=\"is-warning\"></clr-icon>\r\n <clr-icon *ngIf=\"order.customer\" shape=\"check\" class=\"is-success\"></clr-icon>\r\n </ng-template>\r\n <vdr-customer-label\r\n class=\"block mb-2\"\r\n *ngIf=\"order.customer\"\r\n [customer]=\"order.customer\"\r\n ></vdr-customer-label>\r\n <button class=\"button-small\" (click)=\"setCustomer()\">\r\n {{ 'order.set-customer-for-order' | translate }}\r\n </button>\r\n </vdr-card>\r\n <vdr-card [title]=\"'order.billing-address' | translate\">\r\n <ng-template vdrCardControls>\r\n <clr-icon\r\n *ngIf=\"!order.billingAddress.streetLine1\"\r\n shape=\"unknown-status\"\r\n class=\"is-warning\"\r\n ></clr-icon>\r\n <clr-icon\r\n *ngIf=\"order.billingAddress.streetLine1\"\r\n shape=\"check\"\r\n class=\"is-success\"\r\n ></clr-icon>\r\n </ng-template>\r\n <vdr-formatted-address\r\n class=\"block mb-2\"\r\n *ngIf=\"order.billingAddress\"\r\n [address]=\"order.billingAddress\"\r\n ></vdr-formatted-address>\r\n <button class=\"button-small\" (click)=\"setBillingAddress()\">\r\n {{ 'order.set-billing-address' | translate }}\r\n </button>\r\n </vdr-card>\r\n <vdr-card [title]=\"'order.shipping' | translate\">\r\n <ng-template vdrCardControls>\r\n <clr-icon\r\n *ngIf=\"!order.shippingAddress.streetLine1 || !order.shippingLines.length\"\r\n shape=\"unknown-status\"\r\n class=\"is-warning\"\r\n ></clr-icon>\r\n <clr-icon\r\n *ngIf=\"order.shippingAddress.streetLine1 && order.shippingLines.length\"\r\n shape=\"check\"\r\n class=\"is-success\"\r\n ></clr-icon>\r\n </ng-template>\r\n <vdr-formatted-address\r\n class=\"block mb-2\"\r\n *ngIf=\"order.shippingAddress\"\r\n [address]=\"order.shippingAddress\"\r\n ></vdr-formatted-address>\r\n <button class=\"button-small mr-2\" (click)=\"setShippingAddress()\">\r\n {{ 'order.set-shipping-address' | translate }}\r\n </button>\r\n\r\n <div *ngFor=\"let shippingLine of order.shippingLines\">\r\n {{ shippingLine.shippingMethod.name }}\r\n </div>\r\n <button class=\"button-small\" (click)=\"setShippingMethod()\">\r\n {{ 'order.set-shipping-method' | translate }}\r\n </button>\r\n </vdr-card>\r\n <vdr-card>\r\n <button\r\n *ngIf=\"order.couponCodes.length === 0 && !displayCouponCodeInput\"\r\n class=\"button-small\"\r\n (click)=\"displayCouponCodeInput = !displayCouponCodeInput\"\r\n >\r\n {{ 'order.set-coupon-codes' | translate }}\r\n </button>\r\n <div *ngIf=\"order.couponCodes.length || displayCouponCodeInput\">\r\n <label>{{ 'order.set-coupon-codes' | translate }}</label>\r\n <vdr-coupon-code-selector\r\n [couponCodes]=\"order.couponCodes\"\r\n (addCouponCode)=\"applyCouponCode($event)\"\r\n (removeCouponCode)=\"removeCouponCode($event)\"\r\n ></vdr-coupon-code-selector>\r\n </div>\r\n </vdr-card>\r\n <vdr-card>\r\n <vdr-page-entity-info *ngIf=\"entity$ | async as entity\" [entity]=\"entity\" />\r\n </vdr-card>\r\n </vdr-page-detail-sidebar>\r\n <vdr-page-block>\r\n <vdr-card>\r\n <vdr-draft-order-variant-selector\r\n [orderLineCustomFields]=\"orderLineCustomFields\"\r\n [currencyCode]=\"order.currencyCode\"\r\n (addItem)=\"addItemToOrder($event)\"\r\n ></vdr-draft-order-variant-selector>\r\n <vdr-order-table\r\n [order]=\"order\"\r\n [orderLineCustomFields]=\"orderLineCustomFields\"\r\n [isDraft]=\"true\"\r\n (adjust)=\"adjustOrderLine($event)\"\r\n (remove)=\"removeOrderLine($event)\"\r\n ></vdr-order-table>\r\n </vdr-card>\r\n <vdr-card [title]=\"'order.tax-summary' | translate\">\r\n <ng-container *ngIf=\"order.taxSummary.length\">\r\n <table class=\"table\">\r\n <thead>\r\n <tr>\r\n <th>{{ 'common.description' | translate }}</th>\r\n <th>{{ 'order.tax-rate' | translate }}</th>\r\n <th>{{ 'order.tax-base' | translate }}</th>\r\n <th>{{ 'order.tax-total' | translate }}</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let row of order.taxSummary\">\r\n <td>{{ row.description }}</td>\r\n <td>{{ row.taxRate / 100 | percent }}</td>\r\n <td>{{ row.taxBase | localeCurrency : order.currencyCode }}</td>\r\n <td>{{ row.taxTotal | localeCurrency : order.currencyCode }}</td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </ng-container>\r\n </vdr-card>\r\n <vdr-custom-detail-component-host\r\n locationId=\"draft-order-detail\"\r\n [entity$]=\"entity$\"\r\n [detailForm]=\"detailForm\"\r\n ></vdr-custom-detail-component-host>\r\n\r\n <vdr-order-custom-fields-card\r\n [customFieldsConfig]=\"customFields\"\r\n [customFieldValues]=\"order.customFields\"\r\n (updateClick)=\"updateCustomFields($event)\"\r\n ></vdr-order-custom-fields-card>\r\n </vdr-page-block>\r\n</vdr-page-detail-layout>\r\n" }]
|
|
991
978
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1.DataService }, { type: i1.NotificationService }, { type: i1.ModalService }, { type: OrderTransitionService }] });
|
|
@@ -1053,19 +1040,19 @@ class FulfillOrderDialogComponent {
|
|
|
1053
1040
|
cancel() {
|
|
1054
1041
|
this.resolveWith();
|
|
1055
1042
|
}
|
|
1056
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
1057
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.
|
|
1043
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FulfillOrderDialogComponent, deps: [{ token: i1.DataService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1044
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: FulfillOrderDialogComponent, selector: "vdr-fulfill-order-dialog", ngImport: i0, template: "<ng-template vdrDialogTitle>{{ 'order.fulfill-order' | translate }}</ng-template>\r\n\r\n<div class=\"fulfillment-wrapper\">\r\n <div class=\"order-table\">\r\n <table class=\"table\">\r\n <thead>\r\n <tr>\r\n <th></th>\r\n <th>{{ 'order.product-name' | translate }}</th>\r\n <th>{{ 'order.product-sku' | translate }}</th>\r\n <th>{{ 'order.unfulfilled' | translate }}</th>\r\n <th>{{ 'catalog.stock-on-hand' | translate }}</th>\r\n <th>{{ 'order.fulfill' | translate }}</th>\r\n </tr>\r\n </thead>\r\n <tr\r\n *ngFor=\"let line of order.lines\"\r\n class=\"order-line\"\r\n [class.ignore]=\"getUnfulfilledCount(line) === 0\"\r\n >\r\n <td class=\"align-middle thumb\">\r\n <img *ngIf=\"line.featuredAsset\" [src]=\"line.featuredAsset | assetPreview: 'tiny'\" />\r\n </td>\r\n <td class=\"align-middle name\">{{ line.productVariant.name }}</td>\r\n <td class=\"align-middle sku\">{{ line.productVariant.sku }}</td>\r\n <td class=\"align-middle quantity\">{{ getUnfulfilledCount(line) }}</td>\r\n <td class=\"align-middle quantity\">{{ line.productVariant.stockOnHand }}</td>\r\n <td class=\"align-middle fulfil\">\r\n <input\r\n *ngIf=\"fulfillmentQuantities[line.id]\"\r\n [disabled]=\"getUnfulfilledCount(line) === 0\"\r\n [(ngModel)]=\"fulfillmentQuantities[line.id].fulfillCount\"\r\n type=\"number\"\r\n [max]=\"fulfillmentQuantities[line.id].max\"\r\n min=\"0\"\r\n />\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n <div class=\"shipping-details\">\r\n <vdr-formatted-address [address]=\"order.shippingAddress\"></vdr-formatted-address>\r\n <h6>{{ 'order.shipping-method' | translate }}</h6>\r\n {{ order.shippingLines[0]?.shippingMethod?.name }}\r\n <strong>{{ order.shipping | localeCurrency: order.currencyCode }}</strong>\r\n <vdr-configurable-input\r\n [operationDefinition]=\"fulfillmentHandlerDef\"\r\n [operation]=\"fulfillmentHandler\"\r\n [formControl]=\"fulfillmentHandlerControl\"\r\n [removable]=\"false\"\r\n ></vdr-configurable-input>\r\n </div>\r\n</div>\r\n\r\n<ng-template vdrDialogButtons>\r\n <button type=\"button\" class=\"btn\" (click)=\"cancel()\">{{ 'common.cancel' | translate }}</button>\r\n <button type=\"submit\" (click)=\"select()\" [disabled]=\"!canSubmit()\" class=\"btn btn-primary\">\r\n {{ 'order.create-fulfillment' | translate }}\r\n </button>\r\n</ng-template>\r\n", styles: [":host{height:100%;display:flex;min-height:64vh}:host .is-cancelled td{text-decoration:line-through;background-color:var(--color-component-bg-200)}:host .sub-total td{border-top:1px dashed var(--color-component-border-200)}:host .total td{font-weight:700;border-top:1px dashed var(--color-component-border-200)}:host td.custom-fields-row{border-top-style:dashed;border-top-color:var(--color-grey-200)}:host img{border-radius:var(--border-radius-img)}:host .order-line-custom-fields{display:flex;flex-wrap:wrap}:host .order-line-custom-fields .custom-field{text-align:start;max-width:200px;overflow:hidden;text-overflow:ellipsis;margin-bottom:6px;margin-inline-end:18px}:host .draft-qty{max-width:48px}:host .order-line-custom-field{background-color:var(--color-component-bg-100)}:host .order-line-custom-field .custom-field-ellipsis{color:var(--color-text-300)}:host .net-price{font-size:11px;color:var(--color-text-300);line-height:14px}:host .promotions-label{text-decoration:underline dotted var(--color-text-200);font-size:11px;margin-top:6px;cursor:pointer;text-transform:lowercase}:host .thumb img{width:50px;height:50px}:host .shipping-method-name{font-size:var(--font-size-xs);margin-inline-end:2px}:host .order-placed-quantity{text-decoration:line-through;color:var(--color-text-300);margin-inline-end:2px}.fulfillment-wrapper{flex:1}@media screen and (min-width: 768px){.fulfillment-wrapper{display:flex;flex-direction:row}}.fulfillment-wrapper .shipping-details{margin-top:24px}@media screen and (min-width: 768px){.fulfillment-wrapper .shipping-details{margin-top:0;margin-inline-start:24px;width:250px}}.fulfillment-wrapper .shipping-details clr-input-container{margin-top:24px}.fulfillment-wrapper .order-table{flex:1;overflow-y:auto}.fulfillment-wrapper .order-table table{margin-top:0}.fulfillment-wrapper tr.ignore{color:var(--color-grey-300)}\n"], dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i2.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i1.ConfigurableInputComponent, selector: "vdr-configurable-input", inputs: ["operation", "operationDefinition", "readonly", "removable", "position", "hideDescription"], outputs: ["remove"] }, { kind: "directive", type: i1.FormFieldControlDirective, selector: "input, textarea, select, vdr-currency-input" }, { kind: "directive", type: i1.DialogButtonsDirective, selector: "[vdrDialogButtons]" }, { kind: "directive", type: i1.DialogTitleDirective, selector: "[vdrDialogTitle]" }, { kind: "component", type: i1.FormattedAddressComponent, selector: "vdr-formatted-address", inputs: ["address"] }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.AssetPreviewPipe, name: "assetPreview" }, { kind: "pipe", type: i1.LocaleCurrencyPipe, name: "localeCurrency" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1058
1045
|
}
|
|
1059
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
1046
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FulfillOrderDialogComponent, decorators: [{
|
|
1060
1047
|
type: Component,
|
|
1061
1048
|
args: [{ selector: 'vdr-fulfill-order-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template vdrDialogTitle>{{ 'order.fulfill-order' | translate }}</ng-template>\r\n\r\n<div class=\"fulfillment-wrapper\">\r\n <div class=\"order-table\">\r\n <table class=\"table\">\r\n <thead>\r\n <tr>\r\n <th></th>\r\n <th>{{ 'order.product-name' | translate }}</th>\r\n <th>{{ 'order.product-sku' | translate }}</th>\r\n <th>{{ 'order.unfulfilled' | translate }}</th>\r\n <th>{{ 'catalog.stock-on-hand' | translate }}</th>\r\n <th>{{ 'order.fulfill' | translate }}</th>\r\n </tr>\r\n </thead>\r\n <tr\r\n *ngFor=\"let line of order.lines\"\r\n class=\"order-line\"\r\n [class.ignore]=\"getUnfulfilledCount(line) === 0\"\r\n >\r\n <td class=\"align-middle thumb\">\r\n <img *ngIf=\"line.featuredAsset\" [src]=\"line.featuredAsset | assetPreview: 'tiny'\" />\r\n </td>\r\n <td class=\"align-middle name\">{{ line.productVariant.name }}</td>\r\n <td class=\"align-middle sku\">{{ line.productVariant.sku }}</td>\r\n <td class=\"align-middle quantity\">{{ getUnfulfilledCount(line) }}</td>\r\n <td class=\"align-middle quantity\">{{ line.productVariant.stockOnHand }}</td>\r\n <td class=\"align-middle fulfil\">\r\n <input\r\n *ngIf=\"fulfillmentQuantities[line.id]\"\r\n [disabled]=\"getUnfulfilledCount(line) === 0\"\r\n [(ngModel)]=\"fulfillmentQuantities[line.id].fulfillCount\"\r\n type=\"number\"\r\n [max]=\"fulfillmentQuantities[line.id].max\"\r\n min=\"0\"\r\n />\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n <div class=\"shipping-details\">\r\n <vdr-formatted-address [address]=\"order.shippingAddress\"></vdr-formatted-address>\r\n <h6>{{ 'order.shipping-method' | translate }}</h6>\r\n {{ order.shippingLines[0]?.shippingMethod?.name }}\r\n <strong>{{ order.shipping | localeCurrency: order.currencyCode }}</strong>\r\n <vdr-configurable-input\r\n [operationDefinition]=\"fulfillmentHandlerDef\"\r\n [operation]=\"fulfillmentHandler\"\r\n [formControl]=\"fulfillmentHandlerControl\"\r\n [removable]=\"false\"\r\n ></vdr-configurable-input>\r\n </div>\r\n</div>\r\n\r\n<ng-template vdrDialogButtons>\r\n <button type=\"button\" class=\"btn\" (click)=\"cancel()\">{{ 'common.cancel' | translate }}</button>\r\n <button type=\"submit\" (click)=\"select()\" [disabled]=\"!canSubmit()\" class=\"btn btn-primary\">\r\n {{ 'order.create-fulfillment' | translate }}\r\n </button>\r\n</ng-template>\r\n", styles: [":host{height:100%;display:flex;min-height:64vh}:host .is-cancelled td{text-decoration:line-through;background-color:var(--color-component-bg-200)}:host .sub-total td{border-top:1px dashed var(--color-component-border-200)}:host .total td{font-weight:700;border-top:1px dashed var(--color-component-border-200)}:host td.custom-fields-row{border-top-style:dashed;border-top-color:var(--color-grey-200)}:host img{border-radius:var(--border-radius-img)}:host .order-line-custom-fields{display:flex;flex-wrap:wrap}:host .order-line-custom-fields .custom-field{text-align:start;max-width:200px;overflow:hidden;text-overflow:ellipsis;margin-bottom:6px;margin-inline-end:18px}:host .draft-qty{max-width:48px}:host .order-line-custom-field{background-color:var(--color-component-bg-100)}:host .order-line-custom-field .custom-field-ellipsis{color:var(--color-text-300)}:host .net-price{font-size:11px;color:var(--color-text-300);line-height:14px}:host .promotions-label{text-decoration:underline dotted var(--color-text-200);font-size:11px;margin-top:6px;cursor:pointer;text-transform:lowercase}:host .thumb img{width:50px;height:50px}:host .shipping-method-name{font-size:var(--font-size-xs);margin-inline-end:2px}:host .order-placed-quantity{text-decoration:line-through;color:var(--color-text-300);margin-inline-end:2px}.fulfillment-wrapper{flex:1}@media screen and (min-width: 768px){.fulfillment-wrapper{display:flex;flex-direction:row}}.fulfillment-wrapper .shipping-details{margin-top:24px}@media screen and (min-width: 768px){.fulfillment-wrapper .shipping-details{margin-top:0;margin-inline-start:24px;width:250px}}.fulfillment-wrapper .shipping-details clr-input-container{margin-top:24px}.fulfillment-wrapper .order-table{flex:1;overflow-y:auto}.fulfillment-wrapper .order-table table{margin-top:0}.fulfillment-wrapper tr.ignore{color:var(--color-grey-300)}\n"] }]
|
|
1062
1049
|
}], ctorParameters: () => [{ type: i1.DataService }, { type: i0.ChangeDetectorRef }] });
|
|
1063
1050
|
|
|
1064
1051
|
class SimpleItemListComponent {
|
|
1065
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
1066
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.
|
|
1052
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SimpleItemListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1053
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SimpleItemListComponent, selector: "vdr-simple-item-list", inputs: { items: "items" }, ngImport: i0, template: "<div class=\"items-list\">\r\n <ul>\r\n <li *ngFor=\"let item of items\" [title]=\"item.name\">\r\n <div class=\"quantity\" *ngIf=\"item.quantity != null\">{{ item.quantity }}</div>\r\n <clr-icon shape=\"times\" size=\"12\" *ngIf=\"item.quantity != null\"></clr-icon>\r\n {{ item.name }}\r\n </li>\r\n </ul>\r\n</div>\r\n", styles: [".items-list{font-size:12px}.items-list ul{margin-top:6px;list-style-type:none;margin-inline-start:2px}.items-list ul li{line-height:14px;text-overflow:ellipsis;overflow:hidden}.items-list .quantity{min-width:16px;display:inline-block}\n"], dependencies: [{ kind: "directive", type: i3.ClrIconCustomTag, selector: "clr-icon" }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1067
1054
|
}
|
|
1068
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
1055
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SimpleItemListComponent, decorators: [{
|
|
1069
1056
|
type: Component,
|
|
1070
1057
|
args: [{ selector: 'vdr-simple-item-list', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"items-list\">\r\n <ul>\r\n <li *ngFor=\"let item of items\" [title]=\"item.name\">\r\n <div class=\"quantity\" *ngIf=\"item.quantity != null\">{{ item.quantity }}</div>\r\n <clr-icon shape=\"times\" size=\"12\" *ngIf=\"item.quantity != null\"></clr-icon>\r\n {{ item.name }}\r\n </li>\r\n </ul>\r\n</div>\r\n", styles: [".items-list{font-size:12px}.items-list ul{margin-top:6px;list-style-type:none;margin-inline-start:2px}.items-list ul li{line-height:14px;text-overflow:ellipsis;overflow:hidden}.items-list .quantity{min-width:16px;display:inline-block}\n"] }]
|
|
1071
1058
|
}], propDecorators: { items: [{
|
|
@@ -1102,10 +1089,10 @@ class FulfillmentDetailComponent {
|
|
|
1102
1089
|
customFieldIsObject(customField) {
|
|
1103
1090
|
return Array.isArray(customField) || isObject(customField);
|
|
1104
1091
|
}
|
|
1105
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
1106
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.
|
|
1092
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FulfillmentDetailComponent, deps: [{ token: i1.ServerConfigService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1093
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: FulfillmentDetailComponent, selector: "vdr-fulfillment-detail", inputs: { fulfillmentId: "fulfillmentId", order: "order" }, usesOnChanges: true, ngImport: i0, template: "<vdr-labeled-data [label]=\"'common.created-at' | translate\">\r\n {{ fulfillment?.createdAt | localeDate: 'medium' }}\r\n</vdr-labeled-data>\r\n<vdr-labeled-data [label]=\"'order.fulfillment-method' | translate\">\r\n {{ fulfillment?.method }}\r\n</vdr-labeled-data>\r\n<vdr-labeled-data *ngIf=\"fulfillment?.trackingCode\" [label]=\"'order.tracking-code' | translate\">\r\n {{ fulfillment?.trackingCode }}\r\n</vdr-labeled-data>\r\n<vdr-labeled-data [label]=\"'order.contents' | translate\">\r\n <vdr-simple-item-list [items]=\"items\"></vdr-simple-item-list>\r\n</vdr-labeled-data>\r\n<ng-container *ngFor=\"let customField of customFieldConfig\">\r\n <vdr-custom-field-control\r\n *ngIf=\"customFieldFormGroup.get(customField.name)\"\r\n [readonly]=\"true\"\r\n [compact]=\"true\"\r\n [customField]=\"customField\"\r\n [customFieldsFormGroup]=\"customFieldFormGroup\"\r\n ></vdr-custom-field-control>\r\n</ng-container>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1.CustomFieldControlComponent, selector: "vdr-custom-field-control", inputs: ["entityName", "customFieldsFormGroup", "customField", "compact", "showLabel", "readonly"] }, { kind: "component", type: i1.LabeledDataComponent, selector: "vdr-labeled-data", inputs: ["label"] }, { kind: "component", type: SimpleItemListComponent, selector: "vdr-simple-item-list", inputs: ["items"] }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.LocaleDatePipe, name: "localeDate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1107
1094
|
}
|
|
1108
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
1095
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FulfillmentDetailComponent, decorators: [{
|
|
1109
1096
|
type: Component,
|
|
1110
1097
|
args: [{ selector: 'vdr-fulfillment-detail', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vdr-labeled-data [label]=\"'common.created-at' | translate\">\r\n {{ fulfillment?.createdAt | localeDate: 'medium' }}\r\n</vdr-labeled-data>\r\n<vdr-labeled-data [label]=\"'order.fulfillment-method' | translate\">\r\n {{ fulfillment?.method }}\r\n</vdr-labeled-data>\r\n<vdr-labeled-data *ngIf=\"fulfillment?.trackingCode\" [label]=\"'order.tracking-code' | translate\">\r\n {{ fulfillment?.trackingCode }}\r\n</vdr-labeled-data>\r\n<vdr-labeled-data [label]=\"'order.contents' | translate\">\r\n <vdr-simple-item-list [items]=\"items\"></vdr-simple-item-list>\r\n</vdr-labeled-data>\r\n<ng-container *ngFor=\"let customField of customFieldConfig\">\r\n <vdr-custom-field-control\r\n *ngIf=\"customFieldFormGroup.get(customField.name)\"\r\n [readonly]=\"true\"\r\n [compact]=\"true\"\r\n [customField]=\"customField\"\r\n [customFieldsFormGroup]=\"customFieldFormGroup\"\r\n ></vdr-custom-field-control>\r\n</ng-container>\r\n" }]
|
|
1111
1098
|
}], ctorParameters: () => [{ type: i1.ServerConfigService }], propDecorators: { fulfillmentId: [{
|
|
@@ -1126,10 +1113,10 @@ class FulfillmentStateLabelComponent {
|
|
|
1126
1113
|
return 'error';
|
|
1127
1114
|
}
|
|
1128
1115
|
}
|
|
1129
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
1130
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.
|
|
1116
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FulfillmentStateLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1117
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: FulfillmentStateLabelComponent, selector: "vdr-fulfillment-state-label", inputs: { state: "state" }, ngImport: i0, template: "<vdr-chip [title]=\"'order.payment-state' | translate\" [colorType]=\"chipColorType\">\r\n <clr-icon shape=\"check-circle\" *ngIf=\"state === 'Delivered'\"></clr-icon>\r\n {{ state | stateI18nToken | translate }}\r\n</vdr-chip>\r\n", styles: [":host{font-size:14px}\n"], dependencies: [{ kind: "directive", type: i3.ClrIconCustomTag, selector: "clr-icon" }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1.ChipComponent, selector: "vdr-chip", inputs: ["icon", "invert", "colorFrom", "colorType"], outputs: ["iconClick"] }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.StateI18nTokenPipe, name: "stateI18nToken" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1131
1118
|
}
|
|
1132
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
1119
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FulfillmentStateLabelComponent, decorators: [{
|
|
1133
1120
|
type: Component,
|
|
1134
1121
|
args: [{ selector: 'vdr-fulfillment-state-label', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vdr-chip [title]=\"'order.payment-state' | translate\" [colorType]=\"chipColorType\">\r\n <clr-icon shape=\"check-circle\" *ngIf=\"state === 'Delivered'\"></clr-icon>\r\n {{ state | stateI18nToken | translate }}\r\n</vdr-chip>\r\n", styles: [":host{font-size:14px}\n"] }]
|
|
1135
1122
|
}], propDecorators: { state: [{
|
|
@@ -1162,10 +1149,10 @@ class FulfillmentCardComponent {
|
|
|
1162
1149
|
const suggested = this.nextSuggestedState();
|
|
1163
1150
|
return this.fulfillment.nextStates.filter(s => s !== suggested);
|
|
1164
1151
|
}
|
|
1165
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
1166
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.
|
|
1152
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FulfillmentCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1153
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: FulfillmentCardComponent, selector: "vdr-fulfillment-card", inputs: { fulfillment: "fulfillment", order: "order" }, outputs: { transitionState: "transitionState" }, ngImport: i0, template: "<div class=\"card\">\r\n <div class=\"card-header fulfillment-header\">\r\n <div>{{ 'order.fulfillment' | translate }}</div>\r\n <div class=\"fulfillment-state\">\r\n <vdr-fulfillment-state-label [state]=\"fulfillment?.state\"></vdr-fulfillment-state-label>\r\n </div>\r\n </div>\r\n <div class=\"card-block\">\r\n <vdr-fulfillment-detail\r\n *ngIf=\"!!fulfillment\"\r\n [fulfillmentId]=\"fulfillment?.id\"\r\n [order]=\"order\"\r\n ></vdr-fulfillment-detail>\r\n </div>\r\n <div class=\"card-footer\" *ngIf=\"fulfillment?.nextStates.length\">\r\n <ng-container *ngIf=\"nextSuggestedState() as suggestedState\">\r\n <button class=\"btn btn-sm btn-primary\" (click)=\"transitionState.emit(suggestedState)\">\r\n {{ 'order.set-fulfillment-state' | translate: { state: (suggestedState | stateI18nToken | translate) } }}\r\n </button>\r\n </ng-container>\r\n <vdr-dropdown>\r\n <button class=\"icon-button\" vdrDropdownTrigger>\r\n <clr-icon shape=\"ellipsis-vertical\"></clr-icon>\r\n </button>\r\n <vdr-dropdown-menu vdrPosition=\"bottom-right\">\r\n <ng-container *ngFor=\"let nextState of nextOtherStates()\">\r\n <button\r\n type=\"button\"\r\n vdrDropdownItem\r\n (click)=\"transitionState.emit(nextState)\"\r\n >\r\n <ng-container *ngIf=\"nextState !== 'Cancelled'; else cancel\">\r\n <clr-icon shape=\"step-forward-2\"></clr-icon>\r\n {{ 'order.transition-to-state' | translate: { state: (nextState | stateI18nToken | translate) } }}\r\n </ng-container>\r\n <ng-template #cancel>\r\n <clr-icon shape=\"error-standard\" class=\"is-error\"></clr-icon>\r\n {{ 'order.cancel-fulfillment' | translate }}\r\n </ng-template>\r\n </button>\r\n </ng-container>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n </div>\r\n</div>\r\n", styles: [".fulfillment-header{display:flex;justify-content:space-between;align-items:center}.card-footer{display:flex;align-items:center;justify-content:flex-end}\n"], dependencies: [{ kind: "directive", type: i3.ClrIconCustomTag, selector: "clr-icon" }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1.DropdownComponent, selector: "vdr-dropdown", inputs: ["manualToggle"] }, { kind: "component", type: i1.DropdownMenuComponent, selector: "vdr-dropdown-menu", inputs: ["vdrPosition", "customClasses"] }, { kind: "directive", type: i1.DropdownTriggerDirective, selector: "[vdrDropdownTrigger]" }, { kind: "directive", type: i1.DropdownItemDirective, selector: "[vdrDropdownItem]" }, { kind: "component", type: FulfillmentDetailComponent, selector: "vdr-fulfillment-detail", inputs: ["fulfillmentId", "order"] }, { kind: "component", type: FulfillmentStateLabelComponent, selector: "vdr-fulfillment-state-label", inputs: ["state"] }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.StateI18nTokenPipe, name: "stateI18nToken" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1167
1154
|
}
|
|
1168
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
1155
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FulfillmentCardComponent, decorators: [{
|
|
1169
1156
|
type: Component,
|
|
1170
1157
|
args: [{ selector: 'vdr-fulfillment-card', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"card\">\r\n <div class=\"card-header fulfillment-header\">\r\n <div>{{ 'order.fulfillment' | translate }}</div>\r\n <div class=\"fulfillment-state\">\r\n <vdr-fulfillment-state-label [state]=\"fulfillment?.state\"></vdr-fulfillment-state-label>\r\n </div>\r\n </div>\r\n <div class=\"card-block\">\r\n <vdr-fulfillment-detail\r\n *ngIf=\"!!fulfillment\"\r\n [fulfillmentId]=\"fulfillment?.id\"\r\n [order]=\"order\"\r\n ></vdr-fulfillment-detail>\r\n </div>\r\n <div class=\"card-footer\" *ngIf=\"fulfillment?.nextStates.length\">\r\n <ng-container *ngIf=\"nextSuggestedState() as suggestedState\">\r\n <button class=\"btn btn-sm btn-primary\" (click)=\"transitionState.emit(suggestedState)\">\r\n {{ 'order.set-fulfillment-state' | translate: { state: (suggestedState | stateI18nToken | translate) } }}\r\n </button>\r\n </ng-container>\r\n <vdr-dropdown>\r\n <button class=\"icon-button\" vdrDropdownTrigger>\r\n <clr-icon shape=\"ellipsis-vertical\"></clr-icon>\r\n </button>\r\n <vdr-dropdown-menu vdrPosition=\"bottom-right\">\r\n <ng-container *ngFor=\"let nextState of nextOtherStates()\">\r\n <button\r\n type=\"button\"\r\n vdrDropdownItem\r\n (click)=\"transitionState.emit(nextState)\"\r\n >\r\n <ng-container *ngIf=\"nextState !== 'Cancelled'; else cancel\">\r\n <clr-icon shape=\"step-forward-2\"></clr-icon>\r\n {{ 'order.transition-to-state' | translate: { state: (nextState | stateI18nToken | translate) } }}\r\n </ng-container>\r\n <ng-template #cancel>\r\n <clr-icon shape=\"error-standard\" class=\"is-error\"></clr-icon>\r\n {{ 'order.cancel-fulfillment' | translate }}\r\n </ng-template>\r\n </button>\r\n </ng-container>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n </div>\r\n</div>\r\n", styles: [".fulfillment-header{display:flex;justify-content:space-between;align-items:center}.card-footer{display:flex;align-items:center;justify-content:flex-end}\n"] }]
|
|
1171
1158
|
}], propDecorators: { fulfillment: [{
|
|
@@ -1229,10 +1216,10 @@ class ModificationDetailComponent {
|
|
|
1229
1216
|
}
|
|
1230
1217
|
return { added, removed, modified };
|
|
1231
1218
|
}
|
|
1232
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
1233
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.
|
|
1219
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ModificationDetailComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1220
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ModificationDetailComponent, selector: "vdr-modification-detail", inputs: { order: "order", modification: "modification" }, usesOnChanges: true, ngImport: i0, template: "<vdr-labeled-data [label]=\"'common.ID' | translate\">{{ modification.id }}</vdr-labeled-data>\r\n<vdr-labeled-data *ngIf=\"modification.note\" [label]=\"'order.note' | translate\">{{\r\n modification.note\r\n}}</vdr-labeled-data>\r\n<vdr-labeled-data *ngFor=\"let surcharge of modification.surcharges\" [label]=\"'order.surcharges' | translate\">\r\n {{ getSurcharge(surcharge.id)?.description }}\r\n {{ getSurcharge(surcharge.id)?.priceWithTax | localeCurrency: order.currencyCode }}</vdr-labeled-data\r\n>\r\n<vdr-labeled-data *ngIf=\"getAddedItems().length\" [label]=\"'order.added-items' | translate\">\r\n <vdr-simple-item-list [items]=\"getAddedItems()\"></vdr-simple-item-list>\r\n</vdr-labeled-data>\r\n<vdr-labeled-data *ngIf=\"getRemovedItems().length\" [label]=\"'order.removed-items' | translate\">\r\n <vdr-simple-item-list [items]=\"getRemovedItems()\"></vdr-simple-item-list>\r\n</vdr-labeled-data>\r\n<vdr-labeled-data *ngIf=\"getModifiedItems().length\" [label]=\"'order.modified-items' | translate\">\r\n <vdr-simple-item-list [items]=\"getModifiedItems()\"></vdr-simple-item-list>\r\n</vdr-labeled-data>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1.LabeledDataComponent, selector: "vdr-labeled-data", inputs: ["label"] }, { kind: "component", type: SimpleItemListComponent, selector: "vdr-simple-item-list", inputs: ["items"] }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.LocaleCurrencyPipe, name: "localeCurrency" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1234
1221
|
}
|
|
1235
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
1222
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ModificationDetailComponent, decorators: [{
|
|
1236
1223
|
type: Component,
|
|
1237
1224
|
args: [{ selector: 'vdr-modification-detail', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vdr-labeled-data [label]=\"'common.ID' | translate\">{{ modification.id }}</vdr-labeled-data>\r\n<vdr-labeled-data *ngIf=\"modification.note\" [label]=\"'order.note' | translate\">{{\r\n modification.note\r\n}}</vdr-labeled-data>\r\n<vdr-labeled-data *ngFor=\"let surcharge of modification.surcharges\" [label]=\"'order.surcharges' | translate\">\r\n {{ getSurcharge(surcharge.id)?.description }}\r\n {{ getSurcharge(surcharge.id)?.priceWithTax | localeCurrency: order.currencyCode }}</vdr-labeled-data\r\n>\r\n<vdr-labeled-data *ngIf=\"getAddedItems().length\" [label]=\"'order.added-items' | translate\">\r\n <vdr-simple-item-list [items]=\"getAddedItems()\"></vdr-simple-item-list>\r\n</vdr-labeled-data>\r\n<vdr-labeled-data *ngIf=\"getRemovedItems().length\" [label]=\"'order.removed-items' | translate\">\r\n <vdr-simple-item-list [items]=\"getRemovedItems()\"></vdr-simple-item-list>\r\n</vdr-labeled-data>\r\n<vdr-labeled-data *ngIf=\"getModifiedItems().length\" [label]=\"'order.modified-items' | translate\">\r\n <vdr-simple-item-list [items]=\"getModifiedItems()\"></vdr-simple-item-list>\r\n</vdr-labeled-data>\r\n" }]
|
|
1238
1225
|
}], propDecorators: { order: [{
|
|
@@ -1274,10 +1261,10 @@ class OrderProcessNodeComponent {
|
|
|
1274
1261
|
'left.px': pos.x,
|
|
1275
1262
|
};
|
|
1276
1263
|
}
|
|
1277
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
1278
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.
|
|
1264
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: OrderProcessNodeComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1265
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: OrderProcessNodeComponent, selector: "vdr-order-process-node", inputs: { node: "node", index: "index", active: "active" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"node-wrapper\" [ngStyle]=\"getStyle()\" [class.active]=\"active$ | async\">\r\n <div\r\n class=\"node\"\r\n [class.active-target]=\"activeTarget$ | async\"\r\n >\r\n {{ node.name | stateI18nToken | translate }}\r\n </div>\r\n <div class=\"cancelled-wrapper\" *ngIf=\"isCancellable\">\r\n <div class=\"cancelled-edge\">\r\n </div>\r\n <clr-icon shape=\"dot-circle\"></clr-icon>\r\n <div class=\"cancelled-node\">\r\n {{ cancelledState | stateI18nToken | translate }}\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [":host{display:block}.node-wrapper{position:absolute;z-index:1;display:flex;align-items:center}.node{display:inline-block;border:2px solid var(--color-component-border-200);border-radius:3px;padding:3px 6px;z-index:1;background-color:var(--color-component-bg-100);opacity:.7;transition:opacity .2s,background-color .2s,color .2s;cursor:default}.node.active-target{border-color:var(--color-primary-500);opacity:.9}.cancelled-wrapper{display:flex;align-items:center;color:var(--color-grey-300);transition:color .2s,opacity .2s;opacity:.7}.cancelled-edge{width:48px;height:2px;background-color:var(--color-component-bg-300);transition:background-color .2s}clr-icon{margin-inline-start:-1px}.cancelled-node{margin-inline-start:6px}.active .cancelled-wrapper{opacity:1}.active .node{opacity:1;background-color:var(--color-primary-600);border-color:var(--color-primary-600);color:var(--color-primary-100)}.active .cancelled-wrapper{color:var(--color-error-500)}.active .cancelled-edge{background-color:var(--color-error-500)}\n"], dependencies: [{ kind: "directive", type: i3.ClrIconCustomTag, selector: "clr-icon" }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.StateI18nTokenPipe, name: "stateI18nToken" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1279
1266
|
}
|
|
1280
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
1267
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: OrderProcessNodeComponent, decorators: [{
|
|
1281
1268
|
type: Component,
|
|
1282
1269
|
args: [{ selector: 'vdr-order-process-node', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"node-wrapper\" [ngStyle]=\"getStyle()\" [class.active]=\"active$ | async\">\r\n <div\r\n class=\"node\"\r\n [class.active-target]=\"activeTarget$ | async\"\r\n >\r\n {{ node.name | stateI18nToken | translate }}\r\n </div>\r\n <div class=\"cancelled-wrapper\" *ngIf=\"isCancellable\">\r\n <div class=\"cancelled-edge\">\r\n </div>\r\n <clr-icon shape=\"dot-circle\"></clr-icon>\r\n <div class=\"cancelled-node\">\r\n {{ cancelledState | stateI18nToken | translate }}\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [":host{display:block}.node-wrapper{position:absolute;z-index:1;display:flex;align-items:center}.node{display:inline-block;border:2px solid var(--color-component-border-200);border-radius:3px;padding:3px 6px;z-index:1;background-color:var(--color-component-bg-100);opacity:.7;transition:opacity .2s,background-color .2s,color .2s;cursor:default}.node.active-target{border-color:var(--color-primary-500);opacity:.9}.cancelled-wrapper{display:flex;align-items:center;color:var(--color-grey-300);transition:color .2s,opacity .2s;opacity:.7}.cancelled-edge{width:48px;height:2px;background-color:var(--color-component-bg-300);transition:background-color .2s}clr-icon{margin-inline-start:-1px}.cancelled-node{margin-inline-start:6px}.active .cancelled-wrapper{opacity:1}.active .node{opacity:1;background-color:var(--color-primary-600);border-color:var(--color-primary-600);color:var(--color-primary-100)}.active .cancelled-wrapper{color:var(--color-error-500)}.active .cancelled-edge{background-color:var(--color-error-500)}\n"] }]
|
|
1283
1270
|
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { node: [{
|
|
@@ -1314,10 +1301,10 @@ class OrderProcessEdgeComponent {
|
|
|
1314
1301
|
: {}),
|
|
1315
1302
|
};
|
|
1316
1303
|
}
|
|
1317
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
1318
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.
|
|
1304
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: OrderProcessEdgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1305
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: OrderProcessEdgeComponent, selector: "vdr-order-process-edge", inputs: { from: "from", to: "to", index: "index" }, ngImport: i0, template: "<div\r\n [attr.data-from]=\"from.node.name\"\r\n [attr.data-to]=\"to.node.name\"\r\n [ngStyle]=\"getStyle()\"\r\n [class.active]=\"active$ | async\"\r\n class=\"edge\">\r\n <clr-icon shape=\"arrow\" flip=\"vertical\" class=\"arrow\"></clr-icon>\r\n</div>\r\n", styles: [".edge{position:absolute;border:1px solid var(--color-component-border-200);background-color:var(--color-component-bg-300);opacity:.3;transition:border .2s,opacity .2s,background-color .2s}.edge.active{border-color:var(--color-primary-500);background-color:var(--color-primary-500);opacity:1}.edge.active .arrow{color:var(--color-primary-500)}.edge .arrow{position:absolute;bottom:-4px;left:-8px;color:var(--color-grey-300)}\n"], dependencies: [{ kind: "directive", type: i3.ClrIconCustomTag, selector: "clr-icon" }, { kind: "directive", type: i2$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1319
1306
|
}
|
|
1320
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
1307
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: OrderProcessEdgeComponent, decorators: [{
|
|
1321
1308
|
type: Component,
|
|
1322
1309
|
args: [{ selector: 'vdr-order-process-edge', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n [attr.data-from]=\"from.node.name\"\r\n [attr.data-to]=\"to.node.name\"\r\n [ngStyle]=\"getStyle()\"\r\n [class.active]=\"active$ | async\"\r\n class=\"edge\">\r\n <clr-icon shape=\"arrow\" flip=\"vertical\" class=\"arrow\"></clr-icon>\r\n</div>\r\n", styles: [".edge{position:absolute;border:1px solid var(--color-component-border-200);background-color:var(--color-component-bg-300);opacity:.3;transition:border .2s,opacity .2s,background-color .2s}.edge.active{border-color:var(--color-primary-500);background-color:var(--color-primary-500);opacity:1}.edge.active .arrow{color:var(--color-primary-500)}.edge .arrow{position:absolute;bottom:-4px;left:-8px;color:var(--color-grey-300)}\n"] }]
|
|
1323
1310
|
}], propDecorators: { from: [{
|
|
@@ -1397,10 +1384,10 @@ class OrderProcessGraphComponent {
|
|
|
1397
1384
|
this.edges = [...this.edges];
|
|
1398
1385
|
this.changeDetector.markForCheck();
|
|
1399
1386
|
}
|
|
1400
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
1401
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.
|
|
1387
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: OrderProcessGraphComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1388
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: OrderProcessGraphComponent, selector: "vdr-order-process-graph", inputs: { states: "states", initialState: "initialState" }, host: { properties: { "style.height.px": "this.outerHeight" } }, viewQueries: [{ propertyName: "nodeComponents", predicate: OrderProcessNodeComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ng-container *ngFor=\"let state of nodes; let i = index\">\r\n <vdr-order-process-node\r\n [node]=\"state\"\r\n [index]=\"i\"\r\n [active]=\"(activeState$ | async) === state.name\"\r\n (mouseenter)=\"onMouseOver(state.name)\"\r\n (mouseleave)=\"onMouseOut()\"\r\n ></vdr-order-process-node>\r\n</ng-container>\r\n<ng-container *ngFor=\"let edge of edges\">\r\n <vdr-order-process-edge [from]=\"edge.from\" [to]=\"edge.to\" [index]=\"edge.index\"></vdr-order-process-edge>\r\n</ng-container>\r\n", styles: [":host{display:block;border:1px hotpink;margin:20px;padding:12px;position:relative}.state-row{display:flex}\n"], dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: OrderProcessNodeComponent, selector: "vdr-order-process-node", inputs: ["node", "index", "active"] }, { kind: "component", type: OrderProcessEdgeComponent, selector: "vdr-order-process-edge", inputs: ["from", "to", "index"] }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1402
1389
|
}
|
|
1403
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
1390
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: OrderProcessGraphComponent, decorators: [{
|
|
1404
1391
|
type: Component,
|
|
1405
1392
|
args: [{ selector: 'vdr-order-process-graph', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngFor=\"let state of nodes; let i = index\">\r\n <vdr-order-process-node\r\n [node]=\"state\"\r\n [index]=\"i\"\r\n [active]=\"(activeState$ | async) === state.name\"\r\n (mouseenter)=\"onMouseOver(state.name)\"\r\n (mouseleave)=\"onMouseOut()\"\r\n ></vdr-order-process-node>\r\n</ng-container>\r\n<ng-container *ngFor=\"let edge of edges\">\r\n <vdr-order-process-edge [from]=\"edge.from\" [to]=\"edge.to\" [index]=\"edge.index\"></vdr-order-process-edge>\r\n</ng-container>\r\n", styles: [":host{display:block;border:1px hotpink;margin:20px;padding:12px;position:relative}.state-row{display:flex}\n"] }]
|
|
1406
1393
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { states: [{
|
|
@@ -1423,10 +1410,10 @@ class OrderProcessGraphDialogComponent {
|
|
|
1423
1410
|
ngOnInit() {
|
|
1424
1411
|
this.states = this.serverConfigService.getOrderProcessStates();
|
|
1425
1412
|
}
|
|
1426
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
1427
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.
|
|
1413
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: OrderProcessGraphDialogComponent, deps: [{ token: i1.ServerConfigService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1414
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: OrderProcessGraphDialogComponent, selector: "vdr-order-process-graph-dialog", ngImport: i0, template: "<ng-template vdrDialogTitle>{{ 'order.order-state-diagram' | translate }}</ng-template>\r\n\r\n<vdr-order-process-graph [states]=\"states\" [initialState]=\"activeState\"></vdr-order-process-graph>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i1.DialogTitleDirective, selector: "[vdrDialogTitle]" }, { kind: "component", type: OrderProcessGraphComponent, selector: "vdr-order-process-graph", inputs: ["states", "initialState"] }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1428
1415
|
}
|
|
1429
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
1416
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: OrderProcessGraphDialogComponent, decorators: [{
|
|
1430
1417
|
type: Component,
|
|
1431
1418
|
args: [{ selector: 'vdr-order-process-graph-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template vdrDialogTitle>{{ 'order.order-state-diagram' | translate }}</ng-template>\r\n\r\n<vdr-order-process-graph [states]=\"states\" [initialState]=\"activeState\"></vdr-order-process-graph>\r\n" }]
|
|
1432
1419
|
}], ctorParameters: () => [{ type: i1.ServerConfigService }] });
|
|
@@ -1435,10 +1422,10 @@ class PaymentForRefundSelectorComponent {
|
|
|
1435
1422
|
constructor() {
|
|
1436
1423
|
this.paymentSelected = new EventEmitter();
|
|
1437
1424
|
}
|
|
1438
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
1439
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.
|
|
1425
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PaymentForRefundSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1426
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: PaymentForRefundSelectorComponent, selector: "vdr-payment-for-refund-selector", inputs: { refundablePayments: "refundablePayments", order: "order" }, outputs: { paymentSelected: "paymentSelected" }, ngImport: i0, template: "<vdr-card\r\n [title]=\"'order.payment' | translate\"\r\n [class.selected]=\"payment.selected\"\r\n [class.unselected]=\"!payment.selected\"\r\n *ngFor=\"let payment of refundablePayments\"\r\n>\r\n <ng-template vdrCardControls>\r\n <vdr-select-toggle\r\n size=\"small\"\r\n [title]=\"'order.refund-this-payment' | translate\"\r\n [label]=\"'order.refund-this-payment' | translate\"\r\n [disabled]=\"refundablePayments.length === 1\"\r\n [(selected)]=\"payment.selected\"\r\n (selectedChange)=\"paymentSelected.emit({ payment: payment, selected: $event })\"\r\n ></vdr-select-toggle>\r\n </ng-template>\r\n <div class=\"form-grid\">\r\n <vdr-labeled-data [label]=\"'order.payment-method' | translate\">\r\n {{ payment.method }}\r\n </vdr-labeled-data>\r\n <vdr-labeled-data [label]=\"'order.transaction-id' | translate\">\r\n {{ payment.transactionId }}\r\n </vdr-labeled-data>\r\n <vdr-labeled-data [label]=\"'order.payment-amount' | translate\">\r\n {{ payment.amount | localeCurrency : order.currencyCode }}\r\n </vdr-labeled-data>\r\n <vdr-labeled-data [label]=\"'order.refundable-amount' | translate\">\r\n {{ payment.refundableAmount | localeCurrency : order.currencyCode }}\r\n </vdr-labeled-data>\r\n </div>\r\n <vdr-form-field [label]=\"'order.refund-amount' | translate\">\r\n <vdr-currency-input\r\n [readonly]=\"!payment.selected\"\r\n [currencyCode]=\"order.currencyCode\"\r\n [formControl]=\"payment.amountToRefundControl\"\r\n ></vdr-currency-input>\r\n </vdr-form-field>\r\n</vdr-card>", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i1.CurrencyInputComponent, selector: "vdr-currency-input", inputs: ["disabled", "readonly", "value", "currencyCode"], outputs: ["valueChange"] }, { kind: "component", type: i1.FormFieldComponent, selector: "vdr-form-field", inputs: ["label", "for", "tooltip", "errors", "readOnlyToggle"], outputs: ["readOnlyToggleChange"] }, { kind: "directive", type: i1.FormFieldControlDirective, selector: "input, textarea, select, vdr-currency-input" }, { kind: "component", type: i1.SelectToggleComponent, selector: "vdr-select-toggle", inputs: ["size", "selected", "hiddenWhenOff", "disabled", "label"], outputs: ["selectedChange"] }, { kind: "component", type: i1.LabeledDataComponent, selector: "vdr-labeled-data", inputs: ["label"] }, { kind: "component", type: i1.CardComponent, selector: "vdr-card", inputs: ["title", "paddingX"] }, { kind: "directive", type: i1.CardControlsDirective, selector: "[vdrCardControls]" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.LocaleCurrencyPipe, name: "localeCurrency" }], changeDetection: i0.ChangeDetectionStrategy.Default }); }
|
|
1440
1427
|
}
|
|
1441
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
1428
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PaymentForRefundSelectorComponent, decorators: [{
|
|
1442
1429
|
type: Component,
|
|
1443
1430
|
args: [{ selector: 'vdr-payment-for-refund-selector', changeDetection: ChangeDetectionStrategy.Default, template: "<vdr-card\r\n [title]=\"'order.payment' | translate\"\r\n [class.selected]=\"payment.selected\"\r\n [class.unselected]=\"!payment.selected\"\r\n *ngFor=\"let payment of refundablePayments\"\r\n>\r\n <ng-template vdrCardControls>\r\n <vdr-select-toggle\r\n size=\"small\"\r\n [title]=\"'order.refund-this-payment' | translate\"\r\n [label]=\"'order.refund-this-payment' | translate\"\r\n [disabled]=\"refundablePayments.length === 1\"\r\n [(selected)]=\"payment.selected\"\r\n (selectedChange)=\"paymentSelected.emit({ payment: payment, selected: $event })\"\r\n ></vdr-select-toggle>\r\n </ng-template>\r\n <div class=\"form-grid\">\r\n <vdr-labeled-data [label]=\"'order.payment-method' | translate\">\r\n {{ payment.method }}\r\n </vdr-labeled-data>\r\n <vdr-labeled-data [label]=\"'order.transaction-id' | translate\">\r\n {{ payment.transactionId }}\r\n </vdr-labeled-data>\r\n <vdr-labeled-data [label]=\"'order.payment-amount' | translate\">\r\n {{ payment.amount | localeCurrency : order.currencyCode }}\r\n </vdr-labeled-data>\r\n <vdr-labeled-data [label]=\"'order.refundable-amount' | translate\">\r\n {{ payment.refundableAmount | localeCurrency : order.currencyCode }}\r\n </vdr-labeled-data>\r\n </div>\r\n <vdr-form-field [label]=\"'order.refund-amount' | translate\">\r\n <vdr-currency-input\r\n [readonly]=\"!payment.selected\"\r\n [currencyCode]=\"order.currencyCode\"\r\n [formControl]=\"payment.amountToRefundControl\"\r\n ></vdr-currency-input>\r\n </vdr-form-field>\r\n</vdr-card>", styles: [":host{display:block}\n"] }]
|
|
1444
1431
|
}], propDecorators: { refundablePayments: [{
|
|
@@ -1600,10 +1587,10 @@ class RefundOrderDialogComponent {
|
|
|
1600
1587
|
quantity: line.quantity,
|
|
1601
1588
|
}));
|
|
1602
1589
|
}
|
|
1603
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
1604
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.4", type: RefundOrderDialogComponent, selector: "vdr-refund-order-dialog", ngImport: i0, template: "<ng-template vdrDialogTitle>{{ 'order.refund-and-cancel-order' | translate }}</ng-template>\r\n\r\n<div class=\"refund-wrapper\">\r\n <vdr-data-table-2 id=\"refund-order\" [items]=\"order.lines\">\r\n <!-- Here we define all the available columns -->\r\n <vdr-dt2-column id=\"id\" [heading]=\"'common.id' | translate\" [hiddenByDefault]=\"true\">\r\n <ng-template let-line=\"item\">\r\n {{ line.id }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column id=\"created-at\" [heading]=\"'common.created-at' | translate\" [hiddenByDefault]=\"true\">\r\n <ng-template let-line=\"item\">\r\n {{ line.createdAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column id=\"updated-at\" [heading]=\"'common.updated-at' | translate\" [hiddenByDefault]=\"true\">\r\n <ng-template let-line=\"item\">\r\n {{ line.updatedAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'common.image' | translate\" id=\"image\">\r\n <ng-template let-line=\"item\">\r\n <div class=\"image-placeholder\">\r\n <img\r\n *ngIf=\"line.featuredAsset as asset; else imagePlaceholder\"\r\n [src]=\"asset | assetPreview : 'tiny'\"\r\n />\r\n <ng-template #imagePlaceholder>\r\n <div class=\"placeholder\">\r\n <clr-icon shape=\"image\" size=\"48\"></clr-icon>\r\n </div>\r\n </ng-template>\r\n </div>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column id=\"product-name\" [heading]=\"'order.product-name' | translate\" [optional]=\"false\">\r\n <ng-template let-line=\"item\">\r\n {{ line.productVariant.name }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column id=\"product-sku\" [heading]=\"'order.product-sku' | translate\">\r\n <ng-template let-line=\"item\">\r\n {{ line.productVariant.sku }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column id=\"unit-price\" [heading]=\"'order.unit-price' | translate\" [hiddenByDefault]=\"true\">\r\n <ng-template let-line=\"item\">\r\n {{ line.unitPriceWithTax | localeCurrency : order.currencyCode }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column id=\"prorated-unit-price\" [heading]=\"'order.prorated-unit-price' | translate\">\r\n <ng-template let-line=\"item\">\r\n {{ line.unitPriceWithTax | localeCurrency : order.currencyCode }}\r\n <ng-container *ngIf=\"line.discounts as discounts\">\r\n <vdr-dropdown *ngIf=\"discounts.length\">\r\n <div class=\"promotions-label\" vdrDropdownTrigger>\r\n <button class=\"icon-button\"><clr-icon shape=\"info\"></clr-icon></button>\r\n </div>\r\n <vdr-dropdown-menu>\r\n <div class=\"line-promotion\" *ngFor=\"let discount of discounts\">\r\n {{ discount.description }}\r\n <div class=\"promotion-amount\">\r\n {{\r\n discount.amount / 100 / line.quantity\r\n | number : '1.0-2'\r\n | currency : order.currencyCode\r\n }}\r\n </div>\r\n </div>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n </ng-container>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column id=\"quantity\" [heading]=\"'order.quantity' | translate\">\r\n <ng-template let-line=\"item\">\r\n {{ line.quantity }}\r\n <vdr-line-refunds [line]=\"line\" [payments]=\"order.payments\"></vdr-line-refunds>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column id=\"refund-quantity\" [heading]=\"'order.refund' | translate\" [optional]=\"false\">\r\n <ng-template let-line=\"item\">\r\n <input\r\n *ngIf=\"lineCanBeRefundedOrCancelled(line)\"\r\n [ngModel]=\"lineQuantities[line.id].quantity\"\r\n type=\"number\"\r\n [max]=\"line.quantity\"\r\n min=\"0\"\r\n (ngModelChange)=\"onRefundQuantityChange(line.id, $event)\"\r\n />\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column id=\"cancel\" [heading]=\"'order.return-to-stock' | translate\" [optional]=\"false\">\r\n <ng-template let-line=\"item\">\r\n <div class=\"cancel-checkbox-wrapper\">\r\n <label class=\"flex center\">\r\n <input\r\n type=\"checkbox\"\r\n *ngIf=\"lineCanBeRefundedOrCancelled(line)\"\r\n clrCheckbox\r\n [disabled]=\"0 === lineQuantities[line.id].quantity\"\r\n [(ngModel)]=\"lineQuantities[line.id].cancel\"\r\n />\r\n <span class=\"ml-1\">{{ 'order.return-to-stock' | translate }}</span></label\r\n >\r\n </div>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n </vdr-data-table-2>\r\n\r\n <div class=\"refund-details mt-4\">\r\n <div>\r\n <vdr-card>\r\n <label class=\"flex mb-2\" *ngFor=\"let shippingLine of order.shippingLines\">\r\n <input type=\"checkbox\" clrCheckbox (change)=\"toggleShippingRefund(shippingLine.id)\" />\r\n <div class=\"ml-1\">\r\n {{ 'order.refund-shipping' | translate }}\r\n <span>{{ shippingLine.shippingMethod.name }}:</span>\r\n <span class=\"ml-1\"\r\n >{{ shippingLine.discountedPriceWithTax | localeCurrency : order.currencyCode }}\r\n </span>\r\n </div></label\r\n >\r\n <vdr-form-field [label]=\"'order.refund-cancellation-reason' | translate\" class=\"mb-2\">\r\n <ng-select\r\n [items]=\"reasons\"\r\n bindLabel=\"name\"\r\n autofocus\r\n [placeholder]=\"'order.refund-cancellation-reason-required' | translate\"\r\n bindValue=\"id\"\r\n [addTag]=\"true\"\r\n [(ngModel)]=\"reason\"\r\n ></ng-select>\r\n </vdr-form-field>\r\n <vdr-form-field\r\n [label]=\"'order.refund-total' | translate\"\r\n [readOnlyToggle]=\"true\"\r\n (readOnlyToggleChange)=\"manuallySetRefundTotal = !$event\"\r\n >\r\n <vdr-currency-input\r\n [readonly]=\"!manuallySetRefundTotal\"\r\n [currencyCode]=\"order.currencyCode\"\r\n [(ngModel)]=\"refundTotal\"\r\n (ngModelChange)=\"updateRefundTotal()\"\r\n ></vdr-currency-input>\r\n </vdr-form-field>\r\n </vdr-card>\r\n </div>\r\n <div class=\"\">\r\n <vdr-payment-for-refund-selector\r\n [refundablePayments]=\"refundablePayments\"\r\n (paymentSelected)=\"onPaymentSelected($event.payment, $event.selected)\"\r\n [order]=\"order\"\r\n ></vdr-payment-for-refund-selector>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<ng-template vdrDialogButtons>\r\n <div>\r\n <div class=\"errors\">\r\n <clr-alert\r\n *ngIf=\"refundTotal < 0 || totalRefundableAmount < refundTotal\"\r\n [clrAlertType]=\"'danger'\"\r\n [clrAlertClosable]=\"false\"\r\n >\r\n <clr-alert-item>\r\n {{\r\n 'order.refund-total-error'\r\n | translate\r\n : {\r\n min: 0 | currency : order.currencyCode,\r\n max: totalRefundableAmount | localeCurrency : order.currencyCode\r\n }\r\n }}\r\n </clr-alert-item>\r\n </clr-alert>\r\n <clr-alert\r\n *ngIf=\"amountToRefundTotal < refundTotal || refundTotal < amountToRefundTotal\"\r\n [clrAlertType]=\"'danger'\"\r\n [clrAlertClosable]=\"false\"\r\n >\r\n <clr-alert-item>\r\n {{ 'order.refund-total-warning' | translate }}\r\n </clr-alert-item>\r\n </clr-alert>\r\n <clr-alert\r\n *ngIf=\"amountToRefundTotal && !reason\"\r\n [clrAlertType]=\"'danger'\"\r\n [clrAlertClosable]=\"false\"\r\n >\r\n <clr-alert-item>\r\n {{ 'order.refund-cancellation-reason-required' | translate }}\r\n </clr-alert-item>\r\n </clr-alert>\r\n </div>\r\n <div class=\"modal-buttons\">\r\n <button type=\"button\" class=\"btn\" (click)=\"cancel()\">{{ 'common.cancel' | translate }}</button>\r\n <button type=\"submit\" (click)=\"select()\" [disabled]=\"!canSubmit()\" class=\"btn btn-primary\">\r\n {{\r\n 'order.refund-with-amount'\r\n | translate : { amount: amountToRefundTotal | localeCurrency : order.currencyCode }\r\n }}\r\n </button>\r\n </div>\r\n </div>\r\n</ng-template>\r\n", styles: [":host{height:100%;display:flex;flex-direction:column;min-height:64vh}.refund-wrapper{flex:1;flex-direction:column}.refund-wrapper .order-table{flex:1;overflow-y:auto}.refund-wrapper .order-table table{margin-top:0}.refund-wrapper tr.ignore{color:var(--color-grey-300)}::ng-deep .refund-wrapper .table-wrapper{max-width:initial!important}.quantity-col{background-color:var(--color-warning-100)}.cancel-checkbox-wrapper{display:flex;align-items:center;justify-content:center}clr-checkbox-wrapper{margin-top:12px;margin-bottom:12px;display:block}.refund-details{display:flex;flex-direction:column;padding-bottom:var(--space-unit);gap:calc(var(--space-unit) * 2);justify-content:space-between}@media screen and (min-width: 992px){.refund-details{flex-direction:row}}.refund-details vdr-card.unselected{opacity:.8}.refund-details>*{flex:1}.errors{display:flex;justify-content:flex-end;gap:calc(var(--space-unit) * 2);margin:calc(var(--space-unit) * 2) 0}.prorated-wrapper{display:flex;justify-content:center}.line-promotion{display:flex;justify-content:space-between;font-size:12px;padding:3px 6px}.line-promotion .promotion-amount{margin-inline-start:12px}vdr-card.faded{opacity:.8}.modal-buttons{display:flex;justify-content:flex-end;gap:.6rem;gap:var(--clr-modal-footer-gap, .6rem)}\n"], dependencies: [{ kind: "component", type: i3.ClrAlert, selector: "clr-alert", inputs: ["clrAlertSizeSmall", "clrAlertClosable", "clrAlertAppLevel", "clrCloseButtonAriaLabel", "clrAlertLightweight", "clrAlertType", "clrAlertIcon", "clrAlertClosed"], outputs: ["clrAlertClosedChange"] }, { kind: "component", type: i3.ClrAlertItem, selector: "clr-alert-item" }, { kind: "directive", type: i3.ClrIconCustomTag, selector: "clr-icon" }, { kind: "directive", type: i3.ClrLabel, selector: "label", inputs: ["for"] }, { kind: "directive", type: i3.ClrCheckbox, selector: "[clrCheckbox],[clrToggle]" }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i2.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5.NgSelectComponent, selector: "ng-select", inputs: ["bindLabel", "bindValue", "markFirst", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "deselectOnClick"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { kind: "component", type: i1.CurrencyInputComponent, selector: "vdr-currency-input", inputs: ["disabled", "readonly", "value", "currencyCode"], outputs: ["valueChange"] }, { kind: "component", type: i1.FormFieldComponent, selector: "vdr-form-field", inputs: ["label", "for", "tooltip", "errors", "readOnlyToggle"], outputs: ["readOnlyToggleChange"] }, { kind: "directive", type: i1.FormFieldControlDirective, selector: "input, textarea, select, vdr-currency-input" }, { kind: "directive", type: i1.DialogButtonsDirective, selector: "[vdrDialogButtons]" }, { kind: "directive", type: i1.DialogTitleDirective, selector: "[vdrDialogTitle]" }, { kind: "component", type: i1.DropdownComponent, selector: "vdr-dropdown", inputs: ["manualToggle"] }, { kind: "component", type: i1.DropdownMenuComponent, selector: "vdr-dropdown-menu", inputs: ["vdrPosition", "customClasses"] }, { kind: "directive", type: i1.DropdownTriggerDirective, selector: "[vdrDropdownTrigger]" }, { kind: "component", type: i1.DataTable2Component, selector: "vdr-data-table-2", inputs: ["id", "items", "itemsPerPage", "currentPage", "totalItems", "emptyStateLabel", "filters", "activeIndex"], outputs: ["pageChange", "itemsPerPageChange"] }, { kind: "component", type: i1.DataTable2ColumnComponent, selector: "vdr-dt2-column", inputs: ["id", "expand", "heading", "align", "sort", "optional", "hiddenByDefault", "orderable"], exportAs: ["row"] }, { kind: "component", type: i1.CardComponent, selector: "vdr-card", inputs: ["title", "paddingX"] }, { kind: "component", type: LineRefundsComponent, selector: "vdr-line-refunds", inputs: ["line", "payments"] }, { kind: "component", type: PaymentForRefundSelectorComponent, selector: "vdr-payment-for-refund-selector", inputs: ["refundablePayments", "order"], outputs: ["paymentSelected"] }, { kind: "pipe", type: i2$1.DecimalPipe, name: "number" }, { kind: "pipe", type: i2$1.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.AssetPreviewPipe, name: "assetPreview" }, { kind: "pipe", type: i1.LocaleDatePipe, name: "localeDate" }, { kind: "pipe", type: i1.LocaleCurrencyPipe, name: "localeCurrency" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1590
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: RefundOrderDialogComponent, deps: [{ token: i1.I18nService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1591
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: RefundOrderDialogComponent, selector: "vdr-refund-order-dialog", ngImport: i0, template: "<ng-template vdrDialogTitle>{{ 'order.refund-and-cancel-order' | translate }}</ng-template>\r\n\r\n<div class=\"refund-wrapper\">\r\n <vdr-data-table-2 id=\"refund-order\" [items]=\"order.lines\">\r\n <!-- Here we define all the available columns -->\r\n <vdr-dt2-column id=\"id\" [heading]=\"'common.id' | translate\" [hiddenByDefault]=\"true\">\r\n <ng-template let-line=\"item\">\r\n {{ line.id }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column id=\"created-at\" [heading]=\"'common.created-at' | translate\" [hiddenByDefault]=\"true\">\r\n <ng-template let-line=\"item\">\r\n {{ line.createdAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column id=\"updated-at\" [heading]=\"'common.updated-at' | translate\" [hiddenByDefault]=\"true\">\r\n <ng-template let-line=\"item\">\r\n {{ line.updatedAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'common.image' | translate\" id=\"image\">\r\n <ng-template let-line=\"item\">\r\n <div class=\"image-placeholder\">\r\n <img\r\n *ngIf=\"line.featuredAsset as asset; else imagePlaceholder\"\r\n [src]=\"asset | assetPreview : 'tiny'\"\r\n />\r\n <ng-template #imagePlaceholder>\r\n <div class=\"placeholder\">\r\n <clr-icon shape=\"image\" size=\"48\"></clr-icon>\r\n </div>\r\n </ng-template>\r\n </div>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column id=\"product-name\" [heading]=\"'order.product-name' | translate\" [optional]=\"false\">\r\n <ng-template let-line=\"item\">\r\n {{ line.productVariant.name }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column id=\"product-sku\" [heading]=\"'order.product-sku' | translate\">\r\n <ng-template let-line=\"item\">\r\n {{ line.productVariant.sku }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column id=\"unit-price\" [heading]=\"'order.unit-price' | translate\" [hiddenByDefault]=\"true\">\r\n <ng-template let-line=\"item\">\r\n {{ line.unitPriceWithTax | localeCurrency : order.currencyCode }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column id=\"prorated-unit-price\" [heading]=\"'order.prorated-unit-price' | translate\">\r\n <ng-template let-line=\"item\">\r\n {{ line.unitPriceWithTax | localeCurrency : order.currencyCode }}\r\n <ng-container *ngIf=\"line.discounts as discounts\">\r\n <vdr-dropdown *ngIf=\"discounts.length\">\r\n <div class=\"promotions-label\" vdrDropdownTrigger>\r\n <button class=\"icon-button\"><clr-icon shape=\"info\"></clr-icon></button>\r\n </div>\r\n <vdr-dropdown-menu>\r\n <div class=\"line-promotion\" *ngFor=\"let discount of discounts\">\r\n {{ discount.description }}\r\n <div class=\"promotion-amount\">\r\n {{\r\n discount.amount / 100 / line.quantity\r\n | number : '1.0-2'\r\n | currency : order.currencyCode\r\n }}\r\n </div>\r\n </div>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n </ng-container>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column id=\"quantity\" [heading]=\"'order.quantity' | translate\">\r\n <ng-template let-line=\"item\">\r\n {{ line.quantity }}\r\n <vdr-line-refunds [line]=\"line\" [payments]=\"order.payments\"></vdr-line-refunds>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column id=\"refund-quantity\" [heading]=\"'order.refund' | translate\" [optional]=\"false\">\r\n <ng-template let-line=\"item\">\r\n <input\r\n *ngIf=\"lineCanBeRefundedOrCancelled(line)\"\r\n [ngModel]=\"lineQuantities[line.id].quantity\"\r\n type=\"number\"\r\n [max]=\"line.quantity\"\r\n min=\"0\"\r\n (ngModelChange)=\"onRefundQuantityChange(line.id, $event)\"\r\n />\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column id=\"cancel\" [heading]=\"'order.return-to-stock' | translate\" [optional]=\"false\">\r\n <ng-template let-line=\"item\">\r\n <div class=\"cancel-checkbox-wrapper\">\r\n <label class=\"flex center\">\r\n <input\r\n type=\"checkbox\"\r\n *ngIf=\"lineCanBeRefundedOrCancelled(line)\"\r\n clrCheckbox\r\n [disabled]=\"0 === lineQuantities[line.id].quantity\"\r\n [(ngModel)]=\"lineQuantities[line.id].cancel\"\r\n />\r\n <span class=\"ml-1\">{{ 'order.return-to-stock' | translate }}</span></label\r\n >\r\n </div>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n </vdr-data-table-2>\r\n\r\n <div class=\"refund-details mt-4\">\r\n <div>\r\n <vdr-card>\r\n <label class=\"flex mb-2\" *ngFor=\"let shippingLine of order.shippingLines\">\r\n <input type=\"checkbox\" clrCheckbox (change)=\"toggleShippingRefund(shippingLine.id)\" />\r\n <div class=\"ml-1\">\r\n {{ 'order.refund-shipping' | translate }}\r\n <span>{{ shippingLine.shippingMethod.name }}:</span>\r\n <span class=\"ml-1\"\r\n >{{ shippingLine.discountedPriceWithTax | localeCurrency : order.currencyCode }}\r\n </span>\r\n </div></label\r\n >\r\n <vdr-form-field [label]=\"'order.refund-cancellation-reason' | translate\" class=\"mb-2\">\r\n <ng-select\r\n [items]=\"reasons\"\r\n bindLabel=\"name\"\r\n autofocus\r\n [placeholder]=\"'order.refund-cancellation-reason-required' | translate\"\r\n bindValue=\"id\"\r\n [addTag]=\"true\"\r\n [(ngModel)]=\"reason\"\r\n ></ng-select>\r\n </vdr-form-field>\r\n <vdr-form-field\r\n [label]=\"'order.refund-total' | translate\"\r\n [readOnlyToggle]=\"true\"\r\n (readOnlyToggleChange)=\"manuallySetRefundTotal = !$event\"\r\n >\r\n <vdr-currency-input\r\n [readonly]=\"!manuallySetRefundTotal\"\r\n [currencyCode]=\"order.currencyCode\"\r\n [(ngModel)]=\"refundTotal\"\r\n (ngModelChange)=\"updateRefundTotal()\"\r\n ></vdr-currency-input>\r\n </vdr-form-field>\r\n </vdr-card>\r\n </div>\r\n <div class=\"\">\r\n <vdr-payment-for-refund-selector\r\n [refundablePayments]=\"refundablePayments\"\r\n (paymentSelected)=\"onPaymentSelected($event.payment, $event.selected)\"\r\n [order]=\"order\"\r\n ></vdr-payment-for-refund-selector>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<ng-template vdrDialogButtons>\r\n <div>\r\n <div class=\"errors\">\r\n <clr-alert\r\n *ngIf=\"refundTotal < 0 || totalRefundableAmount < refundTotal\"\r\n [clrAlertType]=\"'danger'\"\r\n [clrAlertClosable]=\"false\"\r\n >\r\n <clr-alert-item>\r\n {{\r\n 'order.refund-total-error'\r\n | translate\r\n : {\r\n min: 0 | currency : order.currencyCode,\r\n max: totalRefundableAmount | localeCurrency : order.currencyCode\r\n }\r\n }}\r\n </clr-alert-item>\r\n </clr-alert>\r\n <clr-alert\r\n *ngIf=\"amountToRefundTotal < refundTotal || refundTotal < amountToRefundTotal\"\r\n [clrAlertType]=\"'danger'\"\r\n [clrAlertClosable]=\"false\"\r\n >\r\n <clr-alert-item>\r\n {{ 'order.refund-total-warning' | translate }}\r\n </clr-alert-item>\r\n </clr-alert>\r\n <clr-alert\r\n *ngIf=\"amountToRefundTotal && !reason\"\r\n [clrAlertType]=\"'danger'\"\r\n [clrAlertClosable]=\"false\"\r\n >\r\n <clr-alert-item>\r\n {{ 'order.refund-cancellation-reason-required' | translate }}\r\n </clr-alert-item>\r\n </clr-alert>\r\n </div>\r\n <div class=\"modal-buttons\">\r\n <button type=\"button\" class=\"btn\" (click)=\"cancel()\">{{ 'common.cancel' | translate }}</button>\r\n <button type=\"submit\" (click)=\"select()\" [disabled]=\"!canSubmit()\" class=\"btn btn-primary\">\r\n {{\r\n 'order.refund-with-amount'\r\n | translate : { amount: amountToRefundTotal | localeCurrency : order.currencyCode }\r\n }}\r\n </button>\r\n </div>\r\n </div>\r\n</ng-template>\r\n", styles: [":host{height:100%;display:flex;flex-direction:column;min-height:64vh}.refund-wrapper{flex:1;flex-direction:column}.refund-wrapper .order-table{flex:1;overflow-y:auto}.refund-wrapper .order-table table{margin-top:0}.refund-wrapper tr.ignore{color:var(--color-grey-300)}::ng-deep .refund-wrapper .table-wrapper{max-width:initial!important}.quantity-col{background-color:var(--color-warning-100)}.cancel-checkbox-wrapper{display:flex;align-items:center;justify-content:center}clr-checkbox-wrapper{margin-top:12px;margin-bottom:12px;display:block}.refund-details{display:flex;flex-direction:column;padding-bottom:var(--space-unit);gap:calc(var(--space-unit) * 2);justify-content:space-between}@media screen and (min-width: 992px){.refund-details{flex-direction:row}}.refund-details vdr-card.unselected{opacity:.8}.refund-details>*{flex:1}.errors{display:flex;justify-content:flex-end;gap:calc(var(--space-unit) * 2);margin:calc(var(--space-unit) * 2) 0}.prorated-wrapper{display:flex;justify-content:center}.line-promotion{display:flex;justify-content:space-between;font-size:12px;padding:3px 6px}.line-promotion .promotion-amount{margin-inline-start:12px}vdr-card.faded{opacity:.8}.modal-buttons{display:flex;justify-content:flex-end;gap:.6rem;gap:var(--clr-modal-footer-gap, .6rem)}\n"], dependencies: [{ kind: "component", type: i3.ClrAlert, selector: "clr-alert", inputs: ["clrAlertSizeSmall", "clrAlertClosable", "clrAlertAppLevel", "clrCloseButtonAriaLabel", "clrAlertLightweight", "clrAlertType", "clrAlertIcon", "clrAlertClosed"], outputs: ["clrAlertClosedChange"] }, { kind: "component", type: i3.ClrAlertItem, selector: "clr-alert-item" }, { kind: "directive", type: i3.ClrIconCustomTag, selector: "clr-icon" }, { kind: "directive", type: i3.ClrLabel, selector: "label", inputs: ["for"] }, { kind: "directive", type: i3.ClrCheckbox, selector: "[clrCheckbox],[clrToggle]" }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i2.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5.NgSelectComponent, selector: "ng-select", inputs: ["bindLabel", "bindValue", "markFirst", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "deselectOnClick"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { kind: "component", type: i1.CurrencyInputComponent, selector: "vdr-currency-input", inputs: ["disabled", "readonly", "value", "currencyCode"], outputs: ["valueChange"] }, { kind: "component", type: i1.FormFieldComponent, selector: "vdr-form-field", inputs: ["label", "for", "tooltip", "errors", "readOnlyToggle"], outputs: ["readOnlyToggleChange"] }, { kind: "directive", type: i1.FormFieldControlDirective, selector: "input, textarea, select, vdr-currency-input" }, { kind: "directive", type: i1.DialogButtonsDirective, selector: "[vdrDialogButtons]" }, { kind: "directive", type: i1.DialogTitleDirective, selector: "[vdrDialogTitle]" }, { kind: "component", type: i1.DropdownComponent, selector: "vdr-dropdown", inputs: ["manualToggle"] }, { kind: "component", type: i1.DropdownMenuComponent, selector: "vdr-dropdown-menu", inputs: ["vdrPosition", "customClasses"] }, { kind: "directive", type: i1.DropdownTriggerDirective, selector: "[vdrDropdownTrigger]" }, { kind: "component", type: i1.DataTable2Component, selector: "vdr-data-table-2", inputs: ["id", "items", "itemsPerPage", "currentPage", "totalItems", "emptyStateLabel", "filters", "activeIndex"], outputs: ["pageChange", "itemsPerPageChange", "visibleColumnsChange"] }, { kind: "component", type: i1.DataTable2ColumnComponent, selector: "vdr-dt2-column", inputs: ["id", "expand", "heading", "align", "sort", "optional", "hiddenByDefault", "orderable"], exportAs: ["row"] }, { kind: "component", type: i1.CardComponent, selector: "vdr-card", inputs: ["title", "paddingX"] }, { kind: "component", type: LineRefundsComponent, selector: "vdr-line-refunds", inputs: ["line", "payments"] }, { kind: "component", type: PaymentForRefundSelectorComponent, selector: "vdr-payment-for-refund-selector", inputs: ["refundablePayments", "order"], outputs: ["paymentSelected"] }, { kind: "pipe", type: i2$1.DecimalPipe, name: "number" }, { kind: "pipe", type: i2$1.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.AssetPreviewPipe, name: "assetPreview" }, { kind: "pipe", type: i1.LocaleDatePipe, name: "localeDate" }, { kind: "pipe", type: i1.LocaleCurrencyPipe, name: "localeCurrency" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1605
1592
|
}
|
|
1606
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
1593
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: RefundOrderDialogComponent, decorators: [{
|
|
1607
1594
|
type: Component,
|
|
1608
1595
|
args: [{ selector: 'vdr-refund-order-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template vdrDialogTitle>{{ 'order.refund-and-cancel-order' | translate }}</ng-template>\r\n\r\n<div class=\"refund-wrapper\">\r\n <vdr-data-table-2 id=\"refund-order\" [items]=\"order.lines\">\r\n <!-- Here we define all the available columns -->\r\n <vdr-dt2-column id=\"id\" [heading]=\"'common.id' | translate\" [hiddenByDefault]=\"true\">\r\n <ng-template let-line=\"item\">\r\n {{ line.id }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column id=\"created-at\" [heading]=\"'common.created-at' | translate\" [hiddenByDefault]=\"true\">\r\n <ng-template let-line=\"item\">\r\n {{ line.createdAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column id=\"updated-at\" [heading]=\"'common.updated-at' | translate\" [hiddenByDefault]=\"true\">\r\n <ng-template let-line=\"item\">\r\n {{ line.updatedAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'common.image' | translate\" id=\"image\">\r\n <ng-template let-line=\"item\">\r\n <div class=\"image-placeholder\">\r\n <img\r\n *ngIf=\"line.featuredAsset as asset; else imagePlaceholder\"\r\n [src]=\"asset | assetPreview : 'tiny'\"\r\n />\r\n <ng-template #imagePlaceholder>\r\n <div class=\"placeholder\">\r\n <clr-icon shape=\"image\" size=\"48\"></clr-icon>\r\n </div>\r\n </ng-template>\r\n </div>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column id=\"product-name\" [heading]=\"'order.product-name' | translate\" [optional]=\"false\">\r\n <ng-template let-line=\"item\">\r\n {{ line.productVariant.name }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column id=\"product-sku\" [heading]=\"'order.product-sku' | translate\">\r\n <ng-template let-line=\"item\">\r\n {{ line.productVariant.sku }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column id=\"unit-price\" [heading]=\"'order.unit-price' | translate\" [hiddenByDefault]=\"true\">\r\n <ng-template let-line=\"item\">\r\n {{ line.unitPriceWithTax | localeCurrency : order.currencyCode }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column id=\"prorated-unit-price\" [heading]=\"'order.prorated-unit-price' | translate\">\r\n <ng-template let-line=\"item\">\r\n {{ line.unitPriceWithTax | localeCurrency : order.currencyCode }}\r\n <ng-container *ngIf=\"line.discounts as discounts\">\r\n <vdr-dropdown *ngIf=\"discounts.length\">\r\n <div class=\"promotions-label\" vdrDropdownTrigger>\r\n <button class=\"icon-button\"><clr-icon shape=\"info\"></clr-icon></button>\r\n </div>\r\n <vdr-dropdown-menu>\r\n <div class=\"line-promotion\" *ngFor=\"let discount of discounts\">\r\n {{ discount.description }}\r\n <div class=\"promotion-amount\">\r\n {{\r\n discount.amount / 100 / line.quantity\r\n | number : '1.0-2'\r\n | currency : order.currencyCode\r\n }}\r\n </div>\r\n </div>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n </ng-container>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column id=\"quantity\" [heading]=\"'order.quantity' | translate\">\r\n <ng-template let-line=\"item\">\r\n {{ line.quantity }}\r\n <vdr-line-refunds [line]=\"line\" [payments]=\"order.payments\"></vdr-line-refunds>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column id=\"refund-quantity\" [heading]=\"'order.refund' | translate\" [optional]=\"false\">\r\n <ng-template let-line=\"item\">\r\n <input\r\n *ngIf=\"lineCanBeRefundedOrCancelled(line)\"\r\n [ngModel]=\"lineQuantities[line.id].quantity\"\r\n type=\"number\"\r\n [max]=\"line.quantity\"\r\n min=\"0\"\r\n (ngModelChange)=\"onRefundQuantityChange(line.id, $event)\"\r\n />\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column id=\"cancel\" [heading]=\"'order.return-to-stock' | translate\" [optional]=\"false\">\r\n <ng-template let-line=\"item\">\r\n <div class=\"cancel-checkbox-wrapper\">\r\n <label class=\"flex center\">\r\n <input\r\n type=\"checkbox\"\r\n *ngIf=\"lineCanBeRefundedOrCancelled(line)\"\r\n clrCheckbox\r\n [disabled]=\"0 === lineQuantities[line.id].quantity\"\r\n [(ngModel)]=\"lineQuantities[line.id].cancel\"\r\n />\r\n <span class=\"ml-1\">{{ 'order.return-to-stock' | translate }}</span></label\r\n >\r\n </div>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n </vdr-data-table-2>\r\n\r\n <div class=\"refund-details mt-4\">\r\n <div>\r\n <vdr-card>\r\n <label class=\"flex mb-2\" *ngFor=\"let shippingLine of order.shippingLines\">\r\n <input type=\"checkbox\" clrCheckbox (change)=\"toggleShippingRefund(shippingLine.id)\" />\r\n <div class=\"ml-1\">\r\n {{ 'order.refund-shipping' | translate }}\r\n <span>{{ shippingLine.shippingMethod.name }}:</span>\r\n <span class=\"ml-1\"\r\n >{{ shippingLine.discountedPriceWithTax | localeCurrency : order.currencyCode }}\r\n </span>\r\n </div></label\r\n >\r\n <vdr-form-field [label]=\"'order.refund-cancellation-reason' | translate\" class=\"mb-2\">\r\n <ng-select\r\n [items]=\"reasons\"\r\n bindLabel=\"name\"\r\n autofocus\r\n [placeholder]=\"'order.refund-cancellation-reason-required' | translate\"\r\n bindValue=\"id\"\r\n [addTag]=\"true\"\r\n [(ngModel)]=\"reason\"\r\n ></ng-select>\r\n </vdr-form-field>\r\n <vdr-form-field\r\n [label]=\"'order.refund-total' | translate\"\r\n [readOnlyToggle]=\"true\"\r\n (readOnlyToggleChange)=\"manuallySetRefundTotal = !$event\"\r\n >\r\n <vdr-currency-input\r\n [readonly]=\"!manuallySetRefundTotal\"\r\n [currencyCode]=\"order.currencyCode\"\r\n [(ngModel)]=\"refundTotal\"\r\n (ngModelChange)=\"updateRefundTotal()\"\r\n ></vdr-currency-input>\r\n </vdr-form-field>\r\n </vdr-card>\r\n </div>\r\n <div class=\"\">\r\n <vdr-payment-for-refund-selector\r\n [refundablePayments]=\"refundablePayments\"\r\n (paymentSelected)=\"onPaymentSelected($event.payment, $event.selected)\"\r\n [order]=\"order\"\r\n ></vdr-payment-for-refund-selector>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<ng-template vdrDialogButtons>\r\n <div>\r\n <div class=\"errors\">\r\n <clr-alert\r\n *ngIf=\"refundTotal < 0 || totalRefundableAmount < refundTotal\"\r\n [clrAlertType]=\"'danger'\"\r\n [clrAlertClosable]=\"false\"\r\n >\r\n <clr-alert-item>\r\n {{\r\n 'order.refund-total-error'\r\n | translate\r\n : {\r\n min: 0 | currency : order.currencyCode,\r\n max: totalRefundableAmount | localeCurrency : order.currencyCode\r\n }\r\n }}\r\n </clr-alert-item>\r\n </clr-alert>\r\n <clr-alert\r\n *ngIf=\"amountToRefundTotal < refundTotal || refundTotal < amountToRefundTotal\"\r\n [clrAlertType]=\"'danger'\"\r\n [clrAlertClosable]=\"false\"\r\n >\r\n <clr-alert-item>\r\n {{ 'order.refund-total-warning' | translate }}\r\n </clr-alert-item>\r\n </clr-alert>\r\n <clr-alert\r\n *ngIf=\"amountToRefundTotal && !reason\"\r\n [clrAlertType]=\"'danger'\"\r\n [clrAlertClosable]=\"false\"\r\n >\r\n <clr-alert-item>\r\n {{ 'order.refund-cancellation-reason-required' | translate }}\r\n </clr-alert-item>\r\n </clr-alert>\r\n </div>\r\n <div class=\"modal-buttons\">\r\n <button type=\"button\" class=\"btn\" (click)=\"cancel()\">{{ 'common.cancel' | translate }}</button>\r\n <button type=\"submit\" (click)=\"select()\" [disabled]=\"!canSubmit()\" class=\"btn btn-primary\">\r\n {{\r\n 'order.refund-with-amount'\r\n | translate : { amount: amountToRefundTotal | localeCurrency : order.currencyCode }\r\n }}\r\n </button>\r\n </div>\r\n </div>\r\n</ng-template>\r\n", styles: [":host{height:100%;display:flex;flex-direction:column;min-height:64vh}.refund-wrapper{flex:1;flex-direction:column}.refund-wrapper .order-table{flex:1;overflow-y:auto}.refund-wrapper .order-table table{margin-top:0}.refund-wrapper tr.ignore{color:var(--color-grey-300)}::ng-deep .refund-wrapper .table-wrapper{max-width:initial!important}.quantity-col{background-color:var(--color-warning-100)}.cancel-checkbox-wrapper{display:flex;align-items:center;justify-content:center}clr-checkbox-wrapper{margin-top:12px;margin-bottom:12px;display:block}.refund-details{display:flex;flex-direction:column;padding-bottom:var(--space-unit);gap:calc(var(--space-unit) * 2);justify-content:space-between}@media screen and (min-width: 992px){.refund-details{flex-direction:row}}.refund-details vdr-card.unselected{opacity:.8}.refund-details>*{flex:1}.errors{display:flex;justify-content:flex-end;gap:calc(var(--space-unit) * 2);margin:calc(var(--space-unit) * 2) 0}.prorated-wrapper{display:flex;justify-content:center}.line-promotion{display:flex;justify-content:space-between;font-size:12px;padding:3px 6px}.line-promotion .promotion-amount{margin-inline-start:12px}vdr-card.faded{opacity:.8}.modal-buttons{display:flex;justify-content:flex-end;gap:.6rem;gap:var(--clr-modal-footer-gap, .6rem)}\n"] }]
|
|
1609
1596
|
}], ctorParameters: () => [{ type: i1.I18nService }] });
|
|
@@ -1618,10 +1605,10 @@ class SettleRefundDialogComponent {
|
|
|
1618
1605
|
cancel() {
|
|
1619
1606
|
this.resolveWith();
|
|
1620
1607
|
}
|
|
1621
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
1622
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.
|
|
1608
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SettleRefundDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1609
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SettleRefundDialogComponent, selector: "vdr-settle-refund-dialog", ngImport: i0, template: "<ng-template vdrDialogTitle>{{ 'order.settle-refund' | translate }}</ng-template>\r\n<p class=\"instruction\">\r\n {{ 'order.settle-refund-manual-instructions' | translate: { method: refund.method } }}\r\n</p>\r\n<clr-input-container>\r\n <label>{{ 'order.transaction-id' | translate }}</label>\r\n <input clrInput name=\"transactionId\" [(ngModel)]=\"transactionId\" />\r\n</clr-input-container>\r\n\r\n<ng-template vdrDialogButtons>\r\n <button type=\"button\" class=\"btn\" (click)=\"cancel()\">{{ 'common.cancel' | translate }}</button>\r\n <button type=\"submit\" (click)=\"submit()\" [disabled]=\"!transactionId\" class=\"btn btn-primary\">\r\n {{ 'order.settle-refund' | translate }}\r\n </button>\r\n</ng-template>\r\n", styles: [":host{padding-bottom:32px}.instruction{margin-top:0;margin-bottom:24px}\n"], dependencies: [{ kind: "directive", type: i3.ClrLabel, selector: "label", inputs: ["for"] }, { kind: "directive", type: i3.ClrInput, selector: "[clrInput]" }, { kind: "component", type: i3.ClrInputContainer, selector: "clr-input-container" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1.FormFieldControlDirective, selector: "input, textarea, select, vdr-currency-input" }, { kind: "directive", type: i1.DialogButtonsDirective, selector: "[vdrDialogButtons]" }, { kind: "directive", type: i1.DialogTitleDirective, selector: "[vdrDialogTitle]" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1623
1610
|
}
|
|
1624
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
1611
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SettleRefundDialogComponent, decorators: [{
|
|
1625
1612
|
type: Component,
|
|
1626
1613
|
args: [{ selector: 'vdr-settle-refund-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template vdrDialogTitle>{{ 'order.settle-refund' | translate }}</ng-template>\r\n<p class=\"instruction\">\r\n {{ 'order.settle-refund-manual-instructions' | translate: { method: refund.method } }}\r\n</p>\r\n<clr-input-container>\r\n <label>{{ 'order.transaction-id' | translate }}</label>\r\n <input clrInput name=\"transactionId\" [(ngModel)]=\"transactionId\" />\r\n</clr-input-container>\r\n\r\n<ng-template vdrDialogButtons>\r\n <button type=\"button\" class=\"btn\" (click)=\"cancel()\">{{ 'common.cancel' | translate }}</button>\r\n <button type=\"submit\" (click)=\"submit()\" [disabled]=\"!transactionId\" class=\"btn btn-primary\">\r\n {{ 'order.settle-refund' | translate }}\r\n </button>\r\n</ng-template>\r\n", styles: [":host{padding-bottom:32px}.instruction{margin-top:0;margin-bottom:24px}\n"] }]
|
|
1627
1614
|
}] });
|
|
@@ -1638,10 +1625,10 @@ class PaymentStateLabelComponent {
|
|
|
1638
1625
|
return 'error';
|
|
1639
1626
|
}
|
|
1640
1627
|
}
|
|
1641
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
1642
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.
|
|
1628
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PaymentStateLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1629
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: PaymentStateLabelComponent, selector: "vdr-payment-state-label", inputs: { state: "state" }, ngImport: i0, template: "<vdr-chip [title]=\"'order.payment-state' | translate\" [colorType]=\"chipColorType\">\r\n <clr-icon shape=\"check-circle\" *ngIf=\"state === 'Settled'\"></clr-icon>\r\n {{ state | stateI18nToken | translate }}\r\n</vdr-chip>\r\n", styles: [":host{display:flex;font-size:14px}\n"], dependencies: [{ kind: "directive", type: i3.ClrIconCustomTag, selector: "clr-icon" }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1.ChipComponent, selector: "vdr-chip", inputs: ["icon", "invert", "colorFrom", "colorType"], outputs: ["iconClick"] }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.StateI18nTokenPipe, name: "stateI18nToken" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1643
1630
|
}
|
|
1644
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
1631
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PaymentStateLabelComponent, decorators: [{
|
|
1645
1632
|
type: Component,
|
|
1646
1633
|
args: [{ selector: 'vdr-payment-state-label', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vdr-chip [title]=\"'order.payment-state' | translate\" [colorType]=\"chipColorType\">\r\n <clr-icon shape=\"check-circle\" *ngIf=\"state === 'Settled'\"></clr-icon>\r\n {{ state | stateI18nToken | translate }}\r\n</vdr-chip>\r\n", styles: [":host{display:flex;font-size:14px}\n"] }]
|
|
1647
1634
|
}], propDecorators: { state: [{
|
|
@@ -1659,10 +1646,10 @@ class RefundStateLabelComponent {
|
|
|
1659
1646
|
return 'error';
|
|
1660
1647
|
}
|
|
1661
1648
|
}
|
|
1662
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
1663
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.
|
|
1649
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: RefundStateLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1650
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: RefundStateLabelComponent, selector: "vdr-refund-state-label", inputs: { state: "state" }, ngImport: i0, template: "<vdr-chip [title]=\"'order.payment-state' | translate\" [colorType]=\"chipColorType\">\r\n <clr-icon shape=\"check-circle\" *ngIf=\"state === 'Settled'\"></clr-icon>\r\n {{ state | stateI18nToken | translate }}\r\n</vdr-chip>\r\n", styles: [":host{display:flex;font-size:14px}\n"], dependencies: [{ kind: "directive", type: i3.ClrIconCustomTag, selector: "clr-icon" }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1.ChipComponent, selector: "vdr-chip", inputs: ["icon", "invert", "colorFrom", "colorType"], outputs: ["iconClick"] }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.StateI18nTokenPipe, name: "stateI18nToken" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1664
1651
|
}
|
|
1665
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
1652
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: RefundStateLabelComponent, decorators: [{
|
|
1666
1653
|
type: Component,
|
|
1667
1654
|
args: [{ selector: 'vdr-refund-state-label', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vdr-chip [title]=\"'order.payment-state' | translate\" [colorType]=\"chipColorType\">\r\n <clr-icon shape=\"check-circle\" *ngIf=\"state === 'Settled'\"></clr-icon>\r\n {{ state | stateI18nToken | translate }}\r\n</vdr-chip>\r\n", styles: [":host{display:flex;font-size:14px}\n"] }]
|
|
1668
1655
|
}], propDecorators: { state: [{
|
|
@@ -1670,10 +1657,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.4", ngImpor
|
|
|
1670
1657
|
}] } });
|
|
1671
1658
|
|
|
1672
1659
|
class PaymentDetailComponent {
|
|
1673
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
1674
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.
|
|
1660
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PaymentDetailComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1661
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: PaymentDetailComponent, selector: "vdr-payment-detail", inputs: { payment: "payment", currencyCode: "currencyCode" }, ngImport: i0, template: "<vdr-labeled-data [label]=\"'order.payment-method' | translate\">\r\n {{ payment.method }}\r\n</vdr-labeled-data>\r\n<vdr-labeled-data [label]=\"'order.amount' | translate\">\r\n {{ payment.amount | localeCurrency: currencyCode }}\r\n</vdr-labeled-data>\r\n<vdr-labeled-data *ngIf=\"payment.errorMessage\" [label]=\"'order.error-message' | translate\">\r\n {{ payment.errorMessage }}\r\n</vdr-labeled-data>\r\n<vdr-labeled-data *ngIf=\"payment.transactionId\" [label]=\"'order.transaction-id' | translate\">\r\n {{ payment.transactionId }}\r\n</vdr-labeled-data>\r\n<vdr-labeled-data [label]=\"'order.payment-metadata' | translate\">\r\n <vdr-object-tree [value]=\"payment.metadata\"></vdr-object-tree>\r\n</vdr-labeled-data>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1.LabeledDataComponent, selector: "vdr-labeled-data", inputs: ["label"] }, { kind: "component", type: i1.ObjectTreeComponent, selector: "vdr-object-tree", inputs: ["value", "isArrayItem"] }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.LocaleCurrencyPipe, name: "localeCurrency" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1675
1662
|
}
|
|
1676
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
1663
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PaymentDetailComponent, decorators: [{
|
|
1677
1664
|
type: Component,
|
|
1678
1665
|
args: [{ selector: 'vdr-payment-detail', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vdr-labeled-data [label]=\"'order.payment-method' | translate\">\r\n {{ payment.method }}\r\n</vdr-labeled-data>\r\n<vdr-labeled-data [label]=\"'order.amount' | translate\">\r\n {{ payment.amount | localeCurrency: currencyCode }}\r\n</vdr-labeled-data>\r\n<vdr-labeled-data *ngIf=\"payment.errorMessage\" [label]=\"'order.error-message' | translate\">\r\n {{ payment.errorMessage }}\r\n</vdr-labeled-data>\r\n<vdr-labeled-data *ngIf=\"payment.transactionId\" [label]=\"'order.transaction-id' | translate\">\r\n {{ payment.transactionId }}\r\n</vdr-labeled-data>\r\n<vdr-labeled-data [label]=\"'order.payment-metadata' | translate\">\r\n <vdr-object-tree [value]=\"payment.metadata\"></vdr-object-tree>\r\n</vdr-labeled-data>\r\n" }]
|
|
1679
1666
|
}], propDecorators: { payment: [{
|
|
@@ -1697,10 +1684,10 @@ class OrderPaymentCardComponent {
|
|
|
1697
1684
|
}
|
|
1698
1685
|
return this.payment.nextStates.filter(s => s !== 'Settled' && s !== 'Error');
|
|
1699
1686
|
}
|
|
1700
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
1701
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.
|
|
1687
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: OrderPaymentCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1688
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: OrderPaymentCardComponent, selector: "vdr-order-payment-card", inputs: { payment: "payment", currencyCode: "currencyCode" }, outputs: { settlePayment: "settlePayment", transitionPaymentState: "transitionPaymentState", settleRefund: "settleRefund" }, ngImport: i0, template: "<div class=\"card\">\r\n <div class=\"card-header payment-header\">\r\n <div>\r\n {{ 'order.payment' | translate }}\r\n <ng-container *ngIf=\"payment.amount\">{{ payment.amount | localeCurrency : currencyCode }}</ng-container>\r\n </div>\r\n <div class=\"payment-state\">\r\n <vdr-payment-state-label [state]=\"payment.state\"></vdr-payment-state-label>\r\n </div>\r\n </div>\r\n <div class=\"card-block\">\r\n <vdr-payment-detail [payment]=\"payment\" [currencyCode]=\"currencyCode\"></vdr-payment-detail>\r\n </div>\r\n <ng-container *ngFor=\"let refund of payment.refunds\">\r\n <div class=\"refund-wrapper card-block\">\r\n <div class=\"card-header payment-header refund-header\">\r\n <clr-icon shape=\"redo\" class=\"refund-icon\" dir=\"down\"></clr-icon>\r\n {{ 'order.refund' | translate }} #{{ refund.id }}\r\n <div class=\"clr-flex-fill\"></div>\r\n <vdr-refund-state-label [state]=\"refund.state\"></vdr-refund-state-label>\r\n </div>\r\n <div class=\"card-block\">\r\n <vdr-labeled-data [label]=\"'common.created-at' | translate\">\r\n {{ refund.createdAt | localeDate : 'medium' }}\r\n </vdr-labeled-data>\r\n <vdr-labeled-data [label]=\"'order.refund-total' | translate\">\r\n {{ refund.total | localeCurrency : currencyCode }}\r\n </vdr-labeled-data>\r\n <vdr-labeled-data [label]=\"'order.transaction-id' | translate\" *ngIf=\"refund.transactionId\">\r\n {{ refund.transactionId }}\r\n </vdr-labeled-data>\r\n <vdr-labeled-data [label]=\"'order.refund-reason' | translate\" *ngIf=\"refund.reason\">\r\n {{ refund.reason }}\r\n </vdr-labeled-data>\r\n <vdr-labeled-data\r\n [label]=\"'order.refund-metadata' | translate\"\r\n *ngIf=\"refundHasMetadata(refund)\"\r\n >\r\n <vdr-object-tree [value]=\"refund.metadata\"></vdr-object-tree>\r\n </vdr-labeled-data>\r\n </div>\r\n <div class=\"card-footer\" *ngIf=\"refund.state === 'Pending'\">\r\n <button class=\"btn btn-sm btn-primary\" (click)=\"settleRefund.emit(refund)\">\r\n {{ 'order.settle-refund' | translate }}\r\n </button>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <div class=\"card-footer\" *ngIf=\"payment.nextStates.length\">\r\n <button\r\n class=\"btn btn-sm btn-primary\"\r\n *ngIf=\"payment.nextStates.includes('Settled')\"\r\n (click)=\"settlePayment.emit(payment)\"\r\n >\r\n {{ 'order.settle-payment' | translate }}\r\n </button>\r\n <vdr-dropdown>\r\n <button class=\"icon-button\" vdrDropdownTrigger>\r\n <clr-icon shape=\"ellipsis-vertical\"></clr-icon>\r\n </button>\r\n <vdr-dropdown-menu vdrPosition=\"bottom-right\">\r\n <ng-container *ngFor=\"let nextState of nextOtherStates()\">\r\n <button\r\n type=\"button\"\r\n vdrDropdownItem\r\n (click)=\"transitionPaymentState.emit({ payment: payment, state: nextState })\"\r\n >\r\n <ng-container *ngIf=\"nextState !== 'Cancelled'; else cancel\">\r\n <clr-icon shape=\"step-forward-2\"></clr-icon>\r\n {{\r\n 'order.transition-to-state'\r\n | translate : { state: (nextState | stateI18nToken | translate) }\r\n }}\r\n </ng-container>\r\n <ng-template #cancel>\r\n <clr-icon shape=\"error-standard\" class=\"is-error\"></clr-icon>\r\n {{ 'order.cancel-payment' | translate }}\r\n </ng-template>\r\n </button>\r\n </ng-container>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n </div>\r\n</div>\r\n", styles: [":host{display:block}.payment-header{display:flex;justify-content:space-between;align-items:center;line-break:anywhere}.refund-icon{margin-inline-end:6px;color:var(--color-grey-400)}.card-footer{display:flex;align-items:center;justify-content:flex-end}.refund-wrapper{font-size:var(--font-size-xs)}\n"], dependencies: [{ kind: "directive", type: i3.ClrIconCustomTag, selector: "clr-icon" }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.Dir, selector: "[dir]", inputs: ["dir"], outputs: ["dirChange"], exportAs: ["dir"] }, { kind: "component", type: i1.DropdownComponent, selector: "vdr-dropdown", inputs: ["manualToggle"] }, { kind: "component", type: i1.DropdownMenuComponent, selector: "vdr-dropdown-menu", inputs: ["vdrPosition", "customClasses"] }, { kind: "directive", type: i1.DropdownTriggerDirective, selector: "[vdrDropdownTrigger]" }, { kind: "directive", type: i1.DropdownItemDirective, selector: "[vdrDropdownItem]" }, { kind: "component", type: i1.LabeledDataComponent, selector: "vdr-labeled-data", inputs: ["label"] }, { kind: "component", type: i1.ObjectTreeComponent, selector: "vdr-object-tree", inputs: ["value", "isArrayItem"] }, { kind: "component", type: PaymentStateLabelComponent, selector: "vdr-payment-state-label", inputs: ["state"] }, { kind: "component", type: RefundStateLabelComponent, selector: "vdr-refund-state-label", inputs: ["state"] }, { kind: "component", type: PaymentDetailComponent, selector: "vdr-payment-detail", inputs: ["payment", "currencyCode"] }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.StateI18nTokenPipe, name: "stateI18nToken" }, { kind: "pipe", type: i1.LocaleDatePipe, name: "localeDate" }, { kind: "pipe", type: i1.LocaleCurrencyPipe, name: "localeCurrency" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1702
1689
|
}
|
|
1703
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
1690
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: OrderPaymentCardComponent, decorators: [{
|
|
1704
1691
|
type: Component,
|
|
1705
1692
|
args: [{ selector: 'vdr-order-payment-card', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"card\">\r\n <div class=\"card-header payment-header\">\r\n <div>\r\n {{ 'order.payment' | translate }}\r\n <ng-container *ngIf=\"payment.amount\">{{ payment.amount | localeCurrency : currencyCode }}</ng-container>\r\n </div>\r\n <div class=\"payment-state\">\r\n <vdr-payment-state-label [state]=\"payment.state\"></vdr-payment-state-label>\r\n </div>\r\n </div>\r\n <div class=\"card-block\">\r\n <vdr-payment-detail [payment]=\"payment\" [currencyCode]=\"currencyCode\"></vdr-payment-detail>\r\n </div>\r\n <ng-container *ngFor=\"let refund of payment.refunds\">\r\n <div class=\"refund-wrapper card-block\">\r\n <div class=\"card-header payment-header refund-header\">\r\n <clr-icon shape=\"redo\" class=\"refund-icon\" dir=\"down\"></clr-icon>\r\n {{ 'order.refund' | translate }} #{{ refund.id }}\r\n <div class=\"clr-flex-fill\"></div>\r\n <vdr-refund-state-label [state]=\"refund.state\"></vdr-refund-state-label>\r\n </div>\r\n <div class=\"card-block\">\r\n <vdr-labeled-data [label]=\"'common.created-at' | translate\">\r\n {{ refund.createdAt | localeDate : 'medium' }}\r\n </vdr-labeled-data>\r\n <vdr-labeled-data [label]=\"'order.refund-total' | translate\">\r\n {{ refund.total | localeCurrency : currencyCode }}\r\n </vdr-labeled-data>\r\n <vdr-labeled-data [label]=\"'order.transaction-id' | translate\" *ngIf=\"refund.transactionId\">\r\n {{ refund.transactionId }}\r\n </vdr-labeled-data>\r\n <vdr-labeled-data [label]=\"'order.refund-reason' | translate\" *ngIf=\"refund.reason\">\r\n {{ refund.reason }}\r\n </vdr-labeled-data>\r\n <vdr-labeled-data\r\n [label]=\"'order.refund-metadata' | translate\"\r\n *ngIf=\"refundHasMetadata(refund)\"\r\n >\r\n <vdr-object-tree [value]=\"refund.metadata\"></vdr-object-tree>\r\n </vdr-labeled-data>\r\n </div>\r\n <div class=\"card-footer\" *ngIf=\"refund.state === 'Pending'\">\r\n <button class=\"btn btn-sm btn-primary\" (click)=\"settleRefund.emit(refund)\">\r\n {{ 'order.settle-refund' | translate }}\r\n </button>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <div class=\"card-footer\" *ngIf=\"payment.nextStates.length\">\r\n <button\r\n class=\"btn btn-sm btn-primary\"\r\n *ngIf=\"payment.nextStates.includes('Settled')\"\r\n (click)=\"settlePayment.emit(payment)\"\r\n >\r\n {{ 'order.settle-payment' | translate }}\r\n </button>\r\n <vdr-dropdown>\r\n <button class=\"icon-button\" vdrDropdownTrigger>\r\n <clr-icon shape=\"ellipsis-vertical\"></clr-icon>\r\n </button>\r\n <vdr-dropdown-menu vdrPosition=\"bottom-right\">\r\n <ng-container *ngFor=\"let nextState of nextOtherStates()\">\r\n <button\r\n type=\"button\"\r\n vdrDropdownItem\r\n (click)=\"transitionPaymentState.emit({ payment: payment, state: nextState })\"\r\n >\r\n <ng-container *ngIf=\"nextState !== 'Cancelled'; else cancel\">\r\n <clr-icon shape=\"step-forward-2\"></clr-icon>\r\n {{\r\n 'order.transition-to-state'\r\n | translate : { state: (nextState | stateI18nToken | translate) }\r\n }}\r\n </ng-container>\r\n <ng-template #cancel>\r\n <clr-icon shape=\"error-standard\" class=\"is-error\"></clr-icon>\r\n {{ 'order.cancel-payment' | translate }}\r\n </ng-template>\r\n </button>\r\n </ng-container>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n </div>\r\n</div>\r\n", styles: [":host{display:block}.payment-header{display:flex;justify-content:space-between;align-items:center;line-break:anywhere}.refund-icon{margin-inline-end:6px;color:var(--color-grey-400)}.card-footer{display:flex;align-items:center;justify-content:flex-end}.refund-wrapper{font-size:var(--font-size-xs)}\n"] }]
|
|
1706
1693
|
}], propDecorators: { payment: [{
|
|
@@ -1731,8 +1718,8 @@ class OrderHistoryEntryHostComponent {
|
|
|
1731
1718
|
ngOnDestroy() {
|
|
1732
1719
|
this.componentRef?.destroy();
|
|
1733
1720
|
}
|
|
1734
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
1735
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.
|
|
1721
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: OrderHistoryEntryHostComponent, deps: [{ token: i1.HistoryEntryComponentService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1722
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: OrderHistoryEntryHostComponent, selector: "vdr-order-history-entry-host", inputs: { entry: "entry", order: "order", expanded: "expanded" }, outputs: { expandClick: "expandClick" }, viewQueries: [{ propertyName: "portalRef", first: true, predicate: ["portal"], descendants: true, read: ViewContainerRef, static: true }], exportAs: ["historyEntry"], ngImport: i0, template: `<vdr-timeline-entry
|
|
1736
1723
|
[displayType]="instance.getDisplayType(entry)"
|
|
1737
1724
|
[iconShape]="instance.getIconShape && instance.getIconShape(entry)"
|
|
1738
1725
|
[createdAt]="entry.createdAt"
|
|
@@ -1744,7 +1731,7 @@ class OrderHistoryEntryHostComponent {
|
|
|
1744
1731
|
<div #portal></div>
|
|
1745
1732
|
</vdr-timeline-entry>`, isInline: true, dependencies: [{ kind: "component", type: i1.TimelineEntryComponent, selector: "vdr-timeline-entry", inputs: ["displayType", "createdAt", "name", "featured", "iconShape", "isFirst", "isLast", "collapsed"], outputs: ["expandClick"] }] }); }
|
|
1746
1733
|
}
|
|
1747
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
1734
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: OrderHistoryEntryHostComponent, decorators: [{
|
|
1748
1735
|
type: Component,
|
|
1749
1736
|
args: [{
|
|
1750
1737
|
selector: 'vdr-order-history-entry-host',
|
|
@@ -1926,10 +1913,10 @@ class OrderHistoryComponent {
|
|
|
1926
1913
|
this.note = '';
|
|
1927
1914
|
this.noteIsPrivate = true;
|
|
1928
1915
|
}
|
|
1929
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
1930
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.4", type: OrderHistoryComponent, selector: "vdr-order-history", inputs: { order: "order", history: "history" }, outputs: { addNote: "addNote", updateNote: "updateNote", deleteNote: "deleteNote" }, ngImport: i0, template: "<div class=\"entry-list\" [class.expanded]=\"expanded\">\r\n <vdr-timeline-entry iconShape=\"note\" displayType=\"muted\" [featured]=\"true\" [isFirst]=\"true\">\r\n <div class=\"note-entry\">\r\n <textarea [(ngModel)]=\"note\" name=\"note\" class=\"note\"></textarea>\r\n <button class=\"btn btn-secondary\" [disabled]=\"!note\" (click)=\"addNoteToOrder()\">\r\n {{ 'common.add-note' | translate }}\r\n </button>\r\n </div>\r\n <div class=\"visibility-select\">\r\n <clr-checkbox-wrapper>\r\n <input type=\"checkbox\" clrCheckbox [(ngModel)]=\"noteIsPrivate\" />\r\n <label>{{ 'order.note-is-private' | translate }}</label>\r\n </clr-checkbox-wrapper>\r\n <span *ngIf=\"noteIsPrivate\" class=\"private\">\r\n {{ 'order.note-only-visible-to-administrators' | translate }}\r\n </span>\r\n <span *ngIf=\"!noteIsPrivate\" class=\"public\">\r\n {{ 'order.note-visible-to-customer' | translate }}\r\n </span>\r\n </div>\r\n </vdr-timeline-entry>\r\n <ng-container *ngFor=\"let entry of history\">\r\n <vdr-order-history-entry-host\r\n *ngIf=\"hasCustomComponent(entry.type); else defaultComponents\"\r\n [order]=\"order\"\r\n [entry]=\"entry\"\r\n [expanded]=\"expanded\"\r\n (expandClick)=\"expanded = !expanded\"\r\n ></vdr-order-history-entry-host>\r\n <ng-template #defaultComponents>\r\n <vdr-timeline-entry\r\n [displayType]=\"getDisplayType(entry)\"\r\n [iconShape]=\"getTimelineIcon(entry)\"\r\n [createdAt]=\"entry.createdAt\"\r\n [name]=\"getName(entry)\"\r\n [featured]=\"isFeatured(entry)\"\r\n [collapsed]=\"!expanded && !isFeatured(entry)\"\r\n (expandClick)=\"expanded = !expanded\"\r\n >\r\n <ng-container [ngSwitch]=\"entry.type\">\r\n <ng-container *ngSwitchCase=\"type.ORDER_STATE_TRANSITION\">\r\n <div class=\"title\" *ngIf=\"entry.data.to === 'Delivered'\">\r\n {{ 'order.history-order-fulfilled' | translate }}\r\n </div>\r\n <div class=\"title\" *ngIf=\"entry.data.to === 'Cancelled'\">\r\n {{ 'order.history-order-cancelled' | translate }}\r\n </div>\r\n <ng-template [ngIf]=\"entry.data.to !== 'Cancelled' && entry.data.to !== 'Delivered'\">\r\n {{\r\n 'order.history-order-transition'\r\n | translate : { from: entry.data.from, to: entry.data.to }\r\n }}\r\n </ng-template>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_MODIFIED\">\r\n <div class=\"title\">\r\n {{ 'order.history-order-modified' | translate }}\r\n </div>\r\n <div\r\n class=\"flex items-center\"\r\n *ngIf=\"getModification(entry.data.modificationId) as modification\"\r\n >\r\n {{ 'order.modify-order-price-difference' | translate }}:\r\n <strong>{{\r\n modification.priceChange | localeCurrency : order.currencyCode\r\n }}</strong>\r\n <vdr-chip colorType=\"success\" class=\"mx-1\" *ngIf=\"modification.isSettled\">{{\r\n 'order.modification-settled' | translate\r\n }}</vdr-chip>\r\n <vdr-chip colorType=\"error\" class=\"mx-1\" *ngIf=\"!modification.isSettled\">{{\r\n 'order.modification-not-settled' | translate\r\n }}</vdr-chip>\r\n <vdr-history-entry-detail>\r\n <vdr-modification-detail\r\n [order]=\"order\"\r\n [modification]=\"modification\"\r\n ></vdr-modification-detail>\r\n </vdr-history-entry-detail>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_PAYMENT_TRANSITION\">\r\n <ng-container *ngIf=\"entry.data.to === 'Settled'; else regularPaymentTransition\">\r\n <div class=\"title\">\r\n {{ 'order.history-payment-settled' | translate }}\r\n </div>\r\n <div class=\"flex items-center\">\r\n <vdr-chip *ngIf=\"getPayment(entry) as payment\" class=\"mr-1\">{{\r\n payment.amount | localeCurrency : order.currencyCode\r\n }}</vdr-chip>\r\n <vdr-history-entry-detail *ngIf=\"getPayment(entry) as payment\">\r\n <vdr-payment-detail\r\n [payment]=\"payment\"\r\n [currencyCode]=\"order.currencyCode\"\r\n ></vdr-payment-detail>\r\n </vdr-history-entry-detail>\r\n </div>\r\n </ng-container>\r\n <ng-template #regularPaymentTransition>\r\n {{\r\n 'order.history-payment-transition'\r\n | translate\r\n : {\r\n from: entry.data.from,\r\n to: entry.data.to,\r\n id: getPayment(entry)?.transactionId\r\n }\r\n }}\r\n </ng-template>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_REFUND_TRANSITION\">\r\n <ng-container *ngIf=\"entry.data.to === 'Settled'; else regularRefundTransition\">\r\n <ng-container *ngIf=\"getRefund(entry) as refund\">\r\n <div class=\"title\">{{ 'order.refund' | translate }} #{{ refund.id }}</div>\r\n <div class=\"flex items-center\">\r\n <vdr-chip colorType=\"warning\" class=\"mr-1\">{{\r\n refund.total | localeCurrency : order.currencyCode\r\n }}</vdr-chip>\r\n <vdr-history-entry-detail>\r\n <vdr-labeled-data [label]=\"'order.cancellation-reason' | translate\">\r\n {{ entry.data.reason }}\r\n </vdr-labeled-data>\r\n <vdr-labeled-data [label]=\"'order.contents' | translate\">\r\n <vdr-simple-item-list\r\n [items]=\"getCancelledItems(refund.lines)\"\r\n ></vdr-simple-item-list>\r\n </vdr-labeled-data>\r\n </vdr-history-entry-detail>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #regularRefundTransition>\r\n {{\r\n 'order.history-refund-transition'\r\n | translate\r\n : {\r\n from: entry.data.from,\r\n to: entry.data.to,\r\n id: entry.data.refundId\r\n }\r\n }}\r\n </ng-template>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_CANCELLATION\">\r\n {{\r\n 'order.history-items-cancelled'\r\n | translate : { count: getCancelledQuantity(entry) }\r\n }}\r\n <vdr-history-entry-detail *ngIf=\"getCancelledItems(entry.data.lines) as items\">\r\n <vdr-labeled-data [label]=\"'order.cancellation-reason' | translate\">\r\n {{ entry.data.reason }}\r\n </vdr-labeled-data>\r\n <vdr-labeled-data [label]=\"'order.contents' | translate\">\r\n <vdr-simple-item-list [items]=\"items\"></vdr-simple-item-list>\r\n </vdr-labeled-data>\r\n <vdr-labeled-data [label]=\"'order.shipping-cancelled' | translate\">\r\n {{ entry.data.shippingCancelled }}\r\n </vdr-labeled-data>\r\n </vdr-history-entry-detail>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_FULFILLMENT\">\r\n {{ 'order.history-fulfillment-created' | translate }}\r\n <vdr-history-entry-detail *ngIf=\"getFulfillment(entry) as fulfillment\">\r\n <vdr-fulfillment-detail\r\n [fulfillmentId]=\"fulfillment.id\"\r\n [order]=\"order\"\r\n ></vdr-fulfillment-detail>\r\n </vdr-history-entry-detail>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_FULFILLMENT_TRANSITION\">\r\n <ng-container *ngIf=\"entry.data.to === 'Delivered'\">\r\n <div class=\"title\">\r\n {{ 'order.history-fulfillment-delivered' | translate }}\r\n </div>\r\n {{ 'order.tracking-code' | translate }}: {{ getFulfillment(entry)?.trackingCode }}\r\n </ng-container>\r\n <ng-container *ngIf=\"entry.data.to === 'Shipped'\">\r\n <div class=\"title\">\r\n {{ 'order.history-fulfillment-shipped' | translate }}\r\n </div>\r\n {{ 'order.tracking-code' | translate }}: {{ getFulfillment(entry)?.trackingCode }}\r\n </ng-container>\r\n <ng-container *ngIf=\"entry.data.to !== 'Delivered' && entry.data.to !== 'Shipped'\">\r\n {{\r\n 'order.history-fulfillment-transition'\r\n | translate : { from: entry.data.from, to: entry.data.to }\r\n }}\r\n </ng-container>\r\n <vdr-history-entry-detail *ngIf=\"getFulfillment(entry) as fulfillment\">\r\n <vdr-fulfillment-detail\r\n [fulfillmentId]=\"fulfillment.id\"\r\n [order]=\"order\"\r\n ></vdr-fulfillment-detail>\r\n </vdr-history-entry-detail>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_NOTE\">\r\n <div class=\"flex\">\r\n <div class=\"note-text\">\r\n <span *ngIf=\"entry.isPublic\" class=\"note-visibility public\">{{\r\n 'common.public' | translate\r\n }}</span>\r\n <span *ngIf=\"!entry.isPublic\" class=\"note-visibility private\">{{\r\n 'common.private' | translate\r\n }}</span>\r\n {{ entry.data.note }}\r\n </div>\r\n <div class=\"flex-spacer\"></div>\r\n <vdr-dropdown>\r\n <button class=\"button-small ml-1\" vdrDropdownTrigger>\r\n <clr-icon shape=\"ellipsis-vertical\" size=\"12\"></clr-icon>\r\n </button>\r\n <vdr-dropdown-menu vdrPosition=\"bottom-right\">\r\n <button\r\n vdrDropdownItem\r\n (click)=\"updateNote.emit(entry)\"\r\n [disabled]=\"!('UpdateOrder' | hasPermission)\"\r\n >\r\n <clr-icon shape=\"edit\"></clr-icon>\r\n {{ 'common.edit' | translate }}\r\n </button>\r\n <div class=\"dropdown-divider\"></div>\r\n <button\r\n vdrDropdownItem\r\n (click)=\"deleteNote.emit(entry)\"\r\n [disabled]=\"!('UpdateOrder' | hasPermission)\"\r\n >\r\n <clr-icon shape=\"trash\" class=\"is-danger\"></clr-icon>\r\n {{ 'common.delete' | translate }}\r\n </button>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_COUPON_APPLIED\">\r\n {{ 'order.history-coupon-code-applied' | translate }}:\r\n <vdr-chip>\r\n <a [routerLink]=\"['/marketing', 'promotions', entry.data.promotionId]\">{{\r\n entry.data.couponCode\r\n }}</a>\r\n </vdr-chip>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_COUPON_REMOVED\">\r\n {{ 'order.history-coupon-code-removed' | translate }}:\r\n <vdr-chip\r\n ><span class=\"cancelled-coupon-code\">{{ entry.data.couponCode }}</span></vdr-chip\r\n >\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_CUSTOMER_UPDATED\">\r\n <div class=\"title\">\r\n {{\r\n 'order.history-customer-updated'\r\n | translate : { newCustomerName: entry.data.newCustomerName }\r\n }}\r\n </div>\r\n <div class=\"flex\">\r\n <div class=\"note-text\">\r\n {{ entry.data.note }}\r\n </div>\r\n <div class=\"flex-spacer\"></div>\r\n <vdr-history-entry-detail>\r\n <vdr-labeled-data [label]=\"'order.previous-customer' | translate\">\r\n <a\r\n *ngIf=\"entry.data.previousCustomerId\"\r\n class=\"button-ghost\"\r\n [routerLink]=\"[\r\n '/customer',\r\n 'customers',\r\n entry.data.previousCustomerId\r\n ]\"\r\n >\r\n <clr-icon shape=\"user\" class=\"is-solid\"></clr-icon>\r\n <span>{{ entry.data.previousCustomerName }}</span>\r\n <clr-icon shape=\"arrow right\"></clr-icon>\r\n </a>\r\n </vdr-labeled-data>\r\n <vdr-labeled-data [label]=\"'order.new-customer' | translate\">\r\n <a\r\n *ngIf=\"entry.data.newCustomerId\"\r\n class=\"button-ghost\"\r\n [routerLink]=\"['/customer', 'customers', entry.data.newCustomerId]\"\r\n >\r\n <clr-icon shape=\"user\" class=\"is-solid\"></clr-icon>\r\n <span>{{ entry.data.newCustomerName }}</span>\r\n <clr-icon shape=\"arrow right\"></clr-icon>\r\n </a>\r\n </vdr-labeled-data>\r\n </vdr-history-entry-detail>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <div class=\"title\">\r\n {{ entry.type | translate }}\r\n </div>\r\n <vdr-history-entry-detail *ngIf=\"entry.data\">\r\n <vdr-object-tree [value]=\"entry.data\"></vdr-object-tree>\r\n </vdr-history-entry-detail>\r\n </ng-container>\r\n </ng-container>\r\n </vdr-timeline-entry>\r\n </ng-template>\r\n </ng-container>\r\n\r\n <vdr-timeline-entry [isLast]=\"true\" [createdAt]=\"order.createdAt\" [featured]=\"true\">\r\n <div class=\"title\">\r\n {{ 'order.history-order-created' | translate }}\r\n </div>\r\n </vdr-timeline-entry>\r\n</div>\r\n", styles: [":host{display:block}.entry-list{margin-inline-start:calc(var(--space-unit) * 2)}.note-entry{display:flex;align-items:center}.note-entry .note{flex:1}.note-entry button{margin:0}.visibility-select{display:flex;justify-content:space-between;align-items:baseline}.visibility-select .public{color:var(--color-warning-700)}.visibility-select .private{color:var(--color-success-700)}textarea.note{flex:1;height:36px;border-radius:3px;margin-inline-end:6px}.note-text{color:var(--color-grey-800);white-space:pre-wrap;max-width:580px}.cancelled-coupon-code{text-decoration:line-through}.note-visibility{text-transform:lowercase}.note-visibility.public{color:var(--color-warning-700)}.note-visibility.private{color:var(--color-success-700)}\n"], dependencies: [{ kind: "directive", type: i3.ClrIconCustomTag, selector: "clr-icon" }, { kind: "directive", type: i3.ClrLabel, selector: "label", inputs: ["for"] }, { kind: "directive", type: i3.ClrCheckbox, selector: "[clrCheckbox],[clrToggle]" }, { kind: "component", type: i3.ClrCheckboxWrapper, selector: "clr-checkbox-wrapper,clr-toggle-wrapper" }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i2$1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i1.ChipComponent, selector: "vdr-chip", inputs: ["icon", "invert", "colorFrom", "colorType"], outputs: ["iconClick"] }, { kind: "directive", type: i1.FormFieldControlDirective, selector: "input, textarea, select, vdr-currency-input" }, { kind: "component", type: i1.DropdownComponent, selector: "vdr-dropdown", inputs: ["manualToggle"] }, { kind: "component", type: i1.DropdownMenuComponent, selector: "vdr-dropdown-menu", inputs: ["vdrPosition", "customClasses"] }, { kind: "directive", type: i1.DropdownTriggerDirective, selector: "[vdrDropdownTrigger]" }, { kind: "directive", type: i1.DropdownItemDirective, selector: "[vdrDropdownItem]" }, { kind: "component", type: i1.LabeledDataComponent, selector: "vdr-labeled-data", inputs: ["label"] }, { kind: "component", type: i1.ObjectTreeComponent, selector: "vdr-object-tree", inputs: ["value", "isArrayItem"] }, { kind: "component", type: i1.TimelineEntryComponent, selector: "vdr-timeline-entry", inputs: ["displayType", "createdAt", "name", "featured", "iconShape", "isFirst", "isLast", "collapsed"], outputs: ["expandClick"] }, { kind: "component", type: i1.HistoryEntryDetailComponent, selector: "vdr-history-entry-detail" }, { kind: "component", type: FulfillmentDetailComponent, selector: "vdr-fulfillment-detail", inputs: ["fulfillmentId", "order"] }, { kind: "component", type: PaymentDetailComponent, selector: "vdr-payment-detail", inputs: ["payment", "currencyCode"] }, { kind: "component", type: SimpleItemListComponent, selector: "vdr-simple-item-list", inputs: ["items"] }, { kind: "component", type: ModificationDetailComponent, selector: "vdr-modification-detail", inputs: ["order", "modification"] }, { kind: "component", type: OrderHistoryEntryHostComponent, selector: "vdr-order-history-entry-host", inputs: ["entry", "order", "expanded"], outputs: ["expandClick"], exportAs: ["historyEntry"] }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.HasPermissionPipe, name: "hasPermission" }, { kind: "pipe", type: i1.LocaleCurrencyPipe, name: "localeCurrency" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1916
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: OrderHistoryComponent, deps: [{ token: i1.HistoryEntryComponentService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1917
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: OrderHistoryComponent, selector: "vdr-order-history", inputs: { order: "order", history: "history" }, outputs: { addNote: "addNote", updateNote: "updateNote", deleteNote: "deleteNote" }, ngImport: i0, template: "<div class=\"entry-list\" [class.expanded]=\"expanded\">\r\n <vdr-timeline-entry iconShape=\"note\" displayType=\"muted\" [featured]=\"true\" [isFirst]=\"true\">\r\n <div class=\"note-entry\">\r\n <textarea [(ngModel)]=\"note\" name=\"note\" class=\"note\"></textarea>\r\n <button class=\"btn btn-secondary\" [disabled]=\"!note\" (click)=\"addNoteToOrder()\">\r\n {{ 'common.add-note' | translate }}\r\n </button>\r\n </div>\r\n <div class=\"visibility-select\">\r\n <clr-checkbox-wrapper>\r\n <input type=\"checkbox\" clrCheckbox [(ngModel)]=\"noteIsPrivate\" />\r\n <label>{{ 'order.note-is-private' | translate }}</label>\r\n </clr-checkbox-wrapper>\r\n <span *ngIf=\"noteIsPrivate\" class=\"private\">\r\n {{ 'order.note-only-visible-to-administrators' | translate }}\r\n </span>\r\n <span *ngIf=\"!noteIsPrivate\" class=\"public\">\r\n {{ 'order.note-visible-to-customer' | translate }}\r\n </span>\r\n </div>\r\n </vdr-timeline-entry>\r\n <ng-container *ngFor=\"let entry of history\">\r\n <vdr-order-history-entry-host\r\n *ngIf=\"hasCustomComponent(entry.type); else defaultComponents\"\r\n [order]=\"order\"\r\n [entry]=\"entry\"\r\n [expanded]=\"expanded\"\r\n (expandClick)=\"expanded = !expanded\"\r\n ></vdr-order-history-entry-host>\r\n <ng-template #defaultComponents>\r\n <vdr-timeline-entry\r\n [displayType]=\"getDisplayType(entry)\"\r\n [iconShape]=\"getTimelineIcon(entry)\"\r\n [createdAt]=\"entry.createdAt\"\r\n [name]=\"getName(entry)\"\r\n [featured]=\"isFeatured(entry)\"\r\n [collapsed]=\"!expanded && !isFeatured(entry)\"\r\n (expandClick)=\"expanded = !expanded\"\r\n >\r\n <ng-container [ngSwitch]=\"entry.type\">\r\n <ng-container *ngSwitchCase=\"type.ORDER_STATE_TRANSITION\">\r\n <div class=\"title\" *ngIf=\"entry.data.to === 'Delivered'\">\r\n {{ 'order.history-order-fulfilled' | translate }}\r\n </div>\r\n <div class=\"title\" *ngIf=\"entry.data.to === 'Cancelled'\">\r\n {{ 'order.history-order-cancelled' | translate }}\r\n </div>\r\n <ng-template [ngIf]=\"entry.data.to !== 'Cancelled' && entry.data.to !== 'Delivered'\">\r\n {{\r\n 'order.history-order-transition'\r\n | translate : { from: entry.data.from, to: entry.data.to }\r\n }}\r\n </ng-template>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_MODIFIED\">\r\n <div class=\"title\">\r\n {{ 'order.history-order-modified' | translate }}\r\n </div>\r\n <div\r\n class=\"flex items-center\"\r\n *ngIf=\"getModification(entry.data.modificationId) as modification\"\r\n >\r\n {{ 'order.modify-order-price-difference' | translate }}:\r\n <strong>{{\r\n modification.priceChange | localeCurrency : order.currencyCode\r\n }}</strong>\r\n <vdr-chip colorType=\"success\" class=\"mx-1\" *ngIf=\"modification.isSettled\">{{\r\n 'order.modification-settled' | translate\r\n }}</vdr-chip>\r\n <vdr-chip colorType=\"error\" class=\"mx-1\" *ngIf=\"!modification.isSettled\">{{\r\n 'order.modification-not-settled' | translate\r\n }}</vdr-chip>\r\n <vdr-history-entry-detail>\r\n <vdr-modification-detail\r\n [order]=\"order\"\r\n [modification]=\"modification\"\r\n ></vdr-modification-detail>\r\n </vdr-history-entry-detail>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_PAYMENT_TRANSITION\">\r\n <ng-container *ngIf=\"entry.data.to === 'Settled'; else regularPaymentTransition\">\r\n <div class=\"title\">\r\n {{ 'order.history-payment-settled' | translate }}\r\n </div>\r\n <div class=\"flex items-center\">\r\n <vdr-chip *ngIf=\"getPayment(entry) as payment\" class=\"mr-1\">{{\r\n payment.amount | localeCurrency : order.currencyCode\r\n }}</vdr-chip>\r\n <vdr-history-entry-detail *ngIf=\"getPayment(entry) as payment\">\r\n <vdr-payment-detail\r\n [payment]=\"payment\"\r\n [currencyCode]=\"order.currencyCode\"\r\n ></vdr-payment-detail>\r\n </vdr-history-entry-detail>\r\n </div>\r\n </ng-container>\r\n <ng-template #regularPaymentTransition>\r\n {{\r\n 'order.history-payment-transition'\r\n | translate\r\n : {\r\n from: entry.data.from,\r\n to: entry.data.to,\r\n id: getPayment(entry)?.transactionId\r\n }\r\n }}\r\n </ng-template>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_REFUND_TRANSITION\">\r\n <ng-container *ngIf=\"entry.data.to === 'Settled'; else regularRefundTransition\">\r\n <ng-container *ngIf=\"getRefund(entry) as refund\">\r\n <div class=\"title\">{{ 'order.refund' | translate }} #{{ refund.id }}</div>\r\n <div class=\"flex items-center\">\r\n <vdr-chip colorType=\"warning\" class=\"mr-1\">{{\r\n refund.total | localeCurrency : order.currencyCode\r\n }}</vdr-chip>\r\n <vdr-history-entry-detail>\r\n <vdr-labeled-data [label]=\"'order.cancellation-reason' | translate\">\r\n {{ entry.data.reason }}\r\n </vdr-labeled-data>\r\n <vdr-labeled-data [label]=\"'order.contents' | translate\">\r\n <vdr-simple-item-list\r\n [items]=\"getCancelledItems(refund.lines)\"\r\n ></vdr-simple-item-list>\r\n </vdr-labeled-data>\r\n </vdr-history-entry-detail>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #regularRefundTransition>\r\n {{\r\n 'order.history-refund-transition'\r\n | translate\r\n : {\r\n from: entry.data.from,\r\n to: entry.data.to,\r\n id: entry.data.refundId\r\n }\r\n }}\r\n </ng-template>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_CANCELLATION\">\r\n {{\r\n 'order.history-items-cancelled'\r\n | translate : { count: getCancelledQuantity(entry) }\r\n }}\r\n <vdr-history-entry-detail *ngIf=\"getCancelledItems(entry.data.lines) as items\">\r\n <vdr-labeled-data [label]=\"'order.cancellation-reason' | translate\">\r\n {{ entry.data.reason }}\r\n </vdr-labeled-data>\r\n <vdr-labeled-data [label]=\"'order.contents' | translate\">\r\n <vdr-simple-item-list [items]=\"items\"></vdr-simple-item-list>\r\n </vdr-labeled-data>\r\n <vdr-labeled-data [label]=\"'order.shipping-cancelled' | translate\">\r\n {{ entry.data.shippingCancelled }}\r\n </vdr-labeled-data>\r\n </vdr-history-entry-detail>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_FULFILLMENT\">\r\n {{ 'order.history-fulfillment-created' | translate }}\r\n <vdr-history-entry-detail *ngIf=\"getFulfillment(entry) as fulfillment\">\r\n <vdr-fulfillment-detail\r\n [fulfillmentId]=\"fulfillment.id\"\r\n [order]=\"order\"\r\n ></vdr-fulfillment-detail>\r\n </vdr-history-entry-detail>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_FULFILLMENT_TRANSITION\">\r\n <ng-container *ngIf=\"entry.data.to === 'Delivered'\">\r\n <div class=\"title\">\r\n {{ 'order.history-fulfillment-delivered' | translate }}\r\n </div>\r\n {{ 'order.tracking-code' | translate }}: {{ getFulfillment(entry)?.trackingCode }}\r\n </ng-container>\r\n <ng-container *ngIf=\"entry.data.to === 'Shipped'\">\r\n <div class=\"title\">\r\n {{ 'order.history-fulfillment-shipped' | translate }}\r\n </div>\r\n {{ 'order.tracking-code' | translate }}: {{ getFulfillment(entry)?.trackingCode }}\r\n </ng-container>\r\n <ng-container *ngIf=\"entry.data.to !== 'Delivered' && entry.data.to !== 'Shipped'\">\r\n {{\r\n 'order.history-fulfillment-transition'\r\n | translate : { from: entry.data.from, to: entry.data.to }\r\n }}\r\n </ng-container>\r\n <vdr-history-entry-detail *ngIf=\"getFulfillment(entry) as fulfillment\">\r\n <vdr-fulfillment-detail\r\n [fulfillmentId]=\"fulfillment.id\"\r\n [order]=\"order\"\r\n ></vdr-fulfillment-detail>\r\n </vdr-history-entry-detail>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_NOTE\">\r\n <div class=\"flex\">\r\n <div class=\"note-text\">\r\n <span *ngIf=\"entry.isPublic\" class=\"note-visibility public\">{{\r\n 'common.public' | translate\r\n }}</span>\r\n <span *ngIf=\"!entry.isPublic\" class=\"note-visibility private\">{{\r\n 'common.private' | translate\r\n }}</span>\r\n {{ entry.data.note }}\r\n </div>\r\n <div class=\"flex-spacer\"></div>\r\n <vdr-dropdown>\r\n <button class=\"button-small ml-1\" vdrDropdownTrigger>\r\n <clr-icon shape=\"ellipsis-vertical\" size=\"12\"></clr-icon>\r\n </button>\r\n <vdr-dropdown-menu vdrPosition=\"bottom-right\">\r\n <button\r\n vdrDropdownItem\r\n (click)=\"updateNote.emit(entry)\"\r\n [disabled]=\"!('UpdateOrder' | hasPermission)\"\r\n >\r\n <clr-icon shape=\"edit\"></clr-icon>\r\n {{ 'common.edit' | translate }}\r\n </button>\r\n <div class=\"dropdown-divider\"></div>\r\n <button\r\n vdrDropdownItem\r\n (click)=\"deleteNote.emit(entry)\"\r\n [disabled]=\"!('UpdateOrder' | hasPermission)\"\r\n >\r\n <clr-icon shape=\"trash\" class=\"is-danger\"></clr-icon>\r\n {{ 'common.delete' | translate }}\r\n </button>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_COUPON_APPLIED\">\r\n {{ 'order.history-coupon-code-applied' | translate }}:\r\n <vdr-chip>\r\n <a [routerLink]=\"['/marketing', 'promotions', entry.data.promotionId]\">{{\r\n entry.data.couponCode\r\n }}</a>\r\n </vdr-chip>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_COUPON_REMOVED\">\r\n {{ 'order.history-coupon-code-removed' | translate }}:\r\n <vdr-chip\r\n ><span class=\"cancelled-coupon-code\">{{ entry.data.couponCode }}</span></vdr-chip\r\n >\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_CUSTOMER_UPDATED\">\r\n <div class=\"title\">\r\n {{\r\n 'order.history-customer-updated'\r\n | translate : { newCustomerName: entry.data.newCustomerName }\r\n }}\r\n </div>\r\n <div class=\"flex\">\r\n <div class=\"note-text\">\r\n {{ entry.data.note }}\r\n </div>\r\n <div class=\"flex-spacer\"></div>\r\n <vdr-history-entry-detail>\r\n <vdr-labeled-data [label]=\"'order.previous-customer' | translate\">\r\n <a\r\n *ngIf=\"entry.data.previousCustomerId\"\r\n class=\"button-ghost\"\r\n [routerLink]=\"[\r\n '/customer',\r\n 'customers',\r\n entry.data.previousCustomerId\r\n ]\"\r\n >\r\n <clr-icon shape=\"user\" class=\"is-solid\"></clr-icon>\r\n <span>{{ entry.data.previousCustomerName }}</span>\r\n <clr-icon shape=\"arrow right\"></clr-icon>\r\n </a>\r\n </vdr-labeled-data>\r\n <vdr-labeled-data [label]=\"'order.new-customer' | translate\">\r\n <a\r\n *ngIf=\"entry.data.newCustomerId\"\r\n class=\"button-ghost\"\r\n [routerLink]=\"['/customer', 'customers', entry.data.newCustomerId]\"\r\n >\r\n <clr-icon shape=\"user\" class=\"is-solid\"></clr-icon>\r\n <span>{{ entry.data.newCustomerName }}</span>\r\n <clr-icon shape=\"arrow right\"></clr-icon>\r\n </a>\r\n </vdr-labeled-data>\r\n </vdr-history-entry-detail>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <div class=\"title\">\r\n {{ entry.type | translate }}\r\n </div>\r\n <vdr-history-entry-detail *ngIf=\"entry.data\">\r\n <vdr-object-tree [value]=\"entry.data\"></vdr-object-tree>\r\n </vdr-history-entry-detail>\r\n </ng-container>\r\n </ng-container>\r\n </vdr-timeline-entry>\r\n </ng-template>\r\n </ng-container>\r\n\r\n <vdr-timeline-entry [isLast]=\"true\" [createdAt]=\"order.createdAt\" [featured]=\"true\">\r\n <div class=\"title\">\r\n {{ 'order.history-order-created' | translate }}\r\n </div>\r\n </vdr-timeline-entry>\r\n</div>\r\n", styles: [":host{display:block}.entry-list{margin-inline-start:calc(var(--space-unit) * 2)}.note-entry{display:flex;align-items:center}.note-entry .note{flex:1}.note-entry button{margin:0}.visibility-select{display:flex;justify-content:space-between;align-items:baseline}.visibility-select .public{color:var(--color-warning-700)}.visibility-select .private{color:var(--color-success-700)}textarea.note{flex:1;height:36px;border-radius:3px;margin-inline-end:6px}.note-text{color:var(--color-grey-800);white-space:pre-wrap;max-width:580px}.cancelled-coupon-code{text-decoration:line-through}.note-visibility{text-transform:lowercase}.note-visibility.public{color:var(--color-warning-700)}.note-visibility.private{color:var(--color-success-700)}\n"], dependencies: [{ kind: "directive", type: i3.ClrIconCustomTag, selector: "clr-icon" }, { kind: "directive", type: i3.ClrLabel, selector: "label", inputs: ["for"] }, { kind: "directive", type: i3.ClrCheckbox, selector: "[clrCheckbox],[clrToggle]" }, { kind: "component", type: i3.ClrCheckboxWrapper, selector: "clr-checkbox-wrapper,clr-toggle-wrapper" }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i2$1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i1.ChipComponent, selector: "vdr-chip", inputs: ["icon", "invert", "colorFrom", "colorType"], outputs: ["iconClick"] }, { kind: "directive", type: i1.FormFieldControlDirective, selector: "input, textarea, select, vdr-currency-input" }, { kind: "component", type: i1.DropdownComponent, selector: "vdr-dropdown", inputs: ["manualToggle"] }, { kind: "component", type: i1.DropdownMenuComponent, selector: "vdr-dropdown-menu", inputs: ["vdrPosition", "customClasses"] }, { kind: "directive", type: i1.DropdownTriggerDirective, selector: "[vdrDropdownTrigger]" }, { kind: "directive", type: i1.DropdownItemDirective, selector: "[vdrDropdownItem]" }, { kind: "component", type: i1.LabeledDataComponent, selector: "vdr-labeled-data", inputs: ["label"] }, { kind: "component", type: i1.ObjectTreeComponent, selector: "vdr-object-tree", inputs: ["value", "isArrayItem"] }, { kind: "component", type: i1.TimelineEntryComponent, selector: "vdr-timeline-entry", inputs: ["displayType", "createdAt", "name", "featured", "iconShape", "isFirst", "isLast", "collapsed"], outputs: ["expandClick"] }, { kind: "component", type: i1.HistoryEntryDetailComponent, selector: "vdr-history-entry-detail" }, { kind: "component", type: FulfillmentDetailComponent, selector: "vdr-fulfillment-detail", inputs: ["fulfillmentId", "order"] }, { kind: "component", type: PaymentDetailComponent, selector: "vdr-payment-detail", inputs: ["payment", "currencyCode"] }, { kind: "component", type: SimpleItemListComponent, selector: "vdr-simple-item-list", inputs: ["items"] }, { kind: "component", type: ModificationDetailComponent, selector: "vdr-modification-detail", inputs: ["order", "modification"] }, { kind: "component", type: OrderHistoryEntryHostComponent, selector: "vdr-order-history-entry-host", inputs: ["entry", "order", "expanded"], outputs: ["expandClick"], exportAs: ["historyEntry"] }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.HasPermissionPipe, name: "hasPermission" }, { kind: "pipe", type: i1.LocaleCurrencyPipe, name: "localeCurrency" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1931
1918
|
}
|
|
1932
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
1919
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: OrderHistoryComponent, decorators: [{
|
|
1933
1920
|
type: Component,
|
|
1934
1921
|
args: [{ selector: 'vdr-order-history', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"entry-list\" [class.expanded]=\"expanded\">\r\n <vdr-timeline-entry iconShape=\"note\" displayType=\"muted\" [featured]=\"true\" [isFirst]=\"true\">\r\n <div class=\"note-entry\">\r\n <textarea [(ngModel)]=\"note\" name=\"note\" class=\"note\"></textarea>\r\n <button class=\"btn btn-secondary\" [disabled]=\"!note\" (click)=\"addNoteToOrder()\">\r\n {{ 'common.add-note' | translate }}\r\n </button>\r\n </div>\r\n <div class=\"visibility-select\">\r\n <clr-checkbox-wrapper>\r\n <input type=\"checkbox\" clrCheckbox [(ngModel)]=\"noteIsPrivate\" />\r\n <label>{{ 'order.note-is-private' | translate }}</label>\r\n </clr-checkbox-wrapper>\r\n <span *ngIf=\"noteIsPrivate\" class=\"private\">\r\n {{ 'order.note-only-visible-to-administrators' | translate }}\r\n </span>\r\n <span *ngIf=\"!noteIsPrivate\" class=\"public\">\r\n {{ 'order.note-visible-to-customer' | translate }}\r\n </span>\r\n </div>\r\n </vdr-timeline-entry>\r\n <ng-container *ngFor=\"let entry of history\">\r\n <vdr-order-history-entry-host\r\n *ngIf=\"hasCustomComponent(entry.type); else defaultComponents\"\r\n [order]=\"order\"\r\n [entry]=\"entry\"\r\n [expanded]=\"expanded\"\r\n (expandClick)=\"expanded = !expanded\"\r\n ></vdr-order-history-entry-host>\r\n <ng-template #defaultComponents>\r\n <vdr-timeline-entry\r\n [displayType]=\"getDisplayType(entry)\"\r\n [iconShape]=\"getTimelineIcon(entry)\"\r\n [createdAt]=\"entry.createdAt\"\r\n [name]=\"getName(entry)\"\r\n [featured]=\"isFeatured(entry)\"\r\n [collapsed]=\"!expanded && !isFeatured(entry)\"\r\n (expandClick)=\"expanded = !expanded\"\r\n >\r\n <ng-container [ngSwitch]=\"entry.type\">\r\n <ng-container *ngSwitchCase=\"type.ORDER_STATE_TRANSITION\">\r\n <div class=\"title\" *ngIf=\"entry.data.to === 'Delivered'\">\r\n {{ 'order.history-order-fulfilled' | translate }}\r\n </div>\r\n <div class=\"title\" *ngIf=\"entry.data.to === 'Cancelled'\">\r\n {{ 'order.history-order-cancelled' | translate }}\r\n </div>\r\n <ng-template [ngIf]=\"entry.data.to !== 'Cancelled' && entry.data.to !== 'Delivered'\">\r\n {{\r\n 'order.history-order-transition'\r\n | translate : { from: entry.data.from, to: entry.data.to }\r\n }}\r\n </ng-template>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_MODIFIED\">\r\n <div class=\"title\">\r\n {{ 'order.history-order-modified' | translate }}\r\n </div>\r\n <div\r\n class=\"flex items-center\"\r\n *ngIf=\"getModification(entry.data.modificationId) as modification\"\r\n >\r\n {{ 'order.modify-order-price-difference' | translate }}:\r\n <strong>{{\r\n modification.priceChange | localeCurrency : order.currencyCode\r\n }}</strong>\r\n <vdr-chip colorType=\"success\" class=\"mx-1\" *ngIf=\"modification.isSettled\">{{\r\n 'order.modification-settled' | translate\r\n }}</vdr-chip>\r\n <vdr-chip colorType=\"error\" class=\"mx-1\" *ngIf=\"!modification.isSettled\">{{\r\n 'order.modification-not-settled' | translate\r\n }}</vdr-chip>\r\n <vdr-history-entry-detail>\r\n <vdr-modification-detail\r\n [order]=\"order\"\r\n [modification]=\"modification\"\r\n ></vdr-modification-detail>\r\n </vdr-history-entry-detail>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_PAYMENT_TRANSITION\">\r\n <ng-container *ngIf=\"entry.data.to === 'Settled'; else regularPaymentTransition\">\r\n <div class=\"title\">\r\n {{ 'order.history-payment-settled' | translate }}\r\n </div>\r\n <div class=\"flex items-center\">\r\n <vdr-chip *ngIf=\"getPayment(entry) as payment\" class=\"mr-1\">{{\r\n payment.amount | localeCurrency : order.currencyCode\r\n }}</vdr-chip>\r\n <vdr-history-entry-detail *ngIf=\"getPayment(entry) as payment\">\r\n <vdr-payment-detail\r\n [payment]=\"payment\"\r\n [currencyCode]=\"order.currencyCode\"\r\n ></vdr-payment-detail>\r\n </vdr-history-entry-detail>\r\n </div>\r\n </ng-container>\r\n <ng-template #regularPaymentTransition>\r\n {{\r\n 'order.history-payment-transition'\r\n | translate\r\n : {\r\n from: entry.data.from,\r\n to: entry.data.to,\r\n id: getPayment(entry)?.transactionId\r\n }\r\n }}\r\n </ng-template>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_REFUND_TRANSITION\">\r\n <ng-container *ngIf=\"entry.data.to === 'Settled'; else regularRefundTransition\">\r\n <ng-container *ngIf=\"getRefund(entry) as refund\">\r\n <div class=\"title\">{{ 'order.refund' | translate }} #{{ refund.id }}</div>\r\n <div class=\"flex items-center\">\r\n <vdr-chip colorType=\"warning\" class=\"mr-1\">{{\r\n refund.total | localeCurrency : order.currencyCode\r\n }}</vdr-chip>\r\n <vdr-history-entry-detail>\r\n <vdr-labeled-data [label]=\"'order.cancellation-reason' | translate\">\r\n {{ entry.data.reason }}\r\n </vdr-labeled-data>\r\n <vdr-labeled-data [label]=\"'order.contents' | translate\">\r\n <vdr-simple-item-list\r\n [items]=\"getCancelledItems(refund.lines)\"\r\n ></vdr-simple-item-list>\r\n </vdr-labeled-data>\r\n </vdr-history-entry-detail>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #regularRefundTransition>\r\n {{\r\n 'order.history-refund-transition'\r\n | translate\r\n : {\r\n from: entry.data.from,\r\n to: entry.data.to,\r\n id: entry.data.refundId\r\n }\r\n }}\r\n </ng-template>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_CANCELLATION\">\r\n {{\r\n 'order.history-items-cancelled'\r\n | translate : { count: getCancelledQuantity(entry) }\r\n }}\r\n <vdr-history-entry-detail *ngIf=\"getCancelledItems(entry.data.lines) as items\">\r\n <vdr-labeled-data [label]=\"'order.cancellation-reason' | translate\">\r\n {{ entry.data.reason }}\r\n </vdr-labeled-data>\r\n <vdr-labeled-data [label]=\"'order.contents' | translate\">\r\n <vdr-simple-item-list [items]=\"items\"></vdr-simple-item-list>\r\n </vdr-labeled-data>\r\n <vdr-labeled-data [label]=\"'order.shipping-cancelled' | translate\">\r\n {{ entry.data.shippingCancelled }}\r\n </vdr-labeled-data>\r\n </vdr-history-entry-detail>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_FULFILLMENT\">\r\n {{ 'order.history-fulfillment-created' | translate }}\r\n <vdr-history-entry-detail *ngIf=\"getFulfillment(entry) as fulfillment\">\r\n <vdr-fulfillment-detail\r\n [fulfillmentId]=\"fulfillment.id\"\r\n [order]=\"order\"\r\n ></vdr-fulfillment-detail>\r\n </vdr-history-entry-detail>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_FULFILLMENT_TRANSITION\">\r\n <ng-container *ngIf=\"entry.data.to === 'Delivered'\">\r\n <div class=\"title\">\r\n {{ 'order.history-fulfillment-delivered' | translate }}\r\n </div>\r\n {{ 'order.tracking-code' | translate }}: {{ getFulfillment(entry)?.trackingCode }}\r\n </ng-container>\r\n <ng-container *ngIf=\"entry.data.to === 'Shipped'\">\r\n <div class=\"title\">\r\n {{ 'order.history-fulfillment-shipped' | translate }}\r\n </div>\r\n {{ 'order.tracking-code' | translate }}: {{ getFulfillment(entry)?.trackingCode }}\r\n </ng-container>\r\n <ng-container *ngIf=\"entry.data.to !== 'Delivered' && entry.data.to !== 'Shipped'\">\r\n {{\r\n 'order.history-fulfillment-transition'\r\n | translate : { from: entry.data.from, to: entry.data.to }\r\n }}\r\n </ng-container>\r\n <vdr-history-entry-detail *ngIf=\"getFulfillment(entry) as fulfillment\">\r\n <vdr-fulfillment-detail\r\n [fulfillmentId]=\"fulfillment.id\"\r\n [order]=\"order\"\r\n ></vdr-fulfillment-detail>\r\n </vdr-history-entry-detail>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_NOTE\">\r\n <div class=\"flex\">\r\n <div class=\"note-text\">\r\n <span *ngIf=\"entry.isPublic\" class=\"note-visibility public\">{{\r\n 'common.public' | translate\r\n }}</span>\r\n <span *ngIf=\"!entry.isPublic\" class=\"note-visibility private\">{{\r\n 'common.private' | translate\r\n }}</span>\r\n {{ entry.data.note }}\r\n </div>\r\n <div class=\"flex-spacer\"></div>\r\n <vdr-dropdown>\r\n <button class=\"button-small ml-1\" vdrDropdownTrigger>\r\n <clr-icon shape=\"ellipsis-vertical\" size=\"12\"></clr-icon>\r\n </button>\r\n <vdr-dropdown-menu vdrPosition=\"bottom-right\">\r\n <button\r\n vdrDropdownItem\r\n (click)=\"updateNote.emit(entry)\"\r\n [disabled]=\"!('UpdateOrder' | hasPermission)\"\r\n >\r\n <clr-icon shape=\"edit\"></clr-icon>\r\n {{ 'common.edit' | translate }}\r\n </button>\r\n <div class=\"dropdown-divider\"></div>\r\n <button\r\n vdrDropdownItem\r\n (click)=\"deleteNote.emit(entry)\"\r\n [disabled]=\"!('UpdateOrder' | hasPermission)\"\r\n >\r\n <clr-icon shape=\"trash\" class=\"is-danger\"></clr-icon>\r\n {{ 'common.delete' | translate }}\r\n </button>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_COUPON_APPLIED\">\r\n {{ 'order.history-coupon-code-applied' | translate }}:\r\n <vdr-chip>\r\n <a [routerLink]=\"['/marketing', 'promotions', entry.data.promotionId]\">{{\r\n entry.data.couponCode\r\n }}</a>\r\n </vdr-chip>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_COUPON_REMOVED\">\r\n {{ 'order.history-coupon-code-removed' | translate }}:\r\n <vdr-chip\r\n ><span class=\"cancelled-coupon-code\">{{ entry.data.couponCode }}</span></vdr-chip\r\n >\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_CUSTOMER_UPDATED\">\r\n <div class=\"title\">\r\n {{\r\n 'order.history-customer-updated'\r\n | translate : { newCustomerName: entry.data.newCustomerName }\r\n }}\r\n </div>\r\n <div class=\"flex\">\r\n <div class=\"note-text\">\r\n {{ entry.data.note }}\r\n </div>\r\n <div class=\"flex-spacer\"></div>\r\n <vdr-history-entry-detail>\r\n <vdr-labeled-data [label]=\"'order.previous-customer' | translate\">\r\n <a\r\n *ngIf=\"entry.data.previousCustomerId\"\r\n class=\"button-ghost\"\r\n [routerLink]=\"[\r\n '/customer',\r\n 'customers',\r\n entry.data.previousCustomerId\r\n ]\"\r\n >\r\n <clr-icon shape=\"user\" class=\"is-solid\"></clr-icon>\r\n <span>{{ entry.data.previousCustomerName }}</span>\r\n <clr-icon shape=\"arrow right\"></clr-icon>\r\n </a>\r\n </vdr-labeled-data>\r\n <vdr-labeled-data [label]=\"'order.new-customer' | translate\">\r\n <a\r\n *ngIf=\"entry.data.newCustomerId\"\r\n class=\"button-ghost\"\r\n [routerLink]=\"['/customer', 'customers', entry.data.newCustomerId]\"\r\n >\r\n <clr-icon shape=\"user\" class=\"is-solid\"></clr-icon>\r\n <span>{{ entry.data.newCustomerName }}</span>\r\n <clr-icon shape=\"arrow right\"></clr-icon>\r\n </a>\r\n </vdr-labeled-data>\r\n </vdr-history-entry-detail>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <div class=\"title\">\r\n {{ entry.type | translate }}\r\n </div>\r\n <vdr-history-entry-detail *ngIf=\"entry.data\">\r\n <vdr-object-tree [value]=\"entry.data\"></vdr-object-tree>\r\n </vdr-history-entry-detail>\r\n </ng-container>\r\n </ng-container>\r\n </vdr-timeline-entry>\r\n </ng-template>\r\n </ng-container>\r\n\r\n <vdr-timeline-entry [isLast]=\"true\" [createdAt]=\"order.createdAt\" [featured]=\"true\">\r\n <div class=\"title\">\r\n {{ 'order.history-order-created' | translate }}\r\n </div>\r\n </vdr-timeline-entry>\r\n</div>\r\n", styles: [":host{display:block}.entry-list{margin-inline-start:calc(var(--space-unit) * 2)}.note-entry{display:flex;align-items:center}.note-entry .note{flex:1}.note-entry button{margin:0}.visibility-select{display:flex;justify-content:space-between;align-items:baseline}.visibility-select .public{color:var(--color-warning-700)}.visibility-select .private{color:var(--color-success-700)}textarea.note{flex:1;height:36px;border-radius:3px;margin-inline-end:6px}.note-text{color:var(--color-grey-800);white-space:pre-wrap;max-width:580px}.cancelled-coupon-code{text-decoration:line-through}.note-visibility{text-transform:lowercase}.note-visibility.public{color:var(--color-warning-700)}.note-visibility.private{color:var(--color-success-700)}\n"] }]
|
|
1935
1922
|
}], ctorParameters: () => [{ type: i1.HistoryEntryComponentService }], propDecorators: { order: [{
|
|
@@ -1988,10 +1975,10 @@ class SellerOrdersCardComponent {
|
|
|
1988
1975
|
navigateToSellerOrder(order) {
|
|
1989
1976
|
this.router.navigate(['/orders', order.id]);
|
|
1990
1977
|
}
|
|
1991
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
1992
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.
|
|
1978
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SellerOrdersCardComponent, deps: [{ token: i1$1.Router }, { token: i1.DataService }, { token: i1.ChannelService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1979
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SellerOrdersCardComponent, selector: "vdr-seller-orders-card", inputs: { orderId: "orderId" }, ngImport: i0, template: "<vdr-card [title]=\"'order.seller-orders' | translate\">\r\n <div class=\"form-grid\">\r\n <div *ngFor=\"let order of sellerOrders$ | async\">\r\n <a [routerLink]=\"['seller-orders', order.id]\" class=\"button-ghost mb-1\"\r\n >{{ order.code }} <clr-icon shape=\"arrow right\"></clr-icon\r\n ></a>\r\n <vdr-labeled-data [label]=\"'order.state' | translate\">\r\n <vdr-order-state-label [state]=\"order.state\"></vdr-order-state-label>\r\n </vdr-labeled-data>\r\n <vdr-labeled-data *ngIf=\"getSeller(order) as seller\" [label]=\"'common.seller' | translate\">\r\n {{ seller.name }}\r\n </vdr-labeled-data>\r\n <vdr-labeled-data *ngIf=\"getSeller(order) as seller\" [label]=\"'order.total' | translate\">\r\n {{ order.totalWithTax | localeCurrency : order.currencyCode }}\r\n </vdr-labeled-data>\r\n </div>\r\n </div>\r\n</vdr-card>\r\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: i3.ClrIconCustomTag, selector: "clr-icon" }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i1.OrderStateLabelComponent, selector: "vdr-order-state-label", inputs: ["state"] }, { kind: "component", type: i1.LabeledDataComponent, selector: "vdr-labeled-data", inputs: ["label"] }, { kind: "component", type: i1.CardComponent, selector: "vdr-card", inputs: ["title", "paddingX"] }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.LocaleCurrencyPipe, name: "localeCurrency" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1993
1980
|
}
|
|
1994
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
1981
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SellerOrdersCardComponent, decorators: [{
|
|
1995
1982
|
type: Component,
|
|
1996
1983
|
args: [{ selector: 'vdr-seller-orders-card', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vdr-card [title]=\"'order.seller-orders' | translate\">\r\n <div class=\"form-grid\">\r\n <div *ngFor=\"let order of sellerOrders$ | async\">\r\n <a [routerLink]=\"['seller-orders', order.id]\" class=\"button-ghost mb-1\"\r\n >{{ order.code }} <clr-icon shape=\"arrow right\"></clr-icon\r\n ></a>\r\n <vdr-labeled-data [label]=\"'order.state' | translate\">\r\n <vdr-order-state-label [state]=\"order.state\"></vdr-order-state-label>\r\n </vdr-labeled-data>\r\n <vdr-labeled-data *ngIf=\"getSeller(order) as seller\" [label]=\"'common.seller' | translate\">\r\n {{ seller.name }}\r\n </vdr-labeled-data>\r\n <vdr-labeled-data *ngIf=\"getSeller(order) as seller\" [label]=\"'order.total' | translate\">\r\n {{ order.totalWithTax | localeCurrency : order.currencyCode }}\r\n </vdr-labeled-data>\r\n </div>\r\n </div>\r\n</vdr-card>\r\n", styles: [":host{display:block}\n"] }]
|
|
1997
1984
|
}], ctorParameters: () => [{ type: i1$1.Router }, { type: i1.DataService }, { type: i1.ChannelService }], propDecorators: { orderId: [{
|
|
@@ -2565,12 +2552,12 @@ class OrderDetailComponent extends TypedBaseDetailComponent {
|
|
|
2565
2552
|
this.setCustomFieldFormValues(this.customFields, this.detailForm.get(['customFields']), entity);
|
|
2566
2553
|
}
|
|
2567
2554
|
}
|
|
2568
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
2569
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.4", type: OrderDetailComponent, selector: "vdr-order-detail", usesInheritance: true, ngImport: i0, template: "<vdr-page-block>\r\n <vdr-action-bar *ngIf=\"entity$ | async as order\">\r\n <vdr-ab-left> </vdr-ab-left>\r\n\r\n <vdr-ab-right>\r\n <vdr-action-bar-items locationId=\"order-detail\"></vdr-action-bar-items>\r\n <button\r\n class=\"button primary mr-1\"\r\n *ngIf=\"\r\n order.type !== 'Aggregate' &&\r\n (order.state === 'ArrangingPayment' || order.state === 'ArrangingAdditionalPayment') &&\r\n (hasUnsettledModifications(order) || 0 < outstandingPaymentAmount(order))\r\n \"\r\n (click)=\"addManualPayment(order)\"\r\n >\r\n {{ 'order.add-payment-to-order' | translate }}\r\n ({{ outstandingPaymentAmount(order) | localeCurrency : order.currencyCode }})\r\n </button>\r\n <button\r\n class=\"button primary mr-1\"\r\n *ngIf=\"\r\n order.type !== 'Aggregate' &&\r\n order.active === false &&\r\n order.state !== 'ArrangingAdditionalPayment' &&\r\n order.state !== 'ArrangingPayment' &&\r\n 0 < outstandingPaymentAmount(order)\r\n \"\r\n (click)=\"transitionToState('ArrangingAdditionalPayment')\"\r\n >\r\n {{ 'order.arrange-additional-payment' | translate }}\r\n </button>\r\n <button\r\n *ngIf=\"order.type !== 'Aggregate'\"\r\n class=\"button primary mr-1\"\r\n (click)=\"fulfillOrder()\"\r\n [disabled]=\"!canAddFulfillment(order)\"\r\n >\r\n {{ 'order.fulfill-order' | translate }}\r\n </button>\r\n <vdr-action-bar-dropdown-menu [alwaysShow]=\"true\" locationId=\"order-detail\">\r\n <ng-container *ngIf=\"order.type !== 'Aggregate' && order.nextStates.includes('Modifying')\">\r\n <button type=\"button\" vdrDropdownItem (click)=\"transitionToModifying()\">\r\n <clr-icon shape=\"pencil\"></clr-icon>\r\n {{ 'order.modify-order' | translate }}\r\n </button>\r\n <div class=\"dropdown-divider\"></div>\r\n </ng-container>\r\n <button\r\n type=\"button\"\r\n vdrDropdownItem\r\n *ngIf=\"order.type !== 'Aggregate' && order.nextStates.includes('Cancelled')\"\r\n (click)=\"cancelOrRefund(order)\"\r\n >\r\n <clr-icon shape=\"error-standard\" class=\"is-error\"></clr-icon>\r\n <ng-container *ngIf=\"orderHasSettledPayments(order); else cancelOnly\">\r\n {{ 'order.refund-and-cancel-order' | translate }}\r\n </ng-container>\r\n <ng-template #cancelOnly>\r\n {{ 'order.cancel-order' | translate }}\r\n </ng-template>\r\n </button>\r\n\r\n <ng-container *ngIf=\"(nextStates$ | async)?.length\">\r\n <div class=\"dropdown-divider\"></div>\r\n <button\r\n *ngFor=\"let nextState of nextStates$ | async\"\r\n type=\"button\"\r\n vdrDropdownItem\r\n (click)=\"transitionToState(nextState)\"\r\n >\r\n <clr-icon shape=\"step-forward-2\"></clr-icon>\r\n {{\r\n 'order.transition-to-state'\r\n | translate : { state: (nextState | stateI18nToken | translate) }\r\n }}\r\n </button>\r\n </ng-container>\r\n <div class=\"dropdown-divider\"></div>\r\n <button type=\"button\" vdrDropdownItem (click)=\"manuallyTransitionToState(order)\">\r\n <clr-icon shape=\"step-forward-2\" class=\"is-warning\"></clr-icon>\r\n {{ 'order.manually-transition-to-state' | translate }}\r\n </button>\r\n </vdr-action-bar-dropdown-menu>\r\n </vdr-ab-right>\r\n </vdr-action-bar>\r\n</vdr-page-block>\r\n\r\n<vdr-page-detail-layout *ngIf=\"entity$ | async as order\">\r\n <vdr-page-detail-sidebar>\r\n <vdr-card [title]=\"'order.state' | translate\">\r\n <ng-template vdrCardControls>\r\n <button\r\n class=\"button-small\"\r\n (click)=\"openStateDiagram()\"\r\n [title]=\"'order.order-state-diagram' | translate\"\r\n >\r\n <clr-icon shape=\"list\"></clr-icon>\r\n </button>\r\n </ng-template>\r\n <vdr-order-state-label [state]=\"order.state\"></vdr-order-state-label>\r\n </vdr-card>\r\n <vdr-card [title]=\"'order.customer' | translate\">\r\n <ng-template vdrCardControls>\r\n <button\r\n *vdrIfPermissions=\"['UpdateOrder', 'ReadCustomer']\"\r\n class=\"button-small\"\r\n (click)=\"setOrderCustomer()\"\r\n [title]=\"'order.assign-order-to-another-customer' | translate\"\r\n >\r\n <clr-icon shape=\"switch\"></clr-icon>\r\n </button>\r\n </ng-template>\r\n <vdr-customer-label [customer]=\"order.customer\"></vdr-customer-label>\r\n <vdr-labeled-data\r\n class=\"mt-2\"\r\n [label]=\"'order.shipping-address' | translate\"\r\n *ngIf=\"getOrderAddressLines(order.shippingAddress).length\"\r\n >\r\n <vdr-formatted-address [address]=\"order.shippingAddress\" class=\"mt-1\"></vdr-formatted-address>\r\n </vdr-labeled-data>\r\n <vdr-labeled-data\r\n [label]=\"'order.billing-address' | translate\"\r\n *ngIf=\"getOrderAddressLines(order.billingAddress).length\"\r\n >\r\n <vdr-formatted-address [address]=\"order.billingAddress\" class=\"mt-1\"></vdr-formatted-address>\r\n </vdr-labeled-data>\r\n </vdr-card>\r\n <vdr-card [title]=\"'order.payments' | translate\" *ngIf=\"order.payments?.length\">\r\n <vdr-order-payment-card\r\n *ngFor=\"let payment of order.payments\"\r\n [currencyCode]=\"order.currencyCode\"\r\n [payment]=\"payment\"\r\n (settlePayment)=\"settlePayment($event)\"\r\n (transitionPaymentState)=\"transitionPaymentState($event)\"\r\n (settleRefund)=\"settleRefund($event)\"\r\n ></vdr-order-payment-card>\r\n </vdr-card>\r\n <vdr-card *ngIf=\"order.fulfillments?.length\">\r\n <vdr-fulfillment-card\r\n *ngFor=\"let fulfillment of order.fulfillments\"\r\n [fulfillment]=\"fulfillment\"\r\n [order]=\"order\"\r\n (transitionState)=\"transitionFulfillment(fulfillment.id, $event)\"\r\n ></vdr-fulfillment-card>\r\n </vdr-card>\r\n <vdr-card>\r\n <vdr-page-entity-info *ngIf=\"entity$ | async as entity\" [entity]=\"entity\" />\r\n </vdr-card>\r\n </vdr-page-detail-sidebar>\r\n\r\n <vdr-page-block>\r\n <vdr-seller-orders-card\r\n class=\"mb-2\"\r\n *ngIf=\"order.sellerOrders.length\"\r\n [orderId]=\"order.id\"\r\n ></vdr-seller-orders-card>\r\n <vdr-card [paddingX]=\"false\">\r\n <vdr-order-table\r\n [order]=\"order\"\r\n [orderLineCustomFields]=\"orderLineCustomFields\"\r\n ></vdr-order-table>\r\n </vdr-card>\r\n <vdr-card [title]=\"'order.tax-summary' | translate\" [paddingX]=\"false\">\r\n <table class=\"table\">\r\n <thead>\r\n <tr>\r\n <th>{{ 'common.description' | translate }}</th>\r\n <th>{{ 'order.tax-rate' | translate }}</th>\r\n <th>{{ 'order.tax-base' | translate }}</th>\r\n <th>{{ 'order.tax-total' | translate }}</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let row of order.taxSummary\">\r\n <td>{{ row.description }}</td>\r\n <td>{{ row.taxRate / 100 | percent : '0.0-2' }}</td>\r\n <td>{{ row.taxBase | localeCurrency : order.currencyCode }}</td>\r\n <td>{{ row.taxTotal | localeCurrency : order.currencyCode }}</td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </vdr-card>\r\n <vdr-card [title]=\"'common.custom-fields' | translate\" *ngIf=\"customFields.length\">\r\n <vdr-tabbed-custom-fields\r\n entityName=\"Order\"\r\n [customFields]=\"customFields\"\r\n [customFieldsFormGroup]=\"detailForm.get('customFields')\"\r\n [readonly]=\"!('UpdateOrder' | hasPermission)\"\r\n />\r\n <button\r\n class=\"button primary\"\r\n (click)=\"updateCustomFields()\"\r\n [disabled]=\"\r\n detailForm.get('customFields')?.pristine || detailForm.get('customFields')?.invalid\r\n \"\r\n >\r\n {{ 'common.update' | translate }}\r\n </button>\r\n </vdr-card>\r\n <vdr-custom-detail-component-host\r\n locationId=\"order-detail\"\r\n [entity$]=\"entity$\"\r\n [detailForm]=\"detailForm\"\r\n ></vdr-custom-detail-component-host>\r\n\r\n <vdr-card [title]=\"'order.order-history' | translate\">\r\n <vdr-order-history\r\n [order]=\"order\"\r\n [history]=\"history$ | async\"\r\n (addNote)=\"addNote($event)\"\r\n (updateNote)=\"updateNote($event)\"\r\n (deleteNote)=\"deleteNote($event)\"\r\n ></vdr-order-history>\r\n </vdr-card>\r\n </vdr-page-block>\r\n</vdr-page-detail-layout>\r\n", styles: [".shipping-address{list-style-type:none;line-height:1.3em}.order-cards h6{margin-top:6px;color:var(--color-text-200)}vdr-order-payment-card+vdr-order-payment-card{margin-top:calc(var(--space-unit) * 2)}\n"], dependencies: [{ kind: "directive", type: i3.ClrIconCustomTag, selector: "clr-icon" }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1.ActionBarComponent, selector: "vdr-action-bar" }, { kind: "component", type: i1.ActionBarLeftComponent, selector: "vdr-ab-left", inputs: ["grow"] }, { kind: "component", type: i1.ActionBarRightComponent, selector: "vdr-ab-right", inputs: ["grow"] }, { kind: "component", type: i1.ActionBarDropdownMenuComponent, selector: "vdr-action-bar-dropdown-menu", inputs: ["alwaysShow"] }, { kind: "component", type: i1.CustomerLabelComponent, selector: "vdr-customer-label", inputs: ["customer"] }, { kind: "directive", type: i1.DropdownItemDirective, selector: "[vdrDropdownItem]" }, { kind: "component", type: i1.OrderStateLabelComponent, selector: "vdr-order-state-label", inputs: ["state"] }, { kind: "component", type: i1.FormattedAddressComponent, selector: "vdr-formatted-address", inputs: ["address"] }, { kind: "component", type: i1.LabeledDataComponent, selector: "vdr-labeled-data", inputs: ["label"] }, { kind: "directive", type: i1.IfPermissionsDirective, selector: "[vdrIfPermissions]", inputs: ["vdrIfPermissions", "vdrIfPermissionsElse"] }, { kind: "component", type: i1.ActionBarItemsComponent, selector: "vdr-action-bar-items" }, { kind: "component", type: i1.TabbedCustomFieldsComponent, selector: "vdr-tabbed-custom-fields", inputs: ["entityName", "customFields", "customFieldsFormGroup", "readonly", "compact", "showLabel"] }, { kind: "component", type: i1.CustomDetailComponentHostComponent, selector: "vdr-custom-detail-component-host", inputs: ["locationId", "entity$", "detailForm"] }, { kind: "component", type: i1.PageBlockComponent, selector: "vdr-page-block" }, { kind: "component", type: i1.PageEntityInfoComponent, selector: "vdr-page-entity-info", inputs: ["entity"] }, { kind: "component", type: i1.PageDetailLayoutComponent, selector: "vdr-page-detail-layout" }, { kind: "component", type: i1.PageDetailSidebarComponent, selector: "vdr-page-detail-sidebar" }, { kind: "component", type: i1.CardComponent, selector: "vdr-card", inputs: ["title", "paddingX"] }, { kind: "directive", type: i1.CardControlsDirective, selector: "[vdrCardControls]" }, { kind: "component", type: OrderPaymentCardComponent, selector: "vdr-order-payment-card", inputs: ["payment", "currencyCode"], outputs: ["settlePayment", "transitionPaymentState", "settleRefund"] }, { kind: "component", type: OrderHistoryComponent, selector: "vdr-order-history", inputs: ["order", "history"], outputs: ["addNote", "updateNote", "deleteNote"] }, { kind: "component", type: FulfillmentCardComponent, selector: "vdr-fulfillment-card", inputs: ["fulfillment", "order"], outputs: ["transitionState"] }, { kind: "component", type: OrderTableComponent, selector: "vdr-order-table", inputs: ["order", "orderLineCustomFields", "isDraft"], outputs: ["adjust", "remove"] }, { kind: "component", type: SellerOrdersCardComponent, selector: "vdr-seller-orders-card", inputs: ["orderId"] }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i2$1.PercentPipe, name: "percent" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.HasPermissionPipe, name: "hasPermission" }, { kind: "pipe", type: i1.StateI18nTokenPipe, name: "stateI18nToken" }, { kind: "pipe", type: i1.LocaleCurrencyPipe, name: "localeCurrency" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2555
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: OrderDetailComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.DataService }, { token: i1.NotificationService }, { token: i1.ModalService }, { token: OrderTransitionService }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2556
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: OrderDetailComponent, selector: "vdr-order-detail", usesInheritance: true, ngImport: i0, template: "<vdr-page-block>\r\n <vdr-action-bar *ngIf=\"entity$ | async as order\">\r\n <vdr-ab-left> </vdr-ab-left>\r\n\r\n <vdr-ab-right>\r\n <vdr-action-bar-items locationId=\"order-detail\"></vdr-action-bar-items>\r\n <button\r\n class=\"button primary mr-1\"\r\n *ngIf=\"\r\n order.type !== 'Aggregate' &&\r\n (order.state === 'ArrangingPayment' || order.state === 'ArrangingAdditionalPayment') &&\r\n (hasUnsettledModifications(order) || 0 < outstandingPaymentAmount(order))\r\n \"\r\n (click)=\"addManualPayment(order)\"\r\n >\r\n {{ 'order.add-payment-to-order' | translate }}\r\n ({{ outstandingPaymentAmount(order) | localeCurrency : order.currencyCode }})\r\n </button>\r\n <button\r\n class=\"button primary mr-1\"\r\n *ngIf=\"\r\n order.type !== 'Aggregate' &&\r\n order.active === false &&\r\n order.state !== 'ArrangingAdditionalPayment' &&\r\n order.state !== 'ArrangingPayment' &&\r\n 0 < outstandingPaymentAmount(order)\r\n \"\r\n (click)=\"transitionToState('ArrangingAdditionalPayment')\"\r\n >\r\n {{ 'order.arrange-additional-payment' | translate }}\r\n </button>\r\n <button\r\n *ngIf=\"order.type !== 'Aggregate'\"\r\n class=\"button primary mr-1\"\r\n (click)=\"fulfillOrder()\"\r\n [disabled]=\"!canAddFulfillment(order)\"\r\n >\r\n {{ 'order.fulfill-order' | translate }}\r\n </button>\r\n <vdr-action-bar-dropdown-menu [alwaysShow]=\"true\" locationId=\"order-detail\">\r\n <ng-container *ngIf=\"order.type !== 'Aggregate' && order.nextStates.includes('Modifying')\">\r\n <button type=\"button\" vdrDropdownItem (click)=\"transitionToModifying()\">\r\n <clr-icon shape=\"pencil\"></clr-icon>\r\n {{ 'order.modify-order' | translate }}\r\n </button>\r\n <div class=\"dropdown-divider\"></div>\r\n </ng-container>\r\n <button\r\n type=\"button\"\r\n vdrDropdownItem\r\n *ngIf=\"order.type !== 'Aggregate' && order.nextStates.includes('Cancelled')\"\r\n (click)=\"cancelOrRefund(order)\"\r\n >\r\n <clr-icon shape=\"error-standard\" class=\"is-error\"></clr-icon>\r\n <ng-container *ngIf=\"orderHasSettledPayments(order); else cancelOnly\">\r\n {{ 'order.refund-and-cancel-order' | translate }}\r\n </ng-container>\r\n <ng-template #cancelOnly>\r\n {{ 'order.cancel-order' | translate }}\r\n </ng-template>\r\n </button>\r\n\r\n <ng-container *ngIf=\"(nextStates$ | async)?.length\">\r\n <div class=\"dropdown-divider\"></div>\r\n <button\r\n *ngFor=\"let nextState of nextStates$ | async\"\r\n type=\"button\"\r\n vdrDropdownItem\r\n (click)=\"transitionToState(nextState)\"\r\n >\r\n <clr-icon shape=\"step-forward-2\"></clr-icon>\r\n {{\r\n 'order.transition-to-state'\r\n | translate : { state: (nextState | stateI18nToken | translate) }\r\n }}\r\n </button>\r\n </ng-container>\r\n <div class=\"dropdown-divider\"></div>\r\n <button type=\"button\" vdrDropdownItem (click)=\"manuallyTransitionToState(order)\">\r\n <clr-icon shape=\"step-forward-2\" class=\"is-warning\"></clr-icon>\r\n {{ 'order.manually-transition-to-state' | translate }}\r\n </button>\r\n </vdr-action-bar-dropdown-menu>\r\n </vdr-ab-right>\r\n </vdr-action-bar>\r\n</vdr-page-block>\r\n\r\n<vdr-page-detail-layout *ngIf=\"entity$ | async as order\">\r\n <vdr-page-detail-sidebar>\r\n <vdr-card [title]=\"'order.state' | translate\">\r\n <ng-template vdrCardControls>\r\n <button\r\n class=\"button-small\"\r\n (click)=\"openStateDiagram()\"\r\n [title]=\"'order.order-state-diagram' | translate\"\r\n >\r\n <clr-icon shape=\"list\"></clr-icon>\r\n </button>\r\n </ng-template>\r\n <vdr-order-state-label [state]=\"order.state\"></vdr-order-state-label>\r\n </vdr-card>\r\n <vdr-card [title]=\"'order.customer' | translate\">\r\n <ng-template vdrCardControls>\r\n <button\r\n *vdrIfPermissions=\"['UpdateOrder', 'ReadCustomer']\"\r\n class=\"button-small\"\r\n (click)=\"setOrderCustomer()\"\r\n [title]=\"'order.assign-order-to-another-customer' | translate\"\r\n >\r\n <clr-icon shape=\"switch\"></clr-icon>\r\n </button>\r\n </ng-template>\r\n <vdr-customer-label [customer]=\"order.customer\"></vdr-customer-label>\r\n <vdr-labeled-data\r\n class=\"mt-2\"\r\n [label]=\"'order.shipping-address' | translate\"\r\n *ngIf=\"getOrderAddressLines(order.shippingAddress).length\"\r\n >\r\n <vdr-formatted-address [address]=\"order.shippingAddress\" class=\"mt-1\"></vdr-formatted-address>\r\n </vdr-labeled-data>\r\n <vdr-labeled-data\r\n [label]=\"'order.billing-address' | translate\"\r\n *ngIf=\"getOrderAddressLines(order.billingAddress).length\"\r\n >\r\n <vdr-formatted-address [address]=\"order.billingAddress\" class=\"mt-1\"></vdr-formatted-address>\r\n </vdr-labeled-data>\r\n </vdr-card>\r\n <vdr-card [title]=\"'order.payments' | translate\" *ngIf=\"order.payments?.length\">\r\n <vdr-order-payment-card\r\n *ngFor=\"let payment of order.payments\"\r\n [currencyCode]=\"order.currencyCode\"\r\n [payment]=\"payment\"\r\n (settlePayment)=\"settlePayment($event)\"\r\n (transitionPaymentState)=\"transitionPaymentState($event)\"\r\n (settleRefund)=\"settleRefund($event)\"\r\n ></vdr-order-payment-card>\r\n </vdr-card>\r\n <vdr-card *ngIf=\"order.fulfillments?.length\">\r\n <vdr-fulfillment-card\r\n *ngFor=\"let fulfillment of order.fulfillments\"\r\n [fulfillment]=\"fulfillment\"\r\n [order]=\"order\"\r\n (transitionState)=\"transitionFulfillment(fulfillment.id, $event)\"\r\n ></vdr-fulfillment-card>\r\n </vdr-card>\r\n <vdr-card>\r\n <vdr-page-entity-info *ngIf=\"entity$ | async as entity\" [entity]=\"entity\" />\r\n </vdr-card>\r\n </vdr-page-detail-sidebar>\r\n\r\n <vdr-page-block>\r\n <vdr-seller-orders-card\r\n class=\"mb-2\"\r\n *ngIf=\"order.sellerOrders.length\"\r\n [orderId]=\"order.id\"\r\n ></vdr-seller-orders-card>\r\n <vdr-card [paddingX]=\"false\">\r\n <vdr-order-table\r\n [order]=\"order\"\r\n [orderLineCustomFields]=\"orderLineCustomFields\"\r\n ></vdr-order-table>\r\n </vdr-card>\r\n <vdr-card [title]=\"'order.tax-summary' | translate\" [paddingX]=\"false\">\r\n <table class=\"table\">\r\n <thead>\r\n <tr>\r\n <th>{{ 'common.description' | translate }}</th>\r\n <th>{{ 'order.tax-rate' | translate }}</th>\r\n <th>{{ 'order.tax-base' | translate }}</th>\r\n <th>{{ 'order.tax-total' | translate }}</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let row of order.taxSummary\">\r\n <td>{{ row.description }}</td>\r\n <td>{{ row.taxRate / 100 | percent : '0.0-3' }}</td>\r\n <td>{{ row.taxBase | localeCurrency : order.currencyCode }}</td>\r\n <td>{{ row.taxTotal | localeCurrency : order.currencyCode }}</td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </vdr-card>\r\n <vdr-card [title]=\"'common.custom-fields' | translate\" *ngIf=\"customFields.length\">\r\n <vdr-tabbed-custom-fields\r\n entityName=\"Order\"\r\n [customFields]=\"customFields\"\r\n [customFieldsFormGroup]=\"detailForm.get('customFields')\"\r\n [readonly]=\"!('UpdateOrder' | hasPermission)\"\r\n />\r\n <button\r\n class=\"button primary\"\r\n (click)=\"updateCustomFields()\"\r\n [disabled]=\"\r\n detailForm.get('customFields')?.pristine || detailForm.get('customFields')?.invalid\r\n \"\r\n >\r\n {{ 'common.update' | translate }}\r\n </button>\r\n </vdr-card>\r\n <vdr-custom-detail-component-host\r\n locationId=\"order-detail\"\r\n [entity$]=\"entity$\"\r\n [detailForm]=\"detailForm\"\r\n ></vdr-custom-detail-component-host>\r\n\r\n <vdr-card [title]=\"'order.order-history' | translate\">\r\n <vdr-order-history\r\n [order]=\"order\"\r\n [history]=\"history$ | async\"\r\n (addNote)=\"addNote($event)\"\r\n (updateNote)=\"updateNote($event)\"\r\n (deleteNote)=\"deleteNote($event)\"\r\n ></vdr-order-history>\r\n </vdr-card>\r\n </vdr-page-block>\r\n</vdr-page-detail-layout>\r\n", styles: [".shipping-address{list-style-type:none;line-height:1.3em}.order-cards h6{margin-top:6px;color:var(--color-text-200)}vdr-order-payment-card+vdr-order-payment-card{margin-top:calc(var(--space-unit) * 2)}\n"], dependencies: [{ kind: "directive", type: i3.ClrIconCustomTag, selector: "clr-icon" }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1.ActionBarComponent, selector: "vdr-action-bar" }, { kind: "component", type: i1.ActionBarLeftComponent, selector: "vdr-ab-left", inputs: ["grow"] }, { kind: "component", type: i1.ActionBarRightComponent, selector: "vdr-ab-right", inputs: ["grow"] }, { kind: "component", type: i1.ActionBarDropdownMenuComponent, selector: "vdr-action-bar-dropdown-menu", inputs: ["alwaysShow"] }, { kind: "component", type: i1.CustomerLabelComponent, selector: "vdr-customer-label", inputs: ["customer"] }, { kind: "directive", type: i1.DropdownItemDirective, selector: "[vdrDropdownItem]" }, { kind: "component", type: i1.OrderStateLabelComponent, selector: "vdr-order-state-label", inputs: ["state"] }, { kind: "component", type: i1.FormattedAddressComponent, selector: "vdr-formatted-address", inputs: ["address"] }, { kind: "component", type: i1.LabeledDataComponent, selector: "vdr-labeled-data", inputs: ["label"] }, { kind: "directive", type: i1.IfPermissionsDirective, selector: "[vdrIfPermissions]", inputs: ["vdrIfPermissions", "vdrIfPermissionsElse"] }, { kind: "component", type: i1.ActionBarItemsComponent, selector: "vdr-action-bar-items" }, { kind: "component", type: i1.TabbedCustomFieldsComponent, selector: "vdr-tabbed-custom-fields", inputs: ["entityName", "customFields", "customFieldsFormGroup", "readonly", "compact", "showLabel"] }, { kind: "component", type: i1.CustomDetailComponentHostComponent, selector: "vdr-custom-detail-component-host", inputs: ["locationId", "entity$", "detailForm"] }, { kind: "component", type: i1.PageBlockComponent, selector: "vdr-page-block" }, { kind: "component", type: i1.PageEntityInfoComponent, selector: "vdr-page-entity-info", inputs: ["entity"] }, { kind: "component", type: i1.PageDetailLayoutComponent, selector: "vdr-page-detail-layout" }, { kind: "component", type: i1.PageDetailSidebarComponent, selector: "vdr-page-detail-sidebar" }, { kind: "component", type: i1.CardComponent, selector: "vdr-card", inputs: ["title", "paddingX"] }, { kind: "directive", type: i1.CardControlsDirective, selector: "[vdrCardControls]" }, { kind: "component", type: OrderPaymentCardComponent, selector: "vdr-order-payment-card", inputs: ["payment", "currencyCode"], outputs: ["settlePayment", "transitionPaymentState", "settleRefund"] }, { kind: "component", type: OrderHistoryComponent, selector: "vdr-order-history", inputs: ["order", "history"], outputs: ["addNote", "updateNote", "deleteNote"] }, { kind: "component", type: FulfillmentCardComponent, selector: "vdr-fulfillment-card", inputs: ["fulfillment", "order"], outputs: ["transitionState"] }, { kind: "component", type: OrderTableComponent, selector: "vdr-order-table", inputs: ["order", "orderLineCustomFields", "isDraft"], outputs: ["adjust", "remove"] }, { kind: "component", type: SellerOrdersCardComponent, selector: "vdr-seller-orders-card", inputs: ["orderId"] }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i2$1.PercentPipe, name: "percent" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.HasPermissionPipe, name: "hasPermission" }, { kind: "pipe", type: i1.StateI18nTokenPipe, name: "stateI18nToken" }, { kind: "pipe", type: i1.LocaleCurrencyPipe, name: "localeCurrency" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2570
2557
|
}
|
|
2571
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
2558
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: OrderDetailComponent, decorators: [{
|
|
2572
2559
|
type: Component,
|
|
2573
|
-
args: [{ selector: 'vdr-order-detail', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vdr-page-block>\r\n <vdr-action-bar *ngIf=\"entity$ | async as order\">\r\n <vdr-ab-left> </vdr-ab-left>\r\n\r\n <vdr-ab-right>\r\n <vdr-action-bar-items locationId=\"order-detail\"></vdr-action-bar-items>\r\n <button\r\n class=\"button primary mr-1\"\r\n *ngIf=\"\r\n order.type !== 'Aggregate' &&\r\n (order.state === 'ArrangingPayment' || order.state === 'ArrangingAdditionalPayment') &&\r\n (hasUnsettledModifications(order) || 0 < outstandingPaymentAmount(order))\r\n \"\r\n (click)=\"addManualPayment(order)\"\r\n >\r\n {{ 'order.add-payment-to-order' | translate }}\r\n ({{ outstandingPaymentAmount(order) | localeCurrency : order.currencyCode }})\r\n </button>\r\n <button\r\n class=\"button primary mr-1\"\r\n *ngIf=\"\r\n order.type !== 'Aggregate' &&\r\n order.active === false &&\r\n order.state !== 'ArrangingAdditionalPayment' &&\r\n order.state !== 'ArrangingPayment' &&\r\n 0 < outstandingPaymentAmount(order)\r\n \"\r\n (click)=\"transitionToState('ArrangingAdditionalPayment')\"\r\n >\r\n {{ 'order.arrange-additional-payment' | translate }}\r\n </button>\r\n <button\r\n *ngIf=\"order.type !== 'Aggregate'\"\r\n class=\"button primary mr-1\"\r\n (click)=\"fulfillOrder()\"\r\n [disabled]=\"!canAddFulfillment(order)\"\r\n >\r\n {{ 'order.fulfill-order' | translate }}\r\n </button>\r\n <vdr-action-bar-dropdown-menu [alwaysShow]=\"true\" locationId=\"order-detail\">\r\n <ng-container *ngIf=\"order.type !== 'Aggregate' && order.nextStates.includes('Modifying')\">\r\n <button type=\"button\" vdrDropdownItem (click)=\"transitionToModifying()\">\r\n <clr-icon shape=\"pencil\"></clr-icon>\r\n {{ 'order.modify-order' | translate }}\r\n </button>\r\n <div class=\"dropdown-divider\"></div>\r\n </ng-container>\r\n <button\r\n type=\"button\"\r\n vdrDropdownItem\r\n *ngIf=\"order.type !== 'Aggregate' && order.nextStates.includes('Cancelled')\"\r\n (click)=\"cancelOrRefund(order)\"\r\n >\r\n <clr-icon shape=\"error-standard\" class=\"is-error\"></clr-icon>\r\n <ng-container *ngIf=\"orderHasSettledPayments(order); else cancelOnly\">\r\n {{ 'order.refund-and-cancel-order' | translate }}\r\n </ng-container>\r\n <ng-template #cancelOnly>\r\n {{ 'order.cancel-order' | translate }}\r\n </ng-template>\r\n </button>\r\n\r\n <ng-container *ngIf=\"(nextStates$ | async)?.length\">\r\n <div class=\"dropdown-divider\"></div>\r\n <button\r\n *ngFor=\"let nextState of nextStates$ | async\"\r\n type=\"button\"\r\n vdrDropdownItem\r\n (click)=\"transitionToState(nextState)\"\r\n >\r\n <clr-icon shape=\"step-forward-2\"></clr-icon>\r\n {{\r\n 'order.transition-to-state'\r\n | translate : { state: (nextState | stateI18nToken | translate) }\r\n }}\r\n </button>\r\n </ng-container>\r\n <div class=\"dropdown-divider\"></div>\r\n <button type=\"button\" vdrDropdownItem (click)=\"manuallyTransitionToState(order)\">\r\n <clr-icon shape=\"step-forward-2\" class=\"is-warning\"></clr-icon>\r\n {{ 'order.manually-transition-to-state' | translate }}\r\n </button>\r\n </vdr-action-bar-dropdown-menu>\r\n </vdr-ab-right>\r\n </vdr-action-bar>\r\n</vdr-page-block>\r\n\r\n<vdr-page-detail-layout *ngIf=\"entity$ | async as order\">\r\n <vdr-page-detail-sidebar>\r\n <vdr-card [title]=\"'order.state' | translate\">\r\n <ng-template vdrCardControls>\r\n <button\r\n class=\"button-small\"\r\n (click)=\"openStateDiagram()\"\r\n [title]=\"'order.order-state-diagram' | translate\"\r\n >\r\n <clr-icon shape=\"list\"></clr-icon>\r\n </button>\r\n </ng-template>\r\n <vdr-order-state-label [state]=\"order.state\"></vdr-order-state-label>\r\n </vdr-card>\r\n <vdr-card [title]=\"'order.customer' | translate\">\r\n <ng-template vdrCardControls>\r\n <button\r\n *vdrIfPermissions=\"['UpdateOrder', 'ReadCustomer']\"\r\n class=\"button-small\"\r\n (click)=\"setOrderCustomer()\"\r\n [title]=\"'order.assign-order-to-another-customer' | translate\"\r\n >\r\n <clr-icon shape=\"switch\"></clr-icon>\r\n </button>\r\n </ng-template>\r\n <vdr-customer-label [customer]=\"order.customer\"></vdr-customer-label>\r\n <vdr-labeled-data\r\n class=\"mt-2\"\r\n [label]=\"'order.shipping-address' | translate\"\r\n *ngIf=\"getOrderAddressLines(order.shippingAddress).length\"\r\n >\r\n <vdr-formatted-address [address]=\"order.shippingAddress\" class=\"mt-1\"></vdr-formatted-address>\r\n </vdr-labeled-data>\r\n <vdr-labeled-data\r\n [label]=\"'order.billing-address' | translate\"\r\n *ngIf=\"getOrderAddressLines(order.billingAddress).length\"\r\n >\r\n <vdr-formatted-address [address]=\"order.billingAddress\" class=\"mt-1\"></vdr-formatted-address>\r\n </vdr-labeled-data>\r\n </vdr-card>\r\n <vdr-card [title]=\"'order.payments' | translate\" *ngIf=\"order.payments?.length\">\r\n <vdr-order-payment-card\r\n *ngFor=\"let payment of order.payments\"\r\n [currencyCode]=\"order.currencyCode\"\r\n [payment]=\"payment\"\r\n (settlePayment)=\"settlePayment($event)\"\r\n (transitionPaymentState)=\"transitionPaymentState($event)\"\r\n (settleRefund)=\"settleRefund($event)\"\r\n ></vdr-order-payment-card>\r\n </vdr-card>\r\n <vdr-card *ngIf=\"order.fulfillments?.length\">\r\n <vdr-fulfillment-card\r\n *ngFor=\"let fulfillment of order.fulfillments\"\r\n [fulfillment]=\"fulfillment\"\r\n [order]=\"order\"\r\n (transitionState)=\"transitionFulfillment(fulfillment.id, $event)\"\r\n ></vdr-fulfillment-card>\r\n </vdr-card>\r\n <vdr-card>\r\n <vdr-page-entity-info *ngIf=\"entity$ | async as entity\" [entity]=\"entity\" />\r\n </vdr-card>\r\n </vdr-page-detail-sidebar>\r\n\r\n <vdr-page-block>\r\n <vdr-seller-orders-card\r\n class=\"mb-2\"\r\n *ngIf=\"order.sellerOrders.length\"\r\n [orderId]=\"order.id\"\r\n ></vdr-seller-orders-card>\r\n <vdr-card [paddingX]=\"false\">\r\n <vdr-order-table\r\n [order]=\"order\"\r\n [orderLineCustomFields]=\"orderLineCustomFields\"\r\n ></vdr-order-table>\r\n </vdr-card>\r\n <vdr-card [title]=\"'order.tax-summary' | translate\" [paddingX]=\"false\">\r\n <table class=\"table\">\r\n <thead>\r\n <tr>\r\n <th>{{ 'common.description' | translate }}</th>\r\n <th>{{ 'order.tax-rate' | translate }}</th>\r\n <th>{{ 'order.tax-base' | translate }}</th>\r\n <th>{{ 'order.tax-total' | translate }}</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let row of order.taxSummary\">\r\n <td>{{ row.description }}</td>\r\n <td>{{ row.taxRate / 100 | percent : '0.0-2' }}</td>\r\n <td>{{ row.taxBase | localeCurrency : order.currencyCode }}</td>\r\n <td>{{ row.taxTotal | localeCurrency : order.currencyCode }}</td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </vdr-card>\r\n <vdr-card [title]=\"'common.custom-fields' | translate\" *ngIf=\"customFields.length\">\r\n <vdr-tabbed-custom-fields\r\n entityName=\"Order\"\r\n [customFields]=\"customFields\"\r\n [customFieldsFormGroup]=\"detailForm.get('customFields')\"\r\n [readonly]=\"!('UpdateOrder' | hasPermission)\"\r\n />\r\n <button\r\n class=\"button primary\"\r\n (click)=\"updateCustomFields()\"\r\n [disabled]=\"\r\n detailForm.get('customFields')?.pristine || detailForm.get('customFields')?.invalid\r\n \"\r\n >\r\n {{ 'common.update' | translate }}\r\n </button>\r\n </vdr-card>\r\n <vdr-custom-detail-component-host\r\n locationId=\"order-detail\"\r\n [entity$]=\"entity$\"\r\n [detailForm]=\"detailForm\"\r\n ></vdr-custom-detail-component-host>\r\n\r\n <vdr-card [title]=\"'order.order-history' | translate\">\r\n <vdr-order-history\r\n [order]=\"order\"\r\n [history]=\"history$ | async\"\r\n (addNote)=\"addNote($event)\"\r\n (updateNote)=\"updateNote($event)\"\r\n (deleteNote)=\"deleteNote($event)\"\r\n ></vdr-order-history>\r\n </vdr-card>\r\n </vdr-page-block>\r\n</vdr-page-detail-layout>\r\n", styles: [".shipping-address{list-style-type:none;line-height:1.3em}.order-cards h6{margin-top:6px;color:var(--color-text-200)}vdr-order-payment-card+vdr-order-payment-card{margin-top:calc(var(--space-unit) * 2)}\n"] }]
|
|
2560
|
+
args: [{ selector: 'vdr-order-detail', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vdr-page-block>\r\n <vdr-action-bar *ngIf=\"entity$ | async as order\">\r\n <vdr-ab-left> </vdr-ab-left>\r\n\r\n <vdr-ab-right>\r\n <vdr-action-bar-items locationId=\"order-detail\"></vdr-action-bar-items>\r\n <button\r\n class=\"button primary mr-1\"\r\n *ngIf=\"\r\n order.type !== 'Aggregate' &&\r\n (order.state === 'ArrangingPayment' || order.state === 'ArrangingAdditionalPayment') &&\r\n (hasUnsettledModifications(order) || 0 < outstandingPaymentAmount(order))\r\n \"\r\n (click)=\"addManualPayment(order)\"\r\n >\r\n {{ 'order.add-payment-to-order' | translate }}\r\n ({{ outstandingPaymentAmount(order) | localeCurrency : order.currencyCode }})\r\n </button>\r\n <button\r\n class=\"button primary mr-1\"\r\n *ngIf=\"\r\n order.type !== 'Aggregate' &&\r\n order.active === false &&\r\n order.state !== 'ArrangingAdditionalPayment' &&\r\n order.state !== 'ArrangingPayment' &&\r\n 0 < outstandingPaymentAmount(order)\r\n \"\r\n (click)=\"transitionToState('ArrangingAdditionalPayment')\"\r\n >\r\n {{ 'order.arrange-additional-payment' | translate }}\r\n </button>\r\n <button\r\n *ngIf=\"order.type !== 'Aggregate'\"\r\n class=\"button primary mr-1\"\r\n (click)=\"fulfillOrder()\"\r\n [disabled]=\"!canAddFulfillment(order)\"\r\n >\r\n {{ 'order.fulfill-order' | translate }}\r\n </button>\r\n <vdr-action-bar-dropdown-menu [alwaysShow]=\"true\" locationId=\"order-detail\">\r\n <ng-container *ngIf=\"order.type !== 'Aggregate' && order.nextStates.includes('Modifying')\">\r\n <button type=\"button\" vdrDropdownItem (click)=\"transitionToModifying()\">\r\n <clr-icon shape=\"pencil\"></clr-icon>\r\n {{ 'order.modify-order' | translate }}\r\n </button>\r\n <div class=\"dropdown-divider\"></div>\r\n </ng-container>\r\n <button\r\n type=\"button\"\r\n vdrDropdownItem\r\n *ngIf=\"order.type !== 'Aggregate' && order.nextStates.includes('Cancelled')\"\r\n (click)=\"cancelOrRefund(order)\"\r\n >\r\n <clr-icon shape=\"error-standard\" class=\"is-error\"></clr-icon>\r\n <ng-container *ngIf=\"orderHasSettledPayments(order); else cancelOnly\">\r\n {{ 'order.refund-and-cancel-order' | translate }}\r\n </ng-container>\r\n <ng-template #cancelOnly>\r\n {{ 'order.cancel-order' | translate }}\r\n </ng-template>\r\n </button>\r\n\r\n <ng-container *ngIf=\"(nextStates$ | async)?.length\">\r\n <div class=\"dropdown-divider\"></div>\r\n <button\r\n *ngFor=\"let nextState of nextStates$ | async\"\r\n type=\"button\"\r\n vdrDropdownItem\r\n (click)=\"transitionToState(nextState)\"\r\n >\r\n <clr-icon shape=\"step-forward-2\"></clr-icon>\r\n {{\r\n 'order.transition-to-state'\r\n | translate : { state: (nextState | stateI18nToken | translate) }\r\n }}\r\n </button>\r\n </ng-container>\r\n <div class=\"dropdown-divider\"></div>\r\n <button type=\"button\" vdrDropdownItem (click)=\"manuallyTransitionToState(order)\">\r\n <clr-icon shape=\"step-forward-2\" class=\"is-warning\"></clr-icon>\r\n {{ 'order.manually-transition-to-state' | translate }}\r\n </button>\r\n </vdr-action-bar-dropdown-menu>\r\n </vdr-ab-right>\r\n </vdr-action-bar>\r\n</vdr-page-block>\r\n\r\n<vdr-page-detail-layout *ngIf=\"entity$ | async as order\">\r\n <vdr-page-detail-sidebar>\r\n <vdr-card [title]=\"'order.state' | translate\">\r\n <ng-template vdrCardControls>\r\n <button\r\n class=\"button-small\"\r\n (click)=\"openStateDiagram()\"\r\n [title]=\"'order.order-state-diagram' | translate\"\r\n >\r\n <clr-icon shape=\"list\"></clr-icon>\r\n </button>\r\n </ng-template>\r\n <vdr-order-state-label [state]=\"order.state\"></vdr-order-state-label>\r\n </vdr-card>\r\n <vdr-card [title]=\"'order.customer' | translate\">\r\n <ng-template vdrCardControls>\r\n <button\r\n *vdrIfPermissions=\"['UpdateOrder', 'ReadCustomer']\"\r\n class=\"button-small\"\r\n (click)=\"setOrderCustomer()\"\r\n [title]=\"'order.assign-order-to-another-customer' | translate\"\r\n >\r\n <clr-icon shape=\"switch\"></clr-icon>\r\n </button>\r\n </ng-template>\r\n <vdr-customer-label [customer]=\"order.customer\"></vdr-customer-label>\r\n <vdr-labeled-data\r\n class=\"mt-2\"\r\n [label]=\"'order.shipping-address' | translate\"\r\n *ngIf=\"getOrderAddressLines(order.shippingAddress).length\"\r\n >\r\n <vdr-formatted-address [address]=\"order.shippingAddress\" class=\"mt-1\"></vdr-formatted-address>\r\n </vdr-labeled-data>\r\n <vdr-labeled-data\r\n [label]=\"'order.billing-address' | translate\"\r\n *ngIf=\"getOrderAddressLines(order.billingAddress).length\"\r\n >\r\n <vdr-formatted-address [address]=\"order.billingAddress\" class=\"mt-1\"></vdr-formatted-address>\r\n </vdr-labeled-data>\r\n </vdr-card>\r\n <vdr-card [title]=\"'order.payments' | translate\" *ngIf=\"order.payments?.length\">\r\n <vdr-order-payment-card\r\n *ngFor=\"let payment of order.payments\"\r\n [currencyCode]=\"order.currencyCode\"\r\n [payment]=\"payment\"\r\n (settlePayment)=\"settlePayment($event)\"\r\n (transitionPaymentState)=\"transitionPaymentState($event)\"\r\n (settleRefund)=\"settleRefund($event)\"\r\n ></vdr-order-payment-card>\r\n </vdr-card>\r\n <vdr-card *ngIf=\"order.fulfillments?.length\">\r\n <vdr-fulfillment-card\r\n *ngFor=\"let fulfillment of order.fulfillments\"\r\n [fulfillment]=\"fulfillment\"\r\n [order]=\"order\"\r\n (transitionState)=\"transitionFulfillment(fulfillment.id, $event)\"\r\n ></vdr-fulfillment-card>\r\n </vdr-card>\r\n <vdr-card>\r\n <vdr-page-entity-info *ngIf=\"entity$ | async as entity\" [entity]=\"entity\" />\r\n </vdr-card>\r\n </vdr-page-detail-sidebar>\r\n\r\n <vdr-page-block>\r\n <vdr-seller-orders-card\r\n class=\"mb-2\"\r\n *ngIf=\"order.sellerOrders.length\"\r\n [orderId]=\"order.id\"\r\n ></vdr-seller-orders-card>\r\n <vdr-card [paddingX]=\"false\">\r\n <vdr-order-table\r\n [order]=\"order\"\r\n [orderLineCustomFields]=\"orderLineCustomFields\"\r\n ></vdr-order-table>\r\n </vdr-card>\r\n <vdr-card [title]=\"'order.tax-summary' | translate\" [paddingX]=\"false\">\r\n <table class=\"table\">\r\n <thead>\r\n <tr>\r\n <th>{{ 'common.description' | translate }}</th>\r\n <th>{{ 'order.tax-rate' | translate }}</th>\r\n <th>{{ 'order.tax-base' | translate }}</th>\r\n <th>{{ 'order.tax-total' | translate }}</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let row of order.taxSummary\">\r\n <td>{{ row.description }}</td>\r\n <td>{{ row.taxRate / 100 | percent : '0.0-3' }}</td>\r\n <td>{{ row.taxBase | localeCurrency : order.currencyCode }}</td>\r\n <td>{{ row.taxTotal | localeCurrency : order.currencyCode }}</td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </vdr-card>\r\n <vdr-card [title]=\"'common.custom-fields' | translate\" *ngIf=\"customFields.length\">\r\n <vdr-tabbed-custom-fields\r\n entityName=\"Order\"\r\n [customFields]=\"customFields\"\r\n [customFieldsFormGroup]=\"detailForm.get('customFields')\"\r\n [readonly]=\"!('UpdateOrder' | hasPermission)\"\r\n />\r\n <button\r\n class=\"button primary\"\r\n (click)=\"updateCustomFields()\"\r\n [disabled]=\"\r\n detailForm.get('customFields')?.pristine || detailForm.get('customFields')?.invalid\r\n \"\r\n >\r\n {{ 'common.update' | translate }}\r\n </button>\r\n </vdr-card>\r\n <vdr-custom-detail-component-host\r\n locationId=\"order-detail\"\r\n [entity$]=\"entity$\"\r\n [detailForm]=\"detailForm\"\r\n ></vdr-custom-detail-component-host>\r\n\r\n <vdr-card [title]=\"'order.order-history' | translate\">\r\n <vdr-order-history\r\n [order]=\"order\"\r\n [history]=\"history$ | async\"\r\n (addNote)=\"addNote($event)\"\r\n (updateNote)=\"updateNote($event)\"\r\n (deleteNote)=\"deleteNote($event)\"\r\n ></vdr-order-history>\r\n </vdr-card>\r\n </vdr-page-block>\r\n</vdr-page-detail-layout>\r\n", styles: [".shipping-address{list-style-type:none;line-height:1.3em}.order-cards h6{margin-top:6px;color:var(--color-text-200)}vdr-order-payment-card+vdr-order-payment-card{margin-top:calc(var(--space-unit) * 2)}\n"] }]
|
|
2574
2561
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1.DataService }, { type: i1.NotificationService }, { type: i1.ModalService }, { type: OrderTransitionService }, { type: i2.FormBuilder }] });
|
|
2575
2562
|
|
|
2576
2563
|
class OrderModificationSummaryComponent {
|
|
@@ -2621,10 +2608,10 @@ class OrderModificationSummaryComponent {
|
|
|
2621
2608
|
const removedCodes = originalCodes.filter(c => !newCodes.includes(c)).map(c => `- ${c}`);
|
|
2622
2609
|
return [...addedCodes, ...removedCodes];
|
|
2623
2610
|
}
|
|
2624
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
2625
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.
|
|
2611
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: OrderModificationSummaryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2612
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: OrderModificationSummaryComponent, selector: "vdr-order-modification-summary", inputs: { orderSnapshot: "orderSnapshot", modifyOrderInput: "modifyOrderInput", addedLines: "addedLines", shippingAddressForm: "shippingAddressForm", billingAddressForm: "billingAddressForm", updatedShippingMethods: "updatedShippingMethods", couponCodesControl: "couponCodesControl" }, ngImport: i0, template: "<vdr-labeled-data\r\n *ngIf=\"modifyOrderInput.adjustOrderLines?.length\"\r\n [label]=\"\r\n 'order.modification-adjusting-lines'\r\n | translate : { count: modifyOrderInput.adjustOrderLines?.length }\r\n \"\r\n>\r\n <div *ngFor=\"let line of adjustedLines\" class=\"mb-1\">\r\n {{ line }}\r\n </div>\r\n</vdr-labeled-data>\r\n<vdr-labeled-data\r\n *ngIf=\"modifyOrderInput.addItems?.length\"\r\n [label]=\"\r\n 'order.modification-adding-items'\r\n | translate : { count: modifyOrderInput.addItems?.length }\r\n \"\r\n>\r\n <div *ngFor=\"let item of addedLines\">\r\n {{ item.productVariant.name }} x {{ item.quantity }}\r\n </div>\r\n</vdr-labeled-data>\r\n<vdr-labeled-data\r\n *ngIf=\"modifyOrderInput.surcharges?.length\"\r\n [label]=\"\r\n 'order.modification-adding-surcharges'\r\n | translate : { count: modifyOrderInput.surcharges?.length }\r\n \"\r\n>\r\n <div *ngFor=\"let surcharge of modifyOrderInput.surcharges\" class=\"mb-1\">\r\n {{ surcharge.description }}: {{ surcharge.price | localeCurrency : orderSnapshot.currencyCode }}\r\n </div>\r\n</vdr-labeled-data>\r\n<vdr-labeled-data\r\n *ngIf=\"getModifiedFields(shippingAddressForm) as updatedShippingFields\"\r\n [label]=\"'order.modification-updating-shipping-address' | translate\"\r\n>\r\n {{ updatedShippingFields }}\r\n</vdr-labeled-data>\r\n<vdr-labeled-data\r\n *ngIf=\"getModifiedFields(billingAddressForm) as updatedBillingFields\"\r\n [label]=\"'order.modification-updating-billing-address' | translate\"\r\n>\r\n {{ updatedBillingFields }}\r\n</vdr-labeled-data>\r\n<vdr-labeled-data *ngIf=\"couponCodeChanges.length\" [label]=\"'order.set-coupon-codes' | translate\">\r\n <div *ngFor=\"let change of couponCodeChanges\" class=\"mb-1\">{{ change }}</div>\r\n</vdr-labeled-data>\r\n<ng-container *ngIf=\"getUpdatedShippingMethodLines() as updatedShippingMethods\">\r\n <vdr-labeled-data *ngIf=\"updatedShippingMethods.length\" [label]=\"'order.shipping-method' | translate\">\r\n <div *ngFor=\"let change of updatedShippingMethods\" class=\"mb-1\">{{ change }}</div>\r\n </vdr-labeled-data>\r\n</ng-container>", styles: [""], dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1.LabeledDataComponent, selector: "vdr-labeled-data", inputs: ["label"] }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.LocaleCurrencyPipe, name: "localeCurrency" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2626
2613
|
}
|
|
2627
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
2614
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: OrderModificationSummaryComponent, decorators: [{
|
|
2628
2615
|
type: Component,
|
|
2629
2616
|
args: [{ selector: 'vdr-order-modification-summary', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vdr-labeled-data\r\n *ngIf=\"modifyOrderInput.adjustOrderLines?.length\"\r\n [label]=\"\r\n 'order.modification-adjusting-lines'\r\n | translate : { count: modifyOrderInput.adjustOrderLines?.length }\r\n \"\r\n>\r\n <div *ngFor=\"let line of adjustedLines\" class=\"mb-1\">\r\n {{ line }}\r\n </div>\r\n</vdr-labeled-data>\r\n<vdr-labeled-data\r\n *ngIf=\"modifyOrderInput.addItems?.length\"\r\n [label]=\"\r\n 'order.modification-adding-items'\r\n | translate : { count: modifyOrderInput.addItems?.length }\r\n \"\r\n>\r\n <div *ngFor=\"let item of addedLines\">\r\n {{ item.productVariant.name }} x {{ item.quantity }}\r\n </div>\r\n</vdr-labeled-data>\r\n<vdr-labeled-data\r\n *ngIf=\"modifyOrderInput.surcharges?.length\"\r\n [label]=\"\r\n 'order.modification-adding-surcharges'\r\n | translate : { count: modifyOrderInput.surcharges?.length }\r\n \"\r\n>\r\n <div *ngFor=\"let surcharge of modifyOrderInput.surcharges\" class=\"mb-1\">\r\n {{ surcharge.description }}: {{ surcharge.price | localeCurrency : orderSnapshot.currencyCode }}\r\n </div>\r\n</vdr-labeled-data>\r\n<vdr-labeled-data\r\n *ngIf=\"getModifiedFields(shippingAddressForm) as updatedShippingFields\"\r\n [label]=\"'order.modification-updating-shipping-address' | translate\"\r\n>\r\n {{ updatedShippingFields }}\r\n</vdr-labeled-data>\r\n<vdr-labeled-data\r\n *ngIf=\"getModifiedFields(billingAddressForm) as updatedBillingFields\"\r\n [label]=\"'order.modification-updating-billing-address' | translate\"\r\n>\r\n {{ updatedBillingFields }}\r\n</vdr-labeled-data>\r\n<vdr-labeled-data *ngIf=\"couponCodeChanges.length\" [label]=\"'order.set-coupon-codes' | translate\">\r\n <div *ngFor=\"let change of couponCodeChanges\" class=\"mb-1\">{{ change }}</div>\r\n</vdr-labeled-data>\r\n<ng-container *ngIf=\"getUpdatedShippingMethodLines() as updatedShippingMethods\">\r\n <vdr-labeled-data *ngIf=\"updatedShippingMethods.length\" [label]=\"'order.shipping-method' | translate\">\r\n <div *ngFor=\"let change of updatedShippingMethods\" class=\"mb-1\">{{ change }}</div>\r\n </vdr-labeled-data>\r\n</ng-container>" }]
|
|
2630
2617
|
}], propDecorators: { orderSnapshot: [{
|
|
@@ -2716,10 +2703,10 @@ class OrderEditsPreviewDialogComponent {
|
|
|
2716
2703
|
});
|
|
2717
2704
|
}
|
|
2718
2705
|
}
|
|
2719
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
2720
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.
|
|
2706
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: OrderEditsPreviewDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2707
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: OrderEditsPreviewDialogComponent, selector: "vdr-order-edits-preview-dialog", ngImport: i0, template: "<ng-template vdrDialogTitle>{{ 'order.confirm-modifications' | translate }}</ng-template>\r\n<vdr-order-table\r\n [order]=\"order\"\r\n [orderLineCustomFields]=\"orderLineCustomFields\"\r\n class=\"order-edits-preview-table\"\r\n></vdr-order-table>\r\n<div class=\"payments-wrapper mb-2\">\r\n <div class=\"flex-spacer\">\r\n <vdr-payment-for-refund-selector\r\n *ngIf=\"priceDifference < 0\"\r\n class=\"\"\r\n [refundablePayments]=\"refundablePayments\"\r\n (paymentSelected)=\"onPaymentSelected($event.payment, $event.selected)\"\r\n [order]=\"order\"\r\n ></vdr-payment-for-refund-selector>\r\n </div>\r\n <div class=\"flex-spacer\">\r\n <vdr-card [title]=\"'order.modify-order' | translate\">\r\n <vdr-order-modification-summary\r\n [orderSnapshot]=\"orderSnapshot\"\r\n [modifyOrderInput]=\"modifyOrderInput\"\r\n [addedLines]=\"addedLines\"\r\n [shippingAddressForm]=\"shippingAddressForm\"\r\n [billingAddressForm]=\"billingAddressForm\"\r\n [couponCodesControl]=\"couponCodesControl\"\r\n [updatedShippingMethods]=\"updatedShippingMethods\"\r\n ></vdr-order-modification-summary>\r\n <vdr-labeled-data [label]=\"'order.note' | translate\">\r\n {{ modifyOrderInput.note || '-' }}\r\n </vdr-labeled-data>\r\n <vdr-form-field\r\n [label]=\"'order.refund-cancellation-reason' | translate\"\r\n *ngIf=\"priceDifference < 0\"\r\n >\r\n <textarea [(ngModel)]=\"refundNote\" name=\"refundNote\" required></textarea>\r\n </vdr-form-field>\r\n </vdr-card>\r\n </div>\r\n</div>\r\n<ng-template vdrDialogButtons>\r\n <div>\r\n <div class=\"errors\">\r\n <clr-alert\r\n class=\"mb-1\"\r\n *ngIf=\"priceDifference < 0 && !refundsCoverDifference()\"\r\n [clrAlertType]=\"'danger'\"\r\n [clrAlertClosable]=\"false\"\r\n >\r\n <clr-alert-item>\r\n {{ 'order.refund-total-warning' | translate }}\r\n </clr-alert-item>\r\n </clr-alert>\r\n </div>\r\n <div class=\"modal-buttons\">\r\n <clr-alert class=\"\" [clrAlertType]=\"'primary'\" [clrAlertClosable]=\"false\">\r\n <clr-alert-item>\r\n {{ 'order.modify-order-price-difference' | translate }}\r\n {{ 0 < priceDifference ? '+' : ''\r\n }}{{ priceDifference | localeCurrency : order.currencyCode }}\r\n </clr-alert-item>\r\n </clr-alert>\r\n <button type=\"button\" class=\"btn\" (click)=\"cancel()\">\r\n {{ 'common.cancel' | translate }}\r\n </button>\r\n <button\r\n type=\"submit\"\r\n (click)=\"submit()\"\r\n [disabled]=\"priceDifference < 0 ? !refundsCoverDifference() : false\"\r\n class=\"btn btn-primary\"\r\n >\r\n {{ 'common.confirm' | translate }}\r\n </button>\r\n </div>\r\n </div>\r\n</ng-template>\r\n", styles: ["::ng-deep .order-edits-preview-table .table-wrapper{max-width:initial!important}.payments-wrapper{display:flex;gap:calc(var(--space-unit) * 2)}.modal-buttons{display:flex;justify-content:flex-end;gap:.6rem;gap:var(--clr-modal-footer-gap, .6rem)}\n"], dependencies: [{ kind: "component", type: i3.ClrAlert, selector: "clr-alert", inputs: ["clrAlertSizeSmall", "clrAlertClosable", "clrAlertAppLevel", "clrCloseButtonAriaLabel", "clrAlertLightweight", "clrAlertType", "clrAlertIcon", "clrAlertClosed"], outputs: ["clrAlertClosedChange"] }, { kind: "component", type: i3.ClrAlertItem, selector: "clr-alert-item" }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i1.FormFieldComponent, selector: "vdr-form-field", inputs: ["label", "for", "tooltip", "errors", "readOnlyToggle"], outputs: ["readOnlyToggleChange"] }, { kind: "directive", type: i1.FormFieldControlDirective, selector: "input, textarea, select, vdr-currency-input" }, { kind: "directive", type: i1.DialogButtonsDirective, selector: "[vdrDialogButtons]" }, { kind: "directive", type: i1.DialogTitleDirective, selector: "[vdrDialogTitle]" }, { kind: "component", type: i1.LabeledDataComponent, selector: "vdr-labeled-data", inputs: ["label"] }, { kind: "component", type: i1.CardComponent, selector: "vdr-card", inputs: ["title", "paddingX"] }, { kind: "component", type: OrderTableComponent, selector: "vdr-order-table", inputs: ["order", "orderLineCustomFields", "isDraft"], outputs: ["adjust", "remove"] }, { kind: "component", type: PaymentForRefundSelectorComponent, selector: "vdr-payment-for-refund-selector", inputs: ["refundablePayments", "order"], outputs: ["paymentSelected"] }, { kind: "component", type: OrderModificationSummaryComponent, selector: "vdr-order-modification-summary", inputs: ["orderSnapshot", "modifyOrderInput", "addedLines", "shippingAddressForm", "billingAddressForm", "updatedShippingMethods", "couponCodesControl"] }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.LocaleCurrencyPipe, name: "localeCurrency" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2721
2708
|
}
|
|
2722
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
2709
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: OrderEditsPreviewDialogComponent, decorators: [{
|
|
2723
2710
|
type: Component,
|
|
2724
2711
|
args: [{ selector: 'vdr-order-edits-preview-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template vdrDialogTitle>{{ 'order.confirm-modifications' | translate }}</ng-template>\r\n<vdr-order-table\r\n [order]=\"order\"\r\n [orderLineCustomFields]=\"orderLineCustomFields\"\r\n class=\"order-edits-preview-table\"\r\n></vdr-order-table>\r\n<div class=\"payments-wrapper mb-2\">\r\n <div class=\"flex-spacer\">\r\n <vdr-payment-for-refund-selector\r\n *ngIf=\"priceDifference < 0\"\r\n class=\"\"\r\n [refundablePayments]=\"refundablePayments\"\r\n (paymentSelected)=\"onPaymentSelected($event.payment, $event.selected)\"\r\n [order]=\"order\"\r\n ></vdr-payment-for-refund-selector>\r\n </div>\r\n <div class=\"flex-spacer\">\r\n <vdr-card [title]=\"'order.modify-order' | translate\">\r\n <vdr-order-modification-summary\r\n [orderSnapshot]=\"orderSnapshot\"\r\n [modifyOrderInput]=\"modifyOrderInput\"\r\n [addedLines]=\"addedLines\"\r\n [shippingAddressForm]=\"shippingAddressForm\"\r\n [billingAddressForm]=\"billingAddressForm\"\r\n [couponCodesControl]=\"couponCodesControl\"\r\n [updatedShippingMethods]=\"updatedShippingMethods\"\r\n ></vdr-order-modification-summary>\r\n <vdr-labeled-data [label]=\"'order.note' | translate\">\r\n {{ modifyOrderInput.note || '-' }}\r\n </vdr-labeled-data>\r\n <vdr-form-field\r\n [label]=\"'order.refund-cancellation-reason' | translate\"\r\n *ngIf=\"priceDifference < 0\"\r\n >\r\n <textarea [(ngModel)]=\"refundNote\" name=\"refundNote\" required></textarea>\r\n </vdr-form-field>\r\n </vdr-card>\r\n </div>\r\n</div>\r\n<ng-template vdrDialogButtons>\r\n <div>\r\n <div class=\"errors\">\r\n <clr-alert\r\n class=\"mb-1\"\r\n *ngIf=\"priceDifference < 0 && !refundsCoverDifference()\"\r\n [clrAlertType]=\"'danger'\"\r\n [clrAlertClosable]=\"false\"\r\n >\r\n <clr-alert-item>\r\n {{ 'order.refund-total-warning' | translate }}\r\n </clr-alert-item>\r\n </clr-alert>\r\n </div>\r\n <div class=\"modal-buttons\">\r\n <clr-alert class=\"\" [clrAlertType]=\"'primary'\" [clrAlertClosable]=\"false\">\r\n <clr-alert-item>\r\n {{ 'order.modify-order-price-difference' | translate }}\r\n {{ 0 < priceDifference ? '+' : ''\r\n }}{{ priceDifference | localeCurrency : order.currencyCode }}\r\n </clr-alert-item>\r\n </clr-alert>\r\n <button type=\"button\" class=\"btn\" (click)=\"cancel()\">\r\n {{ 'common.cancel' | translate }}\r\n </button>\r\n <button\r\n type=\"submit\"\r\n (click)=\"submit()\"\r\n [disabled]=\"priceDifference < 0 ? !refundsCoverDifference() : false\"\r\n class=\"btn btn-primary\"\r\n >\r\n {{ 'common.confirm' | translate }}\r\n </button>\r\n </div>\r\n </div>\r\n</ng-template>\r\n", styles: ["::ng-deep .order-edits-preview-table .table-wrapper{max-width:initial!important}.payments-wrapper{display:flex;gap:calc(var(--space-unit) * 2)}.modal-buttons{display:flex;justify-content:flex-end;gap:.6rem;gap:var(--clr-modal-footer-gap, .6rem)}\n"] }]
|
|
2725
2712
|
}] });
|
|
@@ -3181,10 +3168,10 @@ class OrderEditorComponent extends TypedBaseDetailComponent {
|
|
|
3181
3168
|
setFormValues(entity, languageCode) {
|
|
3182
3169
|
/* not used */
|
|
3183
3170
|
}
|
|
3184
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
3185
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.4", type: OrderEditorComponent, selector: "vdr-order-editor", usesInheritance: true, ngImport: i0, template: "<vdr-page-block>\r\n <vdr-action-bar *ngIf=\"entity$ | async as order\">\r\n <vdr-ab-left>\r\n <div class=\"flex clr-align-items-center\"></div>\r\n </vdr-ab-left>\r\n\r\n <vdr-ab-right>\r\n <button class=\"btn btn-secondary\" (click)=\"transitionToPriorState(order)\">\r\n {{ 'order.cancel-modification' | translate }}\r\n </button>\r\n </vdr-ab-right>\r\n </vdr-action-bar>\r\n</vdr-page-block>\r\n\r\n<vdr-page-detail-layout *ngIf=\"entity as order\">\r\n <vdr-page-detail-sidebar>\r\n <vdr-card [title]=\"'order.modification-summary' | translate\">\r\n <vdr-order-modification-summary\r\n [orderSnapshot]=\"orderSnapshot\"\r\n [modifyOrderInput]=\"modifyOrderInput\"\r\n [addedLines]=\"addedLines\"\r\n [shippingAddressForm]=\"shippingAddressForm\"\r\n [billingAddressForm]=\"billingAddressForm\"\r\n [couponCodesControl]=\"couponCodesControl\"\r\n [updatedShippingMethods]=\"updatedShippingMethods\"\r\n ></vdr-order-modification-summary>\r\n\r\n <div *ngIf=\"!hasModifications()\" class=\"no-modifications\">\r\n {{ 'order.no-modifications-made' | translate }}\r\n </div>\r\n\r\n <div class=\"summary-controls\">\r\n <vdr-form-field [label]=\"'order.note' | translate\">\r\n <textarea\r\n [(ngModel)]=\"note\"\r\n name=\"note\"\r\n required\r\n [disabled]=\"!hasModifications()\"\r\n ></textarea>\r\n </vdr-form-field>\r\n <label class=\"flex items-center\">\r\n <input\r\n type=\"checkbox\"\r\n [(ngModel)]=\"recalculateShipping\"\r\n [disabled]=\"!hasModifications()\"\r\n />\r\n <div class=\"ml-1\">{{ 'order.modification-recalculate-shipping' | translate }}</div>\r\n </label>\r\n <button\r\n class=\"btn btn-primary mt-2\"\r\n [disabled]=\"!hasModifications()\"\r\n (click)=\"previewAndModify(order)\"\r\n >\r\n {{ 'order.preview-changes' | translate }}\r\n </button>\r\n </div>\r\n </vdr-card>\r\n <vdr-card [title]=\"'order.set-coupon-codes' | translate\">\r\n <vdr-coupon-code-selector [control]=\"couponCodesControl\"></vdr-coupon-code-selector>\r\n </vdr-card>\r\n <vdr-card [title]=\"'order.shipping-address' | translate\">\r\n <ng-template vdrCardControls>\r\n <button\r\n class=\"button-small\"\r\n [title]=\"'order.edit-shipping-address' | translate\"\r\n (click)=\"editingShippingAddress = !editingShippingAddress\"\r\n >\r\n <clr-icon shape=\"edit\"></clr-icon>\r\n </button>\r\n </ng-template>\r\n <vdr-formatted-address\r\n *ngIf=\"!editingShippingAddress\"\r\n [address]=\"shippingAddressForm.value\"\r\n ></vdr-formatted-address>\r\n <vdr-address-form\r\n *ngIf=\"editingShippingAddress\"\r\n [formGroup]=\"shippingAddressForm\"\r\n [availableCountries]=\"availableCountries$ | async\"\r\n [customFields]=\"addressCustomFields\"\r\n ></vdr-address-form>\r\n </vdr-card>\r\n <vdr-card [title]=\"'order.billing-address' | translate\">\r\n <ng-template vdrCardControls>\r\n <button\r\n class=\"button-small\"\r\n [title]=\"'order.edit-billing-address' | translate\"\r\n (click)=\"editingBillingAddress = !editingBillingAddress\"\r\n >\r\n <clr-icon shape=\"edit\"></clr-icon>\r\n </button>\r\n </ng-template>\r\n <vdr-formatted-address\r\n *ngIf=\"!editingBillingAddress\"\r\n [address]=\"billingAddressForm.value\"\r\n ></vdr-formatted-address>\r\n <vdr-address-form\r\n *ngIf=\"editingBillingAddress\"\r\n [formGroup]=\"billingAddressForm\"\r\n [availableCountries]=\"availableCountries$ | async\"\r\n [customFields]=\"addressCustomFields\"\r\n ></vdr-address-form>\r\n </vdr-card>\r\n </vdr-page-detail-sidebar>\r\n\r\n <vdr-page-block>\r\n <vdr-card [paddingX]=\"false\">\r\n <vdr-data-table-2 id=\"modify-order\" class=\"order-table\" [items]=\"order.lines.concat(addedLines)\">\r\n <!-- Here we define all the available columns -->\r\n <vdr-dt2-column id=\"id\" [heading]=\"'common.id' | translate\" [hiddenByDefault]=\"true\">\r\n <ng-template let-line=\"item\">\r\n {{ line.id }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column\r\n id=\"created-at\"\r\n [heading]=\"'common.created-at' | translate\"\r\n [hiddenByDefault]=\"true\"\r\n >\r\n <ng-template let-line=\"item\">\r\n {{ line.createdAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column\r\n id=\"updated-at\"\r\n [heading]=\"'common.updated-at' | translate\"\r\n [hiddenByDefault]=\"true\"\r\n >\r\n <ng-template let-line=\"item\">\r\n {{ line.updatedAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'common.image' | translate\" id=\"image\">\r\n <ng-template let-line=\"item\">\r\n <div class=\"image-placeholder\">\r\n <img\r\n *ngIf=\"line.featuredAsset as asset; else imagePlaceholder\"\r\n [src]=\"asset | assetPreview : 'tiny'\"\r\n />\r\n <ng-template #imagePlaceholder>\r\n <div class=\"placeholder\">\r\n <clr-icon shape=\"image\" size=\"48\"></clr-icon>\r\n </div>\r\n </ng-template>\r\n </div>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column\r\n id=\"product-name\"\r\n [heading]=\"'order.product-name' | translate\"\r\n [optional]=\"false\"\r\n >\r\n <ng-template let-line=\"item\">\r\n {{ line.productVariant.name }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column id=\"product-sku\" [heading]=\"'order.product-sku' | translate\">\r\n <ng-template let-line=\"item\">\r\n {{ line.productVariant.sku }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column id=\"unit-price\" [heading]=\"'order.unit-price' | translate\">\r\n <ng-template let-line=\"item\">\r\n <div class=\"text-center\">\r\n <div>{{ line.unitPriceWithTax | localeCurrency : order.currencyCode }}</div>\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ line.unitPrice | localeCurrency : order.currencyCode }}\r\n </div>\r\n </div>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column id=\"quantity\" [heading]=\"'order.quantity' | translate\" [optional]=\"false\">\r\n <ng-template let-line=\"item\">\r\n <input\r\n type=\"number\"\r\n class=\"draft-qty mr-1\"\r\n min=\"0\"\r\n [value]=\"getInitialLineQuantity(line.id)\"\r\n (input)=\"updateLineQuantity(line, $event.target.value)\"\r\n />\r\n <button\r\n class=\"button-small\"\r\n *ngIf=\"isAddedLine(line)\"\r\n (click)=\"removeAddedItem(line.id)\"\r\n >\r\n <clr-icon shape=\"trash\"></clr-icon>\r\n </button>\r\n <vdr-line-refunds [line]=\"line\" [payments]=\"order.payments\"></vdr-line-refunds>\r\n <vdr-line-fulfillment\r\n [line]=\"line\"\r\n [allOrderFulfillments]=\"order.fulfillments\"\r\n [orderState]=\"order.state\"\r\n ></vdr-line-fulfillment>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column\r\n *ngFor=\"let customField of orderLineCustomFields\"\r\n [id]=\"customField.name\"\r\n [heading]=\"customField | customFieldLabel : (uiLanguage$ | async)\"\r\n [hiddenByDefault]=\"true\"\r\n >\r\n <ng-template let-line=\"item\" let-index=\"index\">\r\n <vdr-custom-field-control\r\n [compact]=\"true\"\r\n [entityName]=\"'OrderLine'\"\r\n [customField]=\"customField\"\r\n [customFieldsFormGroup]=\"orderLineCustomFieldsFormArray.at(index)\"\r\n />\r\n </ng-template>\r\n </vdr-dt2-column>\r\n </vdr-data-table-2>\r\n </vdr-card>\r\n <vdr-card [title]=\"'order.add-item-to-order' | translate\">\r\n <vdr-product-variant-selector class=\"mb-4\" (productSelected)=\"addItemSelectedVariant = $event\">\r\n </vdr-product-variant-selector>\r\n <div class=\"flex\">\r\n <div>\r\n <div *ngIf=\"addItemSelectedVariant\" class=\"flex mb-4\">\r\n <img\r\n *ngIf=\"addItemSelectedVariant.productAsset as asset\"\r\n [src]=\"asset | assetPreview : 'tiny'\"\r\n class=\"mr-4 add-item-thumb\"\r\n />\r\n <div>\r\n <strong class=\"mr-4\">{{ addItemSelectedVariant.productVariantName }}</strong>\r\n <small>{{ addItemSelectedVariant.sku }}</small>\r\n <div>\r\n {{\r\n getSelectedItemPrice(addItemSelectedVariant)\r\n | localeCurrency : order.currencyCode\r\n }}\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"form-grid\" *ngIf=\"addItemSelectedVariant\">\r\n <ng-container *ngFor=\"let customField of orderLineCustomFields\">\r\n <vdr-custom-field-control\r\n [readonly]=\"!addItemSelectedVariant\"\r\n [customField]=\"customField\"\r\n [customFieldsFormGroup]=\"addItemCustomFieldsForm\"\r\n entityName=\"OrderLine\"\r\n [compact]=\"true\"\r\n ></vdr-custom-field-control>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div class=\"flex-spacer\"></div>\r\n <div>\r\n <button\r\n *ngIf=\"addItemSelectedVariant\"\r\n class=\"btn btn-secondary\"\r\n [disabled]=\"!addItemSelectedVariant || addItemCustomFieldsForm.invalid\"\r\n (click)=\"addItemToOrder(addItemSelectedVariant)\"\r\n >\r\n {{ 'order.add-item-to-order' | translate }}\r\n </button>\r\n </div>\r\n </div>\r\n </vdr-card>\r\n <vdr-card [title]=\"'order.shipping' | translate\">\r\n <div *ngFor=\"let shippingLine of order.shippingLines\" class=\"flex items-center\">\r\n <ng-container *ngIf=\"getShippingLineDetails(shippingLine) as details\">\r\n <div>{{ details.name }}:</div>\r\n <div class=\"mx-1\">\r\n {{ details.price | localeCurrency : order.currencyCode }}\r\n </div>\r\n <button class=\"button-small\" (click)=\"setShippingMethod(shippingLine.id)\">\r\n {{ 'order.set-shipping-method' | translate }}\r\n </button>\r\n </ng-container>\r\n </div>\r\n </vdr-card>\r\n <vdr-card [title]=\"'order.add-surcharge' | translate\">\r\n <form [formGroup]=\"surchargeForm\" (submit)=\"addSurcharge(surchargeForm.value)\">\r\n <div class=\"form-grid\">\r\n <vdr-form-field [label]=\"'common.description' | translate\" for=\"description\"\r\n ><input id=\"description\" type=\"text\" formControlName=\"description\"\r\n /></vdr-form-field>\r\n <vdr-form-field [label]=\"'order.product-sku' | translate\" for=\"sku\"\r\n ><input id=\"sku\" type=\"text\" formControlName=\"sku\"\r\n /></vdr-form-field>\r\n <vdr-form-field [label]=\"'common.price' | translate\" for=\"price\">\r\n <vdr-currency-input\r\n [currencyCode]=\"order.currencyCode\"\r\n id=\"price\"\r\n formControlName=\"price\"\r\n ></vdr-currency-input>\r\n </vdr-form-field>\r\n <vdr-form-field\r\n [label]=\"\r\n 'catalog.price-includes-tax-at'\r\n | translate : { rate: surchargeForm.get('taxRate')?.value ?? 0 }\r\n \"\r\n for=\"priceIncludesTax\"\r\n ><input\r\n id=\"priceIncludesTax\"\r\n type=\"checkbox\"\r\n clrCheckbox\r\n formControlName=\"priceIncludesTax\"\r\n /></vdr-form-field>\r\n <vdr-form-field [label]=\"'order.tax-rate' | translate\" for=\"taxRate\">\r\n <vdr-affixed-input suffix=\"%\"\r\n ><input id=\"taxRate\" type=\"number\" min=\"0\" max=\"100\" formControlName=\"taxRate\"\r\n /></vdr-affixed-input>\r\n </vdr-form-field>\r\n <vdr-form-field [label]=\"'order.tax-description' | translate\" for=\"taxDescription\"\r\n ><input id=\"taxDescription\" type=\"text\" formControlName=\"taxDescription\"\r\n /></vdr-form-field>\r\n </div>\r\n <button\r\n class=\"btn btn-secondary mt-2\"\r\n [disabled]=\"\r\n surchargeForm.invalid ||\r\n surchargeForm.pristine ||\r\n surchargeForm.get('price')?.value === 0 ||\r\n !surchargeForm.get('description')?.value\r\n \"\r\n >\r\n {{ 'order.add-surcharge' | translate }}\r\n </button>\r\n </form>\r\n </vdr-card>\r\n </vdr-page-block>\r\n</vdr-page-detail-layout>\r\n", styles: [".order-table .is-cancelled td{text-decoration:line-through;background-color:var(--color-component-bg-200)}.order-table .sub-total td{border-top:1px dashed var(--color-component-border-200)}.order-table .total td{font-weight:700;border-top:1px dashed var(--color-component-border-200)}.order-table td.custom-fields-row{border-top-style:dashed;border-top-color:var(--color-grey-200)}.order-table img{border-radius:var(--border-radius-img)}.order-table .order-line-custom-fields{display:flex;flex-wrap:wrap}.order-table .order-line-custom-fields .custom-field{text-align:start;max-width:200px;overflow:hidden;text-overflow:ellipsis;margin-bottom:6px;margin-inline-end:18px}.order-table .draft-qty{max-width:48px}.order-table .order-line-custom-field{background-color:var(--color-component-bg-100)}.order-table .order-line-custom-field .custom-field-ellipsis{color:var(--color-text-300)}.order-table .net-price{font-size:11px;color:var(--color-text-300);line-height:14px}.order-table .promotions-label{text-decoration:underline dotted var(--color-text-200);font-size:11px;margin-top:6px;cursor:pointer;text-transform:lowercase}.order-table .thumb img{width:50px;height:50px}.order-table .shipping-method-name{font-size:var(--font-size-xs);margin-inline-end:2px}.order-table .order-placed-quantity{text-decoration:line-through;color:var(--color-text-300);margin-inline-end:2px}.order-table tr.modified td{background-color:var(--color-warning-100)}.order-table .order-line-custom-field{text-align:start}.add-item-thumb{max-width:50px}.no-modifications{color:var(--color-grey-400)}.summary-controls{border-top:1px solid var(--color-weight-200);margin-top:calc(var(--space-unit) * 2);padding-top:calc(var(--space-unit) * 1)}\n"], dependencies: [{ kind: "directive", type: i3.ClrIconCustomTag, selector: "clr-icon" }, { kind: "directive", type: i3.ClrLabel, selector: "label", inputs: ["for"] }, { kind: "directive", type: i3.ClrCheckbox, selector: "[clrCheckbox],[clrToggle]" }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i2.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i1.ActionBarComponent, selector: "vdr-action-bar" }, { kind: "component", type: i1.ActionBarLeftComponent, selector: "vdr-ab-left", inputs: ["grow"] }, { kind: "component", type: i1.ActionBarRightComponent, selector: "vdr-ab-right", inputs: ["grow"] }, { kind: "component", type: i1.AffixedInputComponent, selector: "vdr-affixed-input", inputs: ["prefix", "suffix"] }, { kind: "component", type: i1.CurrencyInputComponent, selector: "vdr-currency-input", inputs: ["disabled", "readonly", "value", "currencyCode"], outputs: ["valueChange"] }, { kind: "component", type: i1.CustomFieldControlComponent, selector: "vdr-custom-field-control", inputs: ["entityName", "customFieldsFormGroup", "customField", "compact", "showLabel", "readonly"] }, { kind: "component", type: i1.FormFieldComponent, selector: "vdr-form-field", inputs: ["label", "for", "tooltip", "errors", "readOnlyToggle"], outputs: ["readOnlyToggleChange"] }, { kind: "directive", type: i1.FormFieldControlDirective, selector: "input, textarea, select, vdr-currency-input" }, { kind: "component", type: i1.FormattedAddressComponent, selector: "vdr-formatted-address", inputs: ["address"] }, { kind: "component", type: i1.ProductVariantSelectorComponent, selector: "vdr-product-variant-selector", outputs: ["productSelected"] }, { kind: "component", type: i1.AddressFormComponent, selector: "vdr-address-form", inputs: ["customFields", "formGroup", "availableCountries"] }, { kind: "component", type: i1.DataTable2Component, selector: "vdr-data-table-2", inputs: ["id", "items", "itemsPerPage", "currentPage", "totalItems", "emptyStateLabel", "filters", "activeIndex"], outputs: ["pageChange", "itemsPerPageChange"] }, { kind: "component", type: i1.DataTable2ColumnComponent, selector: "vdr-dt2-column", inputs: ["id", "expand", "heading", "align", "sort", "optional", "hiddenByDefault", "orderable"], exportAs: ["row"] }, { kind: "component", type: i1.PageBlockComponent, selector: "vdr-page-block" }, { kind: "component", type: i1.PageDetailLayoutComponent, selector: "vdr-page-detail-layout" }, { kind: "component", type: i1.PageDetailSidebarComponent, selector: "vdr-page-detail-sidebar" }, { kind: "component", type: i1.CardComponent, selector: "vdr-card", inputs: ["title", "paddingX"] }, { kind: "directive", type: i1.CardControlsDirective, selector: "[vdrCardControls]" }, { kind: "component", type: LineFulfillmentComponent, selector: "vdr-line-fulfillment", inputs: ["line", "allOrderFulfillments", "orderState"] }, { kind: "component", type: LineRefundsComponent, selector: "vdr-line-refunds", inputs: ["line", "payments"] }, { kind: "component", type: CouponCodeSelectorComponent, selector: "vdr-coupon-code-selector", inputs: ["couponCodes", "control"], outputs: ["addCouponCode", "removeCouponCode"] }, { kind: "component", type: OrderModificationSummaryComponent, selector: "vdr-order-modification-summary", inputs: ["orderSnapshot", "modifyOrderInput", "addedLines", "shippingAddressForm", "billingAddressForm", "updatedShippingMethods", "couponCodesControl"] }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.CustomFieldLabelPipe, name: "customFieldLabel" }, { kind: "pipe", type: i1.AssetPreviewPipe, name: "assetPreview" }, { kind: "pipe", type: i1.LocaleDatePipe, name: "localeDate" }, { kind: "pipe", type: i1.LocaleCurrencyPipe, name: "localeCurrency" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3171
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: OrderEditorComponent, deps: [{ token: i1.DataService }, { token: i1.NotificationService }, { token: i1.ModalService }, { token: OrderTransitionService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3172
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: OrderEditorComponent, selector: "vdr-order-editor", usesInheritance: true, ngImport: i0, template: "<vdr-page-block>\r\n <vdr-action-bar *ngIf=\"entity$ | async as order\">\r\n <vdr-ab-left>\r\n <div class=\"flex clr-align-items-center\"></div>\r\n </vdr-ab-left>\r\n\r\n <vdr-ab-right>\r\n <button class=\"btn btn-secondary\" (click)=\"transitionToPriorState(order)\">\r\n {{ 'order.cancel-modification' | translate }}\r\n </button>\r\n </vdr-ab-right>\r\n </vdr-action-bar>\r\n</vdr-page-block>\r\n\r\n<vdr-page-detail-layout *ngIf=\"entity as order\">\r\n <vdr-page-detail-sidebar>\r\n <vdr-card [title]=\"'order.modification-summary' | translate\">\r\n <vdr-order-modification-summary\r\n [orderSnapshot]=\"orderSnapshot\"\r\n [modifyOrderInput]=\"modifyOrderInput\"\r\n [addedLines]=\"addedLines\"\r\n [shippingAddressForm]=\"shippingAddressForm\"\r\n [billingAddressForm]=\"billingAddressForm\"\r\n [couponCodesControl]=\"couponCodesControl\"\r\n [updatedShippingMethods]=\"updatedShippingMethods\"\r\n ></vdr-order-modification-summary>\r\n\r\n <div *ngIf=\"!hasModifications()\" class=\"no-modifications\">\r\n {{ 'order.no-modifications-made' | translate }}\r\n </div>\r\n\r\n <div class=\"summary-controls\">\r\n <vdr-form-field [label]=\"'order.note' | translate\">\r\n <textarea\r\n [(ngModel)]=\"note\"\r\n name=\"note\"\r\n required\r\n [disabled]=\"!hasModifications()\"\r\n ></textarea>\r\n </vdr-form-field>\r\n <label class=\"flex items-center\">\r\n <input\r\n type=\"checkbox\"\r\n [(ngModel)]=\"recalculateShipping\"\r\n [disabled]=\"!hasModifications()\"\r\n />\r\n <div class=\"ml-1\">{{ 'order.modification-recalculate-shipping' | translate }}</div>\r\n </label>\r\n <button\r\n class=\"btn btn-primary mt-2\"\r\n [disabled]=\"!hasModifications()\"\r\n (click)=\"previewAndModify(order)\"\r\n >\r\n {{ 'order.preview-changes' | translate }}\r\n </button>\r\n </div>\r\n </vdr-card>\r\n <vdr-card [title]=\"'order.set-coupon-codes' | translate\">\r\n <vdr-coupon-code-selector [control]=\"couponCodesControl\"></vdr-coupon-code-selector>\r\n </vdr-card>\r\n <vdr-card [title]=\"'order.shipping-address' | translate\">\r\n <ng-template vdrCardControls>\r\n <button\r\n class=\"button-small\"\r\n [title]=\"'order.edit-shipping-address' | translate\"\r\n (click)=\"editingShippingAddress = !editingShippingAddress\"\r\n >\r\n <clr-icon shape=\"edit\"></clr-icon>\r\n </button>\r\n </ng-template>\r\n <vdr-formatted-address\r\n *ngIf=\"!editingShippingAddress\"\r\n [address]=\"shippingAddressForm.value\"\r\n ></vdr-formatted-address>\r\n <vdr-address-form\r\n *ngIf=\"editingShippingAddress\"\r\n [formGroup]=\"shippingAddressForm\"\r\n [availableCountries]=\"availableCountries$ | async\"\r\n [customFields]=\"addressCustomFields\"\r\n ></vdr-address-form>\r\n </vdr-card>\r\n <vdr-card [title]=\"'order.billing-address' | translate\">\r\n <ng-template vdrCardControls>\r\n <button\r\n class=\"button-small\"\r\n [title]=\"'order.edit-billing-address' | translate\"\r\n (click)=\"editingBillingAddress = !editingBillingAddress\"\r\n >\r\n <clr-icon shape=\"edit\"></clr-icon>\r\n </button>\r\n </ng-template>\r\n <vdr-formatted-address\r\n *ngIf=\"!editingBillingAddress\"\r\n [address]=\"billingAddressForm.value\"\r\n ></vdr-formatted-address>\r\n <vdr-address-form\r\n *ngIf=\"editingBillingAddress\"\r\n [formGroup]=\"billingAddressForm\"\r\n [availableCountries]=\"availableCountries$ | async\"\r\n [customFields]=\"addressCustomFields\"\r\n ></vdr-address-form>\r\n </vdr-card>\r\n </vdr-page-detail-sidebar>\r\n\r\n <vdr-page-block>\r\n <vdr-card [paddingX]=\"false\">\r\n <vdr-data-table-2 id=\"modify-order\" class=\"order-table\" [items]=\"order.lines.concat(addedLines)\">\r\n <!-- Here we define all the available columns -->\r\n <vdr-dt2-column id=\"id\" [heading]=\"'common.id' | translate\" [hiddenByDefault]=\"true\">\r\n <ng-template let-line=\"item\">\r\n {{ line.id }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column\r\n id=\"created-at\"\r\n [heading]=\"'common.created-at' | translate\"\r\n [hiddenByDefault]=\"true\"\r\n >\r\n <ng-template let-line=\"item\">\r\n {{ line.createdAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column\r\n id=\"updated-at\"\r\n [heading]=\"'common.updated-at' | translate\"\r\n [hiddenByDefault]=\"true\"\r\n >\r\n <ng-template let-line=\"item\">\r\n {{ line.updatedAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'common.image' | translate\" id=\"image\">\r\n <ng-template let-line=\"item\">\r\n <div class=\"image-placeholder\">\r\n <img\r\n *ngIf=\"line.featuredAsset as asset; else imagePlaceholder\"\r\n [src]=\"asset | assetPreview : 'tiny'\"\r\n />\r\n <ng-template #imagePlaceholder>\r\n <div class=\"placeholder\">\r\n <clr-icon shape=\"image\" size=\"48\"></clr-icon>\r\n </div>\r\n </ng-template>\r\n </div>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column\r\n id=\"product-name\"\r\n [heading]=\"'order.product-name' | translate\"\r\n [optional]=\"false\"\r\n >\r\n <ng-template let-line=\"item\">\r\n {{ line.productVariant.name }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column id=\"product-sku\" [heading]=\"'order.product-sku' | translate\">\r\n <ng-template let-line=\"item\">\r\n {{ line.productVariant.sku }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column id=\"unit-price\" [heading]=\"'order.unit-price' | translate\">\r\n <ng-template let-line=\"item\">\r\n <div class=\"text-center\">\r\n <div>{{ line.unitPriceWithTax | localeCurrency : order.currencyCode }}</div>\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ line.unitPrice | localeCurrency : order.currencyCode }}\r\n </div>\r\n </div>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column id=\"quantity\" [heading]=\"'order.quantity' | translate\" [optional]=\"false\">\r\n <ng-template let-line=\"item\">\r\n <input\r\n type=\"number\"\r\n class=\"draft-qty mr-1\"\r\n min=\"0\"\r\n [value]=\"getInitialLineQuantity(line.id)\"\r\n (input)=\"updateLineQuantity(line, $event.target.value)\"\r\n />\r\n <button\r\n class=\"button-small\"\r\n *ngIf=\"isAddedLine(line)\"\r\n (click)=\"removeAddedItem(line.id)\"\r\n >\r\n <clr-icon shape=\"trash\"></clr-icon>\r\n </button>\r\n <vdr-line-refunds [line]=\"line\" [payments]=\"order.payments\"></vdr-line-refunds>\r\n <vdr-line-fulfillment\r\n [line]=\"line\"\r\n [allOrderFulfillments]=\"order.fulfillments\"\r\n [orderState]=\"order.state\"\r\n ></vdr-line-fulfillment>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column\r\n *ngFor=\"let customField of orderLineCustomFields\"\r\n [id]=\"customField.name\"\r\n [heading]=\"customField | customFieldLabel : (uiLanguage$ | async)\"\r\n [hiddenByDefault]=\"true\"\r\n >\r\n <ng-template let-line=\"item\" let-index=\"index\">\r\n <vdr-custom-field-control\r\n [compact]=\"true\"\r\n [entityName]=\"'OrderLine'\"\r\n [customField]=\"customField\"\r\n [customFieldsFormGroup]=\"orderLineCustomFieldsFormArray.at(index)\"\r\n />\r\n </ng-template>\r\n </vdr-dt2-column>\r\n </vdr-data-table-2>\r\n </vdr-card>\r\n <vdr-card [title]=\"'order.add-item-to-order' | translate\">\r\n <vdr-product-variant-selector class=\"mb-4\" (productSelected)=\"addItemSelectedVariant = $event\">\r\n </vdr-product-variant-selector>\r\n <div class=\"flex\">\r\n <div>\r\n <div *ngIf=\"addItemSelectedVariant\" class=\"flex mb-4\">\r\n <img\r\n *ngIf=\"addItemSelectedVariant.productAsset as asset\"\r\n [src]=\"asset | assetPreview : 'tiny'\"\r\n class=\"mr-4 add-item-thumb\"\r\n />\r\n <div>\r\n <strong class=\"mr-4\">{{ addItemSelectedVariant.productVariantName }}</strong>\r\n <small>{{ addItemSelectedVariant.sku }}</small>\r\n <div>\r\n {{\r\n getSelectedItemPrice(addItemSelectedVariant)\r\n | localeCurrency : order.currencyCode\r\n }}\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"form-grid\" *ngIf=\"addItemSelectedVariant\">\r\n <ng-container *ngFor=\"let customField of orderLineCustomFields\">\r\n <vdr-custom-field-control\r\n [readonly]=\"!addItemSelectedVariant\"\r\n [customField]=\"customField\"\r\n [customFieldsFormGroup]=\"addItemCustomFieldsForm\"\r\n entityName=\"OrderLine\"\r\n [compact]=\"true\"\r\n ></vdr-custom-field-control>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div class=\"flex-spacer\"></div>\r\n <div>\r\n <button\r\n *ngIf=\"addItemSelectedVariant\"\r\n class=\"btn btn-secondary\"\r\n [disabled]=\"!addItemSelectedVariant || addItemCustomFieldsForm.invalid\"\r\n (click)=\"addItemToOrder(addItemSelectedVariant)\"\r\n >\r\n {{ 'order.add-item-to-order' | translate }}\r\n </button>\r\n </div>\r\n </div>\r\n </vdr-card>\r\n <vdr-card [title]=\"'order.shipping' | translate\">\r\n <div *ngFor=\"let shippingLine of order.shippingLines\" class=\"flex items-center\">\r\n <ng-container *ngIf=\"getShippingLineDetails(shippingLine) as details\">\r\n <div>{{ details.name }}:</div>\r\n <div class=\"mx-1\">\r\n {{ details.price | localeCurrency : order.currencyCode }}\r\n </div>\r\n <button class=\"button-small\" (click)=\"setShippingMethod(shippingLine.id)\">\r\n {{ 'order.set-shipping-method' | translate }}\r\n </button>\r\n </ng-container>\r\n </div>\r\n </vdr-card>\r\n <vdr-card [title]=\"'order.add-surcharge' | translate\">\r\n <form [formGroup]=\"surchargeForm\" (submit)=\"addSurcharge(surchargeForm.value)\">\r\n <div class=\"form-grid\">\r\n <vdr-form-field [label]=\"'common.description' | translate\" for=\"description\"\r\n ><input id=\"description\" type=\"text\" formControlName=\"description\"\r\n /></vdr-form-field>\r\n <vdr-form-field [label]=\"'order.product-sku' | translate\" for=\"sku\"\r\n ><input id=\"sku\" type=\"text\" formControlName=\"sku\"\r\n /></vdr-form-field>\r\n <vdr-form-field [label]=\"'common.price' | translate\" for=\"price\">\r\n <vdr-currency-input\r\n [currencyCode]=\"order.currencyCode\"\r\n id=\"price\"\r\n formControlName=\"price\"\r\n ></vdr-currency-input>\r\n </vdr-form-field>\r\n <vdr-form-field\r\n [label]=\"\r\n 'catalog.price-includes-tax-at'\r\n | translate : { rate: surchargeForm.get('taxRate')?.value ?? 0 }\r\n \"\r\n for=\"priceIncludesTax\"\r\n ><input\r\n id=\"priceIncludesTax\"\r\n type=\"checkbox\"\r\n clrCheckbox\r\n formControlName=\"priceIncludesTax\"\r\n /></vdr-form-field>\r\n <vdr-form-field [label]=\"'order.tax-rate' | translate\" for=\"taxRate\">\r\n <vdr-affixed-input suffix=\"%\"\r\n ><input id=\"taxRate\" type=\"number\" min=\"0\" max=\"100\" formControlName=\"taxRate\"\r\n /></vdr-affixed-input>\r\n </vdr-form-field>\r\n <vdr-form-field [label]=\"'order.tax-description' | translate\" for=\"taxDescription\"\r\n ><input id=\"taxDescription\" type=\"text\" formControlName=\"taxDescription\"\r\n /></vdr-form-field>\r\n </div>\r\n <button\r\n class=\"btn btn-secondary mt-2\"\r\n [disabled]=\"\r\n surchargeForm.invalid ||\r\n surchargeForm.pristine ||\r\n surchargeForm.get('price')?.value === 0 ||\r\n !surchargeForm.get('description')?.value\r\n \"\r\n >\r\n {{ 'order.add-surcharge' | translate }}\r\n </button>\r\n </form>\r\n </vdr-card>\r\n </vdr-page-block>\r\n</vdr-page-detail-layout>\r\n", styles: [".order-table .is-cancelled td{text-decoration:line-through;background-color:var(--color-component-bg-200)}.order-table .sub-total td{border-top:1px dashed var(--color-component-border-200)}.order-table .total td{font-weight:700;border-top:1px dashed var(--color-component-border-200)}.order-table td.custom-fields-row{border-top-style:dashed;border-top-color:var(--color-grey-200)}.order-table img{border-radius:var(--border-radius-img)}.order-table .order-line-custom-fields{display:flex;flex-wrap:wrap}.order-table .order-line-custom-fields .custom-field{text-align:start;max-width:200px;overflow:hidden;text-overflow:ellipsis;margin-bottom:6px;margin-inline-end:18px}.order-table .draft-qty{max-width:48px}.order-table .order-line-custom-field{background-color:var(--color-component-bg-100)}.order-table .order-line-custom-field .custom-field-ellipsis{color:var(--color-text-300)}.order-table .net-price{font-size:11px;color:var(--color-text-300);line-height:14px}.order-table .promotions-label{text-decoration:underline dotted var(--color-text-200);font-size:11px;margin-top:6px;cursor:pointer;text-transform:lowercase}.order-table .thumb img{width:50px;height:50px}.order-table .shipping-method-name{font-size:var(--font-size-xs);margin-inline-end:2px}.order-table .order-placed-quantity{text-decoration:line-through;color:var(--color-text-300);margin-inline-end:2px}.order-table tr.modified td{background-color:var(--color-warning-100)}.order-table .order-line-custom-field{text-align:start}.add-item-thumb{max-width:50px}.no-modifications{color:var(--color-grey-400)}.summary-controls{border-top:1px solid var(--color-weight-200);margin-top:calc(var(--space-unit) * 2);padding-top:calc(var(--space-unit) * 1)}\n"], dependencies: [{ kind: "directive", type: i3.ClrIconCustomTag, selector: "clr-icon" }, { kind: "directive", type: i3.ClrLabel, selector: "label", inputs: ["for"] }, { kind: "directive", type: i3.ClrCheckbox, selector: "[clrCheckbox],[clrToggle]" }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i2.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i1.ActionBarComponent, selector: "vdr-action-bar" }, { kind: "component", type: i1.ActionBarLeftComponent, selector: "vdr-ab-left", inputs: ["grow"] }, { kind: "component", type: i1.ActionBarRightComponent, selector: "vdr-ab-right", inputs: ["grow"] }, { kind: "component", type: i1.AffixedInputComponent, selector: "vdr-affixed-input", inputs: ["prefix", "suffix"] }, { kind: "component", type: i1.CurrencyInputComponent, selector: "vdr-currency-input", inputs: ["disabled", "readonly", "value", "currencyCode"], outputs: ["valueChange"] }, { kind: "component", type: i1.CustomFieldControlComponent, selector: "vdr-custom-field-control", inputs: ["entityName", "customFieldsFormGroup", "customField", "compact", "showLabel", "readonly"] }, { kind: "component", type: i1.FormFieldComponent, selector: "vdr-form-field", inputs: ["label", "for", "tooltip", "errors", "readOnlyToggle"], outputs: ["readOnlyToggleChange"] }, { kind: "directive", type: i1.FormFieldControlDirective, selector: "input, textarea, select, vdr-currency-input" }, { kind: "component", type: i1.FormattedAddressComponent, selector: "vdr-formatted-address", inputs: ["address"] }, { kind: "component", type: i1.ProductVariantSelectorComponent, selector: "vdr-product-variant-selector", outputs: ["productSelected"] }, { kind: "component", type: i1.AddressFormComponent, selector: "vdr-address-form", inputs: ["customFields", "formGroup", "availableCountries"] }, { kind: "component", type: i1.DataTable2Component, selector: "vdr-data-table-2", inputs: ["id", "items", "itemsPerPage", "currentPage", "totalItems", "emptyStateLabel", "filters", "activeIndex"], outputs: ["pageChange", "itemsPerPageChange", "visibleColumnsChange"] }, { kind: "component", type: i1.DataTable2ColumnComponent, selector: "vdr-dt2-column", inputs: ["id", "expand", "heading", "align", "sort", "optional", "hiddenByDefault", "orderable"], exportAs: ["row"] }, { kind: "component", type: i1.PageBlockComponent, selector: "vdr-page-block" }, { kind: "component", type: i1.PageDetailLayoutComponent, selector: "vdr-page-detail-layout" }, { kind: "component", type: i1.PageDetailSidebarComponent, selector: "vdr-page-detail-sidebar" }, { kind: "component", type: i1.CardComponent, selector: "vdr-card", inputs: ["title", "paddingX"] }, { kind: "directive", type: i1.CardControlsDirective, selector: "[vdrCardControls]" }, { kind: "component", type: LineFulfillmentComponent, selector: "vdr-line-fulfillment", inputs: ["line", "allOrderFulfillments", "orderState"] }, { kind: "component", type: LineRefundsComponent, selector: "vdr-line-refunds", inputs: ["line", "payments"] }, { kind: "component", type: CouponCodeSelectorComponent, selector: "vdr-coupon-code-selector", inputs: ["couponCodes", "control"], outputs: ["addCouponCode", "removeCouponCode"] }, { kind: "component", type: OrderModificationSummaryComponent, selector: "vdr-order-modification-summary", inputs: ["orderSnapshot", "modifyOrderInput", "addedLines", "shippingAddressForm", "billingAddressForm", "updatedShippingMethods", "couponCodesControl"] }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.CustomFieldLabelPipe, name: "customFieldLabel" }, { kind: "pipe", type: i1.AssetPreviewPipe, name: "assetPreview" }, { kind: "pipe", type: i1.LocaleDatePipe, name: "localeDate" }, { kind: "pipe", type: i1.LocaleCurrencyPipe, name: "localeCurrency" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3186
3173
|
}
|
|
3187
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
3174
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: OrderEditorComponent, decorators: [{
|
|
3188
3175
|
type: Component,
|
|
3189
3176
|
args: [{ selector: 'vdr-order-editor', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vdr-page-block>\r\n <vdr-action-bar *ngIf=\"entity$ | async as order\">\r\n <vdr-ab-left>\r\n <div class=\"flex clr-align-items-center\"></div>\r\n </vdr-ab-left>\r\n\r\n <vdr-ab-right>\r\n <button class=\"btn btn-secondary\" (click)=\"transitionToPriorState(order)\">\r\n {{ 'order.cancel-modification' | translate }}\r\n </button>\r\n </vdr-ab-right>\r\n </vdr-action-bar>\r\n</vdr-page-block>\r\n\r\n<vdr-page-detail-layout *ngIf=\"entity as order\">\r\n <vdr-page-detail-sidebar>\r\n <vdr-card [title]=\"'order.modification-summary' | translate\">\r\n <vdr-order-modification-summary\r\n [orderSnapshot]=\"orderSnapshot\"\r\n [modifyOrderInput]=\"modifyOrderInput\"\r\n [addedLines]=\"addedLines\"\r\n [shippingAddressForm]=\"shippingAddressForm\"\r\n [billingAddressForm]=\"billingAddressForm\"\r\n [couponCodesControl]=\"couponCodesControl\"\r\n [updatedShippingMethods]=\"updatedShippingMethods\"\r\n ></vdr-order-modification-summary>\r\n\r\n <div *ngIf=\"!hasModifications()\" class=\"no-modifications\">\r\n {{ 'order.no-modifications-made' | translate }}\r\n </div>\r\n\r\n <div class=\"summary-controls\">\r\n <vdr-form-field [label]=\"'order.note' | translate\">\r\n <textarea\r\n [(ngModel)]=\"note\"\r\n name=\"note\"\r\n required\r\n [disabled]=\"!hasModifications()\"\r\n ></textarea>\r\n </vdr-form-field>\r\n <label class=\"flex items-center\">\r\n <input\r\n type=\"checkbox\"\r\n [(ngModel)]=\"recalculateShipping\"\r\n [disabled]=\"!hasModifications()\"\r\n />\r\n <div class=\"ml-1\">{{ 'order.modification-recalculate-shipping' | translate }}</div>\r\n </label>\r\n <button\r\n class=\"btn btn-primary mt-2\"\r\n [disabled]=\"!hasModifications()\"\r\n (click)=\"previewAndModify(order)\"\r\n >\r\n {{ 'order.preview-changes' | translate }}\r\n </button>\r\n </div>\r\n </vdr-card>\r\n <vdr-card [title]=\"'order.set-coupon-codes' | translate\">\r\n <vdr-coupon-code-selector [control]=\"couponCodesControl\"></vdr-coupon-code-selector>\r\n </vdr-card>\r\n <vdr-card [title]=\"'order.shipping-address' | translate\">\r\n <ng-template vdrCardControls>\r\n <button\r\n class=\"button-small\"\r\n [title]=\"'order.edit-shipping-address' | translate\"\r\n (click)=\"editingShippingAddress = !editingShippingAddress\"\r\n >\r\n <clr-icon shape=\"edit\"></clr-icon>\r\n </button>\r\n </ng-template>\r\n <vdr-formatted-address\r\n *ngIf=\"!editingShippingAddress\"\r\n [address]=\"shippingAddressForm.value\"\r\n ></vdr-formatted-address>\r\n <vdr-address-form\r\n *ngIf=\"editingShippingAddress\"\r\n [formGroup]=\"shippingAddressForm\"\r\n [availableCountries]=\"availableCountries$ | async\"\r\n [customFields]=\"addressCustomFields\"\r\n ></vdr-address-form>\r\n </vdr-card>\r\n <vdr-card [title]=\"'order.billing-address' | translate\">\r\n <ng-template vdrCardControls>\r\n <button\r\n class=\"button-small\"\r\n [title]=\"'order.edit-billing-address' | translate\"\r\n (click)=\"editingBillingAddress = !editingBillingAddress\"\r\n >\r\n <clr-icon shape=\"edit\"></clr-icon>\r\n </button>\r\n </ng-template>\r\n <vdr-formatted-address\r\n *ngIf=\"!editingBillingAddress\"\r\n [address]=\"billingAddressForm.value\"\r\n ></vdr-formatted-address>\r\n <vdr-address-form\r\n *ngIf=\"editingBillingAddress\"\r\n [formGroup]=\"billingAddressForm\"\r\n [availableCountries]=\"availableCountries$ | async\"\r\n [customFields]=\"addressCustomFields\"\r\n ></vdr-address-form>\r\n </vdr-card>\r\n </vdr-page-detail-sidebar>\r\n\r\n <vdr-page-block>\r\n <vdr-card [paddingX]=\"false\">\r\n <vdr-data-table-2 id=\"modify-order\" class=\"order-table\" [items]=\"order.lines.concat(addedLines)\">\r\n <!-- Here we define all the available columns -->\r\n <vdr-dt2-column id=\"id\" [heading]=\"'common.id' | translate\" [hiddenByDefault]=\"true\">\r\n <ng-template let-line=\"item\">\r\n {{ line.id }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column\r\n id=\"created-at\"\r\n [heading]=\"'common.created-at' | translate\"\r\n [hiddenByDefault]=\"true\"\r\n >\r\n <ng-template let-line=\"item\">\r\n {{ line.createdAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column\r\n id=\"updated-at\"\r\n [heading]=\"'common.updated-at' | translate\"\r\n [hiddenByDefault]=\"true\"\r\n >\r\n <ng-template let-line=\"item\">\r\n {{ line.updatedAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'common.image' | translate\" id=\"image\">\r\n <ng-template let-line=\"item\">\r\n <div class=\"image-placeholder\">\r\n <img\r\n *ngIf=\"line.featuredAsset as asset; else imagePlaceholder\"\r\n [src]=\"asset | assetPreview : 'tiny'\"\r\n />\r\n <ng-template #imagePlaceholder>\r\n <div class=\"placeholder\">\r\n <clr-icon shape=\"image\" size=\"48\"></clr-icon>\r\n </div>\r\n </ng-template>\r\n </div>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column\r\n id=\"product-name\"\r\n [heading]=\"'order.product-name' | translate\"\r\n [optional]=\"false\"\r\n >\r\n <ng-template let-line=\"item\">\r\n {{ line.productVariant.name }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column id=\"product-sku\" [heading]=\"'order.product-sku' | translate\">\r\n <ng-template let-line=\"item\">\r\n {{ line.productVariant.sku }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column id=\"unit-price\" [heading]=\"'order.unit-price' | translate\">\r\n <ng-template let-line=\"item\">\r\n <div class=\"text-center\">\r\n <div>{{ line.unitPriceWithTax | localeCurrency : order.currencyCode }}</div>\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ line.unitPrice | localeCurrency : order.currencyCode }}\r\n </div>\r\n </div>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column id=\"quantity\" [heading]=\"'order.quantity' | translate\" [optional]=\"false\">\r\n <ng-template let-line=\"item\">\r\n <input\r\n type=\"number\"\r\n class=\"draft-qty mr-1\"\r\n min=\"0\"\r\n [value]=\"getInitialLineQuantity(line.id)\"\r\n (input)=\"updateLineQuantity(line, $event.target.value)\"\r\n />\r\n <button\r\n class=\"button-small\"\r\n *ngIf=\"isAddedLine(line)\"\r\n (click)=\"removeAddedItem(line.id)\"\r\n >\r\n <clr-icon shape=\"trash\"></clr-icon>\r\n </button>\r\n <vdr-line-refunds [line]=\"line\" [payments]=\"order.payments\"></vdr-line-refunds>\r\n <vdr-line-fulfillment\r\n [line]=\"line\"\r\n [allOrderFulfillments]=\"order.fulfillments\"\r\n [orderState]=\"order.state\"\r\n ></vdr-line-fulfillment>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column\r\n *ngFor=\"let customField of orderLineCustomFields\"\r\n [id]=\"customField.name\"\r\n [heading]=\"customField | customFieldLabel : (uiLanguage$ | async)\"\r\n [hiddenByDefault]=\"true\"\r\n >\r\n <ng-template let-line=\"item\" let-index=\"index\">\r\n <vdr-custom-field-control\r\n [compact]=\"true\"\r\n [entityName]=\"'OrderLine'\"\r\n [customField]=\"customField\"\r\n [customFieldsFormGroup]=\"orderLineCustomFieldsFormArray.at(index)\"\r\n />\r\n </ng-template>\r\n </vdr-dt2-column>\r\n </vdr-data-table-2>\r\n </vdr-card>\r\n <vdr-card [title]=\"'order.add-item-to-order' | translate\">\r\n <vdr-product-variant-selector class=\"mb-4\" (productSelected)=\"addItemSelectedVariant = $event\">\r\n </vdr-product-variant-selector>\r\n <div class=\"flex\">\r\n <div>\r\n <div *ngIf=\"addItemSelectedVariant\" class=\"flex mb-4\">\r\n <img\r\n *ngIf=\"addItemSelectedVariant.productAsset as asset\"\r\n [src]=\"asset | assetPreview : 'tiny'\"\r\n class=\"mr-4 add-item-thumb\"\r\n />\r\n <div>\r\n <strong class=\"mr-4\">{{ addItemSelectedVariant.productVariantName }}</strong>\r\n <small>{{ addItemSelectedVariant.sku }}</small>\r\n <div>\r\n {{\r\n getSelectedItemPrice(addItemSelectedVariant)\r\n | localeCurrency : order.currencyCode\r\n }}\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"form-grid\" *ngIf=\"addItemSelectedVariant\">\r\n <ng-container *ngFor=\"let customField of orderLineCustomFields\">\r\n <vdr-custom-field-control\r\n [readonly]=\"!addItemSelectedVariant\"\r\n [customField]=\"customField\"\r\n [customFieldsFormGroup]=\"addItemCustomFieldsForm\"\r\n entityName=\"OrderLine\"\r\n [compact]=\"true\"\r\n ></vdr-custom-field-control>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div class=\"flex-spacer\"></div>\r\n <div>\r\n <button\r\n *ngIf=\"addItemSelectedVariant\"\r\n class=\"btn btn-secondary\"\r\n [disabled]=\"!addItemSelectedVariant || addItemCustomFieldsForm.invalid\"\r\n (click)=\"addItemToOrder(addItemSelectedVariant)\"\r\n >\r\n {{ 'order.add-item-to-order' | translate }}\r\n </button>\r\n </div>\r\n </div>\r\n </vdr-card>\r\n <vdr-card [title]=\"'order.shipping' | translate\">\r\n <div *ngFor=\"let shippingLine of order.shippingLines\" class=\"flex items-center\">\r\n <ng-container *ngIf=\"getShippingLineDetails(shippingLine) as details\">\r\n <div>{{ details.name }}:</div>\r\n <div class=\"mx-1\">\r\n {{ details.price | localeCurrency : order.currencyCode }}\r\n </div>\r\n <button class=\"button-small\" (click)=\"setShippingMethod(shippingLine.id)\">\r\n {{ 'order.set-shipping-method' | translate }}\r\n </button>\r\n </ng-container>\r\n </div>\r\n </vdr-card>\r\n <vdr-card [title]=\"'order.add-surcharge' | translate\">\r\n <form [formGroup]=\"surchargeForm\" (submit)=\"addSurcharge(surchargeForm.value)\">\r\n <div class=\"form-grid\">\r\n <vdr-form-field [label]=\"'common.description' | translate\" for=\"description\"\r\n ><input id=\"description\" type=\"text\" formControlName=\"description\"\r\n /></vdr-form-field>\r\n <vdr-form-field [label]=\"'order.product-sku' | translate\" for=\"sku\"\r\n ><input id=\"sku\" type=\"text\" formControlName=\"sku\"\r\n /></vdr-form-field>\r\n <vdr-form-field [label]=\"'common.price' | translate\" for=\"price\">\r\n <vdr-currency-input\r\n [currencyCode]=\"order.currencyCode\"\r\n id=\"price\"\r\n formControlName=\"price\"\r\n ></vdr-currency-input>\r\n </vdr-form-field>\r\n <vdr-form-field\r\n [label]=\"\r\n 'catalog.price-includes-tax-at'\r\n | translate : { rate: surchargeForm.get('taxRate')?.value ?? 0 }\r\n \"\r\n for=\"priceIncludesTax\"\r\n ><input\r\n id=\"priceIncludesTax\"\r\n type=\"checkbox\"\r\n clrCheckbox\r\n formControlName=\"priceIncludesTax\"\r\n /></vdr-form-field>\r\n <vdr-form-field [label]=\"'order.tax-rate' | translate\" for=\"taxRate\">\r\n <vdr-affixed-input suffix=\"%\"\r\n ><input id=\"taxRate\" type=\"number\" min=\"0\" max=\"100\" formControlName=\"taxRate\"\r\n /></vdr-affixed-input>\r\n </vdr-form-field>\r\n <vdr-form-field [label]=\"'order.tax-description' | translate\" for=\"taxDescription\"\r\n ><input id=\"taxDescription\" type=\"text\" formControlName=\"taxDescription\"\r\n /></vdr-form-field>\r\n </div>\r\n <button\r\n class=\"btn btn-secondary mt-2\"\r\n [disabled]=\"\r\n surchargeForm.invalid ||\r\n surchargeForm.pristine ||\r\n surchargeForm.get('price')?.value === 0 ||\r\n !surchargeForm.get('description')?.value\r\n \"\r\n >\r\n {{ 'order.add-surcharge' | translate }}\r\n </button>\r\n </form>\r\n </vdr-card>\r\n </vdr-page-block>\r\n</vdr-page-detail-layout>\r\n", styles: [".order-table .is-cancelled td{text-decoration:line-through;background-color:var(--color-component-bg-200)}.order-table .sub-total td{border-top:1px dashed var(--color-component-border-200)}.order-table .total td{font-weight:700;border-top:1px dashed var(--color-component-border-200)}.order-table td.custom-fields-row{border-top-style:dashed;border-top-color:var(--color-grey-200)}.order-table img{border-radius:var(--border-radius-img)}.order-table .order-line-custom-fields{display:flex;flex-wrap:wrap}.order-table .order-line-custom-fields .custom-field{text-align:start;max-width:200px;overflow:hidden;text-overflow:ellipsis;margin-bottom:6px;margin-inline-end:18px}.order-table .draft-qty{max-width:48px}.order-table .order-line-custom-field{background-color:var(--color-component-bg-100)}.order-table .order-line-custom-field .custom-field-ellipsis{color:var(--color-text-300)}.order-table .net-price{font-size:11px;color:var(--color-text-300);line-height:14px}.order-table .promotions-label{text-decoration:underline dotted var(--color-text-200);font-size:11px;margin-top:6px;cursor:pointer;text-transform:lowercase}.order-table .thumb img{width:50px;height:50px}.order-table .shipping-method-name{font-size:var(--font-size-xs);margin-inline-end:2px}.order-table .order-placed-quantity{text-decoration:line-through;color:var(--color-text-300);margin-inline-end:2px}.order-table tr.modified td{background-color:var(--color-warning-100)}.order-table .order-line-custom-field{text-align:start}.add-item-thumb{max-width:50px}.no-modifications{color:var(--color-grey-400)}.summary-controls{border-top:1px solid var(--color-weight-200);margin-top:calc(var(--space-unit) * 2);padding-top:calc(var(--space-unit) * 1)}\n"] }]
|
|
3190
3177
|
}], ctorParameters: () => [{ type: i1.DataService }, { type: i1.NotificationService }, { type: i1.ModalService }, { type: OrderTransitionService }, { type: i0.ChangeDetectorRef }] });
|
|
@@ -3194,6 +3181,7 @@ class OrderListComponent extends TypedBaseListComponent {
|
|
|
3194
3181
|
super();
|
|
3195
3182
|
this.serverConfigService = serverConfigService;
|
|
3196
3183
|
this.channelService = channelService;
|
|
3184
|
+
this.dataTableListId = 'order-list';
|
|
3197
3185
|
this.orderStates = this.serverConfigService.getOrderProcessStates().map(item => item.name);
|
|
3198
3186
|
this.OrderType = OrderType;
|
|
3199
3187
|
this.customFields = this.getCustomFieldConfig('Order');
|
|
@@ -3325,19 +3313,19 @@ class OrderListComponent extends TypedBaseListComponent {
|
|
|
3325
3313
|
return '';
|
|
3326
3314
|
}
|
|
3327
3315
|
}
|
|
3328
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
3329
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.
|
|
3316
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: OrderListComponent, deps: [{ token: i1.ServerConfigService }, { token: i1.ChannelService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3317
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: OrderListComponent, selector: "vdr-order-list", usesInheritance: true, ngImport: i0, template: "<vdr-page-block>\r\n <vdr-action-bar>\r\n <vdr-ab-right>\r\n <vdr-action-bar-items locationId=\"order-list\" />\r\n <ng-container *ngIf=\"canCreateDraftOrder\">\r\n <a class=\"btn\" *vdrIfPermissions=\"['CreateOrder']\" [routerLink]=\"['./draft/create']\">\r\n <clr-icon shape=\"plus\"></clr-icon>\r\n {{ 'catalog.create-draft-order' | translate }}\r\n </a>\r\n </ng-container>\r\n <vdr-action-bar-dropdown-menu locationId=\"order-list\" />\r\n </vdr-ab-right>\r\n </vdr-action-bar>\r\n</vdr-page-block>\r\n<vdr-data-table-2\r\n class=\"mt-2\"\r\n [id]=\"dataTableListId\"\r\n [items]=\"items$ | async\"\r\n [itemsPerPage]=\"itemsPerPage$ | async\"\r\n [totalItems]=\"totalItems$ | async\"\r\n [currentPage]=\"currentPage$ | async\"\r\n [filters]=\"filters\"\r\n (pageChange)=\"setPageNumber($event)\"\r\n (itemsPerPageChange)=\"setItemsPerPage($event)\"\r\n (visibleColumnsChange)=\"setVisibleColumns($event)\"\r\n>\r\n <vdr-bulk-action-menu\r\n locationId=\"order-list\"\r\n [hostComponent]=\"this\"\r\n [selectionManager]=\"selectionManager\"\r\n ></vdr-bulk-action-menu>\r\n <vdr-dt2-search\r\n [searchTermControl]=\"searchTermControl\"\r\n [searchTermPlaceholder]=\"'order.search-by-order-filters' | translate\"\r\n />\r\n <vdr-dt2-column [heading]=\"'common.id' | translate\" id=\"id\" [hiddenByDefault]=\"true\" [sort]=\"sorts.get('id')\">\r\n <ng-template let-order=\"item\">\r\n {{ order.id }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'common.created-at' | translate\" id=\"created-at\" [hiddenByDefault]=\"true\">\r\n <ng-template let-order=\"item\">\r\n {{ order.createdAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'common.code' | translate\" id=\"code\" [optional]=\"false\">\r\n <ng-template let-order=\"item\">\r\n <a class=\"button-ghost\" [routerLink]=\"order.state === 'Draft' ? ['./draft', order.id] : ['./', order.id]\"\r\n ><span>{{ order.code }}</span>\r\n <clr-icon shape=\"arrow right\"></clr-icon>\r\n </a>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'order.customer' | translate\" id=\"customer\" [sort]=\"sorts.get('customerLastName')\">\r\n <ng-template let-order=\"item\">\r\n <vdr-customer-label\r\n [customer]=\"order.customer\"\r\n (click)=\"$event.stopPropagation()\"\r\n ></vdr-customer-label>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'order.order-type' | translate\" id=\"order-type\" [hiddenByDefault]=\"true\">\r\n <ng-template let-order=\"item\">\r\n <vdr-chip *ngIf=\"order.type === OrderType.Regular\">{{ 'order.order-type-regular' | translate }}</vdr-chip>\r\n <vdr-chip *ngIf=\"order.type === OrderType.Aggregate\">{{ 'order.order-type-aggregate' | translate }}</vdr-chip>\r\n <vdr-chip *ngIf=\"order.type === OrderType.Seller\">{{ 'order.order-type-seller' | translate }}</vdr-chip>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'order.state' | translate\" id=\"state\" [sort]=\"sorts.get('state')\">\r\n <ng-template let-order=\"item\">\r\n <vdr-order-state-label [state]=\"order.state\"></vdr-order-state-label>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'order.total' | translate\" id=\"total\" [sort]=\"sorts.get('totalWithTax')\">\r\n <ng-template let-order=\"item\">\r\n {{ order.totalWithTax | localeCurrency : order.currencyCode }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'common.updated-at' | translate\" id=\"updated-at\">\r\n <ng-template let-order=\"item\">\r\n {{ order.updatedAt | timeAgo }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'order.placed-at' | translate\" id=\"placed-at\" [sort]=\"sorts.get('orderPlacedAt')\">\r\n <ng-template let-order=\"item\">\r\n {{ order.orderPlacedAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'order.shipping' | translate\" id=\"shipping\">\r\n <ng-template let-order=\"item\">\r\n {{ getShippingNames(order) }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-custom-field-column\r\n *ngFor=\"let customField of customFields\"\r\n [customField]=\"customField\"\r\n [sorts]=\"sorts\"\r\n />\r\n</vdr-data-table-2>\r\n", styles: [".search-form{display:flex;flex-direction:column;align-items:baseline;width:100%;max-width:100vw;margin-bottom:6px}.filter-presets{max-width:90vw;overflow-x:auto}.search-input{margin-top:6px;min-width:300px}.custom-filters{overflow:hidden;max-height:0;padding-bottom:6px}.custom-filters.expanded{max-height:initial}.custom-filters>form{display:flex;flex-direction:column;align-items:center}.custom-filters>form>div{width:100%}ng-select{flex:1;min-width:200px;height:36px}ng-select ::ng-deep .ng-select-container{height:36px}\n"], dependencies: [{ kind: "directive", type: i3.ClrIconCustomTag, selector: "clr-icon" }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i1.ActionBarComponent, selector: "vdr-action-bar" }, { kind: "component", type: i1.ActionBarRightComponent, selector: "vdr-ab-right", inputs: ["grow"] }, { kind: "component", type: i1.ActionBarDropdownMenuComponent, selector: "vdr-action-bar-dropdown-menu", inputs: ["alwaysShow"] }, { kind: "component", type: i1.ChipComponent, selector: "vdr-chip", inputs: ["icon", "invert", "colorFrom", "colorType"], outputs: ["iconClick"] }, { kind: "component", type: i1.CustomerLabelComponent, selector: "vdr-customer-label", inputs: ["customer"] }, { kind: "component", type: i1.OrderStateLabelComponent, selector: "vdr-order-state-label", inputs: ["state"] }, { kind: "directive", type: i1.IfPermissionsDirective, selector: "[vdrIfPermissions]", inputs: ["vdrIfPermissions", "vdrIfPermissionsElse"] }, { kind: "component", type: i1.ActionBarItemsComponent, selector: "vdr-action-bar-items" }, { kind: "component", type: i1.BulkActionMenuComponent, selector: "vdr-bulk-action-menu", inputs: ["locationId", "selectionManager", "hostComponent"] }, { kind: "component", type: i1.DataTable2Component, selector: "vdr-data-table-2", inputs: ["id", "items", "itemsPerPage", "currentPage", "totalItems", "emptyStateLabel", "filters", "activeIndex"], outputs: ["pageChange", "itemsPerPageChange", "visibleColumnsChange"] }, { kind: "component", type: i1.DataTable2ColumnComponent, selector: "vdr-dt2-column", inputs: ["id", "expand", "heading", "align", "sort", "optional", "hiddenByDefault", "orderable"], exportAs: ["row"] }, { kind: "component", type: i1.DataTable2SearchComponent, selector: "vdr-dt2-search", inputs: ["searchTermControl", "searchTermPlaceholder"] }, { kind: "component", type: i1.DataTableCustomFieldColumnComponent, selector: "vdr-dt2-custom-field-column", inputs: ["customField", "sorts"], exportAs: ["row"] }, { kind: "component", type: i1.PageBlockComponent, selector: "vdr-page-block" }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.TimeAgoPipe, name: "timeAgo" }, { kind: "pipe", type: i1.LocaleDatePipe, name: "localeDate" }, { kind: "pipe", type: i1.LocaleCurrencyPipe, name: "localeCurrency" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3330
3318
|
}
|
|
3331
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
3319
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: OrderListComponent, decorators: [{
|
|
3332
3320
|
type: Component,
|
|
3333
|
-
args: [{ selector: 'vdr-order-list', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vdr-page-block>\r\n <vdr-action-bar>\r\n <vdr-ab-right>\r\n <vdr-action-bar-items locationId=\"order-list\" />\r\n <ng-container *ngIf=\"canCreateDraftOrder\">\r\n <a class=\"btn\" *vdrIfPermissions=\"['CreateOrder']\" [routerLink]=\"['./draft/create']\">\r\n <clr-icon shape=\"plus\"></clr-icon>\r\n {{ 'catalog.create-draft-order' | translate }}\r\n </a>\r\n </ng-container>\r\n <vdr-action-bar-dropdown-menu locationId=\"order-list\" />\r\n </vdr-ab-right>\r\n </vdr-action-bar>\r\n</vdr-page-block>\r\n<vdr-data-table-2\r\n class=\"mt-2\"\r\n id=\"
|
|
3321
|
+
args: [{ selector: 'vdr-order-list', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vdr-page-block>\r\n <vdr-action-bar>\r\n <vdr-ab-right>\r\n <vdr-action-bar-items locationId=\"order-list\" />\r\n <ng-container *ngIf=\"canCreateDraftOrder\">\r\n <a class=\"btn\" *vdrIfPermissions=\"['CreateOrder']\" [routerLink]=\"['./draft/create']\">\r\n <clr-icon shape=\"plus\"></clr-icon>\r\n {{ 'catalog.create-draft-order' | translate }}\r\n </a>\r\n </ng-container>\r\n <vdr-action-bar-dropdown-menu locationId=\"order-list\" />\r\n </vdr-ab-right>\r\n </vdr-action-bar>\r\n</vdr-page-block>\r\n<vdr-data-table-2\r\n class=\"mt-2\"\r\n [id]=\"dataTableListId\"\r\n [items]=\"items$ | async\"\r\n [itemsPerPage]=\"itemsPerPage$ | async\"\r\n [totalItems]=\"totalItems$ | async\"\r\n [currentPage]=\"currentPage$ | async\"\r\n [filters]=\"filters\"\r\n (pageChange)=\"setPageNumber($event)\"\r\n (itemsPerPageChange)=\"setItemsPerPage($event)\"\r\n (visibleColumnsChange)=\"setVisibleColumns($event)\"\r\n>\r\n <vdr-bulk-action-menu\r\n locationId=\"order-list\"\r\n [hostComponent]=\"this\"\r\n [selectionManager]=\"selectionManager\"\r\n ></vdr-bulk-action-menu>\r\n <vdr-dt2-search\r\n [searchTermControl]=\"searchTermControl\"\r\n [searchTermPlaceholder]=\"'order.search-by-order-filters' | translate\"\r\n />\r\n <vdr-dt2-column [heading]=\"'common.id' | translate\" id=\"id\" [hiddenByDefault]=\"true\" [sort]=\"sorts.get('id')\">\r\n <ng-template let-order=\"item\">\r\n {{ order.id }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'common.created-at' | translate\" id=\"created-at\" [hiddenByDefault]=\"true\">\r\n <ng-template let-order=\"item\">\r\n {{ order.createdAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'common.code' | translate\" id=\"code\" [optional]=\"false\">\r\n <ng-template let-order=\"item\">\r\n <a class=\"button-ghost\" [routerLink]=\"order.state === 'Draft' ? ['./draft', order.id] : ['./', order.id]\"\r\n ><span>{{ order.code }}</span>\r\n <clr-icon shape=\"arrow right\"></clr-icon>\r\n </a>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'order.customer' | translate\" id=\"customer\" [sort]=\"sorts.get('customerLastName')\">\r\n <ng-template let-order=\"item\">\r\n <vdr-customer-label\r\n [customer]=\"order.customer\"\r\n (click)=\"$event.stopPropagation()\"\r\n ></vdr-customer-label>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'order.order-type' | translate\" id=\"order-type\" [hiddenByDefault]=\"true\">\r\n <ng-template let-order=\"item\">\r\n <vdr-chip *ngIf=\"order.type === OrderType.Regular\">{{ 'order.order-type-regular' | translate }}</vdr-chip>\r\n <vdr-chip *ngIf=\"order.type === OrderType.Aggregate\">{{ 'order.order-type-aggregate' | translate }}</vdr-chip>\r\n <vdr-chip *ngIf=\"order.type === OrderType.Seller\">{{ 'order.order-type-seller' | translate }}</vdr-chip>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'order.state' | translate\" id=\"state\" [sort]=\"sorts.get('state')\">\r\n <ng-template let-order=\"item\">\r\n <vdr-order-state-label [state]=\"order.state\"></vdr-order-state-label>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'order.total' | translate\" id=\"total\" [sort]=\"sorts.get('totalWithTax')\">\r\n <ng-template let-order=\"item\">\r\n {{ order.totalWithTax | localeCurrency : order.currencyCode }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'common.updated-at' | translate\" id=\"updated-at\">\r\n <ng-template let-order=\"item\">\r\n {{ order.updatedAt | timeAgo }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'order.placed-at' | translate\" id=\"placed-at\" [sort]=\"sorts.get('orderPlacedAt')\">\r\n <ng-template let-order=\"item\">\r\n {{ order.orderPlacedAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'order.shipping' | translate\" id=\"shipping\">\r\n <ng-template let-order=\"item\">\r\n {{ getShippingNames(order) }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-custom-field-column\r\n *ngFor=\"let customField of customFields\"\r\n [customField]=\"customField\"\r\n [sorts]=\"sorts\"\r\n />\r\n</vdr-data-table-2>\r\n", styles: [".search-form{display:flex;flex-direction:column;align-items:baseline;width:100%;max-width:100vw;margin-bottom:6px}.filter-presets{max-width:90vw;overflow-x:auto}.search-input{margin-top:6px;min-width:300px}.custom-filters{overflow:hidden;max-height:0;padding-bottom:6px}.custom-filters.expanded{max-height:initial}.custom-filters>form{display:flex;flex-direction:column;align-items:center}.custom-filters>form>div{width:100%}ng-select{flex:1;min-width:200px;height:36px}ng-select ::ng-deep .ng-select-container{height:36px}\n"] }]
|
|
3334
3322
|
}], ctorParameters: () => [{ type: i1.ServerConfigService }, { type: i1.ChannelService }] });
|
|
3335
3323
|
|
|
3336
3324
|
class RefundDetailComponent {
|
|
3337
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
3338
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.
|
|
3325
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: RefundDetailComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3326
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: RefundDetailComponent, selector: "vdr-refund-detail", inputs: { refund: "refund", currencyCode: "currencyCode" }, ngImport: i0, template: "<vdr-labeled-data [label]=\"'order.amount' | translate\">\r\n {{ refund.total | localeCurrency: currencyCode }}\r\n</vdr-labeled-data>\r\n<vdr-labeled-data *ngIf=\"refund.transactionId\" [label]=\"'order.transaction-id' | translate\">\r\n {{ refund.transactionId }}\r\n</vdr-labeled-data>\r\n<vdr-labeled-data [label]=\"'order.payment-metadata' | translate\">\r\n <vdr-object-tree [value]=\"refund.metadata\"></vdr-object-tree>\r\n</vdr-labeled-data>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1.LabeledDataComponent, selector: "vdr-labeled-data", inputs: ["label"] }, { kind: "component", type: i1.ObjectTreeComponent, selector: "vdr-object-tree", inputs: ["value", "isArrayItem"] }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.LocaleCurrencyPipe, name: "localeCurrency" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3339
3327
|
}
|
|
3340
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
3328
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: RefundDetailComponent, decorators: [{
|
|
3341
3329
|
type: Component,
|
|
3342
3330
|
args: [{ selector: 'vdr-refund-detail', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vdr-labeled-data [label]=\"'order.amount' | translate\">\r\n {{ refund.total | localeCurrency: currencyCode }}\r\n</vdr-labeled-data>\r\n<vdr-labeled-data *ngIf=\"refund.transactionId\" [label]=\"'order.transaction-id' | translate\">\r\n {{ refund.transactionId }}\r\n</vdr-labeled-data>\r\n<vdr-labeled-data [label]=\"'order.payment-metadata' | translate\">\r\n <vdr-object-tree [value]=\"refund.metadata\"></vdr-object-tree>\r\n</vdr-labeled-data>\r\n" }]
|
|
3343
3331
|
}], propDecorators: { refund: [{
|
|
@@ -3399,10 +3387,10 @@ class OrderGuard {
|
|
|
3399
3387
|
})));
|
|
3400
3388
|
}
|
|
3401
3389
|
}
|
|
3402
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
3403
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.
|
|
3390
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: OrderGuard, deps: [{ token: i1.DataService }, { token: i1$1.Router }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3391
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: OrderGuard, providedIn: 'root' }); }
|
|
3404
3392
|
}
|
|
3405
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
3393
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: OrderGuard, decorators: [{
|
|
3406
3394
|
type: Injectable,
|
|
3407
3395
|
args: [{
|
|
3408
3396
|
providedIn: 'root',
|
|
@@ -3547,8 +3535,8 @@ class OrderModule {
|
|
|
3547
3535
|
});
|
|
3548
3536
|
OrderModule.hasRegisteredTabsAndBulkActions = true;
|
|
3549
3537
|
}
|
|
3550
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
3551
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.
|
|
3538
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: OrderModule, deps: [{ token: i1.PageService }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
3539
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: OrderModule, declarations: [OrderListComponent,
|
|
3552
3540
|
OrderDetailComponent,
|
|
3553
3541
|
FulfillOrderDialogComponent,
|
|
3554
3542
|
LineFulfillmentComponent,
|
|
@@ -3589,7 +3577,7 @@ class OrderModule {
|
|
|
3589
3577
|
PaymentForRefundSelectorComponent,
|
|
3590
3578
|
OrderModificationSummaryComponent,
|
|
3591
3579
|
RefundDetailComponent], imports: [SharedModule, i1$1.RouterModule], exports: [OrderCustomFieldsCardComponent] }); }
|
|
3592
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.
|
|
3580
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: OrderModule, providers: [
|
|
3593
3581
|
{
|
|
3594
3582
|
provide: ROUTES,
|
|
3595
3583
|
useFactory: (pageService) => createRoutes(pageService),
|
|
@@ -3598,7 +3586,7 @@ class OrderModule {
|
|
|
3598
3586
|
},
|
|
3599
3587
|
], imports: [SharedModule, RouterModule.forChild([])] }); }
|
|
3600
3588
|
}
|
|
3601
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
3589
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: OrderModule, decorators: [{
|
|
3602
3590
|
type: NgModule,
|
|
3603
3591
|
args: [{
|
|
3604
3592
|
imports: [SharedModule, RouterModule.forChild([])],
|