@appcorp/stellar-solutions-invoice-module 0.1.73 → 0.1.75

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.
Files changed (89) hide show
  1. package/base-modules/invoice/add-service-product-section.d.ts +1 -5
  2. package/base-modules/invoice/add-service-product-section.js +3 -3
  3. package/base-modules/invoice/cache.d.ts +15 -0
  4. package/base-modules/invoice/cache.js +50 -0
  5. package/base-modules/invoice/calculate-subtotal.d.ts +6 -1
  6. package/base-modules/invoice/calculate-subtotal.js +2 -2
  7. package/base-modules/invoice/calculate-total.d.ts +1 -1
  8. package/base-modules/invoice/calculate-total.js +8 -8
  9. package/base-modules/invoice/company-form-section.d.ts +1 -5
  10. package/base-modules/invoice/company-form-section.js +25 -22
  11. package/base-modules/invoice/constants.d.ts +2 -3
  12. package/base-modules/invoice/constants.js +2 -3
  13. package/base-modules/invoice/context.d.ts +556 -20
  14. package/base-modules/invoice/context.js +542 -340
  15. package/base-modules/invoice/customer-form-section.d.ts +1 -5
  16. package/base-modules/invoice/customer-form-section.js +25 -9
  17. package/base-modules/invoice/form.d.ts +1 -5
  18. package/base-modules/invoice/form.js +9 -9
  19. package/base-modules/invoice/page.d.ts +8 -0
  20. package/base-modules/invoice/page.js +171 -0
  21. package/base-modules/invoice/pricing-form-section.d.ts +1 -5
  22. package/base-modules/invoice/pricing-form-section.js +16 -11
  23. package/base-modules/invoice/products-form-section.d.ts +1 -5
  24. package/base-modules/invoice/products-form-section.js +49 -41
  25. package/base-modules/invoice/services-form-section.d.ts +1 -5
  26. package/base-modules/invoice/services-form-section.js +10 -9
  27. package/base-modules/invoice/validate.d.ts +83 -25
  28. package/base-modules/invoice/validate.js +4 -4
  29. package/base-modules/payment/cache.d.ts +15 -0
  30. package/base-modules/payment/cache.js +52 -0
  31. package/base-modules/payment/constants.d.ts +1 -14
  32. package/base-modules/payment/constants.js +2 -15
  33. package/base-modules/payment/context.d.ts +214 -48
  34. package/base-modules/payment/context.js +312 -240
  35. package/base-modules/payment/drawer.d.ts +0 -6
  36. package/base-modules/payment/drawer.js +89 -44
  37. package/base-modules/payment/form.js +3 -2
  38. package/base-modules/payment/{payment.js → page.js} +2 -5
  39. package/base-modules/payment/types.d.ts +0 -85
  40. package/base-modules/payment/types.js +74 -21
  41. package/base-modules/payment/validate.d.ts +12 -0
  42. package/base-modules/payment/validate.js +19 -8
  43. package/base-modules/payment/view.d.ts +1 -5
  44. package/base-modules/payment/view.js +4 -3
  45. package/base-modules/quote/add-service-product-section.js +1 -1
  46. package/base-modules/quote/cache.d.ts +15 -0
  47. package/base-modules/quote/cache.js +50 -0
  48. package/base-modules/quote/company-form-section.d.ts +1 -1
  49. package/base-modules/quote/company-form-section.js +14 -12
  50. package/base-modules/quote/constants.js +1 -0
  51. package/base-modules/quote/context.d.ts +656 -46
  52. package/base-modules/quote/context.js +431 -293
  53. package/base-modules/quote/customer-form-section.d.ts +1 -1
  54. package/base-modules/quote/customer-form-section.js +24 -9
  55. package/base-modules/quote/form.d.ts +1 -5
  56. package/base-modules/quote/form.js +8 -9
  57. package/base-modules/quote/page.d.ts +8 -0
  58. package/base-modules/quote/page.js +163 -0
  59. package/base-modules/quote/pricing-form-section.js +9 -8
  60. package/base-modules/quote/products-form-section.js +2 -3
  61. package/base-modules/quote/services-form-section.js +1 -1
  62. package/base-modules/quote/types.d.ts +0 -127
  63. package/base-modules/quote/types.js +92 -35
  64. package/base-modules/quote/validate.d.ts +82 -25
  65. package/base-modules/quote/validate.js +3 -4
  66. package/package.json +12 -11
  67. package/base-modules/invoice/actions.d.ts +0 -215
  68. package/base-modules/invoice/actions.js +0 -38
  69. package/base-modules/invoice/drawer.d.ts +0 -13
  70. package/base-modules/invoice/drawer.js +0 -46
  71. package/base-modules/invoice/invoice.d.ts +0 -8
  72. package/base-modules/invoice/invoice.js +0 -69
  73. package/base-modules/invoice/reducer.d.ts +0 -4
  74. package/base-modules/invoice/reducer.js +0 -180
  75. package/base-modules/invoice/types.d.ts +0 -211
  76. package/base-modules/invoice/types.js +0 -43
  77. package/base-modules/payment/actions.d.ts +0 -203
  78. package/base-modules/payment/actions.js +0 -50
  79. package/base-modules/payment/reducer.d.ts +0 -29
  80. package/base-modules/payment/reducer.js +0 -215
  81. package/base-modules/quote/actions.d.ts +0 -215
  82. package/base-modules/quote/actions.js +0 -38
  83. package/base-modules/quote/drawer.d.ts +0 -13
  84. package/base-modules/quote/drawer.js +0 -46
  85. package/base-modules/quote/quote.d.ts +0 -8
  86. package/base-modules/quote/quote.js +0 -69
  87. package/base-modules/quote/reducer.d.ts +0 -4
  88. package/base-modules/quote/reducer.js +0 -181
  89. /package/base-modules/payment/{payment.d.ts → page.d.ts} +0 -0
