Added Scrollview in all forms, debugged error in AddEmployee.qml
This commit is contained in:
@@ -2,9 +2,9 @@ import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import Js
|
||||
ColumnLayout {
|
||||
id: colPar
|
||||
|
||||
ScrollView
|
||||
{
|
||||
function checkFields() {
|
||||
if (!personalData.checkPersonalField())
|
||||
saveBtn.enabled = false;
|
||||
@@ -19,82 +19,90 @@ ColumnLayout {
|
||||
console.log('failedtoadd');
|
||||
}
|
||||
}
|
||||
ColumnLayout {
|
||||
id: colPar
|
||||
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
anchors.fill: parent
|
||||
implicitWidth: parent.width
|
||||
|
||||
Component.onCompleted: {
|
||||
employee_model.addedNewEmployee.connect(onAddNewEmployee);
|
||||
}
|
||||
|
||||
Label {
|
||||
id: headline
|
||||
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
|
||||
font.pixelSize: 35
|
||||
text: qsTr("Mitarbeiter / Bewerber hinzufügen")
|
||||
}
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: Dimensions.l
|
||||
|
||||
Frame {
|
||||
Layout.alignment: Qt.AlignTop
|
||||
Layout.fillWidth: true
|
||||
Layout.horizontalStretchFactor: 1
|
||||
|
||||
EmployeePersonalData {
|
||||
id: personalData
|
||||
|
||||
implicitWidth: parent.width
|
||||
}
|
||||
}
|
||||
Frame {
|
||||
Layout.alignment: Qt.AlignTop
|
||||
Layout.fillWidth: true
|
||||
Layout.horizontalStretchFactor: 1
|
||||
|
||||
ColumnLayout {
|
||||
Layout.alignment: Qt.AlignTop
|
||||
implicitWidth: parent.width
|
||||
|
||||
EmployeeBankData {
|
||||
id: bankAccount
|
||||
|
||||
}
|
||||
EmployeeNationalInsurance {
|
||||
id: nationalInsurance
|
||||
}
|
||||
EmployeeVarious {
|
||||
id: applicantVarious
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Item {
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
RowLayout {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
Layout.fillWidth: true
|
||||
anchors.fill: parent
|
||||
implicitWidth: parent.width
|
||||
|
||||
Button {
|
||||
text: qsTr("Abbrechen")
|
||||
|
||||
onClicked: contentStack.pop()
|
||||
Component.onCompleted: {
|
||||
employee_model.addedNewEmployee.connect(onAddNewEmployee);
|
||||
}
|
||||
Button {
|
||||
id: saveBtn
|
||||
|
||||
enabled: false
|
||||
text: qsTr("Speichern")
|
||||
Label {
|
||||
id: headline
|
||||
|
||||
onClicked: {
|
||||
const new_applicant = JsLib.parseForm(personalData, bankAccount, nationalInsurance, applicantVarious);
|
||||
employee_model.addEmployee(new_applicant);
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
|
||||
font.pixelSize: 35
|
||||
text: qsTr("Mitarbeiter / Bewerber hinzufügen")
|
||||
}
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: Dimensions.l
|
||||
|
||||
|
||||
|
||||
|
||||
Frame {
|
||||
Layout.alignment: Qt.AlignTop
|
||||
Layout.fillWidth: true
|
||||
Layout.horizontalStretchFactor: 1
|
||||
|
||||
EmployeePersonalData {
|
||||
id: personalData
|
||||
|
||||
implicitWidth: parent.width
|
||||
}
|
||||
}
|
||||
Frame {
|
||||
Layout.alignment: Qt.AlignTop
|
||||
Layout.fillWidth: true
|
||||
Layout.horizontalStretchFactor: 1
|
||||
|
||||
ColumnLayout {
|
||||
Layout.alignment: Qt.AlignTop
|
||||
implicitWidth: parent.width
|
||||
|
||||
EmployeeBankData {
|
||||
id: bankAccount
|
||||
|
||||
}
|
||||
EmployeeNationalInsurance {
|
||||
id: nationalInsurance
|
||||
}
|
||||
EmployeeVarious {
|
||||
id: applicantVarious
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Item {
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
RowLayout {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
Layout.fillWidth: true
|
||||
|
||||
Button {
|
||||
text: qsTr("Abbrechen")
|
||||
|
||||
onClicked: contentStack.pop()
|
||||
}
|
||||
Button {
|
||||
id: saveBtn
|
||||
|
||||
enabled: false
|
||||
text: qsTr("Speichern")
|
||||
|
||||
onClicked: {
|
||||
const new_applicant = JsLib.parseForm(personalData, bankAccount, nationalInsurance, applicantVarious);
|
||||
employee_model.addEmployee(new_applicant);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user