@appcorp/stellar-solutions-invoice-module 0.1.23 → 0.1.24
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.
|
@@ -756,6 +756,7 @@ var useInvoiceState = function () {
|
|
|
756
756
|
comboboxElements[0].handleInputOnChange = handleChange;
|
|
757
757
|
comboboxElements[0].handleOnBlur = handleChange;
|
|
758
758
|
comboboxElements[0].handleOnChange = function (k, v) {
|
|
759
|
+
console.log('_>>>>>>>>>', k, v);
|
|
759
760
|
var val = __assign({}, v);
|
|
760
761
|
handleItemChangeProducts({
|
|
761
762
|
index: i,
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
2
13
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
15
|
};
|
|
@@ -14,17 +25,20 @@ var vista_button_type_1 = require("@appcorp/app-corp-vista/type/vista-button-typ
|
|
|
14
25
|
var vista_combobox_v1_1 = require("@appcorp/app-corp-vista/molecules/vista-combobox-v1/vista-combobox-v1");
|
|
15
26
|
var context_2 = require("@appcorp/stellar-solutions-product-module/base-modules/product/context");
|
|
16
27
|
var ProductsSection = function () {
|
|
17
|
-
var _a = (0, context_1.useInvoiceStateContext)(), products = _a.products, handleItemChangeProducts = _a.handleItemChangeProducts, handleDeleteServiceRow = _a.handleDeleteServiceRow;
|
|
28
|
+
var _a = (0, context_1.useInvoiceStateContext)(), products = _a.products, handleItemChangeProducts = _a.handleItemChangeProducts, handleDeleteServiceRow = _a.handleDeleteServiceRow, handleChange = _a.handleChange;
|
|
18
29
|
var productList = (0, context_2.useProductStateContext)().products;
|
|
19
30
|
return (react_1.default.createElement("div", { className: "flex flex-col gap-4" },
|
|
20
31
|
react_1.default.createElement(vista_vertical_divider_v4_1.VistaVerticalDividerV4, { label: "Products" }),
|
|
21
32
|
products.map(function (row, index) { return (react_1.default.createElement("div", { key: index, className: 'grid grid-cols-[17.5%_17.5%_17.5%_17.5%_17.5%_auto] items-end justify-between gap-4' },
|
|
22
33
|
react_1.default.createElement("div", { className: 'col-span-2' },
|
|
23
|
-
react_1.default.createElement(vista_combobox_v1_1.VistaComboboxV1, {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
34
|
+
react_1.default.createElement(vista_combobox_v1_1.VistaComboboxV1, { handleOnChange: function (k, v) {
|
|
35
|
+
var val = __assign({}, v);
|
|
36
|
+
handleItemChangeProducts({
|
|
37
|
+
index: index,
|
|
38
|
+
key: k,
|
|
39
|
+
value: val.id,
|
|
40
|
+
});
|
|
41
|
+
}, handleOnBlur: handleChange, handleInputOnChange: handleChange, label: "Product", listItems: productList, nodeQueryKey: 'productQuery', nodeSelectKey: 'productId', query: '', selectKey1: 'name', selectedItem: { id: products[index].productId } })),
|
|
28
42
|
react_1.default.createElement(vista_text_input_v1_1.VistaTextInputV1, { handleOnChange: function (k, v) { return handleItemChangeProducts({ index: index, key: k, value: v }); }, id: 'quantity', label: 'Quantity', placeholder: '1', value: String(products[index].quantity), type: 'text' }),
|
|
29
43
|
react_1.default.createElement(vista_text_input_v1_1.VistaTextInputV1, { handleOnChange: function (k, v) { return handleItemChangeProducts({ index: index, key: k, value: v }); }, id: 'price', label: 'Price', placeholder: '0.00', value: products[index].price, type: 'number' }),
|
|
30
44
|
react_1.default.createElement(vista_text_input_v1_1.VistaTextInputV1, { handleOnChange: function (k, v) { return handleItemChangeProducts({ index: index, key: k, value: v }); }, id: 'rowTotal', label: 'Row Total', placeholder: '0.00', value: products[index].rowTotal, type: 'number', readOnly: true }),
|