Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/#6370 #2706

Merged
merged 4 commits into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -288,11 +288,15 @@ export class AddNewHabitComponent implements OnInit {
this.friendsIdsList = this.userFriendsService.addedFriends?.map((friend) => friend.id);
const defailtItemsIds = this.standartShopList.filter((item) => item.selected === true).map((item) => item.id);
const habitAssignProperties: HabitAssignPropertiesDto = { defaultShoppingListItems: defailtItemsIds, duration: this.newDuration };
console.log(habitAssignProperties, defailtItemsIds, this.standartShopList, 'habitAssignProperties');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove console.log

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed all console.logs

this.habitAssignService
.assignCustomHabit(this.habitId, this.friendsIdsList, habitAssignProperties)
.pipe(take(1))
.subscribe(() => {
this.customShopList.length > 0 ? this.addCustomHabitItems() : this.afterHabitWasChanged('habitAdded');
if (this.customShopList.length > 0) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (this.customShopList.length)

this.addCustomHabitItems();
}
this.afterHabitWasChanged('habitAdded');
});
}

Expand Down
1 change: 1 addition & 0 deletions src/app/shared/header/header.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ export class HeaderComponent implements OnInit, OnDestroy {
this.imgAlt = this.isUBS ? 'Image ubs logo' : 'Image green city logo';
this.localeStorageService.setUbsRegistration(this.isUBS);
this.toggleHeader();
console.log(this.navLinks, 'navLinks');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the same

this.dialog.afterAllClosed.pipe(takeUntil(this.destroySub)).subscribe(() => {
this.focusDone();
});
Expand Down
2 changes: 1 addition & 1 deletion src/app/shared/ubs-footer/ubs-footer.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</div>
<div class="footer-menu_main">
<ul class="footer-menu_links">
<a href #serviceref class="pick-up-service" (click)="openAboutServicePopUp()" (keydown.enter)="onPressEnter($event)">{{
<a href #serviceref class="pick-up-service" (click)="openAboutServicePopUp($event)" (keydown.enter)="onPressEnter($event)">{{
'user.lower-nav-bar.about-us' | translate
}}</a>
<li *ngFor="let link of ubsNavLinks" role="listitem">
Expand Down
13 changes: 9 additions & 4 deletions src/app/shared/ubs-footer/ubs-footer.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, ViewChild, ElementRef } from '@angular/core';
import { Component, ViewChild, ElementRef, OnInit } from '@angular/core';
import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
import { MatDialog } from '@angular/material/dialog';
Expand All @@ -11,7 +11,7 @@ import { ubsHeaderIcons } from '../../main/image-pathes/header-icons';
templateUrl: './ubs-footer.component.html',
styleUrls: ['./ubs-footer.component.scss']
})
export class UbsFooterComponent {
export class UbsFooterComponent implements OnInit {
public footerPicture = ubsHeaderIcons;
public screenWidth = window.innerWidth;
public currentYear = new Date().getFullYear();
Expand All @@ -22,11 +22,16 @@ export class UbsFooterComponent {

constructor(private dialog: MatDialog) {}

ngOnInit() {
console.log(this.ubsNavLinks, 'ubsNavLinks');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove it

}

onResize() {
this.screenWidth = window.innerWidth;
}

public openAboutServicePopUp(): void {
public openAboutServicePopUp(event: Event): void {
event.preventDefault();
const matDialogRef = this.dialog.open(UbsPickUpServicePopUpComponent, {
hasBackdrop: true,
closeOnNavigation: true,
Expand All @@ -45,6 +50,6 @@ export class UbsFooterComponent {

public onPressEnter(event: KeyboardEvent): void {
event.preventDefault();
this.openAboutServicePopUp();
this.openAboutServicePopUp(event);
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
.page-container {
@media (min-width: 540px) {
margin-right: 6%;
}

@media (min-width: 768px) and (max-width: 820px) {
margin-right: 4%;
}

@media (min-width: 912px) and (max-width: 920px) {
margin-right: 3%;
}

button {
outline: none;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
</td>
<td>{{ getLangValue(service.name, service.nameEng) }}</td>
<td>{{ getLangValue(service.description, service.descriptionEng) }}</td>
<td>{{ service?.price | currency | localizedCurrency }}</td>
<td>{{ servicePrice | currency | localizedCurrency }}</td>
</tr>
</table>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export class UbsAdminTariffsPricingPageComponent implements OnInit, OnDestroy {
areAllCheckBoxEmpty: boolean;
limitStatus: limitStatus = null;
description;
servicePrice;
couriers;
limitsForm: FormGroup;
currentLocation;
Expand Down Expand Up @@ -365,6 +366,7 @@ export class UbsAdminTariffsPricingPageComponent implements OnInit, OnDestroy {
.pipe(takeUntil(this.destroy))
.subscribe((res: Service) => {
this.service = res;
this.servicePrice = this.service?.price * 100;
this.isLoadBar1 = false;
});
}
Expand Down