Commit a42d78eb authored by Volker Krause's avatar Volker Krause

Adapt deletion action to support multi-traveler elements

parent 3670fa5e
......@@ -49,8 +49,8 @@ Kirigami.ScrollablePage {
text: i18n("Delete")
icon.name: "edit-delete"
onClicked: {
_reservationManager.removeReservation(root.resId)
applicationWindow().pageStack.pop()
_reservationManager.removeReservations(root.resIds);
applicationWindow().pageStack.pop();
}
}
}
......
......@@ -221,6 +221,12 @@ void ReservationManager::removeReservation(const QString& id)
m_reservations.remove(id);
}
void ReservationManager::removeReservations(const QStringList& ids)
{
for (const auto &id : ids)
removeReservation(id);
}
void ReservationManager::passAdded(const QString& passId)
{
const auto pass = m_passMgr->pass(passId);
......
......@@ -45,6 +45,7 @@ public:
Q_INVOKABLE void addReservation(const QVariant &res);
Q_INVOKABLE void updateReservation(const QString &resId, const QVariant &res);
Q_INVOKABLE void removeReservation(const QString &id);
Q_INVOKABLE void removeReservations(const QStringList &ids);
void importReservation(const QByteArray &data);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment