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