Fehler
This commit is contained in:
103
Gui/BackupSettings.qml
Normal file
103
Gui/BackupSettings.qml
Normal file
@@ -0,0 +1,103 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Dialogs
|
||||
|
||||
GridLayout
|
||||
{
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: 150
|
||||
columns: 2
|
||||
Label
|
||||
{
|
||||
Layout.columnSpan: 2
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
text: qsTr("Sicherung")
|
||||
font.pixelSize: 35
|
||||
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
text: qsTr("Konfiguration")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
|
||||
}
|
||||
Button
|
||||
{
|
||||
id: saveConfig
|
||||
text: qsTr("Jetzt sichern!")
|
||||
onClicked: settingsFileDialog.open()
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Verschlüsselung")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
Button
|
||||
{
|
||||
id: saveEncryption
|
||||
text: qsTr("Jetzt sichern!")
|
||||
onClicked: Firsts.open()
|
||||
}
|
||||
Item
|
||||
{
|
||||
id: spacer
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
Dialog
|
||||
{
|
||||
anchors.centerIn: parent
|
||||
id: dialog
|
||||
title: "Title"
|
||||
standardButtons: Dialog.Apply | Dialog.Cancel
|
||||
|
||||
onApplied:
|
||||
{
|
||||
|
||||
if (configPwd.text === repeatConfigPwd.text)
|
||||
{ console.log("true")
|
||||
saveConfigFile.open()
|
||||
}
|
||||
else
|
||||
{
|
||||
configPwd.text = ""
|
||||
configPwd.placeholderText = qsTr("Passwort stimmt nicht überein")
|
||||
configPwd.placeholderTextColor = "red"
|
||||
repeatConfigPwd.placeholderText = qsTr("")
|
||||
repeatConfigPwd.text = ""
|
||||
console.log("false")
|
||||
}
|
||||
}
|
||||
onRejected: console.log("Cancel clicked")
|
||||
GridLayout
|
||||
{
|
||||
columns: 2
|
||||
Label
|
||||
{
|
||||
text: qsTr("Passwort eingeben")
|
||||
}
|
||||
TextField
|
||||
{
|
||||
id: configPwd
|
||||
placeholderText: qsTr("Sicherungspasswort festlegen")
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Passwort wiederholen")
|
||||
}
|
||||
TextField
|
||||
{
|
||||
id: repeatConfigPwd
|
||||
placeholderText: qsTr("Sicherungspasswort wiederholen")
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
FileDialog
|
||||
{
|
||||
id: saveConfigFile
|
||||
fileMode: FileDialog.SaveFile
|
||||
|
||||
}
|
||||
}
|
||||
17
Gui/CompanyConf.qml
Normal file
17
Gui/CompanyConf.qml
Normal file
@@ -0,0 +1,17 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
|
||||
Item
|
||||
{
|
||||
property string name: "company"
|
||||
anchors.fill: parent
|
||||
|
||||
Label
|
||||
{
|
||||
text: qsTr("Das Unternehmen")
|
||||
anchors.centerIn: parent
|
||||
font.pixelSize: 57
|
||||
font.bold: true
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,10 @@ Item
|
||||
{
|
||||
property string recpass: ""
|
||||
property bool adminAvailable: true
|
||||
property alias recoverEnc: recoveryPaswordDialog
|
||||
property alias first: firstStartItem
|
||||
|
||||
id: firstStartItem
|
||||
anchors.fill: parent
|
||||
StackView
|
||||
{
|
||||
@@ -87,6 +90,7 @@ Item
|
||||
|
||||
Dialog
|
||||
{
|
||||
|
||||
id: recoveryPaswordDialog
|
||||
modal: true
|
||||
title: qsTr("Wiederherstellung")
|
||||
@@ -115,6 +119,19 @@ Item
|
||||
implicitWidth: 300
|
||||
placeholderText: qsTr("Hier Wiederherstellungspasswort eingeben")
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Wiederherstellungspasswort eingeben: ")
|
||||
}
|
||||
|
||||
TextField
|
||||
{
|
||||
id: repeatRecoveryPaswordInput
|
||||
text: ""
|
||||
echoMode: TextInput.Password
|
||||
implicitWidth: 300
|
||||
placeholderText: qsTr("Hier Wiederherstellungspasswort eingeben")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -231,6 +231,25 @@ GridLayout
|
||||
}
|
||||
}
|
||||
|
||||
Component
|
||||
{
|
||||
id: highlight
|
||||
Rectangle
|
||||
{
|
||||
width: 230; height: 15
|
||||
color: "lightsteelblue"; radius: 5
|
||||
y: contactView.currentItem.y
|
||||
Behavior on y
|
||||
{
|
||||
SpringAnimation
|
||||
{
|
||||
spring: 3
|
||||
damping: 0.2
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle
|
||||
{
|
||||
id: mainRect
|
||||
@@ -242,6 +261,7 @@ GridLayout
|
||||
ListView
|
||||
{
|
||||
id: contactView
|
||||
|
||||
implicitHeight: parent.height
|
||||
implicitWidth: parent.width
|
||||
model: contactModel
|
||||
@@ -249,10 +269,13 @@ GridLayout
|
||||
highlight: Rectangle { color: "grey"}
|
||||
highlightFollowsCurrentItem: false
|
||||
|
||||
|
||||
onActiveFocusChanged: if(!focus) currentIndex = -1
|
||||
delegate: Item
|
||||
|
||||
{
|
||||
width: contactView.width
|
||||
|
||||
height: 15
|
||||
MouseArea
|
||||
{
|
||||
@@ -264,6 +287,7 @@ GridLayout
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Row
|
||||
{
|
||||
//spacing: 9
|
||||
@@ -297,6 +321,8 @@ GridLayout
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
108
Gui/PyqcrmConf.qml
Normal file
108
Gui/PyqcrmConf.qml
Normal file
@@ -0,0 +1,108 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
Item
|
||||
{
|
||||
anchors.fill: parent
|
||||
TabBar
|
||||
{
|
||||
id: bar
|
||||
width: parent.width
|
||||
TabButton
|
||||
{
|
||||
text: qsTr("Benutzer")
|
||||
}
|
||||
TabButton
|
||||
{
|
||||
text: qsTr("Datenbank")
|
||||
}
|
||||
TabButton
|
||||
{
|
||||
text: qsTr("Das Unternehmen")
|
||||
}
|
||||
TabButton
|
||||
{
|
||||
text: qsTr("Sicherung")
|
||||
}
|
||||
}
|
||||
|
||||
StackLayout
|
||||
{
|
||||
id: confContainer
|
||||
anchors.fill: parent
|
||||
currentIndex: bar.currentIndex
|
||||
Item
|
||||
{
|
||||
id: userTab
|
||||
UsersPage
|
||||
{
|
||||
id: usersPage
|
||||
anchors.fill: parent
|
||||
}
|
||||
}
|
||||
Item
|
||||
{
|
||||
id: dbTab
|
||||
DbConfiguration
|
||||
{
|
||||
id: dbConf
|
||||
anchors.fill: parent
|
||||
}
|
||||
}
|
||||
Item
|
||||
{
|
||||
id: companyTab
|
||||
CompanyConf
|
||||
{
|
||||
id: companyConf
|
||||
anchors.fill: parent
|
||||
}
|
||||
}
|
||||
Item
|
||||
{
|
||||
id: backup
|
||||
BackupSettings
|
||||
{
|
||||
id: backupSettings
|
||||
anchors.fill: parent
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout
|
||||
{
|
||||
width: parent.width
|
||||
anchors.bottom: parent.bottom
|
||||
Item
|
||||
{
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
Button
|
||||
{
|
||||
text: qsTr("Ablehnen")
|
||||
onClicked: appLoader.source = "Dashboard.qml"
|
||||
}
|
||||
|
||||
Button
|
||||
{
|
||||
text: qsTr("Speichern")
|
||||
onClicked:
|
||||
{
|
||||
switch (confContainer.currentIndex)
|
||||
{
|
||||
case 1:
|
||||
console.log("Need to update DB paramenters")
|
||||
break
|
||||
|
||||
case 2:
|
||||
console.log("Need to update company's info.")
|
||||
break
|
||||
default:
|
||||
console.log("Need to handle users")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -178,8 +178,15 @@ RowLayout
|
||||
id: mainMenu
|
||||
MenuItem
|
||||
{
|
||||
text: qsTr("Benutzer-Verwaltung")
|
||||
onTriggered: appLoader.source = "UsersPage.qml"
|
||||
//text: qsTr("Benutzer-Verwaltung")
|
||||
//onTriggered: appLoader.source = "UsersPage.qml"
|
||||
text: qsTr("Einstellungen")
|
||||
onTriggered:
|
||||
{
|
||||
// TODO: Check if logged-in user is admin first!!
|
||||
|
||||
appLoader.source = "PyqcrmConf.qml"
|
||||
}
|
||||
}
|
||||
MenuSeparator {}
|
||||
MenuItem { text: qsTr("Als PDF exportieren") }
|
||||
|
||||
@@ -4,6 +4,7 @@ import QtQuick.Controls
|
||||
|
||||
Item
|
||||
{
|
||||
property string name: "users"
|
||||
anchors.fill: parent
|
||||
|
||||
Label
|
||||
|
||||
@@ -12,6 +12,7 @@ ApplicationWindow
|
||||
visible: true
|
||||
title: "PYQCRM"
|
||||
property string confile: ""
|
||||
property alias settingsFileDialog: settingsFiledialog
|
||||
|
||||
TopBar
|
||||
{
|
||||
@@ -80,12 +81,13 @@ ApplicationWindow
|
||||
anchors.centerIn: parent
|
||||
standardButtons: Dialog.Yes | Dialog.No
|
||||
onAccepted: settingsFiledialog.open()
|
||||
onRejected: appLoader.source= "firststart.qml"
|
||||
onRejected: appLoader.source= "Firststart.qml"
|
||||
title: qsTr("Einstellungen importieren")
|
||||
}
|
||||
|
||||
FileDialog
|
||||
{
|
||||
|
||||
id: settingsFiledialog
|
||||
title: qsTr("PYQCRM Einstellungen")
|
||||
currentFolder: StandardPaths.standardLocations(StandardPaths.DocumentsLocation)[0]
|
||||
|
||||
1
enc_key_backup.txt
Normal file
1
enc_key_backup.txt
Normal file
@@ -0,0 +1 @@
|
||||
Lj30yFOP7hJmY5Cub1Go8fJz0UE+Zyo9cEqNxfY23Sc=
|
||||
24
pyqcrm.qrc
24
pyqcrm.qrc
@@ -1,24 +0,0 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>qtquickcontrols2.conf</file>
|
||||
<file>images/add.svg</file>
|
||||
<file>images/addbusiness.svg</file>
|
||||
<file>images/addperson.svg</file>
|
||||
<file>images/filter.svg</file>
|
||||
<file>images/menu.svg</file>
|
||||
<file>images/search.svg</file>
|
||||
<file>sounds/error.ogg</file>
|
||||
<file>sounds/fail2c.ogg</file>
|
||||
<file>sounds/puzzerr.ogg</file>
|
||||
<file>sounds/sysnotify.ogg</file>
|
||||
<file>sounds/wrong.ogg</file>
|
||||
<file>fonts/Damarwulan.ttf</file>
|
||||
<file>fonts/HelloStranger.otf</file>
|
||||
<file>fonts/HussarPrintA.otf</file>
|
||||
<file>fonts/LittleBirdsRegular.ttf</file>
|
||||
<file>fonts/ReginaldScript.ttf</file>
|
||||
<file>images/account.svg</file>
|
||||
<file>README</file>
|
||||
<file>LICENSE</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
46
qml.qrc
46
qml.qrc
@@ -1,46 +0,0 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>Gui/TopBar.qml</file>
|
||||
<file>Gui/AdminUserConfig.qml</file>
|
||||
<file>Gui/EncryptionKey.qml</file>
|
||||
<file>Gui/DbConfiguration.qml</file>
|
||||
<file>Gui/LoginScreen.qml</file>
|
||||
<file>Gui/AddContact.qml</file>
|
||||
<file>Gui/AddCustomer.qml</file>
|
||||
<file>Gui/CustomerTable.qml</file>
|
||||
<file>Gui/Dashboard.qml</file>
|
||||
<file>Gui/EmployeeTable.qml</file>
|
||||
<file>Gui/firststart.qml</file>
|
||||
<file>Gui/main.qml</file>
|
||||
<file>Gui/SearchBar.qml</file>
|
||||
<file>js/qmldict.js</file>
|
||||
<file>Gui/CustomerView.qml</file>
|
||||
<file>Gui/NoDbConnection.qml</file>
|
||||
<file>Gui/Notifications.qml</file>
|
||||
<file>Gui/ObjectTable.qml</file>
|
||||
<file>Gui/AddObject.qml</file>
|
||||
<file>Gui/ObjectView.qml</file>
|
||||
<file>Gui/ObjectAddOns.qml</file>
|
||||
<file>Gui/ObjectAddOnContactPerson.qml</file>
|
||||
<file>Gui/ObjectAddOnEmployee.qml</file>
|
||||
<file>Gui/AddObjectEmployee.qml</file>
|
||||
<file>Gui/AddApplicant.qml</file>
|
||||
<file>Gui/ApplicantPersonalData.qml</file>
|
||||
<file>Gui/ApplicantBankData.qml</file>
|
||||
<file>Gui/ApplicantNationalInsurance.qml</file>
|
||||
<file>Gui/ApplicantVarious.qml</file>
|
||||
<file>Gui/CustomersTable.qml</file>
|
||||
<file>Gui/CustomerDetails.qml</file>
|
||||
<file>Gui/ObjectsTable.qml</file>
|
||||
<file>Gui/EmployeesTable.qml</file>
|
||||
<file>Gui/EmployeeDetails.qml</file>
|
||||
<file>Gui/ObjectDetails.qml</file>
|
||||
<file>Gui/AddNewObject.qml</file>
|
||||
<file>Gui/PrinterDialog.qml</file>
|
||||
<file>Gui/CustomerContactDetails.qml</file>
|
||||
<file>Gui/NoCustomerContact.qml</file>
|
||||
<file>Gui/CustomerDetailsView.qml</file>
|
||||
<file>Gui/ReadMe.qml</file>
|
||||
<file>Gui/UsersPage.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
Reference in New Issue
Block a user