@react-pakistan/util-functions 1.22.60 → 1.22.62
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.
|
@@ -92,6 +92,9 @@ products, phone, lastName, firstName, email, country, city, address, prisma, })
|
|
|
92
92
|
data: mappedServices,
|
|
93
93
|
},
|
|
94
94
|
},
|
|
95
|
+
products: {
|
|
96
|
+
create: products,
|
|
97
|
+
},
|
|
95
98
|
},
|
|
96
99
|
include: {
|
|
97
100
|
products: true,
|
|
@@ -145,19 +148,6 @@ products, phone, lastName, firstName, email, country, city, address, prisma, })
|
|
|
145
148
|
});
|
|
146
149
|
}
|
|
147
150
|
}
|
|
148
|
-
products.map((product) => __awaiter(void 0, void 0, void 0, function* () {
|
|
149
|
-
yield prisma.quotesInvoicesOnStellarProducts.create({
|
|
150
|
-
data: {
|
|
151
|
-
quoteInvoiceId: quoteInvoice === null || quoteInvoice === void 0 ? void 0 : quoteInvoice.id,
|
|
152
|
-
productId: product.id,
|
|
153
|
-
productQuantity: product.productQuantity,
|
|
154
|
-
},
|
|
155
|
-
include: {
|
|
156
|
-
product: true,
|
|
157
|
-
quoteInvoice: true,
|
|
158
|
-
},
|
|
159
|
-
});
|
|
160
|
-
}));
|
|
161
151
|
if (mode === 'Edit') {
|
|
162
152
|
try {
|
|
163
153
|
const foundQuoteInvoice = yield prisma.quoteInvoice.findUnique({
|
|
@@ -213,6 +203,22 @@ products, phone, lastName, firstName, email, country, city, address, prisma, })
|
|
|
213
203
|
// console.log('err', err);
|
|
214
204
|
}
|
|
215
205
|
}
|
|
206
|
+
// if (quoteInvoice) {
|
|
207
|
+
// console.log('=>>>>>', quoteInvoice);
|
|
208
|
+
// products.map(async (product) => {
|
|
209
|
+
// await prisma.quotesInvoicesOnStellarProducts.create({
|
|
210
|
+
// data: {
|
|
211
|
+
// quoteInvoiceId: quoteInvoice?.id,
|
|
212
|
+
// productId: product.id,
|
|
213
|
+
// productQuantity: product.productQuantity,
|
|
214
|
+
// },
|
|
215
|
+
// include: {
|
|
216
|
+
// product: true,
|
|
217
|
+
// quoteInvoice: true,
|
|
218
|
+
// },
|
|
219
|
+
// });
|
|
220
|
+
// });
|
|
221
|
+
// }
|
|
216
222
|
return quoteInvoice;
|
|
217
223
|
});
|
|
218
224
|
exports.postQuoteInvoice = postQuoteInvoice;
|