Employee and applicant frontend and backend

This commit is contained in:
2025-02-13 09:11:26 +01:00
parent bfd1d0974d
commit 80bd2c9be2
8 changed files with 165 additions and 25 deletions

View File

@@ -71,40 +71,56 @@ Item
{
id: horizontalHeader
Layout.fillWidth: true
syncView: testTable
syncView: appliEmpTable
implicitHeight: 40
visible: false
movableColumns: true //@disable-check M16
}
TableView
{
id: testTable
id: appliEmpTable
Layout.fillHeight: true
Layout.fillWidth: true
columnSpacing: 1
rowSpacing: 2
model: business_model
model: employee_model
selectionBehavior: TableView.SelectRows
ScrollBar.vertical: ScrollBar
{
policy: appliEmpTable.contentHeight > appliEmpTable.height ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff
}
selectionModel: ItemSelectionModel
{
id: selModel
model: testTable.model
}
{
id: selModel
model: appliEmpTable.model
}
delegate:Rectangle
{
required property bool selected
required property bool current
implicitWidth: 200
//implicitWidth: 200
implicitHeight: 25
color: selected? "lightblue": palette.base
color: selected
? palette.highlight //palette.highlight
: (objectTable.alternatingRows && row % 2 !== 0
? palette.base // palette.base
: palette.alternateBase) //palette.alternateBase)
Text
{
Layout.fillWidth: true
text: model.display? model.display: ""
text: model.display === null? "": model.display
elide: Text.ElideRight
width: parent.width
height: parent.height
verticalAlignment: Text.AlignVCenter
leftPadding: 9 //@d isable-check M16
color: palette.text
}
@@ -116,16 +132,24 @@ Item
anchors.fill: parent
hoverEnabled: true
onDoubleClicked:
{
employeesStack.push("EmployeeDetails.qml", {selectedEmployee: row});
}
onEntered:
{
appliEmpTable.selectionModel.select(appliEmpTable.model.index(row, 0), ItemSelectionModel.SelectCurrent | ItemSelectionModel.Rows)
}
}
}
}
Item
{
Layout.fillWidth: true
}
}
Component.onCompleted: employeesStack.pop()