mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-20 15:36:18 +00:00
🆙 Fix Catalog editor
This commit is contained in:
@@ -117,4 +117,9 @@ export class FurnitureOffer implements IPurchasableOffer
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public get itemIds(): string
|
||||
{
|
||||
return String(this._furniData?.id ?? '');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,4 +22,5 @@ export interface IPurchasableOffer
|
||||
localizationDescription: string;
|
||||
isLazy: boolean;
|
||||
products: IProduct[];
|
||||
itemIds: string;
|
||||
}
|
||||
|
||||
@@ -30,8 +30,9 @@ export class Offer implements IPurchasableOffer
|
||||
private _products: IProduct[];
|
||||
private _badgeCode: string;
|
||||
private _bundlePurchaseAllowed: boolean = false;
|
||||
private _itemIds: string = '';
|
||||
|
||||
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 = '')
|
||||
{
|
||||
this._offerId = offerId;
|
||||
this._localizationId = localizationId;
|
||||
@@ -43,6 +44,7 @@ export class Offer implements IPurchasableOffer
|
||||
this._clubLevel = clubLevel;
|
||||
this._products = products;
|
||||
this._bundlePurchaseAllowed = bundlePurchaseAllowed;
|
||||
this._itemIds = itemIds || '';
|
||||
|
||||
this.setPricingModelForProducts();
|
||||
this.setPricingType();
|
||||
@@ -174,6 +176,11 @@ export class Offer implements IPurchasableOffer
|
||||
return this._products;
|
||||
}
|
||||
|
||||
public get itemIds(): string
|
||||
{
|
||||
return this._itemIds;
|
||||
}
|
||||
|
||||
private setPricingModelForProducts(): void
|
||||
{
|
||||
const products = Product.stripAddonProducts(this._products);
|
||||
@@ -236,7 +243,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);
|
||||
|
||||
offer.page = this.page;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user