Explorar el Código

refactor(admin-ui): Rename ProductCategory references to Collection

Relates to #71
Michael Bromley hace 6 años
padre
commit
4d5935810a
Se han modificado 20 ficheros con 75 adiciones y 75 borrados
  1. 10 10
      admin-ui/src/app/catalog/catalog.module.ts
  2. 13 13
      admin-ui/src/app/catalog/catalog.routes.ts
  3. 0 0
      admin-ui/src/app/catalog/components/collection-detail/collection-detail.component.html
  4. 0 0
      admin-ui/src/app/catalog/components/collection-detail/collection-detail.component.scss
  5. 8 8
      admin-ui/src/app/catalog/components/collection-detail/collection-detail.component.ts
  6. 3 3
      admin-ui/src/app/catalog/components/collection-list/collection-list.component.html
  7. 0 0
      admin-ui/src/app/catalog/components/collection-list/collection-list.component.scss
  8. 5 5
      admin-ui/src/app/catalog/components/collection-list/collection-list.component.ts
  9. 0 0
      admin-ui/src/app/catalog/components/collection-tree/array-to-tree.spec.ts
  10. 0 0
      admin-ui/src/app/catalog/components/collection-tree/array-to-tree.ts
  11. 12 12
      admin-ui/src/app/catalog/components/collection-tree/collection-tree-node.component.html
  12. 0 0
      admin-ui/src/app/catalog/components/collection-tree/collection-tree-node.component.scss
  13. 9 9
      admin-ui/src/app/catalog/components/collection-tree/collection-tree-node.component.ts
  14. 5 0
      admin-ui/src/app/catalog/components/collection-tree/collection-tree.component.html
  15. 0 0
      admin-ui/src/app/catalog/components/collection-tree/collection-tree.component.scss
  16. 4 4
      admin-ui/src/app/catalog/components/collection-tree/collection-tree.component.ts
  17. 0 5
      admin-ui/src/app/catalog/components/product-category-tree/product-category-tree.component.html
  18. 1 1
      admin-ui/src/app/catalog/providers/routing/collection-resolver.ts
  19. 2 2
      admin-ui/src/app/core/components/main-nav/main-nav.component.html
  20. 3 3
      admin-ui/src/i18n-messages/en.json

+ 10 - 10
admin-ui/src/app/catalog/catalog.module.ts

@@ -10,16 +10,16 @@ import { AssetFileInputComponent } from './components/asset-file-input/asset-fil
 import { AssetGalleryComponent } from './components/asset-gallery/asset-gallery.component';
 import { AssetGalleryComponent } from './components/asset-gallery/asset-gallery.component';
 import { AssetListComponent } from './components/asset-list/asset-list.component';
 import { AssetListComponent } from './components/asset-list/asset-list.component';
 import { AssetPickerDialogComponent } from './components/asset-picker-dialog/asset-picker-dialog.component';
 import { AssetPickerDialogComponent } from './components/asset-picker-dialog/asset-picker-dialog.component';
+import { CollectionDetailComponent } from './components/collection-detail/collection-detail.component';
+import { CollectionListComponent } from './components/collection-list/collection-list.component';
+import { CollectionTreeNodeComponent } from './components/collection-tree/collection-tree-node.component';
+import { CollectionTreeComponent } from './components/collection-tree/collection-tree.component';
 import { CreateOptionGroupDialogComponent } from './components/create-option-group-dialog/create-option-group-dialog.component';
 import { CreateOptionGroupDialogComponent } from './components/create-option-group-dialog/create-option-group-dialog.component';
 import { CreateOptionGroupFormComponent } from './components/create-option-group-form/create-option-group-form.component';
 import { CreateOptionGroupFormComponent } from './components/create-option-group-form/create-option-group-form.component';
 import { FacetDetailComponent } from './components/facet-detail/facet-detail.component';
 import { FacetDetailComponent } from './components/facet-detail/facet-detail.component';
 import { FacetListComponent } from './components/facet-list/facet-list.component';
 import { FacetListComponent } from './components/facet-list/facet-list.component';
 import { GenerateProductVariantsComponent } from './components/generate-product-variants/generate-product-variants.component';
 import { GenerateProductVariantsComponent } from './components/generate-product-variants/generate-product-variants.component';
 import { ProductAssetsComponent } from './components/product-assets/product-assets.component';
 import { ProductAssetsComponent } from './components/product-assets/product-assets.component';
