@react-pakistan/util-functions 1.22.83 → 1.22.85

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.
@@ -67,9 +67,7 @@ const postQuotesInvoices = (_c) => __awaiter(void 0, [_c], void 0, function* ({
67
67
  return quotesInvoices;
68
68
  });
69
69
  exports.postQuotesInvoices = postQuotesInvoices;
70
- const postQuoteInvoice = (_d) => __awaiter(void 0, [_d], void 0, function* ({ category, companyId, currency, customerId, date, discount, discountUnit, expiryDate, id, mode, note, ref, services, status, subTotal, taxValue, total,
71
- // productIds,
72
- products, createdAt, phone, lastName, firstName, email, country, city, address, prisma, }) {
70
+ const postQuoteInvoice = (_d) => __awaiter(void 0, [_d], void 0, function* ({ category, companyId, currency, customerId, date, discount, discountUnit, expiryDate, id, mode, note, ref, services, status, subTotal, taxValue, total, products, createdAt, phone, lastName, firstName, email, country, city, address, prisma, }) {
73
71
  var _e;
74
72
  let quoteInvoice;
75
73
  if (mode === 'Create') {
@@ -106,28 +104,22 @@ products, createdAt, phone, lastName, firstName, email, country, city, address,
106
104
  })),
107
105
  include: {
108
106
  products: true,
107
+ services: true,
109
108
  },
110
109
  });
111
- const res = yield (products === null || products === void 0 ? void 0 : products.forEach((_f) => __awaiter(void 0, [_f], void 0, function* ({ id: _id, productQuantity }) {
110
+ yield (products === null || products === void 0 ? void 0 : products.forEach((_f) => __awaiter(void 0, [_f], void 0, function* ({ id: _id, productQuantity }) {
112
111
  yield prisma.quotesInvoicesOnStellarProducts.create({
113
112
  data: {
114
113
  quoteInvoiceId: quoteInvoice === null || quoteInvoice === void 0 ? void 0 : quoteInvoice.id,
115
114
  productId: _id,
116
115
  productQuantity,
117
116
  },
117
+ include: {
118
+ quoteInvoice: true,
119
+ product: true,
120
+ },
118
121
  });
119
122
  })));
120
- console.log('->', res);
121
- // await prisma.quotesInvoicesOnStellarProducts.create({
122
- // data: {
123
- // quoteInvoiceId: quoteInvoice.id,
124
- // productId: productIds[0].id,
125
- // },
126
- // include: {
127
- // product: true,
128
- // quoteInvoice: true,
129
- // },
130
- // });
131
123
  }
132
124
  else {
133
125
  quoteInvoice = yield prisma.quoteInvoice.create({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-pakistan/util-functions",
3
- "version": "1.22.83",
3
+ "version": "1.22.85",
4
4
  "description": "A library of all util functions",
5
5
  "main": "index.js",
6
6
  "scripts": {