Merge latest duckie main with login UI

This commit is contained in:
Lorenzune
2026-04-21 11:53:30 +02:00
39 changed files with 1724 additions and 226 deletions
+10
View File
@@ -117,4 +117,14 @@ export class FurnitureOffer implements IPurchasableOffer
{
return true;
}
public get itemIds(): string
{
return String(this._furniData?.id ?? '');
}
public get haveOffer(): boolean
{
return false;
}
}
+2
View File
@@ -22,4 +22,6 @@ export interface IPurchasableOffer
localizationDescription: string;
isLazy: boolean;
products: IProduct[];
itemIds: string;
haveOffer: boolean;
}
+16 -2
View File
@@ -30,8 +30,10 @@ export class Offer implements IPurchasableOffer
private _products: IProduct[];
private _badgeCode: string;
private _bundlePurchaseAllowed: boolean = false;
private _itemIds: string = '';
private _haveOffer: boolean = false;
constructor(offerId: number, localizationId: string, isRentOffer: boolean, priceInCredits: number, priceInActivityPoints: number, activityPointType: number, giftable: boolean, clubLevel: number, products: IProduct[], bundlePurchaseAllowed: boolean)
constructor(offerId: number, localizationId: string, isRentOffer: boolean, priceInCredits: number, priceInActivityPoints: number, activityPointType: number, giftable: boolean, clubLevel: number, products: IProduct[], bundlePurchaseAllowed: boolean, itemIds: string = '', haveOffer: boolean = false)
{
this._offerId = offerId;
this._localizationId = localizationId;
@@ -43,6 +45,8 @@ export class Offer implements IPurchasableOffer
this._clubLevel = clubLevel;
this._products = products;
this._bundlePurchaseAllowed = bundlePurchaseAllowed;
this._itemIds = itemIds || '';
this._haveOffer = haveOffer;
this.setPricingModelForProducts();
this.setPricingType();
@@ -182,6 +186,16 @@ export class Offer implements IPurchasableOffer
return this._products;
}
public get itemIds(): string
{
return this._itemIds;
}
public get haveOffer(): boolean
{
return this._haveOffer;
}
private setPricingModelForProducts(): void
{
const products = Product.stripAddonProducts(this._products);
@@ -244,7 +258,7 @@ export class Offer implements IPurchasableOffer
products.push(new Product(product.productType, product.productClassId, product.extraParam, product.productCount, productData, furnitureData));
}
const offer = new Offer(this.offerId, this.localizationId, this.isRentOffer, this.priceInCredits, this.priceInActivityPoints, this.activityPointType, this.giftable, this.clubLevel, products, this.bundlePurchaseAllowed);
const offer = new Offer(this.offerId, this.localizationId, this.isRentOffer, this.priceInCredits, this.priceInActivityPoints, this.activityPointType, this.giftable, this.clubLevel, products, this.bundlePurchaseAllowed, this.itemIds, this.haveOffer);
offer.page = this.page;