-import { ProductCategoryDetailComponent } from './components/product-category-detail/product-category-detail.component';
-import { ProductCategoryListComponent } from './components/product-category-list/product-category-list.component';
-import { ProductCategoryTreeNodeComponent } from './components/product-category-tree/product-category-tree-node.component';
-import { ProductCategoryTreeComponent } from './components/product-category-tree/product-category-tree.component';
 import { ProductDetailComponent } from './components/product-detail/product-detail.component';
 import { ProductDetailComponent } from './components/product-detail/product-detail.component';
 import { ProductListComponent } from './components/product-list/product-list.component';
 import { ProductListComponent } from './components/product-list/product-list.component';
 import { ProductVariantsListComponent } from './components/product-variants-list/product-variants-list.component';
 import { ProductVariantsListComponent } from './components/product-variants-list/product-variants-list.component';
@@ -27,8 +27,8 @@ import { ProductVariantsWizardComponent } from './components/product-variants-wi
 import { SelectOptionGroupDialogComponent } from './components/select-option-group-dialog/select-option-group-dialog.component';
 import { SelectOptionGroupDialogComponent } from './components/select-option-group-dialog/select-option-group-dialog.component';
 import { SelectOptionGroupComponent } from './components/select-option-group/select-option-group.component';
 import { SelectOptionGroupComponent } from './components/select-option-group/select-option-group.component';
 import { VariantPriceDetailComponent } from './components/variant-price-detail/variant-price-detail.component';
 import { VariantPriceDetailComponent } from './components/variant-price-detail/variant-price-detail.component';
+import { CollectionResolver } from './providers/routing/collection-resolver';
 import { FacetResolver } from './providers/routing/facet-resolver';
 import { FacetResolver } from './providers/routing/facet-resolver';
-import { ProductCategoryResolver } from './providers/routing/product-category-resolver';
 import { ProductResolver } from './providers/routing/product-resolver';
 import { ProductResolver } from './providers/routing/product-resolver';
 
 
 @NgModule({
 @NgModule({
@@ -53,10 +53,10 @@ import { ProductResolver } from './providers/routing/product-resolver';
         AssetPickerDialogComponent,
         AssetPickerDialogComponent,
         AssetFileInputComponent,
         AssetFileInputComponent,
         VariantPriceDetailComponent,
         VariantPriceDetailComponent,
-        ProductCategoryListComponent,
-        ProductCategoryDetailComponent,
-        ProductCategoryTreeComponent,
-        ProductCategoryTreeNodeComponent,
+        CollectionListComponent,
+        CollectionDetailComponent,
+        CollectionTreeComponent,
+        CollectionTreeNodeComponent,
     ],
     ],
     entryComponents: [
     entryComponents: [
         AssetPickerDialogComponent,
         AssetPickerDialogComponent,
@@ -64,6 +64,6 @@ import { ProductResolver } from './providers/routing/product-resolver';
         SelectOptionGroupDialogComponent,
         SelectOptionGroupDialogComponent,
         ApplyFacetDialogComponent,
         ApplyFacetDialogComponent,
     ],
     ],
-    providers: [ProductResolver, FacetResolver, ProductCategoryResolver],
+    providers: [ProductResolver, FacetResolver, CollectionResolver],
 })
 })
 export class CatalogModule {}
 export class CatalogModule {}

+ 13 - 13
admin-ui/src/app/catalog/catalog.routes.ts

