@deenruv/admin-ui-plugin 1.0.0
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/README.md +5 -0
- package/lib/admin-ui/123.1d21e707f57ee3b4.js +33 -0
- package/lib/admin-ui/123.1d21e707f57ee3b4.js.map +1 -0
- package/lib/admin-ui/132.9c69fc8bd3b0cec4.js +2 -0
- package/lib/admin-ui/132.9c69fc8bd3b0cec4.js.map +1 -0
- package/lib/admin-ui/153.7eec6efd3edd54b4.js +321 -0
- package/lib/admin-ui/153.7eec6efd3edd54b4.js.map +1 -0
- package/lib/admin-ui/3rdpartylicenses.txt +1393 -0
- package/lib/admin-ui/473.fc9f902d000ba044.js +2 -0
- package/lib/admin-ui/473.fc9f902d000ba044.js.map +1 -0
- package/lib/admin-ui/53.7f3fee856943b03f.js +86 -0
- package/lib/admin-ui/53.7f3fee856943b03f.js.map +1 -0
- package/lib/admin-ui/625.64b1900ed11327c1.js +46 -0
- package/lib/admin-ui/625.64b1900ed11327c1.js.map +1 -0
- package/lib/admin-ui/697.ff9c92dd4b564093.js +73 -0
- package/lib/admin-ui/697.ff9c92dd4b564093.js.map +1 -0
- package/lib/admin-ui/99.b9d2442a2288abdb.js +379 -0
- package/lib/admin-ui/99.b9d2442a2288abdb.js.map +1 -0
- package/lib/admin-ui/assets/.gitkeep +0 -0
- package/lib/admin-ui/assets/logo-login.webp +0 -0
- package/lib/admin-ui/assets/logo-top.webp +0 -0
- package/lib/admin-ui/common.868070cec3f2418e.js +2 -0
- package/lib/admin-ui/common.868070cec3f2418e.js.map +1 -0
- package/lib/admin-ui/deenruv-ui-config.json +290 -0
- package/lib/admin-ui/favicon.ico +0 -0
- package/lib/admin-ui/fonts/fonts.scss +253 -0
- package/lib/admin-ui/fonts/inter-cyrillic-ext.woff2 +0 -0
- package/lib/admin-ui/fonts/inter-cyrillic.woff2 +0 -0
- package/lib/admin-ui/fonts/inter-greek-ext.woff2 +0 -0
- package/lib/admin-ui/fonts/inter-greek.woff2 +0 -0
- package/lib/admin-ui/fonts/inter-latin-ext.woff2 +0 -0
- package/lib/admin-ui/fonts/inter-latin.woff2 +0 -0
- package/lib/admin-ui/fonts/inter-vietnamese.woff2 +0 -0
- package/lib/admin-ui/i18n-messages/ar.json +814 -0
- package/lib/admin-ui/i18n-messages/cs.json +814 -0
- package/lib/admin-ui/i18n-messages/de.json +814 -0
- package/lib/admin-ui/i18n-messages/en.json +814 -0
- package/lib/admin-ui/i18n-messages/es.json +814 -0
- package/lib/admin-ui/i18n-messages/fa.json +814 -0
- package/lib/admin-ui/i18n-messages/fr.json +814 -0
- package/lib/admin-ui/i18n-messages/he.json +814 -0
- package/lib/admin-ui/i18n-messages/hr.json +814 -0
- package/lib/admin-ui/i18n-messages/it.json +814 -0
- package/lib/admin-ui/i18n-messages/nb.json +812 -0
- package/lib/admin-ui/i18n-messages/ne.json +814 -0
- package/lib/admin-ui/i18n-messages/pl.json +814 -0
- package/lib/admin-ui/i18n-messages/pt_BR.json +814 -0
- package/lib/admin-ui/i18n-messages/pt_PT.json +814 -0
- package/lib/admin-ui/i18n-messages/ru.json +814 -0
- package/lib/admin-ui/i18n-messages/sv.json +807 -0
- package/lib/admin-ui/i18n-messages/uk.json +814 -0
- package/lib/admin-ui/i18n-messages/zh_Hans.json +814 -0
- package/lib/admin-ui/i18n-messages/zh_Hant.json +814 -0
- package/lib/admin-ui/index.html +14 -0
- package/lib/admin-ui/inter-cyrillic-ext.f62cc866835dd717.woff2 +0 -0
- package/lib/admin-ui/inter-cyrillic.fd42267cbb1bfdb0.woff2 +0 -0
- package/lib/admin-ui/inter-greek-ext.f876a5a3ea45d9a5.woff2 +0 -0
- package/lib/admin-ui/inter-greek.0455348926d6f41d.woff2 +0 -0
- package/lib/admin-ui/inter-latin-ext.7df16007e26681f5.woff2 +0 -0
- package/lib/admin-ui/inter-latin.40c45725dc5f525d.woff2 +0 -0
- package/lib/admin-ui/inter-vietnamese.530676b65c9e977f.woff2 +0 -0
- package/lib/admin-ui/main.a1f6ce60f6b53c40.js +3241 -0
- package/lib/admin-ui/main.a1f6ce60f6b53c40.js.map +1 -0
- package/lib/admin-ui/polyfills.34e462102e9d0666.js +2 -0
- package/lib/admin-ui/polyfills.34e462102e9d0666.js.map +1 -0
- package/lib/admin-ui/polyfills.ts +66 -0
- package/lib/admin-ui/runtime.12183b5e8f8cfd14.js +2 -0
- package/lib/admin-ui/runtime.12183b5e8f8cfd14.js.map +1 -0
- package/lib/admin-ui/styles/_mixins.scss +60 -0
- package/lib/admin-ui/styles/_variables.scss +11 -0
- package/lib/admin-ui/styles/component/prosemirror.scss +511 -0
- package/lib/admin-ui/styles/global/_buttons.scss +147 -0
- package/lib/admin-ui/styles/global/_clarity.scss +140 -0
- package/lib/admin-ui/styles/global/_forms.scss +187 -0
- package/lib/admin-ui/styles/global/_global.scss +41 -0
- package/lib/admin-ui/styles/global/_overrides.scss +165 -0
- package/lib/admin-ui/styles/global/_sass-overrides.scss +8 -0
- package/lib/admin-ui/styles/global/_utilities.scss +155 -0
- package/lib/admin-ui/styles/rtl.scss +143 -0
- package/lib/admin-ui/styles/styles.scss +19 -0
- package/lib/admin-ui/styles/theme/dark.scss +591 -0
- package/lib/admin-ui/styles/theme/default.scss +254 -0
- package/lib/admin-ui/styles/ui-extension-theme.scss +13 -0
- package/lib/admin-ui/styles.2de83a2df5e76526.css +3 -0
- package/lib/admin-ui/styles.2de83a2df5e76526.css.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +18 -0
- package/lib/index.js.map +1 -0
- package/lib/src/api/metrics.resolver.d.ts +8 -0
- package/lib/src/api/metrics.resolver.js +41 -0
- package/lib/src/api/metrics.resolver.js.map +1 -0
- package/lib/src/config/metrics-strategies.d.ts +39 -0
- package/lib/src/config/metrics-strategies.js +92 -0
- package/lib/src/config/metrics-strategies.js.map +1 -0
- package/lib/src/constants.d.ts +7 -0
- package/lib/src/constants.js +286 -0
- package/lib/src/constants.js.map +1 -0
- package/lib/src/plugin.d.ts +129 -0
- package/lib/src/plugin.js +332 -0
- package/lib/src/plugin.js.map +1 -0
- package/lib/src/service/metrics.service.d.ts +16 -0
- package/lib/src/service/metrics.service.js +144 -0
- package/lib/src/service/metrics.service.js.map +1 -0
- package/lib/src/types.d.ts +23 -0
- package/lib/src/types.js +14 -0
- package/lib/src/types.js.map +1 -0
- package/package.json +42 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"53.7f3fee856943b03f.js","mappings":"i2DAWM,SAAUA,GAAsBC,GAElC,OADyBA,GAAY,IAAIC,OAAOC,GAAiB,YAAZA,EAAEC,OAChCC,IAAI,CAACC,EAASC,KACjC,MAAMC,EACFF,EAAQG,UACRC,WACIJ,EAAQK,QAAQT,OAAOU,GAAiB,WAAZA,EAAER,OAC9B,SAER,MAAO,IACAE,EACHE,mBACAK,sBAAuB,IAAIC,KAAY,EAAG,CACtCC,aAAa,EACbC,WAAY,CAACC,KAAWC,IAAI,GAAID,KAAWE,IAAIX,MAEnDY,SAAoB,IAAVb,IAGtB,yIC9B4Bc,MAAA,8BAAAA,YAAA,4EAkBxBA,MAAA,cAAkCA,MAAA,mBAAAA,MAAAC,GAAA,MAAAC,EAAAF,QAAA,OAAAA,MAASE,EAAAC,SAAQ,GAAEH,MAAA,wBAAiCA,QACtFA,MAAA,cAAsBA,MAAA,mBAAAA,MAAAC,GAAA,MAAAC,EAAAF,QAAA,OAAAA,MAASE,EAAAE,SAAQ,GACnCJ,MAAA,kDACJA,gCAHqDA,oBAAA,sBACYA,MAAA,GAAAA,MAAA,WAAAE,EAAAG,KAAAC,SAAAJ,EAAAG,KAAAE,UAC7DP,cAAA,IAAAA,MAAA,8BAAAA,MAAA,IAAAE,EAAAM,kBAAAN,EAAAO,cAAA,OCJmCC;;;;;;;;;;;;;;;EAuBrC,MAAOC,GAWTC,YAAoBC,GAAAC,KAAAD,cALpBC,KAAAT,KAAO,IAAIU,KAAiB,CACxBC,OAAQ,IAAIC,K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ZA,GAAQ9V,OAAS8gC,MAAUG,QAAWnrB,GAAQqxB,eAOxC,CACI,CACI9kC,MAAO,GAAGyT,GAAQqxB,gBAAgBlyC,OAClCuxC,KAAM,CAAC,WAAY1wB,GAAQqxB,gBAAgBr1C,KAE/C,CACIuQ,SAAOvO,KAAE,4BACT0yC,KAAM,CAAC,WAAY1wB,GAAQqxB,gBAAgBr1C,KAE/C,CACIuQ,MAAO,GAAGyT,GAAQ7gB,OAClBuxC,KAAM,CAAC1wB,GAAQhkB,MAjBvB,CACI,CACIuQ,MAAO,GAAGyT,GAAQ7gB,OAClBuxC,KAAM,CAAC1wB,GAAQhkB,UAmBzCk0C,EAAYW,gBAAgB,CACxBC,SAAU,EACVC,SAAU,qBACVC,OAAKhzC,KAAE,eACPi/B,MAAO,GACPtrB,aAAWs/B,OAA4B,CACnCt/B,UAAWiM,GACXtjB,MAAO42C,MACPC,UAAW,QACXC,eAAgBpxB,GAAU,CACtB,CACIzT,SAAOvO,KAAE,qBACT0yC,KAAM,CAAC1wB,GAAQhkB,UAK/Bk0C,EAAYW,gBAAgB,CACxBC,SAAU,EACVC,SAAU,eACVC,OAAKhzC,KAAE,eACPi/B,MAAO,GACPtrB,aAAWs/B,OAA4B,CACnCt/B,UAAWs1B,GACX3sC,MAAO42C,MACPC,UAAW,QACXC,eAAgBpxB,GAAU,CACtB,CACIzT,MAAOyT,GAAQ7gB,MAAQ,QACvBuxC,KAAM,CAAC,WAAY1wB,GAAQhkB,KAE/B,CACIuQ,SAAOvO,KAAE,8BACT0yC,KAAM,CAAC1wB,GAAQhkB,UAK/B20C,GAAYC,iCAAkC,EAClD,iDAtFSD,IAAW33C,MAAAiC,OAAA,mCAAX01C,IAAW,wCArDT,CACP,CACIW,QAASC,KACTC,WAAatB,GAA6BD,GAAaC,GACvDuB,OAAO,EACPC,KAAM,CAACC,SAEdC,QAAA,CARSC,MAAcC,KAAaC,SAAS,MAAG","names":["getRefundablePayments","payments","filter","p","state","map","payment","index","refundableAmount","amount","summate","refunds","r","amountToRefundControl","FormControl","nonNullable","validators","Validators","min","max","selected","i0","_r1","ctx_r1","cancel","submit","form","invalid","pristine","outstandingAmount","currencyCode","gql","AddManualPaymentDialogComponent","constructor","dataService","this","UntypedFormGroup","method","UntypedFormControl","required","transactionId","ngOnInit","paymentMethods$","query","GetAddManualPaymentMethodListDocument","options","take","mapSingle","data","paymentMethods","items","formValue","value","resolveWith","i1","selectors","decls","vars","consts","template","rf","ctx","AddManualPaymentDialogComponent_ng_template_0_Template","AddManualPaymentDialogComponent_ng_template_9_Template","$event","line_r2","$implicit","ctx_r2","lineQuantities","id","checkIfAllSelected","cancelAll","quantity","CancelOrderDialogComponent_tr_22_input_14_Template","CancelOrderDialogComponent_tr_22_ng_template_15_Template","featuredAsset","productVariant","name","sku","unitPriceWithTax","order","active","nonEditable_r4","_r5","radioChanged","_r6","select","CancelOrderDialogComponent_ng_template_29_ng_container_4_Template","CancelOrderDialogComponent_ng_template_29_ng_container_5_Template","reason","selectionCount","CancelOrderDialogComponent","Object","values","reduce","sum","n","i18nService","reasons","getAppConfig","cancellationReasons","_","translate","lines","result","line","lineId","entries","quantityInOrder","find","orderId","getLineInputs","cancelShipping","orderLineId","l","CancelOrderDialogComponent_ng_template_0_Template","CancelOrderDialogComponent_tr_22_Template","CancelOrderDialogComponent_ng_container_24_Template","CancelOrderDialogComponent_ng_template_29_Template","item_r1","code","promotionName","GET_COUPON_CODE_SELECTOR_PROMOTION_LIST","CouponCodeSelectorComponent","addCouponCode","EventEmitter","removeCouponCode","couponCodeInput$","Subject","availableCouponCodes$","concat","pipe","debounceTime","distinctUntilChanged","switchMap","term","GetCouponCodeSelectorPromotionListDocument","skip","couponCode","contains","single$","promotions","startWith","control","couponCodes","inputs","outputs","emit","CouponCodeSelectorComponent_ng_template_2_Template","address_r5","_r3","ctx_r3","selectedAddress","SelectAddressDialogComponent_clr_tabs_1_clr_tab_1_ng_template_4_vdr_radio_card_2_Template","addressIdFn","addresses_r6","SelectAddressDialogComponent_clr_tabs_1_clr_tab_1_ng_template_4_Template","_r2","useExisting","addressForm","availableCountries$","SelectAddressDialogComponent_clr_tabs_1_clr_tab_1_Template","SelectAddressDialogComponent_clr_tabs_1_ng_template_6_Template","createNew","customerId","length","_r7","SelectAddressDialogComponent","formBuilder","group","fullName","currentAddress","company","streetLine1","streetLine2","city","province","postalCode","countryCode","phoneNumber","addresses$","GetCustomerAddressesDocument","customer","addresses","tap","a","of","settings","getAvailableCountries","countries","trackByFn","item","pick","country","valid","i2","SelectAddressDialogComponent_ng_template_0_Template","SelectAddressDialogComponent_clr_tabs_1_Template","SelectAddressDialogComponent_ng_template_3_Template","ctx_r0","title","note","SelectCustomerDialogComponent_ng_container_1_ng_container_1_Template","SelectCustomerDialogComponent_ng_container_1_vdr_form_field_2_Template","customerSelect_r3","includeNoteInput","SelectCustomerDialogComponent_clr_tabs_2_ng_template_5_ng_container_2_Template","customerForm","SelectCustomerDialogComponent_clr_tabs_2_clr_tab_6_ng_template_4_Template","SelectCustomerDialogComponent_clr_tabs_2_ng_template_5_Template","_r4","SelectCustomerDialogComponent_clr_tabs_2_clr_tab_6_Template","canCreateNew","item_r7","firstName","lastName","emailAddress","item_r8","selectedCustomer","SelectCustomerDialogComponent_ng_template_3_ng_template_2_Template","SelectCustomerDialogComponent_ng_template_3_ng_template_3_Template","customers$","isLoading","input$","_r9","SelectCustomerDialogComponent","email","getCustomerList","mapStream","customers","catchError","SelectCustomerDialogComponent_ng_template_0_Template","SelectCustomerDialogComponent_ng_container_1_Template","SelectCustomerDialogComponent_clr_tabs_2_Template","SelectCustomerDialogComponent_ng_template_3_Template","SelectCustomerDialogComponent_ng_template_5_Template","quote_r1","metadata","SelectShippingMethodDialogComponent_vdr_radio_card_2_vdr_object_tree_14_Template","price","priceWithTax","selectedMethod","SelectShippingMethodDialogComponent","currentSelectionId","eligibleShippingMethods","m","methodIdFn","SelectShippingMethodDialogComponent_ng_template_0_Template","SelectShippingMethodDialogComponent_vdr_radio_card_2_Template","SelectShippingMethodDialogComponent_ng_template_3_Template","state_r1","OrderStateSelectDialogComponent_ng_template_7_button_0_Template","cancellable","selectedState","_c0","OrderStateSelectDialogComponent","nextStates","message","OrderStateSelectDialogComponent_ng_template_0_Template","OrderStateSelectDialogComponent_option_6_Template","OrderStateSelectDialogComponent_ng_template_7_Template","OrderTransitionService","modalService","notificationService","transitionToPreModifyingState","getPreModifyingState","manualTransitionOptions","retry","transitionToStateOrThrow","err","manuallyTransitionToState","fromComponent","locals","closable","size","EMPTY","Error","retryWhen","notifier","operate","source","subscriber","innerSub","errors$","syncResub","subscribeForRetryWhen","subscribe","createOperatorSubscriber","undefined","innerFrom","next","unsubscribe","errors","delay","getOrderHistory","type","eq","HistoryEntryType","ORDER_STATE_TRANSITION","sort","createdAt","SortOrder","DESC","history","i","to","from","transitionToState","transitionOrderToState","__typename","error","transitionError","factory","ɵfac","providedIn","editable","onUpdateClick","customFieldForm","onCancelClick","OrderCustomFieldsCardComponent_div_0_button_8_Template","OrderCustomFieldsCardComponent_div_0_button_9_Template","OrderCustomFieldsCardComponent_div_0_button_10_Template","customFieldsConfig","OrderCustomFieldsCardComponent","customFieldValues","updateClick","field","addControl","markAsPristine","dirty","dialog","buttons","label","returnValue","reset","OrderCustomFieldsCardComponent_div_0_Template","fulfilledCount","item_r2","fulfillment","trackingCode","LineFulfillmentComponent_vdr_dropdown_0_div_9_vdr_labeled_data_12_Template","_c1","count","LineFulfillmentComponent_vdr_dropdown_0_clr_icon_2_Template","LineFulfillmentComponent_vdr_dropdown_0_clr_icon_3_Template","LineFulfillmentComponent_vdr_dropdown_0_clr_icon_4_Template","LineFulfillmentComponent_vdr_dropdown_0_label_6_Template","LineFulfillmentComponent_vdr_dropdown_0_label_7_Template","LineFulfillmentComponent_vdr_dropdown_0_label_8_Template","LineFulfillmentComponent_vdr_dropdown_0_div_9_Template","fulfillmentStatus","fulfillments","LineFulfillmentComponent","ngOnChanges","changes","getDeliveredCount","getFulfillmentStatus","getFulfillments","fulfillmentLines","fulfillmentLine","lineQuantity","allOrderFulfillments","f","fulfillmentId","notNullOrUndefined","orderState","features","LineFulfillmentComponent_vdr_dropdown_0_Template","getRefundedCount","LineRefundsComponent","all","refund","LineRefundsComponent_span_0_Template","OrderTotalColumnComponent","DataTable2ColumnComponent","orderable","t","exportAs","encapsulation","onToggleAllClick","selectionManager","areAllCurrentItemsSelected","sort_r4","sortOrder","ngIf","toggleSortOrder","OrderDataTableComponent_th_7_div_5_clr_icon_2_Template","OrderDataTableComponent_th_7_div_5_clr_icon_3_Template","OrderDataTableComponent_th_7_div_5_clr_icon_4_Template","OrderDataTableComponent_th_7_div_5_div_5_Template","OrderDataTableComponent_th_7_div_5_Template","column_r5","expand","align","heading","activeFilter_r7","filters","OrderDataTableComponent_tr_12_ng_container_8_vdr_data_table_filters_2_Template","OrderDataTableComponent_tr_12_ng_container_8_vdr_data_table_filters_3_Template","activeFilters","toggleSearchFilterRow","OrderDataTableComponent_tr_12_ng_container_6_Template","OrderDataTableComponent_tr_12_ng_container_7_Template","OrderDataTableComponent_tr_12_ng_container_8_Template","showSearchFilterRow","searchComponent","customSearchTemplate","_r8","item_r9","onRowClick","activeIndex","i_r11","isSelected","OrderDataTableComponent_tr_14_td_2_ng_container_2_ng_container_1_Template","componentConfig_r12","config","component","_c3","injector","OrderDataTableComponent_tr_14_td_2_ng_template_3_ng_container_0_Template","column_r13","_c4","OrderDataTableComponent_tr_14_td_2_ng_container_2_Template","OrderDataTableComponent_tr_14_td_2_ng_template_3_Template","customComponents","get","defaultComponent_r14","OrderDataTableComponent_tr_14_td_1_Template","OrderDataTableComponent_tr_14_td_2_Template","visibleSortedColumns","surcharge_r15","description","couponCode_r16","OrderDataTableComponent_ng_container_19_tr_1_vdr_chip_4_Template","getPromotionLink","discount_r17","getCouponCodeForAdjustment","amountWithTax","OrderDataTableComponent_ng_container_19_tr_1_Template","shippingLine_r18","shippingMethod","OrderDataTableComponent","DataTable2Component","allColumns","columns","customFieldColumns","totalColumns","sortedColumns","dataTableConfig","getDataTableConfig","column","c","currentIndex","findIndex","splice","promotion","adjustmentSource","split","promotionAdjustment","getShippingNames","shippingLines","shippingLine","join","contentQueries","dirIndex","OrderDataTableComponent_th_6_Template","OrderDataTableComponent_th_7_Template","onColumnReorder","onColumnsReset","OrderDataTableComponent_tr_12_Template","OrderDataTableComponent_tr_14_Template","OrderDataTableComponent_tr_17_Template","OrderDataTableComponent_tr_18_Template","OrderDataTableComponent_ng_container_19_Template","OrderDataTableComponent_vdr_chip_38_Template","disableSelect","selection","uiLanguage$","_c2","itemsPerPage","currentPage","totalItems","surcharges","discounts","subTotalWithTax","subTotal","shippingWithTax","shipping","totalWithTax","total","line_r1","line_r3","updatedAt","asset_r4","OrderTableComponent_ng_template_12_img_1_Template","OrderTableComponent_ng_template_12_ng_template_2_Template","line_r5","imagePlaceholder_r6","line_r7","line_r8","line_r9","ctx_r9","unitPrice","line_r11","orderPlacedQuantity","OrderTableComponent_ng_template_24_ng_container_0_div_2_Template","_r12","qtyInput_r13","draftInputBlur","valueAsNumber","remove","OrderTableComponent_ng_template_24_ng_container_0_Template","OrderTableComponent_ng_template_24_ng_template_1_Template","isDraft","draft_r14","customField_r15","discount_r16","OrderTableComponent_ng_template_28_ng_container_7_vdr_dropdown_1_div_5_Template","discounts_r17","OrderTableComponent_ng_template_28_ng_container_7_vdr_dropdown_1_Template","OrderTableComponent_ng_template_28_ng_container_7_Template","line_r18","linePriceWithTax","linePrice","getLineDiscounts","OrderTableComponent","adjust","orderLineCustomFieldsVisible","customFieldsForLine","visibleOrderLineCustomFields","orderLineCustomFields","showElided","getLineCustomFields","toggleOrderLineCustomFields","AdjustmentType","PROMOTION","formGroup","customFields","OrderTableComponent_ng_template_3_Template","OrderTableComponent_ng_template_6_Template","OrderTableComponent_ng_template_9_Template","OrderTableComponent_ng_template_12_Template","OrderTableComponent_ng_template_15_Template","OrderTableComponent_ng_template_18_Template","OrderTableComponent_ng_template_21_Template","OrderTableComponent_ng_template_24_Template","OrderTableComponent_vdr_dt2_custom_field_column_25_Template","OrderTableComponent_ng_template_28_Template","field_r4","customFieldsFormGroup","DraftOrderVariantSelectorComponent_div_6_ng_container_30_div_1_Template","selectedVariant_r3","addItemClick","DraftOrderVariantSelectorComponent_div_6_ng_container_30_Template","product","stockOnHand","stockAllocated","DraftOrderVariantSelectorComponent","addItem","selectedVariantId$","selectedVariant$","getProductVariant","customField","selectedVariant","productVariantId","DraftOrderVariantSelectorComponent_div_6_Template","completeOrder","deleteOrder","order_r3","DraftOrderDetailComponent_vdr_page_detail_layout_3_ng_template_4_clr_icon_0_Template","DraftOrderDetailComponent_vdr_page_detail_layout_3_ng_template_4_clr_icon_1_Template","order_r5","DraftOrderDetailComponent_vdr_page_detail_layout_3_ng_template_11_clr_icon_0_Template","DraftOrderDetailComponent_vdr_page_detail_layout_3_ng_template_11_clr_icon_1_Template","billingAddress","DraftOrderDetailComponent_vdr_page_detail_layout_3_ng_template_18_clr_icon_0_Template","DraftOrderDetailComponent_vdr_page_detail_layout_3_ng_template_18_clr_icon_1_Template","shippingAddress","shippingLine_r6","displayCouponCodeInput","applyCouponCode","entity_r9","row_r10","taxRate","taxBase","taxTotal","DraftOrderDetailComponent_vdr_page_detail_layout_3_ng_container_39_tr_17_Template","taxSummary","DraftOrderDetailComponent_vdr_page_detail_layout_3_ng_template_4_Template","DraftOrderDetailComponent_vdr_page_detail_layout_3_vdr_customer_label_5_Template","setCustomer","DraftOrderDetailComponent_vdr_page_detail_layout_3_ng_template_11_Template","DraftOrderDetailComponent_vdr_page_detail_layout_3_vdr_formatted_address_12_Template","setBillingAddress","DraftOrderDetailComponent_vdr_page_detail_layout_3_ng_template_18_Template","DraftOrderDetailComponent_vdr_page_detail_layout_3_vdr_formatted_address_19_Template","setShippingAddress","DraftOrderDetailComponent_vdr_page_detail_layout_3_div_23_Template","setShippingMethod","DraftOrderDetailComponent_vdr_page_detail_layout_3_button_28_Template","DraftOrderDetailComponent_vdr_page_detail_layout_3_div_29_Template","DraftOrderDetailComponent_vdr_page_detail_layout_3_vdr_page_entity_info_31_Template","addItemToOrder","adjustOrderLine","removeOrderLine","DraftOrderDetailComponent_vdr_page_detail_layout_3_ng_container_39_Template","updateCustomFields","entity$","detailForm","DraftOrderDetailComponent","TypedBaseDetailComponent","changeDetector","orderTransitionService","super","getCustomFieldConfig","fetchHistory","init","eligibleShippingMethods$","getDraftOrderEligibleShippingMethods","eligibleShippingMethodsForDraftOrder","ngOnDestroy","destroy","event","addItemToDraftOrder","adjustDraftOrderLine","removeDraftOrderLine","getOrderAddressLines","orderAddress","val","hasId","setCustomerForDraftOrder","input","setDraftOrderShippingAddress","setDraftOrderBillingAddress","applyCouponCodeToDraftOrder","removeCouponCodeFromDraftOrder","combineLatest","methods","setDraftOrderShippingMethod","customFieldsValue","updateOrderCustomFields","deleteDraftOrder","DeletionResult","DELETED","success","entity","router","navigate","setFormValues","DraftOrderDetailComponent_vdr_action_bar_1_Template","DraftOrderDetailComponent_vdr_page_detail_layout_3_Template","fulfillmentQuantities","fulfillCount","getUnfulfilledCount","FulfillOrderDialogComponent_tr_22_img_2_Template","FulfillOrderDialogComponent_tr_22_input_12_Template","canSubmit","FulfillOrderDialogComponent","fulfillmentHandlerControl","getGlobalSettings","globalSettings","getFulfillableCount","trackInventory","markForCheck","getShippingMethodOperations","fulfillmentHandlers","handlers","fulfillmentHandlerDef","h","fulfillmentHandlerCode","fulfillmentHandler","configurableDefinitionToInstance","patchValue","globalTrackInventory","effectiveTracInventory","GlobalFlag","INHERIT","TRUE","unfulfilledCount","Math","fulfilled","flat","row","totalCount","fulfillmentQuantityIsValid","every","configurableOperationValueIsValid","handler","toConfigurableOperationInput","FulfillOrderDialogComponent_ng_template_0_Template","FulfillOrderDialogComponent_tr_22_Template","FulfillOrderDialogComponent_ng_template_33_Template","SimpleItemListComponent_li_2_div_1_Template","SimpleItemListComponent_li_2_clr_icon_2_Template","SimpleItemListComponent","SimpleItemListComponent_li_2_Template","customField_r2","customFieldFormGroup","FulfillmentDetailComponent_ng_container_11_vdr_custom_field_control_1_Template","FulfillmentDetailComponent","serverConfigService","customFieldConfig","getCustomFieldsFor","buildCustomFieldsFormGroup","fieldDef","customFieldIsObject","Array","isArray","isObject","FulfillmentDetailComponent_vdr_labeled_data_7_Template","FulfillmentDetailComponent_ng_container_11_Template","FulfillmentStateLabelComponent","chipColorType","FulfillmentStateLabelComponent_clr_icon_2_Template","suggestedState_r3","transitionState","nextState_r5","FulfillmentCardComponent_div_9_ng_container_6_ng_container_2_Template","FulfillmentCardComponent_div_9_ng_container_6_ng_template_3_Template","cancel_r6","FulfillmentCardComponent_div_9_ng_container_1_Template","FulfillmentCardComponent_div_9_ng_container_6_Template","nextSuggestedState","nextOtherStates","FulfillmentCardComponent","namedStateOrDefault","targetState","includes","s","suggested","FulfillmentCardComponent_vdr_fulfillment_detail_8_Template","FulfillmentCardComponent_div_9_Template","modification","tmp_3_0","getSurcharge","surcharge_r2","getAddedItems","getRemovedItems","getModifiedItems","ModificationDetailComponent","addedItems","Map","removedItems","modifiedItems","Set","added","removed","modified","getModifiedLines","modificationLine","add","set","ModificationDetailComponent_vdr_labeled_data_3_Template","ModificationDetailComponent_vdr_labeled_data_4_Template","ModificationDetailComponent_vdr_labeled_data_5_Template","ModificationDetailComponent_vdr_labeled_data_6_Template","ModificationDetailComponent_vdr_labeled_data_7_Template","NODE_HEIGHT","cancelledState","OrderProcessNodeComponent","elementRef","active$","BehaviorSubject","activeTarget$","isCancellable","node","getPos","origin","nativeElement","getBoundingClientRect","nodeHeight","querySelector","height","x","y","getStyle","pos","OrderProcessNodeComponent_div_7_Template","OrderProcessEdgeComponent","asObservable","direction","startPos","endPos","dX","abs","dY","sqrt","transform","state_r2","onMouseOver","onMouseOut","i_r4","activeState$","edge_r5","OrderProcessGraphComponent","setActiveState$","nodes","edges","outerHeight","initialState","populateNodes","ngAfterViewInit","setTimeout","populateEdges","stateName","getNodeFor","nodeComponents","stateNodeMap","states","stateNode","targets","target","targetNode","push","nodeCmp","toCmp","viewQuery","OrderProcessGraphComponent_ng_container_0_Template","OrderProcessGraphComponent_ng_container_1_Template","OrderProcessGraphDialogComponent","getOrderProcessStates","OrderProcessGraphDialogComponent_ng_template_0_Template","activeState","payment_r2","paymentSelected","refundablePayments","PaymentForRefundSelectorComponent_vdr_card_0_ng_template_2_Template","PaymentForRefundSelectorComponent","PaymentForRefundSelectorComponent_vdr_card_0_Template","RefundOrderDialogComponent_ng_template_14_img_1_Template","RefundOrderDialogComponent_ng_template_14_ng_template_2_Template","discount_r11","line_r12","RefundOrderDialogComponent_ng_template_26_ng_container_2_vdr_dropdown_1_div_5_Template","discounts_r13","RefundOrderDialogComponent_ng_template_26_ng_container_2_vdr_dropdown_1_Template","RefundOrderDialogComponent_ng_template_26_ng_container_2_Template","line_r14","_r15","line_r16","onRefundQuantityChange","RefundOrderDialogComponent_ng_template_32_input_0_Template","lineCanBeRefundedOrCancelled","_r17","RefundOrderDialogComponent_ng_template_35_input_2_Template","shippingLine_r20","_r19","toggleShippingRefund","discountedPriceWithTax","totalRefundableAmount","RefundOrderDialogComponent_ng_template_49_clr_alert_2_Template","RefundOrderDialogComponent_ng_template_49_clr_alert_3_Template","RefundOrderDialogComponent_ng_template_49_clr_alert_4_Template","_r21","refundTotal","amountToRefundTotal","RefundOrderDialogComponent","refundShippingLineIds","manuallySetRefundTotal","refundLine","updateRefundTotal","itemTotal","refundCount","proratedUnitPriceWithTax","shippingTotal","refundsAllocated","amountToRefund","setValue","indexOf","selectionLine","previousQuantity","onPaymentSelected","outstandingRefundAmount","isRefunding","isCancelling","refundLines","getOrderLineInput","cancelLines","rp","paymentId","adjustment","filterFn","RefundOrderDialogComponent_ng_template_0_Template","RefundOrderDialogComponent_ng_template_5_Template","RefundOrderDialogComponent_ng_template_8_Template","RefundOrderDialogComponent_ng_template_11_Template","RefundOrderDialogComponent_ng_template_14_Template","RefundOrderDialogComponent_ng_template_17_Template","RefundOrderDialogComponent_ng_template_20_Template","RefundOrderDialogComponent_ng_template_23_Template","RefundOrderDialogComponent_ng_template_26_Template","RefundOrderDialogComponent_ng_template_29_Template","RefundOrderDialogComponent_ng_template_32_Template","RefundOrderDialogComponent_ng_template_35_Template","RefundOrderDialogComponent_label_39_Template","RefundOrderDialogComponent_ng_template_49_Template","SettleRefundDialogComponent","SettleRefundDialogComponent_ng_template_0_Template","SettleRefundDialogComponent_ng_template_9_Template","PaymentStateLabelComponent","PaymentStateLabelComponent_clr_icon_2_Template","RefundStateLabelComponent","RefundStateLabelComponent_clr_icon_2_Template","errorMessage","PaymentDetailComponent","PaymentDetailComponent_vdr_labeled_data_7_Template","PaymentDetailComponent_vdr_labeled_data_8_Template","refund_r2","settleRefund","OrderPaymentCardComponent_ng_container_10_vdr_labeled_data_17_Template","OrderPaymentCardComponent_ng_container_10_vdr_labeled_data_18_Template","OrderPaymentCardComponent_ng_container_10_vdr_labeled_data_19_Template","OrderPaymentCardComponent_ng_container_10_div_20_Template","refundHasMetadata","settlePayment","nextState_r6","transitionPaymentState","OrderPaymentCardComponent_div_11_ng_container_6_ng_container_2_Template","OrderPaymentCardComponent_div_11_ng_container_6_ng_template_3_Template","cancel_r7","OrderPaymentCardComponent_div_11_button_1_Template","OrderPaymentCardComponent_div_11_ng_container_6_Template","OrderPaymentCardComponent","keys","OrderPaymentCardComponent_ng_container_5_Template","OrderPaymentCardComponent_ng_container_10_Template","OrderPaymentCardComponent_div_11_Template","OrderHistoryEntryHostComponent","historyEntryComponentService","expandClick","componentType","getComponent","entry","componentRef","portalRef","createComponent","instance","ViewContainerRef","getDisplayType","getIconShape","getName","isFeatured","expanded","entry_r3","OrderHistoryComponent_ng_container_15_ng_template_2_ng_container_2_div_1_Template","OrderHistoryComponent_ng_container_15_ng_template_2_ng_container_2_div_2_Template","OrderHistoryComponent_ng_container_15_ng_template_2_ng_container_2_ng_template_3_Template","OrderHistoryComponent_ng_container_15_ng_template_2_ng_container_3_div_4_vdr_chip_6_Template","OrderHistoryComponent_ng_container_15_ng_template_2_ng_container_3_div_4_vdr_chip_7_Template","modification_r5","priceChange","isSettled","OrderHistoryComponent_ng_container_15_ng_template_2_ng_container_3_div_4_Template","getModification","modificationId","payment_r6","payment_r7","OrderHistoryComponent_ng_container_15_ng_template_2_ng_container_4_ng_container_1_vdr_chip_5_Template","OrderHistoryComponent_ng_container_15_ng_template_2_ng_container_4_ng_container_1_vdr_history_entry_detail_6_Template","getPayment","tmp_7_0","OrderHistoryComponent_ng_container_15_ng_template_2_ng_container_4_ng_container_1_Template","OrderHistoryComponent_ng_container_15_ng_template_2_ng_container_4_ng_template_2_Template","regularPaymentTransition_r8","refund_r9","getCancelledItems","OrderHistoryComponent_ng_container_15_ng_template_2_ng_container_5_ng_container_1_ng_container_1_Template","getRefund","refundId","OrderHistoryComponent_ng_container_15_ng_template_2_ng_container_5_ng_container_1_Template","OrderHistoryComponent_ng_container_15_ng_template_2_ng_container_5_ng_template_2_Template","regularRefundTransition_r10","items_r11","shippingCancelled","OrderHistoryComponent_ng_container_15_ng_template_2_ng_container_6_vdr_history_entry_detail_3_Template","getCancelledQuantity","fulfillment_r12","OrderHistoryComponent_ng_container_15_ng_template_2_ng_container_7_vdr_history_entry_detail_3_Template","getFulfillment","fulfillment_r13","OrderHistoryComponent_ng_container_15_ng_template_2_ng_container_8_ng_container_1_Template","OrderHistoryComponent_ng_container_15_ng_template_2_ng_container_8_ng_container_2_Template","OrderHistoryComponent_ng_container_15_ng_template_2_ng_container_8_ng_container_3_Template","OrderHistoryComponent_ng_container_15_ng_template_2_ng_container_8_vdr_history_entry_detail_4_Template","OrderHistoryComponent_ng_container_15_ng_template_2_ng_container_9_span_3_Template","OrderHistoryComponent_ng_container_15_ng_template_2_ng_container_9_span_4_Template","_r14","updateNote","deleteNote","isPublic","promotionId","_c5","previousCustomerId","previousCustomerName","newCustomerId","newCustomerName","OrderHistoryComponent_ng_container_15_ng_template_2_ng_container_12_a_11_Template","OrderHistoryComponent_ng_container_15_ng_template_2_ng_container_12_a_14_Template","OrderHistoryComponent_ng_container_15_ng_template_2_ng_container_13_vdr_history_entry_detail_4_Template","OrderHistoryComponent_ng_container_15_ng_template_2_ng_container_2_Template","OrderHistoryComponent_ng_container_15_ng_template_2_ng_container_3_Template","OrderHistoryComponent_ng_container_15_ng_template_2_ng_container_4_Template","OrderHistoryComponent_ng_container_15_ng_template_2_ng_container_5_Template","OrderHistoryComponent_ng_container_15_ng_template_2_ng_container_6_Template","OrderHistoryComponent_ng_container_15_ng_template_2_ng_container_7_Template","OrderHistoryComponent_ng_container_15_ng_template_2_ng_container_8_Template","OrderHistoryComponent_ng_container_15_ng_template_2_ng_container_9_Template","OrderHistoryComponent_ng_container_15_ng_template_2_ng_container_10_Template","OrderHistoryComponent_ng_container_15_ng_template_2_ng_container_11_Template","OrderHistoryComponent_ng_container_15_ng_template_2_ng_container_12_Template","OrderHistoryComponent_ng_container_15_ng_template_2_ng_container_13_Template","getTimelineIcon","ORDER_MODIFIED","ORDER_PAYMENT_TRANSITION","ORDER_REFUND_TRANSITION","ORDER_CANCELLATION","ORDER_FULFILLMENT","ORDER_FULFILLMENT_TRANSITION","ORDER_NOTE","ORDER_COUPON_APPLIED","ORDER_COUPON_REMOVED","ORDER_CUSTOMER_UPDATED","OrderHistoryComponent_ng_container_15_vdr_order_history_entry_host_1_Template","OrderHistoryComponent_ng_container_15_ng_template_2_Template","hasCustomComponent","defaultComponents_r15","OrderHistoryComponent","addNote","noteIsPrivate","cancellationLines","itemMap","cancellationLine","modifications","administrator","addNoteToOrder","OrderHistoryComponent_span_13_Template","OrderHistoryComponent_span_14_Template","OrderHistoryComponent_ng_container_15_Template","GET_SELLER_ORDERS","seller_r1","order_r2","SellerOrdersCardComponent_div_3_vdr_labeled_data_7_Template","SellerOrdersCardComponent_div_3_vdr_labeled_data_8_Template","getSeller","SellerOrdersCardComponent","channelService","sellerOrders$","sellerOrders","channels","channel","DEFAULT_CHANNEL_CODE","seller","navigateToSellerOrder","SellerOrdersCardComponent_div_3_Template","addManualPayment","outstandingPaymentAmount","fulfillOrder","canAddFulfillment","transitionToModifying","cancelOrRefund","OrderDetailComponent_vdr_action_bar_1_button_9_ng_container_2_Template","OrderDetailComponent_vdr_action_bar_1_button_9_ng_template_3_Template","orderHasSettledPayments","cancelOnly_r9","nextState_r11","_r10","OrderDetailComponent_vdr_action_bar_1_ng_container_10_button_2_Template","nextStates$","OrderDetailComponent_vdr_action_bar_1_button_4_Template","OrderDetailComponent_vdr_action_bar_1_button_5_Template","OrderDetailComponent_vdr_action_bar_1_button_6_Template","OrderDetailComponent_vdr_action_bar_1_ng_container_8_Template","OrderDetailComponent_vdr_action_bar_1_button_9_Template","OrderDetailComponent_vdr_action_bar_1_ng_container_10_Template","hasUnsettledModifications","tmp_8_0","_r13","openStateDiagram","setOrderCustomer","OrderDetailComponent_vdr_page_detail_layout_3_ng_template_8_button_0_Template","order_r15","_r16","payment_r17","OrderDetailComponent_vdr_page_detail_layout_3_vdr_card_12_vdr_order_payment_card_2_Template","fulfillment_r19","_r18","transitionFulfillment","OrderDetailComponent_vdr_page_detail_layout_3_vdr_card_13_vdr_fulfillment_card_1_Template","entity_r20","row_r21","_r22","OrderDetailComponent_vdr_page_detail_layout_3_ng_template_4_Template","OrderDetailComponent_vdr_page_detail_layout_3_ng_template_8_Template","OrderDetailComponent_vdr_page_detail_layout_3_vdr_labeled_data_10_Template","OrderDetailComponent_vdr_page_detail_layout_3_vdr_labeled_data_11_Template","OrderDetailComponent_vdr_page_detail_layout_3_vdr_card_12_Template","OrderDetailComponent_vdr_page_detail_layout_3_vdr_card_13_Template","OrderDetailComponent_vdr_page_detail_layout_3_vdr_page_entity_info_15_Template","OrderDetailComponent_vdr_page_detail_layout_3_vdr_seller_orders_card_18_Template","OrderDetailComponent_vdr_page_detail_layout_3_tr_39_Template","OrderDetailComponent_vdr_page_detail_layout_3_vdr_card_40_Template","history$","ORDER_DETAIL_QUERY","ORDER_DETAIL_FRAGMENT","SET_ORDER_CUSTOMER_MUTATION","OrderDetailComponent","FormGroup","getCustomFieldsDefaults","defaultStates","relativeTo","route","isExisting","mutate","SetOrderCustomerDocument","refetchOrder","getOrder","cancelPayment","paymentErrorMessage","transitionPaymentToState","allFulfillmentLines","allItemsFulfilled","getOutstandingModificationAmount","paymentIsValid","amountCovered","refundsTotal","priorState","addManualPaymentToOrder","createFulfillment","mapTo","addFulfillmentToOrder","fulfillmentHandlerError","JSON","stringify","assertNever","transitionFulfillmentToState","isRefundable","refundOrder","cancelOrder","EditNoteDialogComponent","displayPrivacyControls","updateOrderNote","noteId","isPrivate","body","res","deleteOrderNote","forkJoin","results","setCustomFieldFormValues","i3","OrderDetailComponent_vdr_action_bar_1_Template","OrderDetailComponent_vdr_page_detail_layout_3_Template","OrderModificationSummaryComponent_vdr_labeled_data_0_div_2_Template","modifyOrderInput","adjustOrderLines","adjustedLines","item_r3","OrderModificationSummaryComponent_vdr_labeled_data_1_div_2_Template","addItems","addedLines","surcharge_r4","orderSnapshot","OrderModificationSummaryComponent_vdr_labeled_data_2_div_2_Template","updatedShippingFields_r5","updatedBillingFields_r6","change_r7","OrderModificationSummaryComponent_vdr_labeled_data_5_div_2_Template","couponCodeChanges","change_r8","OrderModificationSummaryComponent_ng_container_6_vdr_labeled_data_1_div_2_Template","updatedShippingMethods_r9","OrderModificationSummaryComponent_ng_container_6_vdr_labeled_data_1_Template","OrderModificationSummaryComponent","delta","getModifiedFields","controls","key","getUpdatedShippingMethodLines","updatedShippingMethods","previousMethod","originalCodes","newCodes","couponCodesControl","shippingAddressForm","billingAddressForm","OrderModificationSummaryComponent_vdr_labeled_data_0_Template","OrderModificationSummaryComponent_vdr_labeled_data_1_Template","OrderModificationSummaryComponent_vdr_labeled_data_2_Template","OrderModificationSummaryComponent_vdr_labeled_data_3_Template","OrderModificationSummaryComponent_vdr_labeled_data_4_Template","OrderModificationSummaryComponent_vdr_labeled_data_5_Template","OrderModificationSummaryComponent_ng_container_6_Template","refundNote","OrderEditsPreviewDialogComponent_ng_template_13_clr_alert_2_Template","priceDifference","refundsCoverDifference","OrderEditResultType","Refund","Payment","PriceUnchanged","Cancel","OrderEditsPreviewDialogComponent","forEach","addValidators","OrderEditsPreviewDialogComponent_ng_template_0_Template","OrderEditsPreviewDialogComponent_vdr_payment_for_refund_selector_4_Template","OrderEditsPreviewDialogComponent_vdr_form_field_12_Template","OrderEditsPreviewDialogComponent_ng_template_13_Template","transitionToPriorState","editingShippingAddress","addressCustomFields","editingBillingAddress","line_r10","asset_r11","OrderEditorComponent_vdr_page_detail_layout_3_ng_template_45_img_1_Template","OrderEditorComponent_vdr_page_detail_layout_3_ng_template_45_ng_template_2_Template","imagePlaceholder_r13","line_r15","removeAddedItem","updateLineQuantity","OrderEditorComponent_vdr_page_detail_layout_3_ng_template_57_button_1_Template","getInitialLineQuantity","isAddedLine","customField_r21","orderLineCustomFieldsFormArray","at","index_r20","OrderEditorComponent_vdr_page_detail_layout_3_vdr_dt2_column_58_ng_template_3_Template","asset_r22","OrderEditorComponent_vdr_page_detail_layout_3_div_64_img_1_Template","addItemSelectedVariant","productAsset","productVariantName","getSelectedItemPrice","customField_r23","addItemCustomFieldsForm","OrderEditorComponent_vdr_page_detail_layout_3_div_65_ng_container_1_Template","_r24","_r25","shippingLine_r26","details_r27","OrderEditorComponent_vdr_page_detail_layout_3_div_71_ng_container_1_Template","getShippingLineDetails","OrderEditorComponent_vdr_page_detail_layout_3_div_5_Template","recalculateShipping","previewAndModify","OrderEditorComponent_vdr_page_detail_layout_3_ng_template_23_Template","OrderEditorComponent_vdr_page_detail_layout_3_vdr_formatted_address_24_Template","OrderEditorComponent_vdr_page_detail_layout_3_vdr_address_form_25_Template","OrderEditorComponent_vdr_page_detail_layout_3_ng_template_28_Template","OrderEditorComponent_vdr_page_detail_layout_3_vdr_formatted_address_29_Template","OrderEditorComponent_vdr_page_detail_layout_3_vdr_address_form_30_Template","OrderEditorComponent_vdr_page_detail_layout_3_ng_template_36_Template","OrderEditorComponent_vdr_page_detail_layout_3_ng_template_39_Template","OrderEditorComponent_vdr_page_detail_layout_3_ng_template_42_Template","OrderEditorComponent_vdr_page_detail_layout_3_ng_template_45_Template","OrderEditorComponent_vdr_page_detail_layout_3_ng_template_48_Template","OrderEditorComponent_vdr_page_detail_layout_3_ng_template_51_Template","OrderEditorComponent_vdr_page_detail_layout_3_ng_template_54_Template","OrderEditorComponent_vdr_page_detail_layout_3_ng_template_57_Template","OrderEditorComponent_vdr_page_detail_layout_3_vdr_dt2_column_58_Template","OrderEditorComponent_vdr_page_detail_layout_3_div_64_Template","OrderEditorComponent_vdr_page_detail_layout_3_div_65_Template","OrderEditorComponent_vdr_page_detail_layout_3_button_68_Template","OrderEditorComponent_vdr_page_detail_layout_3_div_71_Template","addSurcharge","surchargeForm","hasModifications","tmp_55_0","tmp_58_0","OrderEditorComponent","changeDetectorRef","dryRun","updateShippingAddress","updateBillingAddress","minLength","priceIncludesTax","taxDescription","addedVariants","snapshot","paramMap","createOrderSnapshot","addAddressCustomFieldsFormGroup","UntypedFormArray","valueChanges","takeUntil","destroy$","modifyRow","addItemCustomFieldsFormArray","shareReplay","previousState","client","uiState","stream$","language","getSinglePriceValue","variantInfo","getIdForAddedItem","isLineModified","adjustedLine","addedLine","startsWith","updateAddedItemQuantity","trackByProductVariantId","isMatchingAddItemRow","updatedMethod","shippingLineId","currentShippingMethod","getSurchargePrices","surcharge","round","removeSurcharge","transformRelationCustomFieldInputs","simpleDeepClone","shippingMethodIds","modifyOrder","wetRunInput","nextState","parentFormGroup","address","addressCustomFieldsFormGroup","customFieldDef","languageCode","OrderEditorComponent_vdr_action_bar_1_Template","OrderEditorComponent_vdr_page_detail_layout_3_Template","OrderListComponent_ng_container_4_a_1_Template","order_r1","stopPropagation","OrderListComponent_ng_template_28_vdr_chip_0_Template","OrderListComponent_ng_template_28_vdr_chip_1_Template","OrderListComponent_ng_template_28_vdr_chip_2_Template","order_r6","ctx_r6","OrderType","Regular","Aggregate","Seller","order_r8","order_r9","order_r10","order_r11","orderPlacedAt","order_r12","customField_r13","sorts","OrderListComponent","TypedBaseListComponent","orderStates","createFilterCollection","addIdFilter","addDateFilters","addFilter","kind","filterField","inputType","getOrderStateTranslationToken","addCustomFieldFilters","connectToRoute","createSortCollection","defaultSort","addSort","addCustomFieldSorts","canCreateDraftOrder","activeChannelIsDefaultChannel","configure","document","GetOrderListDocument","getItems","orders","setVariables","createQueryOptions","searchTermControl","refreshListOnChanges","isDefaultChannel$","defaultChannelIsActive$","isDefault","searchTerm","filterInput","createFilterInput","customerLastName","filterOperator","LogicalOperator","OR","AND","createSortInput","OrderListComponent_ng_container_4_Template","setPageNumber","setItemsPerPage","OrderListComponent_ng_template_16_Template","OrderListComponent_ng_template_19_Template","OrderListComponent_ng_template_22_Template","OrderListComponent_ng_template_25_Template","OrderListComponent_ng_template_28_Template","OrderListComponent_ng_template_31_Template","OrderListComponent_ng_template_34_Template","OrderListComponent_ng_template_37_Template","OrderListComponent_ng_template_40_Template","OrderListComponent_ng_template_43_Template","OrderListComponent_vdr_dt2_custom_field_column_44_Template","items$","itemsPerPage$","totalItems$","currentPage$","RefundDetailComponent","RefundDetailComponent_vdr_labeled_data_4_Template","GET_CUSTOMER_ADDRESSES","ADDRESS_FRAGMENT","GET_ORDER_STATE","OrderGuard","canActivate","url","isModifying","createDraftOrder","parseUrl","createRoutes","pageService","path","PageComponent","pathMatch","locationId","breadcrumb","children","getPageTabRoutes","link","OrderModule","hasRegisteredTabsAndBulkActions","registerPageTab","priority","location","tab","detailComponentWithResolver","OrderDetailQueryDocument","entityKey","getBreadcrumbs","aggregateOrder","provide","ROUTES","useFactory","multi","deps","PageService","imports","SharedModule","RouterModule","forChild"],"ignoreList":[],"sourceRoot":"webpack:///","sources":["./src/lib/order/src/common/get-refundable-payments.ts","./src/lib/order/src/components/add-manual-payment-dialog/add-manual-payment-dialog.component.html","./src/lib/order/src/components/add-manual-payment-dialog/add-manual-payment-dialog.component.ts","./src/lib/order/src/components/cancel-order-dialog/cancel-order-dialog.component.html","./src/lib/order/src/components/cancel-order-dialog/cancel-order-dialog.component.ts","./src/lib/order/src/components/coupon-code-selector/coupon-code-selector.component.html","./src/lib/order/src/components/coupon-code-selector/coupon-code-selector.component.ts","./src/lib/order/src/components/select-address-dialog/select-address-dialog.component.html","./src/lib/order/src/components/select-address-dialog/select-address-dialog.component.ts","./src/lib/order/src/components/select-customer-dialog/select-customer-dialog.component.html","./src/lib/order/src/components/select-customer-dialog/select-customer-dialog.component.ts","./src/lib/order/src/components/select-shipping-method-dialog/select-shipping-method-dialog.component.html","./src/lib/order/src/components/select-shipping-method-dialog/select-shipping-method-dialog.component.ts","./src/lib/order/src/components/order-state-select-dialog/order-state-select-dialog.component.html","./src/lib/order/src/components/order-state-select-dialog/order-state-select-dialog.component.ts","./src/lib/order/src/providers/order-transition.service.ts","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/retryWhen.js","./src/lib/order/src/components/order-custom-fields-card/order-custom-fields-card.component.html","./src/lib/order/src/components/order-custom-fields-card/order-custom-fields-card.component.ts","./src/lib/order/src/components/line-fulfillment/line-fulfillment.component.html","./src/lib/order/src/components/line-fulfillment/line-fulfillment.component.ts","./src/lib/order/src/components/line-refunds/line-refunds.component.html","./src/lib/order/src/components/line-refunds/line-refunds.component.ts","./src/lib/order/src/components/order-data-table/order-total-column.component.ts","./src/lib/order/src/components/order-data-table/order-data-table.component.html","./src/lib/order/src/components/order-data-table/order-data-table.component.ts","./src/lib/order/src/components/order-table/order-table.component.html","./src/lib/order/src/components/order-table/order-table.component.ts","./src/lib/order/src/components/draft-order-variant-selector/draft-order-variant-selector.component.html","./src/lib/order/src/components/draft-order-variant-selector/draft-order-variant-selector.component.ts","./src/lib/order/src/components/draft-order-detail/draft-order-detail.component.html","./src/lib/order/src/components/draft-order-detail/draft-order-detail.component.ts","./src/lib/order/src/components/fulfill-order-dialog/fulfill-order-dialog.component.html","./src/lib/order/src/components/fulfill-order-dialog/fulfill-order-dialog.component.ts","./src/lib/order/src/components/simple-item-list/simple-item-list.component.html","./src/lib/order/src/components/simple-item-list/simple-item-list.component.ts","./src/lib/order/src/components/fulfillment-detail/fulfillment-detail.component.html","./src/lib/order/src/components/fulfillment-detail/fulfillment-detail.component.ts","./src/lib/order/src/components/fulfillment-state-label/fulfillment-state-label.component.html","./src/lib/order/src/components/fulfillment-state-label/fulfillment-state-label.component.ts","./src/lib/order/src/components/fulfillment-card/fulfillment-card.component.html","./src/lib/order/src/components/fulfillment-card/fulfillment-card.component.ts","./src/lib/order/src/components/modification-detail/modification-detail.component.html","./src/lib/order/src/components/modification-detail/modification-detail.component.ts","./src/lib/order/src/components/order-process-graph/constants.ts","./src/lib/order/src/components/order-process-graph/order-process-node.component.html","./src/lib/order/src/components/order-process-graph/order-process-node.component.ts","./src/lib/order/src/components/order-process-graph/order-process-edge.component.ts","./src/lib/order/src/components/order-process-graph/order-process-edge.component.html","./src/lib/order/src/components/order-process-graph/order-process-graph.component.html","./src/lib/order/src/components/order-process-graph/order-process-graph.component.ts","./src/lib/order/src/components/order-process-graph-dialog/order-process-graph-dialog.component.html","./src/lib/order/src/components/order-process-graph-dialog/order-process-graph-dialog.component.ts","./src/lib/order/src/components/payment-for-refund-selector/payment-for-refund-selector.component.html","./src/lib/order/src/components/payment-for-refund-selector/payment-for-refund-selector.component.ts","./src/lib/order/src/components/refund-order-dialog/refund-order-dialog.component.html","./src/lib/order/src/components/refund-order-dialog/refund-order-dialog.component.ts","./src/lib/order/src/components/settle-refund-dialog/settle-refund-dialog.component.html","./src/lib/order/src/components/settle-refund-dialog/settle-refund-dialog.component.ts","./src/lib/order/src/components/payment-state-label/payment-state-label.component.html","./src/lib/order/src/components/payment-state-label/payment-state-label.component.ts","./src/lib/order/src/components/refund-state-label/refund-state-label.component.html","./src/lib/order/src/components/refund-state-label/refund-state-label.component.ts","./src/lib/order/src/components/payment-detail/payment-detail.component.html","./src/lib/order/src/components/payment-detail/payment-detail.component.ts","./src/lib/order/src/components/order-payment-card/order-payment-card.component.html","./src/lib/order/src/components/order-payment-card/order-payment-card.component.ts","./src/lib/order/src/components/order-history/order-history-entry-host.component.ts","./src/lib/order/src/components/order-history/order-history.component.html","./src/lib/order/src/components/order-history/order-history.component.ts","./src/lib/order/src/components/seller-orders-card/seller-orders-card.graphql.ts","./src/lib/order/src/components/seller-orders-card/seller-orders-card.component.html","./src/lib/order/src/components/seller-orders-card/seller-orders-card.component.ts","./src/lib/order/src/components/order-detail/order-detail.component.html","./src/lib/order/src/components/order-detail/order-detail.component.ts","./src/lib/order/src/components/order-modification-summary/order-modification-summary.component.html","./src/lib/order/src/components/order-modification-summary/order-modification-summary.component.ts","./src/lib/order/src/components/order-edits-preview-dialog/order-edits-preview-dialog.component.html","./src/lib/order/src/components/order-edits-preview-dialog/order-edits-preview-dialog.component.ts","./src/lib/order/src/components/order-editor/order-editor.component.html","./src/lib/order/src/components/order-editor/order-editor.component.ts","./src/lib/order/src/components/order-list/order-list.component.html","./src/lib/order/src/components/order-list/order-list.component.ts","./src/lib/order/src/components/refund-detail/refund-detail.component.html","./src/lib/order/src/components/refund-detail/refund-detail.component.ts","./src/lib/order/src/components/select-address-dialog/select-address-dialog.graphql.ts","./src/lib/order/src/providers/routing/order.guard.ts","./src/lib/order/src/order.routes.ts","./src/lib/order/src/order.module.ts"],"sourcesContent":["import { FormControl, Validators } from '@angular/forms';\nimport { OrderDetailFragment } from '@deenruv/admin-ui/core';\nimport { summate } from '@deenruv/common/lib/shared-utils';\n\nexport type Payment = NonNullable<OrderDetailFragment['payments']>[number];\nexport type RefundablePayment = Payment & {\n refundableAmount: number;\n amountToRefundControl: FormControl<number>;\n selected: boolean;\n};\n\nexport function getRefundablePayments(payments: OrderDetailFragment['payments']): RefundablePayment[] {\n const settledPayments = (payments || []).filter(p => p.state === 'Settled');\n return settledPayments.map((payment, index) => {\n const refundableAmount =\n payment.amount -\n summate(\n payment.refunds.filter(r => r.state !== 'Failed'),\n 'total',\n );\n return {\n ...payment,\n refundableAmount,\n amountToRefundControl: new FormControl(0, {\n nonNullable: true,\n validators: [Validators.min(0), Validators.max(refundableAmount)],\n }),\n selected: index === 0,\n };\n });\n}\n","<ng-template vdrDialogTitle>{{ 'order.add-payment-to-order' | translate }}</ng-template>\n<form [formGroup]=\"form\">\n <vdr-form-field [label]=\"'order.payment-method' | translate\" for=\"method\">\n <ng-select\n [items]=\"paymentMethods$ | async\"\n bindLabel=\"code\"\n appendTo=\"body\"\n autofocus\n bindValue=\"code\"\n [addTag]=\"true\"\n formControlName=\"method\"\n ></ng-select>\n </vdr-form-field>\n <vdr-form-field [label]=\"'order.transaction-id' | translate\" for=\"transactionId\">\n <input id=\"transactionId\" type=\"text\" formControlName=\"transactionId\" />\n </vdr-form-field>\n</form>\n<ng-template vdrDialogButtons>\n <button type=\"button\" class=\"btn\" (click)=\"cancel()\">{{ 'common.cancel' | translate }}</button>\n <button type=\"submit\" (click)=\"submit()\" class=\"btn btn-primary\" [disabled]=\"form.invalid || form.pristine\">\n {{ 'order.add-payment' | translate }} ({{ outstandingAmount | localeCurrency: currencyCode }})\n </button>\n</ng-template>\n","import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';\nimport { UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';\nimport {\n CurrencyCode,\n DataService,\n Dialog,\n GetAddManualPaymentMethodListDocument,\n GetAddManualPaymentMethodListQuery,\n GetPaymentMethodListQuery,\n ItemOf,\n ManualPaymentInput,\n PAYMENT_METHOD_FRAGMENT,\n} from '@deenruv/admin-ui/core';\nimport { gql } from 'apollo-angular';\nimport { Observable } from 'rxjs';\n\nconst GET_PAYMENT_METHODS_FOR_MANUAL_ADD = gql`\n query GetAddManualPaymentMethodList($options: PaymentMethodListOptions!) {\n paymentMethods(options: $options) {\n items {\n id\n createdAt\n updatedAt\n name\n code\n description\n enabled\n }\n totalItems\n }\n }\n`;\n\n@Component({\n selector: 'vdr-add-manual-payment-dialog',\n templateUrl: './add-manual-payment-dialog.component.html',\n styleUrls: ['./add-manual-payment-dialog.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AddManualPaymentDialogComponent implements OnInit, Dialog<Omit<ManualPaymentInput, 'orderId'>> {\n // populated by ModalService call\n outstandingAmount: number;\n currencyCode: CurrencyCode;\n\n resolveWith: (result?: Omit<ManualPaymentInput, 'orderId'>) => void;\n form = new UntypedFormGroup({\n method: new UntypedFormControl('', Validators.required),\n transactionId: new UntypedFormControl('', Validators.required),\n });\n paymentMethods$: Observable<Array<ItemOf<GetAddManualPaymentMethodListQuery, 'paymentMethods'>>>;\n constructor(private dataService: DataService) {}\n\n ngOnInit(): void {\n this.paymentMethods$ = this.dataService\n .query(GetAddManualPaymentMethodListDocument, {\n options: {\n take: 999,\n },\n })\n .mapSingle(data => data.paymentMethods.items);\n }\n\n submit() {\n const formValue = this.form.value;\n this.resolveWith({\n method: formValue.method,\n transactionId: formValue.transactionId,\n });\n }\n\n cancel() {\n this.resolveWith();\n }\n}\n","<ng-template vdrDialogTitle>{{ 'order.cancel-order' | translate }}</ng-template>\n\n<div class=\"fulfillment-wrapper\">\n <div class=\"order-lines\">\n <table class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th>{{ 'order.product-name' | translate }}</th>\n <th>{{ 'order.product-sku' | translate }}</th>\n <th>{{ 'order.quantity' | translate }}</th>\n <th>{{ 'order.unit-price' | translate }}</th>\n <th>{{ 'order.cancel' | translate }}</th>\n </tr>\n </thead>\n <tr\n *ngFor=\"let line of order.lines\"\n class=\"order-line\"\n [class.is-disabled]=\"cancelAll\"\n [class.is-cancelled]=\"line.quantity === 0\"\n >\n <td class=\"align-middle thumb\">\n <img [src]=\"line.featuredAsset | assetPreview: 'tiny'\" />\n </td>\n <td class=\"align-middle name\">{{ line.productVariant.name }}</td>\n <td class=\"align-middle sku\">{{ line.productVariant.sku }}</td>\n <td class=\"align-middle quantity\">{{ line.quantity }}</td>\n <td class=\"align-middle quantity\">\n {{ line.unitPriceWithTax | localeCurrency: order.currencyCode }}\n </td>\n <td class=\"align-middle fulfil\">\n <input\n *ngIf=\"line.quantity > 0 && !order.active; else nonEditable\"\n [(ngModel)]=\"lineQuantities[line.id]\"\n (input)=\"checkIfAllSelected()\"\n [disabled]=\"cancelAll\"\n type=\"number\"\n [max]=\"line.quantity\"\n min=\"0\"\n />\n <ng-template #nonEditable>{{ line.quantity }}</ng-template>\n </td>\n </tr>\n </table>\n </div>\n <div class=\"cancellation-details\">\n <ng-container *ngIf=\"order.active !== true\">\n <clr-radio-wrapper>\n <input\n type=\"radio\"\n clrRadio\n [value]=\"true\"\n [(ngModel)]=\"cancelAll\"\n name=\"options\"\n (ngModelChange)=\"radioChanged()\"\n />\n <label>{{ 'order.cancel-entire-order' | translate }}</label>\n </clr-radio-wrapper>\n <clr-radio-wrapper>\n <input\n type=\"radio\"\n clrRadio\n [value]=\"false\"\n [(ngModel)]=\"cancelAll\"\n name=\"options\"\n (ngModelChange)=\"radioChanged()\"\n />\n <label>{{ 'order.cancel-specified-items' | translate }}</label>\n </clr-radio-wrapper>\n </ng-container>\n <label class=\"clr-control-label\">{{ 'order.cancellation-reason' | translate }}</label>\n <ng-select\n [items]=\"reasons\"\n bindLabel=\"name\"\n autofocus\n bindValue=\"id\"\n [addTag]=\"true\"\n [(ngModel)]=\"reason\"\n ></ng-select>\n </div>\n</div>\n\n<ng-template vdrDialogButtons>\n <button type=\"button\" class=\"btn\" (click)=\"cancel()\">{{ 'common.cancel' | translate }}</button>\n <button\n type=\"submit\"\n (click)=\"select()\"\n [disabled]=\"!reason || (!order.active && selectionCount === 0)\"\n class=\"btn btn-primary\"\n >\n <ng-container *ngIf=\"!order.active\">\n {{ 'order.cancel-selected-items' | translate }}\n </ng-container>\n <ng-container *ngIf=\"order.active\">\n {{ 'order.cancel-order' | translate }}\n </ng-container>\n </button>\n</ng-template>\n","import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';\nimport { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';\nimport {\n CancelOrderInput,\n Dialog,\n getAppConfig,\n I18nService,\n OrderDetailFragment,\n OrderLineInput,\n} from '@deenruv/admin-ui/core';\n\n@Component({\n selector: 'vdr-cancel-order-dialog',\n templateUrl: './cancel-order-dialog.component.html',\n styleUrls: ['./cancel-order-dialog.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CancelOrderDialogComponent implements OnInit, Dialog<CancelOrderInput> {\n order: OrderDetailFragment;\n cancelAll = true;\n resolveWith: (result?: CancelOrderInput) => void;\n reason: string;\n lineQuantities: { [lineId: string]: number } = {};\n reasons: string[] = getAppConfig().cancellationReasons ?? [\n _('order.cancel-reason-customer-request'),\n _('order.cancel-reason-not-available'),\n ];\n\n get selectionCount(): number {\n return Object.values(this.lineQuantities).reduce((sum, n) => sum + n, 0);\n }\n\n constructor(private i18nService: I18nService) {\n this.reasons = this.reasons.map(r => this.i18nService.translate(r));\n }\n\n ngOnInit() {\n this.lineQuantities = this.order.lines.reduce(\n (result, line) => ({ ...result, [line.id]: line.quantity }),\n {},\n );\n }\n\n radioChanged() {\n if (this.cancelAll) {\n for (const line of this.order.lines) {\n this.lineQuantities[line.id] = line.quantity;\n }\n } else {\n for (const line of this.order.lines) {\n this.lineQuantities[line.id] = 0;\n }\n }\n }\n\n checkIfAllSelected() {\n for (const [lineId, quantity] of Object.entries(this.lineQuantities)) {\n const quantityInOrder = this.order.lines.find(line => line.id === lineId)?.quantity;\n if (quantityInOrder && quantity < quantityInOrder) {\n return;\n }\n }\n // If we got here, all of the selected quantities are equal to the order\n // line quantities, i.e. everything is selected.\n this.cancelAll = true;\n }\n\n select() {\n this.resolveWith({\n orderId: this.order.id,\n lines: this.getLineInputs(),\n reason: this.reason,\n cancelShipping: this.cancelAll,\n });\n }\n\n cancel() {\n this.resolveWith();\n }\n\n private getLineInputs(): OrderLineInput[] | undefined {\n if (this.order.active) {\n return;\n }\n return Object.entries(this.lineQuantities)\n .map(([orderLineId, quantity]) => ({\n orderLineId,\n quantity,\n }))\n .filter(l => 0 < l.quantity);\n }\n}\n","<ng-select\n [items]=\"availableCouponCodes$ | async\"\n appendTo=\"body\"\n bindLabel=\"code\"\n bindValue=\"code\"\n [addTag]=\"false\"\n [multiple]=\"true\"\n [hideSelected]=\"true\"\n [minTermLength]=\"2\"\n typeToSearchText=\"\"\n [typeahead]=\"couponCodeInput$\"\n [formControl]=\"control\"\n (add)=\"addCouponCode.emit($event.code)\"\n (remove)=\"removeCouponCode.emit($event.value?.code)\"\n>\n <ng-template ng-option-tmp let-item=\"item\">\n <div class=\"flex items-center\">\n <vdr-chip class=\"mr-1\">{{ item.code }}</vdr-chip>\n <span>{{ item.promotionName }}</span>\n </div>\n </ng-template>\n</ng-select>\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { UntypedFormControl } from '@angular/forms';\nimport {\n DataService,\n GetCouponCodeSelectorPromotionListDocument,\n PROMOTION_FRAGMENT,\n} from '@deenruv/admin-ui/core';\nimport { gql } from 'apollo-angular';\nimport { concat, Observable, Subject } from 'rxjs';\nimport { debounceTime, distinctUntilChanged, map, skip, startWith, switchMap } from 'rxjs/operators';\n\nexport const GET_COUPON_CODE_SELECTOR_PROMOTION_LIST = gql`\n query GetCouponCodeSelectorPromotionList($options: PromotionListOptions) {\n promotions(options: $options) {\n items {\n id\n name\n couponCode\n }\n totalItems\n }\n }\n`;\n\n@Component({\n selector: 'vdr-coupon-code-selector',\n templateUrl: './coupon-code-selector.component.html',\n styleUrls: ['./coupon-code-selector.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CouponCodeSelectorComponent implements OnInit {\n @Input() couponCodes: string[];\n @Input() control: UntypedFormControl | undefined;\n @Output() addCouponCode = new EventEmitter<string>();\n @Output() removeCouponCode = new EventEmitter<string>();\n availableCouponCodes$: Observable<Array<{ code: string; promotionName: string }>>;\n couponCodeInput$ = new Subject<string>();\n constructor(private dataService: DataService) {}\n\n ngOnInit(): void {\n this.availableCouponCodes$ = concat(\n this.couponCodeInput$.pipe(\n debounceTime(200),\n distinctUntilChanged(),\n switchMap(\n term =>\n this.dataService.query(GetCouponCodeSelectorPromotionListDocument, {\n options: {\n take: 10,\n skip: 0,\n filter: {\n couponCode: { contains: term },\n },\n },\n }).single$,\n ),\n map(({ promotions }) =>\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n promotions.items.map(p => ({ code: p.couponCode!, promotionName: p.name })),\n ),\n startWith([]),\n ),\n );\n if (!this.control) {\n this.control = new UntypedFormControl(this.couponCodes ?? []);\n }\n }\n}\n","<ng-template vdrDialogTitle>{{ 'order.select-address' | translate }}</ng-template>\n\n<clr-tabs *ngIf=\"addresses$ | async as addresses\">\n <clr-tab *ngIf=\"customerId && addresses.length\">\n <button clrTabLink>{{ 'order.existing-address' | translate }}</button>\n <ng-template [(clrIfActive)]=\"useExisting\">\n <clr-tab-content>\n <vdr-radio-card-fieldset\n class=\"block mt-4\"\n [idFn]=\"addressIdFn\"\n [selectedItemId]=\"selectedAddress && addressIdFn(selectedAddress)\"\n (selectItem)=\"selectedAddress = $event\"\n >\n <vdr-radio-card *ngFor=\"let address of addresses\" [item]=\"address\">\n <vdr-formatted-address [address]=\"address\"></vdr-formatted-address>\n </vdr-radio-card>\n </vdr-radio-card-fieldset>\n </clr-tab-content>\n </ng-template>\n </clr-tab>\n <clr-tab>\n <button clrTabLink>{{ 'customer.create-new-address' | translate }}</button>\n\n <ng-template [(clrIfActive)]=\"createNew\">\n <clr-tab-content>\n <vdr-address-form\n [formGroup]=\"addressForm\"\n [availableCountries]=\"availableCountries$ | async\"\n ></vdr-address-form>\n </clr-tab-content>\n </ng-template>\n </clr-tab>\n</clr-tabs>\n\n<ng-template vdrDialogButtons>\n <button type=\"button\" class=\"btn\" (click)=\"cancel()\">{{ 'common.cancel' | translate }}</button>\n <button\n type=\"submit\"\n (click)=\"select()\"\n [disabled]=\"(useExisting && !selectedAddress) || (createNew && addressForm.invalid)\"\n class=\"btn btn-primary\"\n >\n {{ 'common.okay' | translate }}\n </button>\n</ng-template>\n","import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';\nimport { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';\nimport {\n AddressFragment,\n CreateAddressInput,\n DataService,\n Dialog,\n GetAvailableCountriesQuery,\n GetCustomerAddressesDocument,\n OrderAddressFragment,\n} from '@deenruv/admin-ui/core';\nimport { pick } from '@deenruv/common/lib/pick';\nimport { Observable, of } from 'rxjs';\nimport { tap } from 'rxjs/operators';\n\nimport { Customer } from '../select-customer-dialog/select-customer-dialog.component';\n\n@Component({\n selector: 'vdr-select-address-dialog',\n templateUrl: './select-address-dialog.component.html',\n styleUrls: ['./select-address-dialog.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SelectAddressDialogComponent implements OnInit, Dialog<CreateAddressInput> {\n resolveWith: (result?: CreateAddressInput) => void;\n availableCountries$: Observable<GetAvailableCountriesQuery['countries']['items']>;\n addresses$: Observable<AddressFragment[]>;\n customerId: string | undefined;\n currentAddress: OrderAddressFragment | undefined;\n addressForm: UntypedFormGroup;\n selectedAddress: AddressFragment | undefined;\n useExisting = true;\n createNew = false;\n\n constructor(\n private dataService: DataService,\n private formBuilder: UntypedFormBuilder,\n ) {}\n\n ngOnInit(): void {\n this.addressForm = this.formBuilder.group({\n fullName: [this.currentAddress?.fullName ?? ''],\n company: [this.currentAddress?.company ?? ''],\n streetLine1: [this.currentAddress?.streetLine1 ?? '', Validators.required],\n streetLine2: [this.currentAddress?.streetLine2 ?? ''],\n city: [this.currentAddress?.city ?? '', Validators.required],\n province: [this.currentAddress?.province ?? ''],\n postalCode: [this.currentAddress?.postalCode ?? '', Validators.required],\n countryCode: [this.currentAddress?.countryCode ?? '', Validators.required],\n phoneNumber: [this.currentAddress?.phoneNumber ?? ''],\n });\n this.useExisting = !!this.customerId;\n this.addresses$ = this.customerId\n ? this.dataService\n .query(GetCustomerAddressesDocument, { customerId: this.customerId })\n .mapSingle(({ customer }) => customer?.addresses ?? [])\n .pipe(\n tap(addresses => {\n if (this.currentAddress) {\n this.selectedAddress = addresses.find(\n a =>\n a.streetLine1 === this.currentAddress?.streetLine1 &&\n a.postalCode === this.currentAddress?.postalCode,\n );\n }\n if (addresses.length === 0) {\n this.createNew = true;\n this.useExisting = false;\n }\n }),\n )\n : of([]);\n this.availableCountries$ = this.dataService.settings\n .getAvailableCountries()\n .mapSingle(({ countries }) => countries.items);\n }\n\n trackByFn(item: Customer) {\n return item.id;\n }\n\n addressIdFn(item: AddressFragment) {\n return item.streetLine1 + item.postalCode;\n }\n\n cancel() {\n this.resolveWith();\n }\n\n select() {\n if (this.useExisting && this.selectedAddress) {\n this.resolveWith({\n ...pick(this.selectedAddress, [\n 'fullName',\n 'company',\n 'streetLine1',\n 'streetLine2',\n 'city',\n 'province',\n 'phoneNumber',\n 'postalCode',\n ]),\n countryCode: this.selectedAddress.country.code,\n });\n }\n if (this.createNew && this.addressForm.valid) {\n const formValue = this.addressForm.value;\n this.resolveWith(formValue);\n }\n }\n}\n","<ng-template vdrDialogTitle>{{ title | translate }}</ng-template>\n\n<ng-container *ngIf=\"!canCreateNew\">\n <ng-container *ngTemplateOutlet=\"customerSelect\"></ng-container>\n <vdr-form-field [label]=\"'common.add-note' | translate\" *ngIf=\"includeNoteInput\" class=\"mt-4\">\n <textarea [(ngModel)]=\"note\"></textarea>\n </vdr-form-field>\n</ng-container>\n\n<clr-tabs *ngIf=\"canCreateNew\" class=\"pt-1\">\n <clr-tab>\n <button clrTabLink>{{ 'order.existing-customer' | translate }}</button>\n\n <ng-template [(clrIfActive)]=\"useExisting\">\n <clr-tab-content>\n <div class=\"mt-4\">\n <ng-container *ngTemplateOutlet=\"customerSelect\"></ng-container>\n </div>\n </clr-tab-content>\n </ng-template>\n </clr-tab>\n <clr-tab *ngIf=\"canCreateNew\">\n <button clrTabLink>{{ 'customer.create-new-customer' | translate }}</button>\n\n <ng-template [(clrIfActive)]=\"createNew\">\n <clr-tab-content>\n <form [formGroup]=\"customerForm\">\n <vdr-form-field [label]=\"'customer.title' | translate\" for=\"title\">\n <input id=\"title\" type=\"text\" formControlName=\"title\" />\n </vdr-form-field>\n <vdr-form-field [label]=\"'customer.first-name' | translate\" for=\"firstName\">\n <input id=\"firstName\" type=\"text\" formControlName=\"firstName\" />\n </vdr-form-field>\n <vdr-form-field [label]=\"'customer.last-name' | translate\" for=\"lastName\">\n <input id=\"lastName\" type=\"text\" formControlName=\"lastName\" />\n </vdr-form-field>\n <vdr-form-field [label]=\"'customer.email-address' | translate\" for=\"emailAddress\">\n <input id=\"emailAddress\" type=\"text\" formControlName=\"emailAddress\" />\n </vdr-form-field>\n <vdr-form-field [label]=\"'customer.phone-number' | translate\" for=\"phoneNumber\">\n <input id=\"phoneNumber\" type=\"text\" formControlName=\"phoneNumber\" />\n </vdr-form-field>\n </form>\n </clr-tab-content>\n </ng-template>\n </clr-tab>\n</clr-tabs>\n\n<ng-template #customerSelect>\n <ng-select\n [items]=\"customers$ | async\"\n appendTo=\"body\"\n bindLabel=\"name\"\n [addTag]=\"false\"\n [multiple]=\"true\"\n [hideSelected]=\"true\"\n [trackByFn]=\"trackByFn\"\n [minTermLength]=\"2\"\n [loading]=\"isLoading\"\n [typeahead]=\"input$\"\n [(ngModel)]=\"selectedCustomer\"\n >\n <ng-template ng-label-tmp let-item=\"item\" let-clear=\"clear\">\n <span class=\"item-row\">\n <clr-icon shape=\"user\" class=\"is-solid\"></clr-icon\n ><span class=\"mx-1\">{{ item.firstName }} {{ item.lastName }}</span>\n <vdr-chip>{{ item.emailAddress }}</vdr-chip>\n </span>\n </ng-template>\n <ng-template ng-option-tmp let-item=\"item\">\n <span class=\"item-row\">\n <clr-icon shape=\"user\" class=\"is-solid\"></clr-icon\n ><span class=\"mx-1\">{{ item.firstName }} {{ item.lastName }}</span>\n <vdr-chip>{{ item.emailAddress }}</vdr-chip>\n </span>\n </ng-template>\n </ng-select>\n</ng-template>\n\n<ng-template vdrDialogButtons>\n <button type=\"button\" class=\"btn\" (click)=\"cancel()\">{{ 'common.cancel' | translate }}</button>\n <button\n type=\"submit\"\n (click)=\"select()\"\n [disabled]=\"(useExisting && selectedCustomer.length === 0) || (createNew && customerForm.invalid)\"\n class=\"btn btn-primary\"\n >\n {{ 'common.okay' | translate }}\n </button>\n</ng-template>\n","import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';\nimport { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';\nimport { CreateCustomerInput, DataService, Dialog, GetCustomerListQuery } from '@deenruv/admin-ui/core';\nimport { concat, Observable, of, Subject } from 'rxjs';\nimport { catchError, debounceTime, distinctUntilChanged, switchMap, tap } from 'rxjs/operators';\nimport { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';\n\nexport type Customer = GetCustomerListQuery['customers']['items'][number];\nexport type SelectCustomerDialogResult = (Customer | CreateCustomerInput) & { note: string };\n\n@Component({\n selector: 'vdr-select-customer-dialog',\n templateUrl: './select-customer-dialog.component.html',\n styleUrls: ['./select-customer-dialog.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SelectCustomerDialogComponent implements OnInit, Dialog<SelectCustomerDialogResult> {\n resolveWith: (result?: SelectCustomerDialogResult) => void;\n\n // populated by the dialog service\n canCreateNew = true;\n includeNoteInput = false;\n title: string = _('order.set-customer-for-order');\n\n customerForm: UntypedFormGroup;\n customers$: Observable<Customer[]>;\n isLoading = false;\n input$ = new Subject<string>();\n selectedCustomer: Customer[] = [];\n useExisting = true;\n createNew = false;\n note = '';\n\n constructor(\n private dataService: DataService,\n private formBuilder: UntypedFormBuilder,\n ) {\n this.customerForm = this.formBuilder.group({\n title: '',\n firstName: ['', Validators.required],\n lastName: ['', Validators.required],\n phoneNumber: '',\n emailAddress: ['', [Validators.required, Validators.email]],\n });\n }\n\n ngOnInit(): void {\n this.customers$ = concat(\n of([]), // default items\n this.input$.pipe(\n debounceTime(200),\n distinctUntilChanged(),\n tap(() => (this.isLoading = true)),\n switchMap(term =>\n this.dataService.customer\n .getCustomerList(10, 0, term)\n .mapStream(({ customers }) => customers.items)\n .pipe(\n catchError(() => of([])), // empty list on error\n tap(() => (this.isLoading = false)),\n ),\n ),\n ),\n );\n }\n\n trackByFn(item: Customer) {\n return item.id;\n }\n\n cancel() {\n this.resolveWith();\n }\n\n select() {\n if (this.useExisting && this.selectedCustomer.length === 1) {\n this.resolveWith({ ...this.selectedCustomer[0], note: this.note });\n } else if (this.createNew && this.customerForm.valid) {\n const formValue = this.customerForm.value;\n this.resolveWith({ ...formValue, note: this.note });\n }\n }\n}\n","<ng-template vdrDialogTitle>{{ 'order.select-shipping-method' | translate }}</ng-template>\n<vdr-radio-card-fieldset\n [idFn]=\"methodIdFn\"\n [selectedItemId]=\"selectedMethod?.id\"\n (selectItem)=\"selectedMethod = $event\"\n>\n <vdr-radio-card *ngFor=\"let quote of eligibleShippingMethods\" [item]=\"quote\">\n <div class=\"result-details\">\n <vdr-labeled-data [label]=\"'settings.shipping-method' | translate\">\n {{ quote.name }}\n </vdr-labeled-data>\n <div class=\"price-row\">\n <vdr-labeled-data [label]=\"'common.price' | translate\">\n {{ quote.price | localeCurrency: currencyCode }}\n </vdr-labeled-data>\n <vdr-labeled-data [label]=\"'common.price-with-tax' | translate\">\n {{ quote.priceWithTax | localeCurrency: currencyCode }}\n </vdr-labeled-data>\n </div>\n <vdr-object-tree *ngIf=\"quote.metadata\" [value]=\"quote.metadata\"></vdr-object-tree>\n </div>\n </vdr-radio-card>\n</vdr-radio-card-fieldset>\n\n<ng-template vdrDialogButtons>\n <button type=\"button\" class=\"btn\" (click)=\"cancel()\">{{ 'common.cancel' | translate }}</button>\n <button\n type=\"submit\"\n (click)=\"select()\"\n [disabled]=\"!selectedMethod\"\n class=\"btn btn-primary\"\n >\n {{ 'common.okay' | translate }}\n </button>\n</ng-template>\n","import { Component, OnInit, ChangeDetectionStrategy } from '@angular/core';\nimport {\n CreateAddressInput,\n CurrencyCode,\n Dialog,\n DraftOrderEligibleShippingMethodsQuery,\n} from '@deenruv/admin-ui/core';\n\ntype ShippingMethodQuote =\n DraftOrderEligibleShippingMethodsQuery['eligibleShippingMethodsForDraftOrder'][number];\n\n@Component({\n selector: 'vdr-select-shipping-method-dialog',\n templateUrl: './select-shipping-method-dialog.component.html',\n styleUrls: ['./select-shipping-method-dialog.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SelectShippingMethodDialogComponent implements OnInit, Dialog<string> {\n resolveWith: (result?: string) => void;\n eligibleShippingMethods: ShippingMethodQuote[];\n currentSelectionId: string;\n currencyCode: CurrencyCode;\n selectedMethod: ShippingMethodQuote | undefined;\n\n ngOnInit(): void {\n if (this.currentSelectionId) {\n this.selectedMethod = this.eligibleShippingMethods.find(m => m.id === this.currentSelectionId);\n }\n }\n\n methodIdFn(item: ShippingMethodQuote) {\n return item.id;\n }\n\n cancel() {\n this.resolveWith();\n }\n\n select() {\n if (this.selectedMethod) {\n this.resolveWith(this.selectedMethod.id);\n }\n }\n}\n","<ng-template vdrDialogTitle>{{ 'order.select-state' | translate }}</ng-template>\n<p>{{ message | translate }}</p>\n<vdr-form-field>\n <select name=\"state\" [(ngModel)]=\"selectedState\">\n <option *ngFor=\"let state of nextStates\" [value]=\"state\">\n {{ state | stateI18nToken | translate }}\n </option>\n </select>\n</vdr-form-field>\n<ng-template vdrDialogButtons>\n <button type=\"submit\" *ngIf=\"cancellable\" (click)=\"cancel()\" class=\"btn btn-secondary\">\n {{ 'common.cancel' | translate }}\n </button>\n <button type=\"submit\" (click)=\"select()\" class=\"btn btn-primary\" [disabled]=\"!selectedState\">\n {{ 'order.transition-to-state' | translate: { state: (selectedState | stateI18nToken | translate) } }}\n </button>\n</ng-template>\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { Dialog } from '@deenruv/admin-ui/core';\n\n@Component({\n selector: 'vdr-order-state-select-dialog',\n templateUrl: './order-state-select-dialog.component.html',\n styleUrls: ['./order-state-select-dialog.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class OrderStateSelectDialogComponent implements Dialog<string> {\n resolveWith: (result?: string) => void;\n nextStates: string[] = [];\n message = '';\n cancellable: boolean;\n selectedState = '';\n\n select() {\n if (this.selectedState) {\n this.resolveWith(this.selectedState);\n }\n }\n\n cancel() {\n this.resolveWith();\n }\n}\n","import { Injectable } from '@angular/core';\nimport { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';\nimport {\n DataService,\n HistoryEntryType,\n I18nService,\n ModalService,\n NotificationService,\n SortOrder,\n} from '@deenruv/admin-ui/core';\nimport { EMPTY } from 'rxjs';\nimport { catchError, delay, map, retryWhen, switchMap, take } from 'rxjs/operators';\n\nimport { OrderStateSelectDialogComponent } from '../components/order-state-select-dialog/order-state-select-dialog.component';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class OrderTransitionService {\n constructor(\n private dataService: DataService,\n private modalService: ModalService,\n private notificationService: NotificationService,\n private i18nService: I18nService,\n ) {}\n\n /**\n * Attempts to transition the Order to the last state it was in before it was transitioned\n * to the \"Modifying\" state. If this fails, a manual prompt is used.\n */\n transitionToPreModifyingState(orderId: string, nextStates: string[]) {\n return this.getPreModifyingState(orderId).pipe(\n switchMap(state => {\n const manualTransitionOptions = {\n orderId,\n nextStates,\n message: this.i18nService.translate(\n _('order.unable-to-transition-to-state-try-another'),\n { state },\n ),\n cancellable: false,\n retry: 10,\n };\n if (state) {\n return this.transitionToStateOrThrow(orderId, state).pipe(\n catchError(err => this.manuallyTransitionToState(manualTransitionOptions)),\n );\n } else {\n return this.manuallyTransitionToState(manualTransitionOptions);\n }\n }),\n );\n }\n\n /**\n * Displays a modal for manually selecting the next state.\n */\n manuallyTransitionToState(options: {\n orderId: string;\n nextStates: string[];\n message: string;\n cancellable: boolean;\n retry: number;\n }) {\n return this.modalService\n .fromComponent(OrderStateSelectDialogComponent, {\n locals: {\n nextStates: options.nextStates,\n cancellable: options.cancellable,\n message: options.message,\n },\n closable: false,\n size: 'md',\n })\n .pipe(\n switchMap(result => {\n if (result) {\n return this.transitionToStateOrThrow(options.orderId, result);\n } else {\n if (!options.cancellable) {\n throw new Error(`An order state must be selected`);\n } else {\n return EMPTY;\n }\n }\n }),\n retryWhen(errors => errors.pipe(delay(2000), take(options.retry))),\n );\n }\n\n /**\n * Attempts to get the last state the Order was in before it was transitioned\n * to the \"Modifying\" state.\n */\n private getPreModifyingState(orderId: string) {\n return this.dataService.order\n .getOrderHistory(orderId, {\n filter: {\n type: {\n eq: HistoryEntryType.ORDER_STATE_TRANSITION,\n },\n },\n sort: {\n createdAt: SortOrder.DESC,\n },\n })\n .mapSingle(result => result.order)\n .pipe(\n map(result => {\n const item = result?.history.items.find(i => i.data.to === 'Modifying');\n if (item) {\n return item.data.from as string;\n } else {\n return;\n }\n }),\n );\n }\n\n private transitionToStateOrThrow(orderId: string, state: string) {\n return this.dataService.order.transitionToState(orderId, state).pipe(\n map(({ transitionOrderToState }) => {\n switch (transitionOrderToState?.__typename) {\n case 'Order':\n return transitionOrderToState?.state;\n case 'OrderStateTransitionError':\n this.notificationService.error(transitionOrderToState?.transitionError);\n throw new Error(transitionOrderToState?.transitionError);\n }\n }),\n );\n }\n}\n","import { innerFrom } from '../observable/innerFrom';\nimport { Subject } from '../Subject';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function retryWhen(notifier) {\n return operate((source, subscriber) => {\n let innerSub;\n let syncResub = false;\n let errors$;\n const subscribeForRetryWhen = () => {\n innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, undefined, (err) => {\n if (!errors$) {\n errors$ = new Subject();\n innerFrom(notifier(errors$)).subscribe(createOperatorSubscriber(subscriber, () => innerSub ? subscribeForRetryWhen() : (syncResub = true)));\n }\n if (errors$) {\n errors$.next(err);\n }\n }));\n if (syncResub) {\n innerSub.unsubscribe();\n innerSub = null;\n syncResub = false;\n subscribeForRetryWhen();\n }\n };\n subscribeForRetryWhen();\n });\n}\n","<div class=\"card\" *ngIf=\"customFieldsConfig.length\">\n <div class=\"card-header\">\n {{ 'common.custom-fields' | translate }}\n </div>\n <div class=\"card-block\">\n <div class=\"card-text custom-field-form\" [class.editable]=\"editable\">\n <vdr-tabbed-custom-fields\n entityName=\"Order\"\n [customFields]=\"customFieldsConfig\"\n [customFieldsFormGroup]=\"customFieldForm\"\n [readonly]=\"!editable\"\n [compact]=\"true\"\n ></vdr-tabbed-custom-fields>\n </div>\n </div>\n <div class=\"card-footer\">\n <button class=\"btn btn-sm btn-secondary\" (click)=\"editable = true\" *ngIf=\"!editable\">\n <clr-icon shape=\"pencil\"></clr-icon>\n {{ 'common.edit' | translate }}\n </button>\n <button\n class=\"btn btn-sm btn-primary\"\n (click)=\"onUpdateClick()\"\n *ngIf=\"editable\"\n [disabled]=\"customFieldForm.pristine || customFieldForm.invalid\"\n >\n <clr-icon shape=\"check\"></clr-icon>\n {{ 'common.update' | translate }}\n </button>\n <button\n class=\"btn btn-sm btn-secondary\"\n (click)=\"onCancelClick()\"\n *ngIf=\"editable\"\n >\n <clr-icon shape=\"times\"></clr-icon>\n {{ 'common.cancel' | translate }}\n </button>\n </div>\n</div>\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';\nimport { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';\nimport { CustomFieldConfig, ModalService } from '@deenruv/admin-ui/core';\n\n@Component({\n selector: 'vdr-order-custom-fields-card',\n templateUrl: './order-custom-fields-card.component.html',\n styleUrls: ['./order-custom-fields-card.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class OrderCustomFieldsCardComponent implements OnInit {\n @Input() customFieldsConfig: CustomFieldConfig[] = [];\n @Input() customFieldValues: { [name: string]: any } = {};\n @Output() updateClick = new EventEmitter<any>();\n customFieldForm: UntypedFormGroup;\n editable = false;\n constructor(\n private formBuilder: UntypedFormBuilder,\n private modalService: ModalService,\n ) {}\n\n ngOnInit() {\n this.customFieldForm = this.formBuilder.group({});\n for (const field of this.customFieldsConfig) {\n this.customFieldForm.addControl(\n field.name,\n this.formBuilder.control(this.customFieldValues[field.name]),\n );\n }\n }\n\n onUpdateClick() {\n this.updateClick.emit(this.customFieldForm.value);\n this.customFieldForm.markAsPristine();\n this.editable = false;\n }\n\n onCancelClick() {\n if (this.customFieldForm.dirty) {\n this.modalService\n .dialog({\n title: _('catalog.confirm-cancel'),\n buttons: [\n { type: 'secondary', label: _('common.keep-editing') },\n { type: 'danger', label: _('common.discard-changes'), returnValue: true },\n ],\n })\n .subscribe(result => {\n if (result) {\n this.customFieldForm.reset();\n this.customFieldForm.markAsPristine();\n this.editable = false;\n }\n });\n } else {\n this.editable = false;\n }\n }\n}\n","<vdr-dropdown class=\"search-settings-menu\" *ngIf=\"fulfilledCount || orderState === 'PartiallyDelivered'\">\n <button type=\"button\" class=\"icon-button\" vdrDropdownTrigger>\n <clr-icon *ngIf=\"fulfillmentStatus === 'full'\" class=\"item-fulfilled\" shape=\"check-circle\"></clr-icon>\n <clr-icon\n *ngIf=\"fulfillmentStatus === 'partial'\"\n class=\"item-partially-fulfilled\"\n shape=\"check-circle\"\n ></clr-icon>\n <clr-icon\n *ngIf=\"fulfillmentStatus === 'none'\"\n class=\"item-not-fulfilled\"\n shape=\"exclamation-circle\"\n ></clr-icon>\n </button>\n <vdr-dropdown-menu vdrPosition=\"bottom-right\">\n <label class=\"dropdown-header\" *ngIf=\"fulfillmentStatus === 'full'\">\n {{ 'order.line-fulfillment-all' | translate }}\n </label>\n <label class=\"dropdown-header\" *ngIf=\"fulfillmentStatus === 'partial'\">\n {{\n 'order.line-fulfillment-partial' | translate: { total: line.quantity, count: fulfilledCount }\n }}\n </label>\n <label class=\"dropdown-header\" *ngIf=\"fulfillmentStatus === 'none'\">\n {{ 'order.line-fulfillment-none' | translate }}\n </label>\n <div class=\"fulfillment-detail\" *ngFor=\"let item of fulfillments\">\n <div class=\"fulfillment-title\">\n {{ 'order.fulfillment' | translate }} #{{ item.fulfillment.id }} ({{\n 'order.item-count' | translate: { count: item.count }\n }})\n </div>\n <vdr-labeled-data [label]=\"'common.created-at' | translate\">\n {{ item.fulfillment.createdAt | localeDate: 'medium' }}\n </vdr-labeled-data>\n <vdr-labeled-data [label]=\"'order.fulfillment-method' | translate\">\n {{ item.fulfillment.method }}\n </vdr-labeled-data>\n <vdr-labeled-data\n *ngIf=\"item.fulfillment.trackingCode\"\n [label]=\"'order.tracking-code' | translate\"\n >\n {{ item.fulfillment.trackingCode }}\n </vdr-labeled-data>\n </div>\n </vdr-dropdown-menu>\n</vdr-dropdown>\n","import { ChangeDetectionStrategy, Component, Input, OnChanges, SimpleChanges } from '@angular/core';\nimport { OrderDetailFragment } from '@deenruv/admin-ui/core';\nimport { notNullOrUndefined } from '@deenruv/common/lib/shared-utils';\nimport { unique } from '@deenruv/common/lib/unique';\n\nexport type FulfillmentStatus = 'full' | 'partial' | 'none';\ntype Fulfillment = NonNullable<OrderDetailFragment['fulfillments']>[number];\n\n@Component({\n selector: 'vdr-line-fulfillment',\n templateUrl: './line-fulfillment.component.html',\n styleUrls: ['./line-fulfillment.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class LineFulfillmentComponent implements OnChanges {\n @Input() line: OrderDetailFragment['lines'][number];\n @Input() allOrderFulfillments: OrderDetailFragment['fulfillments'];\n @Input() orderState: string;\n fulfilledCount = 0;\n fulfillmentStatus: FulfillmentStatus;\n fulfillments: Array<{\n count: number;\n fulfillment: Fulfillment;\n }> = [];\n\n ngOnChanges(changes: SimpleChanges): void {\n if (this.line) {\n this.fulfilledCount = this.getDeliveredCount(this.line);\n this.fulfillmentStatus = this.getFulfillmentStatus(this.fulfilledCount, this.line.quantity);\n this.fulfillments = this.getFulfillments(this.line);\n }\n }\n\n /**\n * Returns the number of items in an OrderLine which are fulfilled.\n */\n private getDeliveredCount(line: OrderDetailFragment['lines'][number]): number {\n return (\n line.fulfillmentLines?.reduce((sum, fulfillmentLine) => sum + fulfillmentLine.quantity, 0) ?? 0\n );\n }\n\n private getFulfillmentStatus(fulfilledCount: number, lineQuantity: number): FulfillmentStatus {\n if (fulfilledCount === lineQuantity) {\n return 'full';\n }\n if (0 < fulfilledCount && fulfilledCount < lineQuantity) {\n return 'partial';\n }\n return 'none';\n }\n\n private getFulfillments(\n line: OrderDetailFragment['lines'][number],\n ): Array<{ count: number; fulfillment: NonNullable<OrderDetailFragment['fulfillments']>[number] }> {\n return (\n line.fulfillmentLines\n ?.map(fulfillmentLine => {\n const fulfillment = this.allOrderFulfillments?.find(\n f => f.id === fulfillmentLine.fulfillmentId,\n );\n if (!fulfillment) {\n return;\n }\n return {\n count: fulfillmentLine.quantity,\n fulfillment,\n };\n })\n .filter(notNullOrUndefined) ?? []\n );\n }\n}\n","<span *ngIf=\"getRefundedCount()\" [title]=\"'order.refunded-count' | translate: { count: getRefundedCount() }\">\n <clr-icon shape=\"redo\" class=\"is-solid\" dir=\"down\"></clr-icon>\n</span>\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { OrderDetailFragment, PaymentWithRefundsFragment } from '@deenruv/admin-ui/core';\n\n@Component({\n selector: 'vdr-line-refunds',\n templateUrl: './line-refunds.component.html',\n styleUrls: ['./line-refunds.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class LineRefundsComponent {\n @Input() line: OrderDetailFragment['lines'][number];\n @Input() payments: PaymentWithRefundsFragment[];\n\n getRefundedCount(): number {\n const refundLines =\n this.payments\n ?.reduce(\n (all, payment) => [...all, ...payment.refunds],\n [] as PaymentWithRefundsFragment['refunds'],\n )\n .filter(refund => refund.state !== 'Failed')\n .reduce(\n (all, refund) => [...all, ...refund.lines],\n [] as Array<{ orderLineId: string; quantity: number }>,\n ) ?? [];\n\n return refundLines\n .filter(i => i.orderLineId === this.line.id)\n .reduce((sum, i) => sum + i.quantity, 0);\n }\n}\n","import { Component } from '@angular/core';\nimport { DataTable2ColumnComponent } from '@deenruv/admin-ui/core';\n\n@Component({\n selector: 'vdr-order-total-column',\n template: ``,\n exportAs: 'row',\n})\nexport class OrderTotalColumnComponent<T> extends DataTable2ColumnComponent<T> {\n orderable = false;\n}\n","<div class=\"bulk-actions\">\n <ng-content select=\"vdr-bulk-action-menu\"></ng-content>\n</div>\n<div class=\"table-wrapper\">\n <table\n class=\"\"\n [class.no-select]=\"disableSelect\"\n >\n <thead [class.items-selected]=\"selectionManager?.selection.length\">\n <tr class=\"heading-row\">\n <th *ngIf=\"selectionManager\" class=\"selection-col\">\n <input\n type=\"checkbox\"\n clrCheckbox\n [checked]=\"selectionManager?.areAllCurrentItemsSelected()\"\n (change)=\"onToggleAllClick()\"\n />\n </th>\n <th\n *ngFor=\"let column of visibleSortedColumns; last as isLast\"\n [class.expand]=\"column.expand\"\n >\n <div class=\"cell-content\" [ngClass]=\"column.align\">\n <vdr-ui-extension-point\n [locationId]=\"id\"\n [metadata]=\"column.id\"\n api=\"dataTable\"\n [topPx]=\"-6\"\n [leftPx]=\"-24\"\n display=\"block\"\n >\n <span>{{ column.heading }}</span>\n </vdr-ui-extension-point>\n <div *ngIf=\"column.sort as sort\" class=\"sort-toggle\">\n <button (click)=\"sort.toggleSortOrder()\" [class.active]=\"sort.sortOrder\">\n <clr-icon *ngIf=\"!sort.sortOrder\" shape=\"two-way-arrows left\"></clr-icon>\n <clr-icon *ngIf=\"sort.sortOrder === 'ASC'\" shape=\"arrow up\"></clr-icon>\n <clr-icon *ngIf=\"sort.sortOrder === 'DESC'\" shape=\"arrow down\"></clr-icon>\n </button>\n <div class=\"sort-label\" *ngIf=\"sort.sortOrder\">{{ sort.sortOrder }}</div>\n </div>\n </div>\n </th>\n <th>\n <div class=\"column-picker\">\n <vdr-data-table-colum-picker\n [uiLanguage]=\"uiLanguage$ | async\"\n [columns]=\"sortedColumns\"\n (reorder)=\"onColumnReorder($event)\"\n (resetColumns)=\"onColumnsReset()\"\n ></vdr-data-table-colum-picker>\n </div>\n </th>\n </tr>\n <tr *ngIf=\"searchComponent || customSearchTemplate || filters?.length\">\n <th\n [attr.colspan]=\"visibleSortedColumns.length + (selectionManager ? 2 : 1)\"\n class=\"filter-row\"\n [class.active]=\"showSearchFilterRow\"\n >\n <button\n class=\"button-ghost toggle-search-filter-row\"\n [class.active]=\"showSearchFilterRow\"\n (click)=\"toggleSearchFilterRow()\"\n [title]=\"'common.search-and-filter-list' | translate\"\n >\n <clr-icon shape=\"search\"></clr-icon>\n </button>\n <div class=\"filter-row-wrapper\" [class.hidden]=\"!showSearchFilterRow\">\n <ng-container *ngTemplateOutlet=\"searchComponent?.template\"></ng-container>\n <ng-container *ngTemplateOutlet=\"customSearchTemplate\"></ng-container>\n <ng-container *ngIf=\"filters\">\n <div class=\"filters\">\n <vdr-data-table-filters\n *ngFor=\"let activeFilter of filters.activeFilters\"\n [filterWithValue]=\"activeFilter\"\n [filters]=\"filters\"\n class=\"mt-1\"\n ></vdr-data-table-filters>\n <vdr-data-table-filters\n *ngIf=\"filters.length\"\n [filters]=\"filters\"\n class=\"mt-1\"\n ></vdr-data-table-filters>\n </div>\n </ng-container>\n </div>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr\n *ngFor=\"\n let item of items\n | paginate\n : {\n id: id,\n itemsPerPage: itemsPerPage,\n currentPage: currentPage,\n totalItems: totalItems\n };\n index as i;\n trackBy: trackByFn\n \"\n >\n <td *ngIf=\"selectionManager\" class=\"selection-col\" [class.active]=\"activeIndex === i\">\n <input\n type=\"checkbox\"\n clrCheckbox\n [checked]=\"selectionManager?.isSelected(item)\"\n (click)=\"onRowClick(item, $event)\"\n />\n </td>\n <td *ngFor=\"let column of visibleSortedColumns\" [class.active]=\"activeIndex === i\">\n <div class=\"cell-content\" [ngClass]=\"column.align\">\n <ng-container\n *ngIf=\"customComponents.get(column.id) as componentConfig; else defaultComponent\"\n >\n <ng-container\n *ngComponentOutlet=\"\n componentConfig.config.component;\n inputs: { rowItem: item };\n injector: componentConfig.injector\n \"\n ></ng-container>\n </ng-container>\n <ng-template #defaultComponent>\n <ng-container\n *ngTemplateOutlet=\"column.template; context: { item: item, index: i }\"\n ></ng-container>\n </ng-template>\n </div>\n </td>\n <td [class.active]=\"activeIndex === i\"><!-- column select --></td>\n </tr>\n <ng-container>\n <tr *ngIf=\"!items?.length\">\n <td [attr.colspan]=\"visibleSortedColumns.length + (selectionManager ? 2 : 1)\">\n <vdr-empty-placeholder [emptyStateLabel]=\"'order.order-is-empty' | translate\"></vdr-empty-placeholder>\n </td>\n </tr>\n </ng-container>\n <tr class=\"surcharge\" *ngFor=\"let surcharge of order.surcharges\">\n <td class=\"align-middle name left\" colspan=\"2\">{{ surcharge.description }}</td>\n <td class=\"align-middle sku\">{{ surcharge.sku }}</td>\n <td class=\"align-middle\" [attr.colspan]=\"visibleSortedColumns.length - 4\"></td>\n <td class=\"align-middle total\">\n {{ surcharge.priceWithTax | localeCurrency : order.currencyCode }}\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\n {{ surcharge.price | localeCurrency : order.currencyCode }}\n </div>\n </td>\n <td><!-- column select --></td>\n </tr>\n <ng-container *ngFor=\"let discount of order.discounts\">\n <tr class=\"order-adjustment\" *ngIf=\"discount.type !== 'OTHER'\">\n <td [attr.colspan]=\"visibleSortedColumns.length - 1\" class=\"\">\n <a [routerLink]=\"getPromotionLink(discount)\">{{ discount.description }}</a>\n <vdr-chip *ngIf=\"getCouponCodeForAdjustment(order, discount) as couponCode\">{{\n couponCode\n }}</vdr-chip>\n </td>\n <td class=\"\">\n {{ discount.amountWithTax | localeCurrency : order.currencyCode }}\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\n {{ discount.amount | localeCurrency : order.currencyCode }}\n </div>\n </td>\n <td><!-- column select --></td>\n </tr>\n </ng-container>\n <tr class=\"sub-total\">\n <td class=\"\">{{ 'order.sub-total' | translate }}</td>\n <td [attr.colspan]=\"visibleSortedColumns.length - 2\"></td>\n <td class=\"clr-align-middle\">\n {{ order.subTotalWithTax | localeCurrency : order.currencyCode }}\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\n {{ order.subTotal | localeCurrency : order.currencyCode }}\n </div>\n </td>\n <td><!-- column select --></td>\n </tr>\n <tr class=\"shipping\">\n <td class=\"\">{{ 'order.shipping' | translate }}</td>\n <td [attr.colspan]=\"visibleSortedColumns.length - 2\">\n <vdr-chip *ngFor=\"let shippingLine of order.shippingLines\" class=\"shipping-method-name\">\n {{ shippingLine.shippingMethod.name }}\n </vdr-chip>\n </td>\n <td class=\"clr-align-middle\">\n {{ order.shippingWithTax | localeCurrency : order.currencyCode }}\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\n {{ order.shipping | localeCurrency : order.currencyCode }}\n </div>\n </td>\n <td><!-- column select --></td>\n </tr>\n <tr class=\"total\">\n <td class=\"\">{{ 'order.total' | translate }}</td>\n <td [attr.colspan]=\"visibleSortedColumns.length - 2\"></td>\n <td class=\"clr-align-middle\">\n {{ order.totalWithTax | localeCurrency : order.currencyCode }}\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\n {{ order.total | localeCurrency : order.currencyCode }}\n </div>\n </td>\n <td><!-- column select --></td>\n </tr>\n </tbody>\n </table>\n</div>\n","import { ChangeDetectionStrategy, Component, ContentChildren, Input, QueryList } from '@angular/core';\nimport { DataTable2ColumnComponent, DataTable2Component, OrderDetailFragment } from '@deenruv/admin-ui/core';\nimport { OrderTotalColumnComponent } from './order-total-column.component';\n\n@Component({\n selector: 'vdr-order-data-table',\n templateUrl: './order-data-table.component.html',\n styleUrls: [\n '../../../../core/src/shared/components/data-table-2/data-table2.component.scss',\n './order-data-table.component.scss',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class OrderDataTableComponent extends DataTable2Component<OrderDetailFragment> {\n @ContentChildren(OrderTotalColumnComponent) totalColumns: QueryList<OrderTotalColumnComponent<any>>;\n @Input() order: OrderDetailFragment;\n\n get allColumns() {\n return [...(this.columns ?? []), ...(this.customFieldColumns ?? []), ...(this.totalColumns ?? [])];\n }\n\n get sortedColumns() {\n const columns = this.allColumns;\n const dataTableConfig = this.getDataTableConfig();\n for (const [id, index] of Object.entries(dataTableConfig[this.id].order)) {\n const column = columns.find(c => c.id === id);\n const currentIndex = columns.findIndex(c => c.id === id);\n if (currentIndex !== -1 && column) {\n columns.splice(currentIndex, 1);\n columns.splice(index, 0, column);\n }\n }\n return columns;\n }\n\n getPromotionLink(promotion: OrderDetailFragment['discounts'][number]): any[] {\n const id = promotion.adjustmentSource.split(':')[1];\n return ['/marketing', 'promotions', id];\n }\n\n getCouponCodeForAdjustment(\n order: OrderDetailFragment,\n promotionAdjustment: OrderDetailFragment['discounts'][number],\n ): string | undefined {\n const id = promotionAdjustment.adjustmentSource.split(':')[1];\n const promotion = order.promotions.find(p => p.id === id);\n if (promotion) {\n return promotion.couponCode || undefined;\n }\n }\n\n getShippingNames(order: OrderDetailFragment) {\n if (order.shippingLines.length) {\n return order.shippingLines.map(shippingLine => shippingLine.shippingMethod.name).join(', ');\n } else {\n return '';\n }\n }\n}\n","<vdr-order-data-table id=\"order-detail-list\" [items]=\"order.lines\" [order]=\"order\">\n <vdr-dt2-column id=\"id\" [heading]=\"'common.id' | translate\" [hiddenByDefault]=\"true\">\n <ng-template let-line=\"item\">\n {{ line.id }}\n </ng-template>\n </vdr-dt2-column>\n <vdr-dt2-column\n id=\"created-at\"\n [heading]=\"'common.created-at' | translate\"\n [hiddenByDefault]=\"true\"\n >\n <ng-template let-line=\"item\">\n {{ line.createdAt | localeDate : 'short' }}\n </ng-template>\n </vdr-dt2-column>\n <vdr-dt2-column\n id=\"updated-at\"\n [heading]=\"'common.updated-at' | translate\"\n [hiddenByDefault]=\"true\"\n >\n <ng-template let-line=\"item\">\n {{ line.updatedAt | localeDate : 'short' }}\n </ng-template>\n </vdr-dt2-column>\n <vdr-dt2-column [heading]=\"'common.image' | translate\" id=\"image\">\n <ng-template let-line=\"item\">\n <div class=\"image-placeholder\">\n <img\n *ngIf=\"line.featuredAsset as asset; else imagePlaceholder\"\n [src]=\"asset | assetPreview : 'tiny'\"\n />\n <ng-template #imagePlaceholder>\n <div class=\"placeholder\">\n <clr-icon shape=\"image\" size=\"48\"></clr-icon>\n </div>\n </ng-template>\n </div>\n </ng-template>\n </vdr-dt2-column>\n <vdr-dt2-column [heading]=\"'order.product-name' | translate\" id=\"product-name\">\n <ng-template let-line=\"item\">\n {{ line.productVariant.name }}\n </ng-template>\n </vdr-dt2-column>\n <vdr-dt2-column [heading]=\"'order.product-sku' | translate\" id=\"product-sku\" [optional]=\"false\">\n <ng-template let-line=\"item\">\n {{ line.productVariant.sku }}\n </ng-template>\n </vdr-dt2-column>\n <vdr-dt2-column [heading]=\"'order.unit-price' | translate\" id=\"unit-price\">\n <ng-template let-line=\"item\">\n <div class=\"unit-price\">\n {{ line.unitPriceWithTax | localeCurrency : order.currencyCode }}\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\n {{ line.unitPrice | localeCurrency : order.currencyCode }}\n </div>\n </div>\n </ng-template>\n </vdr-dt2-column>\n <vdr-dt2-column [heading]=\"'order.quantity' | translate\" id=\"quantity\" [optional]=\"false\">\n <ng-template let-line=\"item\">\n <ng-container *ngIf=\"!isDraft; else draft\">\n <div class=\"flex\">\n <div\n *ngIf=\"line.orderPlacedQuantity && line.quantity !== line.orderPlacedQuantity\"\n class=\"order-placed-quantity\"\n [title]=\"'order.original-quantity-at-checkout' | translate\"\n >\n {{ line.orderPlacedQuantity }}\n </div>\n <div>{{ line.quantity }}</div>\n </div>\n </ng-container>\n <ng-template #draft>\n <div class=\"flex\">\n <input\n class=\"draft-qty\"\n type=\"number\"\n min=\"0\"\n #qtyInput\n [value]=\"line.quantity\"\n (blur)=\"draftInputBlur(line, qtyInput.valueAsNumber)\"\n />\n <button class=\"icon-button\" (click)=\"remove.emit({ lineId: line.id })\">\n <clr-icon shape=\"trash\"></clr-icon>\n </button>\n </div>\n </ng-template>\n <vdr-line-refunds [line]=\"line\" [payments]=\"order.payments\"></vdr-line-refunds>\n <vdr-line-fulfillment\n [line]=\"line\"\n [orderState]=\"order.state\"\n [allOrderFulfillments]=\"order.fulfillments\"\n ></vdr-line-fulfillment>\n </ng-template>\n </vdr-dt2-column>\n <vdr-dt2-custom-field-column\n *ngFor=\"let customField of orderLineCustomFields\"\n [customField]=\"customField\"\n />\n <vdr-order-total-column [heading]=\"'order.total' | translate\" id=\"total\" [optional]=\"false\">\n <ng-template let-line=\"item\">\n <div class=\"unit-price\">\n {{ line.linePriceWithTax | localeCurrency : order.currencyCode }}\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\n {{ line.linePrice | localeCurrency : order.currencyCode }}\n </div>\n </div>\n\n <ng-container *ngIf=\"getLineDiscounts(line) as discounts\">\n <vdr-dropdown *ngIf=\"discounts.length\">\n <div class=\"promotions-label\" vdrDropdownTrigger>\n {{ 'order.promotions-applied' | translate }}\n </div>\n <vdr-dropdown-menu>\n <div class=\"line-promotion\" *ngFor=\"let discount of discounts\">\n <a class=\"promotion-name\" [routerLink]=\"getPromotionLink(discount)\">{{\n discount.description\n }}</a>\n <div class=\"promotion-amount\">\n {{ discount.amountWithTax | localeCurrency : order.currencyCode }}\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\n {{ discount.amount | localeCurrency : order.currencyCode }}\n </div>\n </div>\n </div>\n </vdr-dropdown-menu>\n </vdr-dropdown>\n </ng-container>\n </ng-template>\n </vdr-order-total-column>\n</vdr-order-data-table>\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { UntypedFormControl, UntypedFormGroup } from '@angular/forms';\nimport { AdjustmentType, CustomFieldConfig, OrderDetailFragment } from '@deenruv/admin-ui/core';\n\n@Component({\n selector: 'vdr-order-table',\n templateUrl: './order-table.component.html',\n styleUrls: ['./order-table.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class OrderTableComponent implements OnInit {\n @Input() order: OrderDetailFragment;\n @Input() orderLineCustomFields: CustomFieldConfig[];\n @Input() isDraft = false;\n @Output() adjust = new EventEmitter<{ lineId: string; quantity: number }>();\n @Output() remove = new EventEmitter<{ lineId: string }>();\n orderLineCustomFieldsVisible = false;\n customFieldsForLine: {\n [lineId: string]: Array<{ config: CustomFieldConfig; formGroup: UntypedFormGroup; value: any }>;\n } = {};\n\n get visibleOrderLineCustomFields(): CustomFieldConfig[] {\n return this.orderLineCustomFieldsVisible ? this.orderLineCustomFields : [];\n }\n\n get showElided(): boolean {\n return !this.orderLineCustomFieldsVisible && 0 < this.orderLineCustomFields.length;\n }\n\n ngOnInit(): void {\n this.orderLineCustomFieldsVisible = this.orderLineCustomFields.length < 2;\n this.getLineCustomFields();\n }\n\n draftInputBlur(line: OrderDetailFragment['lines'][number], quantity: number) {\n if (line.quantity !== quantity) {\n this.adjust.emit({ lineId: line.id, quantity });\n }\n }\n\n toggleOrderLineCustomFields() {\n this.orderLineCustomFieldsVisible = !this.orderLineCustomFieldsVisible;\n }\n\n getLineDiscounts(line: OrderDetailFragment['lines'][number]) {\n return line.discounts.filter(a => a.type === AdjustmentType.PROMOTION);\n }\n\n private getLineCustomFields() {\n for (const line of this.order.lines) {\n const formGroup = new UntypedFormGroup({});\n const result = this.orderLineCustomFields\n .map(config => {\n const value = (line as any).customFields[config.name];\n formGroup.addControl(config.name, new UntypedFormControl(value));\n return {\n config,\n formGroup,\n value,\n };\n })\n .filter(field => (this.orderLineCustomFieldsVisible ? true : field.value != null));\n this.customFieldsForLine[line.id] = result;\n }\n }\n\n getPromotionLink(promotion: OrderDetailFragment['discounts'][number]): any[] {\n const id = promotion.adjustmentSource.split(':')[1];\n return ['/marketing', 'promotions', id];\n }\n\n getCouponCodeForAdjustment(\n order: OrderDetailFragment,\n promotionAdjustment: OrderDetailFragment['discounts'][number],\n ): string | undefined {\n const id = promotionAdjustment.adjustmentSource.split(':')[1];\n const promotion = order.promotions.find(p => p.id === id);\n if (promotion) {\n return promotion.couponCode || undefined;\n }\n }\n\n getShippingNames(order: OrderDetailFragment) {\n if (order.shippingLines.length) {\n return order.shippingLines.map(shippingLine => shippingLine.shippingMethod.name).join(', ');\n } else {\n return '';\n }\n }\n}\n","<div class=\"card\">\n <div class=\"card-block\">\n <h4 class=\"card-title\">{{ 'order.add-item-to-order' | translate }}</h4>\n <vdr-product-variant-selector\n (productSelected)=\"selectedVariantId$.next($event.productVariantId)\"\n ></vdr-product-variant-selector>\n </div>\n <div class=\"card-block\" *ngIf=\"selectedVariant$ | async as selectedVariant\">\n <div class=\"variant-details\">\n <img class=\"mr-2\" [src]=\"selectedVariant.featuredAsset || selectedVariant.product.featuredAsset | assetPreview: 32\">\n <div class=\"details\">\n <div>{{ selectedVariant?.name }}</div>\n <div class=\"small\">{{ selectedVariant?.sku }}</div>\n </div>\n <div class=\"details ml-4\">\n <div class=\"small\">\n {{ 'catalog.stock-on-hand' | translate }}: {{ selectedVariant.stockOnHand }}\n </div>\n <div class=\"small\">\n {{ 'catalog.stock-allocated' | translate }}: {{ selectedVariant.stockAllocated }}\n </div>\n </div>\n <div class=\"flex-spacer\"></div>\n <div class=\"details\">\n <div>{{ selectedVariant?.priceWithTax | localeCurrency: currencyCode }}</div>\n <div class=\"small\" [title]=\"'order.net-price' | translate\">\n {{ selectedVariant?.price | localeCurrency: currencyCode }}\n </div>\n </div>\n <div>\n <input [disabled]=\"!selectedVariant\" type=\"number\" min=\"0\" [(ngModel)]=\"quantity\" />\n </div>\n <button\n [disabled]=\"!selectedVariant\"\n class=\"btn btn-small btn-primary\"\n (click)=\"addItemClick(selectedVariant)\"\n >\n {{ 'order.add-item-to-order' | translate }}\n </button>\n </div>\n <ng-container *ngIf=\"orderLineCustomFields.length\">\n <div class=\"custom-field\" *ngFor=\"let field of orderLineCustomFields\">\n <vdr-custom-field-control\n [compact]=\"true\"\n [readonly]=\"false\"\n [customField]=\"field\"\n [customFieldsFormGroup]=\"customFieldsFormGroup\"\n ></vdr-custom-field-control>\n </div>\n </ng-container>\n </div>\n</div>\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { UntypedFormControl, UntypedFormGroup } from '@angular/forms';\nimport { CurrencyCode, CustomFieldConfig, DataService, GetProductVariantQuery } from '@deenruv/admin-ui/core';\nimport { Observable, Subject } from 'rxjs';\nimport { switchMap } from 'rxjs/operators';\n\n@Component({\n selector: 'vdr-draft-order-variant-selector',\n templateUrl: './draft-order-variant-selector.component.html',\n styleUrls: ['./draft-order-variant-selector.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DraftOrderVariantSelectorComponent implements OnInit {\n @Input() currencyCode: CurrencyCode;\n @Input() orderLineCustomFields: CustomFieldConfig[];\n @Output() addItem = new EventEmitter<{ productVariantId: string; quantity: number; customFields: any }>();\n customFieldsFormGroup = new UntypedFormGroup({});\n selectedVariant$: Observable<GetProductVariantQuery['productVariant']>;\n selectedVariantId$ = new Subject<string | undefined>();\n quantity = 1;\n constructor(private dataService: DataService) {}\n\n ngOnInit(): void {\n this.selectedVariant$ = this.selectedVariantId$.pipe(\n switchMap(id => {\n if (id) {\n return this.dataService.product\n .getProductVariant(id)\n .mapSingle(({ productVariant }) => productVariant);\n } else {\n return [undefined];\n }\n }),\n );\n for (const customField of this.orderLineCustomFields) {\n this.customFieldsFormGroup.addControl(customField.name, new UntypedFormControl(''));\n }\n }\n\n addItemClick(selectedVariant: GetProductVariantQuery['productVariant']) {\n if (selectedVariant) {\n this.addItem.emit({\n productVariantId: selectedVariant.id,\n quantity: this.quantity,\n customFields: this.orderLineCustomFields.length\n ? this.customFieldsFormGroup.value\n : undefined,\n });\n this.selectedVariantId$.next(undefined);\n this.customFieldsFormGroup.reset();\n }\n }\n}\n","<vdr-page-block>\n <vdr-action-bar *ngIf=\"entity$ | async as order\">\n <vdr-ab-left>\n <div class=\"flex clr-align-items-center\">\n <vdr-order-state-label [state]=\"order.state\"></vdr-order-state-label>\n </div>\n </vdr-ab-left>\n\n <vdr-ab-right>\n <vdr-action-bar-items locationId=\"draft-order-detail\" />\n <button\n class=\"btn btn-primary\"\n (click)=\"completeOrder()\"\n [disabled]=\"!order.customer || !order.lines.length || !order.shippingLines.length\"\n >\n <clr-icon shape=\"check\"></clr-icon>\n {{ 'order.complete-draft-order' | translate }}\n </button>\n <vdr-action-bar-dropdown-menu [alwaysShow]=\"true\" locationId=\"draft-order-detail\">\n <button type=\"button\" vdrDropdownItem (click)=\"deleteOrder()\">\n <clr-icon shape=\"trash\" class=\"is-danger\"></clr-icon>\n {{ 'order.delete-draft-order' | translate }}\n </button>\n </vdr-action-bar-dropdown-menu>\n </vdr-ab-right>\n </vdr-action-bar>\n</vdr-page-block>\n\n<vdr-page-detail-layout *ngIf=\"entity$ | async as order\">\n <vdr-page-detail-sidebar>\n <vdr-card [title]=\"'order.customer' | translate\">\n <ng-template vdrCardControls>\n <clr-icon *ngIf=\"!order.customer\" shape=\"unknown-status\" class=\"is-warning\"></clr-icon>\n <clr-icon *ngIf=\"order.customer\" shape=\"check\" class=\"is-success\"></clr-icon>\n </ng-template>\n <vdr-customer-label\n class=\"block mb-2\"\n *ngIf=\"order.customer\"\n [customer]=\"order.customer\"\n ></vdr-customer-label>\n <button class=\"button-small\" (click)=\"setCustomer()\">\n {{ 'order.set-customer-for-order' | translate }}\n </button>\n </vdr-card>\n <vdr-card [title]=\"'order.billing-address' | translate\">\n <ng-template vdrCardControls>\n <clr-icon\n *ngIf=\"!order.billingAddress.streetLine1\"\n shape=\"unknown-status\"\n class=\"is-warning\"\n ></clr-icon>\n <clr-icon\n *ngIf=\"order.billingAddress.streetLine1\"\n shape=\"check\"\n class=\"is-success\"\n ></clr-icon>\n </ng-template>\n <vdr-formatted-address\n class=\"block mb-2\"\n *ngIf=\"order.billingAddress\"\n [address]=\"order.billingAddress\"\n ></vdr-formatted-address>\n <button class=\"button-small\" (click)=\"setBillingAddress()\">\n {{ 'order.set-billing-address' | translate }}\n </button>\n </vdr-card>\n <vdr-card [title]=\"'order.shipping' | translate\">\n <ng-template vdrCardControls>\n <clr-icon\n *ngIf=\"!order.shippingAddress.streetLine1 || !order.shippingLines.length\"\n shape=\"unknown-status\"\n class=\"is-warning\"\n ></clr-icon>\n <clr-icon\n *ngIf=\"order.shippingAddress.streetLine1 && order.shippingLines.length\"\n shape=\"check\"\n class=\"is-success\"\n ></clr-icon>\n </ng-template>\n <vdr-formatted-address\n class=\"block mb-2\"\n *ngIf=\"order.shippingAddress\"\n [address]=\"order.shippingAddress\"\n ></vdr-formatted-address>\n <button class=\"button-small mr-2\" (click)=\"setShippingAddress()\">\n {{ 'order.set-shipping-address' | translate }}\n </button>\n\n <div *ngFor=\"let shippingLine of order.shippingLines\">\n {{ shippingLine.shippingMethod.name }}\n </div>\n <button class=\"button-small\" (click)=\"setShippingMethod()\">\n {{ 'order.set-shipping-method' | translate }}\n </button>\n </vdr-card>\n <vdr-card>\n <button\n *ngIf=\"order.couponCodes.length === 0 && !displayCouponCodeInput\"\n class=\"button-small\"\n (click)=\"displayCouponCodeInput = !displayCouponCodeInput\"\n >\n {{ 'order.set-coupon-codes' | translate }}\n </button>\n <div *ngIf=\"order.couponCodes.length || displayCouponCodeInput\">\n <label>{{ 'order.set-coupon-codes' | translate }}</label>\n <vdr-coupon-code-selector\n [couponCodes]=\"order.couponCodes\"\n (addCouponCode)=\"applyCouponCode($event)\"\n (removeCouponCode)=\"removeCouponCode($event)\"\n ></vdr-coupon-code-selector>\n </div>\n </vdr-card>\n <vdr-card>\n <vdr-page-entity-info *ngIf=\"entity$ | async as entity\" [entity]=\"entity\" />\n </vdr-card>\n </vdr-page-detail-sidebar>\n <vdr-page-block>\n <vdr-card>\n <vdr-draft-order-variant-selector\n [orderLineCustomFields]=\"orderLineCustomFields\"\n [currencyCode]=\"order.currencyCode\"\n (addItem)=\"addItemToOrder($event)\"\n ></vdr-draft-order-variant-selector>\n <vdr-order-table\n [order]=\"order\"\n [orderLineCustomFields]=\"orderLineCustomFields\"\n [isDraft]=\"true\"\n (adjust)=\"adjustOrderLine($event)\"\n (remove)=\"removeOrderLine($event)\"\n ></vdr-order-table>\n </vdr-card>\n <vdr-card [title]=\"'order.tax-summary' | translate\">\n <ng-container *ngIf=\"order.taxSummary.length\">\n <table class=\"table\">\n <thead>\n <tr>\n <th>{{ 'common.description' | translate }}</th>\n <th>{{ 'order.tax-rate' | translate }}</th>\n <th>{{ 'order.tax-base' | translate }}</th>\n <th>{{ 'order.tax-total' | translate }}</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let row of order.taxSummary\">\n <td>{{ row.description }}</td>\n <td>{{ row.taxRate / 100 | percent }}</td>\n <td>{{ row.taxBase | localeCurrency : order.currencyCode }}</td>\n <td>{{ row.taxTotal | localeCurrency : order.currencyCode }}</td>\n </tr>\n </tbody>\n </table>\n </ng-container>\n </vdr-card>\n <vdr-custom-detail-component-host\n locationId=\"draft-order-detail\"\n [entity$]=\"entity$\"\n [detailForm]=\"detailForm\"\n ></vdr-custom-detail-component-host>\n\n <vdr-order-custom-fields-card\n [customFieldsConfig]=\"customFields\"\n [customFieldValues]=\"order.customFields\"\n (updateClick)=\"updateCustomFields($event)\"\n ></vdr-order-custom-fields-card>\n </vdr-page-block>\n</vdr-page-detail-layout>\n","import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core';\nimport { UntypedFormGroup } from '@angular/forms';\nimport { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';\nimport {\n DataService,\n DeletionResult,\n DraftOrderEligibleShippingMethodsQuery,\n ModalService,\n NotificationService,\n Order,\n OrderDetailFragment,\n OrderDetailQueryDocument,\n TypedBaseDetailComponent,\n} from '@deenruv/admin-ui/core';\nimport { combineLatest, Observable, Subject } from 'rxjs';\nimport { switchMap, take } from 'rxjs/operators';\n\nimport { OrderTransitionService } from '../../providers/order-transition.service';\nimport { SelectAddressDialogComponent } from '../select-address-dialog/select-address-dialog.component';\nimport { SelectCustomerDialogComponent } from '../select-customer-dialog/select-customer-dialog.component';\nimport { SelectShippingMethodDialogComponent } from '../select-shipping-method-dialog/select-shipping-method-dialog.component';\n\n@Component({\n selector: 'vdr-draft-order-detail',\n templateUrl: './draft-order-detail.component.html',\n styleUrls: ['./draft-order-detail.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DraftOrderDetailComponent\n extends TypedBaseDetailComponent<typeof OrderDetailQueryDocument, 'order'>\n implements OnInit, OnDestroy\n{\n customFields = this.getCustomFieldConfig('Order');\n orderLineCustomFields = this.getCustomFieldConfig('OrderLine');\n detailForm = new UntypedFormGroup({});\n eligibleShippingMethods$: Observable<\n DraftOrderEligibleShippingMethodsQuery['eligibleShippingMethodsForDraftOrder']\n >;\n nextStates$: Observable<string[]>;\n fetchHistory = new Subject<void>();\n displayCouponCodeInput = false;\n\n constructor(\n private changeDetector: ChangeDetectorRef,\n protected dataService: DataService,\n private notificationService: NotificationService,\n private modalService: ModalService,\n private orderTransitionService: OrderTransitionService,\n ) {\n super();\n }\n\n ngOnInit() {\n this.init();\n this.orderLineCustomFields = this.getCustomFieldConfig('OrderLine');\n this.eligibleShippingMethods$ = this.entity$.pipe(\n switchMap(order =>\n this.dataService.order\n .getDraftOrderEligibleShippingMethods(order.id)\n .mapSingle(\n ({ eligibleShippingMethodsForDraftOrder }) => eligibleShippingMethodsForDraftOrder,\n ),\n ),\n );\n }\n\n ngOnDestroy() {\n this.destroy();\n }\n\n addItemToOrder(event: { productVariantId: string; quantity: number; customFields: any }) {\n this.dataService.order.addItemToDraftOrder(this.id, event).subscribe(result => {\n if (result.addItemToDraftOrder.__typename !== 'Order') {\n this.notificationService.error((result.addItemToDraftOrder as any).message);\n }\n });\n }\n\n adjustOrderLine(event: { lineId: string; quantity: number }) {\n this.dataService.order\n .adjustDraftOrderLine(this.id, { orderLineId: event.lineId, quantity: event.quantity })\n .subscribe(result => {\n if (result.adjustDraftOrderLine.__typename !== 'Order') {\n this.notificationService.error((result.adjustDraftOrderLine as any).message);\n }\n });\n }\n\n removeOrderLine(event: { lineId: string }) {\n this.dataService.order.removeDraftOrderLine(this.id, event.lineId).subscribe(result => {\n if (result.removeDraftOrderLine.__typename !== 'Order') {\n this.notificationService.error((result.removeDraftOrderLine as any).message);\n }\n });\n }\n\n getOrderAddressLines(orderAddress?: { [key: string]: string }): string[] {\n if (!orderAddress) {\n return [];\n }\n return Object.values(orderAddress)\n .filter(val => val !== 'OrderAddress')\n .filter(line => !!line);\n }\n\n setCustomer() {\n this.modalService.fromComponent(SelectCustomerDialogComponent).subscribe(result => {\n if (this.hasId(result)) {\n this.dataService.order\n .setCustomerForDraftOrder(this.id, { customerId: result.id })\n .subscribe();\n } else if (result) {\n const { note, ...input } = result;\n this.dataService.order.setCustomerForDraftOrder(this.id, { input }).subscribe();\n }\n });\n }\n\n setShippingAddress() {\n this.entity$\n .pipe(\n take(1),\n switchMap(order =>\n this.modalService.fromComponent(SelectAddressDialogComponent, {\n locals: {\n customerId: order.customer?.id,\n currentAddress: order.shippingAddress ?? undefined,\n },\n }),\n ),\n )\n .subscribe(result => {\n if (result) {\n this.dataService.order.setDraftOrderShippingAddress(this.id, result).subscribe();\n }\n });\n }\n\n setBillingAddress() {\n this.entity$\n .pipe(\n take(1),\n switchMap(order =>\n this.modalService.fromComponent(SelectAddressDialogComponent, {\n locals: {\n customerId: order.customer?.id,\n currentAddress: order.billingAddress ?? undefined,\n },\n }),\n ),\n )\n .subscribe(result => {\n if (result) {\n this.dataService.order.setDraftOrderBillingAddress(this.id, result).subscribe();\n }\n });\n }\n\n applyCouponCode(couponCode: string) {\n this.dataService.order.applyCouponCodeToDraftOrder(this.id, couponCode).subscribe();\n }\n\n removeCouponCode(couponCode: string) {\n this.dataService.order.removeCouponCodeFromDraftOrder(this.id, couponCode).subscribe();\n }\n\n setShippingMethod() {\n combineLatest(this.entity$, this.eligibleShippingMethods$)\n .pipe(\n take(1),\n switchMap(([order, methods]) =>\n this.modalService.fromComponent(SelectShippingMethodDialogComponent, {\n locals: {\n eligibleShippingMethods: methods,\n currencyCode: order.currencyCode,\n currentSelectionId: order.shippingLines?.[0]?.shippingMethod.id,\n },\n }),\n ),\n )\n .subscribe(result => {\n if (result) {\n this.dataService.order.setDraftOrderShippingMethod(this.id, result).subscribe();\n }\n });\n }\n\n updateCustomFields(customFieldsValue: any) {\n this.dataService.order\n .updateOrderCustomFields({\n id: this.id,\n customFields: customFieldsValue,\n })\n .subscribe();\n }\n\n deleteOrder() {\n this.dataService.order.deleteDraftOrder(this.id).subscribe(({ deleteDraftOrder }) => {\n if (deleteDraftOrder.result === DeletionResult.DELETED) {\n this.notificationService.success(_('common.notify-delete-success'), {\n entity: 'Order',\n });\n this.router.navigate(['/orders']);\n } else if (deleteDraftOrder.message) {\n this.notificationService.error(deleteDraftOrder.message);\n }\n });\n }\n\n completeOrder() {\n this.dataService.order\n .transitionToState(this.id, 'ArrangingPayment')\n .subscribe(({ transitionOrderToState }) => {\n if (transitionOrderToState?.__typename === 'Order') {\n this.router.navigate(['/orders', this.id]);\n } else if (transitionOrderToState?.__typename === 'OrderStateTransitionError') {\n this.notificationService.error(transitionOrderToState.transitionError);\n }\n });\n }\n\n private hasId<T extends { id: string }>(input: T | any): input is { id: string } {\n return typeof input === 'object' && !!input.id;\n }\n\n protected setFormValues(entity: OrderDetailFragment): void {\n // empty\n }\n}\n","<ng-template vdrDialogTitle>{{ 'order.fulfill-order' | translate }}</ng-template>\n\n<div class=\"fulfillment-wrapper\">\n <div class=\"order-table\">\n <table class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th>{{ 'order.product-name' | translate }}</th>\n <th>{{ 'order.product-sku' | translate }}</th>\n <th>{{ 'order.unfulfilled' | translate }}</th>\n <th>{{ 'catalog.stock-on-hand' | translate }}</th>\n <th>{{ 'order.fulfill' | translate }}</th>\n </tr>\n </thead>\n <tr\n *ngFor=\"let line of order.lines\"\n class=\"order-line\"\n [class.ignore]=\"getUnfulfilledCount(line) === 0\"\n >\n <td class=\"align-middle thumb\">\n <img *ngIf=\"line.featuredAsset\" [src]=\"line.featuredAsset | assetPreview: 'tiny'\" />\n </td>\n <td class=\"align-middle name\">{{ line.productVariant.name }}</td>\n <td class=\"align-middle sku\">{{ line.productVariant.sku }}</td>\n <td class=\"align-middle quantity\">{{ getUnfulfilledCount(line) }}</td>\n <td class=\"align-middle quantity\">{{ line.productVariant.stockOnHand }}</td>\n <td class=\"align-middle fulfil\">\n <input\n *ngIf=\"fulfillmentQuantities[line.id]\"\n [disabled]=\"getUnfulfilledCount(line) === 0\"\n [(ngModel)]=\"fulfillmentQuantities[line.id].fulfillCount\"\n type=\"number\"\n [max]=\"fulfillmentQuantities[line.id].max\"\n min=\"0\"\n />\n </td>\n </tr>\n </table>\n </div>\n <div class=\"shipping-details\">\n <vdr-formatted-address [address]=\"order.shippingAddress\"></vdr-formatted-address>\n <h6>{{ 'order.shipping-method' | translate }}</h6>\n {{ order.shippingLines[0]?.shippingMethod?.name }}\n <strong>{{ order.shipping | localeCurrency: order.currencyCode }}</strong>\n <vdr-configurable-input\n [operationDefinition]=\"fulfillmentHandlerDef\"\n [operation]=\"fulfillmentHandler\"\n [formControl]=\"fulfillmentHandlerControl\"\n [removable]=\"false\"\n ></vdr-configurable-input>\n </div>\n</div>\n\n<ng-template vdrDialogButtons>\n <button type=\"button\" class=\"btn\" (click)=\"cancel()\">{{ 'common.cancel' | translate }}</button>\n <button type=\"submit\" (click)=\"select()\" [disabled]=\"!canSubmit()\" class=\"btn btn-primary\">\n {{ 'order.create-fulfillment' | translate }}\n </button>\n</ng-template>\n","import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit } from '@angular/core';\nimport { UntypedFormControl } from '@angular/forms';\nimport {\n configurableDefinitionToInstance,\n ConfigurableOperation,\n ConfigurableOperationDefinition,\n configurableOperationValueIsValid,\n DataService,\n Dialog,\n FulfillOrderInput,\n GlobalFlag,\n OrderDetailFragment,\n toConfigurableOperationInput,\n} from '@deenruv/admin-ui/core';\n\n@Component({\n selector: 'vdr-fulfill-order-dialog',\n templateUrl: './fulfill-order-dialog.component.html',\n styleUrls: ['./fulfill-order-dialog.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FulfillOrderDialogComponent implements Dialog<FulfillOrderInput>, OnInit {\n resolveWith: (result?: FulfillOrderInput) => void;\n fulfillmentHandlerDef: ConfigurableOperationDefinition;\n fulfillmentHandler: ConfigurableOperation;\n fulfillmentHandlerControl = new UntypedFormControl();\n fulfillmentQuantities: { [lineId: string]: { fulfillCount: number; max: number } } = {};\n\n // Provided by modalService.fromComponent() call\n order: OrderDetailFragment;\n\n constructor(\n private dataService: DataService,\n private changeDetector: ChangeDetectorRef,\n ) {}\n\n ngOnInit(): void {\n this.dataService.settings.getGlobalSettings().single$.subscribe(({ globalSettings }) => {\n this.fulfillmentQuantities = this.order.lines.reduce((result, line) => {\n const fulfillCount = this.getFulfillableCount(line, globalSettings.trackInventory);\n return {\n ...result,\n [line.id]: { fulfillCount, max: fulfillCount },\n };\n }, {});\n this.changeDetector.markForCheck();\n });\n\n this.dataService.shippingMethod\n .getShippingMethodOperations()\n .mapSingle(data => data.fulfillmentHandlers)\n .subscribe(handlers => {\n this.fulfillmentHandlerDef =\n handlers.find(\n h => h.code === this.order.shippingLines[0]?.shippingMethod?.fulfillmentHandlerCode,\n ) || handlers[0];\n this.fulfillmentHandler = configurableDefinitionToInstance(this.fulfillmentHandlerDef);\n this.fulfillmentHandlerControl.patchValue(this.fulfillmentHandler);\n this.changeDetector.markForCheck();\n });\n }\n\n getFulfillableCount(line: OrderDetailFragment['lines'][number], globalTrackInventory: boolean): number {\n const { trackInventory, stockOnHand } = line.productVariant;\n const effectiveTracInventory =\n trackInventory === GlobalFlag.INHERIT ? globalTrackInventory : trackInventory === GlobalFlag.TRUE;\n\n const unfulfilledCount = this.getUnfulfilledCount(line);\n return effectiveTracInventory ? Math.min(unfulfilledCount, stockOnHand) : unfulfilledCount;\n }\n\n getUnfulfilledCount(line: OrderDetailFragment['lines'][number]): number {\n const fulfilled =\n this.order.fulfillments\n ?.filter(f => f.state !== 'Cancelled')\n .map(f => f.lines)\n .flat()\n .filter(row => row.orderLineId === line.id)\n .reduce((sum, row) => sum + row.quantity, 0) ?? 0;\n return line.quantity - fulfilled;\n }\n\n canSubmit(): boolean {\n const totalCount = Object.values(this.fulfillmentQuantities).reduce(\n (total, { fulfillCount }) => total + fulfillCount,\n 0,\n );\n const fulfillmentQuantityIsValid = Object.values(this.fulfillmentQuantities).every(\n ({ fulfillCount, max }) => fulfillCount <= max,\n );\n const formIsValid =\n configurableOperationValueIsValid(\n this.fulfillmentHandlerDef,\n this.fulfillmentHandlerControl.value,\n ) && this.fulfillmentHandlerControl.valid;\n return formIsValid && 0 < totalCount && fulfillmentQuantityIsValid;\n }\n\n select() {\n const lines = Object.entries(this.fulfillmentQuantities).map(([orderLineId, { fulfillCount }]) => ({\n orderLineId,\n quantity: fulfillCount,\n }));\n this.resolveWith({\n lines,\n handler: toConfigurableOperationInput(\n this.fulfillmentHandler,\n this.fulfillmentHandlerControl.value,\n ),\n });\n }\n\n cancel() {\n this.resolveWith();\n }\n}\n","<div class=\"items-list\">\n <ul>\n <li *ngFor=\"let item of items\" [title]=\"item.name\">\n <div class=\"quantity\" *ngIf=\"item.quantity != null\">{{ item.quantity }}</div>\n <clr-icon shape=\"times\" size=\"12\" *ngIf=\"item.quantity != null\"></clr-icon>\n {{ item.name }}\n </li>\n </ul>\n</div>\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\n@Component({\n selector: 'vdr-simple-item-list',\n templateUrl: './simple-item-list.component.html',\n styleUrls: ['./simple-item-list.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SimpleItemListComponent {\n @Input() items: Array<{ name: string; quantity?: number }>;\n}\n","<vdr-labeled-data [label]=\"'common.created-at' | translate\">\n {{ fulfillment?.createdAt | localeDate: 'medium' }}\n</vdr-labeled-data>\n<vdr-labeled-data [label]=\"'order.fulfillment-method' | translate\">\n {{ fulfillment?.method }}\n</vdr-labeled-data>\n<vdr-labeled-data *ngIf=\"fulfillment?.trackingCode\" [label]=\"'order.tracking-code' | translate\">\n {{ fulfillment?.trackingCode }}\n</vdr-labeled-data>\n<vdr-labeled-data [label]=\"'order.contents' | translate\">\n <vdr-simple-item-list [items]=\"items\"></vdr-simple-item-list>\n</vdr-labeled-data>\n<ng-container *ngFor=\"let customField of customFieldConfig\">\n <vdr-custom-field-control\n *ngIf=\"customFieldFormGroup.get(customField.name)\"\n [readonly]=\"true\"\n [compact]=\"true\"\n [customField]=\"customField\"\n [customFieldsFormGroup]=\"customFieldFormGroup\"\n ></vdr-custom-field-control>\n</ng-container>\n","import { ChangeDetectionStrategy, Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core';\nimport { UntypedFormControl, UntypedFormGroup } from '@angular/forms';\nimport { CustomFieldConfig, OrderDetailFragment, ServerConfigService } from '@deenruv/admin-ui/core';\nimport { isObject } from '@deenruv/common/lib/shared-utils';\n\n@Component({\n selector: 'vdr-fulfillment-detail',\n templateUrl: './fulfillment-detail.component.html',\n styleUrls: ['./fulfillment-detail.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FulfillmentDetailComponent implements OnInit, OnChanges {\n @Input() fulfillmentId: string;\n @Input() order: OrderDetailFragment;\n\n customFieldConfig: CustomFieldConfig[] = [];\n customFieldFormGroup = new UntypedFormGroup({});\n\n constructor(private serverConfigService: ServerConfigService) {}\n\n ngOnInit() {\n this.customFieldConfig = this.serverConfigService.getCustomFieldsFor('Fulfillment');\n }\n\n ngOnChanges(changes: SimpleChanges) {\n this.buildCustomFieldsFormGroup();\n }\n\n get fulfillment(): NonNullable<OrderDetailFragment['fulfillments']>[number] | undefined | null {\n return this.order.fulfillments && this.order.fulfillments.find(f => f.id === this.fulfillmentId);\n }\n\n get items(): Array<{ name: string; quantity: number }> {\n return (\n this.fulfillment?.lines.map(row => ({\n name: this.order.lines.find(line => line.id === row.orderLineId)?.productVariant.name ?? '',\n quantity: row.quantity,\n })) ?? []\n );\n }\n\n buildCustomFieldsFormGroup() {\n const customFields = (this.fulfillment as any).customFields;\n for (const fieldDef of this.serverConfigService.getCustomFieldsFor('Fulfillment')) {\n this.customFieldFormGroup.addControl(\n fieldDef.name,\n new UntypedFormControl(customFields[fieldDef.name]),\n );\n }\n }\n\n customFieldIsObject(customField: unknown) {\n return Array.isArray(customField) || isObject(customField);\n }\n}\n","<vdr-chip [title]=\"'order.payment-state' | translate\" [colorType]=\"chipColorType\">\n <clr-icon shape=\"check-circle\" *ngIf=\"state === 'Delivered'\"></clr-icon>\n {{ state | stateI18nToken | translate }}\n</vdr-chip>\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\n@Component({\n selector: 'vdr-fulfillment-state-label',\n templateUrl: './fulfillment-state-label.component.html',\n styleUrls: ['./fulfillment-state-label.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FulfillmentStateLabelComponent {\n @Input() state: string;\n\n get chipColorType() {\n switch (this.state) {\n case 'Pending':\n case 'Shipped':\n return 'warning';\n case 'Delivered':\n return 'success';\n case 'Cancelled':\n return 'error';\n }\n }\n}\n","<div class=\"card\">\n <div class=\"card-header fulfillment-header\">\n <div>{{ 'order.fulfillment' | translate }}</div>\n <div class=\"fulfillment-state\">\n <vdr-fulfillment-state-label [state]=\"fulfillment?.state\"></vdr-fulfillment-state-label>\n </div>\n </div>\n <div class=\"card-block\">\n <vdr-fulfillment-detail\n *ngIf=\"!!fulfillment\"\n [fulfillmentId]=\"fulfillment?.id\"\n [order]=\"order\"\n ></vdr-fulfillment-detail>\n </div>\n <div class=\"card-footer\" *ngIf=\"fulfillment?.nextStates.length\">\n <ng-container *ngIf=\"nextSuggestedState() as suggestedState\">\n <button class=\"btn btn-sm btn-primary\" (click)=\"transitionState.emit(suggestedState)\">\n {{ 'order.set-fulfillment-state' | translate: { state: (suggestedState | stateI18nToken | translate) } }}\n </button>\n </ng-container>\n <vdr-dropdown>\n <button class=\"icon-button\" vdrDropdownTrigger>\n <clr-icon shape=\"ellipsis-vertical\"></clr-icon>\n </button>\n <vdr-dropdown-menu vdrPosition=\"bottom-right\">\n <ng-container *ngFor=\"let nextState of nextOtherStates()\">\n <button\n type=\"button\"\n vdrDropdownItem\n (click)=\"transitionState.emit(nextState)\"\n >\n <ng-container *ngIf=\"nextState !== 'Cancelled'; else cancel\">\n <clr-icon shape=\"step-forward-2\"></clr-icon>\n {{ 'order.transition-to-state' | translate: { state: (nextState | stateI18nToken | translate) } }}\n </ng-container>\n <ng-template #cancel>\n <clr-icon shape=\"error-standard\" class=\"is-error\"></clr-icon>\n {{ 'order.cancel-fulfillment' | translate }}\n </ng-template>\n </button>\n </ng-container>\n </vdr-dropdown-menu>\n </vdr-dropdown>\n </div>\n</div>\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';\nimport { FulfillmentFragment, OrderDetailFragment } from '@deenruv/admin-ui/core';\n\n@Component({\n selector: 'vdr-fulfillment-card',\n templateUrl: './fulfillment-card.component.html',\n styleUrls: ['./fulfillment-card.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FulfillmentCardComponent {\n @Input() fulfillment: FulfillmentFragment | undefined;\n @Input() order: OrderDetailFragment;\n @Output() transitionState = new EventEmitter<string>();\n\n nextSuggestedState(): string | undefined {\n if (!this.fulfillment) {\n return;\n }\n const { nextStates } = this.fulfillment;\n const namedStateOrDefault = (targetState: string) =>\n nextStates.includes(targetState) ? targetState : nextStates[0];\n switch (this.fulfillment?.state) {\n case 'Pending':\n return namedStateOrDefault('Shipped');\n case 'Shipped':\n return namedStateOrDefault('Delivered');\n default:\n return nextStates.find(s => s !== 'Cancelled');\n }\n }\n\n nextOtherStates(): string[] {\n if (!this.fulfillment) {\n return [];\n }\n const suggested = this.nextSuggestedState();\n return this.fulfillment.nextStates.filter(s => s !== suggested);\n }\n}\n","<vdr-labeled-data [label]=\"'common.ID' | translate\">{{ modification.id }}</vdr-labeled-data>\n<vdr-labeled-data *ngIf=\"modification.note\" [label]=\"'order.note' | translate\">{{\n modification.note\n}}</vdr-labeled-data>\n<vdr-labeled-data *ngFor=\"let surcharge of modification.surcharges\" [label]=\"'order.surcharges' | translate\">\n {{ getSurcharge(surcharge.id)?.description }}\n {{ getSurcharge(surcharge.id)?.priceWithTax | localeCurrency: order.currencyCode }}</vdr-labeled-data\n>\n<vdr-labeled-data *ngIf=\"getAddedItems().length\" [label]=\"'order.added-items' | translate\">\n <vdr-simple-item-list [items]=\"getAddedItems()\"></vdr-simple-item-list>\n</vdr-labeled-data>\n<vdr-labeled-data *ngIf=\"getRemovedItems().length\" [label]=\"'order.removed-items' | translate\">\n <vdr-simple-item-list [items]=\"getRemovedItems()\"></vdr-simple-item-list>\n</vdr-labeled-data>\n<vdr-labeled-data *ngIf=\"getModifiedItems().length\" [label]=\"'order.modified-items' | translate\">\n <vdr-simple-item-list [items]=\"getModifiedItems()\"></vdr-simple-item-list>\n</vdr-labeled-data>\n","import { ChangeDetectionStrategy, Component, Input, OnChanges, OnInit } from '@angular/core';\nimport { OrderDetailFragment } from '@deenruv/admin-ui/core';\n\n@Component({\n selector: 'vdr-modification-detail',\n templateUrl: './modification-detail.component.html',\n styleUrls: ['./modification-detail.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ModificationDetailComponent implements OnChanges {\n @Input() order: OrderDetailFragment;\n @Input() modification: OrderDetailFragment['modifications'][number];\n private addedItems = new Map<OrderDetailFragment['lines'][number], number>();\n private removedItems = new Map<OrderDetailFragment['lines'][number], number>();\n private modifiedItems = new Set<OrderDetailFragment['lines'][number]>();\n\n ngOnChanges(): void {\n const { added, removed, modified } = this.getModifiedLines();\n this.addedItems = added;\n this.removedItems = removed;\n this.modifiedItems = modified;\n }\n\n getSurcharge(id: string) {\n return this.order.surcharges.find(m => m.id === id);\n }\n\n getAddedItems() {\n return [...this.addedItems.entries()].map(([line, count]) => ({\n name: line.productVariant.name,\n quantity: count,\n }));\n }\n\n getRemovedItems() {\n return [...this.removedItems.entries()].map(([line, count]) => ({\n name: line.productVariant.name,\n quantity: count,\n }));\n }\n\n getModifiedItems() {\n return [...this.modifiedItems].map(line => ({\n name: line.productVariant.name,\n }));\n }\n\n private getModifiedLines() {\n const added = new Map<OrderDetailFragment['lines'][number], number>();\n const removed = new Map<OrderDetailFragment['lines'][number], number>();\n const modified = new Set<OrderDetailFragment['lines'][number]>();\n for (const modificationLine of this.modification.lines || []) {\n const line = this.order.lines.find(l => l.id === modificationLine.orderLineId);\n if (!line) {\n continue;\n }\n if (modificationLine.quantity === 0) {\n modified.add(line);\n } else if (modificationLine.quantity < 0) {\n removed.set(line, -modificationLine.quantity);\n } else {\n added.set(line, modificationLine.quantity);\n }\n }\n return { added, removed, modified };\n }\n}\n","export const NODE_HEIGHT = 72;\n","<div class=\"node-wrapper\" [ngStyle]=\"getStyle()\" [class.active]=\"active$ | async\">\n <div\n class=\"node\"\n [class.active-target]=\"activeTarget$ | async\"\n >\n {{ node.name | stateI18nToken | translate }}\n </div>\n <div class=\"cancelled-wrapper\" *ngIf=\"isCancellable\">\n <div class=\"cancelled-edge\">\n </div>\n <clr-icon shape=\"dot-circle\"></clr-icon>\n <div class=\"cancelled-node\">\n {{ cancelledState | stateI18nToken | translate }}\n </div>\n </div>\n</div>\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Input,\n OnChanges,\n SimpleChanges,\n} from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\nimport { NODE_HEIGHT } from './constants';\nimport { StateNode } from './types';\n\n@Component({\n selector: 'vdr-order-process-node',\n templateUrl: './order-process-node.component.html',\n styleUrls: ['./order-process-node.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class OrderProcessNodeComponent implements OnChanges {\n @Input() node: StateNode;\n @Input() index: number;\n @Input() active: boolean;\n active$ = new BehaviorSubject<boolean>(false);\n activeTarget$ = new BehaviorSubject<boolean>(false);\n isCancellable = false;\n // We use a class field here to prevent the\n // i18n extractor from extracting a \"Cancelled\" key\n cancelledState = 'Cancelled';\n\n constructor(private elementRef: ElementRef<HTMLDivElement>) {}\n\n ngOnChanges(changes: SimpleChanges) {\n this.isCancellable = !!this.node.to.find((s) => s.name === 'Cancelled');\n if (changes.active) {\n this.active$.next(this.active);\n }\n }\n\n getPos(origin: 'top' | 'bottom' = 'top'): { x: number; y: number } {\n const rect = this.elementRef.nativeElement.getBoundingClientRect();\n const nodeHeight =\n this.elementRef.nativeElement.querySelector('.node')?.getBoundingClientRect().height ?? 0;\n return {\n x: 10,\n y: this.index * NODE_HEIGHT + (origin === 'bottom' ? nodeHeight : 0),\n };\n }\n\n getStyle() {\n const pos = this.getPos();\n return {\n 'top.px': pos.y,\n 'left.px': pos.x,\n };\n }\n}\n","import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { tap } from 'rxjs/operators';\n\nimport { OrderProcessNodeComponent } from './order-process-node.component';\n\n@Component({\n selector: 'vdr-order-process-edge',\n templateUrl: './order-process-edge.component.html',\n styleUrls: ['./order-process-edge.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class OrderProcessEdgeComponent implements OnInit {\n @Input() from: OrderProcessNodeComponent;\n @Input() to: OrderProcessNodeComponent;\n @Input() index: number;\n active$: Observable<boolean>;\n\n ngOnInit() {\n this.active$ = this.from.active$\n .asObservable()\n .pipe(tap((active) => this.to.activeTarget$.next(active)));\n }\n\n getStyle() {\n const direction = this.from.index < this.to.index ? 'down' : 'up';\n const startPos = this.from.getPos(direction === 'down' ? 'bottom' : 'top');\n const endPos = this.to.getPos(direction === 'down' ? 'top' : 'bottom');\n const dX = Math.abs(startPos.x - endPos.x);\n const dY = Math.abs(startPos.y - endPos.y);\n const length = Math.sqrt(dX ** 2 + dY ** 2);\n return {\n 'top.px': startPos.y,\n 'left.px': startPos.x + (direction === 'down' ? 10 : 40) + this.index * 12,\n 'height.px': length,\n 'width.px': 1,\n ...(direction === 'up'\n ? {\n transform: 'rotateZ(180deg)',\n 'transform-origin': 'top',\n }\n : {}),\n };\n }\n}\n","<div\n [attr.data-from]=\"from.node.name\"\n [attr.data-to]=\"to.node.name\"\n [ngStyle]=\"getStyle()\"\n [class.active]=\"active$ | async\"\n class=\"edge\">\n <clr-icon shape=\"arrow\" flip=\"vertical\" class=\"arrow\"></clr-icon>\n</div>\n","<ng-container *ngFor=\"let state of nodes; let i = index\">\n <vdr-order-process-node\n [node]=\"state\"\n [index]=\"i\"\n [active]=\"(activeState$ | async) === state.name\"\n (mouseenter)=\"onMouseOver(state.name)\"\n (mouseleave)=\"onMouseOut()\"\n ></vdr-order-process-node>\n</ng-container>\n<ng-container *ngFor=\"let edge of edges\">\n <vdr-order-process-edge [from]=\"edge.from\" [to]=\"edge.to\" [index]=\"edge.index\"></vdr-order-process-edge>\n</ng-container>\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n HostBinding,\n Input,\n OnChanges,\n OnInit,\n QueryList,\n SimpleChanges,\n ViewChildren,\n} from '@angular/core';\nimport { OrderProcessState } from '@deenruv/admin-ui/core';\nimport { BehaviorSubject, Observable } from 'rxjs';\nimport { debounceTime } from 'rxjs/operators';\n\nimport { NODE_HEIGHT } from './constants';\nimport { OrderProcessNodeComponent } from './order-process-node.component';\nimport { StateNode } from './types';\n\n@Component({\n selector: 'vdr-order-process-graph',\n templateUrl: './order-process-graph.component.html',\n styleUrls: ['./order-process-graph.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class OrderProcessGraphComponent implements OnInit, OnChanges, AfterViewInit {\n @Input() states: OrderProcessState[];\n @Input() initialState?: string;\n setActiveState$ = new BehaviorSubject<string | undefined>(undefined);\n activeState$: Observable<string | undefined>;\n nodes: StateNode[] = [];\n edges: Array<{ from: OrderProcessNodeComponent; to: OrderProcessNodeComponent; index: number }> = [];\n\n @ViewChildren(OrderProcessNodeComponent) nodeComponents: QueryList<OrderProcessNodeComponent>;\n\n constructor(private changeDetector: ChangeDetectorRef) {}\n\n @HostBinding('style.height.px')\n get outerHeight(): number {\n return this.nodes.length * NODE_HEIGHT;\n }\n\n ngOnInit() {\n this.setActiveState$.next(this.initialState);\n this.activeState$ = this.setActiveState$.pipe(debounceTime(150));\n }\n\n ngOnChanges(changes: SimpleChanges) {\n this.populateNodes();\n }\n\n ngAfterViewInit() {\n setTimeout(() => this.populateEdges());\n }\n\n onMouseOver(stateName: string) {\n this.setActiveState$.next(stateName);\n }\n\n onMouseOut() {\n this.setActiveState$.next(this.initialState);\n }\n\n getNodeFor(state: string): OrderProcessNodeComponent | undefined {\n if (this.nodeComponents) {\n return this.nodeComponents.find(n => n.node.name === state);\n }\n }\n\n private populateNodes() {\n const stateNodeMap = new Map<string, StateNode>();\n for (const state of this.states) {\n stateNodeMap.set(state.name, {\n name: state.name,\n to: [],\n });\n }\n\n for (const [name, stateNode] of stateNodeMap.entries()) {\n const targets = this.states.find(s => s.name === name)?.to ?? [];\n for (const target of targets) {\n const targetNode = stateNodeMap.get(target);\n if (targetNode) {\n stateNode.to.push(targetNode);\n }\n }\n }\n this.nodes = [...stateNodeMap.values()].filter(n => n.name !== 'Cancelled');\n }\n\n private populateEdges() {\n for (const node of this.nodes) {\n const nodeCmp = this.getNodeFor(node.name);\n let index = 0;\n for (const to of node.to) {\n const toCmp = this.getNodeFor(to.name);\n if (nodeCmp && toCmp && nodeCmp !== toCmp) {\n this.edges.push({\n to: toCmp,\n from: nodeCmp,\n index,\n });\n index++;\n }\n }\n }\n this.edges = [...this.edges];\n this.changeDetector.markForCheck();\n }\n}\n","<ng-template vdrDialogTitle>{{ 'order.order-state-diagram' | translate }}</ng-template>\n\n<vdr-order-process-graph [states]=\"states\" [initialState]=\"activeState\"></vdr-order-process-graph>\n","import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';\nimport {\n CancelOrderInput,\n DataService,\n Dialog,\n OrderProcessState,\n ServerConfigService,\n} from '@deenruv/admin-ui/core';\nimport { Observable } from 'rxjs';\n\n@Component({\n selector: 'vdr-order-process-graph-dialog',\n templateUrl: './order-process-graph-dialog.component.html',\n styleUrls: ['./order-process-graph-dialog.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class OrderProcessGraphDialogComponent implements OnInit, Dialog<void> {\n activeState: string;\n states: OrderProcessState[] = [];\n constructor(private serverConfigService: ServerConfigService) {}\n\n ngOnInit(): void {\n this.states = this.serverConfigService.getOrderProcessStates();\n }\n\n resolveWith: (result: void | undefined) => void;\n}\n","<vdr-card\n [title]=\"'order.payment' | translate\"\n [class.selected]=\"payment.selected\"\n [class.unselected]=\"!payment.selected\"\n *ngFor=\"let payment of refundablePayments\"\n>\n <ng-template vdrCardControls>\n <vdr-select-toggle\n size=\"small\"\n [title]=\"'order.refund-this-payment' | translate\"\n [label]=\"'order.refund-this-payment' | translate\"\n [disabled]=\"refundablePayments.length === 1\"\n [(selected)]=\"payment.selected\"\n (selectedChange)=\"paymentSelected.emit({ payment: payment, selected: $event })\"\n ></vdr-select-toggle>\n </ng-template>\n <div class=\"form-grid\">\n <vdr-labeled-data [label]=\"'order.payment-method' | translate\">\n {{ payment.method }}\n </vdr-labeled-data>\n <vdr-labeled-data [label]=\"'order.transaction-id' | translate\">\n {{ payment.transactionId }}\n </vdr-labeled-data>\n <vdr-labeled-data [label]=\"'order.payment-amount' | translate\">\n {{ payment.amount | localeCurrency : order.currencyCode }}\n </vdr-labeled-data>\n <vdr-labeled-data [label]=\"'order.refundable-amount' | translate\">\n {{ payment.refundableAmount | localeCurrency : order.currencyCode }}\n </vdr-labeled-data>\n </div>\n <vdr-form-field [label]=\"'order.refund-amount' | translate\">\n <vdr-currency-input\n [readonly]=\"!payment.selected\"\n [currencyCode]=\"order.currencyCode\"\n [formControl]=\"payment.amountToRefundControl\"\n ></vdr-currency-input>\n </vdr-form-field>\n</vdr-card>","import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';\nimport { OrderDetailFragment } from '@deenruv/admin-ui/core';\nimport { RefundablePayment } from '../../common/get-refundable-payments';\n\n@Component({\n selector: 'vdr-payment-for-refund-selector',\n templateUrl: './payment-for-refund-selector.component.html',\n styleUrls: ['./payment-for-refund-selector.component.scss'],\n changeDetection: ChangeDetectionStrategy.Default,\n})\nexport class PaymentForRefundSelectorComponent {\n @Input() refundablePayments: RefundablePayment[];\n @Input() order: OrderDetailFragment;\n @Output() paymentSelected = new EventEmitter<{ payment: RefundablePayment; selected: boolean }>();\n}\n","<ng-template vdrDialogTitle>{{ 'order.refund-and-cancel-order' | translate }}</ng-template>\n\n<div class=\"refund-wrapper\">\n <vdr-data-table-2 id=\"refund-order\" [items]=\"order.lines\">\n <!-- Here we define all the available columns -->\n <vdr-dt2-column id=\"id\" [heading]=\"'common.id' | translate\" [hiddenByDefault]=\"true\">\n <ng-template let-line=\"item\">\n {{ line.id }}\n </ng-template>\n </vdr-dt2-column>\n <vdr-dt2-column id=\"created-at\" [heading]=\"'common.created-at' | translate\" [hiddenByDefault]=\"true\">\n <ng-template let-line=\"item\">\n {{ line.createdAt | localeDate : 'short' }}\n </ng-template>\n </vdr-dt2-column>\n <vdr-dt2-column id=\"updated-at\" [heading]=\"'common.updated-at' | translate\" [hiddenByDefault]=\"true\">\n <ng-template let-line=\"item\">\n {{ line.updatedAt | localeDate : 'short' }}\n </ng-template>\n </vdr-dt2-column>\n <vdr-dt2-column [heading]=\"'common.image' | translate\" id=\"image\">\n <ng-template let-line=\"item\">\n <div class=\"image-placeholder\">\n <img\n *ngIf=\"line.featuredAsset as asset; else imagePlaceholder\"\n [src]=\"asset | assetPreview : 'tiny'\"\n />\n <ng-template #imagePlaceholder>\n <div class=\"placeholder\">\n <clr-icon shape=\"image\" size=\"48\"></clr-icon>\n </div>\n </ng-template>\n </div>\n </ng-template>\n </vdr-dt2-column>\n <vdr-dt2-column id=\"product-name\" [heading]=\"'order.product-name' | translate\" [optional]=\"false\">\n <ng-template let-line=\"item\">\n {{ line.productVariant.name }}\n </ng-template>\n </vdr-dt2-column>\n <vdr-dt2-column id=\"product-sku\" [heading]=\"'order.product-sku' | translate\">\n <ng-template let-line=\"item\">\n {{ line.productVariant.sku }}\n </ng-template>\n </vdr-dt2-column>\n <vdr-dt2-column id=\"unit-price\" [heading]=\"'order.unit-price' | translate\" [hiddenByDefault]=\"true\">\n <ng-template let-line=\"item\">\n {{ line.unitPriceWithTax | localeCurrency : order.currencyCode }}\n </ng-template>\n </vdr-dt2-column>\n <vdr-dt2-column id=\"prorated-unit-price\" [heading]=\"'order.prorated-unit-price' | translate\">\n <ng-template let-line=\"item\">\n {{ line.unitPriceWithTax | localeCurrency : order.currencyCode }}\n <ng-container *ngIf=\"line.discounts as discounts\">\n <vdr-dropdown *ngIf=\"discounts.length\">\n <div class=\"promotions-label\" vdrDropdownTrigger>\n <button class=\"icon-button\"><clr-icon shape=\"info\"></clr-icon></button>\n </div>\n <vdr-dropdown-menu>\n <div class=\"line-promotion\" *ngFor=\"let discount of discounts\">\n {{ discount.description }}\n <div class=\"promotion-amount\">\n {{\n discount.amount / 100 / line.quantity\n | number : '1.0-2'\n | currency : order.currencyCode\n }}\n </div>\n </div>\n </vdr-dropdown-menu>\n </vdr-dropdown>\n </ng-container>\n </ng-template>\n </vdr-dt2-column>\n <vdr-dt2-column id=\"quantity\" [heading]=\"'order.quantity' | translate\">\n <ng-template let-line=\"item\">\n {{ line.quantity }}\n <vdr-line-refunds [line]=\"line\" [payments]=\"order.payments\"></vdr-line-refunds>\n </ng-template>\n </vdr-dt2-column>\n <vdr-dt2-column id=\"refund-quantity\" [heading]=\"'order.refund' | translate\" [optional]=\"false\">\n <ng-template let-line=\"item\">\n <input\n *ngIf=\"lineCanBeRefundedOrCancelled(line)\"\n [ngModel]=\"lineQuantities[line.id].quantity\"\n type=\"number\"\n [max]=\"line.quantity\"\n min=\"0\"\n (ngModelChange)=\"onRefundQuantityChange(line.id, $event)\"\n />\n </ng-template>\n </vdr-dt2-column>\n <vdr-dt2-column id=\"cancel\" [heading]=\"'order.return-to-stock' | translate\" [optional]=\"false\">\n <ng-template let-line=\"item\">\n <div class=\"cancel-checkbox-wrapper\">\n <label class=\"flex center\">\n <input\n type=\"checkbox\"\n *ngIf=\"lineCanBeRefundedOrCancelled(line)\"\n clrCheckbox\n [disabled]=\"0 === lineQuantities[line.id].quantity\"\n [(ngModel)]=\"lineQuantities[line.id].cancel\"\n />\n <span class=\"ml-1\">{{ 'order.return-to-stock' | translate }}</span></label\n >\n </div>\n </ng-template>\n </vdr-dt2-column>\n </vdr-data-table-2>\n\n <div class=\"refund-details mt-4\">\n <div>\n <vdr-card>\n <label class=\"flex mb-2\" *ngFor=\"let shippingLine of order.shippingLines\">\n <input type=\"checkbox\" clrCheckbox (change)=\"toggleShippingRefund(shippingLine.id)\" />\n <div class=\"ml-1\">\n {{ 'order.refund-shipping' | translate }}\n <span>{{ shippingLine.shippingMethod.name }}:</span>\n <span class=\"ml-1\"\n >{{ shippingLine.discountedPriceWithTax | localeCurrency : order.currencyCode }}\n </span>\n </div></label\n >\n <vdr-form-field [label]=\"'order.refund-cancellation-reason' | translate\" class=\"mb-2\">\n <ng-select\n [items]=\"reasons\"\n bindLabel=\"name\"\n autofocus\n [placeholder]=\"'order.refund-cancellation-reason-required' | translate\"\n bindValue=\"id\"\n [addTag]=\"true\"\n [(ngModel)]=\"reason\"\n ></ng-select>\n </vdr-form-field>\n <vdr-form-field\n [label]=\"'order.refund-total' | translate\"\n [readOnlyToggle]=\"true\"\n (readOnlyToggleChange)=\"manuallySetRefundTotal = !$event\"\n >\n <vdr-currency-input\n [readonly]=\"!manuallySetRefundTotal\"\n [currencyCode]=\"order.currencyCode\"\n [(ngModel)]=\"refundTotal\"\n (ngModelChange)=\"updateRefundTotal()\"\n ></vdr-currency-input>\n </vdr-form-field>\n </vdr-card>\n </div>\n <div class=\"\">\n <vdr-payment-for-refund-selector\n [refundablePayments]=\"refundablePayments\"\n (paymentSelected)=\"onPaymentSelected($event.payment, $event.selected)\"\n [order]=\"order\"\n ></vdr-payment-for-refund-selector>\n </div>\n </div>\n</div>\n\n<ng-template vdrDialogButtons>\n <div>\n <div class=\"errors\">\n <clr-alert\n *ngIf=\"refundTotal < 0 || totalRefundableAmount < refundTotal\"\n [clrAlertType]=\"'danger'\"\n [clrAlertClosable]=\"false\"\n >\n <clr-alert-item>\n {{\n 'order.refund-total-error'\n | translate\n : {\n min: 0 | currency : order.currencyCode,\n max: totalRefundableAmount | localeCurrency : order.currencyCode\n }\n }}\n </clr-alert-item>\n </clr-alert>\n <clr-alert\n *ngIf=\"amountToRefundTotal < refundTotal || refundTotal < amountToRefundTotal\"\n [clrAlertType]=\"'danger'\"\n [clrAlertClosable]=\"false\"\n >\n <clr-alert-item>\n {{ 'order.refund-total-warning' | translate }}\n </clr-alert-item>\n </clr-alert>\n <clr-alert\n *ngIf=\"amountToRefundTotal && !reason\"\n [clrAlertType]=\"'danger'\"\n [clrAlertClosable]=\"false\"\n >\n <clr-alert-item>\n {{ 'order.refund-cancellation-reason-required' | translate }}\n </clr-alert-item>\n </clr-alert>\n </div>\n <div class=\"modal-buttons\">\n <button type=\"button\" class=\"btn\" (click)=\"cancel()\">{{ 'common.cancel' | translate }}</button>\n <button type=\"submit\" (click)=\"select()\" [disabled]=\"!canSubmit()\" class=\"btn btn-primary\">\n {{\n 'order.refund-with-amount'\n | translate : { amount: amountToRefundTotal | localeCurrency : order.currencyCode }\n }}\n </button>\n </div>\n </div>\n</ng-template>\n","import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';\nimport { FormControl, Validators } from '@angular/forms';\nimport { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';\nimport {\n CancelOrderInput,\n Dialog,\n getAppConfig,\n I18nService,\n OrderDetailFragment,\n OrderLineInput,\n PaymentWithRefundsFragment,\n RefundOrderInput,\n} from '@deenruv/admin-ui/core';\nimport { summate } from '@deenruv/common/lib/shared-utils';\nimport { getRefundablePayments, RefundablePayment } from '../../common/get-refundable-payments';\n\ntype SelectionLine = { quantity: number; cancel: boolean };\n\n@Component({\n selector: 'vdr-refund-order-dialog',\n templateUrl: './refund-order-dialog.component.html',\n styleUrls: ['./refund-order-dialog.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class RefundOrderDialogComponent\n implements OnInit, Dialog<{ cancel: CancelOrderInput; refunds: RefundOrderInput[] }>\n{\n order: OrderDetailFragment;\n resolveWith: (result?: { cancel: CancelOrderInput; refunds: RefundOrderInput[] }) => void;\n reason: string;\n lineQuantities: { [lineId: string]: SelectionLine } = {};\n refundablePayments: RefundablePayment[] = [];\n refundShippingLineIds: string[] = [];\n reasons = getAppConfig().cancellationReasons ?? [\n _('order.refund-reason-customer-request'),\n _('order.refund-reason-not-available'),\n ];\n manuallySetRefundTotal = false;\n refundTotal = 0;\n\n constructor(private i18nService: I18nService) {\n this.reasons = this.reasons.map(r => this.i18nService.translate(r));\n }\n\n get totalRefundableAmount(): number {\n return summate(this.refundablePayments, 'refundableAmount');\n }\n\n get amountToRefundTotal(): number {\n return this.refundablePayments.reduce(\n (total, payment) => total + payment.amountToRefundControl.value,\n 0,\n );\n }\n\n lineCanBeRefundedOrCancelled(line: OrderDetailFragment['lines'][number]): boolean {\n const refundedCount =\n this.order.payments\n ?.reduce(\n (all, payment) => [...all, ...payment.refunds],\n [] as PaymentWithRefundsFragment['refunds'],\n )\n .filter(refund => refund.state !== 'Failed')\n .reduce(\n (all, refund) => [...all, ...refund.lines],\n [] as Array<{ orderLineId: string; quantity: number }>,\n )\n .filter(refundLine => refundLine.orderLineId === line.id)\n .reduce((sum, refundLine) => sum + refundLine.quantity, 0) ?? 0;\n\n return refundedCount < line.orderPlacedQuantity;\n }\n\n ngOnInit() {\n this.lineQuantities = this.order.lines.reduce(\n (result, line) => ({\n ...result,\n [line.id]: {\n quantity: 0,\n refund: true,\n cancel: false,\n },\n }),\n {},\n );\n this.refundablePayments = getRefundablePayments(this.order.payments);\n }\n\n updateRefundTotal() {\n if (!this.manuallySetRefundTotal) {\n const itemTotal = this.order.lines.reduce((total, line) => {\n const lineRef = this.lineQuantities[line.id];\n const refundCount = lineRef.quantity || 0;\n return total + line.proratedUnitPriceWithTax * refundCount;\n }, 0);\n const shippingTotal = this.order.shippingLines.reduce((total, line) => {\n if (this.refundShippingLineIds.includes(line.id)) {\n return total + line.discountedPriceWithTax;\n } else {\n return total;\n }\n }, 0);\n this.refundTotal = itemTotal + shippingTotal;\n }\n\n // allocate the refund total across the refundable payments\n const refundablePayments = this.refundablePayments.filter(p => p.selected);\n let refundsAllocated = 0;\n for (const payment of refundablePayments) {\n const amountToRefund = Math.min(payment.refundableAmount, this.refundTotal - refundsAllocated);\n payment.amountToRefundControl.setValue(amountToRefund);\n refundsAllocated += amountToRefund;\n }\n }\n\n toggleShippingRefund(lineId: string) {\n const index = this.refundShippingLineIds.indexOf(lineId);\n if (index === -1) {\n this.refundShippingLineIds.push(lineId);\n } else {\n this.refundShippingLineIds.splice(index, 1);\n }\n this.updateRefundTotal();\n }\n\n onRefundQuantityChange(orderLineId: string, quantity: number) {\n this.manuallySetRefundTotal = false;\n const selectionLine = this.lineQuantities[orderLineId];\n if (selectionLine) {\n const previousQuantity = selectionLine.quantity;\n if (quantity === 0) {\n selectionLine.cancel = false;\n } else if (previousQuantity === 0 && quantity > 0) {\n selectionLine.cancel = true;\n }\n selectionLine.quantity = quantity;\n this.updateRefundTotal();\n }\n }\n\n onPaymentSelected(payment: RefundablePayment, selected: boolean) {\n if (selected) {\n const outstandingRefundAmount =\n this.refundTotal -\n this.refundablePayments\n .filter(p => p.id !== payment.id)\n .reduce((total, p) => total + p.amountToRefundControl.value, 0);\n if (0 < outstandingRefundAmount) {\n payment.amountToRefundControl.setValue(\n Math.min(outstandingRefundAmount, payment.refundableAmount),\n );\n }\n } else {\n payment.amountToRefundControl.setValue(0);\n }\n }\n\n isRefunding(): boolean {\n const result = Object.values(this.lineQuantities).reduce(\n (isRefunding, line) => isRefunding || 0 < line.quantity,\n false,\n );\n return result;\n }\n\n isCancelling(): boolean {\n const result = Object.values(this.lineQuantities).reduce(\n (isCancelling, line) => isCancelling || (0 < line.quantity && line.cancel),\n false,\n );\n return result;\n }\n\n canSubmit(): boolean {\n return 0 < this.refundTotal && this.amountToRefundTotal === this.refundTotal && !!this.reason;\n }\n\n select() {\n const refundLines = this.getOrderLineInput(() => true);\n const cancelLines = this.getOrderLineInput(line => line.cancel);\n\n this.resolveWith({\n refunds: this.refundablePayments\n .filter(rp => rp.selected && 0 < rp.amountToRefundControl.value)\n .map(payment => {\n return {\n lines: refundLines,\n reason: this.reason,\n paymentId: payment.id,\n amount: payment.amountToRefundControl.value,\n shipping: 0,\n adjustment: 0,\n };\n }),\n cancel: {\n lines: cancelLines,\n orderId: this.order.id,\n reason: this.reason,\n cancelShipping: this.refundShippingLineIds.length > 0,\n },\n });\n }\n\n cancel() {\n this.resolveWith();\n }\n\n private getOrderLineInput(filterFn: (line: SelectionLine) => boolean): OrderLineInput[] {\n return Object.entries(this.lineQuantities)\n .filter(([orderLineId, line]) => 0 < line.quantity && filterFn(line))\n .map(([orderLineId, line]) => ({\n orderLineId,\n quantity: line.quantity,\n }));\n }\n}\n","<ng-template vdrDialogTitle>{{ 'order.settle-refund' | translate }}</ng-template>\n<p class=\"instruction\">\n {{ 'order.settle-refund-manual-instructions' | translate: { method: refund.method } }}\n</p>\n<clr-input-container>\n <label>{{ 'order.transaction-id' | translate }}</label>\n <input clrInput name=\"transactionId\" [(ngModel)]=\"transactionId\" />\n</clr-input-container>\n\n<ng-template vdrDialogButtons>\n <button type=\"button\" class=\"btn\" (click)=\"cancel()\">{{ 'common.cancel' | translate }}</button>\n <button type=\"submit\" (click)=\"submit()\" [disabled]=\"!transactionId\" class=\"btn btn-primary\">\n {{ 'order.settle-refund' | translate }}\n </button>\n</ng-template>\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { Dialog, OrderDetailFragment } from '@deenruv/admin-ui/core';\n\n@Component({\n selector: 'vdr-settle-refund-dialog',\n templateUrl: './settle-refund-dialog.component.html',\n styleUrls: ['./settle-refund-dialog.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SettleRefundDialogComponent implements Dialog<string> {\n resolveWith: (result?: string) => void;\n transactionId = '';\n refund: NonNullable<OrderDetailFragment['payments']>[number]['refunds'][number];\n\n submit() {\n this.resolveWith(this.transactionId);\n }\n\n cancel() {\n this.resolveWith();\n }\n}\n","<vdr-chip [title]=\"'order.payment-state' | translate\" [colorType]=\"chipColorType\">\n <clr-icon shape=\"check-circle\" *ngIf=\"state === 'Settled'\"></clr-icon>\n {{ state | stateI18nToken | translate }}\n</vdr-chip>\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\n@Component({\n selector: 'vdr-payment-state-label',\n templateUrl: './payment-state-label.component.html',\n styleUrls: ['./payment-state-label.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PaymentStateLabelComponent {\n @Input() state: string;\n\n get chipColorType() {\n switch (this.state) {\n case 'Authorized':\n return 'warning';\n case 'Settled':\n return 'success';\n case 'Declined':\n case 'Cancelled':\n return 'error';\n }\n }\n}\n","<vdr-chip [title]=\"'order.payment-state' | translate\" [colorType]=\"chipColorType\">\n <clr-icon shape=\"check-circle\" *ngIf=\"state === 'Settled'\"></clr-icon>\n {{ state | stateI18nToken | translate }}\n</vdr-chip>\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\n@Component({\n selector: 'vdr-refund-state-label',\n templateUrl: './refund-state-label.component.html',\n styleUrls: ['./refund-state-label.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class RefundStateLabelComponent {\n @Input() state: string;\n\n get chipColorType() {\n switch (this.state) {\n case 'Pending':\n return 'warning';\n case 'Settled':\n return 'success';\n case 'Failed':\n return 'error';\n }\n }\n}\n","<vdr-labeled-data [label]=\"'order.payment-method' | translate\">\n {{ payment.method }}\n</vdr-labeled-data>\n<vdr-labeled-data [label]=\"'order.amount' | translate\">\n {{ payment.amount | localeCurrency: currencyCode }}\n</vdr-labeled-data>\n<vdr-labeled-data *ngIf=\"payment.errorMessage\" [label]=\"'order.error-message' | translate\">\n {{ payment.errorMessage }}\n</vdr-labeled-data>\n<vdr-labeled-data *ngIf=\"payment.transactionId\" [label]=\"'order.transaction-id' | translate\">\n {{ payment.transactionId }}\n</vdr-labeled-data>\n<vdr-labeled-data [label]=\"'order.payment-metadata' | translate\">\n <vdr-object-tree [value]=\"payment.metadata\"></vdr-object-tree>\n</vdr-labeled-data>\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { CurrencyCode, OrderDetailFragment } from '@deenruv/admin-ui/core';\n\n@Component({\n selector: 'vdr-payment-detail',\n templateUrl: './payment-detail.component.html',\n styleUrls: ['./payment-detail.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PaymentDetailComponent {\n @Input() payment: NonNullable<OrderDetailFragment['payments']>[number];\n @Input() currencyCode: CurrencyCode;\n}\n","<div class=\"card\">\n <div class=\"card-header payment-header\">\n <div>\n {{ 'order.payment' | translate }}\n <ng-container *ngIf=\"payment.amount\">{{ payment.amount | localeCurrency : currencyCode }}</ng-container>\n </div>\n <div class=\"payment-state\">\n <vdr-payment-state-label [state]=\"payment.state\"></vdr-payment-state-label>\n </div>\n </div>\n <div class=\"card-block\">\n <vdr-payment-detail [payment]=\"payment\" [currencyCode]=\"currencyCode\"></vdr-payment-detail>\n </div>\n <ng-container *ngFor=\"let refund of payment.refunds\">\n <div class=\"refund-wrapper card-block\">\n <div class=\"card-header payment-header refund-header\">\n <clr-icon shape=\"redo\" class=\"refund-icon\" dir=\"down\"></clr-icon>\n {{ 'order.refund' | translate }} #{{ refund.id }}\n <div class=\"clr-flex-fill\"></div>\n <vdr-refund-state-label [state]=\"refund.state\"></vdr-refund-state-label>\n </div>\n <div class=\"card-block\">\n <vdr-labeled-data [label]=\"'common.created-at' | translate\">\n {{ refund.createdAt | localeDate : 'medium' }}\n </vdr-labeled-data>\n <vdr-labeled-data [label]=\"'order.refund-total' | translate\">\n {{ refund.total | localeCurrency : currencyCode }}\n </vdr-labeled-data>\n <vdr-labeled-data [label]=\"'order.transaction-id' | translate\" *ngIf=\"refund.transactionId\">\n {{ refund.transactionId }}\n </vdr-labeled-data>\n <vdr-labeled-data [label]=\"'order.refund-reason' | translate\" *ngIf=\"refund.reason\">\n {{ refund.reason }}\n </vdr-labeled-data>\n <vdr-labeled-data\n [label]=\"'order.refund-metadata' | translate\"\n *ngIf=\"refundHasMetadata(refund)\"\n >\n <vdr-object-tree [value]=\"refund.metadata\"></vdr-object-tree>\n </vdr-labeled-data>\n </div>\n <div class=\"card-footer\" *ngIf=\"refund.state === 'Pending'\">\n <button class=\"btn btn-sm btn-primary\" (click)=\"settleRefund.emit(refund)\">\n {{ 'order.settle-refund' | translate }}\n </button>\n </div>\n </div>\n </ng-container>\n <div class=\"card-footer\" *ngIf=\"payment.nextStates.length\">\n <button\n class=\"btn btn-sm btn-primary\"\n *ngIf=\"payment.nextStates.includes('Settled')\"\n (click)=\"settlePayment.emit(payment)\"\n >\n {{ 'order.settle-payment' | translate }}\n </button>\n <vdr-dropdown>\n <button class=\"icon-button\" vdrDropdownTrigger>\n <clr-icon shape=\"ellipsis-vertical\"></clr-icon>\n </button>\n <vdr-dropdown-menu vdrPosition=\"bottom-right\">\n <ng-container *ngFor=\"let nextState of nextOtherStates()\">\n <button\n type=\"button\"\n vdrDropdownItem\n (click)=\"transitionPaymentState.emit({ payment: payment, state: nextState })\"\n >\n <ng-container *ngIf=\"nextState !== 'Cancelled'; else cancel\">\n <clr-icon shape=\"step-forward-2\"></clr-icon>\n {{\n 'order.transition-to-state'\n | translate : { state: (nextState | stateI18nToken | translate) }\n }}\n </ng-container>\n <ng-template #cancel>\n <clr-icon shape=\"error-standard\" class=\"is-error\"></clr-icon>\n {{ 'order.cancel-payment' | translate }}\n </ng-template>\n </button>\n </ng-container>\n </vdr-dropdown-menu>\n </vdr-dropdown>\n </div>\n</div>\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';\nimport { CurrencyCode, OrderDetailFragment } from '@deenruv/admin-ui/core';\n\ntype Payment = NonNullable<OrderDetailFragment['payments']>[number];\n\n@Component({\n selector: 'vdr-order-payment-card',\n templateUrl: './order-payment-card.component.html',\n styleUrls: ['./order-payment-card.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class OrderPaymentCardComponent {\n @Input() payment: Payment;\n @Input() currencyCode: CurrencyCode;\n @Output() settlePayment = new EventEmitter<Payment>();\n @Output() transitionPaymentState = new EventEmitter<{ payment: Payment; state: string }>();\n @Output() settleRefund = new EventEmitter<Payment['refunds'][number]>();\n\n refundHasMetadata(refund?: Payment['refunds'][number]): boolean {\n return !!refund && Object.keys(refund.metadata).length > 0;\n }\n\n nextOtherStates(): string[] {\n if (!this.payment) {\n return [];\n }\n return this.payment.nextStates.filter(s => s !== 'Settled' && s !== 'Error');\n }\n}\n","import {\n Component,\n ComponentRef,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n Type,\n ViewChild,\n ViewContainerRef,\n} from '@angular/core';\nimport {\n HistoryEntryComponentService,\n OrderDetailFragment,\n OrderHistoryEntryComponent,\n TimelineHistoryEntry,\n} from '@deenruv/admin-ui/core';\n\n@Component({\n selector: 'vdr-order-history-entry-host',\n template: `<vdr-timeline-entry\n [displayType]=\"instance.getDisplayType(entry)\"\n [iconShape]=\"instance.getIconShape && instance.getIconShape(entry)\"\n [createdAt]=\"entry.createdAt\"\n [name]=\"instance.getName && instance.getName(entry)\"\n [featured]=\"instance.isFeatured(entry)\"\n [collapsed]=\"!expanded && !instance.isFeatured(entry)\"\n (expandClick)=\"expandClick.emit()\"\n >\n <div #portal></div>\n </vdr-timeline-entry>`,\n exportAs: 'historyEntry',\n})\nexport class OrderHistoryEntryHostComponent implements OnInit, OnDestroy {\n @Input() entry: TimelineHistoryEntry;\n @Input() order: OrderDetailFragment;\n @Input() expanded: boolean;\n @Output() expandClick = new EventEmitter<void>();\n @ViewChild('portal', { static: true, read: ViewContainerRef }) portalRef: ViewContainerRef;\n instance: OrderHistoryEntryComponent;\n private componentRef: ComponentRef<OrderHistoryEntryComponent>;\n\n constructor(private historyEntryComponentService: HistoryEntryComponentService) {}\n\n ngOnInit(): void {\n const componentType = this.historyEntryComponentService.getComponent(\n this.entry.type,\n ) as Type<OrderHistoryEntryComponent>;\n\n const componentRef = this.portalRef.createComponent(componentType);\n componentRef.instance.entry = this.entry;\n componentRef.instance.order = this.order;\n this.instance = componentRef.instance;\n this.componentRef = componentRef;\n }\n\n ngOnDestroy() {\n this.componentRef?.destroy();\n }\n}\n","<div class=\"entry-list\" [class.expanded]=\"expanded\">\n <vdr-timeline-entry iconShape=\"note\" displayType=\"muted\" [featured]=\"true\" [isFirst]=\"true\">\n <div class=\"note-entry\">\n <textarea [(ngModel)]=\"note\" name=\"note\" class=\"note\"></textarea>\n <button class=\"btn btn-secondary\" [disabled]=\"!note\" (click)=\"addNoteToOrder()\">\n {{ 'common.add-note' | translate }}\n </button>\n </div>\n <div class=\"visibility-select\">\n <clr-checkbox-wrapper>\n <input type=\"checkbox\" clrCheckbox [(ngModel)]=\"noteIsPrivate\" />\n <label>{{ 'order.note-is-private' | translate }}</label>\n </clr-checkbox-wrapper>\n <span *ngIf=\"noteIsPrivate\" class=\"private\">\n {{ 'order.note-only-visible-to-administrators' | translate }}\n </span>\n <span *ngIf=\"!noteIsPrivate\" class=\"public\">\n {{ 'order.note-visible-to-customer' | translate }}\n </span>\n </div>\n </vdr-timeline-entry>\n <ng-container *ngFor=\"let entry of history\">\n <vdr-order-history-entry-host\n *ngIf=\"hasCustomComponent(entry.type); else defaultComponents\"\n [order]=\"order\"\n [entry]=\"entry\"\n [expanded]=\"expanded\"\n (expandClick)=\"expanded = !expanded\"\n ></vdr-order-history-entry-host>\n <ng-template #defaultComponents>\n <vdr-timeline-entry\n [displayType]=\"getDisplayType(entry)\"\n [iconShape]=\"getTimelineIcon(entry)\"\n [createdAt]=\"entry.createdAt\"\n [name]=\"getName(entry)\"\n [featured]=\"isFeatured(entry)\"\n [collapsed]=\"!expanded && !isFeatured(entry)\"\n (expandClick)=\"expanded = !expanded\"\n >\n <ng-container [ngSwitch]=\"entry.type\">\n <ng-container *ngSwitchCase=\"type.ORDER_STATE_TRANSITION\">\n <div class=\"title\" *ngIf=\"entry.data.to === 'Delivered'\">\n {{ 'order.history-order-fulfilled' | translate }}\n </div>\n <div class=\"title\" *ngIf=\"entry.data.to === 'Cancelled'\">\n {{ 'order.history-order-cancelled' | translate }}\n </div>\n <ng-template [ngIf]=\"entry.data.to !== 'Cancelled' && entry.data.to !== 'Delivered'\">\n {{\n 'order.history-order-transition'\n | translate : { from: entry.data.from, to: entry.data.to }\n }}\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"type.ORDER_MODIFIED\">\n <div class=\"title\">\n {{ 'order.history-order-modified' | translate }}\n </div>\n <div\n class=\"flex items-center\"\n *ngIf=\"getModification(entry.data.modificationId) as modification\"\n >\n {{ 'order.modify-order-price-difference' | translate }}:\n <strong>{{\n modification.priceChange | localeCurrency : order.currencyCode\n }}</strong>\n <vdr-chip colorType=\"success\" class=\"mx-1\" *ngIf=\"modification.isSettled\">{{\n 'order.modification-settled' | translate\n }}</vdr-chip>\n <vdr-chip colorType=\"error\" class=\"mx-1\" *ngIf=\"!modification.isSettled\">{{\n 'order.modification-not-settled' | translate\n }}</vdr-chip>\n <vdr-history-entry-detail>\n <vdr-modification-detail\n [order]=\"order\"\n [modification]=\"modification\"\n ></vdr-modification-detail>\n </vdr-history-entry-detail>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"type.ORDER_PAYMENT_TRANSITION\">\n <ng-container *ngIf=\"entry.data.to === 'Settled'; else regularPaymentTransition\">\n <div class=\"title\">\n {{ 'order.history-payment-settled' | translate }}\n </div>\n <div class=\"flex items-center\">\n <vdr-chip *ngIf=\"getPayment(entry) as payment\" class=\"mr-1\">{{\n payment.amount | localeCurrency : order.currencyCode\n }}</vdr-chip>\n <vdr-history-entry-detail *ngIf=\"getPayment(entry) as payment\">\n <vdr-payment-detail\n [payment]=\"payment\"\n [currencyCode]=\"order.currencyCode\"\n ></vdr-payment-detail>\n </vdr-history-entry-detail>\n </div>\n </ng-container>\n <ng-template #regularPaymentTransition>\n {{\n 'order.history-payment-transition'\n | translate\n : {\n from: entry.data.from,\n to: entry.data.to,\n id: getPayment(entry)?.transactionId\n }\n }}\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"type.ORDER_REFUND_TRANSITION\">\n <ng-container *ngIf=\"entry.data.to === 'Settled'; else regularRefundTransition\">\n <ng-container *ngIf=\"getRefund(entry) as refund\">\n <div class=\"title\">{{ 'order.refund' | translate }} #{{ refund.id }}</div>\n <div class=\"flex items-center\">\n <vdr-chip colorType=\"warning\" class=\"mr-1\">{{\n refund.total | localeCurrency : order.currencyCode\n }}</vdr-chip>\n <vdr-history-entry-detail>\n <vdr-labeled-data [label]=\"'order.cancellation-reason' | translate\">\n {{ entry.data.reason }}\n </vdr-labeled-data>\n <vdr-labeled-data [label]=\"'order.contents' | translate\">\n <vdr-simple-item-list\n [items]=\"getCancelledItems(refund.lines)\"\n ></vdr-simple-item-list>\n </vdr-labeled-data>\n </vdr-history-entry-detail>\n </div>\n </ng-container>\n </ng-container>\n <ng-template #regularRefundTransition>\n {{\n 'order.history-refund-transition'\n | translate\n : {\n from: entry.data.from,\n to: entry.data.to,\n id: entry.data.refundId\n }\n }}\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"type.ORDER_CANCELLATION\">\n {{\n 'order.history-items-cancelled'\n | translate : { count: getCancelledQuantity(entry) }\n }}\n <vdr-history-entry-detail *ngIf=\"getCancelledItems(entry.data.lines) as items\">\n <vdr-labeled-data [label]=\"'order.cancellation-reason' | translate\">\n {{ entry.data.reason }}\n </vdr-labeled-data>\n <vdr-labeled-data [label]=\"'order.contents' | translate\">\n <vdr-simple-item-list [items]=\"items\"></vdr-simple-item-list>\n </vdr-labeled-data>\n <vdr-labeled-data [label]=\"'order.shipping-cancelled' | translate\">\n {{ entry.data.shippingCancelled }}\n </vdr-labeled-data>\n </vdr-history-entry-detail>\n </ng-container>\n <ng-container *ngSwitchCase=\"type.ORDER_FULFILLMENT\">\n {{ 'order.history-fulfillment-created' | translate }}\n <vdr-history-entry-detail *ngIf=\"getFulfillment(entry) as fulfillment\">\n <vdr-fulfillment-detail\n [fulfillmentId]=\"fulfillment.id\"\n [order]=\"order\"\n ></vdr-fulfillment-detail>\n </vdr-history-entry-detail>\n </ng-container>\n <ng-container *ngSwitchCase=\"type.ORDER_FULFILLMENT_TRANSITION\">\n <ng-container *ngIf=\"entry.data.to === 'Delivered'\">\n <div class=\"title\">\n {{ 'order.history-fulfillment-delivered' | translate }}\n </div>\n {{ 'order.tracking-code' | translate }}: {{ getFulfillment(entry)?.trackingCode }}\n </ng-container>\n <ng-container *ngIf=\"entry.data.to === 'Shipped'\">\n <div class=\"title\">\n {{ 'order.history-fulfillment-shipped' | translate }}\n </div>\n {{ 'order.tracking-code' | translate }}: {{ getFulfillment(entry)?.trackingCode }}\n </ng-container>\n <ng-container *ngIf=\"entry.data.to !== 'Delivered' && entry.data.to !== 'Shipped'\">\n {{\n 'order.history-fulfillment-transition'\n | translate : { from: entry.data.from, to: entry.data.to }\n }}\n </ng-container>\n <vdr-history-entry-detail *ngIf=\"getFulfillment(entry) as fulfillment\">\n <vdr-fulfillment-detail\n [fulfillmentId]=\"fulfillment.id\"\n [order]=\"order\"\n ></vdr-fulfillment-detail>\n </vdr-history-entry-detail>\n </ng-container>\n <ng-container *ngSwitchCase=\"type.ORDER_NOTE\">\n <div class=\"flex\">\n <div class=\"note-text\">\n <span *ngIf=\"entry.isPublic\" class=\"note-visibility public\">{{\n 'common.public' | translate\n }}</span>\n <span *ngIf=\"!entry.isPublic\" class=\"note-visibility private\">{{\n 'common.private' | translate\n }}</span>\n {{ entry.data.note }}\n </div>\n <div class=\"flex-spacer\"></div>\n <vdr-dropdown>\n <button class=\"button-small ml-1\" vdrDropdownTrigger>\n <clr-icon shape=\"ellipsis-vertical\" size=\"12\"></clr-icon>\n </button>\n <vdr-dropdown-menu vdrPosition=\"bottom-right\">\n <button\n vdrDropdownItem\n (click)=\"updateNote.emit(entry)\"\n [disabled]=\"!('UpdateOrder' | hasPermission)\"\n >\n <clr-icon shape=\"edit\"></clr-icon>\n {{ 'common.edit' | translate }}\n </button>\n <div class=\"dropdown-divider\"></div>\n <button\n vdrDropdownItem\n (click)=\"deleteNote.emit(entry)\"\n [disabled]=\"!('UpdateOrder' | hasPermission)\"\n >\n <clr-icon shape=\"trash\" class=\"is-danger\"></clr-icon>\n {{ 'common.delete' | translate }}\n </button>\n </vdr-dropdown-menu>\n </vdr-dropdown>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"type.ORDER_COUPON_APPLIED\">\n {{ 'order.history-coupon-code-applied' | translate }}:\n <vdr-chip>\n <a [routerLink]=\"['/marketing', 'promotions', entry.data.promotionId]\">{{\n entry.data.couponCode\n }}</a>\n </vdr-chip>\n </ng-container>\n <ng-container *ngSwitchCase=\"type.ORDER_COUPON_REMOVED\">\n {{ 'order.history-coupon-code-removed' | translate }}:\n <vdr-chip\n ><span class=\"cancelled-coupon-code\">{{ entry.data.couponCode }}</span></vdr-chip\n >\n </ng-container>\n <ng-container *ngSwitchCase=\"type.ORDER_CUSTOMER_UPDATED\">\n <div class=\"title\">\n {{\n 'order.history-customer-updated'\n | translate : { newCustomerName: entry.data.newCustomerName }\n }}\n </div>\n <div class=\"flex\">\n <div class=\"note-text\">\n {{ entry.data.note }}\n </div>\n <div class=\"flex-spacer\"></div>\n <vdr-history-entry-detail>\n <vdr-labeled-data [label]=\"'order.previous-customer' | translate\">\n <a\n *ngIf=\"entry.data.previousCustomerId\"\n class=\"button-ghost\"\n [routerLink]=\"[\n '/customer',\n 'customers',\n entry.data.previousCustomerId\n ]\"\n >\n <clr-icon shape=\"user\" class=\"is-solid\"></clr-icon>\n <span>{{ entry.data.previousCustomerName }}</span>\n <clr-icon shape=\"arrow right\"></clr-icon>\n </a>\n </vdr-labeled-data>\n <vdr-labeled-data [label]=\"'order.new-customer' | translate\">\n <a\n *ngIf=\"entry.data.newCustomerId\"\n class=\"button-ghost\"\n [routerLink]=\"['/customer', 'customers', entry.data.newCustomerId]\"\n >\n <clr-icon shape=\"user\" class=\"is-solid\"></clr-icon>\n <span>{{ entry.data.newCustomerName }}</span>\n <clr-icon shape=\"arrow right\"></clr-icon>\n </a>\n </vdr-labeled-data>\n </vdr-history-entry-detail>\n </div>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <div class=\"title\">\n {{ entry.type | translate }}\n </div>\n <vdr-history-entry-detail *ngIf=\"entry.data\">\n <vdr-object-tree [value]=\"entry.data\"></vdr-object-tree>\n </vdr-history-entry-detail>\n </ng-container>\n </ng-container>\n </vdr-timeline-entry>\n </ng-template>\n </ng-container>\n\n <vdr-timeline-entry [isLast]=\"true\" [createdAt]=\"order.createdAt\" [featured]=\"true\">\n <div class=\"title\">\n {{ 'order.history-order-created' | translate }}\n </div>\n </vdr-timeline-entry>\n</div>\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';\nimport {\n HistoryEntryComponentService,\n HistoryEntryType,\n OrderDetailFragment,\n TimelineDisplayType,\n TimelineHistoryEntry,\n} from '@deenruv/admin-ui/core';\n\n@Component({\n selector: 'vdr-order-history',\n templateUrl: './order-history.component.html',\n styleUrls: ['./order-history.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class OrderHistoryComponent {\n @Input() order: OrderDetailFragment;\n @Input() history: TimelineHistoryEntry[];\n @Output() addNote = new EventEmitter<{ note: string; isPublic: boolean }>();\n @Output() updateNote = new EventEmitter<TimelineHistoryEntry>();\n @Output() deleteNote = new EventEmitter<TimelineHistoryEntry>();\n note = '';\n noteIsPrivate = true;\n expanded = false;\n readonly type = HistoryEntryType;\n\n constructor(private historyEntryComponentService: HistoryEntryComponentService) {}\n\n hasCustomComponent(type: string): boolean {\n return !!this.historyEntryComponentService.getComponent(type);\n }\n\n getDisplayType(entry: TimelineHistoryEntry): TimelineDisplayType {\n if (entry.type === HistoryEntryType.ORDER_STATE_TRANSITION) {\n if (entry.data.to === 'Delivered') {\n return 'success';\n }\n if (entry.data.to === 'Cancelled') {\n return 'error';\n }\n }\n if (entry.type === HistoryEntryType.ORDER_FULFILLMENT_TRANSITION) {\n if (entry.data.to === 'Delivered') {\n return 'success';\n }\n }\n if (entry.type === HistoryEntryType.ORDER_PAYMENT_TRANSITION) {\n if (entry.data.to === 'Declined' || entry.data.to === 'Cancelled') {\n return 'error';\n }\n }\n if (entry.type === HistoryEntryType.ORDER_CANCELLATION) {\n return 'warning';\n }\n if (entry.type === HistoryEntryType.ORDER_REFUND_TRANSITION) {\n return 'warning';\n }\n return 'default';\n }\n\n getTimelineIcon(entry: TimelineHistoryEntry) {\n if (entry.type === HistoryEntryType.ORDER_STATE_TRANSITION) {\n if (entry.data.to === 'Delivered') {\n return ['success-standard', 'is-solid'];\n }\n if (entry.data.to === 'Cancelled') {\n return 'ban';\n }\n }\n if (entry.type === HistoryEntryType.ORDER_PAYMENT_TRANSITION) {\n if (entry.data.to === 'Settled') {\n return 'credit-card';\n }\n }\n if (entry.type === HistoryEntryType.ORDER_REFUND_TRANSITION) {\n if (entry.data.to === 'Settled') {\n return 'credit-card';\n }\n }\n if (entry.type === HistoryEntryType.ORDER_NOTE) {\n return 'note';\n }\n if (entry.type === HistoryEntryType.ORDER_MODIFIED) {\n return 'pencil';\n }\n if (entry.type === HistoryEntryType.ORDER_CUSTOMER_UPDATED) {\n return 'switch';\n }\n if (entry.type === HistoryEntryType.ORDER_FULFILLMENT_TRANSITION) {\n if (entry.data.to === 'Shipped') {\n return 'truck';\n }\n if (entry.data.to === 'Delivered') {\n return 'truck';\n }\n }\n }\n\n isFeatured(entry: TimelineHistoryEntry): boolean {\n switch (entry.type) {\n case HistoryEntryType.ORDER_STATE_TRANSITION: {\n return (\n entry.data.to === 'Delivered' ||\n entry.data.to === 'Cancelled' ||\n entry.data.to === 'Settled'\n );\n }\n case HistoryEntryType.ORDER_REFUND_TRANSITION:\n return entry.data.to === 'Settled';\n case HistoryEntryType.ORDER_PAYMENT_TRANSITION:\n return entry.data.to === 'Settled' || entry.data.to === 'Cancelled';\n case HistoryEntryType.ORDER_FULFILLMENT_TRANSITION:\n return entry.data.to === 'Delivered' || entry.data.to === 'Shipped';\n case HistoryEntryType.ORDER_NOTE:\n case HistoryEntryType.ORDER_MODIFIED:\n case HistoryEntryType.ORDER_CUSTOMER_UPDATED:\n return true;\n default:\n return false;\n }\n }\n\n getFulfillment(\n entry: TimelineHistoryEntry,\n ): NonNullable<OrderDetailFragment['fulfillments']>[number] | undefined {\n if (\n (entry.type === HistoryEntryType.ORDER_FULFILLMENT ||\n entry.type === HistoryEntryType.ORDER_FULFILLMENT_TRANSITION) &&\n this.order.fulfillments\n ) {\n return this.order.fulfillments.find(f => f.id === entry.data.fulfillmentId);\n }\n }\n\n getPayment(\n entry: TimelineHistoryEntry,\n ): NonNullable<OrderDetailFragment['payments']>[number] | undefined {\n if (entry.type === HistoryEntryType.ORDER_PAYMENT_TRANSITION && this.order.payments) {\n return this.order.payments.find(p => p.id === entry.data.paymentId);\n }\n }\n\n getRefund(\n entry: TimelineHistoryEntry,\n ): NonNullable<OrderDetailFragment['payments']>[number]['refunds'][number] | undefined {\n if (entry.type === HistoryEntryType.ORDER_REFUND_TRANSITION && this.order.payments) {\n const allRefunds = this.order.payments.reduce(\n (refunds, payment) => refunds.concat(payment.refunds),\n [] as NonNullable<OrderDetailFragment['payments']>[number]['refunds'],\n );\n return allRefunds.find(r => r.id === entry.data.refundId);\n }\n }\n\n getCancelledQuantity(entry: TimelineHistoryEntry): number {\n return entry.data.lines.reduce((total, line) => total + line.quantity, 0);\n }\n\n getCancelledItems(\n cancellationLines: Array<{ orderLineId: string; quantity: number }>,\n ): Array<{ name: string; quantity: number }> {\n const itemMap = new Map<string, number>();\n for (const line of this.order.lines) {\n const cancellationLine = cancellationLines.find(l => l.orderLineId === line.id);\n if (cancellationLine) {\n const count = itemMap.get(line.productVariant.name);\n itemMap.set(line.productVariant.name, cancellationLine.quantity);\n }\n }\n return Array.from(itemMap.entries()).map(([name, quantity]) => ({ name, quantity }));\n }\n\n getModification(id: string) {\n return this.order.modifications.find(m => m.id === id);\n }\n\n getName(entry: TimelineHistoryEntry): string {\n const { administrator } = entry;\n if (administrator) {\n return `${administrator.firstName} ${administrator.lastName}`;\n } else {\n const customer = this.order.customer;\n if (customer) {\n return `${customer.firstName} ${customer.lastName}`;\n }\n }\n return '';\n }\n\n addNoteToOrder() {\n this.addNote.emit({ note: this.note, isPublic: !this.noteIsPrivate });\n this.note = '';\n this.noteIsPrivate = true;\n }\n}\n","import { gql } from 'apollo-angular';\n\nexport const GET_SELLER_ORDERS = gql`\n query GetSellerOrders($orderId: ID!) {\n order(id: $orderId) {\n id\n sellerOrders {\n id\n code\n state\n orderPlacedAt\n currencyCode\n totalWithTax\n channels {\n id\n code\n seller {\n id\n name\n }\n }\n }\n }\n }\n`;\n","<vdr-card [title]=\"'order.seller-orders' | translate\">\n <div class=\"form-grid\">\n <div *ngFor=\"let order of sellerOrders$ | async\">\n <a [routerLink]=\"['seller-orders', order.id]\" class=\"button-ghost mb-1\"\n >{{ order.code }} <clr-icon shape=\"arrow right\"></clr-icon\n ></a>\n <vdr-labeled-data [label]=\"'order.state' | translate\">\n <vdr-order-state-label [state]=\"order.state\"></vdr-order-state-label>\n </vdr-labeled-data>\n <vdr-labeled-data *ngIf=\"getSeller(order) as seller\" [label]=\"'common.seller' | translate\">\n {{ seller.name }}\n </vdr-labeled-data>\n <vdr-labeled-data *ngIf=\"getSeller(order) as seller\" [label]=\"'order.total' | translate\">\n {{ order.totalWithTax | localeCurrency : order.currencyCode }}\n </vdr-labeled-data>\n </div>\n </div>\n</vdr-card>\n","import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\nimport { Router } from '@angular/router';\nimport {\n ChannelService,\n DataService,\n GetSellerOrdersQuery,\n GetSellerOrdersQueryVariables,\n} from '@deenruv/admin-ui/core';\nimport { DEFAULT_CHANNEL_CODE } from '@deenruv/common/lib/shared-constants';\nimport { Observable } from 'rxjs';\n\nimport { GET_SELLER_ORDERS } from './seller-orders-card.graphql';\n\ntype SellerOrder = NonNullable<NonNullable<GetSellerOrdersQuery['order']>['sellerOrders']>[number];\n\n@Component({\n selector: 'vdr-seller-orders-card',\n templateUrl: './seller-orders-card.component.html',\n styleUrls: ['./seller-orders-card.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SellerOrdersCardComponent implements OnInit {\n @Input() orderId: string;\n\n sellerOrders$: Observable<SellerOrder[]>;\n\n constructor(\n private router: Router,\n private dataService: DataService,\n private channelService: ChannelService,\n ) {}\n\n ngOnInit() {\n this.sellerOrders$ = this.dataService\n .query<GetSellerOrdersQuery, GetSellerOrdersQueryVariables>(GET_SELLER_ORDERS, {\n orderId: this.orderId,\n })\n .mapSingle(({ order }) => order?.sellerOrders ?? []);\n }\n\n getSeller(order: SellerOrder) {\n const sellerChannel = order.channels.find(channel => channel.code !== DEFAULT_CHANNEL_CODE);\n return sellerChannel?.seller;\n }\n\n navigateToSellerOrder(order: SellerOrder) {\n this.router.navigate(['/orders', order.id]);\n }\n}\n","<vdr-page-block>\n <vdr-action-bar *ngIf=\"entity$ | async as order\">\n <vdr-ab-left> </vdr-ab-left>\n\n <vdr-ab-right>\n <vdr-action-bar-items locationId=\"order-detail\"></vdr-action-bar-items>\n <button\n class=\"button primary mr-1\"\n *ngIf=\"\n order.type !== 'Aggregate' &&\n (order.state === 'ArrangingPayment' ||\n order.state === 'ArrangingAdditionalPayment') &&\n (hasUnsettledModifications(order) ||\n 0 < outstandingPaymentAmount(order))\n \"\n (click)=\"addManualPayment(order)\"\n >\n {{ \"order.add-payment-to-order\" | translate }}\n ({{\n outstandingPaymentAmount(order) | localeCurrency : order.currencyCode\n }})\n </button>\n <button\n class=\"button primary mr-1\"\n *ngIf=\"\n order.type !== 'Aggregate' &&\n order.active === false &&\n order.state !== 'ArrangingAdditionalPayment' &&\n order.state !== 'ArrangingPayment' &&\n 0 < outstandingPaymentAmount(order)\n \"\n (click)=\"transitionToState('ArrangingAdditionalPayment')\"\n >\n {{ \"order.arrange-additional-payment\" | translate }}\n </button>\n <button\n *ngIf=\"order.type !== 'Aggregate'\"\n class=\"button primary mr-1\"\n (click)=\"fulfillOrder()\"\n [disabled]=\"!canAddFulfillment(order)\"\n >\n {{ \"order.fulfill-order\" | translate }}\n </button>\n <vdr-action-bar-dropdown-menu\n [alwaysShow]=\"true\"\n locationId=\"order-detail\"\n >\n <ng-container\n *ngIf=\"\n order.type !== 'Aggregate' && order.nextStates.includes('Modifying')\n \"\n >\n <button\n type=\"button\"\n vdrDropdownItem\n (click)=\"transitionToModifying()\"\n >\n <clr-icon shape=\"pencil\"></clr-icon>\n {{ \"order.modify-order\" | translate }}\n </button>\n <div class=\"dropdown-divider\"></div>\n </ng-container>\n <button\n type=\"button\"\n vdrDropdownItem\n *ngIf=\"\n order.type !== 'Aggregate' && order.nextStates.includes('Cancelled')\n \"\n (click)=\"cancelOrRefund(order)\"\n >\n <clr-icon shape=\"error-standard\" class=\"is-error\"></clr-icon>\n <ng-container *ngIf=\"orderHasSettledPayments(order); else cancelOnly\">\n {{ \"order.refund-and-cancel-order\" | translate }}\n </ng-container>\n <ng-template #cancelOnly>\n {{ \"order.cancel-order\" | translate }}\n </ng-template>\n </button>\n\n <ng-container *ngIf=\"(nextStates$ | async)?.length\">\n <div class=\"dropdown-divider\"></div>\n <button\n *ngFor=\"let nextState of nextStates$ | async\"\n type=\"button\"\n vdrDropdownItem\n (click)=\"transitionToState(nextState)\"\n >\n <clr-icon shape=\"step-forward-2\"></clr-icon>\n {{\n \"order.transition-to-state\"\n | translate\n : { state: (nextState | stateI18nToken | translate) }\n }}\n </button>\n </ng-container>\n <div class=\"dropdown-divider\"></div>\n <button\n type=\"button\"\n vdrDropdownItem\n (click)=\"manuallyTransitionToState(order)\"\n >\n <clr-icon shape=\"step-forward-2\" class=\"is-warning\"></clr-icon>\n {{ \"order.manually-transition-to-state\" | translate }}\n </button>\n </vdr-action-bar-dropdown-menu>\n </vdr-ab-right>\n </vdr-action-bar>\n</vdr-page-block>\n\n<vdr-page-detail-layout *ngIf=\"entity$ | async as order\">\n <vdr-page-detail-sidebar>\n <vdr-card [title]=\"'order.state' | translate\">\n <ng-template vdrCardControls>\n <button\n class=\"button-small\"\n (click)=\"openStateDiagram()\"\n [title]=\"'order.order-state-diagram' | translate\"\n >\n <clr-icon shape=\"list\"></clr-icon>\n </button>\n </ng-template>\n <vdr-order-state-label [state]=\"order.state\"></vdr-order-state-label>\n </vdr-card>\n <vdr-card [title]=\"'order.customer' | translate\">\n <ng-template vdrCardControls>\n <button\n *vdrIfPermissions=\"['UpdateOrder', 'ReadCustomer']\"\n class=\"button-small\"\n (click)=\"setOrderCustomer()\"\n [title]=\"'order.assign-order-to-another-customer' | translate\"\n >\n <clr-icon shape=\"switch\"></clr-icon>\n </button>\n </ng-template>\n <vdr-customer-label [customer]=\"order.customer\"></vdr-customer-label>\n <vdr-labeled-data\n class=\"mt-2\"\n [label]=\"'order.shipping-address' | translate\"\n *ngIf=\"getOrderAddressLines(order.shippingAddress).length\"\n >\n <vdr-formatted-address\n [address]=\"order.shippingAddress\"\n class=\"mt-1\"\n ></vdr-formatted-address>\n </vdr-labeled-data>\n <vdr-labeled-data\n [label]=\"'order.billing-address' | translate\"\n *ngIf=\"getOrderAddressLines(order.billingAddress).length\"\n >\n <vdr-formatted-address\n [address]=\"order.billingAddress\"\n class=\"mt-1\"\n ></vdr-formatted-address>\n </vdr-labeled-data>\n </vdr-card>\n <vdr-card\n [title]=\"'order.payments' | translate\"\n *ngIf=\"order.payments?.length\"\n >\n <vdr-order-payment-card\n *ngFor=\"let payment of order.payments\"\n [currencyCode]=\"order.currencyCode\"\n [payment]=\"payment\"\n (settlePayment)=\"settlePayment($event)\"\n (transitionPaymentState)=\"transitionPaymentState($event)\"\n (settleRefund)=\"settleRefund($event)\"\n ></vdr-order-payment-card>\n </vdr-card>\n <vdr-card *ngIf=\"order.fulfillments?.length\">\n <vdr-fulfillment-card\n *ngFor=\"let fulfillment of order.fulfillments\"\n [fulfillment]=\"fulfillment\"\n [order]=\"order\"\n (transitionState)=\"transitionFulfillment(fulfillment.id, $event)\"\n ></vdr-fulfillment-card>\n </vdr-card>\n <vdr-card>\n <vdr-page-entity-info\n *ngIf=\"entity$ | async as entity\"\n [entity]=\"entity\"\n />\n </vdr-card>\n </vdr-page-detail-sidebar>\n\n <vdr-page-block>\n <vdr-seller-orders-card\n class=\"mb-2\"\n *ngIf=\"order.sellerOrders.length\"\n [orderId]=\"order.id\"\n ></vdr-seller-orders-card>\n <vdr-card [paddingX]=\"false\">\n <vdr-order-table\n [order]=\"order\"\n [orderLineCustomFields]=\"orderLineCustomFields\"\n ></vdr-order-table>\n </vdr-card>\n <vdr-card [title]=\"'order.tax-summary' | translate\" [paddingX]=\"false\">\n <table class=\"table\">\n <thead>\n <tr>\n <th>{{ \"common.description\" | translate }}</th>\n <th>{{ \"order.tax-rate\" | translate }}</th>\n <th>{{ \"order.tax-base\" | translate }}</th>\n <th>{{ \"order.tax-total\" | translate }}</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let row of order.taxSummary\">\n <td>{{ row.description }}</td>\n <td>{{ row.taxRate / 100 | percent : \"0.0-2\" }}</td>\n <td>{{ row.taxBase | localeCurrency : order.currencyCode }}</td>\n <td>{{ row.taxTotal | localeCurrency : order.currencyCode }}</td>\n </tr>\n </tbody>\n </table>\n </vdr-card>\n <vdr-card\n [title]=\"'common.custom-fields' | translate\"\n *ngIf=\"customFields.length\"\n >\n <vdr-tabbed-custom-fields\n entityName=\"Order\"\n [customFields]=\"customFields\"\n [customFieldsFormGroup]=\"detailForm.get('customFields')\"\n [readonly]=\"!('UpdateOrder' | hasPermission)\"\n />\n <button\n style=\"margin-top: 1rem\"\n class=\"button primary\"\n (click)=\"updateCustomFields()\"\n [disabled]=\"\n detailForm.get('customFields')?.pristine ||\n detailForm.get('customFields')?.invalid\n \"\n >\n {{ \"common.update\" | translate }}\n </button>\n </vdr-card>\n <vdr-custom-detail-component-host\n locationId=\"order-detail\"\n [entity$]=\"entity$\"\n [detailForm]=\"detailForm\"\n ></vdr-custom-detail-component-host>\n\n <vdr-card [title]=\"'order.order-history' | translate\">\n <vdr-order-history\n [order]=\"order\"\n [history]=\"history$ | async\"\n (addNote)=\"addNote($event)\"\n (updateNote)=\"updateNote($event)\"\n (deleteNote)=\"deleteNote($event)\"\n ></vdr-order-history>\n </vdr-card>\n </vdr-page-block>\n</vdr-page-detail-layout>\n","import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core';\nimport { FormBuilder, FormGroup } from '@angular/forms';\nimport { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';\nimport {\n DataService,\n EditNoteDialogComponent,\n FulfillmentFragment,\n getCustomFieldsDefaults,\n GetOrderHistoryQuery,\n GetOrderQuery,\n ModalService,\n NotificationService,\n ORDER_DETAIL_FRAGMENT,\n OrderDetailFragment,\n OrderDetailQueryDocument,\n Refund,\n SetOrderCustomerDocument,\n SortOrder,\n TimelineHistoryEntry,\n TypedBaseDetailComponent,\n} from '@deenruv/admin-ui/core';\nimport { assertNever, summate } from '@deenruv/common/lib/shared-utils';\nimport { gql } from 'apollo-angular';\nimport { EMPTY, forkJoin, Observable, of, Subject } from 'rxjs';\nimport { map, mapTo, startWith, switchMap, take } from 'rxjs/operators';\n\nimport { OrderTransitionService } from '../../providers/order-transition.service';\nimport { AddManualPaymentDialogComponent } from '../add-manual-payment-dialog/add-manual-payment-dialog.component';\nimport { CancelOrderDialogComponent } from '../cancel-order-dialog/cancel-order-dialog.component';\nimport { FulfillOrderDialogComponent } from '../fulfill-order-dialog/fulfill-order-dialog.component';\nimport { OrderProcessGraphDialogComponent } from '../order-process-graph-dialog/order-process-graph-dialog.component';\nimport { RefundOrderDialogComponent } from '../refund-order-dialog/refund-order-dialog.component';\nimport { SelectCustomerDialogComponent } from '../select-customer-dialog/select-customer-dialog.component';\nimport { SettleRefundDialogComponent } from '../settle-refund-dialog/settle-refund-dialog.component';\n\ntype Payment = NonNullable<OrderDetailFragment['payments']>[number];\n\nexport const ORDER_DETAIL_QUERY = gql`\n query OrderDetailQuery($id: ID!) {\n order(id: $id) {\n ...OrderDetail\n }\n }\n ${ORDER_DETAIL_FRAGMENT}\n`;\n\nexport const SET_ORDER_CUSTOMER_MUTATION = gql`\n mutation SetOrderCustomer($input: SetOrderCustomerInput!) {\n setOrderCustomer(input: $input) {\n id\n customer {\n id\n firstName\n lastName\n emailAddress\n }\n }\n }\n`;\n\n@Component({\n selector: 'vdr-order-detail',\n templateUrl: './order-detail.component.html',\n styleUrls: ['./order-detail.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class OrderDetailComponent\n extends TypedBaseDetailComponent<typeof OrderDetailQueryDocument, 'order'>\n implements OnInit, OnDestroy\n{\n customFields = this.getCustomFieldConfig('Order');\n orderLineCustomFields = this.getCustomFieldConfig('OrderLine');\n detailForm = new FormGroup({\n customFields: this.formBuilder.group(getCustomFieldsDefaults(this.customFields)),\n });\n history$: Observable<NonNullable<GetOrderHistoryQuery['order']>['history']['items'] | undefined>;\n nextStates$: Observable<string[]>;\n fetchHistory = new Subject<void>();\n private readonly defaultStates = [\n 'AddingItems',\n 'ArrangingPayment',\n 'PaymentAuthorized',\n 'PaymentSettled',\n 'PartiallyShipped',\n 'Shipped',\n 'PartiallyDelivered',\n 'Delivered',\n 'Cancelled',\n 'Modifying',\n 'ArrangingAdditionalPayment',\n ];\n\n constructor(\n private changeDetector: ChangeDetectorRef,\n protected dataService: DataService,\n private notificationService: NotificationService,\n private modalService: ModalService,\n private orderTransitionService: OrderTransitionService,\n private formBuilder: FormBuilder,\n ) {\n super();\n }\n\n ngOnInit() {\n this.init();\n this.entity$.pipe(take(1)).subscribe(order => {\n if (order.state === 'Modifying') {\n this.router.navigate(['./', 'modify'], { relativeTo: this.route });\n }\n });\n this.history$ = this.fetchHistory.pipe(\n startWith(null),\n switchMap(() =>\n this.dataService.order\n .getOrderHistory(this.id, {\n sort: {\n createdAt: SortOrder.DESC,\n },\n })\n .mapStream(data => data.order?.history.items),\n ),\n );\n this.nextStates$ = this.entity$.pipe(\n map(order => {\n const isInCustomState = !this.defaultStates.includes(order.state);\n return isInCustomState\n ? order.nextStates\n : order.nextStates.filter(s => !this.defaultStates.includes(s));\n }),\n );\n }\n\n ngOnDestroy() {\n this.destroy();\n }\n\n openStateDiagram() {\n this.entity$\n .pipe(\n take(1),\n switchMap(order =>\n this.modalService.fromComponent(OrderProcessGraphDialogComponent, {\n closable: true,\n locals: {\n activeState: order.state,\n },\n }),\n ),\n )\n .subscribe();\n }\n\n setOrderCustomer() {\n this.modalService\n .fromComponent(SelectCustomerDialogComponent, {\n locals: {\n canCreateNew: false,\n includeNoteInput: true,\n title: _('order.assign-order-to-another-customer'),\n },\n })\n .pipe(\n switchMap(result => {\n function isExisting(input: any): input is { id: string } {\n return typeof input === 'object' && !!input.id;\n }\n if (isExisting(result)) {\n return this.dataService.mutate(SetOrderCustomerDocument, {\n input: {\n customerId: result.id,\n orderId: this.id,\n note: result.note,\n },\n });\n } else {\n return EMPTY;\n }\n }),\n switchMap(result => this.refetchOrder(result)),\n )\n .subscribe(result => {\n if (result) {\n this.notificationService.success(_('order.set-customer-success'));\n }\n });\n }\n\n transitionToState(state: string) {\n this.dataService.order.transitionToState(this.id, state).subscribe(({ transitionOrderToState }) => {\n switch (transitionOrderToState?.__typename) {\n case 'Order':\n this.notificationService.success(_('order.transitioned-to-state-success'), { state });\n this.fetchHistory.next();\n break;\n case 'OrderStateTransitionError':\n this.notificationService.error(transitionOrderToState.transitionError);\n }\n });\n }\n\n manuallyTransitionToState(order: OrderDetailFragment) {\n this.orderTransitionService\n .manuallyTransitionToState({\n orderId: order.id,\n nextStates: order.nextStates,\n cancellable: true,\n message: _('order.manually-transition-to-state-message'),\n retry: 0,\n })\n .subscribe();\n }\n\n transitionToModifying() {\n this.dataService.order\n .transitionToState(this.id, 'Modifying')\n .subscribe(({ transitionOrderToState }) => {\n switch (transitionOrderToState?.__typename) {\n case 'Order':\n this.router.navigate(['./modify'], { relativeTo: this.route });\n break;\n case 'OrderStateTransitionError':\n this.notificationService.error(transitionOrderToState.transitionError);\n }\n });\n }\n\n updateCustomFields() {\n this.dataService.order\n .updateOrderCustomFields({\n id: this.id,\n customFields: this.detailForm.value.customFields,\n })\n .subscribe(() => {\n this.notificationService.success(_('common.notify-update-success'), { entity: 'Order' });\n });\n }\n\n getOrderAddressLines(orderAddress?: { [key: string]: string }): string[] {\n if (!orderAddress) {\n return [];\n }\n return Object.values(orderAddress)\n .filter(val => val !== 'OrderAddress')\n .filter(line => !!line);\n }\n\n settlePayment(payment: Payment) {\n this.dataService.order.settlePayment(payment.id).subscribe(({ settlePayment }) => {\n switch (settlePayment.__typename) {\n case 'Payment':\n if (settlePayment.state === 'Settled') {\n this.notificationService.success(_('order.settle-payment-success'));\n } else {\n this.notificationService.error(_('order.settle-payment-error'));\n }\n this.dataService.order.getOrder(this.id).single$.subscribe();\n this.fetchHistory.next();\n break;\n case 'OrderStateTransitionError':\n case 'PaymentStateTransitionError':\n case 'SettlePaymentError':\n this.notificationService.error(settlePayment.message);\n }\n });\n }\n\n transitionPaymentState({ payment, state }: { payment: Payment; state: string }) {\n if (state === 'Cancelled') {\n this.dataService.order.cancelPayment(payment.id).subscribe(({ cancelPayment }) => {\n switch (cancelPayment.__typename) {\n case 'Payment':\n this.notificationService.success(_('order.transitioned-payment-to-state-success'), {\n state,\n });\n this.dataService.order.getOrder(this.id).single$.subscribe();\n this.fetchHistory.next();\n break;\n case 'PaymentStateTransitionError':\n this.notificationService.error(cancelPayment.transitionError);\n break;\n case 'CancelPaymentError':\n this.notificationService.error(cancelPayment.paymentErrorMessage);\n break;\n }\n });\n } else {\n this.dataService.order\n .transitionPaymentToState(payment.id, state)\n .subscribe(({ transitionPaymentToState }) => {\n switch (transitionPaymentToState.__typename) {\n case 'Payment':\n this.notificationService.success(\n _('order.transitioned-payment-to-state-success'),\n {\n state,\n },\n );\n this.dataService.order.getOrder(this.id).single$.subscribe();\n this.fetchHistory.next();\n break;\n case 'PaymentStateTransitionError':\n this.notificationService.error(transitionPaymentToState.message);\n break;\n }\n });\n }\n }\n\n canAddFulfillment(order: OrderDetailFragment): boolean {\n const allFulfillmentLines: FulfillmentFragment['lines'] = (order.fulfillments ?? [])\n .filter(fulfillment => fulfillment.state !== 'Cancelled')\n .reduce((all, fulfillment) => [...all, ...fulfillment.lines], [] as FulfillmentFragment['lines']);\n let allItemsFulfilled = true;\n for (const line of order.lines) {\n const totalFulfilledCount = allFulfillmentLines\n .filter(row => row.orderLineId === line.id)\n .reduce((sum, row) => sum + row.quantity, 0);\n if (totalFulfilledCount < line.quantity) {\n allItemsFulfilled = false;\n }\n }\n return (\n !allItemsFulfilled &&\n !this.hasUnsettledModifications(order) &&\n this.outstandingPaymentAmount(order) === 0 &&\n (order.nextStates.includes('Shipped') ||\n order.nextStates.includes('PartiallyShipped') ||\n order.nextStates.includes('Delivered'))\n );\n }\n\n hasUnsettledModifications(order: OrderDetailFragment): boolean {\n return 0 < order.modifications.filter(m => !m.isSettled).length;\n }\n\n getOutstandingModificationAmount(order: OrderDetailFragment): number {\n return summate(\n order.modifications.filter(m => !m.isSettled),\n 'priceChange',\n );\n }\n\n outstandingPaymentAmount(order: OrderDetailFragment): number {\n const paymentIsValid = (p: Payment): boolean =>\n p.state !== 'Cancelled' && p.state !== 'Declined' && p.state !== 'Error';\n\n let amountCovered = 0;\n for (const payment of order.payments?.filter(paymentIsValid) ?? []) {\n const refunds = payment.refunds.filter(r => r.state !== 'Failed') ?? [];\n const refundsTotal = summate(refunds as Array<Required<Refund>>, 'total');\n amountCovered += payment.amount - refundsTotal;\n }\n return order.totalWithTax - amountCovered;\n }\n\n addManualPayment(order: OrderDetailFragment) {\n const priorState = order.state;\n this.modalService\n .fromComponent(AddManualPaymentDialogComponent, {\n closable: true,\n locals: {\n outstandingAmount: this.outstandingPaymentAmount(order),\n currencyCode: order.currencyCode,\n },\n })\n .pipe(\n switchMap(result => {\n if (result) {\n return this.dataService.order.addManualPaymentToOrder({\n orderId: this.id,\n transactionId: result.transactionId,\n method: result.method,\n metadata: result.metadata || {},\n });\n } else {\n return EMPTY;\n }\n }),\n switchMap(({ addManualPaymentToOrder }) => {\n switch (addManualPaymentToOrder.__typename) {\n case 'Order':\n this.notificationService.success(_('order.add-payment-to-order-success'));\n if (priorState === 'ArrangingAdditionalPayment') {\n return this.orderTransitionService.transitionToPreModifyingState(\n order.id,\n order.nextStates,\n );\n } else {\n return of('PaymentSettled');\n }\n case 'ManualPaymentStateError':\n this.notificationService.error(addManualPaymentToOrder.message);\n return EMPTY;\n default:\n return EMPTY;\n }\n }),\n )\n .subscribe(result => {\n if (result) {\n this.refetchOrder({ result });\n }\n });\n }\n\n fulfillOrder() {\n this.entity$\n .pipe(\n take(1),\n switchMap(order =>\n this.modalService.fromComponent(FulfillOrderDialogComponent, {\n size: 'xl',\n locals: {\n order,\n },\n }),\n ),\n switchMap(input => {\n if (input) {\n return this.dataService.order.createFulfillment(input);\n } else {\n return of(undefined);\n }\n }),\n switchMap(result => this.refetchOrder(result).pipe(mapTo(result))),\n )\n .subscribe(result => {\n if (result) {\n const { addFulfillmentToOrder } = result;\n switch (addFulfillmentToOrder.__typename) {\n case 'Fulfillment':\n this.notificationService.success(_('order.create-fulfillment-success'));\n break;\n case 'EmptyOrderLineSelectionError':\n case 'InsufficientStockOnHandError':\n case 'ItemsAlreadyFulfilledError':\n case 'InvalidFulfillmentHandlerError':\n this.notificationService.error(addFulfillmentToOrder.message);\n break;\n case 'FulfillmentStateTransitionError':\n this.notificationService.error(addFulfillmentToOrder.transitionError);\n break;\n case 'CreateFulfillmentError':\n this.notificationService.error(addFulfillmentToOrder.fulfillmentHandlerError);\n break;\n case undefined:\n this.notificationService.error(JSON.stringify(addFulfillmentToOrder));\n break;\n default:\n assertNever(addFulfillmentToOrder);\n }\n }\n });\n }\n\n transitionFulfillment(id: string, state: string) {\n this.dataService.order\n .transitionFulfillmentToState(id, state)\n .pipe(switchMap(result => this.refetchOrder(result)))\n .subscribe(() => {\n this.notificationService.success(_('order.successfully-updated-fulfillment'));\n });\n }\n\n cancelOrRefund(order: OrderDetailFragment) {\n const isRefundable = this.orderHasSettledPayments(order);\n if (order.state === 'PaymentAuthorized' || order.active === true || !isRefundable) {\n this.cancelOrder(order);\n } else {\n this.refundOrder(order);\n }\n }\n\n settleRefund(refund: Payment['refunds'][number]) {\n this.modalService\n .fromComponent(SettleRefundDialogComponent, {\n size: 'md',\n locals: {\n refund,\n },\n })\n .pipe(\n switchMap(transactionId => {\n if (transactionId) {\n return this.dataService.order.settleRefund(\n {\n transactionId,\n id: refund.id,\n },\n this.id,\n );\n } else {\n return of(undefined);\n }\n }),\n // switchMap(result => this.refetchOrder(result)),\n )\n .subscribe(result => {\n if (result) {\n this.notificationService.success(_('order.settle-refund-success'));\n }\n });\n }\n\n addNote(event: { note: string; isPublic: boolean }) {\n const { note, isPublic } = event;\n this.dataService.order\n .addNoteToOrder({\n id: this.id,\n note,\n isPublic,\n })\n .pipe(switchMap(result => this.refetchOrder(result)))\n .subscribe(result => {\n this.notificationService.success(_('common.notify-create-success'), {\n entity: 'Note',\n });\n });\n }\n\n updateNote(entry: TimelineHistoryEntry) {\n this.modalService\n .fromComponent(EditNoteDialogComponent, {\n closable: true,\n locals: {\n displayPrivacyControls: true,\n note: entry.data.note,\n noteIsPrivate: !entry.isPublic,\n },\n })\n .pipe(\n switchMap(result => {\n if (result) {\n return this.dataService.order.updateOrderNote({\n noteId: entry.id,\n isPublic: !result.isPrivate,\n note: result.note,\n });\n } else {\n return EMPTY;\n }\n }),\n )\n .subscribe(result => {\n this.fetchHistory.next();\n this.notificationService.success(_('common.notify-update-success'), {\n entity: 'Note',\n });\n });\n }\n\n deleteNote(entry: TimelineHistoryEntry) {\n return this.modalService\n .dialog({\n title: _('common.confirm-delete-note'),\n body: entry.data.note,\n buttons: [\n { type: 'secondary', label: _('common.cancel') },\n { type: 'danger', label: _('common.delete'), returnValue: true },\n ],\n })\n .pipe(switchMap(res => (res ? this.dataService.order.deleteOrderNote(entry.id) : EMPTY)))\n .subscribe(() => {\n this.fetchHistory.next();\n this.notificationService.success(_('common.notify-delete-success'), {\n entity: 'Note',\n });\n });\n }\n\n orderHasSettledPayments(order: OrderDetailFragment): boolean {\n return !!order.payments?.find(p => p.state === 'Settled');\n }\n\n private cancelOrder(order: OrderDetailFragment) {\n this.modalService\n .fromComponent(CancelOrderDialogComponent, {\n size: 'xl',\n locals: {\n order,\n },\n })\n .pipe(\n switchMap(input => {\n if (input) {\n return this.dataService.order.cancelOrder(input);\n } else {\n return of(undefined);\n }\n }),\n switchMap(result => this.refetchOrder(result)),\n )\n .subscribe(result => {\n if (result) {\n this.notificationService.success(_('order.cancelled-order-success'));\n }\n });\n }\n\n private refundOrder(order: OrderDetailFragment) {\n this.modalService\n .fromComponent(RefundOrderDialogComponent, {\n size: 'xl',\n locals: {\n order,\n },\n })\n .pipe(\n switchMap(input => {\n if (!input) {\n return of(undefined);\n }\n\n if (input.cancel.lines?.length) {\n return this.dataService.order.cancelOrder(input.cancel).pipe(\n map(res => {\n const result = res.cancelOrder;\n switch (result.__typename) {\n case 'Order':\n this.refetchOrder(result).subscribe();\n this.notificationService.success(\n _('order.cancelled-order-items-success'),\n {\n count: summate(input.cancel.lines, 'quantity'),\n },\n );\n return input;\n case 'CancelActiveOrderError':\n case 'QuantityTooGreatError':\n case 'MultipleOrderError':\n case 'OrderStateTransitionError':\n case 'EmptyOrderLineSelectionError':\n this.notificationService.error(result.message);\n return undefined;\n }\n }),\n );\n } else {\n return [input];\n }\n }),\n switchMap(input => {\n if (!input) {\n return of(undefined);\n }\n if (input.refunds.length) {\n return forkJoin(\n input.refunds.map(refund =>\n this.dataService.order.refundOrder(refund).pipe(map(res => res.refundOrder)),\n ),\n );\n } else {\n return [undefined];\n }\n }),\n )\n .subscribe(results => {\n for (const result of results ?? []) {\n if (result) {\n switch (result.__typename) {\n case 'Refund':\n if (result.state === 'Failed') {\n this.notificationService.error(_('order.refund-order-failed'));\n } else {\n this.notificationService.success(_('order.refund-order-success'));\n }\n break;\n case 'AlreadyRefundedError':\n case 'NothingToRefundError':\n case 'PaymentOrderMismatchError':\n case 'RefundOrderStateError':\n case 'RefundStateTransitionError':\n this.notificationService.error(result.message);\n break;\n }\n }\n }\n this.refetchOrder(results?.[0]).subscribe();\n });\n }\n\n private refetchOrder(result: object | undefined): Observable<GetOrderQuery | undefined> {\n this.fetchHistory.next();\n if (result) {\n return this.dataService.order.getOrder(this.id).single$;\n } else {\n return of(undefined);\n }\n }\n\n protected setFormValues(entity: OrderDetailFragment): void {\n if (this.customFields.length) {\n this.setCustomFieldFormValues(this.customFields, this.detailForm.get(['customFields']), entity);\n }\n }\n}\n","<vdr-labeled-data\n *ngIf=\"modifyOrderInput.adjustOrderLines?.length\"\n [label]=\"\n 'order.modification-adjusting-lines'\n | translate : { count: modifyOrderInput.adjustOrderLines?.length }\n \"\n>\n <div *ngFor=\"let line of adjustedLines\" class=\"mb-1\">\n {{ line }}\n </div>\n</vdr-labeled-data>\n<vdr-labeled-data\n *ngIf=\"modifyOrderInput.addItems?.length\"\n [label]=\"\n 'order.modification-adding-items'\n | translate : { count: modifyOrderInput.addItems?.length }\n \"\n>\n <div *ngFor=\"let item of addedLines\">\n {{ item.productVariant.name }} x {{ item.quantity }}\n </div>\n</vdr-labeled-data>\n<vdr-labeled-data\n *ngIf=\"modifyOrderInput.surcharges?.length\"\n [label]=\"\n 'order.modification-adding-surcharges'\n | translate : { count: modifyOrderInput.surcharges?.length }\n \"\n>\n <div *ngFor=\"let surcharge of modifyOrderInput.surcharges\" class=\"mb-1\">\n {{ surcharge.description }}: {{ surcharge.price | localeCurrency : orderSnapshot.currencyCode }}\n </div>\n</vdr-labeled-data>\n<vdr-labeled-data\n *ngIf=\"getModifiedFields(shippingAddressForm) as updatedShippingFields\"\n [label]=\"'order.modification-updating-shipping-address' | translate\"\n>\n {{ updatedShippingFields }}\n</vdr-labeled-data>\n<vdr-labeled-data\n *ngIf=\"getModifiedFields(billingAddressForm) as updatedBillingFields\"\n [label]=\"'order.modification-updating-billing-address' | translate\"\n>\n {{ updatedBillingFields }}\n</vdr-labeled-data>\n<vdr-labeled-data *ngIf=\"couponCodeChanges.length\" [label]=\"'order.set-coupon-codes' | translate\">\n <div *ngFor=\"let change of couponCodeChanges\" class=\"mb-1\">{{ change }}</div>\n</vdr-labeled-data>\n<ng-container *ngIf=\"getUpdatedShippingMethodLines() as updatedShippingMethods\">\n <vdr-labeled-data *ngIf=\"updatedShippingMethods.length\" [label]=\"'order.shipping-method' | translate\">\n <div *ngFor=\"let change of updatedShippingMethods\" class=\"mb-1\">{{ change }}</div>\n </vdr-labeled-data>\n</ng-container>","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { FormControl, FormGroup } from '@angular/forms';\nimport { notNullOrUndefined } from '@deenruv/common/lib/shared-utils';\nimport type { OrderEditorComponent } from '../order-editor/order-editor.component';\nimport { AddedLine, ModifyOrderData, OrderSnapshot } from '../../common/modify-order-types';\n\n@Component({\n selector: 'vdr-order-modification-summary',\n templateUrl: './order-modification-summary.component.html',\n styleUrls: ['./order-modification-summary.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class OrderModificationSummaryComponent {\n @Input() orderSnapshot: OrderSnapshot;\n @Input() modifyOrderInput: ModifyOrderData;\n @Input() addedLines: AddedLine[];\n @Input() shippingAddressForm: OrderEditorComponent['shippingAddressForm'];\n @Input() billingAddressForm: OrderEditorComponent['billingAddressForm'];\n @Input() updatedShippingMethods: OrderEditorComponent['updatedShippingMethods'];\n @Input() couponCodesControl: FormControl<string[] | null>;\n\n get adjustedLines(): string[] {\n return (this.modifyOrderInput.adjustOrderLines || [])\n .map(l => {\n const line = this.orderSnapshot.lines.find(line => line.id === l.orderLineId);\n if (line) {\n const delta = l.quantity - line.quantity;\n const sign = delta === 0 ? '' : delta > 0 ? '+' : '-';\n return delta\n ? `${sign}${Math.abs(delta)} ${line.productVariant.name}`\n : line.productVariant.name;\n }\n })\n .filter(notNullOrUndefined);\n }\n\n getModifiedFields(formGroup: FormGroup): string {\n if (!formGroup.dirty) {\n return '';\n }\n return Object.entries(formGroup.controls)\n .map(([key, control]) => {\n if (control.dirty) {\n return key;\n }\n })\n .filter(notNullOrUndefined)\n .join(', ');\n }\n\n getUpdatedShippingMethodLines() {\n return Object.entries(this.updatedShippingMethods || {})\n .map(([lineId, shippingMethod]) => {\n const previousMethod = this.orderSnapshot.shippingLines.find(l => l.id === lineId);\n if (!previousMethod) {\n return;\n }\n const previousName = previousMethod.shippingMethod.name || previousMethod.shippingMethod.code;\n const newName = shippingMethod.name || shippingMethod.code;\n return `${previousName} -> ${newName}`;\n })\n .filter(notNullOrUndefined);\n }\n\n get couponCodeChanges(): string[] {\n const originalCodes = this.orderSnapshot.couponCodes || [];\n const newCodes = this.couponCodesControl.value || [];\n const addedCodes = newCodes.filter(c => !originalCodes.includes(c)).map(c => `+ ${c}`);\n const removedCodes = originalCodes.filter(c => !newCodes.includes(c)).map(c => `- ${c}`);\n return [...addedCodes, ...removedCodes];\n }\n}\n","<ng-template vdrDialogTitle>{{ 'order.confirm-modifications' | translate }}</ng-template>\n<vdr-order-table\n [order]=\"order\"\n [orderLineCustomFields]=\"orderLineCustomFields\"\n class=\"order-edits-preview-table\"\n></vdr-order-table>\n<div class=\"payments-wrapper mb-2\">\n <div class=\"flex-spacer\">\n <vdr-payment-for-refund-selector\n *ngIf=\"priceDifference < 0\"\n class=\"\"\n [refundablePayments]=\"refundablePayments\"\n (paymentSelected)=\"onPaymentSelected($event.payment, $event.selected)\"\n [order]=\"order\"\n ></vdr-payment-for-refund-selector>\n </div>\n <div class=\"flex-spacer\">\n <vdr-card [title]=\"'order.modify-order' | translate\">\n <vdr-order-modification-summary\n [orderSnapshot]=\"orderSnapshot\"\n [modifyOrderInput]=\"modifyOrderInput\"\n [addedLines]=\"addedLines\"\n [shippingAddressForm]=\"shippingAddressForm\"\n [billingAddressForm]=\"billingAddressForm\"\n [couponCodesControl]=\"couponCodesControl\"\n [updatedShippingMethods]=\"updatedShippingMethods\"\n ></vdr-order-modification-summary>\n <vdr-labeled-data [label]=\"'order.note' | translate\">\n {{ modifyOrderInput.note || '-' }}\n </vdr-labeled-data>\n <vdr-form-field\n [label]=\"'order.refund-cancellation-reason' | translate\"\n *ngIf=\"priceDifference < 0\"\n >\n <textarea [(ngModel)]=\"refundNote\" name=\"refundNote\" required></textarea>\n </vdr-form-field>\n </vdr-card>\n </div>\n</div>\n<ng-template vdrDialogButtons>\n <div>\n <div class=\"errors\">\n <clr-alert\n class=\"mb-1\"\n *ngIf=\"priceDifference < 0 && !refundsCoverDifference()\"\n [clrAlertType]=\"'danger'\"\n [clrAlertClosable]=\"false\"\n >\n <clr-alert-item>\n {{ 'order.refund-total-warning' | translate }}\n </clr-alert-item>\n </clr-alert>\n </div>\n <div class=\"modal-buttons\">\n <clr-alert class=\"\" [clrAlertType]=\"'primary'\" [clrAlertClosable]=\"false\">\n <clr-alert-item>\n {{ 'order.modify-order-price-difference' | translate }}\n {{ 0 < priceDifference ? '+' : ''\n }}{{ priceDifference | localeCurrency : order.currencyCode }}\n </clr-alert-item>\n </clr-alert>\n <button type=\"button\" class=\"btn\" (click)=\"cancel()\">\n {{ 'common.cancel' | translate }}\n </button>\n <button\n type=\"submit\"\n (click)=\"submit()\"\n [disabled]=\"priceDifference < 0 ? !refundsCoverDifference() : false\"\n class=\"btn btn-primary\"\n >\n {{ 'common.confirm' | translate }}\n </button>\n </div>\n </div>\n</ng-template>\n","import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';\nimport { FormControl, Validators } from '@angular/forms';\nimport {\n AdministratorRefundInput,\n CustomFieldConfig,\n Dialog,\n ModifyOrderInput,\n OrderDetailFragment,\n} from '@deenruv/admin-ui/core';\nimport { getRefundablePayments, RefundablePayment } from '../../common/get-refundable-payments';\nimport { AddedLine, OrderSnapshot } from '../../common/modify-order-types';\nimport { OrderEditorComponent } from '../order-editor/order-editor.component';\n\nexport enum OrderEditResultType {\n Refund,\n Payment,\n PriceUnchanged,\n Cancel,\n}\n\ninterface OrderEditsRefundResult {\n result: OrderEditResultType.Refund;\n refunds: AdministratorRefundInput[];\n}\ninterface OrderEditsPaymentResult {\n result: OrderEditResultType.Payment;\n}\ninterface OrderEditsPriceUnchangedResult {\n result: OrderEditResultType.PriceUnchanged;\n}\ninterface OrderEditsCancelResult {\n result: OrderEditResultType.Cancel;\n}\ntype OrderEditResult =\n | OrderEditsRefundResult\n | OrderEditsPaymentResult\n | OrderEditsPriceUnchangedResult\n | OrderEditsCancelResult;\n\n@Component({\n selector: 'vdr-order-edits-preview-dialog',\n templateUrl: './order-edits-preview-dialog.component.html',\n styleUrls: ['./order-edits-preview-dialog.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class OrderEditsPreviewDialogComponent implements OnInit, Dialog<OrderEditResult> {\n // Passed in via the modalService\n orderLineCustomFields: CustomFieldConfig[];\n order: OrderDetailFragment;\n orderSnapshot: OrderSnapshot;\n modifyOrderInput: ModifyOrderInput;\n addedLines: AddedLine[];\n shippingAddressForm: OrderEditorComponent['shippingAddressForm'];\n billingAddressForm: OrderEditorComponent['billingAddressForm'];\n updatedShippingMethods: OrderEditorComponent['updatedShippingMethods'];\n couponCodesControl: FormControl<string[] | null>;\n\n refundablePayments: RefundablePayment[];\n refundNote: string;\n resolveWith: (result?: OrderEditResult) => void;\n\n get priceDifference(): number {\n return this.order.totalWithTax - this.orderSnapshot.totalWithTax;\n }\n\n get amountToRefundTotal(): number {\n return this.refundablePayments.reduce(\n (total, payment) => total + payment.amountToRefundControl.value,\n 0,\n );\n }\n\n ngOnInit() {\n this.refundNote = this.modifyOrderInput.note || '';\n this.refundablePayments = getRefundablePayments(this.order.payments || []);\n this.refundablePayments.forEach(rp => {\n rp.amountToRefundControl.addValidators(Validators.max(this.priceDifference * -1));\n });\n if (this.priceDifference < 0 && this.refundablePayments.length) {\n this.onPaymentSelected(this.refundablePayments[0], true);\n }\n }\n\n onPaymentSelected(payment: RefundablePayment, selected: boolean) {\n if (selected) {\n const outstandingRefundAmount =\n this.priceDifference * -1 -\n this.refundablePayments\n .filter(p => p.id !== payment.id)\n .reduce((total, p) => total + p.amountToRefundControl.value, 0);\n if (0 < outstandingRefundAmount) {\n payment.amountToRefundControl.setValue(\n Math.min(outstandingRefundAmount, payment.refundableAmount),\n );\n }\n } else {\n payment.amountToRefundControl.setValue(0);\n }\n }\n\n refundsCoverDifference(): boolean {\n return this.priceDifference * -1 === this.amountToRefundTotal;\n }\n\n cancel() {\n this.resolveWith({\n result: OrderEditResultType.Cancel,\n });\n }\n\n submit() {\n if (0 < this.priceDifference) {\n this.resolveWith({\n result: OrderEditResultType.Payment,\n });\n } else if (this.priceDifference < 0) {\n this.resolveWith({\n result: OrderEditResultType.Refund,\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n refunds: this.refundablePayments\n .filter(rp => rp.selected && 0 < rp.amountToRefundControl.value)\n .map(payment => {\n return {\n reason: this.refundNote || this.modifyOrderInput.note,\n paymentId: payment.id,\n amount: payment.amountToRefundControl.value,\n };\n }),\n });\n } else {\n this.resolveWith({\n result: OrderEditResultType.PriceUnchanged,\n });\n }\n }\n}\n","<vdr-page-block>\n <vdr-action-bar *ngIf=\"entity$ | async as order\">\n <vdr-ab-left>\n <div class=\"flex clr-align-items-center\"></div>\n </vdr-ab-left>\n\n <vdr-ab-right>\n <button class=\"btn btn-secondary\" (click)=\"transitionToPriorState(order)\">\n {{ 'order.cancel-modification' | translate }}\n </button>\n </vdr-ab-right>\n </vdr-action-bar>\n</vdr-page-block>\n\n<vdr-page-detail-layout *ngIf=\"entity as order\">\n <vdr-page-detail-sidebar>\n <vdr-card [title]=\"'order.modification-summary' | translate\">\n <vdr-order-modification-summary\n [orderSnapshot]=\"orderSnapshot\"\n [modifyOrderInput]=\"modifyOrderInput\"\n [addedLines]=\"addedLines\"\n [shippingAddressForm]=\"shippingAddressForm\"\n [billingAddressForm]=\"billingAddressForm\"\n [couponCodesControl]=\"couponCodesControl\"\n [updatedShippingMethods]=\"updatedShippingMethods\"\n ></vdr-order-modification-summary>\n\n <div *ngIf=\"!hasModifications()\" class=\"no-modifications\">\n {{ 'order.no-modifications-made' | translate }}\n </div>\n\n <div class=\"summary-controls\">\n <vdr-form-field [label]=\"'order.note' | translate\">\n <textarea\n [(ngModel)]=\"note\"\n name=\"note\"\n required\n [disabled]=\"!hasModifications()\"\n ></textarea>\n </vdr-form-field>\n <label class=\"flex items-center\">\n <input\n type=\"checkbox\"\n [(ngModel)]=\"recalculateShipping\"\n [disabled]=\"!hasModifications()\"\n />\n <div class=\"ml-1\">{{ 'order.modification-recalculate-shipping' | translate }}</div>\n </label>\n <button\n class=\"btn btn-primary mt-2\"\n [disabled]=\"!hasModifications()\"\n (click)=\"previewAndModify(order)\"\n >\n {{ 'order.preview-changes' | translate }}\n </button>\n </div>\n </vdr-card>\n <vdr-card [title]=\"'order.set-coupon-codes' | translate\">\n <vdr-coupon-code-selector [control]=\"couponCodesControl\"></vdr-coupon-code-selector>\n </vdr-card>\n <vdr-card [title]=\"'order.shipping-address' | translate\">\n <ng-template vdrCardControls>\n <button\n class=\"button-small\"\n [title]=\"'order.edit-shipping-address' | translate\"\n (click)=\"editingShippingAddress = !editingShippingAddress\"\n >\n <clr-icon shape=\"edit\"></clr-icon>\n </button>\n </ng-template>\n <vdr-formatted-address\n *ngIf=\"!editingShippingAddress\"\n [address]=\"shippingAddressForm.value\"\n ></vdr-formatted-address>\n <vdr-address-form\n *ngIf=\"editingShippingAddress\"\n [formGroup]=\"shippingAddressForm\"\n [availableCountries]=\"availableCountries$ | async\"\n [customFields]=\"addressCustomFields\"\n ></vdr-address-form>\n </vdr-card>\n <vdr-card [title]=\"'order.billing-address' | translate\">\n <ng-template vdrCardControls>\n <button\n class=\"button-small\"\n [title]=\"'order.edit-billing-address' | translate\"\n (click)=\"editingBillingAddress = !editingBillingAddress\"\n >\n <clr-icon shape=\"edit\"></clr-icon>\n </button>\n </ng-template>\n <vdr-formatted-address\n *ngIf=\"!editingBillingAddress\"\n [address]=\"billingAddressForm.value\"\n ></vdr-formatted-address>\n <vdr-address-form\n *ngIf=\"editingBillingAddress\"\n [formGroup]=\"billingAddressForm\"\n [availableCountries]=\"availableCountries$ | async\"\n [customFields]=\"addressCustomFields\"\n ></vdr-address-form>\n </vdr-card>\n </vdr-page-detail-sidebar>\n\n <vdr-page-block>\n <vdr-card [paddingX]=\"false\">\n <vdr-data-table-2 id=\"modify-order\" class=\"order-table\" [items]=\"order.lines.concat(addedLines)\">\n <!-- Here we define all the available columns -->\n <vdr-dt2-column id=\"id\" [heading]=\"'common.id' | translate\" [hiddenByDefault]=\"true\">\n <ng-template let-line=\"item\">\n {{ line.id }}\n </ng-template>\n </vdr-dt2-column>\n <vdr-dt2-column\n id=\"created-at\"\n [heading]=\"'common.created-at' | translate\"\n [hiddenByDefault]=\"true\"\n >\n <ng-template let-line=\"item\">\n {{ line.createdAt | localeDate : 'short' }}\n </ng-template>\n </vdr-dt2-column>\n <vdr-dt2-column\n id=\"updated-at\"\n [heading]=\"'common.updated-at' | translate\"\n [hiddenByDefault]=\"true\"\n >\n <ng-template let-line=\"item\">\n {{ line.updatedAt | localeDate : 'short' }}\n </ng-template>\n </vdr-dt2-column>\n <vdr-dt2-column [heading]=\"'common.image' | translate\" id=\"image\">\n <ng-template let-line=\"item\">\n <div class=\"image-placeholder\">\n <img\n *ngIf=\"line.featuredAsset as asset; else imagePlaceholder\"\n [src]=\"asset | assetPreview : 'tiny'\"\n />\n <ng-template #imagePlaceholder>\n <div class=\"placeholder\">\n <clr-icon shape=\"image\" size=\"48\"></clr-icon>\n </div>\n </ng-template>\n </div>\n </ng-template>\n </vdr-dt2-column>\n <vdr-dt2-column\n id=\"product-name\"\n [heading]=\"'order.product-name' | translate\"\n [optional]=\"false\"\n >\n <ng-template let-line=\"item\">\n {{ line.productVariant.name }}\n </ng-template>\n </vdr-dt2-column>\n <vdr-dt2-column id=\"product-sku\" [heading]=\"'order.product-sku' | translate\">\n <ng-template let-line=\"item\">\n {{ line.productVariant.sku }}\n </ng-template>\n </vdr-dt2-column>\n <vdr-dt2-column id=\"unit-price\" [heading]=\"'order.unit-price' | translate\">\n <ng-template let-line=\"item\">\n <div class=\"text-center\">\n <div>{{ line.unitPriceWithTax | localeCurrency : order.currencyCode }}</div>\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\n {{ line.unitPrice | localeCurrency : order.currencyCode }}\n </div>\n </div>\n </ng-template>\n </vdr-dt2-column>\n <vdr-dt2-column id=\"quantity\" [heading]=\"'order.quantity' | translate\" [optional]=\"false\">\n <ng-template let-line=\"item\">\n <input\n type=\"number\"\n class=\"draft-qty mr-1\"\n min=\"0\"\n [value]=\"getInitialLineQuantity(line.id)\"\n (input)=\"updateLineQuantity(line, $event.target.value)\"\n />\n <button\n class=\"button-small\"\n *ngIf=\"isAddedLine(line)\"\n (click)=\"removeAddedItem(line.id)\"\n >\n <clr-icon shape=\"trash\"></clr-icon>\n </button>\n <vdr-line-refunds [line]=\"line\" [payments]=\"order.payments\"></vdr-line-refunds>\n <vdr-line-fulfillment\n [line]=\"line\"\n [allOrderFulfillments]=\"order.fulfillments\"\n [orderState]=\"order.state\"\n ></vdr-line-fulfillment>\n </ng-template>\n </vdr-dt2-column>\n <vdr-dt2-column\n *ngFor=\"let customField of orderLineCustomFields\"\n [id]=\"customField.name\"\n [heading]=\"customField | customFieldLabel : (uiLanguage$ | async)\"\n [hiddenByDefault]=\"true\"\n >\n <ng-template let-line=\"item\" let-index=\"index\">\n <vdr-custom-field-control\n [compact]=\"true\"\n [entityName]=\"'OrderLine'\"\n [customField]=\"customField\"\n [customFieldsFormGroup]=\"orderLineCustomFieldsFormArray.at(index)\"\n />\n </ng-template>\n </vdr-dt2-column>\n </vdr-data-table-2>\n </vdr-card>\n <vdr-card [title]=\"'order.add-item-to-order' | translate\">\n <vdr-product-variant-selector class=\"mb-4\" (productSelected)=\"addItemSelectedVariant = $event\">\n </vdr-product-variant-selector>\n <div class=\"flex\">\n <div>\n <div *ngIf=\"addItemSelectedVariant\" class=\"flex mb-4\">\n <img\n *ngIf=\"addItemSelectedVariant.productAsset as asset\"\n [src]=\"asset | assetPreview : 'tiny'\"\n class=\"mr-4 add-item-thumb\"\n />\n <div>\n <strong class=\"mr-4\">{{ addItemSelectedVariant.productVariantName }}</strong>\n <small>{{ addItemSelectedVariant.sku }}</small>\n <div>\n {{\n getSelectedItemPrice(addItemSelectedVariant)\n | localeCurrency : order.currencyCode\n }}\n </div>\n </div>\n </div>\n <div class=\"form-grid\" *ngIf=\"addItemSelectedVariant\">\n <ng-container *ngFor=\"let customField of orderLineCustomFields\">\n <vdr-custom-field-control\n [readonly]=\"!addItemSelectedVariant\"\n [customField]=\"customField\"\n [customFieldsFormGroup]=\"addItemCustomFieldsForm\"\n entityName=\"OrderLine\"\n [compact]=\"true\"\n ></vdr-custom-field-control>\n </ng-container>\n </div>\n </div>\n <div class=\"flex-spacer\"></div>\n <div>\n <button\n *ngIf=\"addItemSelectedVariant\"\n class=\"btn btn-secondary\"\n [disabled]=\"!addItemSelectedVariant || addItemCustomFieldsForm.invalid\"\n (click)=\"addItemToOrder(addItemSelectedVariant)\"\n >\n {{ 'order.add-item-to-order' | translate }}\n </button>\n </div>\n </div>\n </vdr-card>\n <vdr-card [title]=\"'order.shipping' | translate\">\n <div *ngFor=\"let shippingLine of order.shippingLines\" class=\"flex items-center\">\n <ng-container *ngIf=\"getShippingLineDetails(shippingLine) as details\">\n <div>{{ details.name }}:</div>\n <div class=\"mx-1\">\n {{ details.price | localeCurrency : order.currencyCode }}\n </div>\n <button class=\"button-small\" (click)=\"setShippingMethod(shippingLine.id)\">\n {{ 'order.set-shipping-method' | translate }}\n </button>\n </ng-container>\n </div>\n </vdr-card>\n <vdr-card [title]=\"'order.add-surcharge' | translate\">\n <form [formGroup]=\"surchargeForm\" (submit)=\"addSurcharge(surchargeForm.value)\">\n <div class=\"form-grid\">\n <vdr-form-field [label]=\"'common.description' | translate\" for=\"description\"\n ><input id=\"description\" type=\"text\" formControlName=\"description\"\n /></vdr-form-field>\n <vdr-form-field [label]=\"'order.product-sku' | translate\" for=\"sku\"\n ><input id=\"sku\" type=\"text\" formControlName=\"sku\"\n /></vdr-form-field>\n <vdr-form-field [label]=\"'common.price' | translate\" for=\"price\">\n <vdr-currency-input\n [currencyCode]=\"order.currencyCode\"\n id=\"price\"\n formControlName=\"price\"\n ></vdr-currency-input>\n </vdr-form-field>\n <vdr-form-field\n [label]=\"\n 'catalog.price-includes-tax-at'\n | translate : { rate: surchargeForm.get('taxRate')?.value ?? 0 }\n \"\n for=\"priceIncludesTax\"\n ><input\n id=\"priceIncludesTax\"\n type=\"checkbox\"\n clrCheckbox\n formControlName=\"priceIncludesTax\"\n /></vdr-form-field>\n <vdr-form-field [label]=\"'order.tax-rate' | translate\" for=\"taxRate\">\n <vdr-affixed-input suffix=\"%\"\n ><input id=\"taxRate\" type=\"number\" min=\"0\" max=\"100\" formControlName=\"taxRate\"\n /></vdr-affixed-input>\n </vdr-form-field>\n <vdr-form-field [label]=\"'order.tax-description' | translate\" for=\"taxDescription\"\n ><input id=\"taxDescription\" type=\"text\" formControlName=\"taxDescription\"\n /></vdr-form-field>\n </div>\n <button\n class=\"btn btn-secondary mt-2\"\n [disabled]=\"\n surchargeForm.invalid ||\n surchargeForm.pristine ||\n surchargeForm.get('price')?.value === 0 ||\n !surchargeForm.get('description')?.value\n \"\n >\n {{ 'order.add-surcharge' | translate }}\n </button>\n </form>\n </vdr-card>\n </vdr-page-block>\n</vdr-page-detail-layout>\n","import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core';\nimport {\n FormControl,\n FormGroup,\n UntypedFormArray,\n UntypedFormControl,\n UntypedFormGroup,\n Validators,\n} from '@angular/forms';\nimport {\n CustomFieldConfig,\n DataService,\n DraftOrderEligibleShippingMethodsQuery,\n ErrorResult,\n GetAvailableCountriesQuery,\n HistoryEntryType,\n LanguageCode,\n ModalService,\n ModifyOrderInput,\n NotificationService,\n OrderAddressFragment,\n OrderDetailFragment,\n OrderDetailQueryDocument,\n SortOrder,\n SurchargeInput,\n transformRelationCustomFieldInputs,\n TypedBaseDetailComponent,\n} from '@deenruv/admin-ui/core';\nimport { assertNever, notNullOrUndefined } from '@deenruv/common/lib/shared-utils';\nimport { simpleDeepClone } from '@deenruv/common/lib/simple-deep-clone';\nimport { EMPTY, Observable, of } from 'rxjs';\nimport { map, mapTo, shareReplay, switchMap, take, takeUntil } from 'rxjs/operators';\nimport {\n AddedLine,\n ModifyOrderData,\n OrderSnapshot,\n ProductSelectorItem,\n} from '../../common/modify-order-types';\n\nimport { OrderTransitionService } from '../../providers/order-transition.service';\nimport {\n OrderEditResultType,\n OrderEditsPreviewDialogComponent,\n} from '../order-edits-preview-dialog/order-edits-preview-dialog.component';\nimport { SelectShippingMethodDialogComponent } from '../select-shipping-method-dialog/select-shipping-method-dialog.component';\n\n@Component({\n selector: 'vdr-order-editor',\n templateUrl: './order-editor.component.html',\n styleUrls: ['./order-editor.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class OrderEditorComponent\n extends TypedBaseDetailComponent<typeof OrderDetailQueryDocument, 'order'>\n implements OnInit, OnDestroy\n{\n availableCountries$: Observable<GetAvailableCountriesQuery['countries']['items']>;\n addressCustomFields: CustomFieldConfig[];\n uiLanguage$: Observable<LanguageCode>;\n detailForm = new UntypedFormGroup({});\n couponCodesControl = new FormControl<string[]>([]);\n orderLineCustomFieldsFormArray: UntypedFormArray;\n addItemCustomFieldsFormArray: UntypedFormArray;\n addItemCustomFieldsForm: UntypedFormGroup;\n addItemSelectedVariant: ProductSelectorItem | undefined;\n orderLineCustomFields: CustomFieldConfig[];\n orderSnapshot: OrderSnapshot;\n modifyOrderInput: ModifyOrderData = {\n dryRun: true,\n orderId: '',\n addItems: [],\n adjustOrderLines: [],\n surcharges: [],\n note: '',\n refunds: [],\n updateShippingAddress: {},\n updateBillingAddress: {},\n };\n surchargeForm = new FormGroup({\n description: new FormControl('', Validators.minLength(1)),\n sku: new FormControl(''),\n price: new FormControl(0),\n priceIncludesTax: new FormControl(true),\n taxRate: new FormControl(0),\n taxDescription: new FormControl(''),\n });\n shippingAddressForm = new FormGroup({\n fullName: new FormControl(''),\n company: new FormControl(''),\n streetLine1: new FormControl(''),\n streetLine2: new FormControl(''),\n city: new FormControl(''),\n province: new FormControl(''),\n postalCode: new FormControl(''),\n countryCode: new FormControl(''),\n phoneNumber: new FormControl(''),\n });\n billingAddressForm = new FormGroup({\n fullName: new FormControl(''),\n company: new FormControl(''),\n streetLine1: new FormControl(''),\n streetLine2: new FormControl(''),\n city: new FormControl(''),\n province: new FormControl(''),\n postalCode: new FormControl(''),\n countryCode: new FormControl(''),\n phoneNumber: new FormControl(''),\n });\n note = '';\n recalculateShipping = true;\n previousState: string;\n editingShippingAddress = false;\n editingBillingAddress = false;\n updatedShippingMethods: {\n [\n shippingLineId: string\n ]: DraftOrderEligibleShippingMethodsQuery['eligibleShippingMethodsForDraftOrder'][number];\n } = {};\n private addedVariants = new Map<string, ProductSelectorItem>();\n\n constructor(\n protected dataService: DataService,\n private notificationService: NotificationService,\n private modalService: ModalService,\n private orderTransitionService: OrderTransitionService,\n private changeDetectorRef: ChangeDetectorRef,\n ) {\n super();\n }\n\n ngOnInit(): void {\n this.init();\n this.addressCustomFields = this.getCustomFieldConfig('Address');\n this.modifyOrderInput.orderId = this.route.snapshot.paramMap.get('id') as string;\n this.orderLineCustomFields = this.getCustomFieldConfig('OrderLine');\n this.entity$.pipe(take(1)).subscribe(order => {\n this.orderSnapshot = this.createOrderSnapshot(order);\n if (order.couponCodes.length) {\n this.couponCodesControl.setValue(order.couponCodes);\n }\n this.surchargeForm.reset();\n for (const [name, control] of Object.entries(this.shippingAddressForm.controls)) {\n control.setValue(order.shippingAddress?.[name]);\n }\n this.addAddressCustomFieldsFormGroup(this.shippingAddressForm, order.shippingAddress);\n for (const [name, control] of Object.entries(this.billingAddressForm.controls)) {\n control.setValue(order.billingAddress?.[name]);\n }\n this.addAddressCustomFieldsFormGroup(this.billingAddressForm, order.billingAddress);\n this.orderLineCustomFieldsFormArray = new UntypedFormArray([]);\n for (const line of order.lines) {\n const formGroup = new UntypedFormGroup({});\n for (const { name } of this.orderLineCustomFields) {\n formGroup.addControl(name, new UntypedFormControl((line as any).customFields[name]));\n }\n formGroup.valueChanges.pipe(takeUntil(this.destroy$)).subscribe(value => {\n let modifyRow = this.modifyOrderInput.adjustOrderLines.find(\n l => l.orderLineId === line.id,\n );\n if (!modifyRow) {\n modifyRow = {\n orderLineId: line.id,\n quantity: line.quantity,\n };\n this.modifyOrderInput.adjustOrderLines.push(modifyRow);\n }\n if (this.orderLineCustomFields.length) {\n modifyRow.customFields = value;\n }\n });\n this.orderLineCustomFieldsFormArray.push(formGroup);\n }\n });\n\n this.addItemCustomFieldsFormArray = new UntypedFormArray([]);\n this.addItemCustomFieldsForm = new UntypedFormGroup({});\n for (const customField of this.orderLineCustomFields) {\n this.addItemCustomFieldsForm.addControl(customField.name, new UntypedFormControl());\n }\n this.availableCountries$ = this.dataService.settings\n .getAvailableCountries()\n .mapSingle(result => result.countries.items)\n .pipe(shareReplay(1));\n this.dataService.order\n .getOrderHistory(this.id, {\n take: 1,\n sort: {\n createdAt: SortOrder.DESC,\n },\n filter: { type: { eq: HistoryEntryType.ORDER_STATE_TRANSITION } },\n })\n .single$.subscribe(({ order }) => {\n this.previousState = order?.history.items[0].data.from;\n });\n this.uiLanguage$ = this.dataService.client\n .uiState()\n .stream$.pipe(map(({ uiState }) => uiState.language));\n }\n\n ngOnDestroy(): void {\n this.destroy();\n }\n\n get addedLines(): AddedLine[] {\n const getSinglePriceValue = (price: ProductSelectorItem['price']) =>\n price.__typename === 'SinglePrice' ? price.value : 0;\n return (this.modifyOrderInput.addItems || [])\n .map(row => {\n const variantInfo = this.addedVariants.get(row.productVariantId);\n if (variantInfo) {\n return {\n id: this.getIdForAddedItem(row),\n featuredAsset: variantInfo.productAsset,\n productVariant: {\n id: variantInfo.productVariantId,\n name: variantInfo.productVariantName,\n sku: variantInfo.sku,\n },\n unitPrice: getSinglePriceValue(variantInfo.price),\n unitPriceWithTax: getSinglePriceValue(variantInfo.priceWithTax),\n quantity: row.quantity,\n };\n }\n })\n .filter(notNullOrUndefined);\n }\n\n private getIdForAddedItem(row: ModifyOrderData['addItems'][number]) {\n return `added-${row.productVariantId}-${JSON.stringify(row.customFields || {})}`;\n }\n\n transitionToPriorState(order: OrderDetailFragment) {\n this.orderTransitionService\n .transitionToPreModifyingState(order.id, order.nextStates)\n .subscribe(result => {\n this.router.navigate(['..'], { relativeTo: this.route });\n });\n }\n\n hasModifications(): boolean {\n const { addItems, adjustOrderLines, surcharges } = this.modifyOrderInput;\n return (\n !!addItems?.length ||\n !!surcharges?.length ||\n !!adjustOrderLines?.length ||\n (this.shippingAddressForm.dirty && this.shippingAddressForm.valid) ||\n (this.billingAddressForm.dirty && this.billingAddressForm.valid) ||\n this.couponCodesControl.dirty ||\n Object.entries(this.updatedShippingMethods).length > 0\n );\n }\n\n isLineModified(line: OrderDetailFragment['lines'][number]): boolean {\n return !!this.modifyOrderInput.adjustOrderLines?.find(\n l => l.orderLineId === line.id && l.quantity !== line.quantity,\n );\n }\n\n getInitialLineQuantity(lineId: string): number {\n const adjustedLine = this.modifyOrderInput.adjustOrderLines?.find(l => l.orderLineId === lineId);\n if (adjustedLine) {\n return adjustedLine.quantity;\n }\n const addedLine = this.modifyOrderInput.addItems?.find(l => this.getIdForAddedItem(l) === lineId);\n if (addedLine) {\n return addedLine.quantity ?? 1;\n }\n const line = this.orderSnapshot.lines.find(l => l.id === lineId);\n return line ? line.quantity : 1;\n }\n\n updateLineQuantity(line: OrderDetailFragment['lines'][number] | AddedLine, quantity: string) {\n const { adjustOrderLines } = this.modifyOrderInput;\n if (this.isAddedLine(line)) {\n const row = this.modifyOrderInput.addItems?.find(\n l => l.productVariantId === line.productVariant.id,\n );\n if (row) {\n row.quantity = +quantity;\n }\n } else {\n let row = adjustOrderLines?.find(l => l.orderLineId === line.id);\n if (row && +quantity === line.quantity) {\n // Remove the modification if the quantity is the same as\n // the original order\n adjustOrderLines?.splice(adjustOrderLines?.indexOf(row), 1);\n }\n if (!row) {\n row = { orderLineId: line.id, quantity: +quantity };\n adjustOrderLines?.push(row);\n }\n row.quantity = +quantity;\n }\n }\n\n isAddedLine(line: OrderDetailFragment['lines'][number] | AddedLine): line is AddedLine {\n return (line as AddedLine).id.startsWith('added-');\n }\n\n updateAddedItemQuantity(item: AddedLine, quantity: string) {\n const row = this.modifyOrderInput.addItems?.find(l => l.productVariantId === item.productVariant.id);\n if (row) {\n row.quantity = +quantity;\n }\n }\n\n trackByProductVariantId(index: number, item: AddedLine) {\n return item.productVariant.id;\n }\n\n getSelectedItemPrice(result: ProductSelectorItem | undefined): number {\n switch (result?.priceWithTax.__typename) {\n case 'SinglePrice':\n return result.priceWithTax.value;\n default:\n return 0;\n }\n }\n\n addItemToOrder(result: ProductSelectorItem | undefined) {\n if (!result) {\n return;\n }\n const customFields = this.orderLineCustomFields.length\n ? this.addItemCustomFieldsForm.value\n : undefined;\n let row = this.modifyOrderInput.addItems?.find(l =>\n this.isMatchingAddItemRow(l, result, customFields),\n );\n if (!row) {\n row = { productVariantId: result.productVariantId, quantity: 1 };\n if (customFields) {\n row.customFields = customFields;\n }\n this.modifyOrderInput.addItems?.push(row);\n } else {\n row.quantity++;\n }\n if (customFields) {\n const formGroup = new UntypedFormGroup({});\n for (const [key, value] of Object.entries(customFields)) {\n formGroup.addControl(key, new UntypedFormControl(value));\n }\n this.addItemCustomFieldsFormArray.push(formGroup);\n formGroup.valueChanges.pipe(takeUntil(this.destroy$)).subscribe(value => {\n if (row) {\n row.customFields = value;\n }\n });\n }\n this.addItemCustomFieldsForm.reset({});\n this.addItemSelectedVariant = undefined;\n this.addedVariants.set(result.productVariantId, result);\n }\n\n getShippingLineDetails(shippingLine: OrderDetailFragment['shippingLines'][number]): {\n name: string;\n price: number;\n } {\n const updatedMethod = this.updatedShippingMethods[shippingLine.id];\n if (updatedMethod) {\n return {\n name: updatedMethod.name || updatedMethod.code,\n price: updatedMethod.priceWithTax,\n };\n } else {\n return {\n name: shippingLine.shippingMethod.name || shippingLine.shippingMethod.code,\n price: shippingLine.discountedPriceWithTax,\n };\n }\n }\n\n setShippingMethod(shippingLineId: string) {\n const currentShippingMethod =\n this.updatedShippingMethods[shippingLineId] ??\n this.entity?.shippingLines.find(l => l.id === shippingLineId)?.shippingMethod;\n if (!currentShippingMethod) {\n return;\n }\n this.dataService.order\n .getDraftOrderEligibleShippingMethods(this.id)\n .mapSingle(({ eligibleShippingMethodsForDraftOrder }) => eligibleShippingMethodsForDraftOrder)\n .pipe(\n switchMap(methods =>\n this.modalService\n .fromComponent(SelectShippingMethodDialogComponent, {\n locals: {\n eligibleShippingMethods: methods,\n currencyCode: this.entity?.currencyCode,\n currentSelectionId: currentShippingMethod.id,\n },\n })\n .pipe(\n map(result => {\n if (result) {\n return methods.find(method => method.id === result);\n }\n }),\n ),\n ),\n )\n .subscribe(result => {\n if (result) {\n this.updatedShippingMethods[shippingLineId] = result;\n this.changeDetectorRef.markForCheck();\n }\n });\n }\n\n private isMatchingAddItemRow(\n row: ModifyOrderData['addItems'][number],\n result: ProductSelectorItem,\n customFields: any,\n ): boolean {\n return (\n row.productVariantId === result.productVariantId &&\n JSON.stringify(row.customFields) === JSON.stringify(customFields)\n );\n }\n\n removeAddedItem(id: string) {\n this.modifyOrderInput.addItems = this.modifyOrderInput.addItems?.filter(l => {\n const itemId = this.getIdForAddedItem(l);\n return itemId !== id;\n });\n }\n\n getSurchargePrices(surcharge: SurchargeInput) {\n const priceWithTax = surcharge.priceIncludesTax\n ? surcharge.price\n : Math.round(surcharge.price * ((100 + (surcharge.taxRate || 0)) / 100));\n const price = surcharge.priceIncludesTax\n ? Math.round(surcharge.price / ((100 + (surcharge.taxRate || 0)) / 100))\n : surcharge.price;\n return {\n price,\n priceWithTax,\n };\n }\n\n addSurcharge(value: any) {\n this.modifyOrderInput.surcharges?.push(value);\n this.surchargeForm.reset({\n price: 0,\n priceIncludesTax: true,\n taxRate: 0,\n });\n }\n\n removeSurcharge(index: number) {\n this.modifyOrderInput.surcharges?.splice(index, 1);\n }\n\n previewAndModify(order: OrderDetailFragment) {\n const modifyOrderInput: ModifyOrderData = {\n ...this.modifyOrderInput,\n adjustOrderLines: this.modifyOrderInput.adjustOrderLines.map(line =>\n transformRelationCustomFieldInputs(simpleDeepClone(line), this.orderLineCustomFields),\n ),\n };\n const input: ModifyOrderInput = {\n ...modifyOrderInput,\n ...(this.billingAddressForm.dirty ? { updateBillingAddress: this.billingAddressForm.value } : {}),\n ...(this.shippingAddressForm.dirty\n ? { updateShippingAddress: this.shippingAddressForm.value }\n : {}),\n dryRun: true,\n couponCodes: this.couponCodesControl.dirty ? this.couponCodesControl.value : undefined,\n note: this.note ?? '',\n options: {\n recalculateShipping: this.recalculateShipping,\n },\n };\n if (Object.entries(this.updatedShippingMethods).length) {\n input.shippingMethodIds = order.shippingLines.map(l =>\n this.updatedShippingMethods[l.id]\n ? this.updatedShippingMethods[l.id].id\n : l.shippingMethod.id,\n );\n }\n this.dataService.order\n .modifyOrder(input)\n .pipe(\n switchMap(({ modifyOrder }) => {\n switch (modifyOrder.__typename) {\n case 'Order':\n return this.modalService.fromComponent(OrderEditsPreviewDialogComponent, {\n size: 'xl',\n closable: false,\n locals: {\n order: modifyOrder,\n orderSnapshot: this.orderSnapshot,\n orderLineCustomFields: this.orderLineCustomFields,\n modifyOrderInput: input,\n addedLines: this.addedLines,\n shippingAddressForm: this.shippingAddressForm,\n billingAddressForm: this.billingAddressForm,\n couponCodesControl: this.couponCodesControl,\n updatedShippingMethods: this.updatedShippingMethods,\n },\n });\n case 'InsufficientStockError':\n case 'NegativeQuantityError':\n case 'NoChangesSpecifiedError':\n case 'OrderLimitError':\n case 'OrderModificationStateError':\n case 'PaymentMethodMissingError':\n case 'RefundPaymentIdMissingError':\n case 'CouponCodeLimitError':\n case 'CouponCodeExpiredError':\n case 'IneligibleShippingMethodError':\n case 'CouponCodeInvalidError': {\n this.notificationService.error(modifyOrder.message);\n return of(false as const);\n }\n case null:\n case undefined:\n return of(false as const);\n default:\n assertNever(modifyOrder);\n }\n }),\n switchMap(result => {\n if (!result || result.result === OrderEditResultType.Cancel) {\n // re-fetch so that the preview values get overwritten in the cache.\n return this.dataService.order.getOrder(this.id).mapSingle(() => false);\n } else {\n // Do the modification\n const wetRunInput = {\n ...input,\n dryRun: false,\n };\n if (result.result === OrderEditResultType.Refund) {\n wetRunInput.refunds = result.refunds;\n }\n return this.dataService.order.modifyOrder(wetRunInput).pipe(\n switchMap(({ modifyOrder }) => {\n if (modifyOrder.__typename === 'Order') {\n const priceDelta =\n modifyOrder.totalWithTax - this.orderSnapshot.totalWithTax;\n const nextState =\n 0 < priceDelta ? 'ArrangingAdditionalPayment' : this.previousState;\n\n return this.dataService.order\n .transitionToState(order.id, nextState)\n .pipe(mapTo(true));\n } else {\n this.notificationService.error((modifyOrder as ErrorResult).message);\n return EMPTY;\n }\n }),\n );\n }\n }),\n )\n .subscribe(result => {\n if (result) {\n this.router.navigate(['../'], { relativeTo: this.route });\n }\n });\n }\n\n private addAddressCustomFieldsFormGroup(\n parentFormGroup: UntypedFormGroup,\n address?: OrderAddressFragment | null,\n ) {\n if (address && this.addressCustomFields.length) {\n const addressCustomFieldsFormGroup = new UntypedFormGroup({});\n for (const customFieldDef of this.addressCustomFields) {\n const name = customFieldDef.name;\n const value = (address as any).customFields?.[name];\n addressCustomFieldsFormGroup.addControl(name, new UntypedFormControl(value));\n }\n parentFormGroup.addControl('customFields', addressCustomFieldsFormGroup);\n }\n }\n\n private createOrderSnapshot(order: OrderDetailFragment): OrderSnapshot {\n return {\n totalWithTax: order.totalWithTax,\n currencyCode: order.currencyCode,\n couponCodes: order.couponCodes,\n lines: [...order.lines].map(line => ({ ...line })),\n shippingLines: [...order.shippingLines].map(line => ({ ...line })),\n };\n }\n\n protected setFormValues(entity: OrderDetailFragment, languageCode: LanguageCode): void {\n /* not used */\n }\n}\n","<vdr-page-block>\n <vdr-action-bar>\n <vdr-ab-right>\n <vdr-action-bar-items locationId=\"order-list\" />\n <ng-container *ngIf=\"canCreateDraftOrder\">\n <a class=\"btn\" *vdrIfPermissions=\"['CreateOrder']\" [routerLink]=\"['./draft/create']\">\n <clr-icon shape=\"plus\"></clr-icon>\n {{ 'catalog.create-draft-order' | translate }}\n </a>\n </ng-container>\n <vdr-action-bar-dropdown-menu locationId=\"order-list\" />\n </vdr-ab-right>\n </vdr-action-bar>\n</vdr-page-block>\n<vdr-data-table-2\n class=\"mt-2\"\n id=\"order-list\"\n [items]=\"items$ | async\"\n [itemsPerPage]=\"itemsPerPage$ | async\"\n [totalItems]=\"totalItems$ | async\"\n [currentPage]=\"currentPage$ | async\"\n [filters]=\"filters\"\n (pageChange)=\"setPageNumber($event)\"\n (itemsPerPageChange)=\"setItemsPerPage($event)\"\n>\n <vdr-bulk-action-menu\n locationId=\"order-list\"\n [hostComponent]=\"this\"\n [selectionManager]=\"selectionManager\"\n ></vdr-bulk-action-menu>\n <vdr-dt2-search\n [searchTermControl]=\"searchTermControl\"\n [searchTermPlaceholder]=\"'order.search-by-order-filters' | translate\"\n />\n <vdr-dt2-column [heading]=\"'common.id' | translate\" id=\"id\" [hiddenByDefault]=\"true\" [sort]=\"sorts.get('id')\">\n <ng-template let-order=\"item\">\n {{ order.id }}\n </ng-template>\n </vdr-dt2-column>\n <vdr-dt2-column [heading]=\"'common.created-at' | translate\" id=\"created-at\" [hiddenByDefault]=\"true\">\n <ng-template let-order=\"item\">\n {{ order.createdAt | localeDate : 'short' }}\n </ng-template>\n </vdr-dt2-column>\n <vdr-dt2-column [heading]=\"'common.code' | translate\" id=\"code\" [optional]=\"false\">\n <ng-template let-order=\"item\">\n <a class=\"button-ghost\" [routerLink]=\"order.state === 'Draft' ? ['./draft', order.id] : ['./', order.id]\"\n ><span>{{ order.code }}</span>\n <clr-icon shape=\"arrow right\"></clr-icon>\n </a>\n </ng-template>\n </vdr-dt2-column>\n <vdr-dt2-column [heading]=\"'order.customer' | translate\" id=\"customer\" [sort]=\"sorts.get('customerLastName')\">\n <ng-template let-order=\"item\">\n <vdr-customer-label\n [customer]=\"order.customer\"\n (click)=\"$event.stopPropagation()\"\n ></vdr-customer-label>\n </ng-template>\n </vdr-dt2-column>\n <vdr-dt2-column [heading]=\"'order.order-type' | translate\" id=\"order-type\" [hiddenByDefault]=\"true\">\n <ng-template let-order=\"item\">\n <vdr-chip *ngIf=\"order.type === OrderType.Regular\">{{ 'order.order-type-regular' | translate }}</vdr-chip>\n <vdr-chip *ngIf=\"order.type === OrderType.Aggregate\">{{ 'order.order-type-aggregate' | translate }}</vdr-chip>\n <vdr-chip *ngIf=\"order.type === OrderType.Seller\">{{ 'order.order-type-seller' | translate }}</vdr-chip>\n </ng-template>\n </vdr-dt2-column>\n <vdr-dt2-column [heading]=\"'order.state' | translate\" id=\"state\" [sort]=\"sorts.get('state')\">\n <ng-template let-order=\"item\">\n <vdr-order-state-label [state]=\"order.state\"></vdr-order-state-label>\n </ng-template>\n </vdr-dt2-column>\n <vdr-dt2-column [heading]=\"'order.total' | translate\" id=\"total\" [sort]=\"sorts.get('totalWithTax')\">\n <ng-template let-order=\"item\">\n {{ order.totalWithTax | localeCurrency : order.currencyCode }}\n </ng-template>\n </vdr-dt2-column>\n <vdr-dt2-column [heading]=\"'common.updated-at' | translate\" id=\"updated-at\">\n <ng-template let-order=\"item\">\n {{ order.updatedAt | timeAgo }}\n </ng-template>\n </vdr-dt2-column>\n <vdr-dt2-column [heading]=\"'order.placed-at' | translate\" id=\"placed-at\" [sort]=\"sorts.get('orderPlacedAt')\">\n <ng-template let-order=\"item\">\n {{ order.orderPlacedAt | localeDate : 'short' }}\n </ng-template>\n </vdr-dt2-column>\n <vdr-dt2-column [heading]=\"'order.shipping' | translate\" id=\"shipping\">\n <ng-template let-order=\"item\">\n {{ getShippingNames(order) }}\n </ng-template>\n </vdr-dt2-column>\n <vdr-dt2-custom-field-column\n *ngFor=\"let customField of customFields\"\n [customField]=\"customField\"\n [sorts]=\"sorts\"\n />\n</vdr-data-table-2>\n","import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';\nimport { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';\nimport {\n ChannelService,\n GetOrderListDocument,\n getOrderStateTranslationToken,\n LogicalOperator,\n OrderListOptions,\n OrderType,\n ServerConfigService,\n TypedBaseListComponent,\n} from '@deenruv/admin-ui/core';\nimport { Order } from '@deenruv/common/lib/generated-types';\nimport { tap } from 'rxjs/operators';\n\n@Component({\n selector: 'vdr-order-list',\n templateUrl: './order-list.component.html',\n styleUrls: ['./order-list.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class OrderListComponent\n extends TypedBaseListComponent<typeof GetOrderListDocument, 'orders'>\n implements OnInit\n{\n orderStates = this.serverConfigService.getOrderProcessStates().map(item => item.name);\n readonly OrderType = OrderType;\n readonly customFields = this.getCustomFieldConfig('Order');\n readonly filters = this.createFilterCollection()\n .addIdFilter()\n .addDateFilters()\n .addFilter({\n name: 'active',\n type: { kind: 'boolean' },\n label: _('order.filter-is-active'),\n filterField: 'active',\n })\n .addFilter({\n name: 'totalWithTax',\n type: { kind: 'number', inputType: 'currency', currencyCode: 'USD' },\n label: _('order.total'),\n filterField: 'totalWithTax',\n })\n .addFilter({\n name: 'state',\n type: {\n kind: 'select',\n options: this.orderStates.map(s => ({ value: s, label: getOrderStateTranslationToken(s) })),\n },\n label: _('order.state'),\n filterField: 'state',\n })\n .addFilter({\n name: 'type',\n type: {\n kind: 'select',\n options: [\n { value: OrderType.Regular, label: _('order.order-type-regular') },\n { value: OrderType.Aggregate, label: _('order.order-type-aggregate') },\n { value: OrderType.Seller, label: _('order.order-type-seller') },\n ],\n },\n label: _('order.order-type'),\n filterField: 'type',\n })\n .addFilter({\n name: 'orderPlacedAt',\n type: { kind: 'dateRange' },\n label: _('order.placed-at'),\n filterField: 'orderPlacedAt',\n })\n .addFilter({\n name: 'customerLastName',\n type: { kind: 'text' },\n label: _('customer.last-name'),\n filterField: 'customerLastName',\n })\n .addFilter({\n name: 'transactionId',\n type: { kind: 'text' },\n label: _('order.transaction-id'),\n filterField: 'transactionId',\n })\n .addCustomFieldFilters(this.customFields)\n .connectToRoute(this.route);\n\n readonly sorts = this.createSortCollection()\n .defaultSort('updatedAt', 'DESC')\n .addSort({ name: 'id' })\n .addSort({ name: 'createdAt' })\n .addSort({ name: 'updatedAt' })\n .addSort({ name: 'orderPlacedAt' })\n .addSort({ name: 'customerLastName' })\n .addSort({ name: 'state' })\n .addSort({ name: 'totalWithTax' })\n .addCustomFieldSorts(this.customFields)\n .connectToRoute(this.route);\n\n canCreateDraftOrder = false;\n private activeChannelIsDefaultChannel = false;\n\n constructor(\n protected serverConfigService: ServerConfigService,\n private channelService: ChannelService,\n ) {\n super();\n super.configure({\n document: GetOrderListDocument,\n getItems: result => result.orders,\n setVariables: (skip, take) => this.createQueryOptions(skip, take, this.searchTermControl.value),\n refreshListOnChanges: [this.filters.valueChanges, this.sorts.valueChanges],\n });\n\n this.canCreateDraftOrder = !!this.serverConfigService\n .getOrderProcessStates()\n .find(state => state.name === 'Created')\n ?.to.includes('Draft');\n }\n\n ngOnInit() {\n super.ngOnInit();\n const isDefaultChannel$ = this.channelService.defaultChannelIsActive$.pipe(\n tap(isDefault => (this.activeChannelIsDefaultChannel = isDefault)),\n );\n super.refreshListOnChanges(this.filters.valueChanges, this.sorts.valueChanges, isDefaultChannel$);\n }\n\n private createQueryOptions(\n // eslint-disable-next-line @typescript-eslint/no-shadow\n skip: number,\n take: number,\n searchTerm: string | null,\n ): { options: OrderListOptions } {\n let filterInput = this.filters.createFilterInput();\n if (this.activeChannelIsDefaultChannel) {\n filterInput = {\n ...(filterInput ?? {}),\n };\n }\n if (searchTerm) {\n filterInput = {\n code: {\n contains: searchTerm,\n },\n customerLastName: {\n contains: searchTerm,\n },\n transactionId: {\n contains: searchTerm,\n },\n };\n }\n return {\n options: {\n skip,\n take,\n filter: {\n ...(filterInput ?? {}),\n },\n filterOperator: searchTerm ? LogicalOperator.OR : LogicalOperator.AND,\n sort: this.sorts.createSortInput(),\n },\n };\n }\n\n getShippingNames(order: Order) {\n if (order.shippingLines.length) {\n return order.shippingLines.map(shippingLine => shippingLine.shippingMethod.name).join(', ');\n } else {\n return '';\n }\n }\n}\n","<vdr-labeled-data [label]=\"'order.amount' | translate\">\n {{ refund.total | localeCurrency: currencyCode }}\n</vdr-labeled-data>\n<vdr-labeled-data *ngIf=\"refund.transactionId\" [label]=\"'order.transaction-id' | translate\">\n {{ refund.transactionId }}\n</vdr-labeled-data>\n<vdr-labeled-data [label]=\"'order.payment-metadata' | translate\">\n <vdr-object-tree [value]=\"refund.metadata\"></vdr-object-tree>\n</vdr-labeled-data>\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { CurrencyCode, OrderDetailFragment } from '@deenruv/admin-ui/core';\n\n@Component({\n selector: 'vdr-refund-detail',\n templateUrl: './refund-detail.component.html',\n styleUrls: ['./refund-detail.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class RefundDetailComponent {\n @Input() refund: NonNullable<OrderDetailFragment['payments']>[number]['refunds'][number];\n @Input() currencyCode: CurrencyCode;\n}\n","import { ADDRESS_FRAGMENT } from '@deenruv/admin-ui/core';\nimport { gql } from 'apollo-angular';\n\nexport const GET_CUSTOMER_ADDRESSES = gql`\n query GetCustomerAddresses($customerId: ID!) {\n customer(id: $customerId) {\n id\n addresses {\n ...Address\n }\n }\n }\n ${ADDRESS_FRAGMENT}\n`;\n","import { Injectable } from '@angular/core';\nimport { ActivatedRouteSnapshot, Router, RouterStateSnapshot, UrlTree } from '@angular/router';\nimport { DataService, GetOrderStateQuery, GetOrderStateQueryVariables } from '@deenruv/admin-ui/core';\nimport { gql } from 'apollo-angular';\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nexport const GET_ORDER_STATE = gql`\n query GetOrderState($id: ID!) {\n order(id: $id) {\n id\n state\n }\n }\n`;\n\n@Injectable({\n providedIn: 'root',\n})\nexport class OrderGuard {\n constructor(\n private dataService: DataService,\n private router: Router,\n ) {}\n\n canActivate(\n route: ActivatedRouteSnapshot,\n state: RouterStateSnapshot,\n ): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {\n const isDraft = state.url.includes('orders/draft');\n const isModifying = state.url.includes('/modify');\n const id = route.paramMap.get('id');\n if (isDraft) {\n if (id === 'create') {\n return this.dataService.order\n .createDraftOrder()\n .pipe(\n map(({ createDraftOrder }) =>\n this.router.parseUrl(`/orders/draft/${createDraftOrder.id}`),\n ),\n );\n } else {\n return true;\n }\n } else {\n return (\n this.dataService\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n .query<GetOrderStateQuery, GetOrderStateQueryVariables>(GET_ORDER_STATE, { id: id! })\n .single$.pipe(\n map(({ order }) => {\n if (order?.state === 'Modifying' && !isModifying) {\n return this.router.parseUrl(`/orders/${id}/modify`);\n } else {\n return true;\n }\n }),\n )\n );\n }\n }\n}\n","import { Route } from '@angular/router';\nimport { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';\nimport { PageComponent, PageService } from '@deenruv/admin-ui/core';\nimport { OrderGuard } from './providers/routing/order.guard';\n\nexport const createRoutes = (pageService: PageService): Route[] => [\n {\n path: '',\n component: PageComponent,\n pathMatch: 'full',\n data: {\n locationId: 'order-list',\n breadcrumb: _('breadcrumb.orders'),\n },\n children: pageService.getPageTabRoutes('order-list'),\n },\n {\n path: 'draft/:id',\n component: PageComponent,\n canActivate: [OrderGuard],\n data: {\n locationId: 'draft-order-detail',\n breadcrumb: { label: _('breadcrumb.orders'), link: ['../'] },\n },\n children: pageService.getPageTabRoutes('draft-order-detail'),\n },\n {\n path: ':id',\n component: PageComponent,\n canActivate: [OrderGuard],\n data: {\n locationId: 'order-detail',\n breadcrumb: { label: _('breadcrumb.orders'), link: ['../'] },\n },\n children: pageService.getPageTabRoutes('order-detail'),\n },\n {\n path: ':aggregateOrderId/seller-orders/:id',\n component: PageComponent,\n canActivate: [OrderGuard],\n data: {\n locationId: 'order-detail',\n breadcrumb: { label: _('breadcrumb.orders'), link: ['../'] },\n },\n children: pageService.getPageTabRoutes('order-detail'),\n },\n {\n path: ':id/modify',\n component: PageComponent,\n canActivate: [OrderGuard],\n data: {\n locationId: 'modify-order',\n breadcrumb: { label: _('breadcrumb.orders'), link: ['../'] },\n },\n children: pageService.getPageTabRoutes('modify-order'),\n },\n];\n","import { NgModule } from '@angular/core';\nimport { RouterModule, ROUTES } from '@angular/router';\nimport { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';\nimport {\n detailComponentWithResolver,\n OrderDetailQueryDocument,\n OrderType,\n PageService,\n SharedModule,\n} from '@deenruv/admin-ui/core';\n\nimport { AddManualPaymentDialogComponent } from './components/add-manual-payment-dialog/add-manual-payment-dialog.component';\nimport { CancelOrderDialogComponent } from './components/cancel-order-dialog/cancel-order-dialog.component';\nimport { CouponCodeSelectorComponent } from './components/coupon-code-selector/coupon-code-selector.component';\nimport { DraftOrderDetailComponent } from './components/draft-order-detail/draft-order-detail.component';\nimport { DraftOrderVariantSelectorComponent } from './components/draft-order-variant-selector/draft-order-variant-selector.component';\nimport { FulfillOrderDialogComponent } from './components/fulfill-order-dialog/fulfill-order-dialog.component';\nimport { FulfillmentCardComponent } from './components/fulfillment-card/fulfillment-card.component';\nimport { FulfillmentDetailComponent } from './components/fulfillment-detail/fulfillment-detail.component';\nimport { FulfillmentStateLabelComponent } from './components/fulfillment-state-label/fulfillment-state-label.component';\nimport { LineFulfillmentComponent } from './components/line-fulfillment/line-fulfillment.component';\nimport { LineRefundsComponent } from './components/line-refunds/line-refunds.component';\nimport { ModificationDetailComponent } from './components/modification-detail/modification-detail.component';\nimport { OrderCustomFieldsCardComponent } from './components/order-custom-fields-card/order-custom-fields-card.component';\nimport { OrderTotalColumnComponent } from './components/order-data-table/order-total-column.component';\nimport { OrderDetailComponent } from './components/order-detail/order-detail.component';\nimport { OrderEditorComponent } from './components/order-editor/order-editor.component';\nimport { OrderEditsPreviewDialogComponent } from './components/order-edits-preview-dialog/order-edits-preview-dialog.component';\nimport { OrderHistoryEntryHostComponent } from './components/order-history/order-history-entry-host.component';\nimport { OrderHistoryComponent } from './components/order-history/order-history.component';\nimport { OrderListComponent } from './components/order-list/order-list.component';\nimport { OrderPaymentCardComponent } from './components/order-payment-card/order-payment-card.component';\nimport { OrderProcessGraphDialogComponent } from './components/order-process-graph-dialog/order-process-graph-dialog.component';\nimport { OrderProcessEdgeComponent } from './components/order-process-graph/order-process-edge.component';\nimport { OrderProcessGraphComponent } from './components/order-process-graph/order-process-graph.component';\nimport { OrderProcessNodeComponent } from './components/order-process-graph/order-process-node.component';\nimport { OrderStateSelectDialogComponent } from './components/order-state-select-dialog/order-state-select-dialog.component';\nimport { OrderTableComponent } from './components/order-table/order-table.component';\nimport { PaymentDetailComponent } from './components/payment-detail/payment-detail.component';\nimport { PaymentStateLabelComponent } from './components/payment-state-label/payment-state-label.component';\nimport { RefundDetailComponent } from './components/refund-detail/refund-detail.component';\nimport { RefundOrderDialogComponent } from './components/refund-order-dialog/refund-order-dialog.component';\nimport { RefundStateLabelComponent } from './components/refund-state-label/refund-state-label.component';\nimport { SelectAddressDialogComponent } from './components/select-address-dialog/select-address-dialog.component';\nimport { SelectCustomerDialogComponent } from './components/select-customer-dialog/select-customer-dialog.component';\nimport { SelectShippingMethodDialogComponent } from './components/select-shipping-method-dialog/select-shipping-method-dialog.component';\nimport { SellerOrdersCardComponent } from './components/seller-orders-card/seller-orders-card.component';\nimport { SettleRefundDialogComponent } from './components/settle-refund-dialog/settle-refund-dialog.component';\nimport { SimpleItemListComponent } from './components/simple-item-list/simple-item-list.component';\nimport { createRoutes } from './order.routes';\nimport { OrderDataTableComponent } from './components/order-data-table/order-data-table.component';\nimport { PaymentForRefundSelectorComponent } from './components/payment-for-refund-selector/payment-for-refund-selector.component';\nimport { OrderModificationSummaryComponent } from './components/order-modification-summary/order-modification-summary.component';\n\n@NgModule({\n imports: [SharedModule, RouterModule.forChild([])],\n providers: [\n {\n provide: ROUTES,\n useFactory: (pageService: PageService) => createRoutes(pageService),\n multi: true,\n deps: [PageService],\n },\n ],\n declarations: [\n OrderListComponent,\n OrderDetailComponent,\n FulfillOrderDialogComponent,\n LineFulfillmentComponent,\n RefundOrderDialogComponent,\n CancelOrderDialogComponent,\n PaymentStateLabelComponent,\n LineRefundsComponent,\n OrderPaymentCardComponent,\n RefundStateLabelComponent,\n SettleRefundDialogComponent,\n OrderHistoryComponent,\n FulfillmentDetailComponent,\n PaymentDetailComponent,\n SimpleItemListComponent,\n OrderCustomFieldsCardComponent,\n OrderProcessGraphComponent,\n OrderProcessNodeComponent,\n OrderProcessEdgeComponent,\n OrderProcessGraphDialogComponent,\n FulfillmentStateLabelComponent,\n FulfillmentCardComponent,\n OrderEditorComponent,\n OrderTableComponent,\n OrderEditsPreviewDialogComponent,\n ModificationDetailComponent,\n AddManualPaymentDialogComponent,\n OrderStateSelectDialogComponent,\n DraftOrderDetailComponent,\n DraftOrderVariantSelectorComponent,\n SelectCustomerDialogComponent,\n SelectAddressDialogComponent,\n CouponCodeSelectorComponent,\n SelectShippingMethodDialogComponent,\n OrderHistoryEntryHostComponent,\n SellerOrdersCardComponent,\n OrderDataTableComponent,\n OrderTotalColumnComponent,\n PaymentForRefundSelectorComponent,\n OrderModificationSummaryComponent,\n RefundDetailComponent,\n ],\n exports: [OrderCustomFieldsCardComponent],\n})\nexport class OrderModule {\n private static hasRegisteredTabsAndBulkActions = false;\n\n constructor(pageService: PageService) {\n if (OrderModule.hasRegisteredTabsAndBulkActions) {\n return;\n }\n pageService.registerPageTab({\n priority: 0,\n location: 'order-list',\n tab: _('order.orders'),\n route: '',\n component: OrderListComponent,\n });\n pageService.registerPageTab({\n priority: 0,\n location: 'order-detail',\n tab: _('order.order'),\n route: '',\n component: detailComponentWithResolver({\n component: OrderDetailComponent,\n query: OrderDetailQueryDocument,\n entityKey: 'order',\n getBreadcrumbs: entity =>\n entity?.type !== OrderType.Seller || !entity?.aggregateOrder\n ? [\n {\n label: `${entity?.code}`,\n link: [entity?.id],\n },\n ]\n : [\n {\n label: `${entity?.aggregateOrder?.code}`,\n link: ['/orders/', entity?.aggregateOrder?.id],\n },\n {\n label: _('breadcrumb.seller-orders'),\n link: ['/orders/', entity?.aggregateOrder?.id],\n },\n {\n label: `${entity?.code}`,\n link: [entity?.id],\n },\n ],\n }),\n });\n pageService.registerPageTab({\n priority: 0,\n location: 'draft-order-detail',\n tab: _('order.order'),\n route: '',\n component: detailComponentWithResolver({\n component: DraftOrderDetailComponent,\n query: OrderDetailQueryDocument,\n entityKey: 'order',\n getBreadcrumbs: entity => [\n {\n label: _('order.draft-order'),\n link: [entity?.id],\n },\n ],\n }),\n });\n pageService.registerPageTab({\n priority: 0,\n location: 'modify-order',\n tab: _('order.order'),\n route: '',\n component: detailComponentWithResolver({\n component: OrderEditorComponent,\n query: OrderDetailQueryDocument,\n entityKey: 'order',\n getBreadcrumbs: entity => [\n {\n label: entity?.code || 'order',\n link: ['/orders/', entity?.id],\n },\n {\n label: _('breadcrumb.modifying-order'),\n link: [entity?.id],\n },\n ],\n }),\n });\n OrderModule.hasRegisteredTabsAndBulkActions = true;\n }\n}\n"],"x_google_ignoreList":[16]}
|