@@ -5,8 +5,4 @@
5
5
  * Uses Shadcn UI components with RTL support and i18n.
6
6
  */
7
7
  import { FC } from "react";
8
- interface Props {
9
- isRTL?: boolean;
10
- }
11
- export declare const AddServiceProductSection: FC<Props>;
12
- export {};
8
+ export declare const AddServiceProductSection: FC;
@@ -17,15 +17,15 @@ var button_1 = require("@appcorp/shadcn/components/ui/button");
17
17
  var context_1 = require("./context");
18
18
  var AddServiceProductSection = function () {
19
19
  var t = (0, next_intl_1.useTranslations)("invoice");
20
- var _a = (0, context_1.useInvoiceStateContext)(), handleAddItemProduct = _a.handleAddItemProduct, handleAddItemService = _a.handleAddItemService;
20
+ var _a = (0, context_1.useInvoiceModule)(), handleAddItemProduct = _a.handleAddItemProduct, handleAddItemService = _a.handleAddItemService;
21
21
  return (react_1.default.createElement("div", { className: "flex items-center justify-center gap-3 rounded-lg border-2 border-dashed border-muted-foreground/25 p-6 hover:border-muted-foreground/50 transition-colors" },
22
22
  react_1.default.createElement("span", { className: "text-sm text-muted-foreground" }, t("addItem")),
23
23
  react_1.default.createElement(button_1.Button, { onClick: handleAddItemService, size: "sm", type: "button", variant: "outline" },
24
- react_1.default.createElement(lucide_react_1.Plus, { className: "h-4 w-4 mr-2" }),
24
+ react_1.default.createElement(lucide_react_1.Plus, { className: "h-4 w-4" }),
25
25
  t("addItemService")),
26
26
  react_1.default.createElement("span", { className: "text-sm text-muted-foreground" }, t("addItemOr")),
27
27
  react_1.default.createElement(button_1.Button, { onClick: handleAddItemProduct, size: "sm", type: "button", variant: "outline" },
28
- react_1.default.createElement(lucide_react_1.Plus, { className: "h-4 w-4 mr-2" }),
28
+ react_1.default.createElement(lucide_react_1.Plus, { className: "h-4 w-4" }),
29
29
  t("addItemProduct"))));
30
30
  };
31
31
  exports.AddServiceProductSection = AddServiceProductSection;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Invoice Cache
