diff --git a/src/app/app.module.ts b/src/app/app.module.ts index ad0f3b4..ecd7389 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -45,8 +45,6 @@ import { ScrollHooks, } from 'ng-lazyload-image'; import { ClickStopPropagation } from './shared/click-stop-propagation.directive'; -import { CartLayerItemComponent } from './components/cart-layer-item/cart-layer-item.component'; -import { CartLayerContentsComponent } from './components/cart-layer-contents/cart-layer-contents.component'; import { MenuLayerContentComponent } from './components/top-bar/menu-layer-content/menu-layer-content.component'; import { MenuLayerTitleComponent } from './components/top-bar/menu-layer-title/menu-layer-title.component'; import { HoverColorPickerDirective } from './directives/hover-color-picker-directive.service'; @@ -54,6 +52,7 @@ import { GraphQLModule } from './graphql.module'; import { ProductsModule } from './features/products/products.module'; import { SharedModule } from './shared/shared.module'; import { CheckoutModule } from './features/checkout/checkout.module'; +import { CartModule } from './cart/cart.module'; export function HttpLoaderFactory(http: HttpClient) { return new TranslateHttpLoader(http, './assets/i18n/', '.json'); @@ -85,8 +84,6 @@ const vclModules = [ FooterTopComponent, HeaderComponent, ClickStopPropagation, - CartLayerItemComponent, - CartLayerContentsComponent, MenuLayerContentComponent, MenuLayerTitleComponent, CookiePreferenceComponent, @@ -97,6 +94,7 @@ const vclModules = [ BrowserAnimationsModule, ProductsModule, CheckoutModule, + CartModule, AppRoutingModule, HttpClientModule, LazyLoadImageModule, diff --git a/src/app/cart/cart.module.ts b/src/app/cart/cart.module.ts new file mode 100644 index 0000000..a1a8472 --- /dev/null +++ b/src/app/cart/cart.module.ts @@ -0,0 +1,21 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { CartLayerItemComponent } from './components/cart-layer-item/cart-layer-item.component'; +import { CartLayerContentsComponent } from './components/cart-layer-contents/cart-layer-contents.component'; +import { SharedModule } from '../shared/shared.module'; +import { + VCLFormControlGroupModule, + VCLInputModule, + VCLSelectModule, +} from '@vcl/ng-vcl'; + +const components = [CartLayerContentsComponent, CartLayerItemComponent]; + +const vclModules = [VCLInputModule, VCLSelectModule, VCLFormControlGroupModule]; + +@NgModule({ + declarations: [...components], + imports: [CommonModule, SharedModule, ...vclModules], + exports: [...components], +}) +export class CartModule {} diff --git a/src/app/components/cart-layer-contents/cart-layer-contents.component.html b/src/app/cart/components/cart-layer-contents/cart-layer-contents.component.html similarity index 100% rename from src/app/components/cart-layer-contents/cart-layer-contents.component.html rename to src/app/cart/components/cart-layer-contents/cart-layer-contents.component.html diff --git a/src/app/components/cart-layer-contents/cart-layer-contents.component.scss b/src/app/cart/components/cart-layer-contents/cart-layer-contents.component.scss similarity index 100% rename from src/app/components/cart-layer-contents/cart-layer-contents.component.scss rename to src/app/cart/components/cart-layer-contents/cart-layer-contents.component.scss diff --git a/src/app/components/cart-layer-contents/cart-layer-contents.component.ts b/src/app/cart/components/cart-layer-contents/cart-layer-contents.component.ts similarity index 100% rename from src/app/components/cart-layer-contents/cart-layer-contents.component.ts rename to src/app/cart/components/cart-layer-contents/cart-layer-contents.component.ts diff --git a/src/app/components/cart-layer-item/cart-layer-item.component.html b/src/app/cart/components/cart-layer-item/cart-layer-item.component.html similarity index 100% rename from src/app/components/cart-layer-item/cart-layer-item.component.html rename to src/app/cart/components/cart-layer-item/cart-layer-item.component.html diff --git a/src/app/components/cart-layer-item/cart-layer-item.component.scss b/src/app/cart/components/cart-layer-item/cart-layer-item.component.scss similarity index 100% rename from src/app/components/cart-layer-item/cart-layer-item.component.scss rename to src/app/cart/components/cart-layer-item/cart-layer-item.component.scss diff --git a/src/app/components/cart-layer-item/cart-layer-item.component.ts b/src/app/cart/components/cart-layer-item/cart-layer-item.component.ts similarity index 81% rename from src/app/components/cart-layer-item/cart-layer-item.component.ts rename to src/app/cart/components/cart-layer-item/cart-layer-item.component.ts index 22c8e2c..af748c0 100644 --- a/src/app/components/cart-layer-item/cart-layer-item.component.ts +++ b/src/app/cart/components/cart-layer-item/cart-layer-item.component.ts @@ -6,10 +6,8 @@ import { CartService } from 'src/app/services/cart.service'; templateUrl: './cart-layer-item.component.html', styleUrls: ['./cart-layer-item.component.scss'], }) -export class CartLayerItemComponent implements OnInit { +export class CartLayerItemComponent { constructor(public cartService: CartService) {} @Input() cartItem: any; - - ngOnInit(): void {} }