diff --git a/angular/README.md b/angular/README.md
index f1f8aad..e26b7aa 100644
--- a/angular/README.md
+++ b/angular/README.md
@@ -1,4 +1,4 @@
-# FashionLogica
+# Sakura
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 14.0.6.
diff --git a/angular/angular.json b/angular/angular.json
index ea8448c..1bfa05c 100644
--- a/angular/angular.json
+++ b/angular/angular.json
@@ -4,7 +4,7 @@
"version": 1,
"newProjectRoot": "projects",
"projects": {
- "fashion-logica": {
+ "sakura": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
@@ -19,7 +19,7 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
- "outputPath": "/var/www/html/lk.crm4retail.ru/fashion-logica",
+ "outputPath": "/var/www/html/lk.crm4retail.ru/sakura",
"baseHref": "/",
"index": "src/index.html",
"main": "src/main.ts",
@@ -81,10 +81,10 @@
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
- "browserTarget": "fashion-logica:build:production"
+ "browserTarget": "sakura:build:production"
},
"development": {
- "browserTarget": "fashion-logica:build:development"
+ "browserTarget": "sakura:build:development"
}
},
"defaultConfiguration": "development"
@@ -92,7 +92,7 @@
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
- "browserTarget": "fashion-logica:build"
+ "browserTarget": "sakura:build"
}
},
"test": {
diff --git a/angular/package-lock.json b/angular/package-lock.json
index 549d5fc..4c160da 100644
--- a/angular/package-lock.json
+++ b/angular/package-lock.json
@@ -1,11 +1,11 @@
{
- "name": "fashion-logica",
+ "name": "sakura",
"version": "0.0.2",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
- "name": "fashion-logica",
+ "name": "sakura",
"version": "0.0.2",
"dependencies": {
"@angular/animations": "^14.0.0",
@@ -44,6 +44,7 @@
"@angular/compiler-cli": "^14.0.0",
"@types/google-libphonenumber": "^7.4.23",
"@types/jasmine": "~4.0.0",
+ "@types/lodash": "^4.14.186",
"jasmine-core": "~4.1.0",
"karma": "~6.3.0",
"karma-chrome-launcher": "~3.1.0",
@@ -3914,6 +3915,12 @@
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz",
"integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ=="
},
+ "node_modules/@types/lodash": {
+ "version": "4.14.186",
+ "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.186.tgz",
+ "integrity": "sha512-eHcVlLXP0c2FlMPm56ITode2AgLMSa6aJ05JTTbYbI+7EMkCEE5qk2E41d5g2lCVTqRe0GnnRFurmlCsDODrPw==",
+ "dev": true
+ },
"node_modules/@types/long": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz",
@@ -16521,6 +16528,12 @@
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz",
"integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ=="
},
+ "@types/lodash": {
+ "version": "4.14.186",
+ "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.186.tgz",
+ "integrity": "sha512-eHcVlLXP0c2FlMPm56ITode2AgLMSa6aJ05JTTbYbI+7EMkCEE5qk2E41d5g2lCVTqRe0GnnRFurmlCsDODrPw==",
+ "dev": true
+ },
"@types/long": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz",
diff --git a/angular/package.json b/angular/package.json
index e80878c..3818e2f 100644
--- a/angular/package.json
+++ b/angular/package.json
@@ -1,5 +1,5 @@
{
- "name": "fashion-logica",
+ "name": "sakura",
"version": "0.0.2",
"scripts": {
"ng": "ng",
@@ -46,6 +46,7 @@
"@angular/compiler-cli": "^14.0.0",
"@types/google-libphonenumber": "^7.4.23",
"@types/jasmine": "~4.0.0",
+ "@types/lodash": "^4.14.186",
"jasmine-core": "~4.1.0",
"karma": "~6.3.0",
"karma-chrome-launcher": "~3.1.0",
diff --git a/angular/src/app/app.component.spec.ts b/angular/src/app/app.component.spec.ts
index 3d2ba4f..f309fe2 100644
--- a/angular/src/app/app.component.spec.ts
+++ b/angular/src/app/app.component.spec.ts
@@ -20,16 +20,16 @@ describe('AppComponent', () => {
expect(app).toBeTruthy();
});
- it(`should have as title 'fashion-logica'`, () => {
+ it(`should have as title 'sakura'`, () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
- expect(app.title).toEqual('fashion-logica');
+ expect(app.title).toEqual('sakura');
});
it('should render title', () => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.nativeElement as HTMLElement;
- expect(compiled.querySelector('.content span')?.textContent).toContain('fashion-logica app is running!');
+ expect(compiled.querySelector('.content span')?.textContent).toContain('sakura app is running!');
});
});
diff --git a/angular/src/app/app.component.ts b/angular/src/app/app.component.ts
index ddeca86..2ded208 100644
--- a/angular/src/app/app.component.ts
+++ b/angular/src/app/app.component.ts
@@ -6,5 +6,5 @@ import { Component } from '@angular/core';
styleUrls: ['./app.component.scss']
})
export class AppComponent {
- title = 'Fashionlogica';
+ title = 'Sakura';
}
diff --git a/angular/src/app/app.constants.ts b/angular/src/app/app.constants.ts
index fec3e2c..6cc6e78 100644
--- a/angular/src/app/app.constants.ts
+++ b/angular/src/app/app.constants.ts
@@ -1,4 +1,4 @@
-import {OrderStatus, Page, PageCode} from "./interface/data";
+import {MainPageCode, OrderStatus, Page, PageCode} from "./interface/data";
export const PageList: Page[] = [
{
@@ -52,6 +52,27 @@ export const PageListWithBonus: Page[] = [
},
];
+export const PageListMain: Page[] = [
+ {
+ code: MainPageCode.Account,
+ name: 'Аккаунт',
+ resName: 'account',
+ onSideBar: true,
+ },
+ {
+ code: MainPageCode.Products,
+ name: 'Товары',
+ resName: 'products',
+ onSideBar: true,
+ },
+ {
+ code: MainPageCode.Cart,
+ name: 'Корзина',
+ resName: 'cart',
+ onSideBar: true,
+ },
+]
+
export const orderStatuses: OrderStatus = {
'Cancelled': 'Отменен',
'InProcessing': 'В обработке',
diff --git a/angular/src/app/app.module.ts b/angular/src/app/app.module.ts
index 0f44a05..7a796c1 100644
--- a/angular/src/app/app.module.ts
+++ b/angular/src/app/app.module.ts
@@ -33,6 +33,11 @@ import { ShareButtonsModule } from 'ngx-sharebuttons/buttons';
import { ShareIconsModule } from 'ngx-sharebuttons/icons';
import { MessagingService } from './services/messaging.service';
import { NotFoundComponent } from './pages/not-found/not-found.component';
+import { ProductsComponent } from './pages/products/products.component';
+import { CartComponent } from './pages/cart/cart.component';
+import {ListboxModule} from 'primeng/listbox';
+import { ProductModalComponent } from './components/product-modal/product-modal.component';
+import { CheckboxGroupComponent } from './components/checkbox-group/checkbox-group.component';
@NgModule({
declarations: [
@@ -49,7 +54,11 @@ import { NotFoundComponent } from './pages/not-found/not-found.component';
FooterButtonsComponent,
UserDataComponent,
RefSystemComponent,
- NotFoundComponent
+ NotFoundComponent,
+ ProductsComponent,
+ CartComponent,
+ ProductModalComponent,
+ CheckboxGroupComponent
],
imports: [
BrowserModule,
@@ -81,7 +90,8 @@ import { NotFoundComponent } from './pages/not-found/not-found.component';
ShareButtonsModule.withConfig({
debug: true
}),
- ShareIconsModule
+ ShareIconsModule,
+ ListboxModule
],
providers: [DialogService, MessageService, MessagingService ],
bootstrap: [AppComponent]
diff --git a/angular/src/app/components/checkbox-group/checkbox-group.component.html b/angular/src/app/components/checkbox-group/checkbox-group.component.html
new file mode 100644
index 0000000..4a59f52
--- /dev/null
+++ b/angular/src/app/components/checkbox-group/checkbox-group.component.html
@@ -0,0 +1 @@
+
checkbox-group works!
diff --git a/angular/src/app/components/checkbox-group/checkbox-group.component.scss b/angular/src/app/components/checkbox-group/checkbox-group.component.scss
new file mode 100644
index 0000000..e69de29
diff --git a/angular/src/app/components/checkbox-group/checkbox-group.component.spec.ts b/angular/src/app/components/checkbox-group/checkbox-group.component.spec.ts
new file mode 100644
index 0000000..2d5d3bb
--- /dev/null
+++ b/angular/src/app/components/checkbox-group/checkbox-group.component.spec.ts
@@ -0,0 +1,23 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { CheckboxGroupComponent } from './checkbox-group.component';
+
+describe('CheckboxGroupComponent', () => {
+ let component: CheckboxGroupComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ declarations: [ CheckboxGroupComponent ]
+ })
+ .compileComponents();
+
+ fixture = TestBed.createComponent(CheckboxGroupComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/angular/src/app/components/checkbox-group/checkbox-group.component.ts b/angular/src/app/components/checkbox-group/checkbox-group.component.ts
new file mode 100644
index 0000000..368fd3d
--- /dev/null
+++ b/angular/src/app/components/checkbox-group/checkbox-group.component.ts
@@ -0,0 +1,35 @@
+import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
+import {Modifier, Option} from 'src/app/interface/data';
+import { cloneDeep } from 'lodash/fp';
+
+@Component({
+ selector: 'app-checkbox-group',
+ templateUrl: './checkbox-group.component.html',
+ styleUrls: ['./checkbox-group.component.scss']
+})
+export class CheckboxGroupComponent implements OnInit {
+
+ constructor() { }
+
+ @Input() modifier!: Modifier;
+ @Input() currencySymbol!: string;
+
+ @Output() toggle = new EventEmitter