@react-pakistan/util-functions 1.22.65 → 1.22.66

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,9 +92,9 @@ products, phone, lastName, firstName, email, country, city, address, prisma, })
92
92
  data: mappedServices,
93
93
  },
94
94
  },
95
- products: {
96
- connect: products,
97
- },
95
+ // products: {
96
+ // connect: products,
97
+ // },
98
98
  },
99
99
  include: {
100
100
  products: true,
@@ -203,22 +203,28 @@ products, phone, lastName, firstName, email, country, city, address, prisma, })
203
203
  // console.log('err', err);
204
204
  }
205
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
- // }
206
+ if (quoteInvoice) {
207
+ console.log('=>>>>>', quoteInvoice);
208
+ // products.map(async (product) => {
209
+ yield prisma.quoteInvoice.update({
210
+ where: {
211
+ id: quoteInvoice.id,
212
+ },
213
+ data: {
214
+ products: {
215
+ connect: products,
216
+ },
217
+ // quoteInvoiceId: quoteInvoice?.id,
218
+ // productId: product.id,
219
+ // productQuantity: product.productQuantity,
220
+ },
221
+ include: {
222
+ product: true,
223
+ quoteInvoice: true,
224
+ },
225
+ // });
226
+ });
227
+ }
222
228
  return quoteInvoice;
223
229
  });
224
230
  exports.postQuoteInvoice = postQuoteInvoice;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-pakistan/util-functions",
3
- "version": "1.22.65",
3
+ "version": "1.22.66",
4
4
  "description": "A library of all util functions",
5
5
  "main": "index.js",
6
6
  "scripts": {