@react-pakistan/util-functions 1.22.58 → 1.22.60

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.
@@ -97,19 +97,6 @@ products, phone, lastName, firstName, email, country, city, address, prisma, })
97
97
  products: true,
98
98
  },
99
99
  });
100
- products.map((_e) => __awaiter(void 0, [_e], void 0, function* ({ id: __id, productQuantity }) {
101
- yield prisma.quotesInvoicesOnStellarProducts.create({
102
- data: {
103
- quoteInvoiceId: quoteInvoice === null || quoteInvoice === void 0 ? void 0 : quoteInvoice.id,
104
- productId: __id,
105
- productQuantity,
106
- },
107
- include: {
108
- product: true,
109
- quoteInvoice: true,
110
- },
111
- });
112
- }));
113
100
  // await prisma.quotesInvoicesOnStellarProducts.create({
114
101
  // data: {
115
102
  // quoteInvoiceId: quoteInvoice.id,
@@ -158,6 +145,19 @@ products, phone, lastName, firstName, email, country, city, address, prisma, })
158
145
  });
159
146
  }
160
147
  }
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
161
  if (mode === 'Edit') {
162
162
  try {
163
163
  const foundQuoteInvoice = yield prisma.quoteInvoice.findUnique({
@@ -216,7 +216,7 @@ products, phone, lastName, firstName, email, country, city, address, prisma, })
216
216
  return quoteInvoice;
217
217
  });
218
218
  exports.postQuoteInvoice = postQuoteInvoice;
219
- const deleteQuoteInvoice = (_f) => __awaiter(void 0, [_f], void 0, function* ({ prisma, id, }) {
219
+ const deleteQuoteInvoice = (_e) => __awaiter(void 0, [_e], void 0, function* ({ prisma, id, }) {
220
220
  const quoteInvoice = yield prisma.quoteInvoice.delete({
221
221
  where: {
222
222
  id,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-pakistan/util-functions",
3
- "version": "1.22.58",
3
+ "version": "1.22.60",
4
4
  "description": "A library of all util functions",
5
5
  "main": "index.js",
6
6
  "scripts": {