@@ -7,14 +7,14 @@ import { _ } from '../core/providers/i18n/mark-for-extraction';
 import { CanDeactivateDetailGuard } from '../shared/providers/routing/can-deactivate-detail-guard';
 import { CanDeactivateDetailGuard } from '../shared/providers/routing/can-deactivate-detail-guard';
 
 
 import { AssetListComponent } from './components/asset-list/asset-list.component';
 import { AssetListComponent } from './components/asset-list/asset-list.component';
+import { CollectionDetailComponent } from './components/collection-detail/collection-detail.component';
+import { CollectionListComponent } from './components/collection-list/collection-list.component';
 import { FacetDetailComponent } from './components/facet-detail/facet-detail.component';
 import { FacetDetailComponent } from './components/facet-detail/facet-detail.component';
 import { FacetListComponent } from './components/facet-list/facet-list.component';
 import { FacetListComponent } from './components/facet-list/facet-list.component';
-import { ProductCategoryDetailComponent } from './components/product-category-detail/product-category-detail.component';
-import { ProductCategoryListComponent } from './components/product-category-list/product-category-list.component';
 import { ProductDetailComponent } from './components/product-detail/product-detail.component';
 import { ProductDetailComponent } from './components/product-detail/product-detail.component';
 import { ProductListComponent } from './components/product-list/product-list.component';
 import { ProductListComponent } from './components/product-list/product-list.component';
+import { CollectionResolver } from './providers/routing/collection-resolver';
 import { FacetResolver } from './providers/routing/facet-resolver';
 import { FacetResolver } from './providers/routing/facet-resolver';
-import { ProductCategoryResolver } from './providers/routing/product-category-resolver';
 import { ProductResolver } from './providers/routing/product-resolver';
 import { ProductResolver } from './providers/routing/product-resolver';
 
 
 export const catalogRoutes: Route[] = [
 export const catalogRoutes: Route[] = [
@@ -51,19 +51,19 @@ export const catalogRoutes: Route[] = [
         },
         },
     },
     },
     {
     {
-        path: 'categories',
-        component: ProductCategoryListComponent,
+        path: 'collections',
+        component: CollectionListComponent,
         data: {
         data: {
-            breadcrumb: _('breadcrumb.categories'),
+            breadcrumb: _('breadcrumb.collections'),
         },
         },
     },
     },
     {
     {
-        path: 'categories/:id',
-        component: ProductCategoryDetailComponent,
-        resolve: createResolveData(ProductCategoryResolver),
+        path: 'collections/:id',
+        component: CollectionDetailComponent,
+        resolve: createResolveData(CollectionResolver),
         canDeactivate: [CanDeactivateDetailGuard],
         canDeactivate: [CanDeactivateDetailGuard],
         data: {
         data: {
-            breadcrumb: productCategoryBreadcrumb,
+            breadcrumb: collectionBreadcrumb,
         },
         },
     },
     },
     {
     {
@@ -95,12 +95,12 @@ export function facetBreadcrumb(data: any, params: any) {
     });
     });
 }
 }
 
 
-export function productCategoryBreadcrumb(data: any, params: any) {
+export function collectionBreadcrumb(data: any, params: any) {
     return detailBreadcrumb<FacetWithValues.Fragment>({
     return detailBreadcrumb<FacetWithValues.Fragment>({
         entity: data.entity,
         entity: data.entity,
         id: params.id,
         id: params.id,
-        breadcrumbKey: 'breadcrumb.categories',
+        breadcrumbKey: 'breadcrumb.collections',
         getName: facet => facet.name,
         getName: facet => facet.name,
-        route: 'categories',
+        route: 'collections',
     });
     });
 }
 }

+ 0 - 0
admin-ui/src/app/catalog/components/product-category-detail/product-category-detail.component.html → admin-ui/src/app/catalog/components/collection-detail/collection-detail.component.html


+ 0 - 0
admin-ui/src/app/catalog/components/product-category-detail/product-category-detail.component.scss → admin-ui/src/app/catalog/components/collection-detail/collection-detail.component.scss


