Somewhat fix errors when adding an applicant
This commit is contained in:
@@ -13,11 +13,12 @@ ColumnLayout {
|
||||
saveBtn.enabled = true;
|
||||
}
|
||||
function onAddNewEmployee(added) {
|
||||
if (added)
|
||||
if (added) {
|
||||
console.log('addedsuccesfully');
|
||||
else
|
||||
contentStack.pop();
|
||||
} else {
|
||||
console.log('failedtoadd');
|
||||
contentStack.pop();
|
||||
}
|
||||
}
|
||||
|
||||
Layout.fillHeight: true
|
||||
@@ -36,33 +37,25 @@ ColumnLayout {
|
||||
font.pixelSize: 35
|
||||
text: qsTr("Mitarbeiter / Bewerber hinzufügen")
|
||||
}
|
||||
ButtonGroup {
|
||||
buttons: radio.children
|
||||
|
||||
onClicked: {
|
||||
checkFields();
|
||||
personalData.requiredField();
|
||||
}
|
||||
}
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: 50
|
||||
spacing: Dimensions.l
|
||||
|
||||
Frame {
|
||||
Layout.alignment: Qt.AlignTop
|
||||
Layout.fillWidth: true
|
||||
Layout.horizontalStretchFactor: 1
|
||||
|
||||
//implicitWidth: parent.width
|
||||
ApplicantPersonalData {
|
||||
id: personalData
|
||||
|
||||
width: parent.width
|
||||
implicitWidth: parent.width
|
||||
}
|
||||
}
|
||||
Frame {
|
||||
Layout.alignment: Qt.AlignTop
|
||||
Layout.fillWidth: true
|
||||
visible: radio.children[1].checked
|
||||
Layout.horizontalStretchFactor: 1
|
||||
|
||||
ColumnLayout {
|
||||
Layout.alignment: Qt.AlignTop
|
||||
@@ -74,7 +67,6 @@ ColumnLayout {
|
||||
}
|
||||
ApplicantNationalInsurance {
|
||||
id: nationalInsurance
|
||||
|
||||
}
|
||||
ApplicantVarious {
|
||||
id: applicantVarious
|
||||
@@ -103,7 +95,7 @@ ColumnLayout {
|
||||
|
||||
onClicked: {
|
||||
const new_applicant = JsLib.parseForm(personalData, bankAccount, nationalInsurance, applicantVarious);
|
||||
employee_model.addEmployee(new_applicant, false);
|
||||
employee_model.addEmployee(new_applicant);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user