mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 00:13:53 +02:00
inventory text filter
This commit is contained in:
parent
2761688d39
commit
348d5fc359
5 changed files with 7 additions and 5 deletions
|
@ -560,6 +560,7 @@ Rectangle {
|
|||
Commerce.inventory(
|
||||
root.isShowingMyItems ? "proofs" : "purchased",
|
||||
filterBar.primaryFilter_filterName.toLowerCase(),
|
||||
filterBar.text,
|
||||
purchasesModel.currentPageToRetrieve,
|
||||
purchasesModel.itemsPerPage
|
||||
);
|
||||
|
|
|
@ -134,10 +134,11 @@ void Ledger::balance(const QStringList& keys) {
|
|||
keysQuery("balance", "balanceSuccess", "balanceFailure");
|
||||
}
|
||||
|
||||
void Ledger::inventory(const QString& editionFilter, const QString& typeFilter, const int& page, const int& perPage) {
|
||||
void Ledger::inventory(const QString& editionFilter, const QString& typeFilter, const QString& titleFilter, const int& page, const int& perPage) {
|
||||
QJsonObject params;
|
||||
params["edition_filter"] = editionFilter;
|
||||
params["type_filter"] = typeFilter;
|
||||
params["title_filter"] = titleFilter;
|
||||
params["page"] = page;
|
||||
params["per_page"] = perPage;
|
||||
keysQuery("inventory", "inventorySuccess", "inventoryFailure", params);
|
||||
|
|
|
@ -28,7 +28,7 @@ public:
|
|||
void buy(const QString& hfc_key, int cost, const QString& asset_id, const QString& inventory_key, const bool controlled_failure = false);
|
||||
bool receiveAt(const QString& hfc_key, const QString& signing_key);
|
||||
void balance(const QStringList& keys);
|
||||
void inventory(const QString& editionFilter, const QString& typeFilter, const int& page, const int& perPage);
|
||||
void inventory(const QString& editionFilter, const QString& typeFilter, const QString& titleFilter, const int& page, const int& perPage);
|
||||
void history(const QStringList& keys, const int& pageNumber, const int& itemsPerPage);
|
||||
void account();
|
||||
void updateLocation(const QString& asset_id, const QString& location, const bool& alsoUpdateSiblings = false, const bool controlledFailure = false);
|
||||
|
|
|
@ -105,12 +105,12 @@ void QmlCommerce::balance() {
|
|||
}
|
||||
}
|
||||
|
||||
void QmlCommerce::inventory(const QString& editionFilter, const QString& typeFilter, const int& page, const int& perPage) {
|
||||
void QmlCommerce::inventory(const QString& editionFilter, const QString& typeFilter, const QString& titleFilter, const int& page, const int& perPage) {
|
||||
auto ledger = DependencyManager::get<Ledger>();
|
||||
auto wallet = DependencyManager::get<Wallet>();
|
||||
QStringList cachedPublicKeys = wallet->listPublicKeys();
|
||||
if (!cachedPublicKeys.isEmpty()) {
|
||||
ledger->inventory(editionFilter, typeFilter, page, perPage);
|
||||
ledger->inventory(editionFilter, typeFilter, titleFilter, page, perPage);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ protected:
|
|||
|
||||
Q_INVOKABLE void buy(const QString& assetId, int cost, const bool controlledFailure = false);
|
||||
Q_INVOKABLE void balance();
|
||||
Q_INVOKABLE void inventory(const QString& editionFilter = QString(), const QString& typeFilter = QString(), const int& page = 1, const int& perPage = 20);
|
||||
Q_INVOKABLE void inventory(const QString& editionFilter = QString(), const QString& typeFilter = QString(), const QString& titleFilter = QString(), const int& page = 1, const int& perPage = 20);
|
||||
Q_INVOKABLE void history(const int& pageNumber, const int& itemsPerPage = 100);
|
||||
Q_INVOKABLE void generateKeyPair();
|
||||
Q_INVOKABLE void account();
|
||||
|
|
Loading…
Reference in a new issue