+ 8 - 8
admin-ui/src/app/catalog/components/product-category-detail/product-category-detail.component.ts → admin-ui/src/app/catalog/components/collection-detail/collection-detail.component.ts

@@ -34,12 +34,12 @@ import { ModalService } from '../../../shared/providers/modal/modal.service';
 import { ApplyFacetDialogComponent } from '../apply-facet-dialog/apply-facet-dialog.component';
 import { ApplyFacetDialogComponent } from '../apply-facet-dialog/apply-facet-dialog.component';
 
 
 @Component({
 @Component({
-    selector: 'vdr-product-category-detail',
-    templateUrl: './product-category-detail.component.html',
-    styleUrls: ['./product-category-detail.component.scss'],
+    selector: 'vdr-collection-detail',
+    templateUrl: './collection-detail.component.html',
+    styleUrls: ['./collection-detail.component.scss'],
     changeDetection: ChangeDetectionStrategy.OnPush,
     changeDetection: ChangeDetectionStrategy.OnPush,
 })
 })
-export class ProductCategoryDetailComponent extends BaseDetailComponent<Collection.Fragment>
+export class CollectionDetailComponent extends BaseDetailComponent<Collection.Fragment>
     implements OnInit, OnDestroy {
     implements OnInit, OnDestroy {
     customFields: CustomFieldConfig[];
     customFields: CustomFieldConfig[];
     detailForm: FormGroup;
     detailForm: FormGroup;
@@ -150,7 +150,7 @@ export class ProductCategoryDetailComponent extends BaseDetailComponent<Collecti
             .subscribe(
             .subscribe(
                 data => {
                 data => {
                     this.notificationService.success(_('common.notify-create-success'), {
                     this.notificationService.success(_('common.notify-create-success'), {
-                        entity: 'ProductCategory',
+                        entity: 'Collection',
                     });
                     });
                     this.detailForm.markAsPristine();
                     this.detailForm.markAsPristine();
                     this.changeDetector.markForCheck();
                     this.changeDetector.markForCheck();
@@ -158,7 +158,7 @@ export class ProductCategoryDetailComponent extends BaseDetailComponent<Collecti
                 },
                 },
                 err => {
                 err => {
                     this.notificationService.error(_('common.notify-create-error'), {
                     this.notificationService.error(_('common.notify-create-error'), {
-                        entity: 'ProductCategory',
+                        entity: 'Collection',
                     });
                     });
                 },
                 },
             );
             );
@@ -183,12 +183,12 @@ export class ProductCategoryDetailComponent extends BaseDetailComponent<Collecti
                     this.detailForm.markAsPristine();
                     this.detailForm.markAsPristine();
                     this.changeDetector.markForCheck();
                     this.changeDetector.markForCheck();
                     this.notificationService.success(_('common.notify-update-success'), {
                     this.notificationService.success(_('common.notify-update-success'), {
-                        entity: 'ProductCategory',
+                        entity: 'Collection',
                     });
                     });
                 },
                 },
                 err => {
                 err => {
                     this.notificationService.error(_('common.notify-update-error'), {
                     this.notificationService.error(_('common.notify-update-error'), {
-                        entity: 'ProductCategory',
+                        entity: 'Collection',
                     });
                     });
                 },
                 },
             );
             );

+ 3 - 3
admin-ui/src/app/catalog/components/product-category-list/product-category-list.component.html → admin-ui/src/app/catalog/components/collection-list/collection-list.component.html

@@ -2,12 +2,12 @@
     <vdr-ab-right>
     <vdr-ab-right>
         <a class="btn btn-primary" [routerLink]="['./create']">
         <a class="btn btn-primary" [routerLink]="['./create']">
             <clr-icon shape="plus"></clr-icon>
             <clr-icon shape="plus"></clr-icon>
