@vendure/admin-ui 2.1.0-next.5 → 2.1.0-next.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/catalog/catalog.module.d.ts +3 -5
- package/catalog/components/facet-detail/facet-detail.component.d.ts +32 -21
- package/catalog/public_api.d.ts +0 -3
- package/core/common/generated-types.d.ts +142 -125
- package/core/common/version.d.ts +1 -1
- package/core/shared/components/asset-gallery/asset-gallery.component.d.ts +2 -1
- package/esm2022/catalog/catalog.module.mjs +30 -39
- package/esm2022/catalog/catalog.routes.mjs +15 -26
- package/esm2022/catalog/components/asset-list/asset-list.component.mjs +1 -1
- package/esm2022/catalog/components/collection-contents/collection-contents.component.mjs +3 -3
- package/esm2022/catalog/components/facet-detail/facet-detail.component.mjs +71 -46
- package/esm2022/catalog/components/product-variant-list/product-variant-list.component.mjs +3 -3
- package/esm2022/catalog/components/product-variant-quick-jump/product-variant-quick-jump.component.mjs +2 -2
- package/esm2022/catalog/public_api.mjs +1 -4
- package/esm2022/core/common/generated-types.mjs +27 -27
- package/esm2022/core/common/version.mjs +2 -2
- package/esm2022/core/components/base-nav/base-nav.component.mjs +11 -4
- package/esm2022/core/data/definitions/order-definitions.mjs +2 -1
- package/esm2022/core/shared/components/asset-gallery/asset-gallery.component.mjs +7 -4
- package/esm2022/core/shared/components/asset-picker-dialog/asset-picker-dialog.component.mjs +3 -3
- package/esm2022/order/components/fulfill-order-dialog/fulfill-order-dialog.component.mjs +2 -2
- package/esm2022/order/components/order-data-table/order-data-table.component.mjs +2 -2
- package/esm2022/order/components/order-editor/order-editor.component.mjs +2 -2
- package/esm2022/order/components/order-table/order-table.component.mjs +3 -3
- package/esm2022/settings/components/stock-location-detail/stock-location-detail.component.mjs +137 -0
- package/esm2022/settings/components/stock-location-list/stock-location-list-bulk-actions.mjs +68 -0
- package/esm2022/{catalog → settings}/components/stock-location-list/stock-location-list.component.mjs +1 -1
- package/esm2022/settings/public_api.mjs +4 -1
- package/esm2022/settings/settings.module.mjs +37 -3
- package/esm2022/settings/settings.routes.mjs +19 -1
- package/esm2022/system/components/job-list/job-list.component.mjs +13 -15
- package/esm2022/system/components/job-state-label/job-state-label.component.mjs +1 -1
- package/fesm2022/vendure-admin-ui-catalog.mjs +116 -377
- package/fesm2022/vendure-admin-ui-catalog.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-core.mjs +45 -34
- package/fesm2022/vendure-admin-ui-core.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-order.mjs +8 -8
- package/fesm2022/vendure-admin-ui-order.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-settings.mjs +320 -3
- package/fesm2022/vendure-admin-ui-settings.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-system.mjs +12 -14
- package/fesm2022/vendure-admin-ui-system.mjs.map +1 -1
- package/package.json +13 -13
- package/{catalog → settings}/components/stock-location-list/stock-location-list.component.d.ts +1 -1
- package/settings/public_api.d.ts +3 -0
- package/settings/settings.module.d.ts +5 -3
- package/static/i18n-messages/ar.json +11 -5
- package/static/i18n-messages/cs.json +14 -8
- package/static/i18n-messages/de.json +11 -5
- package/static/i18n-messages/en.json +11 -5
- package/static/i18n-messages/es.json +11 -5
- package/static/i18n-messages/fa.json +774 -0
- package/static/i18n-messages/fr.json +12 -6
- package/static/i18n-messages/he.json +11 -5
- package/static/i18n-messages/it.json +11 -5
- package/static/i18n-messages/pl.json +11 -5
- package/static/i18n-messages/pt_BR.json +11 -5
- package/static/i18n-messages/pt_PT.json +18 -12
- package/static/i18n-messages/ru.json +11 -5
- package/static/i18n-messages/uk.json +15 -9
- package/static/i18n-messages/zh_Hans.json +14 -8
- package/static/i18n-messages/zh_Hant.json +14 -8
- package/static/vendure-ui-config.json +2 -1
- package/system/components/job-list/job-list.component.d.ts +6 -8
- package/esm2022/catalog/components/stock-location-detail/stock-location-detail.component.mjs +0 -137
- package/esm2022/catalog/components/stock-location-list/stock-location-list-bulk-actions.mjs +0 -68
- /package/{catalog → settings}/components/stock-location-detail/stock-location-detail.component.d.ts +0 -0
- /package/{catalog → settings}/components/stock-location-list/stock-location-list-bulk-actions.d.ts +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Directive, EventEmitter, Component, ChangeDetectionStrategy, Input, Output, ContentChild, ViewChild, Injectable, inject, NgModule } from '@angular/core';
|
|
3
3
|
import * as i1 from '@vendure/admin-ui/core';
|
|
4
|
-
import { SelectionManager, GetZoneMembersDocument, GetCountryListDocument, ADMINISTRATOR_FRAGMENT, TypedBaseDetailComponent, getCustomFieldsDefaults, Permission, createBulkDeleteAction, TypedBaseListComponent, GetAdministratorListDocument, LogicalOperator, CHANNEL_FRAGMENT, GetChannelListDocument, COUNTRY_FRAGMENT, createUpdatedTranslatable, findTranslation, LanguageCode, PAYMENT_METHOD_FRAGMENT, configurableDefinitionToInstance, toConfigurableOperationInput, getConfigArgValue, createBulkAssignToChannelAction, AssignPaymentMethodsToChannelDocument, createBulkRemoveFromChannelAction, RemovePaymentMethodsFromChannelDocument, GetPaymentMethodListDocument, ROLE_FRAGMENT, GetRoleListDocument, GetSellerListDocument, SHIPPING_METHOD_FRAGMENT, AssignShippingMethodsToChannelDocument, RemoveShippingMethodsFromChannelDocument, GetShippingMethodListDocument, TAX_CATEGORY_FRAGMENT, GetTaxCategoryListDocument, TAX_RATE_FRAGMENT, GetTaxRateListDocument, GetZoneListDocument, DataService, NotificationService, BaseEntityResolver, PageComponent, GetProfileDetailDocument, GetGlobalSettingsDetailDocument, detailComponentWithResolver, GetSellerDetailDocument, GetChannelDetailDocument, GetAdministratorDetailDocument, GetRoleDetailDocument, GetShippingMethodDetailDocument, GetPaymentMethodDetailDocument, GetTaxCategoryDetailDocument, GetTaxRateDetailDocument, GetCountryDetailDocument, GetZoneDetailDocument, SharedModule, PageService } from '@vendure/admin-ui/core';
|
|
4
|
+
import { SelectionManager, GetZoneMembersDocument, GetCountryListDocument, ADMINISTRATOR_FRAGMENT, TypedBaseDetailComponent, getCustomFieldsDefaults, Permission, createBulkDeleteAction, TypedBaseListComponent, GetAdministratorListDocument, LogicalOperator, CHANNEL_FRAGMENT, GetChannelListDocument, COUNTRY_FRAGMENT, createUpdatedTranslatable, findTranslation, LanguageCode, PAYMENT_METHOD_FRAGMENT, configurableDefinitionToInstance, toConfigurableOperationInput, getConfigArgValue, createBulkAssignToChannelAction, AssignPaymentMethodsToChannelDocument, createBulkRemoveFromChannelAction, RemovePaymentMethodsFromChannelDocument, GetPaymentMethodListDocument, ROLE_FRAGMENT, GetRoleListDocument, GetSellerListDocument, SHIPPING_METHOD_FRAGMENT, AssignShippingMethodsToChannelDocument, RemoveShippingMethodsFromChannelDocument, GetShippingMethodListDocument, CreateStockLocationDocument, UpdateStockLocationDocument, DeleteStockLocationsDocument, DeletionResult, AssignStockLocationsToChannelDocument, RemoveStockLocationsFromChannelDocument, GetStockLocationListDocument, TAX_CATEGORY_FRAGMENT, GetTaxCategoryListDocument, TAX_RATE_FRAGMENT, GetTaxRateListDocument, GetZoneListDocument, DataService, NotificationService, BaseEntityResolver, PageComponent, GetProfileDetailDocument, GetGlobalSettingsDetailDocument, detailComponentWithResolver, GetSellerDetailDocument, GetChannelDetailDocument, GetAdministratorDetailDocument, GetRoleDetailDocument, GetShippingMethodDetailDocument, GetPaymentMethodDetailDocument, GetTaxCategoryDetailDocument, GetTaxRateDetailDocument, GetCountryDetailDocument, GetZoneDetailDocument, GetStockLocationDetailDocument, SharedModule, PageService } from '@vendure/admin-ui/core';
|
|
5
5
|
import { gql } from 'apollo-angular';
|
|
6
6
|
import { take, takeUntil, startWith, map, withLatestFrom, mergeMap, tap, switchMap as switchMap$1, distinctUntilChanged, mapTo } from 'rxjs/operators';
|
|
7
7
|
import * as i2$1 from '@angular/forms';
|
|
@@ -2414,6 +2414,274 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImpor
|
|
|
2414
2414
|
args: [{ selector: 'vdr-shipping-method-list', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vdr-page-block>\r\n <vdr-action-bar>\r\n <vdr-ab-left>\r\n <vdr-language-selector\r\n [availableLanguageCodes]=\"availableLanguages$ | async\"\r\n [currentLanguageCode]=\"contentLanguage$ | async\"\r\n (languageCodeChange)=\"setLanguage($event)\"\r\n ></vdr-language-selector\r\n ></vdr-ab-left>\r\n <vdr-ab-right>\r\n <vdr-action-bar-items locationId=\"shipping-method-list\"></vdr-action-bar-items>\r\n <a\r\n class=\"btn btn-primary\"\r\n *vdrIfPermissions=\"['CreateSettings', 'CreateShippingMethod']\"\r\n [routerLink]=\"['./', 'create']\"\r\n >\r\n <clr-icon shape=\"plus\"></clr-icon>\r\n {{ 'settings.create-new-shipping-method' | translate }}\r\n </a>\r\n </vdr-ab-right>\r\n </vdr-action-bar>\r\n</vdr-page-block>\r\n<vdr-data-table-2\r\n id=\"shipping-method-list\"\r\n [items]=\"items$ | async\"\r\n [itemsPerPage]=\"itemsPerPage$ | async\"\r\n [totalItems]=\"totalItems$ | async\"\r\n [currentPage]=\"currentPage$ | async\"\r\n [filters]=\"filters\"\r\n (pageChange)=\"setPageNumber($event)\"\r\n (itemsPerPageChange)=\"setItemsPerPage($event)\"\r\n>\r\n <vdr-bulk-action-menu\r\n locationId=\"shipping-method-list\"\r\n [hostComponent]=\"this\"\r\n [selectionManager]=\"selectionManager\"\r\n />\r\n <vdr-dt2-search\r\n [searchTermControl]=\"searchTermControl\"\r\n [searchTermPlaceholder]=\"'catalog.filter-by-name' | translate\"\r\n />\r\n <vdr-dt2-column [heading]=\"'common.id' | translate\" id=\"id\" [hiddenByDefault]=\"true\">\r\n <ng-template let-shippingMethod=\"item\">\r\n {{ shippingMethod.id }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column\r\n [heading]=\"'common.created-at' | translate\" id=\"created-at\"\r\n [hiddenByDefault]=\"true\"\r\n [sort]=\"sorts.get('createdAt')\"\r\n >\r\n <ng-template let-shippingMethod=\"item\">\r\n {{ shippingMethod.createdAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column\r\n [heading]=\"'common.updated-at' | translate\" id=\"updated-at\"\r\n [hiddenByDefault]=\"true\"\r\n [sort]=\"sorts.get('updatedAt')\"\r\n >\r\n <ng-template let-shippingMethod=\"item\">\r\n {{ shippingMethod.updatedAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'common.name' | translate\" id=\"name\" [optional]=\"false\" [sort]=\"sorts.get('name')\">\r\n <ng-template let-shippingMethod=\"item\">\r\n <a class=\"button-ghost\" [routerLink]=\"['./', shippingMethod.id]\"\r\n ><span>{{ shippingMethod.name }}</span>\r\n <clr-icon shape=\"arrow right\"></clr-icon>\r\n </a>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'common.code' | translate\" id=\"code\" [sort]=\"sorts.get('code')\">\r\n <ng-template let-shippingMethod=\"item\">\r\n {{ shippingMethod.code }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column\r\n [heading]=\"'common.description' | translate\" id=\"description\"\r\n [sort]=\"sorts.get('description')\"\r\n [hiddenByDefault]=\"true\"\r\n >\r\n <ng-template let-shippingMethod=\"item\">\r\n {{ shippingMethod.description }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'settings.fulfillment-handler' | translate\" id=\"fulfillment-handler\" [sort]=\"sorts.get('fulfillmentHandlerCode')\">\r\n <ng-template let-shippingMethod=\"item\">\r\n {{ shippingMethod.fulfillmentHandlerCode }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-custom-field-column\r\n *ngFor=\"let customField of customFields\"\r\n [customField]=\"customField\"\r\n [sorts]=\"sorts\"\r\n />\r\n</vdr-data-table-2>\r\n" }]
|
|
2415
2415
|
}], ctorParameters: function () { return []; } });
|
|
2416
2416
|
|
|
2417
|
+
const STOCK_LOCATION_DETAIL_FRAGMENT = gql `
|
|
2418
|
+
fragment StockLocationDetail on StockLocation {
|
|
2419
|
+
id
|
|
2420
|
+
createdAt
|
|
2421
|
+
updatedAt
|
|
2422
|
+
name
|
|
2423
|
+
description
|
|
2424
|
+
}
|
|
2425
|
+
`;
|
|
2426
|
+
const GET_STOCK_LOCATION_DETAIL = gql `
|
|
2427
|
+
query GetStockLocationDetail($id: ID!) {
|
|
2428
|
+
stockLocation(id: $id) {
|
|
2429
|
+
...StockLocationDetail
|
|
2430
|
+
}
|
|
2431
|
+
}
|
|
2432
|
+
${STOCK_LOCATION_DETAIL_FRAGMENT}
|
|
2433
|
+
`;
|
|
2434
|
+
const CREATE_STOCK_LOCATION = gql `
|
|
2435
|
+
mutation CreateStockLocation($input: CreateStockLocationInput!) {
|
|
2436
|
+
createStockLocation(input: $input) {
|
|
2437
|
+
...StockLocationDetail
|
|
2438
|
+
}
|
|
2439
|
+
}
|
|
2440
|
+
${STOCK_LOCATION_DETAIL_FRAGMENT}
|
|
2441
|
+
`;
|
|
2442
|
+
const UPDATE_STOCK_LOCATION = gql `
|
|
2443
|
+
mutation UpdateStockLocation($input: UpdateStockLocationInput!) {
|
|
2444
|
+
updateStockLocation(input: $input) {
|
|
2445
|
+
...StockLocationDetail
|
|
2446
|
+
}
|
|
2447
|
+
}
|
|
2448
|
+
${STOCK_LOCATION_DETAIL_FRAGMENT}
|
|
2449
|
+
`;
|
|
2450
|
+
class StockLocationDetailComponent extends TypedBaseDetailComponent {
|
|
2451
|
+
constructor(changeDetector, dataService, formBuilder, notificationService) {
|
|
2452
|
+
super();
|
|
2453
|
+
this.changeDetector = changeDetector;
|
|
2454
|
+
this.dataService = dataService;
|
|
2455
|
+
this.formBuilder = formBuilder;
|
|
2456
|
+
this.notificationService = notificationService;
|
|
2457
|
+
this.customFields = this.getCustomFieldConfig('StockLocation');
|
|
2458
|
+
this.detailForm = this.formBuilder.group({
|
|
2459
|
+
name: ['', Validators.required],
|
|
2460
|
+
description: [''],
|
|
2461
|
+
customFields: this.formBuilder.group(getCustomFieldsDefaults(this.customFields)),
|
|
2462
|
+
});
|
|
2463
|
+
}
|
|
2464
|
+
ngOnInit() {
|
|
2465
|
+
this.init();
|
|
2466
|
+
}
|
|
2467
|
+
ngOnDestroy() {
|
|
2468
|
+
this.destroy();
|
|
2469
|
+
}
|
|
2470
|
+
create() {
|
|
2471
|
+
if (!this.detailForm.dirty) {
|
|
2472
|
+
return;
|
|
2473
|
+
}
|
|
2474
|
+
const { name, description, customFields } = this.detailForm.value;
|
|
2475
|
+
if (!name) {
|
|
2476
|
+
return;
|
|
2477
|
+
}
|
|
2478
|
+
const input = {
|
|
2479
|
+
name,
|
|
2480
|
+
description,
|
|
2481
|
+
customFields,
|
|
2482
|
+
};
|
|
2483
|
+
this.dataService.mutate(CreateStockLocationDocument, { input }).subscribe(data => {
|
|
2484
|
+
this.notificationService.success(marker('common.notify-create-success'), {
|
|
2485
|
+
entity: 'StockLocation',
|
|
2486
|
+
});
|
|
2487
|
+
this.detailForm.markAsPristine();
|
|
2488
|
+
this.changeDetector.markForCheck();
|
|
2489
|
+
this.router.navigate(['../', data.createStockLocation.id], { relativeTo: this.route });
|
|
2490
|
+
}, err => {
|
|
2491
|
+
this.notificationService.error(marker('common.notify-create-error'), {
|
|
2492
|
+
entity: 'StockLocation',
|
|
2493
|
+
});
|
|
2494
|
+
});
|
|
2495
|
+
}
|
|
2496
|
+
save() {
|
|
2497
|
+
if (!this.detailForm.dirty) {
|
|
2498
|
+
return;
|
|
2499
|
+
}
|
|
2500
|
+
const formValue = this.detailForm.value;
|
|
2501
|
+
this.entity$
|
|
2502
|
+
.pipe(take(1), mergeMap(taxRate => {
|
|
2503
|
+
const input = {
|
|
2504
|
+
id: taxRate.id,
|
|
2505
|
+
name: formValue.name,
|
|
2506
|
+
description: formValue.description,
|
|
2507
|
+
customFields: formValue.customFields,
|
|
2508
|
+
};
|
|
2509
|
+
return this.dataService.mutate(UpdateStockLocationDocument, { input });
|
|
2510
|
+
}))
|
|
2511
|
+
.subscribe(data => {
|
|
2512
|
+
this.notificationService.success(marker('common.notify-update-success'), {
|
|
2513
|
+
entity: 'StockLocation',
|
|
2514
|
+
});
|
|
2515
|
+
this.detailForm.markAsPristine();
|
|
2516
|
+
this.changeDetector.markForCheck();
|
|
2517
|
+
}, err => {
|
|
2518
|
+
this.notificationService.error(marker('common.notify-update-error'), {
|
|
2519
|
+
entity: 'StockLocation',
|
|
2520
|
+
});
|
|
2521
|
+
});
|
|
2522
|
+
}
|
|
2523
|
+
/**
|
|
2524
|
+
* Update the form values when the entity changes.
|
|
2525
|
+
*/
|
|
2526
|
+
setFormValues(entity) {
|
|
2527
|
+
this.detailForm.patchValue({
|
|
2528
|
+
name: entity.name,
|
|
2529
|
+
description: entity.description,
|
|
2530
|
+
});
|
|
2531
|
+
if (this.customFields.length) {
|
|
2532
|
+
this.setCustomFieldFormValues(this.customFields, this.detailForm.get('customFields'), entity);
|
|
2533
|
+
}
|
|
2534
|
+
}
|
|
2535
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: StockLocationDetailComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.DataService }, { token: i2$1.FormBuilder }, { token: i1.NotificationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2536
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", type: StockLocationDetailComponent, selector: "vdr-stock-location-detail", usesInheritance: true, ngImport: i0, template: "<vdr-page-block>\r\n <vdr-action-bar>\r\n <vdr-ab-left></vdr-ab-left>\r\n\r\n <vdr-ab-right>\r\n <vdr-action-bar-items locationId=\"stock-location-detail\"></vdr-action-bar-items>\r\n <button\r\n class=\"btn btn-primary\"\r\n *ngIf=\"isNew$ | async; else updateButton\"\r\n (click)=\"create()\"\r\n [disabled]=\"detailForm.invalid || detailForm.pristine\"\r\n >\r\n {{ 'common.create' | translate }}\r\n </button>\r\n <ng-template #updateButton>\r\n <button\r\n class=\"btn btn-primary\"\r\n (click)=\"save()\"\r\n [disabled]=\"detailForm.invalid || detailForm.pristine\"\r\n *vdrIfPermissions=\"'UpdateStockLocation'\"\r\n >\r\n {{ 'common.update' | translate }}\r\n </button>\r\n </ng-template>\r\n </vdr-ab-right>\r\n </vdr-action-bar>\r\n</vdr-page-block>\r\n\r\n<form class=\"form\" [formGroup]=\"detailForm\">\r\n <vdr-page-detail-layout>\r\n <vdr-page-detail-sidebar>\r\n <vdr-card *ngIf=\"entity$ | async as entity\">\r\n <vdr-page-entity-info [entity]=\"entity\" />\r\n </vdr-card>\r\n </vdr-page-detail-sidebar>\r\n <vdr-page-block>\r\n <vdr-card>\r\n <div class=\"form-grid\">\r\n <vdr-form-field [label]=\"'common.name' | translate\" for=\"name\">\r\n <input\r\n id=\"name\"\r\n type=\"text\"\r\n formControlName=\"name\"\r\n [readonly]=\"!('UpdateStockLocation' | hasPermission)\"\r\n />\r\n </vdr-form-field>\r\n <vdr-form-field\r\n class=\"form-grid-span\"\r\n [label]=\"'common.description' | translate\"\r\n for=\"slug\"\r\n [errors]=\"{ pattern: 'catalog.slug-pattern-error' | translate }\"\r\n >\r\n <vdr-rich-text-editor\r\n formControlName=\"description\"\r\n [readonly]=\"!('UpdateStockLocation' | hasPermission)\"\r\n ></vdr-rich-text-editor>\r\n </vdr-form-field>\r\n </div>\r\n </vdr-card>\r\n <vdr-card\r\n formGroupName=\"customFields\"\r\n *ngIf=\"customFields.length\"\r\n [title]=\"'common.custom-fields' | translate\"\r\n >\r\n <vdr-tabbed-custom-fields\r\n entityName=\"StockLocation\"\r\n [customFields]=\"customFields\"\r\n [customFieldsFormGroup]=\"detailForm.get('customFields')\"\r\n ></vdr-tabbed-custom-fields>\r\n </vdr-card>\r\n <vdr-custom-detail-component-host\r\n locationId=\"stock-location-detail\"\r\n [entity$]=\"entity$\"\r\n [detailForm]=\"detailForm\"\r\n ></vdr-custom-detail-component-host>\r\n </vdr-page-block>\r\n </vdr-page-detail-layout>\r\n</form>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "component", type: i1.ActionBarComponent, selector: "vdr-action-bar" }, { kind: "component", type: i1.ActionBarLeftComponent, selector: "vdr-ab-left", inputs: ["grow"] }, { kind: "component", type: i1.ActionBarRightComponent, selector: "vdr-ab-right", inputs: ["grow"] }, { kind: "component", type: i1.FormFieldComponent, selector: "vdr-form-field", inputs: ["label", "for", "tooltip", "errors", "readOnlyToggle"] }, { kind: "directive", type: i1.FormFieldControlDirective, selector: "input, textarea, select" }, { kind: "component", type: i1.RichTextEditorComponent, selector: "vdr-rich-text-editor", inputs: ["label", "readonly"] }, { kind: "directive", type: i1.IfPermissionsDirective, selector: "[vdrIfPermissions]", inputs: ["vdrIfPermissions", "vdrIfPermissionsElse"] }, { kind: "component", type: i1.ActionBarItemsComponent, selector: "vdr-action-bar-items", inputs: ["locationId"] }, { kind: "component", type: i1.TabbedCustomFieldsComponent, selector: "vdr-tabbed-custom-fields", inputs: ["entityName", "customFields", "customFieldsFormGroup", "readonly", "compact", "showLabel"] }, { kind: "component", type: i1.CustomDetailComponentHostComponent, selector: "vdr-custom-detail-component-host", inputs: ["locationId", "entity$", "detailForm"] }, { kind: "component", type: i1.PageBlockComponent, selector: "vdr-page-block" }, { kind: "component", type: i1.PageEntityInfoComponent, selector: "vdr-page-entity-info", inputs: ["entity"] }, { kind: "component", type: i1.PageDetailLayoutComponent, selector: "vdr-page-detail-layout" }, { kind: "component", type: i1.PageDetailSidebarComponent, selector: "vdr-page-detail-sidebar" }, { kind: "component", type: i1.CardComponent, selector: "vdr-card", inputs: ["title", "paddingX"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.HasPermissionPipe, name: "hasPermission" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2537
|
+
}
|
|
2538
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: StockLocationDetailComponent, decorators: [{
|
|
2539
|
+
type: Component,
|
|
2540
|
+
args: [{ selector: 'vdr-stock-location-detail', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vdr-page-block>\r\n <vdr-action-bar>\r\n <vdr-ab-left></vdr-ab-left>\r\n\r\n <vdr-ab-right>\r\n <vdr-action-bar-items locationId=\"stock-location-detail\"></vdr-action-bar-items>\r\n <button\r\n class=\"btn btn-primary\"\r\n *ngIf=\"isNew$ | async; else updateButton\"\r\n (click)=\"create()\"\r\n [disabled]=\"detailForm.invalid || detailForm.pristine\"\r\n >\r\n {{ 'common.create' | translate }}\r\n </button>\r\n <ng-template #updateButton>\r\n <button\r\n class=\"btn btn-primary\"\r\n (click)=\"save()\"\r\n [disabled]=\"detailForm.invalid || detailForm.pristine\"\r\n *vdrIfPermissions=\"'UpdateStockLocation'\"\r\n >\r\n {{ 'common.update' | translate }}\r\n </button>\r\n </ng-template>\r\n </vdr-ab-right>\r\n </vdr-action-bar>\r\n</vdr-page-block>\r\n\r\n<form class=\"form\" [formGroup]=\"detailForm\">\r\n <vdr-page-detail-layout>\r\n <vdr-page-detail-sidebar>\r\n <vdr-card *ngIf=\"entity$ | async as entity\">\r\n <vdr-page-entity-info [entity]=\"entity\" />\r\n </vdr-card>\r\n </vdr-page-detail-sidebar>\r\n <vdr-page-block>\r\n <vdr-card>\r\n <div class=\"form-grid\">\r\n <vdr-form-field [label]=\"'common.name' | translate\" for=\"name\">\r\n <input\r\n id=\"name\"\r\n type=\"text\"\r\n formControlName=\"name\"\r\n [readonly]=\"!('UpdateStockLocation' | hasPermission)\"\r\n />\r\n </vdr-form-field>\r\n <vdr-form-field\r\n class=\"form-grid-span\"\r\n [label]=\"'common.description' | translate\"\r\n for=\"slug\"\r\n [errors]=\"{ pattern: 'catalog.slug-pattern-error' | translate }\"\r\n >\r\n <vdr-rich-text-editor\r\n formControlName=\"description\"\r\n [readonly]=\"!('UpdateStockLocation' | hasPermission)\"\r\n ></vdr-rich-text-editor>\r\n </vdr-form-field>\r\n </div>\r\n </vdr-card>\r\n <vdr-card\r\n formGroupName=\"customFields\"\r\n *ngIf=\"customFields.length\"\r\n [title]=\"'common.custom-fields' | translate\"\r\n >\r\n <vdr-tabbed-custom-fields\r\n entityName=\"StockLocation\"\r\n [customFields]=\"customFields\"\r\n [customFieldsFormGroup]=\"detailForm.get('customFields')\"\r\n ></vdr-tabbed-custom-fields>\r\n </vdr-card>\r\n <vdr-custom-detail-component-host\r\n locationId=\"stock-location-detail\"\r\n [entity$]=\"entity$\"\r\n [detailForm]=\"detailForm\"\r\n ></vdr-custom-detail-component-host>\r\n </vdr-page-block>\r\n </vdr-page-detail-layout>\r\n</form>\r\n" }]
|
|
2541
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.DataService }, { type: i2$1.FormBuilder }, { type: i1.NotificationService }]; } });
|
|
2542
|
+
|
|
2543
|
+
const DELETE_STOCK_LOCATIONS = gql `
|
|
2544
|
+
mutation DeleteStockLocations($input: [DeleteStockLocationInput!]!) {
|
|
2545
|
+
deleteStockLocations(input: $input) {
|
|
2546
|
+
result
|
|
2547
|
+
message
|
|
2548
|
+
}
|
|
2549
|
+
}
|
|
2550
|
+
`;
|
|
2551
|
+
const ASSIGN_STOCK_LOCATIONS_TO_CHANNEL = gql `
|
|
2552
|
+
mutation AssignStockLocationsToChannel($input: AssignStockLocationsToChannelInput!) {
|
|
2553
|
+
assignStockLocationsToChannel(input: $input) {
|
|
2554
|
+
id
|
|
2555
|
+
name
|
|
2556
|
+
}
|
|
2557
|
+
}
|
|
2558
|
+
`;
|
|
2559
|
+
const REMOVE_STOCK_LOCATIONS_FROM_CHANNEL = gql `
|
|
2560
|
+
mutation RemoveStockLocationsFromChannel($input: RemoveStockLocationsFromChannelInput!) {
|
|
2561
|
+
removeStockLocationsFromChannel(input: $input) {
|
|
2562
|
+
id
|
|
2563
|
+
name
|
|
2564
|
+
}
|
|
2565
|
+
}
|
|
2566
|
+
`;
|
|
2567
|
+
const deleteStockLocationsBulkAction = createBulkDeleteAction({
|
|
2568
|
+
location: 'stock-location-list',
|
|
2569
|
+
requiresPermission: userPermissions => userPermissions.includes(Permission.DeleteStockLocation) ||
|
|
2570
|
+
userPermissions.includes(Permission.DeleteCatalog),
|
|
2571
|
+
getItemName: item => item.name,
|
|
2572
|
+
bulkDelete: (dataService, ids) => dataService
|
|
2573
|
+
.mutate(DeleteStockLocationsDocument, {
|
|
2574
|
+
input: ids.map(id => ({ id })),
|
|
2575
|
+
})
|
|
2576
|
+
.pipe(map(res => res.deleteStockLocations)),
|
|
2577
|
+
shouldRetryItem: response => response.result === DeletionResult.NOT_DELETED,
|
|
2578
|
+
});
|
|
2579
|
+
const assignStockLocationsToChannelBulkAction = createBulkAssignToChannelAction({
|
|
2580
|
+
location: 'stock-location-list',
|
|
2581
|
+
requiresPermission: userPermissions => userPermissions.includes(Permission.UpdateCatalog) ||
|
|
2582
|
+
userPermissions.includes(Permission.UpdateStockLocation),
|
|
2583
|
+
getItemName: item => item.name,
|
|
2584
|
+
bulkAssignToChannel: (dataService, stockLocationIds, channelId) => dataService
|
|
2585
|
+
.mutate(AssignStockLocationsToChannelDocument, {
|
|
2586
|
+
input: {
|
|
2587
|
+
channelId,
|
|
2588
|
+
stockLocationIds,
|
|
2589
|
+
},
|
|
2590
|
+
})
|
|
2591
|
+
.pipe(map(res => res.assignStockLocationsToChannel)),
|
|
2592
|
+
});
|
|
2593
|
+
const removeStockLocationsFromChannelBulkAction = createBulkRemoveFromChannelAction({
|
|
2594
|
+
location: 'stock-location-list',
|
|
2595
|
+
requiresPermission: userPermissions => userPermissions.includes(Permission.DeleteCatalog) ||
|
|
2596
|
+
userPermissions.includes(Permission.DeleteStockLocation),
|
|
2597
|
+
getItemName: item => item.name,
|
|
2598
|
+
bulkRemoveFromChannel: (dataService, stockLocationIds, channelId) => dataService
|
|
2599
|
+
.mutate(RemoveStockLocationsFromChannelDocument, {
|
|
2600
|
+
input: {
|
|
2601
|
+
channelId,
|
|
2602
|
+
stockLocationIds,
|
|
2603
|
+
},
|
|
2604
|
+
})
|
|
2605
|
+
.pipe(map(res => res.removeStockLocationsFromChannel)),
|
|
2606
|
+
});
|
|
2607
|
+
|
|
2608
|
+
const GET_STOCK_LOCATION_LIST = gql `
|
|
2609
|
+
query GetStockLocationList($options: StockLocationListOptions) {
|
|
2610
|
+
stockLocations(options: $options) {
|
|
2611
|
+
items {
|
|
2612
|
+
...StockLocationListItem
|
|
2613
|
+
}
|
|
2614
|
+
totalItems
|
|
2615
|
+
}
|
|
2616
|
+
}
|
|
2617
|
+
fragment StockLocationListItem on StockLocation {
|
|
2618
|
+
id
|
|
2619
|
+
createdAt
|
|
2620
|
+
updatedAt
|
|
2621
|
+
name
|
|
2622
|
+
description
|
|
2623
|
+
}
|
|
2624
|
+
`;
|
|
2625
|
+
class StockLocationListComponent extends TypedBaseListComponent {
|
|
2626
|
+
constructor() {
|
|
2627
|
+
super();
|
|
2628
|
+
this.customFields = this.getCustomFieldConfig('StockLocation');
|
|
2629
|
+
this.filters = this.createFilterCollection()
|
|
2630
|
+
.addIdFilter()
|
|
2631
|
+
.addDateFilters()
|
|
2632
|
+
.addFilters([
|
|
2633
|
+
{
|
|
2634
|
+
name: 'enabled',
|
|
2635
|
+
type: { kind: 'text' },
|
|
2636
|
+
label: marker('common.enabled'),
|
|
2637
|
+
filterField: 'name',
|
|
2638
|
+
},
|
|
2639
|
+
{
|
|
2640
|
+
name: 'sku',
|
|
2641
|
+
type: { kind: 'text' },
|
|
2642
|
+
label: marker('catalog.sku'),
|
|
2643
|
+
filterField: 'description',
|
|
2644
|
+
},
|
|
2645
|
+
])
|
|
2646
|
+
.addCustomFieldFilters(this.customFields)
|
|
2647
|
+
.connectToRoute(this.route);
|
|
2648
|
+
this.sorts = this.createSortCollection()
|
|
2649
|
+
.addSorts([
|
|
2650
|
+
{ name: 'id' },
|
|
2651
|
+
{ name: 'createdAt' },
|
|
2652
|
+
{ name: 'updatedAt' },
|
|
2653
|
+
{ name: 'name' },
|
|
2654
|
+
{ name: 'description' },
|
|
2655
|
+
])
|
|
2656
|
+
.addCustomFieldSorts(this.customFields)
|
|
2657
|
+
.connectToRoute(this.route);
|
|
2658
|
+
this.configure({
|
|
2659
|
+
document: GetStockLocationListDocument,
|
|
2660
|
+
getItems: data => data.stockLocations,
|
|
2661
|
+
setVariables: (skip, take) => ({
|
|
2662
|
+
options: {
|
|
2663
|
+
skip,
|
|
2664
|
+
take,
|
|
2665
|
+
filter: {
|
|
2666
|
+
name: {
|
|
2667
|
+
contains: this.searchTermControl.value,
|
|
2668
|
+
},
|
|
2669
|
+
...this.filters.createFilterInput(),
|
|
2670
|
+
},
|
|
2671
|
+
sort: this.sorts.createSortInput(),
|
|
2672
|
+
},
|
|
2673
|
+
}),
|
|
2674
|
+
refreshListOnChanges: [this.sorts.valueChanges, this.filters.valueChanges],
|
|
2675
|
+
});
|
|
2676
|
+
}
|
|
2677
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: StockLocationListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2678
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", type: StockLocationListComponent, selector: "vdr-stock-location-list", usesInheritance: true, ngImport: i0, template: "<vdr-page-block>\r\n <vdr-action-bar>\r\n <vdr-ab-left> </vdr-ab-left>\r\n <vdr-ab-right>\r\n <vdr-action-bar-items locationId=\"stock-location-list\"></vdr-action-bar-items>\r\n <a\r\n class=\"button primary\"\r\n *vdrIfPermissions=\"['CreateStockLocation']\"\r\n [routerLink]=\"['./', 'create']\"\r\n >\r\n <clr-icon shape=\"plus\"></clr-icon>\r\n {{ 'catalog.create-new-stock-location' | translate }}\r\n </a>\r\n </vdr-ab-right>\r\n </vdr-action-bar>\r\n</vdr-page-block>\r\n<vdr-data-table-2\r\n class=\"mt-2\"\r\n id=\"stock-location-list\"\r\n [items]=\"items$ | async\"\r\n [itemsPerPage]=\"itemsPerPage$ | async\"\r\n [totalItems]=\"totalItems$ | async\"\r\n [currentPage]=\"currentPage$ | async\"\r\n [filters]=\"filters\"\r\n (pageChange)=\"setPageNumber($event)\"\r\n (itemsPerPageChange)=\"setItemsPerPage($event)\"\r\n>\r\n <vdr-bulk-action-menu\r\n locationId=\"stock-location-list\"\r\n [hostComponent]=\"this\"\r\n [selectionManager]=\"selectionManager\"\r\n />\r\n <vdr-dt2-search\r\n [searchTermControl]=\"searchTermControl\"\r\n [searchTermPlaceholder]=\"'catalog.filter-by-name' | translate\"\r\n />\r\n <vdr-dt2-column [heading]=\"'common.id' | translate\" id=\"id\" [hiddenByDefault]=\"true\" [sort]=\"sorts.get('id')\">\r\n <ng-template let-stockLocation=\"item\">\r\n {{ stockLocation.id }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column\r\n [heading]=\"'common.created-at' | translate\" id=\"created-at\"\r\n [hiddenByDefault]=\"true\"\r\n [sort]=\"sorts.get('createdAt')\"\r\n >\r\n <ng-template let-stockLocation=\"item\">\r\n {{ stockLocation.createdAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column\r\n [heading]=\"'common.updated-at' | translate\" id=\"updated-at\"\r\n [hiddenByDefault]=\"true\"\r\n [sort]=\"sorts.get('updatedAt')\"\r\n >\r\n <ng-template let-stockLocation=\"item\">\r\n {{ stockLocation.updatedAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'common.name' | translate\" id=\"name\" [optional]=\"false\" [sort]=\"sorts.get('name')\">\r\n <ng-template let-stockLocation=\"item\">\r\n <a class=\"button-ghost\" [routerLink]=\"['./', stockLocation.id]\"\r\n ><span>{{ stockLocation.name }}</span\r\n ><clr-icon shape=\"arrow right\"\r\n /></a>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'common.description' | translate\" id=\"description\" [sort]=\"sorts.get('description')\">\r\n <ng-template let-stockLocation=\"item\">\r\n <div class=\"description\" [innerHTML]=\"stockLocation.description\"></div>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-custom-field-column\r\n *ngFor=\"let field of customFields\"\r\n [customField]=\"field\"\r\n [sorts]=\"sorts\" />\r\n</vdr-data-table-2>\r\n", styles: ["::ng-deep .description>p{margin-top:0!important}\n"], dependencies: [{ kind: "directive", type: i3.ClrIconCustomTag, selector: "clr-icon" }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i1.ActionBarComponent, selector: "vdr-action-bar" }, { kind: "component", type: i1.ActionBarLeftComponent, selector: "vdr-ab-left", inputs: ["grow"] }, { kind: "component", type: i1.ActionBarRightComponent, selector: "vdr-ab-right", inputs: ["grow"] }, { kind: "directive", type: i1.IfPermissionsDirective, selector: "[vdrIfPermissions]", inputs: ["vdrIfPermissions", "vdrIfPermissionsElse"] }, { kind: "component", type: i1.ActionBarItemsComponent, selector: "vdr-action-bar-items", inputs: ["locationId"] }, { kind: "component", type: i1.BulkActionMenuComponent, selector: "vdr-bulk-action-menu", inputs: ["locationId", "selectionManager", "hostComponent"] }, { kind: "component", type: i1.DataTable2Component, selector: "vdr-data-table-2", inputs: ["id", "items", "itemsPerPage", "currentPage", "totalItems", "emptyStateLabel", "filters", "activeIndex"], outputs: ["pageChange", "itemsPerPageChange"] }, { kind: "component", type: i1.DataTable2ColumnComponent, selector: "vdr-dt2-column", inputs: ["id", "expand", "heading", "align", "sort", "optional", "hiddenByDefault", "orderable"], exportAs: ["row"] }, { kind: "component", type: i1.DataTable2SearchComponent, selector: "vdr-dt2-search", inputs: ["searchTermControl", "searchTermPlaceholder"] }, { kind: "component", type: i1.DataTableCustomFieldColumnComponent, selector: "vdr-dt2-custom-field-column", inputs: ["customField", "sorts"], exportAs: ["row"] }, { kind: "component", type: i1.PageBlockComponent, selector: "vdr-page-block" }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.LocaleDatePipe, name: "localeDate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2679
|
+
}
|
|
2680
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: StockLocationListComponent, decorators: [{
|
|
2681
|
+
type: Component,
|
|
2682
|
+
args: [{ selector: 'vdr-stock-location-list', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vdr-page-block>\r\n <vdr-action-bar>\r\n <vdr-ab-left> </vdr-ab-left>\r\n <vdr-ab-right>\r\n <vdr-action-bar-items locationId=\"stock-location-list\"></vdr-action-bar-items>\r\n <a\r\n class=\"button primary\"\r\n *vdrIfPermissions=\"['CreateStockLocation']\"\r\n [routerLink]=\"['./', 'create']\"\r\n >\r\n <clr-icon shape=\"plus\"></clr-icon>\r\n {{ 'catalog.create-new-stock-location' | translate }}\r\n </a>\r\n </vdr-ab-right>\r\n </vdr-action-bar>\r\n</vdr-page-block>\r\n<vdr-data-table-2\r\n class=\"mt-2\"\r\n id=\"stock-location-list\"\r\n [items]=\"items$ | async\"\r\n [itemsPerPage]=\"itemsPerPage$ | async\"\r\n [totalItems]=\"totalItems$ | async\"\r\n [currentPage]=\"currentPage$ | async\"\r\n [filters]=\"filters\"\r\n (pageChange)=\"setPageNumber($event)\"\r\n (itemsPerPageChange)=\"setItemsPerPage($event)\"\r\n>\r\n <vdr-bulk-action-menu\r\n locationId=\"stock-location-list\"\r\n [hostComponent]=\"this\"\r\n [selectionManager]=\"selectionManager\"\r\n />\r\n <vdr-dt2-search\r\n [searchTermControl]=\"searchTermControl\"\r\n [searchTermPlaceholder]=\"'catalog.filter-by-name' | translate\"\r\n />\r\n <vdr-dt2-column [heading]=\"'common.id' | translate\" id=\"id\" [hiddenByDefault]=\"true\" [sort]=\"sorts.get('id')\">\r\n <ng-template let-stockLocation=\"item\">\r\n {{ stockLocation.id }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column\r\n [heading]=\"'common.created-at' | translate\" id=\"created-at\"\r\n [hiddenByDefault]=\"true\"\r\n [sort]=\"sorts.get('createdAt')\"\r\n >\r\n <ng-template let-stockLocation=\"item\">\r\n {{ stockLocation.createdAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column\r\n [heading]=\"'common.updated-at' | translate\" id=\"updated-at\"\r\n [hiddenByDefault]=\"true\"\r\n [sort]=\"sorts.get('updatedAt')\"\r\n >\r\n <ng-template let-stockLocation=\"item\">\r\n {{ stockLocation.updatedAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'common.name' | translate\" id=\"name\" [optional]=\"false\" [sort]=\"sorts.get('name')\">\r\n <ng-template let-stockLocation=\"item\">\r\n <a class=\"button-ghost\" [routerLink]=\"['./', stockLocation.id]\"\r\n ><span>{{ stockLocation.name }}</span\r\n ><clr-icon shape=\"arrow right\"\r\n /></a>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'common.description' | translate\" id=\"description\" [sort]=\"sorts.get('description')\">\r\n <ng-template let-stockLocation=\"item\">\r\n <div class=\"description\" [innerHTML]=\"stockLocation.description\"></div>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-custom-field-column\r\n *ngFor=\"let field of customFields\"\r\n [customField]=\"field\"\r\n [sorts]=\"sorts\" />\r\n</vdr-data-table-2>\r\n", styles: ["::ng-deep .description>p{margin-top:0!important}\n"] }]
|
|
2683
|
+
}], ctorParameters: function () { return []; } });
|
|
2684
|
+
|
|
2417
2685
|
const GET_TAX_CATEGORY_DETAIL = gql `
|
|
2418
2686
|
query GetTaxCategoryDetail($id: ID!) {
|
|
2419
2687
|
taxCategory(id: $id) {
|
|
@@ -3173,6 +3441,24 @@ const createRoutes = (pageService) => [
|
|
|
3173
3441
|
},
|
|
3174
3442
|
children: pageService.getPageTabRoutes('channel-detail'),
|
|
3175
3443
|
},
|
|
3444
|
+
{
|
|
3445
|
+
path: 'stock-locations',
|
|
3446
|
+
component: PageComponent,
|
|
3447
|
+
data: {
|
|
3448
|
+
locationId: 'stock-location-list',
|
|
3449
|
+
breadcrumb: marker('breadcrumb.stock-locations'),
|
|
3450
|
+
},
|
|
3451
|
+
children: pageService.getPageTabRoutes('stock-location-list'),
|
|
3452
|
+
},
|
|
3453
|
+
{
|
|
3454
|
+
path: 'stock-locations/:id',
|
|
3455
|
+
component: PageComponent,
|
|
3456
|
+
data: {
|
|
3457
|
+
locationId: 'stock-location-list',
|
|
3458
|
+
breadcrumb: { label: marker('breadcrumb.stock-locations'), link: ['../', 'stock-locations'] },
|
|
3459
|
+
},
|
|
3460
|
+
children: pageService.getPageTabRoutes('stock-location-detail'),
|
|
3461
|
+
},
|
|
3176
3462
|
{
|
|
3177
3463
|
path: 'sellers',
|
|
3178
3464
|
component: PageComponent,
|
|
@@ -3351,6 +3637,9 @@ class SettingsModule {
|
|
|
3351
3637
|
bulkActionRegistryService.registerBulkAction(deleteCountriesBulkAction);
|
|
3352
3638
|
bulkActionRegistryService.registerBulkAction(deleteZonesBulkAction);
|
|
3353
3639
|
bulkActionRegistryService.registerBulkAction(removeZoneMembersBulkAction);
|
|
3640
|
+
bulkActionRegistryService.registerBulkAction(assignStockLocationsToChannelBulkAction);
|
|
3641
|
+
bulkActionRegistryService.registerBulkAction(removeStockLocationsFromChannelBulkAction);
|
|
3642
|
+
bulkActionRegistryService.registerBulkAction(deleteStockLocationsBulkAction);
|
|
3354
3643
|
pageService.registerPageTab({
|
|
3355
3644
|
priority: 0,
|
|
3356
3645
|
location: 'seller-list',
|
|
@@ -3618,6 +3907,30 @@ class SettingsModule {
|
|
|
3618
3907
|
route: '',
|
|
3619
3908
|
component: ProfileComponent,
|
|
3620
3909
|
});
|
|
3910
|
+
pageService.registerPageTab({
|
|
3911
|
+
priority: 0,
|
|
3912
|
+
location: 'stock-location-list',
|
|
3913
|
+
tab: marker('catalog.stock-locations'),
|
|
3914
|
+
route: '',
|
|
3915
|
+
component: StockLocationListComponent,
|
|
3916
|
+
});
|
|
3917
|
+
pageService.registerPageTab({
|
|
3918
|
+
priority: 0,
|
|
3919
|
+
location: 'stock-location-detail',
|
|
3920
|
+
tab: marker('catalog.stock-location'),
|
|
3921
|
+
route: '',
|
|
3922
|
+
component: detailComponentWithResolver({
|
|
3923
|
+
component: StockLocationDetailComponent,
|
|
3924
|
+
query: GetStockLocationDetailDocument,
|
|
3925
|
+
entityKey: 'stockLocation',
|
|
3926
|
+
getBreadcrumbs: entity => [
|
|
3927
|
+
{
|
|
3928
|
+
label: entity ? entity.name : marker('catalog.create-new-stock-location'),
|
|
3929
|
+
link: [entity?.id],
|
|
3930
|
+
},
|
|
3931
|
+
],
|
|
3932
|
+
}),
|
|
3933
|
+
});
|
|
3621
3934
|
}
|
|
3622
3935
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: SettingsModule, deps: [{ token: i1.BulkActionRegistryService }, { token: i1.PageService }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
3623
3936
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.2", ngImport: i0, type: SettingsModule, declarations: [TaxCategoryListComponent,
|
|
@@ -3651,7 +3964,9 @@ class SettingsModule {
|
|
|
3651
3964
|
ZoneMemberControlsDirective,
|
|
3652
3965
|
ProfileComponent,
|
|
3653
3966
|
TestShippingMethodsComponent,
|
|
3654
|
-
ZoneDetailComponent
|
|
3967
|
+
ZoneDetailComponent,
|
|
3968
|
+
StockLocationListComponent,
|
|
3969
|
+
StockLocationDetailComponent], imports: [SharedModule, i3$1.RouterModule] }); }
|
|
3655
3970
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: SettingsModule, providers: [
|
|
3656
3971
|
{
|
|
3657
3972
|
provide: ROUTES,
|
|
@@ -3706,6 +4021,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImpor
|
|
|
3706
4021
|
ProfileComponent,
|
|
3707
4022
|
TestShippingMethodsComponent,
|
|
3708
4023
|
ZoneDetailComponent,
|
|
4024
|
+
StockLocationListComponent,
|
|
4025
|
+
StockLocationDetailComponent,
|
|
3709
4026
|
],
|
|
3710
4027
|
}]
|
|
3711
4028
|
}], ctorParameters: function () { return [{ type: i1.BulkActionRegistryService }, { type: i1.PageService }]; } });
|
|
@@ -3716,5 +4033,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImpor
|
|
|
3716
4033
|
* Generated bundle index. Do not edit.
|
|
3717
4034
|
*/
|
|
3718
4035
|
|
|
3719
|
-
export { AddCountryToZoneDialogComponent, AdminDetailComponent, AdministratorListComponent, ChannelDetailComponent, ChannelListComponent, CountryDetailComponent, CountryListComponent, GET_ADMINISTRATOR_DETAIL, GET_ADMINISTRATOR_LIST, GET_CHANNEL_DETAIL, GET_CHANNEL_LIST, GET_COUNTRY_DETAIL, GET_COUNTRY_LIST, GET_GLOBAL_SETTINGS_DETAIL, GET_PAYMENT_METHOD_DETAIL, GET_PAYMENT_METHOD_LIST, GET_PROFILE_DETAIL, GET_ROLE_DETAIL, GET_ROLE_LIST, GET_SELLER_DETAIL, GET_SHIPPING_METHOD_DETAIL, GET_SHIPPING_METHOD_LIST, GET_TAX_CATEGORY_DETAIL, GET_TAX_CATEGORY_LIST, GET_TAX_RATE_DETAIL, GET_TAX_RATE_LIST, GET_ZONE_DETAIL, GET_ZONE_LIST, GET_ZONE_MEMBERS, GlobalSettingsComponent, PaymentMethodDetailComponent, PaymentMethodListComponent, PermissionGridComponent, ProfileComponent, ProfileResolver, RoleDetailComponent, RoleListComponent, SellerDetailComponent, SellerListComponent, SettingsModule, ShippingEligibilityTestResultComponent, ShippingMethodDetailComponent, ShippingMethodListComponent, ShippingMethodTestResultComponent, TaxCategoryDetailComponent, TaxCategoryListComponent, TaxRateDetailComponent, TaxRateListComponent, TestAddressFormComponent, TestOrderBuilderComponent, TestShippingMethodsComponent, ZoneDetailComponent, ZoneListComponent, ZoneMemberControlsDirective, ZoneMemberListComponent, ZoneMemberListHeaderDirective, assignPaymentMethodsToChannelBulkAction, assignShippingMethodsToChannelBulkAction, createRoutes, deleteAdministratorsBulkAction, deleteChannelsBulkAction, deleteCountriesBulkAction, deletePaymentMethodsBulkAction, deleteRolesBulkAction, deleteSellersBulkAction, deleteShippingMethodsBulkAction, deleteTaxCategoriesBulkAction, deleteTaxRatesBulkAction, deleteZonesBulkAction, removePaymentMethodsFromChannelBulkAction, removeShippingMethodsFromChannelBulkAction, removeZoneMembersBulkAction };
|
|
4036
|
+
export { AddCountryToZoneDialogComponent, AdminDetailComponent, AdministratorListComponent, CREATE_STOCK_LOCATION, ChannelDetailComponent, ChannelListComponent, CountryDetailComponent, CountryListComponent, GET_ADMINISTRATOR_DETAIL, GET_ADMINISTRATOR_LIST, GET_CHANNEL_DETAIL, GET_CHANNEL_LIST, GET_COUNTRY_DETAIL, GET_COUNTRY_LIST, GET_GLOBAL_SETTINGS_DETAIL, GET_PAYMENT_METHOD_DETAIL, GET_PAYMENT_METHOD_LIST, GET_PROFILE_DETAIL, GET_ROLE_DETAIL, GET_ROLE_LIST, GET_SELLER_DETAIL, GET_SHIPPING_METHOD_DETAIL, GET_SHIPPING_METHOD_LIST, GET_STOCK_LOCATION_DETAIL, GET_STOCK_LOCATION_LIST, GET_TAX_CATEGORY_DETAIL, GET_TAX_CATEGORY_LIST, GET_TAX_RATE_DETAIL, GET_TAX_RATE_LIST, GET_ZONE_DETAIL, GET_ZONE_LIST, GET_ZONE_MEMBERS, GlobalSettingsComponent, PaymentMethodDetailComponent, PaymentMethodListComponent, PermissionGridComponent, ProfileComponent, ProfileResolver, RoleDetailComponent, RoleListComponent, SellerDetailComponent, SellerListComponent, SettingsModule, ShippingEligibilityTestResultComponent, ShippingMethodDetailComponent, ShippingMethodListComponent, ShippingMethodTestResultComponent, StockLocationDetailComponent, StockLocationListComponent, TaxCategoryDetailComponent, TaxCategoryListComponent, TaxRateDetailComponent, TaxRateListComponent, TestAddressFormComponent, TestOrderBuilderComponent, TestShippingMethodsComponent, UPDATE_STOCK_LOCATION, ZoneDetailComponent, ZoneListComponent, ZoneMemberControlsDirective, ZoneMemberListComponent, ZoneMemberListHeaderDirective, assignPaymentMethodsToChannelBulkAction, assignShippingMethodsToChannelBulkAction, assignStockLocationsToChannelBulkAction, createRoutes, deleteAdministratorsBulkAction, deleteChannelsBulkAction, deleteCountriesBulkAction, deletePaymentMethodsBulkAction, deleteRolesBulkAction, deleteSellersBulkAction, deleteShippingMethodsBulkAction, deleteStockLocationsBulkAction, deleteTaxCategoriesBulkAction, deleteTaxRatesBulkAction, deleteZonesBulkAction, removePaymentMethodsFromChannelBulkAction, removeShippingMethodsFromChannelBulkAction, removeStockLocationsFromChannelBulkAction, removeZoneMembersBulkAction };
|
|
3720
4037
|
//# sourceMappingURL=vendure-admin-ui-settings.mjs.map
|