Commit 0d16810e authored by camilo higuita's avatar camilo higuita

quick fixes. count how many booklets int he book are

parent 197e0dd7
......@@ -511,7 +511,7 @@ const FMH::MODEL_LIST Syncer::collectAllNotes()
const FMH::MODEL_LIST Syncer::collectAllBooks()
{
return this->db->getDBData("select * from books");
return this->db->getDBData("select b.*, count(distinct bl.id) as count from books b inner join booklets bl on bl.book = b.id");
}
const QUrl Syncer::saveNoteFile(const QString &dir, const FMH::MODEL &data)
......
......@@ -53,7 +53,8 @@ Item
{
id: title
Layout.fillWidth: true
Layout.margins: space.medium
Layout.fillHeight: true
// Layout.margins: space.medium
placeholderText: qsTr("New chapter...")
font.weight: Font.Bold
font.bold: true
......@@ -153,7 +154,7 @@ Item
delegate: Maui.LabelDelegate
{
id: _delegate
label: index + " - " + model.title
label: index+1 + " - " + model.title
Connections
{
......
......@@ -63,6 +63,7 @@ StackView
// }
// ]
headBar.visible: !_holder.visible
headBar.rightContent: [
ToolButton
{
......@@ -70,6 +71,18 @@ StackView
}
]
Maui.Holder
{
id: _holder
visible: !cardsView.count
emoji: "qrc:/notepad.png"
emojiSize: iconSizes.huge
isMask: false
title : "There are not Books!"
body: "You can create new books and organize your notes"
}
Maui.GridView
{
......@@ -85,6 +98,7 @@ StackView
model: _booksModel
delegate: ItemDelegate
{
id: _delegate
......
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