@appcorp/stellar-solutions-invoice-module 0.1.20 → 0.1.23

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.
@@ -321,18 +321,22 @@ exports.staticServiceSection = (_c = {},
321
321
  ],
322
322
  _c);
323
323
  exports.staticProductSection = (_d = {},
324
- _d[form_schema_1.VISTA_FORM_ELEMENTS.SELECT_V1] = [
324
+ _d[form_schema_1.VISTA_FORM_ELEMENTS.COMBOBOX_V1] = [
325
325
  {
326
- className: 'col-span-2',
326
+ // className: 'col-span-2',
327
+ // selectKey2: '',
327
328
  enabled: true,
329
+ handleInputOnChange: function () { return void 0; },
330
+ handleOnBlur: function () { return void 0; },
328
331
  handleOnChange: function () { return void 0; },
329
332
  label: 'Product',
330
333
  listItems: [],
334
+ nodeQueryKey: 'productQuery',
331
335
  nodeSelectKey: 'productId',
332
336
  order: 1,
337
+ query: '',
333
338
  required: false,
334
339
  selectKey1: 'name',
335
- selectKey2: '',
336
340
  selectedItem: { name: '' },
337
341
  },
338
342
  ],
@@ -492,6 +492,7 @@ var useInvoiceState = function () {
492
492
  payload: { key: 'subTotal', value: subtotal },
493
493
  });
494
494
  }
495
+ console.log('updated', updatedItems);
495
496
  dispatch({
496
497
  type: actions_1.INVOICE_ACTION_TYPES.SET_INPUT_FIELD,
497
498
  payload: { key: 'products', value: updatedItems },
@@ -751,6 +752,9 @@ var useInvoiceState = function () {
751
752
  if (comboboxElements) {
752
753
  (_d = state.products) === null || _d === void 0 ? void 0 : _d.forEach(function (product, i) {
753
754
  comboboxElements[0].listItems = products;
755
+ comboboxElements[0].query = state.productQuery;
756
+ comboboxElements[0].handleInputOnChange = handleChange;
757
+ comboboxElements[0].handleOnBlur = handleChange;
754
758
  comboboxElements[0].handleOnChange = function (k, v) {
755
759
  var val = __assign({}, v);
756
760
  handleItemChangeProducts({
@@ -776,7 +780,7 @@ var useInvoiceState = function () {
776
780
  });
777
781
  }
778
782
  return elements;
779
- }, [state, handleItemChangeProducts, products]);
783
+ }, [state, handleItemChangeProducts, products, handleChange]);
780
784
  var headerActions = [
781
785
  {
782
786
  enabled: true,
@@ -32,6 +32,7 @@ exports.initialInvoiceState = {
32
32
  city: '',
33
33
  companyId: '',
34
34
  companyQuery: '',
35
+ productQuery: '',
35
36
  count: 0,
36
37
  country: '',
37
38
  currency: 'PKR',
@@ -122,6 +122,7 @@ export interface InvoiceState extends Omit<InvoiceTypeBE, 'createdAt' | 'updated
122
122
  address: string;
123
123
  city: string;
124
124
  companyQuery: string;
125
+ productQuery: string;
125
126
  count: number;
126
127
  country: string;
127
128
  currentPage: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appcorp/stellar-solutions-invoice-module",
3
- "version": "0.1.20",
3
+ "version": "0.1.23",
4
4
  "scripts": {
5
5
  "build": "yarn clean && yarn build:ts && cp package.json lib && cp README.md lib",
6
6
  "build:next": "next build",