parent
ce61d8b9aa
commit
624d121006
@ -100,7 +100,9 @@ const routes: Routes = [
|
||||
imports: [
|
||||
BrowserModule,
|
||||
AppRoutingModule,
|
||||
RouterModule.forRoot(routes),
|
||||
RouterModule.forRoot(routes, {
|
||||
scrollPositionRestoration: 'enabled'
|
||||
}),
|
||||
InputMaskModule,
|
||||
ProgressSpinnerModule,
|
||||
FormsModule,
|
||||
|
||||
@ -25,8 +25,8 @@
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
font-size: 14px;
|
||||
gap: 0px;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 2px;
|
||||
color: #b5b5b9;
|
||||
@ -43,10 +43,9 @@
|
||||
|
||||
&:hover {
|
||||
color: #252525;
|
||||
|
||||
|
||||
a {
|
||||
border-bottom: 2px solid #e16f38;
|
||||
|
||||
}
|
||||
}
|
||||
a {
|
||||
@ -97,9 +96,10 @@
|
||||
left: 0;
|
||||
margin: 0;
|
||||
z-index: 777;
|
||||
height: 57px;
|
||||
border-top: solid 1px #dfdfdf;
|
||||
background-color: #fff;
|
||||
padding-bottom: 16px;
|
||||
padding-top: 8px;
|
||||
|
||||
ul {
|
||||
li {
|
||||
|
||||
@ -10,8 +10,8 @@
|
||||
img {
|
||||
width: 100%;
|
||||
border-radius: 1.125rem;
|
||||
height: fit-content;
|
||||
object-fit: cover;
|
||||
object-fit: contain;
|
||||
max-height: 50vh;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -54,8 +54,7 @@
|
||||
class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide"
|
||||
>
|
||||
<label for="code">
|
||||
Введите 4 последних цифры позвонившего вам номера телефона. На звонок
|
||||
отвечать не нужно.
|
||||
Введите код из смс, которое пришло на Ваш номер телефона
|
||||
</label>
|
||||
<input
|
||||
pInputText
|
||||
|
||||
@ -53,7 +53,7 @@
|
||||
>
|
||||
<div class="header">
|
||||
<h2>{{ group.label }}</h2>
|
||||
<button (click)="changeGroup(group)">Перейти в категорию</button>
|
||||
<button (click)="changeGroup(group)">В категорию</button>
|
||||
</div>
|
||||
<div class="products-container__items">
|
||||
<div
|
||||
@ -72,8 +72,7 @@
|
||||
<p>{{ product.name }}</p>
|
||||
</div>
|
||||
<p class="products-container__product-composition">
|
||||
Lorem ipsum dolor sit amet consectetur adipisicing elit. Odio
|
||||
consequuntur voluptates est.
|
||||
{{product.description}}
|
||||
</p>
|
||||
<div class="products-container__item-footer">
|
||||
<span>{{ product.price }}₽</span>
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
max-width: 1208px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin: 0 auto 16px;
|
||||
margin: 0 auto 64px;
|
||||
|
||||
&__category-name-container {
|
||||
margin-bottom: 16px;
|
||||
@ -49,7 +49,7 @@
|
||||
&__categories-container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
justify-content: flex-start;
|
||||
font-size: 14px;
|
||||
align-items: center;
|
||||
overflow-x: auto;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, ElementRef, OnInit, ViewChild } from '@angular/core';
|
||||
import { Group, Modifier, ModifiersGroup, Product } from "../../interface/data";
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import { DialogService } from 'primeng/dynamicdialog';
|
||||
@ -57,6 +57,13 @@ export class ProductsComponent implements OnInit {
|
||||
this.wpJsonService.getTerminalList()
|
||||
))
|
||||
this.terminalList = this.toTreeJson(this.keyValue(terminalList), terminalList)
|
||||
const terminalFromCookie = JSON.parse(this.cookiesService.getItem('selectedTerminal') || 'null')
|
||||
|
||||
const conditionDelete = this.terminalList.find((terminal: any) => JSON.stringify(terminal) === JSON.stringify(terminalFromCookie))
|
||||
if (!conditionDelete) {
|
||||
this.cookiesService.deleteCookie('selectedTerminal')
|
||||
}
|
||||
|
||||
this.selectedTerminal = JSON.parse(this.cookiesService.getItem('selectedTerminal') || 'null') || this.terminalList[0]
|
||||
this.cartService.changeTerminal(this.selectedTerminal)
|
||||
}
|
||||
@ -201,7 +208,7 @@ export class ProductsComponent implements OnInit {
|
||||
return Object.keys(obj)
|
||||
}
|
||||
|
||||
toTreeJson(array: Array<string>, terminalList: any) {
|
||||
toTreeJson(array: Array<string>, terminalList: any): Array<any> {
|
||||
let treeJson: Object[] = []
|
||||
for (const key of array) {
|
||||
treeJson.push(
|
||||
|
||||
@ -244,6 +244,11 @@ p-toast[key="c"] .p-toast {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.mat-tab-label-content {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
html, body { height: 100%; }
|
||||
body { margin: 0; font-family: Roboto, "Helvetica Neue", sans-serif; background: #f9f9f9; }
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user