added place to telecommunication, added contract documents, added invoice to other contracts

This commit is contained in:
2026-03-25 16:55:48 +01:00
parent eaa94e766a
commit 3dd4f7b656
30 changed files with 3424 additions and 90 deletions
+8
View File
@@ -138,6 +138,8 @@ async function getContractById(id, decryptPassword = false) {
tvDetails: true,
carInsuranceDetails: true,
stressfreiEmail: true,
invoices: { orderBy: { invoiceDate: 'desc' } },
documents: { orderBy: { createdAt: 'desc' } },
followUpContract: {
select: { id: true, contractNumber: true, status: true },
},
@@ -183,6 +185,9 @@ async function createContract(data) {
internetPasswordEncrypted: internetDetails.internetPassword
? (0, encryption_js_1.encrypt)(internetDetails.internetPassword)
: undefined,
propertyType: internetDetails.propertyType,
propertyLocation: internetDetails.propertyLocation,
connectionLocation: internetDetails.connectionLocation,
homeId: internetDetails.homeId,
activationCode: internetDetails.activationCode,
phoneNumbers: internetDetails.phoneNumbers && internetDetails.phoneNumbers.length > 0
@@ -321,6 +326,9 @@ async function updateContract(id, data) {
...(internetPassword
? { internetPasswordEncrypted: (0, encryption_js_1.encrypt)(internetPassword) }
: {}),
propertyType: internetData.propertyType,
propertyLocation: internetData.propertyLocation,
connectionLocation: internetData.connectionLocation,
homeId: internetData.homeId,
activationCode: internetData.activationCode,
};