@dascompany/product 3.2.0 → 3.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/SQL.json
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"accountCompanyDetails": {
|
|
26
26
|
"select": "SELECT * FROM clients.account_company_details WHERE account_id = $account_id::BIGINT",
|
|
27
27
|
"insert": "INSERT INTO clients.account_company_details(account_id, company_details_id) VALUES ($account_id::BIGINT, $company_details_id::BIGINT)",
|
|
28
|
-
"delete": "DELETE FROM clients.account_company_details"
|
|
28
|
+
"delete": "DELETE FROM clients.account_company_details WHERE company_details_id = $company_details_id::BIGINT"
|
|
29
29
|
},
|
|
30
30
|
"deliveryDetails": {
|
|
31
31
|
"select": "SELECT * FROM personal_information.delivery_details",
|
|
@@ -22,6 +22,6 @@ export default class Client extends StockObject {
|
|
|
22
22
|
addCompanyDetails(companyDetailsId: number): Promise<void>;
|
|
23
23
|
addDeliveryDetails(deliveryDetailsId: number): Promise<void>;
|
|
24
24
|
deleteDeliveryDetails(deliveryDetailsId: number): Promise<void>;
|
|
25
|
-
|
|
25
|
+
deleteCompanyDetails(companyDetailsId: number): Promise<void>;
|
|
26
26
|
protected getMapper(): StockObjectMapper;
|
|
27
27
|
}
|
|
@@ -78,7 +78,7 @@ export default class Client extends StockObject {
|
|
|
78
78
|
const deliveryDetails = await DeliveryDetailsRepo.get(createQueryOptionsForId(deliveryDetailsId));
|
|
79
79
|
deliveryDetails.delete();
|
|
80
80
|
}
|
|
81
|
-
async
|
|
81
|
+
async deleteCompanyDetails(companyDetailsId) {
|
|
82
82
|
await DatabaseConnection.getInstance().accountCompanyDetails.delete(companyDetailsId);
|
|
83
83
|
if (this.companyDetailsId == companyDetailsId) {
|
|
84
84
|
this.setCompanyDetailsId(null);
|