Employee/Applicant GUI and DB
This commit is contained in:
@@ -23,6 +23,16 @@ Item
|
||||
onClicked: appLoader.source = "AddApplicant.qml"
|
||||
}
|
||||
|
||||
ButtonGroup
|
||||
{
|
||||
id: criterion
|
||||
// buttons: criterion.children
|
||||
onClicked:
|
||||
{
|
||||
viewEmployees(criterion.checkedButton.text)
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout
|
||||
{
|
||||
anchors
|
||||
@@ -32,50 +42,74 @@ Item
|
||||
bottom: parent.bottom
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
|
||||
}
|
||||
|
||||
RowLayout
|
||||
{
|
||||
//id: criterion
|
||||
|
||||
RadioButton
|
||||
{
|
||||
|
||||
//id: showAll
|
||||
checked: true
|
||||
text: qsTr("Alle")
|
||||
ButtonGroup.group: criterion
|
||||
//onClicked: viewEmployees(showAll)
|
||||
}
|
||||
RadioButton
|
||||
{
|
||||
|
||||
//id: showApplicant
|
||||
text: qsTr("Bewerber")
|
||||
ButtonGroup.group: criterion
|
||||
//onClicked: viewEmployees(showApplicant)
|
||||
}
|
||||
RadioButton
|
||||
{
|
||||
|
||||
//id: showEmployee
|
||||
text: qsTr("Mitarbeiter")
|
||||
ButtonGroup.group: criterion
|
||||
//onClicked: viewEmployees(showEmployee)
|
||||
}
|
||||
RadioButton
|
||||
CheckBox
|
||||
{
|
||||
|
||||
id: showProcessed
|
||||
text: qsTr("Erledigt")
|
||||
onClicked: viewEmployees(criterion.checkedButton.text)
|
||||
}
|
||||
RadioButton
|
||||
CheckBox
|
||||
{
|
||||
|
||||
id: showFired
|
||||
text: qsTr("Ausgeschieden")
|
||||
onClicked: viewEmployees(criterion.checkedButton.text)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
HorizontalHeaderView
|
||||
{
|
||||
id: horizontalHeader
|
||||
id: employeeTableHeader
|
||||
Layout.fillWidth: true
|
||||
syncView: appliEmpTable
|
||||
implicitHeight: 40
|
||||
visible: false
|
||||
movableColumns: true //@disable-check M16
|
||||
|
||||
delegate: Rectangle
|
||||
{
|
||||
color: addEmployeeBtn.palette.alternateBase
|
||||
border.color: palette.base
|
||||
implicitHeight: 40
|
||||
Layout.fillWidth: true
|
||||
implicitWidth: 1
|
||||
Text
|
||||
{
|
||||
text: model.display
|
||||
elide: Text.ElideRight
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
color: palette.text
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
TableView
|
||||
@@ -85,6 +119,8 @@ Item
|
||||
Layout.fillWidth: true
|
||||
columnSpacing: 1
|
||||
rowSpacing: 2
|
||||
alternatingRows: true
|
||||
resizableColumns: true
|
||||
model: employee_model
|
||||
selectionBehavior: TableView.SelectRows
|
||||
|
||||
@@ -104,13 +140,13 @@ Item
|
||||
{
|
||||
required property bool selected
|
||||
required property bool current
|
||||
//implicitWidth: 200
|
||||
implicitWidth: appliEmpTable.width / appliEmpTable.columns
|
||||
implicitHeight: 25
|
||||
color: selected
|
||||
? palette.highlight //palette.highlight
|
||||
: (objectTable.alternatingRows && row % 2 !== 0
|
||||
? palette.base // palette.base
|
||||
: palette.alternateBase) //palette.alternateBase)
|
||||
? addEmployeeBtn.palette.highlight //palette.highlight
|
||||
: (appliEmpTable.alternatingRows && row % 2 !== 0
|
||||
? addEmployeeBtn.palette.base // palette.base
|
||||
: addEmployeeBtn.palette.alternateBase) //palette.alternateBase)
|
||||
|
||||
Text
|
||||
{
|
||||
@@ -152,5 +188,9 @@ Item
|
||||
}
|
||||
}
|
||||
|
||||
function viewEmployees(criterion)
|
||||
{
|
||||
employee_model.viewCriterion(criterion, showProcessed.checked, showFired.checked)
|
||||
}
|
||||
Component.onCompleted: employeesStack.pop()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user