3
+ *
4
+ * Client-side caching utilities for invoice data.
5
+ * Uses localStorage-backed cache to reduce redundant API calls.
6
+ */
7
+ import { QuoteInvoiceBE, type ListResponse } from "@react-pakistan/util-functions";
8
+ export declare const getCachedInvoicesSync: () => ListResponse<QuoteInvoiceBE> | null;
9
+ export declare const getCachedInvoices: ({ params, }?: {
10
+ params?: Record<string, unknown>;
11
+ }) => Promise<ListResponse<QuoteInvoiceBE>>;
12
+ export declare const getCachedInvoiceById: (invoiceId: string) => QuoteInvoiceBE | null;
13
+ export declare const invalidateInvoicesCache: () => void;
14
+ export declare const preloadInvoices: () => Promise<ListResponse<QuoteInvoiceBE>>;
15
+ export declare const isInvoicesCacheStale: () => boolean;
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ /**
3
+ * Invoice Cache
4
+ *
5
+ * Client-side caching utilities for invoice data.
6
+ * Uses localStorage-backed cache to reduce redundant API calls.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.isInvoicesCacheStale = exports.preloadInvoices = exports.invalidateInvoicesCache = exports.getCachedInvoiceById = exports.getCachedInvoices = exports.getCachedInvoicesSync = void 0;
10
+ var util_functions_1 = require("@react-pakistan/util-functions");
11
+ var constants_1 = require("./constants");
12
+ var constants_2 = require("@appcorp/stellar-solutions-modules/constants");
13
+ // ============================================================================
14
+ // CACHE CONFIG
15
+ // ============================================================================
16
+ var INVOICE_CACHE_CONFIG = {
17
+ apiUrl: constants_1.INVOICE_API_ROUTES.UNIT,
18
+ cacheKey: constants_2.LS_KEYS.INVOICES,
19
+ };
20
+ // ============================================================================
21
+ // CACHE UTILITIES
22
+ // ============================================================================
23
+ var getCachedInvoicesSync = function () {
24
+ return (0, util_functions_1.getCachedDataSync)(constants_2.LS_KEYS.INVOICES);
25
+ };
26
+ exports.getCachedInvoicesSync = getCachedInvoicesSync;
27
+ var getCachedInvoices = function (_a) {
28
+ var _b = _a === void 0 ? {} : _a, params = _b.params;
29
+ return (0, util_functions_1.getCachedData)({
30
+ config: INVOICE_CACHE_CONFIG,
31
+ params: params,
32
+ headers: {
33
+ "Content-Type": "application/json",
34
+ "x-api-token": process.env.NEXT_PUBLIC_API_KEY,
35
+ },
36
+ });
37
+ };
38
+ exports.getCachedInvoices = getCachedInvoices;
39
+ var getCachedInvoiceById = function (invoiceId) {
40
+ return (0, util_functions_1.getCachedItemById)(constants_2.LS_KEYS.INVOICES, invoiceId);
41
+ };
42
+ exports.getCachedInvoiceById = getCachedInvoiceById;
43
+ var invalidateInvoicesCache = function () { return (0, util_functions_1.invalidateCache)(constants_2.LS_KEYS.INVOICES); };
44
+ exports.invalidateInvoicesCache = invalidateInvoicesCache;
45
+ var preloadInvoices = function () {
46
+ return (0, util_functions_1.preloadCache)(INVOICE_CACHE_CONFIG);
47
+ };
48
+ exports.preloadInvoices = preloadInvoices;
49
+ var isInvoicesCacheStale = function () { return (0, util_functions_1.isCacheStale)(constants_2.LS_KEYS.INVOICES); };
50
+ exports.isInvoicesCacheStale = isInvoicesCacheStale;
@@ -1,2 +1,7 @@
1
- import { Product, Service } from './types';
1
+ export interface Service {
2
+ rowTotal: string;
3
+ }
4
+ export interface Product {
5
+ rowTotal: string;
6
+ }
2
7
  export declare const calculateSubtotal: (services?: Service[], products?: Product[]) => string;
@@ -5,13 +5,13 @@ var calculateSubtotal = function (services, products) {
5
5
  var subtotal = 0;
6
6
  if (services) {
7
7
  var servicesSubtotal = services.reduce(function (acc, item) {
8
- return acc + parseFloat(item.rowTotal || '0');
8
+ return acc + parseFloat(item.rowTotal || "0");
9
9
  }, 0);
10
10
  subtotal += servicesSubtotal;
11
11
  }
12
12
  if (products) {
13
13
  var productsSubtotal = products.reduce(function (acc, item) {
14
- return acc + parseFloat(item.rowTotal || '0');
14
+ return acc + parseFloat(item.rowTotal || "0");
15
15
  }, 0);
16
16
  subtotal += productsSubtotal;
17
17
  }
@@ -1,4 +1,4 @@
1
- import { DISCOUNT_UNIT } from "./types";
1
+ import { DISCOUNT_UNIT } from "@react-pakistan/util-functions";
2
2
  interface Return {
3
3
  afterDiscount: number;
4
4
  tax: string;
@@ -1,19 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.calculateTotal = void 0;
4
- var types_1 = require("./types");
4
+ var util_functions_1 = require("@react-pakistan/util-functions");
5
5
  var calculateTotal = function (subtotal, taxRate, discountUnit, discount) {
6
- var subtotalValue = parseFloat(subtotal || '0');
6
+ var subtotalValue = parseFloat(subtotal || "0");
7
7
  var discountType = discountUnit;
8
- var discountValue = parseFloat(discount || '0');
9
- var discountedAmount = discountType === types_1.DISCOUNT_UNIT.PERCENTAGE_VALUE
8
+ var discountValue = parseFloat(discount || "0");
9
+ var discountedAmount = discountType === util_functions_1.DISCOUNT_UNIT.PERCENTAGE_VALUE
10
10
  ? (subtotalValue * discountValue) / 100
11
11
  : discountValue;
12
12
  var afterDiscount = subtotalValue - discountedAmount;
13
- var tax = taxRate ? ((afterDiscount * parseFloat(taxRate)) / 100).toFixed(2) : Number(0).toFixed(2);
14
- var total = (subtotalValue +
15
- parseFloat(tax) -
16
- discountedAmount).toFixed(2);
13
+ var tax = taxRate
14
+ ? ((afterDiscount * parseFloat(taxRate)) / 100).toFixed(2)
15
+ : Number(0).toFixed(2);
16
+ var total = (subtotalValue + parseFloat(tax) - discountedAmount).toFixed(2);
17
17
  return {
18
18
  tax: tax,
19
19
  afterDiscount: afterDiscount,
@@ -5,8 +5,4 @@
5
5
  * Uses Shadcn UI components with RTL support and i18n.
6
6
  */
