Implement getTariffProductForProductId() in terms of

getTariffProductForProductTypeName().
This commit is contained in:
Gerhard Hoffmann 2024-04-30 13:49:49 +02:00
parent c1d5ffcf3c
commit 4ec5589f30

View File

@ -740,11 +740,16 @@ Configuration::getTariffProductForProductTypeName(QString const &permitTypeName)
std::optional<QVector<ATBTariffProduct>>
Configuration::getTariffProductForProductId(PermitType permitType) const {
QString permitTypeName(permitType);
return getTariffProductForProductTypeName(permitTypeName);
/*
QVector<ATBTariffProduct> products;
std::optional<QVector<ATBTariffProduct>> value;
products.clear();
for (auto[it, rangeEnd] = this->TariffProduct.equal_range(permitType); it != rangeEnd; ++it) {
products.append(it->second);
}
@ -754,6 +759,7 @@ Configuration::getTariffProductForProductId(PermitType permitType) const {
}
return value;
*/
}
std::optional<QVector<ATBTariffProduct>>