-            {{ 'catalog.create-new-product-category' | translate }}
+            {{ 'catalog.create-new-collection' | translate }}
         </a>
         </a>
     </vdr-ab-right>
     </vdr-ab-right>
 </vdr-action-bar>
 </vdr-action-bar>
 
 
-<vdr-product-category-tree
+<vdr-collection-tree
     [productCategories]="items$ | async"
     [productCategories]="items$ | async"
     (rearrange)="onRearrange($event)"
     (rearrange)="onRearrange($event)"
-></vdr-product-category-tree>
+></vdr-collection-tree>

+ 0 - 0
admin-ui/src/app/catalog/components/product-category-list/product-category-list.component.scss → admin-ui/src/app/catalog/components/collection-list/collection-list.component.scss


+ 5 - 5
admin-ui/src/app/catalog/components/product-category-list/product-category-list.component.ts → admin-ui/src/app/catalog/components/collection-list/collection-list.component.ts

@@ -6,15 +6,15 @@ import { BaseListComponent } from '../../../common/base-list.component';
 import { _ } from '../../../core/providers/i18n/mark-for-extraction';
 import { _ } from '../../../core/providers/i18n/mark-for-extraction';
 import { NotificationService } from '../../../core/providers/notification/notification.service';
 import { NotificationService } from '../../../core/providers/notification/notification.service';
 import { DataService } from '../../../data/providers/data.service';
 import { DataService } from '../../../data/providers/data.service';
-import { RearrangeEvent } from '../product-category-tree/product-category-tree.component';
+import { RearrangeEvent } from '../collection-tree/collection-tree.component';
 
 
 @Component({
 @Component({
-    selector: 'vdr-product-category-list',
-    templateUrl: './product-category-list.component.html',
-    styleUrls: ['./product-category-list.component.scss'],
+    selector: 'vdr-collection-list',
+    templateUrl: './collection-list.component.html',
+    styleUrls: ['./collection-list.component.scss'],
     changeDetection: ChangeDetectionStrategy.OnPush,
     changeDetection: ChangeDetectionStrategy.OnPush,
 })
 })
-export class ProductCategoryListComponent extends BaseListComponent<
+export class CollectionListComponent extends BaseListComponent<
     GetCollectionList.Query,
     GetCollectionList.Query,
     GetCollectionList.Items
     GetCollectionList.Items
 > {
 > {

+ 0 - 0
admin-ui/src/app/catalog/components/product-category-tree/array-to-tree.spec.ts → admin-ui/src/app/catalog/components/collection-tree/array-to-tree.spec.ts


+ 0 - 0
admin-ui/src/app/catalog/components/product-category-tree/array-to-tree.ts → admin-ui/src/app/catalog/components/collection-tree/array-to-tree.ts


+ 12 - 12
admin-ui/src/app/catalog/components/product-category-tree/product-category-tree-node.component.html → admin-ui/src/app/catalog/components/collection-tree/collection-tree-node.component.html

@@ -2,30 +2,30 @@
     cdkDropList
     cdkDropList
     class="tree-node"
     class="tree-node"
     #dropList
     #dropList
-    [cdkDropListData]="categoryTree"
+    [cdkDropListData]="collectionTree"
     [cdkDropListDisabled]="true"
     [cdkDropListDisabled]="true"
     (cdkDropListDropped)="drop($event)"
     (cdkDropListDropped)="drop($event)"
 >
 >
     <div
     <div
         class="category"
         class="category"
-        *ngFor="let category of categoryTree.children; index as i"
+        *ngFor="let collection of collectionTree.children; index as i"
         cdkDrag
         cdkDrag
-        [cdkDragData]="category"
+        [cdkDragData]="collection"
     >
     >
         <div class="category-detail" [ngClass]="'depth-' + depth">
         <div class="category-detail" [ngClass]="'depth-' + depth">
             <div class="name">
             <div class="name">
                 <clr-icon shape="folder"></clr-icon>
                 <clr-icon shape="folder"></clr-icon>
-                {{ category.name }}
+                {{ collection.name }}
             </div>
             </div>
             <div class="flex-spacer">
             <div class="flex-spacer">
                 <vdr-facet-value-chip
                 <vdr-facet-value-chip
-                    *ngFor="let facetValue of category.facetValues"
+                    *ngFor="let facetValue of collection.facetValues"
                     [facetValue]="facetValue"
                     [facetValue]="facetValue"
                     [displayFacetName]="false"
                     [displayFacetName]="false"
                     [removable]="false"
                     [removable]="false"
                 ></vdr-facet-value-chip>
                 ></vdr-facet-value-chip>
             </div>
             </div>
-            <a class="btn btn-link btn-sm" [routerLink]="['./', category.id]">
+            <a class="btn btn-link btn-sm" [routerLink]="['./', collection.id]">
                 <clr-icon shape="edit"></clr-icon>
                 <clr-icon shape="edit"></clr-icon>
                 {{ 'common.edit' | translate }}
                 {{ 'common.edit' | translate }}
             </a>
             </a>
@@ -44,7 +44,7 @@
                         type="button"
                         type="button"
                         class="dropdown-item"
                         class="dropdown-item"
                         [disabled]="i === 0"
                         [disabled]="i === 0"
-                        (click)="moveUp(category, i)"
+                        (click)="moveUp(collection, i)"
                     >
                     >
                         <clr-icon shape="caret up"></clr-icon>
                         <clr-icon shape="caret up"></clr-icon>
                         {{ 'catalog.move-up' | translate }}
                         {{ 'catalog.move-up' | translate }}
@@ -52,8 +52,8 @@
                     <button
                     <button
                         type="button"
                         type="button"
                         class="dropdown-item"
                         class="dropdown-item"
-                        [disabled]="i === categoryTree.children.length - 1"
-                        (click)="moveDown(category, i)"
+                        [disabled]="i === collectionTree.children.length - 1"
+                        (click)="moveDown(collection, i)"
                     >
                     >
                         <clr-icon shape="caret down"></clr-icon>
                         <clr-icon shape="caret down"></clr-icon>
                         {{ 'catalog.move-down' | translate }}
                         {{ 'catalog.move-down' | translate }}
@@ -62,8 +62,8 @@
                     <button
                     <button
                         type="button"
                         type="button"
                         class="dropdown-item"
                         class="dropdown-item"
-                        *ngFor="let item of getMoveListItems(category)"
-                        (click)="move(category, item.id)"
+                        *ngFor="let item of getMoveListItems(collection)"
+                        (click)="move(collection, item.id)"
                     >
                     >
                         <clr-icon shape="child-arrow"></clr-icon>
                         <clr-icon shape="child-arrow"></clr-icon>
                         {{ item.path }}
                         {{ item.path }}
@@ -71,6 +71,6 @@
                 </clr-dropdown-menu>
                 </clr-dropdown-menu>
             </clr-dropdown>
             </clr-dropdown>
         </div>
         </div>
-        <vdr-product-category-tree-node [categoryTree]="category"></vdr-product-category-tree-node>
+        <vdr-collection-tree-node [collectionTree]="collection"></vdr-collection-tree-node>
     </div>
     </div>
 </div>
 </div>

+ 0 - 0
admin-ui/src/app/catalog/components/product-category-tree/product-category-tree-node.component.scss → admin-ui/src/app/catalog/components/collection-tree/collection-tree-node.component.scss


+ 9 - 9
admin-ui/src/app/catalog/components/product-category-tree/product-category-tree-node.component.ts → admin-ui/src/app/catalog/components/collection-tree/collection-tree-node.component.ts

@@ -3,22 +3,22 @@ import { ChangeDetectionStrategy, Component, Input, OnInit, Optional, SkipSelf }
 import { Collection } from 'shared/generated-types';
 import { Collection } from 'shared/generated-types';
 
 
 import { RootNode, TreeNode } from './array-to-tree';
 import { RootNode, TreeNode } from './array-to-tree';
-import { ProductCategoryTreeComponent } from './product-category-tree.component';
+import { CollectionTreeComponent } from './collection-tree.component';
 
 
 @Component({
 @Component({
-    selector: 'vdr-product-category-tree-node',
-    templateUrl: './product-category-tree-node.component.html',
-    styleUrls: ['./product-category-tree-node.component.scss'],
+    selector: 'vdr-collection-tree-node',
+    templateUrl: './collection-tree-node.component.html',
+    styleUrls: ['./collection-tree-node.component.scss'],
     changeDetection: ChangeDetectionStrategy.OnPush,
     changeDetection: ChangeDetectionStrategy.OnPush,
 })
 })
-export class ProductCategoryTreeNodeComponent implements OnInit {
+export class CollectionTreeNodeComponent implements OnInit {
     depth = 0;
     depth = 0;
     parentName: string;
     parentName: string;
-    @Input() categoryTree: TreeNode<Collection.Fragment>;
+    @Input() collectionTree: TreeNode<Collection.Fragment>;
 
 
     constructor(
     constructor(
-        @SkipSelf() @Optional() private parent: ProductCategoryTreeNodeComponent,
-        private root: ProductCategoryTreeComponent,
+        @SkipSelf() @Optional() private parent: CollectionTreeNodeComponent,
+        private root: CollectionTreeComponent,
     ) {
     ) {
         if (parent) {
         if (parent) {
             this.depth = parent.depth + 1;
             this.depth = parent.depth + 1;
@@ -26,7 +26,7 @@ export class ProductCategoryTreeNodeComponent implements OnInit {
     }
     }
 
 
     ngOnInit() {
     ngOnInit() {
-        this.parentName = this.categoryTree.name || '<root>';
+        this.parentName = this.collectionTree.name || '<root>';
     }
     }
 
 
     getMoveListItems(category: Collection.Fragment): Array<{ path: string; id: string }> {
     getMoveListItems(category: Collection.Fragment): Array<{ path: string; id: string }> {

+ 5 - 0
admin-ui/src/app/catalog/components/collection-tree/collection-tree.component.html

@@ -0,0 +1,5 @@
+<vdr-collection-tree-node
+    *ngIf="categoryTree"
+    cdkDropListGroup
+    [collectionTree]="categoryTree"
+></vdr-collection-tree-node>

+ 0 - 0
admin-ui/src/app/catalog/components/product-category-tree/product-category-tree.component.scss → admin-ui/src/app/catalog/components/collection-tree/collection-tree.component.scss


+ 4 - 4
admin-ui/src/app/catalog/components/product-category-tree/product-category-tree.component.ts → admin-ui/src/app/catalog/components/collection-tree/collection-tree.component.ts

@@ -15,12 +15,12 @@ import { arrayToTree, HasParent, RootNode } from './array-to-tree';
 export type RearrangeEvent = { categoryId: string; parentId: string; index: number };
 export type RearrangeEvent = { categoryId: string; parentId: string; index: number };
 
 
 @Component({
 @Component({
-    selector: 'vdr-product-category-tree',
-    templateUrl: 'product-category-tree.component.html',
-    styleUrls: ['./product-category-tree.component.scss'],
+    selector: 'vdr-collection-tree',
+    templateUrl: 'collection-tree.component.html',
+    styleUrls: ['./collection-tree.component.scss'],
     changeDetection: ChangeDetectionStrategy.OnPush,
     changeDetection: ChangeDetectionStrategy.OnPush,
 })
 })
-export class ProductCategoryTreeComponent implements OnChanges {
+export class CollectionTreeComponent implements OnChanges {
     @Input() productCategories: Collection.Fragment[];
     @Input() productCategories: Collection.Fragment[];
     @Output() rearrange = new EventEmitter<RearrangeEvent>();
     @Output() rearrange = new EventEmitter<RearrangeEvent>();
     categoryTree: RootNode<Collection.Fragment>;
     categoryTree: RootNode<Collection.Fragment>;

+ 0 - 5
admin-ui/src/app/catalog/components/product-category-tree/product-category-tree.component.html

@@ -1,5 +0,0 @@
-<vdr-product-category-tree-node
-    *ngIf="categoryTree"
-    cdkDropListGroup
-    [categoryTree]="categoryTree"
-></vdr-product-category-tree-node>

+ 1 - 1
admin-ui/src/app/catalog/providers/routing/product-category-resolver.ts → admin-ui/src/app/catalog/providers/routing/collection-resolver.ts

@@ -6,7 +6,7 @@ import { getDefaultLanguage } from '../../../common/utilities/get-default-langua
 import { DataService } from '../../../data/providers/data.service';
 import { DataService } from '../../../data/providers/data.service';
 
 
 @Injectable()
 @Injectable()
-export class ProductCategoryResolver extends BaseEntityResolver<Collection.Fragment> {
+export class CollectionResolver extends BaseEntityResolver<Collection.Fragment> {
     constructor(private dataService: DataService) {
     constructor(private dataService: DataService) {
         super(
         super(
             {
             {

+ 2 - 2
admin-ui/src/app/core/components/main-nav/main-nav.component.html

@@ -17,9 +17,9 @@
                     </a>
                     </a>
                 </li>
                 </li>
                 <li>
                 <li>
-                    <a class="nav-link" [routerLink]="['/catalog', 'categories']" routerLinkActive="active">
+                    <a class="nav-link" [routerLink]="['/catalog', 'collections']" routerLinkActive="active">
                         <clr-icon shape="folder-open" size="20"></clr-icon>
                         <clr-icon shape="folder-open" size="20"></clr-icon>
-                        {{ 'nav.categories' | translate }}
+                        {{ 'nav.collections' | translate }}
                     </a>
                     </a>
                 </li>
                 </li>
                 <li>
                 <li>

+ 3 - 3
admin-ui/src/i18n-messages/en.json

@@ -5,8 +5,8 @@
   "breadcrumb": {
   "breadcrumb": {
     "administrators": "Administrators",
     "administrators": "Administrators",
     "assets": "Assets",
     "assets": "Assets",
-    "categories": "Categories",
     "channels": "Channels",
     "channels": "Channels",
+    "collections": "Collections",
     "countries": "Countries",
     "countries": "Countries",
     "customers": "Customers",
     "customers": "Customers",
     "dashboard": "Dashboard",
     "dashboard": "Dashboard",
@@ -34,10 +34,10 @@
     "confirm-delete-product": "Delete product?",
     "confirm-delete-product": "Delete product?",
     "confirm-generate-product-variants": "Click 'Finish' to generate {count} product variants.",
     "confirm-generate-product-variants": "Click 'Finish' to generate {count} product variants.",
     "create-group": "Create option group",
     "create-group": "Create option group",
+    "create-new-collection": "Create new collection",
     "create-new-facet": "Create new facet",
     "create-new-facet": "Create new facet",
     "create-new-option-group": "Create new option group",
     "create-new-option-group": "Create new option group",
     "create-new-product": "Create new product",
     "create-new-product": "Create new product",
-    "create-new-product-category": "Create new product category",
     "drop-files-to-upload": "Drop files to upload",
     "drop-files-to-upload": "Drop files to upload",
     "facet": "Facet",
     "facet": "Facet",
     "facet-values": "Facet values",
     "facet-values": "Facet values",
@@ -363,8 +363,8 @@
     "administrators": "Administrators",
     "administrators": "Administrators",
     "assets": "Assets",
     "assets": "Assets",
     "catalog": "Catalog",
     "catalog": "Catalog",
-    "categories": "Categories",
     "channels": "Channels",
     "channels": "Channels",
+    "collections": "Collections",
     "countries": "Countries",
     "countries": "Countries",
     "customers": "Customers",
     "customers": "Customers",
     "facets": "Facets",
     "facets": "Facets",