@react-pakistan/util-functions 1.23.17 → 1.23.18

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.
@@ -172,24 +172,28 @@ const postQuoteInvoice = (_d) => __awaiter(void 0, [_d], void 0, function* ({ ad
172
172
  delete toReturn.mode;
173
173
  return (Object.assign(Object.assign({}, toReturn), { quoteInvoiceId: id }));
174
174
  });
175
- filteredEditServices === null || filteredEditServices === void 0 ? void 0 : filteredEditServices.map((item) => __awaiter(void 0, void 0, void 0, function* () {
176
- yield prisma.stellarService.update({
177
- where: {
178
- id: item.id,
179
- },
180
- data: {
181
- description: item.description,
182
- name: item.name,
183
- price: item.price,
184
- quantity: item.quantity,
185
- quoteInvoiceId: item.quoteInvoiceId,
186
- total: item.total,
187
- },
175
+ if (filteredEditServices === null || filteredEditServices === void 0 ? void 0 : filteredEditServices.length) {
176
+ filteredEditServices === null || filteredEditServices === void 0 ? void 0 : filteredEditServices.map((item) => __awaiter(void 0, void 0, void 0, function* () {
177
+ yield prisma.stellarService.update({
178
+ where: {
179
+ id: item.id,
180
+ },
181
+ data: {
182
+ description: item.description,
183
+ name: item.name,
184
+ price: item.price,
185
+ quantity: item.quantity,
186
+ quoteInvoiceId: item.quoteInvoiceId,
187
+ total: item.total,
188
+ },
189
+ });
190
+ }));
191
+ }
192
+ if (filteredCreateServices === null || filteredCreateServices === void 0 ? void 0 : filteredCreateServices.length) {
193
+ yield prisma.stellarService.createMany({
194
+ data: filteredCreateServices,
188
195
  });
189
- }));
190
- yield prisma.stellarService.createMany({
191
- data: filteredCreateServices,
192
- });
196
+ }
193
197
  quoteInvoice = yield prisma.quoteInvoice.update({
194
198
  where: {
195
199
  id,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-pakistan/util-functions",
3
- "version": "1.23.17",
3
+ "version": "1.23.18",
4
4
  "description": "A library of all util functions",
5
5
  "main": "index.js",
6
6
  "scripts": {