Finished adding a client, still the GUI need some retouches
This commit is contained in:
@@ -7,6 +7,7 @@ import "../js/qmldict.js" as JsLib
|
||||
|
||||
ColumnLayout
|
||||
{
|
||||
property var new_business: null
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
spacing: 15
|
||||
@@ -249,7 +250,6 @@ ColumnLayout
|
||||
enabled: false
|
||||
onClicked:
|
||||
{
|
||||
var new_business
|
||||
if (!checkAddContact.checked)
|
||||
{
|
||||
new_business = JsLib.addBusiness(businessGrid)
|
||||
@@ -258,15 +258,9 @@ ColumnLayout
|
||||
}
|
||||
else
|
||||
{
|
||||
console.log("Contact available")
|
||||
var contact_id = 0
|
||||
new_business = JsLib.addBusiness(businessGrid)
|
||||
var new_contact = JsLib.addBusiness(addContactLayout)
|
||||
// bm.setContact(new_contact, contact_id)
|
||||
// bm.addBusiness(new_business, contact_id)
|
||||
contact_id = contact_model.addContact(new_contact)
|
||||
console.log(contact_id)
|
||||
appLoader.source = "CustomerTable.qml"
|
||||
contact_model.addContact(new_contact)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -278,6 +272,7 @@ ColumnLayout
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
|
||||
Component.onCompleted: contact_model.contactIdReady.connect(onContactId)
|
||||
|
||||
function isEmptyField()
|
||||
{
|
||||
@@ -294,5 +289,9 @@ ColumnLayout
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function onContactId(con_id)
|
||||
{
|
||||
business_model.addBusiness(new_business, con_id)// bm
|
||||
appLoader.source = "CustomerTable.qml"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user