7
7
  import { FC } from "react";
8
- interface Props {
9
- isRTL: boolean;
10
- }
11
- export declare const CompanySection: FC<Props>;
12
- export {};
8
+ export declare const CompanySection: FC;
@@ -46,42 +46,46 @@ var date_fns_1 = require("date-fns");
46
46
  var enhanced_combobox_1 = require("@appcorp/shadcn/components/enhanced-combobox");
47
47
  var enhanced_input_1 = require("@appcorp/shadcn/components/enhanced-input");
48
48
  var enhanced_textarea_1 = require("@appcorp/shadcn/components/enhanced-textarea");
49
- var context_1 = require("@appcorp/stellar-solutions-modules/global-modules/preferences/context");
50
- var actions_1 = require("./actions");
51
- var context_2 = require("./context");
49
+ var context_1 = require("./context");
50
+ var cache_1 = require("@appcorp/stellar-solutions-company-module/base-modules/company/cache");
51
+ var cache_2 = require("@appcorp/stellar-solutions-modules/global-modules/currency/cache");
52
52
  var CompanySection = function () {
53
53
  var t = (0, next_intl_1.useTranslations)("invoice");
54
- var currencies = (0, context_1.usePreferenceStateContext)().currencies;
55
- var _a = (0, context_2.useInvoiceStateContext)(), companiesList = _a.companiesList, companyId = _a.companyId, currency = _a.currency, date = _a.date, dispatch = _a.dispatch, errors = _a.errors, expiryDate = _a.expiryDate, note = _a.note, ref = _a.ref;
54
+ var companies = (0, cache_1.getCachedCompaniesSync)();
55
+ var currencies = (0, cache_2.getCachedCurrenciesSync)();
56
+ var _a = (0, context_1.useInvoiceModule)(), state = _a.state, dispatch = _a.dispatch;
57
+ var companyId = state.companyId, currency = state.currency, date = state.date, errors = state.errors, expiryDate = state.expiryDate, note = state.note, ref = state.ref;
56
58
  var handleInputChange = (0, react_1.useCallback)(function (key, value) {
57
59
  dispatch({
58
- type: actions_1.INVOICE_ACTION_TYPES.SET_INPUT_FIELD,
60
+ type: context_1.INVOICE_ACTION_TYPES.SET_INPUT_FIELD,
59
61
  payload: { key: key, value: value },
60
62
  });
61
63
  dispatch({
62
- type: actions_1.INVOICE_ACTION_TYPES.SET_DISABLE_SAVE_BUTTON,
64
+ type: context_1.INVOICE_ACTION_TYPES.SET_DISABLE_SAVE_BUTTON,
63
65
  payload: { disableSaveButton: false },
64
66
  });
65
67
  dispatch({
66
- type: actions_1.INVOICE_ACTION_TYPES.RESET_ERRORS,
68
+ type: context_1.INVOICE_ACTION_TYPES.SET_ERRORS,
69
+ payload: { errors: {} },
67
70
  });
68
71
  }, [dispatch]);
69
72
  var handleCompanyChange = function (selectedCompanyId) {
70
73
  dispatch({
71
- type: actions_1.INVOICE_ACTION_TYPES.SET_INPUT_FIELD,
74
+ type: context_1.INVOICE_ACTION_TYPES.SET_INPUT_FIELD,
72
75
  payload: { key: "companyId", value: selectedCompanyId },
73
76
  });
74
77
  dispatch({
75
- type: actions_1.INVOICE_ACTION_TYPES.SET_DISABLE_SAVE_BUTTON,
78
+ type: context_1.INVOICE_ACTION_TYPES.SET_DISABLE_SAVE_BUTTON,
76
79
  payload: { disableSaveButton: false },
77
80
  });
78
81
  dispatch({
79
- type: actions_1.INVOICE_ACTION_TYPES.RESET_ERRORS,
82
+ type: context_1.INVOICE_ACTION_TYPES.SET_ERRORS,
83
+ payload: { errors: {} },
80
84
  });
81
85
  };
82
86
  var handleCompanySearch = function (searchQuery) {
83
87
  dispatch({
84
- type: actions_1.INVOICE_ACTION_TYPES.SET_INPUT_FIELD,
88
+ type: context_1.INVOICE_ACTION_TYPES.SET_INPUT_FIELD,
85
89
  payload: {
86
90
  key: "companyQuery",
87
91
  value: searchQuery,
@@ -90,33 +94,32 @@ var CompanySection = function () {
90
94
  };
91
95
  var handleCurrencyChange = function (currencyCode) {
92
96
  dispatch({
93
- type: actions_1.INVOICE_ACTION_TYPES.SET_INPUT_FIELD,
97
+ type: context_1.INVOICE_ACTION_TYPES.SET_INPUT_FIELD,
94
98
  payload: { key: "currency", value: currencyCode },
95
99
  });
96
100
  dispatch({
97
- type: actions_1.INVOICE_ACTION_TYPES.SET_DISABLE_SAVE_BUTTON,
101
+ type: context_1.INVOICE_ACTION_TYPES.SET_DISABLE_SAVE_BUTTON,
98
102
  payload: { disableSaveButton: false },
99
103
  });
100
104
  dispatch({
101
- type: actions_1.INVOICE_ACTION_TYPES.RESET_ERRORS,
105
+ type: context_1.INVOICE_ACTION_TYPES.SET_ERRORS,
106
+ payload: { errors: {} },
102
107
  });
103
108
  };
104
- // Map currencies to have consistent structure for CompanyCombobox
105
- var currencyOptions = (currencies || []).map(function (curr) { return ({
106
- id: curr.code,
107
- name: curr.code,
108
- }); });
109
109
  return (react_1.default.createElement("div", { className: "flex flex-col gap-4" },
110
110
  react_1.default.createElement("h3", { className: "text-lg font-semibold border-b pb-2" }, t("companyFormSectionTitle")),
111
111
  react_1.default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4" },
112
112
  react_1.default.createElement("div", { className: "space-y-2" },
113
- react_1.default.createElement(enhanced_combobox_1.CompanyCombobox, { companies: companiesList || [], error: errors.companyId, id: "companyId", info: t("companyFormInfoCompany"), label: t("companyFormLabelCompany"), onSearchChange: handleCompanySearch, onValueChange: handleCompanyChange, placeholder: t("companyFormPlaceholderCompany"), required: true, value: companyId || "" })),
113
+ react_1.default.createElement(enhanced_combobox_1.CompanyCombobox, { companies: (companies === null || companies === void 0 ? void 0 : companies.items) || [], error: errors.companyId, id: "companyId", info: t("companyFormInfoCompany"), label: t("companyFormLabelCompany"), onSearchChange: handleCompanySearch, onValueChange: handleCompanyChange, placeholder: t("companyFormPlaceholderCompany"), required: true, value: companyId || "" })),
114
114
  react_1.default.createElement("div", { className: "space-y-2" },
115
115
  react_1.default.createElement(enhanced_input_1.EnhancedInput, { error: errors.date, id: "date", info: t("companyFormInfoDate"), label: t("companyFormLabelDate"), onChange: function (e) { return handleInputChange("date", e.target.value); }, placeholder: t("companyFormPlaceholderDate"), required: true, type: "date", value: date ? (0, date_fns_1.format)(new Date(date), "yyyy-MM-dd") : "" })),
116
116
  react_1.default.createElement("div", { className: "space-y-2" },
117
117
  react_1.default.createElement(enhanced_input_1.EnhancedInput, { error: errors.expiryDate, id: "expiryDate", info: t("companyFormInfoExpiryDate"), label: t("companyFormLabelExpiryDate"), onChange: function (e) { return handleInputChange("expiryDate", e.target.value); }, placeholder: t("companyFormPlaceholderExpiryDate"), required: true, type: "date", value: expiryDate ? (0, date_fns_1.format)(new Date(expiryDate), "yyyy-MM-dd") : "" })),
118
118
  react_1.default.createElement("div", { className: "space-y-2" },
119
- react_1.default.createElement(enhanced_combobox_1.CompanyCombobox, { companies: currencyOptions, error: errors.currency, id: "currency", info: t("companyFormInfoCurrency"), label: t("companyFormLabelCurrency"), onSearchChange: function () { }, onValueChange: handleCurrencyChange, placeholder: t("companyFormPlaceholderCurrency"), required: true, value: currency || "" })),
119
+ react_1.default.createElement(enhanced_combobox_1.EnhancedCombobox, { id: "currency", label: t("companyFormLabelCurrency"), value: currency || "", onValueChange: handleCurrencyChange, options: (currencies === null || currencies === void 0 ? void 0 : currencies.items.map(function (c) { return ({
120
+ label: "".concat(c.label, " - ").concat(c.code) || c.code,
121
+ value: c.code,
122
+ }); })) || [], placeholder: t("companyFormPlaceholderCurrency"), info: t("companyFormInfoCurrency"), error: errors.currency, required: true })),
120
123
  react_1.default.createElement("div", { className: "space-y-2" },
121
124
  react_1.default.createElement(enhanced_textarea_1.EnhancedTextarea, { error: errors.note, id: "note", info: t("companyFormInfoNote"), label: t("companyFormLabelNote"), onChange: function (e) { return handleInputChange("note", e.target.value); }, placeholder: t("companyFormPlaceholderNote"), rows: 3, value: note || "" })),
122
125
  react_1.default.createElement("div", { className: "space-y-2" },
@@ -3,10 +3,9 @@ export declare const pageLimit: number;
3
3
  export declare const handleSplitId: (value: string) => string[];
4
4
  export declare const changeActionsMap: Record<string, (val: string | number | number[]) => string | number | number[]>;
5
5
  export declare const INVOICE_API_ROUTES: {
6
- INVOICES: string;
7
- INVOICE: string;
6
+ UNIT: string;
8
7
  INVOICE_BY_ID: string;
9
- PRODUCTS: string;
8
+ PRODUCT: string;
10
9
  CONTACTS: string;
11
10
  CUSTOMER_BY_PHONE: string;
12
11
  TAXES: string;
@@ -12,10 +12,9 @@ exports.changeActionsMap = {
12
12
  companyId: function (val) { return (0, exports.handleSplitId)(val)[1]; },
13
13
  };
14
14
  exports.INVOICE_API_ROUTES = {
15
- INVOICES: "/api/quotes-invoices",
16
- INVOICE: "/api/quote-invoice",
15
+ UNIT: "/api/quote-invoice",
17
16
  INVOICE_BY_ID: "/api/quote-invoice/quote-invoice-by-id",
18
- PRODUCTS: "/api/products",
17
+ PRODUCT: "/api/product",
19
18
  CONTACTS: "/api/contacts",
20
19
  CUSTOMER_BY_PHONE: "/api/customer/customer-by-phone",
21
20
  TAXES: "/api/taxes",