closes #4: Favorite buttons has been extended with category buttons.

This commit is contained in:
2023-05-17 21:31:32 +02:00
parent 5b5f31f64d
commit 5b77337b3f
33 changed files with 596 additions and 106 deletions
+1 -1
View File
@@ -125,7 +125,7 @@ void CampGrid::addToVoucher(const CampDataPtr& data)
shopSrv.addShopItem(voucher, campItem, 1);
shopSrv.calculate(voucher);
shopSrv.saveVoucher(voucher);
shopSrv.save(voucher);
data->setOnVoucher(true);
+5 -1
View File
@@ -357,8 +357,12 @@ void CampService::addAccFee(const CampDataPtr& data, const AddressItemPtr& item,
}
}
QList<IShopItemPtr> CampService::shopItems()
QList<IShopItemPtr> CampService::shopItems(const QString& category)
{
if (!category.isEmpty()) {
return {};
}
CampShopItemPtr item(new CampShopItem);
QList<IShopItemPtr> items;
+1 -1
View File
@@ -36,7 +36,7 @@ private:
// ISellableService interface
public:
QList<IShopItemPtr> shopItems() override;
QList<IShopItemPtr> shopItems(const QString& category = "") override;
IShopItemPtr shopItem(int itemId) override;
void addedToVoucher(int itemId, int countAdded) override;
ISeller *seller() override;
+2 -2
View File
@@ -28,7 +28,7 @@ Enums::VatType CampShopItem::vatType()
return m_vatType;
}
QString CampShopItem::pluginId()
QString CampShopItem::pluginId() const
{
return "CAMP";
}
@@ -48,7 +48,7 @@ void CampShopItem::setVatType(const Enums::VatType &vatType)
m_vatType = vatType;
}
long CampShopItem::id()
long CampShopItem::id() const
{
return m_id;
}
+2 -2
View File
@@ -10,12 +10,12 @@ public:
// IShopItem interface
public:
long id() override;
long id() const override;
QString name() override;
QString shortName() override;
QDecDouble unitPrice() override;
Enums::VatType vatType() override;
QString pluginId() override;
QString pluginId() const override;
// ShopItem interface
public: