@vendure/admin-ui 2.2.0-next.1 → 2.2.0-next.2
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/core/common/base-list.component.d.ts +1 -1
- package/core/common/component-registry-types.d.ts +1 -1
- package/core/common/generated-types.d.ts +172 -4817
- package/core/common/version.d.ts +1 -1
- package/core/data/server-config.d.ts +4 -3
- package/core/data/utils/add-custom-fields.d.ts +2 -2
- package/core/shared/components/custom-field-control/custom-field-control.component.d.ts +0 -2
- package/core/shared/components/form-field/form-field-control.directive.d.ts +1 -1
- package/core/shared/components/form-field/form-field.component.d.ts +3 -2
- package/core/shared/components/page-title/page-title.component.d.ts +2 -3
- package/esm2022/catalog/components/assign-products-to-channel-dialog/assign-products-to-channel-dialog.component.mjs +1 -1
- package/esm2022/catalog/components/collection-data-table/collection-data-table.component.mjs +1 -1
- package/esm2022/catalog/components/collection-detail/collection-detail.component.mjs +1 -1
- package/esm2022/catalog/components/collection-list/collection-list.component.mjs +3 -3
- package/esm2022/catalog/components/collection-tree/collection-tree-node.component.mjs +2 -2
- package/esm2022/catalog/components/create-facet-value-dialog/create-facet-value-dialog.component.mjs +1 -1
- package/esm2022/catalog/components/create-product-option-group-dialog/create-product-option-group-dialog.component.mjs +1 -1
- package/esm2022/catalog/components/create-product-variant-dialog/create-product-variant-dialog.component.mjs +1 -1
- package/esm2022/catalog/components/facet-detail/facet-detail.component.mjs +1 -1
- package/esm2022/catalog/components/generate-product-variants/generate-product-variants.component.mjs +1 -1
- package/esm2022/catalog/components/option-value-input/option-value-input.component.mjs +1 -1
- package/esm2022/catalog/components/product-detail/product-detail.component.mjs +1 -1
- package/esm2022/catalog/components/product-options-editor/product-options-editor.component.mjs +1 -1
- package/esm2022/catalog/components/product-variant-detail/product-variant-detail.component.mjs +1 -1
- package/esm2022/catalog/components/product-variants-editor/product-variants-editor.component.mjs +1 -1
- package/esm2022/catalog/components/product-variants-table/product-variants-table.component.mjs +1 -1
- package/esm2022/catalog/components/update-product-option-dialog/update-product-option-dialog.component.mjs +1 -1
- package/esm2022/core/common/base-list.component.mjs +1 -1
- package/esm2022/core/common/component-registry-types.mjs +1 -1
- package/esm2022/core/common/generated-types.mjs +23 -19
- package/esm2022/core/common/introspection-result.mjs +4 -1
- package/esm2022/core/common/version.mjs +2 -2
- package/esm2022/core/components/channel-switcher/channel-switcher.component.mjs +1 -1
- package/esm2022/core/components/ui-language-switcher-dialog/ui-language-switcher-dialog.component.mjs +1 -1
- package/esm2022/core/core.module.mjs +2 -2
- package/esm2022/core/data/definitions/order-definitions.mjs +5 -1
- package/esm2022/core/data/definitions/settings-definitions.mjs +4 -81
- package/esm2022/core/data/providers/base-data.service.mjs +2 -2
- package/esm2022/core/data/server-config.mjs +6 -2
- package/esm2022/core/data/utils/add-custom-fields.mjs +2 -2
- package/esm2022/core/shared/components/address-form/address-form.component.mjs +1 -1
- package/esm2022/core/shared/components/affixed-input/percentage-suffix-input.component.mjs +1 -1
- package/esm2022/core/shared/components/asset-file-input/asset-file-input.component.mjs +1 -1
- package/esm2022/core/shared/components/asset-preview/asset-preview.component.mjs +1 -1
- package/esm2022/core/shared/components/assign-to-channel-dialog/assign-to-channel-dialog.component.mjs +1 -1
- package/esm2022/core/shared/components/currency-input/currency-input.component.mjs +2 -2
- package/esm2022/core/shared/components/custom-field-control/custom-field-control.component.mjs +3 -6
- package/esm2022/core/shared/components/data-table/data-table.component.mjs +1 -1
- package/esm2022/core/shared/components/data-table-2/data-table-custom-field-column.component.mjs +4 -1
- package/esm2022/core/shared/components/data-table-2/data-table-search.component.mjs +1 -1
- package/esm2022/core/shared/components/data-table-2/data-table2.component.mjs +1 -1
- package/esm2022/core/shared/components/data-table-column-picker/data-table-column-picker.component.mjs +1 -1
- package/esm2022/core/shared/components/data-table-filter-presets/add-filter-preset-button.component.mjs +1 -1
- package/esm2022/core/shared/components/data-table-filter-presets/rename-filter-preset-dialog.component.mjs +1 -1
- package/esm2022/core/shared/components/data-table-filters/data-table-filters.component.mjs +1 -1
- package/esm2022/core/shared/components/datetime-picker/datetime-picker.component.mjs +1 -1
- package/esm2022/core/shared/components/edit-note-dialog/edit-note-dialog.component.mjs +1 -1
- package/esm2022/core/shared/components/form-field/form-field-control.directive.mjs +3 -3
- package/esm2022/core/shared/components/form-field/form-field.component.mjs +8 -4
- package/esm2022/core/shared/components/manage-tags-dialog/manage-tags-dialog.component.mjs +1 -1
- package/esm2022/core/shared/components/page-title/page-title.component.mjs +5 -6
- package/esm2022/core/shared/components/radio-card/radio-card.component.mjs +1 -1
- package/esm2022/core/shared/components/rich-text-editor/external-image-dialog/external-image-dialog.component.mjs +1 -1
- package/esm2022/core/shared/components/rich-text-editor/link-dialog/link-dialog.component.mjs +1 -1
- package/esm2022/core/shared/components/timeline-entry/timeline-entry.component.mjs +2 -2
- package/esm2022/core/shared/dynamic-form-inputs/boolean-form-input/boolean-form-input.component.mjs +1 -1
- package/esm2022/core/shared/dynamic-form-inputs/currency-form-input/currency-form-input.component.mjs +4 -3
- package/esm2022/core/shared/dynamic-form-inputs/number-form-input/number-form-input.component.mjs +1 -1
- package/esm2022/core/shared/dynamic-form-inputs/password-form-input/password-form-input.component.mjs +1 -1
- package/esm2022/core/shared/dynamic-form-inputs/relation-form-input/generic/relation-generic-input.component.mjs +1 -1
- package/esm2022/core/shared/dynamic-form-inputs/select-form-input/select-form-input.component.mjs +1 -1
- package/esm2022/core/shared/dynamic-form-inputs/text-form-input/text-form-input.component.mjs +1 -1
- package/esm2022/core/shared/dynamic-form-inputs/textarea-form-input/textarea-form-input.component.mjs +1 -1
- package/esm2022/customer/components/customer-detail/customer-detail.component.mjs +1 -1
- package/esm2022/customer/components/customer-group-detail/customer-group-detail.component.mjs +1 -1
- package/esm2022/customer/components/customer-group-detail-dialog/customer-group-detail-dialog.component.mjs +1 -1
- package/esm2022/customer/components/customer-history/customer-history.component.mjs +3 -3
- package/esm2022/login/components/login/login.component.mjs +1 -1
- package/esm2022/marketing/components/promotion-detail/promotion-detail.component.mjs +1 -1
- package/esm2022/order/common/get-refundable-payments.mjs +19 -0
- package/esm2022/order/common/modify-order-types.mjs +2 -0
- package/esm2022/order/components/add-manual-payment-dialog/add-manual-payment-dialog.component.mjs +1 -1
- package/esm2022/order/components/cancel-order-dialog/cancel-order-dialog.component.mjs +1 -1
- package/esm2022/order/components/coupon-code-selector/coupon-code-selector.component.mjs +3 -3
- package/esm2022/order/components/draft-order-variant-selector/draft-order-variant-selector.component.mjs +1 -1
- package/esm2022/order/components/fulfill-order-dialog/fulfill-order-dialog.component.mjs +1 -1
- package/esm2022/order/components/modification-detail/modification-detail.component.mjs +17 -6
- package/esm2022/order/components/order-data-table/order-data-table.component.mjs +1 -1
- package/esm2022/order/components/order-detail/order-detail.component.mjs +77 -29
- package/esm2022/order/components/order-editor/order-editor.component.mjs +201 -98
- package/esm2022/order/components/order-edits-preview-dialog/order-edits-preview-dialog.component.mjs +45 -7
- package/esm2022/order/components/order-history/order-history.component.mjs +22 -6
- package/esm2022/order/components/order-modification-summary/order-modification-summary.component.mjs +76 -0
- package/esm2022/order/components/order-payment-card/order-payment-card.component.mjs +3 -3
- package/esm2022/order/components/order-state-select-dialog/order-state-select-dialog.component.mjs +1 -1
- package/esm2022/order/components/order-table/order-table.component.mjs +3 -3
- package/esm2022/order/components/payment-for-refund-selector/payment-for-refund-selector.component.mjs +24 -0
- package/esm2022/order/components/payment-state-label/payment-state-label.component.mjs +2 -2
- package/esm2022/order/components/refund-detail/refund-detail.component.mjs +18 -0
- package/esm2022/order/components/refund-order-dialog/refund-order-dialog.component.mjs +99 -57
- package/esm2022/order/components/refund-state-label/refund-state-label.component.mjs +2 -2
- package/esm2022/order/components/select-customer-dialog/select-customer-dialog.component.mjs +14 -8
- package/esm2022/order/components/settle-refund-dialog/settle-refund-dialog.component.mjs +1 -1
- package/esm2022/order/components/simple-item-list/simple-item-list.component.mjs +3 -3
- package/esm2022/order/order.module.mjs +32 -2
- package/esm2022/order/order.routes.mjs +7 -53
- package/esm2022/order/providers/routing/order.guard.mjs +22 -2
- package/esm2022/order/public_api.mjs +6 -2
- package/esm2022/react/components/react-custom-column.component.mjs +3 -3
- package/esm2022/react/components/react-custom-detail.component.mjs +3 -3
- package/esm2022/react/components/react-form-input.component.mjs +3 -3
- package/esm2022/react/components/react-route.component.mjs +3 -3
- package/esm2022/react/react-hooks/use-form-control.mjs +1 -1
- package/esm2022/settings/components/admin-detail/admin-detail.component.mjs +1 -1
- package/esm2022/settings/components/channel-detail/channel-detail.component.mjs +1 -1
- package/esm2022/settings/components/country-detail/country-detail.component.mjs +1 -1
- package/esm2022/settings/components/global-settings/global-settings.component.mjs +1 -1
- package/esm2022/settings/components/payment-method-detail/payment-method-detail.component.mjs +1 -1
- package/esm2022/settings/components/profile/profile.component.mjs +1 -1
- package/esm2022/settings/components/role-detail/role-detail.component.mjs +1 -1
- package/esm2022/settings/components/seller-detail/seller-detail.component.mjs +1 -1
- package/esm2022/settings/components/shipping-method-detail/shipping-method-detail.component.mjs +1 -1
- package/esm2022/settings/components/stock-location-detail/stock-location-detail.component.mjs +1 -1
- package/esm2022/settings/components/tax-category-detail/tax-category-detail.component.mjs +1 -1
- package/esm2022/settings/components/tax-rate-detail/tax-rate-detail.component.mjs +1 -1
- package/esm2022/settings/components/test-address-form/test-address-form.component.mjs +1 -1
- package/esm2022/settings/components/test-order-builder/test-order-builder.component.mjs +1 -1
- package/esm2022/settings/components/zone-detail/zone-detail.component.mjs +1 -1
- package/esm2022/system/components/job-list/job-list.component.mjs +1 -1
- package/fesm2022/vendure-admin-ui-catalog.mjs +18 -18
- package/fesm2022/vendure-admin-ui-catalog.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-core.mjs +89 -149
- package/fesm2022/vendure-admin-ui-core.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-customer.mjs +5 -5
- package/fesm2022/vendure-admin-ui-customer.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-login.mjs +1 -1
- package/fesm2022/vendure-admin-ui-login.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-marketing.mjs +1 -1
- package/fesm2022/vendure-admin-ui-marketing.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-order.mjs +660 -323
- package/fesm2022/vendure-admin-ui-order.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-react.mjs +8 -8
- package/fesm2022/vendure-admin-ui-react.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-settings.mjs +15 -15
- package/fesm2022/vendure-admin-ui-settings.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-system.mjs +1 -1
- package/fesm2022/vendure-admin-ui-system.mjs.map +1 -1
- package/order/common/get-refundable-payments.d.ts +9 -0
- package/order/common/modify-order-types.d.ts +29 -0
- package/order/components/modification-detail/modification-detail.component.d.ts +4 -0
- package/order/components/order-detail/order-detail.component.d.ts +2 -0
- package/order/components/order-editor/order-editor.component.d.ts +57 -33
- package/order/components/order-edits-preview-dialog/order-edits-preview-dialog.component.d.ts +17 -6
- package/order/components/order-history/order-history.component.d.ts +6 -2
- package/order/components/order-modification-summary/order-modification-summary.component.d.ts +19 -0
- package/order/components/payment-for-refund-selector/payment-for-refund-selector.component.d.ts +14 -0
- package/order/components/refund-detail/refund-detail.component.d.ts +8 -0
- package/order/components/refund-order-dialog/refund-order-dialog.component.d.ts +13 -11
- package/order/components/select-customer-dialog/select-customer-dialog.component.d.ts +9 -2
- package/order/components/simple-item-list/simple-item-list.component.d.ts +1 -1
- package/order/order.module.d.ts +6 -3
- package/order/order.routes.d.ts +0 -2
- package/order/providers/routing/order.guard.d.ts +1 -0
- package/order/public_api.d.ts +5 -1
- package/package.json +24 -24
- package/static/i18n-messages/ar.json +14 -5
- package/static/i18n-messages/cs.json +14 -5
- package/static/i18n-messages/de.json +14 -5
- package/static/i18n-messages/en.json +14 -5
- package/static/i18n-messages/es.json +14 -5
- package/static/i18n-messages/fa.json +14 -5
- package/static/i18n-messages/fr.json +14 -5
- package/static/i18n-messages/he.json +14 -5
- package/static/i18n-messages/hr.json +14 -5
- package/static/i18n-messages/it.json +14 -5
- package/static/i18n-messages/nb.json +15 -7
- package/static/i18n-messages/ne.json +14 -5
- package/static/i18n-messages/pl.json +14 -5
- package/static/i18n-messages/pt_BR.json +15 -7
- package/static/i18n-messages/pt_PT.json +14 -5
- package/static/i18n-messages/ru.json +14 -5
- package/static/i18n-messages/uk.json +179 -170
- package/static/i18n-messages/zh_Hans.json +14 -5
- package/static/i18n-messages/zh_Hant.json +14 -5
- package/static/styles/global/_utilities.scss +4 -0
- package/static/styles/theme/dark.scss +4 -2
- package/static/styles/theme/default.scss +1 -2
- package/static/theme.min.css +1 -1
- package/esm2022/order/providers/routing/order-resolver.mjs +0 -48
- package/order/providers/routing/order-resolver.d.ts +0 -16
|
@@ -260,7 +260,7 @@ export class PromotionDetailComponent extends TypedBaseDetailComponent {
|
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
262
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: PromotionDetailComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.DataService }, { token: i2.FormBuilder }, { token: i1.NotificationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
263
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", type: PromotionDetailComponent, selector: "vdr-promotion-detail", usesInheritance: true, ngImport: i0, template: "<vdr-page-block>\r\n <vdr-action-bar>\r\n <vdr-ab-left>\r\n <div class=\"flex clr-align-items-center\">\r\n <vdr-language-selector\r\n [disabled]=\"isNew$ | async\"\r\n [availableLanguageCodes]=\"availableLanguages$ | async\"\r\n [currentLanguageCode]=\"languageCode$ | async\"\r\n (languageCodeChange)=\"setLanguage($event)\"\r\n ></vdr-language-selector>\r\n </div>\r\n </vdr-ab-left>\r\n\r\n <vdr-ab-right>\r\n <vdr-action-bar-items locationId=\"promotion-detail\"></vdr-action-bar-items>\r\n <button\r\n class=\"btn btn-primary\"\r\n *ngIf=\"isNew$ | async; else updateButton\"\r\n (click)=\"create()\"\r\n [disabled]=\"!saveButtonEnabled()\"\r\n >\r\n {{ 'common.create' | translate }}\r\n </button>\r\n <ng-template #updateButton>\r\n <button\r\n class=\"btn btn-primary\"\r\n (click)=\"save()\"\r\n *vdrIfPermissions=\"'UpdatePromotion'\"\r\n [disabled]=\"!saveButtonEnabled()\"\r\n >\r\n {{ 'common.update' | translate }}\r\n </button>\r\n </ng-template>\r\n </vdr-ab-right>\r\n </vdr-action-bar>\r\n</vdr-page-block>\r\n\r\n<form class=\"form\" [formGroup]=\"detailForm\">\r\n <vdr-page-detail-layout>\r\n <vdr-page-detail-sidebar>\r\n <vdr-card *vdrIfPermissions=\"'UpdatePromotion'\">\r\n <clr-toggle-wrapper>\r\n <input type=\"checkbox\" clrToggle name=\"enabled\" formControlName=\"enabled\" />\r\n <label>{{ 'common.enabled' | translate }}</label>\r\n </clr-toggle-wrapper>\r\n </vdr-card>\r\n <vdr-card *ngIf=\"entity$ | async as entity\">\r\n <vdr-page-entity-info [entity]=\"entity\" />\r\n </vdr-card>\r\n </vdr-page-detail-sidebar>\r\n <vdr-page-block>\r\n <vdr-card>\r\n <div class=\"form-grid\">\r\n <vdr-form-field [label]=\"'common.name' | translate\" for=\"name\">\r\n <input\r\n id=\"name\"\r\n [readonly]=\"!('UpdatePromotion' | hasPermission)\"\r\n type=\"text\"\r\n formControlName=\"name\"\r\n />\r\n </vdr-form-field>\r\n <vdr-rich-text-editor\r\n class=\"form-grid-span\"\r\n formControlName=\"description\"\r\n [readonly]=\"!('UpdatePromotion' | hasPermission)\"\r\n [label]=\"'common.description' | translate\"\r\n ></vdr-rich-text-editor>\r\n <vdr-form-field [label]=\"'marketing.starts-at' | translate\" for=\"startsAt\">\r\n <vdr-datetime-picker formControlName=\"startsAt\"></vdr-datetime-picker>\r\n </vdr-form-field>\r\n <vdr-form-field [label]=\"'marketing.ends-at' | translate\" for=\"endsAt\">\r\n <vdr-datetime-picker formControlName=\"endsAt\"></vdr-datetime-picker>\r\n </vdr-form-field>\r\n <vdr-form-field [label]=\"'marketing.coupon-code' | translate\" for=\"couponCode\">\r\n <input\r\n id=\"couponCode\"\r\n [readonly]=\"!('UpdatePromotion' | hasPermission)\"\r\n type=\"text\"\r\n formControlName=\"couponCode\"\r\n />\r\n </vdr-form-field>\r\n <vdr-form-field\r\n [label]=\"'marketing.per-customer-limit' | translate\"\r\n [tooltip]=\"'marketing.per-customer-limit-tooltip' | translate\"\r\n for=\"perCustomerUsageLimit\"\r\n >\r\n <input\r\n id=\"perCustomerUsageLimit\"\r\n [readonly]=\"!('UpdatePromotion' | hasPermission)\"\r\n type=\"number\"\r\n min=\"1\"\r\n max=\"999\"\r\n formControlName=\"perCustomerUsageLimit\"\r\n />\r\n </vdr-form-field>\r\n <vdr-form-field\r\n [label]=\"'marketing.usage-limit' | translate\"\r\n [tooltip]=\"'marketing.usage-limit-tooltip' | translate\"\r\n for=\"usageLimit\"\r\n >\r\n <input\r\n id=\"usageLimit\"\r\n [readonly]=\"!('UpdatePromotion' | hasPermission)\"\r\n type=\"number\"\r\n min=\"1\"\r\n max=\"9999999\"\r\n formControlName=\"usageLimit\"\r\n />\r\n </vdr-form-field>\r\n </div>\r\n </vdr-card>\r\n <vdr-card\r\n [title]=\"'common.custom-fields' | translate\"\r\n formGroupName=\"customFields\"\r\n *ngIf=\"customFields.length\"\r\n >\r\n <vdr-tabbed-custom-fields\r\n entityName=\"Promotion\"\r\n [customFields]=\"customFields\"\r\n [customFieldsFormGroup]=\"detailForm.get('customFields')\"\r\n [readonly]=\"!('UpdatePromotion' | hasPermission)\"\r\n ></vdr-tabbed-custom-fields>\r\n </vdr-card>\r\n\r\n <vdr-custom-detail-component-host\r\n locationId=\"promotion-detail\"\r\n [entity$]=\"entity$\"\r\n [detailForm]=\"detailForm\"\r\n ></vdr-custom-detail-component-host>\r\n\r\n <vdr-card [title]=\"'marketing.conditions' | translate\" formArrayName=\"conditions\">\r\n <div *ngFor=\"let condition of conditions; index as i\">\r\n <vdr-configurable-input\r\n (remove)=\"removeCondition($event)\"\r\n [position]=\"i\"\r\n [readonly]=\"!('UpdatePromotion' | hasPermission)\"\r\n [operation]=\"condition\"\r\n [operationDefinition]=\"getConditionDefinition(condition)\"\r\n [formControlName]=\"i\"\r\n ></vdr-configurable-input>\r\n </div>\r\n <div>\r\n <vdr-dropdown *vdrIfPermissions=\"'UpdatePromotion'\">\r\n <button class=\"btn btn-outline\" vdrDropdownTrigger>\r\n <clr-icon shape=\"plus\"></clr-icon>\r\n {{ 'marketing.add-condition' | translate }}\r\n </button>\r\n <vdr-dropdown-menu vdrPosition=\"bottom-left\">\r\n <button\r\n *ngFor=\"let condition of getAvailableConditions()\"\r\n type=\"button\"\r\n vdrDropdownItem\r\n class=\"item-wrap\"\r\n (click)=\"addCondition(condition)\"\r\n >\r\n {{ condition.description }}\r\n </button>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n </div>\r\n </vdr-card>\r\n <vdr-card [title]=\"'marketing.actions' | translate\" formArrayName=\"actions\">\r\n <div *ngFor=\"let action of actions; index as i\">\r\n <vdr-configurable-input\r\n (remove)=\"removeAction($event)\"\r\n [position]=\"i\"\r\n [operation]=\"action\"\r\n [readonly]=\"!('UpdatePromotion' | hasPermission)\"\r\n [operationDefinition]=\"getActionDefinition(action)\"\r\n [formControlName]=\"i\"\r\n ></vdr-configurable-input>\r\n </div>\r\n <div>\r\n <vdr-dropdown *vdrIfPermissions=\"'UpdatePromotion'\">\r\n <button class=\"btn btn-outline\" vdrDropdownTrigger>\r\n <clr-icon shape=\"plus\"></clr-icon>\r\n {{ 'marketing.add-action' | translate }}\r\n </button>\r\n <vdr-dropdown-menu vdrPosition=\"bottom-left\">\r\n <button\r\n *ngFor=\"let action of getAvailableActions()\"\r\n type=\"button\"\r\n vdrDropdownItem\r\n class=\"item-wrap\"\r\n (click)=\"addAction(action)\"\r\n >\r\n {{ action.description }}\r\n </button>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n </div>\r\n </vdr-card>\r\n </vdr-page-block>\r\n </vdr-page-detail-layout>\r\n</form>\r\n", styles: [".item-wrap{white-space:normal}\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: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.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.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.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { 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.ConfigurableInputComponent, selector: "vdr-configurable-input", inputs: ["operation", "operationDefinition", "readonly", "removable", "position"], outputs: ["remove"] }, { kind: "component", type: i1.FormFieldComponent, selector: "vdr-form-field", inputs: ["label", "for", "tooltip", "errors", "readOnlyToggle"] }, { kind: "directive", type: i1.FormFieldControlDirective, selector: "input, textarea, select" }, { kind: "component", type: i1.LanguageSelectorComponent, selector: "vdr-language-selector", inputs: ["currentLanguageCode", "availableLanguageCodes", "disabled"], outputs: ["languageCodeChange"] }, { kind: "component", type: i1.RichTextEditorComponent, selector: "vdr-rich-text-editor", inputs: ["label", "readonly"] }, { 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: "directive", type: i1.IfPermissionsDirective, selector: "[vdrIfPermissions]", inputs: ["vdrIfPermissions", "vdrIfPermissionsElse"] }, { kind: "component", type: i1.ActionBarItemsComponent, selector: "vdr-action-bar-items", inputs: ["locationId"] }, { kind: "component", type: i1.DatetimePickerComponent, selector: "vdr-datetime-picker", inputs: ["yearRange", "weekStartDay", "timeGranularityInterval", "min", "max", "readonly"] }, { 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: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.HasPermissionPipe, name: "hasPermission" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
263
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", type: PromotionDetailComponent, selector: "vdr-promotion-detail", usesInheritance: true, ngImport: i0, template: "<vdr-page-block>\r\n <vdr-action-bar>\r\n <vdr-ab-left>\r\n <div class=\"flex clr-align-items-center\">\r\n <vdr-language-selector\r\n [disabled]=\"isNew$ | async\"\r\n [availableLanguageCodes]=\"availableLanguages$ | async\"\r\n [currentLanguageCode]=\"languageCode$ | async\"\r\n (languageCodeChange)=\"setLanguage($event)\"\r\n ></vdr-language-selector>\r\n </div>\r\n </vdr-ab-left>\r\n\r\n <vdr-ab-right>\r\n <vdr-action-bar-items locationId=\"promotion-detail\"></vdr-action-bar-items>\r\n <button\r\n class=\"btn btn-primary\"\r\n *ngIf=\"isNew$ | async; else updateButton\"\r\n (click)=\"create()\"\r\n [disabled]=\"!saveButtonEnabled()\"\r\n >\r\n {{ 'common.create' | translate }}\r\n </button>\r\n <ng-template #updateButton>\r\n <button\r\n class=\"btn btn-primary\"\r\n (click)=\"save()\"\r\n *vdrIfPermissions=\"'UpdatePromotion'\"\r\n [disabled]=\"!saveButtonEnabled()\"\r\n >\r\n {{ 'common.update' | translate }}\r\n </button>\r\n </ng-template>\r\n </vdr-ab-right>\r\n </vdr-action-bar>\r\n</vdr-page-block>\r\n\r\n<form class=\"form\" [formGroup]=\"detailForm\">\r\n <vdr-page-detail-layout>\r\n <vdr-page-detail-sidebar>\r\n <vdr-card *vdrIfPermissions=\"'UpdatePromotion'\">\r\n <clr-toggle-wrapper>\r\n <input type=\"checkbox\" clrToggle name=\"enabled\" formControlName=\"enabled\" />\r\n <label>{{ 'common.enabled' | translate }}</label>\r\n </clr-toggle-wrapper>\r\n </vdr-card>\r\n <vdr-card *ngIf=\"entity$ | async as entity\">\r\n <vdr-page-entity-info [entity]=\"entity\" />\r\n </vdr-card>\r\n </vdr-page-detail-sidebar>\r\n <vdr-page-block>\r\n <vdr-card>\r\n <div class=\"form-grid\">\r\n <vdr-form-field [label]=\"'common.name' | translate\" for=\"name\">\r\n <input\r\n id=\"name\"\r\n [readonly]=\"!('UpdatePromotion' | hasPermission)\"\r\n type=\"text\"\r\n formControlName=\"name\"\r\n />\r\n </vdr-form-field>\r\n <vdr-rich-text-editor\r\n class=\"form-grid-span\"\r\n formControlName=\"description\"\r\n [readonly]=\"!('UpdatePromotion' | hasPermission)\"\r\n [label]=\"'common.description' | translate\"\r\n ></vdr-rich-text-editor>\r\n <vdr-form-field [label]=\"'marketing.starts-at' | translate\" for=\"startsAt\">\r\n <vdr-datetime-picker formControlName=\"startsAt\"></vdr-datetime-picker>\r\n </vdr-form-field>\r\n <vdr-form-field [label]=\"'marketing.ends-at' | translate\" for=\"endsAt\">\r\n <vdr-datetime-picker formControlName=\"endsAt\"></vdr-datetime-picker>\r\n </vdr-form-field>\r\n <vdr-form-field [label]=\"'marketing.coupon-code' | translate\" for=\"couponCode\">\r\n <input\r\n id=\"couponCode\"\r\n [readonly]=\"!('UpdatePromotion' | hasPermission)\"\r\n type=\"text\"\r\n formControlName=\"couponCode\"\r\n />\r\n </vdr-form-field>\r\n <vdr-form-field\r\n [label]=\"'marketing.per-customer-limit' | translate\"\r\n [tooltip]=\"'marketing.per-customer-limit-tooltip' | translate\"\r\n for=\"perCustomerUsageLimit\"\r\n >\r\n <input\r\n id=\"perCustomerUsageLimit\"\r\n [readonly]=\"!('UpdatePromotion' | hasPermission)\"\r\n type=\"number\"\r\n min=\"1\"\r\n max=\"999\"\r\n formControlName=\"perCustomerUsageLimit\"\r\n />\r\n </vdr-form-field>\r\n <vdr-form-field\r\n [label]=\"'marketing.usage-limit' | translate\"\r\n [tooltip]=\"'marketing.usage-limit-tooltip' | translate\"\r\n for=\"usageLimit\"\r\n >\r\n <input\r\n id=\"usageLimit\"\r\n [readonly]=\"!('UpdatePromotion' | hasPermission)\"\r\n type=\"number\"\r\n min=\"1\"\r\n max=\"9999999\"\r\n formControlName=\"usageLimit\"\r\n />\r\n </vdr-form-field>\r\n </div>\r\n </vdr-card>\r\n <vdr-card\r\n [title]=\"'common.custom-fields' | translate\"\r\n formGroupName=\"customFields\"\r\n *ngIf=\"customFields.length\"\r\n >\r\n <vdr-tabbed-custom-fields\r\n entityName=\"Promotion\"\r\n [customFields]=\"customFields\"\r\n [customFieldsFormGroup]=\"detailForm.get('customFields')\"\r\n [readonly]=\"!('UpdatePromotion' | hasPermission)\"\r\n ></vdr-tabbed-custom-fields>\r\n </vdr-card>\r\n\r\n <vdr-custom-detail-component-host\r\n locationId=\"promotion-detail\"\r\n [entity$]=\"entity$\"\r\n [detailForm]=\"detailForm\"\r\n ></vdr-custom-detail-component-host>\r\n\r\n <vdr-card [title]=\"'marketing.conditions' | translate\" formArrayName=\"conditions\">\r\n <div *ngFor=\"let condition of conditions; index as i\">\r\n <vdr-configurable-input\r\n (remove)=\"removeCondition($event)\"\r\n [position]=\"i\"\r\n [readonly]=\"!('UpdatePromotion' | hasPermission)\"\r\n [operation]=\"condition\"\r\n [operationDefinition]=\"getConditionDefinition(condition)\"\r\n [formControlName]=\"i\"\r\n ></vdr-configurable-input>\r\n </div>\r\n <div>\r\n <vdr-dropdown *vdrIfPermissions=\"'UpdatePromotion'\">\r\n <button class=\"btn btn-outline\" vdrDropdownTrigger>\r\n <clr-icon shape=\"plus\"></clr-icon>\r\n {{ 'marketing.add-condition' | translate }}\r\n </button>\r\n <vdr-dropdown-menu vdrPosition=\"bottom-left\">\r\n <button\r\n *ngFor=\"let condition of getAvailableConditions()\"\r\n type=\"button\"\r\n vdrDropdownItem\r\n class=\"item-wrap\"\r\n (click)=\"addCondition(condition)\"\r\n >\r\n {{ condition.description }}\r\n </button>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n </div>\r\n </vdr-card>\r\n <vdr-card [title]=\"'marketing.actions' | translate\" formArrayName=\"actions\">\r\n <div *ngFor=\"let action of actions; index as i\">\r\n <vdr-configurable-input\r\n (remove)=\"removeAction($event)\"\r\n [position]=\"i\"\r\n [operation]=\"action\"\r\n [readonly]=\"!('UpdatePromotion' | hasPermission)\"\r\n [operationDefinition]=\"getActionDefinition(action)\"\r\n [formControlName]=\"i\"\r\n ></vdr-configurable-input>\r\n </div>\r\n <div>\r\n <vdr-dropdown *vdrIfPermissions=\"'UpdatePromotion'\">\r\n <button class=\"btn btn-outline\" vdrDropdownTrigger>\r\n <clr-icon shape=\"plus\"></clr-icon>\r\n {{ 'marketing.add-action' | translate }}\r\n </button>\r\n <vdr-dropdown-menu vdrPosition=\"bottom-left\">\r\n <button\r\n *ngFor=\"let action of getAvailableActions()\"\r\n type=\"button\"\r\n vdrDropdownItem\r\n class=\"item-wrap\"\r\n (click)=\"addAction(action)\"\r\n >\r\n {{ action.description }}\r\n </button>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n </div>\r\n </vdr-card>\r\n </vdr-page-block>\r\n </vdr-page-detail-layout>\r\n</form>\r\n", styles: [".item-wrap{white-space:normal}\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: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.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.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.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { 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.ConfigurableInputComponent, selector: "vdr-configurable-input", inputs: ["operation", "operationDefinition", "readonly", "removable", "position"], outputs: ["remove"] }, { 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.LanguageSelectorComponent, selector: "vdr-language-selector", inputs: ["currentLanguageCode", "availableLanguageCodes", "disabled"], outputs: ["languageCodeChange"] }, { kind: "component", type: i1.RichTextEditorComponent, selector: "vdr-rich-text-editor", inputs: ["label", "readonly"] }, { 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: "directive", type: i1.IfPermissionsDirective, selector: "[vdrIfPermissions]", inputs: ["vdrIfPermissions", "vdrIfPermissionsElse"] }, { kind: "component", type: i1.ActionBarItemsComponent, selector: "vdr-action-bar-items", inputs: ["locationId"] }, { kind: "component", type: i1.DatetimePickerComponent, selector: "vdr-datetime-picker", inputs: ["yearRange", "weekStartDay", "timeGranularityInterval", "min", "max", "readonly"] }, { 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: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.HasPermissionPipe, name: "hasPermission" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
264
264
|
}
|
|
265
265
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: PromotionDetailComponent, decorators: [{
|
|
266
266
|
type: Component,
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FormControl, Validators } from '@angular/forms';
|
|
2
|
+
import { summate } from '@vendure/common/lib/shared-utils';
|
|
3
|
+
export function getRefundablePayments(payments) {
|
|
4
|
+
const settledPayments = (payments || []).filter(p => p.state === 'Settled');
|
|
5
|
+
return settledPayments.map((payment, index) => {
|
|
6
|
+
const refundableAmount = payment.amount -
|
|
7
|
+
summate(payment.refunds.filter(r => r.state !== 'Failed'), 'total');
|
|
8
|
+
return {
|
|
9
|
+
...payment,
|
|
10
|
+
refundableAmount,
|
|
11
|
+
amountToRefundControl: new FormControl(0, {
|
|
12
|
+
nonNullable: true,
|
|
13
|
+
validators: [Validators.min(0), Validators.max(refundableAmount)],
|
|
14
|
+
}),
|
|
15
|
+
selected: index === 0,
|
|
16
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yk7XHJcbiAgICByZXR1cm4gc2V0dGxlZFBheW1lbnRzLm1hcCgocGF5bWVudCwgaW5kZXgpID0+IHtcclxuICAgICAgICBjb25zdCByZWZ1bmRhYmxlQW1vdW50ID1cclxuICAgICAgICAgICAgcGF5bWVudC5hbW91bnQgLVxyXG4gICAgICAgICAgICBzdW1tYXRlKFxyXG4gICAgICAgICAgICAgICAgcGF5bWVudC5yZWZ1bmRzLmZpbHRlcihyID0+IHIuc3RhdGUgIT09ICdGYWlsZWQnKSxcclxuICAgICAgICAgICAgICAgICd0b3RhbCcsXHJcbiAgICAgICAgICAgICk7XHJcbiAgICAgICAgcmV0dXJuIHtcclxuICAgICAgICAgICAgLi4ucGF5bWVudCxcclxuICAgICAgICAgICAgcmVmdW5kYWJsZUFtb3VudCxcclxuICAgICAgICAgICAgYW1vdW50VG9SZWZ1bmRDb250cm9sOiBuZXcgRm9ybUNvbnRyb2woMCwge1xyXG4gICAgICAgICAgICAgICAgbm9uTnVsbGFibGU6IHRydWUsXHJcbiAgICAgICAgICAgICAgICB2YWxpZGF0b3JzOiBbVmFsaWRhdG9ycy5taW4oMCksIFZhbGlkYXRvcnMubWF4KHJlZnVuZGFibGVBbW91bnQpXSxcclxuICAgICAgICAgICAgfSksXHJcbiAgICAgICAgICAgIHNlbGVjdGVkOiBpbmRleCA9PT0gMCxcclxuICAgICAgICB9O1xyXG4gICAgfSk7XHJcbn1cclxuIl19
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kaWZ5LW9yZGVyLXR5cGVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2xpYi9vcmRlci9zcmMvY29tbW9uL21vZGlmeS1vcmRlci10eXBlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW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bWJlcjtcclxuICAgIHF1YW50aXR5OiBudW1iZXI7XHJcbn1cclxuXHJcbmV4cG9ydCB0eXBlIE1vZGlmeU9yZGVyRGF0YSA9IE9taXQ8TW9kaWZ5T3JkZXJJbnB1dCwgJ2FkZEl0ZW1zJyB8ICdhZGp1c3RPcmRlckxpbmVzJz4gJiB7XHJcbiAgICBhZGRJdGVtczogQXJyYXk8QWRkSXRlbUlucHV0ICYgeyBjdXN0b21GaWVsZHM/OiBhbnkgfT47XHJcbiAgICBhZGp1c3RPcmRlckxpbmVzOiBBcnJheTxPcmRlckxpbmVJbnB1dCAmIHsgY3VzdG9tRmllbGRzPzogYW55IH0+O1xyXG59O1xyXG4iXX0=
|
package/esm2022/order/components/add-manual-payment-dialog/add-manual-payment-dialog.component.mjs
CHANGED
|
@@ -52,7 +52,7 @@ export class AddManualPaymentDialogComponent {
|
|
|
52
52
|
this.resolveWith();
|
|
53
53
|
}
|
|
54
54
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: AddManualPaymentDialogComponent, deps: [{ token: i1.DataService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
55
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", 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: i3.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"] }, { kind: "directive", type: i1.FormFieldControlDirective, selector: "input, textarea, select" }, { kind: "directive", type: i1.DialogButtonsDirective, selector: "[vdrDialogButtons]" }, { kind: "directive", type: i1.DialogTitleDirective, selector: "[vdrDialogTitle]" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.LocaleCurrencyPipe, name: "localeCurrency" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
55
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", 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: i3.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: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.LocaleCurrencyPipe, name: "localeCurrency" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
56
56
|
}
|
|
57
57
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: AddManualPaymentDialogComponent, decorators: [{
|
|
58
58
|
type: Component,
|
|
@@ -71,7 +71,7 @@ export class CancelOrderDialogComponent {
|
|
|
71
71
|
.filter(l => 0 < l.quantity);
|
|
72
72
|
}
|
|
73
73
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: CancelOrderDialogComponent, deps: [{ token: i1.I18nService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
74
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", 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: i2.ClrLabel, selector: "label", inputs: ["for"] }, { kind: "directive", type: i2.ClrRadio, selector: "[clrRadio]" }, { kind: "component", type: i2.ClrRadioWrapper, selector: "clr-radio-wrapper" }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.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: i4.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i4.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i4.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i4.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" }, { kind: "directive", type: i1.DialogButtonsDirective, selector: "[vdrDialogButtons]" }, { kind: "directive", type: i1.DialogTitleDirective, selector: "[vdrDialogTitle]" }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.AssetPreviewPipe, name: "assetPreview" }, { kind: "pipe", type: i1.LocaleCurrencyPipe, name: "localeCurrency" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
74
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", 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: i2.ClrLabel, selector: "label", inputs: ["for"] }, { kind: "directive", type: i2.ClrRadio, selector: "[clrRadio]" }, { kind: "component", type: i2.ClrRadioWrapper, selector: "clr-radio-wrapper" }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.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: i4.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i4.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i4.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i4.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: i6.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.AssetPreviewPipe, name: "assetPreview" }, { kind: "pipe", type: i1.LocaleCurrencyPipe, name: "localeCurrency" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
75
75
|
}
|
|
76
76
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: CancelOrderDialogComponent, decorators: [{
|
|
77
77
|
type: Component,
|
|
@@ -45,11 +45,11 @@ export class CouponCodeSelectorComponent {
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: CouponCodeSelectorComponent, deps: [{ token: i1.DataService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
48
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", 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)=\"removeCouponCode.emit($event.value?.code)\"\r\n>\r\n <ng-template ng-option-tmp let-item=\"item\">\r\n <vdr-chip>{{ item.code }}</vdr-chip>\r\n
|
|
48
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", 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)=\"removeCouponCode.emit($event.value?.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: i3.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: i3.NgOptionTemplateDirective, selector: "[ng-option-tmp]" }, { kind: "component", type: i1.ChipComponent, selector: "vdr-chip", inputs: ["icon", "invert", "colorFrom", "colorType"], outputs: ["iconClick"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
49
49
|
}
|
|
50
50
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: CouponCodeSelectorComponent, decorators: [{
|
|
51
51
|
type: Component,
|
|
52
|
-
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)=\"removeCouponCode.emit($event.value?.code)\"\r\n>\r\n <ng-template ng-option-tmp let-item=\"item\">\r\n <vdr-chip>{{ item.code }}</vdr-chip>\r\n
|
|
52
|
+
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)=\"removeCouponCode.emit($event.value?.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" }]
|
|
53
53
|
}], ctorParameters: function () { return [{ type: i1.DataService }]; }, propDecorators: { couponCodes: [{
|
|
54
54
|
type: Input
|
|
55
55
|
}], control: [{
|
|
@@ -59,4 +59,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImpor
|
|
|
59
59
|
}], removeCouponCode: [{
|
|
60
60
|
type: Output
|
|
61
61
|
}] } });
|
|
62
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
62
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY291cG9uLWNvZGUtc2VsZWN0b3IuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vc3JjL2xpYi9vcmRlci9zcmMvY29tcG9uZW50cy9jb3Vwb24tY29kZS1zZWxlY3Rvci9jb3Vwb24tY29kZS1zZWxlY3Rvci5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi9zcmMvbGliL29yZGVyL3NyYy9jb21wb25lbnRzL2NvdXBvbi1jb2RlLXNlbGVjdG9yL2NvdXBvbi1jb2RlLXNlbGVjdG9yLmNvbXBvbmVudC5odG1sIl0sIm5hbWV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xuICAgICAgICB0aGlzLmF2YWlsYWJsZUNvdXBvbkNvZGVzJCA9IGNvbmNhdChcclxuICAgICAgICAgICAgdGhpcy5jb3Vwb25Db2RlSW5wdXQkLnBpcGUoXHJcbiAgICAgICAgICAgICAgICBkZWJvdW5jZVRpbWUoMjAwKSxcclxuICAgICAgICAgICAgICAgIGRpc3RpbmN0VW50aWxDaGFuZ2VkKCksXHJcbiAgICAgICAgICAgICAgICBzd2l0Y2hNYXAoXHJcbiAgICAgICAgICAgICAgICAgICAgdGVybSA9PlxyXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmRhdGFTZXJ2aWNlLnF1ZXJ5KEdldENvdXBvbkNvZGVTZWxlY3RvclByb21vdGlvbkxpc3REb2N1bWVudCwge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb3B0aW9uczoge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRha2U6IDEwLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNraXA6IDAsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmlsdGVyOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvdXBvbkNvZGU6IHsgY29udGFpbnM6IHRlcm0gfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSkuc2luZ2xlJCxcclxuICAgICAgICAgICAgICAgICksXHJcbiAgICAgICAgICAgICAgICBtYXAoKHsgcHJvbW90aW9ucyB9KSA9PlxyXG4gICAgICAgICAgICAgICAgICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tbm9uLW51bGwtYXNzZXJ0aW9uXHJcbiAgICAgICAgICAgICAgICAgICAgcHJvbW90aW9ucy5pdGVtcy5tYXAocCA9P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RlbXMtY2VudGVyXCI+XHJcbiAgICAgICAgICAgIDx2ZHItY2hpcCBjbGFzcz1cIm1yLTFcIj57eyBpdGVtLmNvZGUgfX08L3Zkci1jaGlwPlxyXG4gICAgICAgICAgICA8c3Bhbj57eyBpdGVtLnByb21vdGlvbk5hbWUgfX08L3NwYW4+XHJcbiAgICAgICAgPC9kaXY+XHJcbiAgICA8L25nLXRlbXBsYXRlPlxyXG48L25nLXNlbGVjdD5cclxuIl19
|
|
@@ -44,7 +44,7 @@ export class DraftOrderVariantSelectorComponent {
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: DraftOrderVariantSelectorComponent, deps: [{ token: i1.DataService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
47
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", 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.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.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: i3.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i3.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" }, { kind: "component", type: i1.ProductVariantSelectorComponent, selector: "vdr-product-variant-selector", outputs: ["productSelected"] }, { kind: "pipe", type: i2.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 }); }
|
|
47
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", 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.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.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: i3.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i3.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.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 }); }
|
|
48
48
|
}
|
|
49
49
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: DraftOrderVariantSelectorComponent, decorators: [{
|
|
50
50
|
type: Component,
|
|
@@ -70,7 +70,7 @@ export class FulfillOrderDialogComponent {
|
|
|
70
70
|
this.resolveWith();
|
|
71
71
|
}
|
|
72
72
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: FulfillOrderDialogComponent, deps: [{ token: i1.DataService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
73
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", 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{-webkit-text-decoration:underline dotted var(--color-text-200);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.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.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: i3.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i3.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.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"], outputs: ["remove"] }, { kind: "directive", type: i1.FormFieldControlDirective, selector: "input, textarea, select" }, { 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 }); }
|
|
73
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", 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{-webkit-text-decoration:underline dotted var(--color-text-200);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.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.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: i3.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i3.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.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"], 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 }); }
|
|
74
74
|
}
|
|
75
75
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: FulfillOrderDialogComponent, decorators: [{
|
|
76
76
|
type: Component,
|
|
@@ -8,11 +8,13 @@ export class ModificationDetailComponent {
|
|
|
8
8
|
constructor() {
|
|
9
9
|
this.addedItems = new Map();
|
|
10
10
|
this.removedItems = new Map();
|
|
11
|
+
this.modifiedItems = new Set();
|
|
11
12
|
}
|
|
12
13
|
ngOnChanges() {
|
|
13
|
-
const { added, removed } = this.getModifiedLines();
|
|
14
|
+
const { added, removed, modified } = this.getModifiedLines();
|
|
14
15
|
this.addedItems = added;
|
|
15
16
|
this.removedItems = removed;
|
|
17
|
+
this.modifiedItems = modified;
|
|
16
18
|
}
|
|
17
19
|
getSurcharge(id) {
|
|
18
20
|
return this.order.surcharges.find(m => m.id === id);
|
|
@@ -29,32 +31,41 @@ export class ModificationDetailComponent {
|
|
|
29
31
|
quantity: count,
|
|
30
32
|
}));
|
|
31
33
|
}
|
|
34
|
+
getModifiedItems() {
|
|
35
|
+
return [...this.modifiedItems].map(line => ({
|
|
36
|
+
name: line.productVariant.name,
|
|
37
|
+
}));
|
|
38
|
+
}
|
|
32
39
|
getModifiedLines() {
|
|
33
40
|
const added = new Map();
|
|
34
41
|
const removed = new Map();
|
|
42
|
+
const modified = new Set();
|
|
35
43
|
for (const modificationLine of this.modification.lines || []) {
|
|
36
44
|
const line = this.order.lines.find(l => l.id === modificationLine.orderLineId);
|
|
37
45
|
if (!line) {
|
|
38
46
|
continue;
|
|
39
47
|
}
|
|
40
|
-
if (modificationLine.quantity
|
|
48
|
+
if (modificationLine.quantity === 0) {
|
|
49
|
+
modified.add(line);
|
|
50
|
+
}
|
|
51
|
+
else if (modificationLine.quantity < 0) {
|
|
41
52
|
removed.set(line, -modificationLine.quantity);
|
|
42
53
|
}
|
|
43
54
|
else {
|
|
44
55
|
added.set(line, modificationLine.quantity);
|
|
45
56
|
}
|
|
46
57
|
}
|
|
47
|
-
return { added, removed };
|
|
58
|
+
return { added, removed, modified };
|
|
48
59
|
}
|
|
49
60
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: ModificationDetailComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
50
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", 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", styles: [""], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.LabeledDataComponent, selector: "vdr-labeled-data", inputs: ["label"] }, { kind: "component", type: i3.SimpleItemListComponent, selector: "vdr-simple-item-list", inputs: ["items"] }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "pipe", type: i2.LocaleCurrencyPipe, name: "localeCurrency" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
61
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", 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: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.LabeledDataComponent, selector: "vdr-labeled-data", inputs: ["label"] }, { kind: "component", type: i3.SimpleItemListComponent, selector: "vdr-simple-item-list", inputs: ["items"] }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "pipe", type: i2.LocaleCurrencyPipe, name: "localeCurrency" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
51
62
|
}
|
|
52
63
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: ModificationDetailComponent, decorators: [{
|
|
53
64
|
type: Component,
|
|
54
|
-
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" }]
|
|
65
|
+
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" }]
|
|
55
66
|
}], propDecorators: { order: [{
|
|
56
67
|
type: Input
|
|
57
68
|
}], modification: [{
|
|
58
69
|
type: Input
|
|
59
70
|
}] } });
|
|
60
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
71
|
+
//# sourceMappingURL=data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