@appcorp/stellar-solutions-invoice-module 0.1.56 → 0.1.59

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 (92) hide show
  1. package/base-modules/invoice/add-service-product-section.d.ts +12 -2
  2. package/base-modules/invoice/add-service-product-section.js +20 -10
  3. package/base-modules/invoice/company-form-section.d.ts +12 -2
  4. package/base-modules/invoice/company-form-section.js +118 -10
  5. package/base-modules/invoice/constants.d.ts +9 -25
  6. package/base-modules/invoice/constants.js +66 -557
  7. package/base-modules/invoice/context.d.ts +42 -2
  8. package/base-modules/invoice/context.js +232 -312
  9. package/base-modules/invoice/customer-form-section.d.ts +12 -2
  10. package/base-modules/invoice/customer-form-section.js +91 -9
  11. package/base-modules/invoice/drawer.d.ts +9 -4
  12. package/base-modules/invoice/drawer.js +32 -6
  13. package/base-modules/invoice/form.d.ts +2 -4
  14. package/base-modules/invoice/form.js +7 -6
  15. package/base-modules/invoice/invoice.d.ts +2 -2
  16. package/base-modules/invoice/invoice.js +33 -42
  17. package/base-modules/invoice/pricing-form-section.d.ts +12 -2
  18. package/base-modules/invoice/pricing-form-section.js +65 -9
  19. package/base-modules/invoice/products-form-section.d.ts +12 -2
  20. package/base-modules/invoice/products-form-section.js +57 -32
  21. package/base-modules/invoice/reducer.d.ts +2 -2
  22. package/base-modules/invoice/reducer.js +56 -53
  23. package/base-modules/invoice/services-form-section.d.ts +12 -2
  24. package/base-modules/invoice/services-form-section.js +61 -15
  25. package/base-modules/invoice/types.d.ts +16 -21
  26. package/base-modules/invoice/validate.d.ts +23 -3
  27. package/base-modules/invoice/validate.js +61 -61
  28. package/base-modules/payment/actions.d.ts +196 -0
  29. package/base-modules/payment/actions.js +49 -0
  30. package/base-modules/payment/constants.d.ts +101 -0
  31. package/base-modules/payment/constants.js +165 -0
  32. package/base-modules/payment/context.d.ts +56 -0
  33. package/base-modules/payment/context.js +421 -0
  34. package/base-modules/payment/drawer.d.ts +6 -0
  35. package/base-modules/payment/drawer.js +39 -0
  36. package/base-modules/payment/form.d.ts +18 -0
  37. package/base-modules/payment/form.js +90 -0
  38. package/base-modules/payment/index.d.ts +0 -0
  39. package/base-modules/payment/index.js +13 -0
  40. package/base-modules/payment/payment.d.ts +8 -0
  41. package/base-modules/payment/payment.js +39 -0
  42. package/base-modules/payment/reducer.d.ts +29 -0
  43. package/base-modules/payment/reducer.js +211 -0
  44. package/base-modules/payment/types.d.ts +82 -0
  45. package/base-modules/payment/types.js +19 -0
  46. package/base-modules/payment/validate.d.ts +20 -0
  47. package/base-modules/payment/validate.js +23 -0
  48. package/base-modules/quote/actions.d.ts +215 -0
  49. package/base-modules/quote/actions.js +38 -0
  50. package/base-modules/quote/add-service-product-section.d.ts +12 -0
  51. package/base-modules/quote/add-service-product-section.js +31 -0
  52. package/base-modules/quote/calculate-subtotal.d.ts +1 -0
  53. package/base-modules/quote/calculate-subtotal.js +6 -0
  54. package/base-modules/quote/calculate-total.d.ts +1 -0
  55. package/base-modules/quote/calculate-total.js +6 -0
  56. package/base-modules/quote/company-form-section.d.ts +12 -0
  57. package/base-modules/quote/company-form-section.js +125 -0
  58. package/base-modules/quote/constants.d.ts +64 -0
  59. package/base-modules/quote/constants.js +107 -0
  60. package/base-modules/quote/context.d.ts +50 -0
  61. package/base-modules/quote/context.js +822 -0
  62. package/base-modules/quote/customer-form-section.d.ts +12 -0
  63. package/base-modules/quote/customer-form-section.js +99 -0
  64. package/base-modules/quote/drawer.d.ts +13 -0
  65. package/base-modules/quote/drawer.js +45 -0
  66. package/base-modules/quote/form.d.ts +6 -0
  67. package/base-modules/quote/form.js +27 -0
  68. package/base-modules/quote/pricing-form-section.d.ts +12 -0
  69. package/base-modules/quote/pricing-form-section.js +76 -0
  70. package/base-modules/quote/products-form-section.d.ts +12 -0
  71. package/base-modules/quote/products-form-section.js +71 -0
  72. package/base-modules/quote/quote.d.ts +8 -0
  73. package/base-modules/quote/quote.js +69 -0
  74. package/base-modules/quote/reducer.d.ts +4 -0
  75. package/base-modules/quote/reducer.js +181 -0
  76. package/base-modules/quote/services-form-section.d.ts +12 -0
  77. package/base-modules/quote/services-form-section.js +73 -0
  78. package/base-modules/quote/types.d.ts +126 -0
  79. package/base-modules/quote/types.js +35 -0
  80. package/base-modules/quote/validate.d.ts +856 -0
  81. package/base-modules/quote/validate.js +85 -0
  82. package/i18n/navigation.d.ts +342 -0
  83. package/i18n/navigation.js +9 -0
  84. package/i18n/routing.d.ts +18 -0
  85. package/i18n/routing.js +9 -0
  86. package/package.json +21 -8
  87. package/base-modules/invoice/company-form-elements.d.ts +0 -3
  88. package/base-modules/invoice/company-form-elements.js +0 -41
  89. package/base-modules/invoice/customer-form-elements.d.ts +0 -3
  90. package/base-modules/invoice/customer-form-elements.js +0 -41
  91. package/base-modules/invoice/pricing-form-elements.d.ts +0 -3
  92. package/base-modules/invoice/pricing-form-elements.js +0 -41
@@ -1,17 +1,8 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- var _a, _b, _c, _d, _e;
6
2
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.validationErrors = exports.networkMessages = exports.tableBodyCols = exports.INVOICE_API_ROUTES = exports.staticProductSection = exports.staticServiceSection = exports.staticPricingSection = exports.staticCustomerSection = exports.staticCompanySection = exports.changeActionsMap = exports.handleSplitId = exports.pageLimit = void 0;
8
- var react_1 = __importDefault(require("react"));
3
+ exports.validationErrors = exports.tableBodyCols = exports.INVOICE_API_ROUTES = exports.changeActionsMap = exports.handleSplitId = exports.pageLimit = void 0;
9
4
  var util_functions_1 = require("@react-pakistan/util-functions");
10
- var form_schema_1 = require("@appcorp/app-corp-vista/utils/form-schema");
11
- var vista_button_type_1 = require("@appcorp/app-corp-vista/type/vista-button-type");
12
- var solid_1 = require("@heroicons/react/24/solid");
13
- var vista_table_type_1 = require("@appcorp/app-corp-vista/type/vista-table-type");
14
- var types_1 = require("./types");
5
+ var enhanced_table_1 = require("@appcorp/shadcn/components/enhanced-table");
15
6
  exports.pageLimit = Number(process.env.NEXT_PUBLIC_PAGE_LIMIT);
16
7
  var handleSplitId = function (value) {
17
8
  return value === null || value === void 0 ? void 0 : value.split(util_functions_1.VALUE_DELIMITER.COLON);
@@ -20,579 +11,97 @@ exports.handleSplitId = handleSplitId;
20
11
  exports.changeActionsMap = {
21
12
  companyId: function (val) { return (0, exports.handleSplitId)(val)[1]; },
22
13
  };
23
- exports.staticCompanySection = (_a = {},
24
- _a[form_schema_1.VISTA_FORM_ELEMENTS.TEXT_INPUT_V1] = [
25
- {
26
- enabled: true,
27
- error: '',
28
- handleOnChange: function () { return void 0; },
29
- id: 'ref',
30
- label: 'Ref',
31
- order: 6,
32
- placeholder: '',
33
- readOnly: true,
34
- required: true,
35
- type: 'text',
36
- value: '',
37
- },
38
- {
39
- enabled: true,
40
- error: '',
41
- handleOnChange: function () { return void 0; },
42
- id: 'date',
43
- label: 'Date',
44
- order: 2,
45
- placeholder: '',
46
- required: true,
47
- type: 'date',
48
- value: '',
49
- },
50
- {
51
- enabled: true,
52
- error: '',
53
- handleOnChange: function () { return void 0; },
54
- id: 'expiryDate',
55
- label: 'Expiry Date',
56
- order: 3,
57
- placeholder: '',
58
- required: true,
59
- type: 'date',
60
- value: '',
61
- },
62
- {
63
- enabled: true,
64
- error: '',
65
- handleOnChange: function () { return void 0; },
66
- id: 'note',
67
- label: 'Note',
68
- order: 5,
69
- placeholder: 'This is invoice for...',
70
- required: false,
71
- type: 'text',
72
- value: '',
73
- },
74
- ],
75
- _a[form_schema_1.VISTA_FORM_ELEMENTS.COMBOBOX_V1] = [
76
- {
77
- enabled: true,
78
- handleInputOnChange: function () { return void 0; },
79
- handleOnBlur: function () { return void 0; },
80
- handleOnChange: function () { return void 0; },
81
- label: 'Company',
82
- listItems: [],
83
- nodeQueryKey: 'companyQuery',
84
- nodeSelectKey: 'companyId',
85
- order: 1,
86
- query: '',
87
- required: true,
88
- selectKey1: 'name',
89
- selectedItem: { name: '' },
90
- },
91
- {
92
- enabled: true,
93
- handleInputOnChange: function () { return void 0; },
94
- handleOnBlur: function () { return void 0; },
95
- handleOnChange: function () { return void 0; },
96
- label: 'Currency',
97
- listItems: [],
98
- nodeQueryKey: '',
99
- nodeSelectKey: 'currency',
100
- order: 4,
101
- query: '',
102
- required: true,
103
- selectKey1: 'code',
104
- selectedItem: { code: '' },
105
- },
106
- // {
107
- // enabled: false,
108
- // handleOnChange: () => void 0,
109
- // label: 'Invoice Status',
110
- // listItems: [],
111
- // nodeSelectedKey: 'invoiceStatus',
112
- // order: 3,
113
- // required: false,
114
- // selectKey1: 'label',
115
- // selectKey2: '',
116
- // selectedItem: { label: 'Unpaid' },
117
- // },
118
- ],
119
- _a);
120
- exports.staticCustomerSection = (_b = {},
121
- _b[form_schema_1.VISTA_FORM_ELEMENTS.TEXT_INPUT_V1] = [
122
- {
123
- disabled: false,
124
- enabled: true,
125
- error: '',
126
- handleOnChange: function () { return void 0; },
127
- id: 'phone',
128
- label: 'Phone',
129
- order: 1,
130
- placeholder: '+92 300 0000000',
131
- required: true,
132
- type: 'text',
133
- value: ''
134
- },
135
- {
136
- disabled: false,
137
- enabled: true,
138
- error: '',
139
- handleOnChange: function () { return void 0; },
140
- id: 'firstName',
141
- label: 'First Name',
142
- order: 2,
143
- placeholder: 'John',
144
- required: true,
145
- type: 'text',
146
- value: '',
147
- },
148
- {
149
- disabled: false,
150
- enabled: true,
151
- error: '',
152
- handleOnChange: function () { return void 0; },
153
- id: 'lastName',
154
- label: 'Last Name',
155
- order: 3,
156
- placeholder: 'Doe',
157
- required: true,
158
- type: 'text',
159
- value: '',
160
- },
161
- {
162
- disabled: false,
163
- enabled: true,
164
- error: '',
165
- handleOnChange: function () { return void 0; },
166
- id: 'email',
167
- label: 'Email',
168
- order: 7,
169
- placeholder: 'name@company.com',
170
- required: false,
171
- type: 'text',
172
- value: '',
173
- },
174
- {
175
- disabled: false,
176
- enabled: true,
177
- error: '',
178
- handleOnChange: function () { return void 0; },
179
- id: 'city',
180
- label: 'City',
181
- order: 6,
182
- placeholder: 'New York',
183
- required: true,
184
- type: 'text',
185
- value: '',
186
- },
187
- {
188
- disabled: false,
189
- enabled: true,
190
- error: '',
191
- handleOnChange: function () { return void 0; },
192
- id: 'address',
193
- label: 'Address',
194
- order: 5,
195
- placeholder: '123 Street',
196
- required: false,
197
- type: 'text',
198
- value: '',
199
- },
200
- ],
201
- _b[form_schema_1.VISTA_FORM_ELEMENTS.COMBOBOX_V1] = [
202
- {
203
- enabled: true,
204
- handleInputOnChange: function () { return void 0; },
205
- handleOnBlur: function () { return void 0; },
206
- handleOnChange: function () { return void 0; },
207
- label: 'Country',
208
- listItems: [],
209
- nodeQueryKey: 'countryQuery',
210
- nodeSelectKey: 'country',
211
- order: 7,
212
- placeholder: '',
213
- query: '',
214
- required: true,
215
- selectKey1: 'name',
216
- selectedItem: { name: '' },
217
- },
218
- {
219
- enabled: true,
220
- handleInputOnChange: function () { return void 0; },
221
- handleOnBlur: function () { return void 0; },
222
- handleOnChange: function () { return void 0; },
223
- label: 'Currency',
224
- listItems: [],
225
- nodeQueryKey: '',
226
- nodeSelectKey: 'currency',
227
- order: 7,
228
- placeholder: '',
229
- query: '',
230
- required: true,
231
- selectKey1: 'code',
232
- selectedItem: { code: '' },
233
- },
234
- ],
235
- _b);
236
- exports.staticPricingSection = (_c = {},
237
- _c[form_schema_1.VISTA_FORM_ELEMENTS.TEXT_INPUT_V1] = [
238
- {
239
- disabled: false,
240
- enabled: true,
241
- error: '',
242
- handleOnChange: function () { return void 0; },
243
- id: 'subTotal',
244
- label: 'Sub Total',
245
- order: 1,
246
- placeholder: '0.00',
247
- readOnly: true,
248
- required: false,
249
- type: 'text',
250
- value: '',
251
- },
252
- {
253
- enabled: true,
254
- error: '',
255
- handleOnChange: function () { return void 0; },
256
- id: 'discount',
257
- label: 'Discount',
258
- order: 3,
259
- placeholder: '0.00',
260
- required: false,
261
- type: 'number',
262
- value: '',
263
- },
264
- {
265
- enabled: true,
266
- error: '',
267
- handleOnChange: function () { return void 0; },
268
- id: 'totalDiscount',
269
- label: 'After Discount',
270
- order: 4,
271
- placeholder: '0.00',
272
- readOnly: true,
273
- required: false,
274
- type: 'text',
275
- value: '',
276
- },
277
- {
278
- enabled: true,
279
- error: '',
280
- handleOnChange: function () { return void 0; },
281
- id: 'totalTax',
282
- label: 'After Tax',
283
- order: 6,
284
- placeholder: '0.00',
285
- readOnly: true,
286
- required: false,
287
- type: 'text',
288
- value: '',
289
- },
290
- {
291
- enabled: true,
292
- error: '',
293
- handleOnChange: function () { return void 0; },
294
- id: 'total',
295
- label: 'Total',
296
- order: 7,
297
- placeholder: '0.00',
298
- readOnly: true,
299
- required: false,
300
- type: 'text',
301
- value: '',
302
- },
303
- ],
304
- _c[form_schema_1.VISTA_FORM_ELEMENTS.COMBOBOX_V1] = [
305
- {
306
- enabled: true,
307
- handleInputOnChange: function () { return void 0; },
308
- handleOnBlur: function () { return void 0; },
309
- handleOnChange: function () { return void 0; },
310
- label: 'Tax',
311
- listItems: [],
312
- nodeQueryKey: 'taxQuery',
313
- nodeSelectKey: 'taxRate',
314
- order: 5,
315
- query: '',
316
- required: false,
317
- selectKey1: 'taxName',
318
- selectedItem: { taxName: '' },
319
- },
320
- ],
321
- _c[form_schema_1.VISTA_FORM_ELEMENTS.RADIO_V1] = [
322
- {
323
- id: 'discount',
324
- description: 'Discount can either be applied as a fixed value or percentage value, select below to confirm.',
325
- enabled: true,
326
- handleOnChange: function () { return void 0; },
327
- order: 2,
328
- selectedValue: '',
329
- title: 'Pick discount unit',
330
- list: [
331
- {
332
- enabled: true,
333
- id: 'item-1',
334
- label: 'Fixed Value',
335
- order: 1,
336
- value: types_1.DISCOUNT_UNIT.FIXED_VALUE,
337
- },
338
- {
339
- enabled: true,
340
- id: 'item-2',
341
- label: 'Percentage Value',
342
- order: 2,
343
- value: types_1.DISCOUNT_UNIT.PERCENTAGE_VALUE,
344
- },
345
- ],
346
- },
347
- ],
348
- _c);
349
- exports.staticServiceSection = (_d = {},
350
- _d[form_schema_1.VISTA_FORM_ELEMENTS.TEXT_INPUT_V1] = [
351
- {
352
- className: '',
353
- disabled: false,
354
- enabled: true,
355
- error: '',
356
- handleOnChange: function () { return void 0; },
357
- id: 'name',
358
- label: 'Item',
359
- order: 1,
360
- placeholder: 'Service Name',
361
- required: false,
362
- type: 'text',
363
- value: '',
364
- },
365
- {
366
- className: '',
367
- disabled: false,
368
- enabled: true,
369
- error: '',
370
- handleOnChange: function () { return void 0; },
371
- id: 'description',
372
- label: 'Description',
373
- order: 2,
374
- placeholder: 'Service Description',
375
- required: false,
376
- type: 'text',
377
- value: '',
378
- },
379
- {
380
- className: '',
381
- disabled: false,
382
- enabled: true,
383
- error: '',
384
- handleOnChange: function () { return void 0; },
385
- id: 'quantity',
386
- label: 'Quantity',
387
- order: 3,
388
- placeholder: '1',
389
- required: false,
390
- type: 'number',
391
- value: '',
392
- },
393
- {
394
- className: '',
395
- disabled: false,
396
- enabled: true,
397
- error: '',
398
- handleOnChange: function () { return void 0; },
399
- id: 'price',
400
- label: 'Price',
401
- order: 4,
402
- placeholder: '0.00',
403
- required: false,
404
- type: 'number',
405
- value: '',
406
- },
407
- {
408
- className: '',
409
- disabled: true,
410
- enabled: true,
411
- error: '',
412
- handleOnChange: function () { return void 0; },
413
- id: 'rowTotal',
414
- label: 'Row Total',
415
- order: 5,
416
- placeholder: '0.00',
417
- required: false,
418
- type: 'text',
419
- value: '',
420
- },
421
- ],
422
- _d[form_schema_1.VISTA_FORM_ELEMENTS.BUTTON_V1] = [
423
- {
424
- className: 'flex justify-center items-end',
425
- enabled: true,
426
- handleOnClick: function () { return void 0; },
427
- icon: react_1.default.createElement(solid_1.TrashIcon, { className: "size-6" }),
428
- order: 6,
429
- variant: vista_button_type_1.VISTA_BUTTON_VARIANT.ICON,
430
- },
431
- ],
432
- _d);
433
- exports.staticProductSection = (_e = {},
434
- _e[form_schema_1.VISTA_FORM_ELEMENTS.COMBOBOX_V1] = [
435
- {
436
- // className: 'col-span-2',
437
- // selectKey2: '',
438
- enabled: true,
439
- handleInputOnChange: function () { return void 0; },
440
- handleOnBlur: function () { return void 0; },
441
- handleOnChange: function () { return void 0; },
442
- label: 'Product',
443
- listItems: [],
444
- nodeQueryKey: 'productQuery',
445
- nodeSelectKey: 'productId',
446
- order: 1,
447
- query: '',
448
- required: false,
449
- selectKey1: 'name',
450
- selectedItem: { name: '' },
451
- },
452
- ],
453
- _e[form_schema_1.VISTA_FORM_ELEMENTS.TEXT_INPUT_V1] = [
454
- {
455
- className: '',
456
- disabled: false,
457
- enabled: true,
458
- error: '',
459
- handleOnChange: function () { return void 0; },
460
- id: 'quantity',
461
- label: 'Quantity',
462
- order: 2,
463
- placeholder: '1',
464
- required: false,
465
- type: 'number',
466
- value: '',
467
- },
468
- {
469
- className: '',
470
- disabled: false,
471
- enabled: true,
472
- error: '',
473
- handleOnChange: function () { return void 0; },
474
- id: 'price',
475
- label: 'Price',
476
- order: 3,
477
- placeholder: '0.00',
478
- required: false,
479
- type: 'number',
480
- value: '',
481
- },
482
- {
483
- className: '',
484
- disabled: true,
485
- enabled: true,
486
- error: '',
487
- handleOnChange: function () { return void 0; },
488
- id: 'rowTotal',
489
- label: 'Row Total',
490
- order: 4,
491
- placeholder: '0.00',
492
- required: false,
493
- type: 'text',
494
- value: '',
495
- },
496
- ],
497
- _e[form_schema_1.VISTA_FORM_ELEMENTS.BUTTON_V1] = [
498
- {
499
- className: 'flex justify-center items-end',
500
- enabled: true,
501
- handleOnClick: function () { return void 0; },
502
- icon: react_1.default.createElement(solid_1.TrashIcon, { className: "size-6" }),
503
- order: 5,
504
- variant: vista_button_type_1.VISTA_BUTTON_VARIANT.ICON,
505
- },
506
- ],
507
- _e);
508
14
  exports.INVOICE_API_ROUTES = {
509
- INVOICES: '/api/quotes-invoices',
510
- INVOICE: '/api/quote-invoice',
511
- INVOICE_BY_ID: '/api/quote-invoice/quote-invoice-by-id',
512
- PRODUCTS: '/api/products',
513
- CONTACTS: '/api/contacts',
514
- CUSTOMER_BY_PHONE: '/api/customer/by-phone',
515
- TAXES: '/api/taxes',
516
- TAX: '/api/tax',
517
- COMPANIES: '/api/companies'
15
+ INVOICES: "/api/quotes-invoices",
16
+ INVOICE: "/api/quote-invoice",
17
+ INVOICE_BY_ID: "/api/quote-invoice/quote-invoice-by-id",
18
+ PRODUCTS: "/api/products",
19
+ CONTACTS: "/api/contacts",
20
+ CUSTOMER_BY_PHONE: "/api/customer/customer-by-phone",
21
+ TAXES: "/api/taxes",
22
+ TAX: "/api/tax",
23
+ COMPANIES: "/api/companies",
518
24
  };
519
25
  exports.tableBodyCols = [
520
26
  {
521
- componentType: vista_table_type_1.VISTA_TABLE_CELL_TYPE.ID,
522
- key: 'id',
27
+ componentType: enhanced_table_1.COMPONENT_TYPE.ID,
28
+ key: "id",
523
29
  },
524
30
  {
525
- componentType: vista_table_type_1.VISTA_TABLE_CELL_TYPE.OBJECT,
526
- key: ['company:customer', 'name:firstName'],
31
+ componentType: enhanced_table_1.COMPONENT_TYPE.OBJECT,
32
+ key: ["company:name", "customer:firstName"],
527
33
  },
528
34
  {
529
- componentType: vista_table_type_1.VISTA_TABLE_CELL_TYPE.MULTIPLE_TEXT_LINES,
530
- key: ['date', 'expiryDate'],
531
- expression: function (text) { return (0, util_functions_1.formatDate)(text, util_functions_1.DATE_FORMATS.LOCALE_DATE); },
35
+ componentType: enhanced_table_1.COMPONENT_TYPE.MULTIPLE_TEXT_LINES,
36
+ key: ["date", "expiryDate"],
37
+ textFormatter: function (text) {
38
+ return (0, util_functions_1.formatDate)(text, util_functions_1.DATE_FORMATS.LOCALE_DATE);
39
+ },
532
40
  },
533
41
  {
534
- componentType: vista_table_type_1.VISTA_TABLE_CELL_TYPE.TEXT,
535
- key: 'ref',
42
+ componentType: enhanced_table_1.COMPONENT_TYPE.TEXT,
43
+ key: "ref",
536
44
  },
537
45
  {
538
- componentType: vista_table_type_1.VISTA_TABLE_CELL_TYPE.TEXT,
539
- key: 'subTotal',
540
- expression: function (text, obj) { return "".concat(obj.currency).concat(text); },
46
+ componentType: enhanced_table_1.COMPONENT_TYPE.TEXT,
47
+ key: "subTotal",
48
+ textFormatter: function (text, obj) {
49
+ return "".concat(obj === null || obj === void 0 ? void 0 : obj.currency).concat(text);
50
+ },
541
51
  },
542
52
  {
543
- componentType: vista_table_type_1.VISTA_TABLE_CELL_TYPE.TEXT,
544
- key: 'taxRate',
53
+ componentType: enhanced_table_1.COMPONENT_TYPE.TEXT,
54
+ key: "taxRate",
545
55
  },
546
56
  {
547
- componentType: vista_table_type_1.VISTA_TABLE_CELL_TYPE.TEXT,
548
- key: 'discount',
57
+ componentType: enhanced_table_1.COMPONENT_TYPE.TEXT,
58
+ key: "discount",
549
59
  },
550
60
  {
551
- componentType: vista_table_type_1.VISTA_TABLE_CELL_TYPE.TEXT,
552
- key: 'total',
553
- expression: function (text, obj) { return "".concat(obj.currency).concat(text); },
61
+ componentType: enhanced_table_1.COMPONENT_TYPE.TEXT,
62
+ key: "total",
63
+ textFormatter: function (text, obj) {
64
+ return "".concat(obj === null || obj === void 0 ? void 0 : obj.currency).concat(text);
65
+ },
554
66
  },
555
67
  {
556
- componentType: vista_table_type_1.VISTA_TABLE_CELL_TYPE.TEXT,
557
- key: 'category',
68
+ componentType: enhanced_table_1.COMPONENT_TYPE.TEXT,
69
+ key: "category",
558
70
  },
559
71
  {
560
- componentType: vista_table_type_1.VISTA_TABLE_CELL_TYPE.ACTIONS,
72
+ componentType: enhanced_table_1.COMPONENT_TYPE.ACTIONS,
73
+ key: "actions",
561
74
  },
562
75
  ];
563
- exports.networkMessages = {
564
- error: 'Error occurred, please, try again',
565
- success: 'Operation successful!',
566
- };
567
76
  exports.validationErrors = {
568
- companyId: 'Please select Company',
569
- ref: 'Please enter ref',
570
- status: 'Please select status',
571
- date: 'Please select date',
572
- expiryDate: 'Please select expire date',
573
- note: 'Please enter a note',
574
- currency: 'Please select currency',
575
- total: 'Please enter net total',
576
- subTotal: 'Please enter sub total',
577
- taxRate: 'Please enter tax value',
578
- customerPhone: 'Please enter phone',
579
- customerFirstName: 'Please enter first name',
580
- customerLastName: 'Please enter last name',
581
- customerAddress: 'Please enter address',
582
- customerCity: 'Please enter city',
583
- customerCountry: 'Please enter country',
584
- customerEmail: 'Please enter email',
77
+ companyId: "Please select Company",
78
+ ref: "Please enter ref",
79
+ status: "Please select status",
80
+ date: "Please select date",
81
+ expiryDate: "Please select expire date",
82
+ note: "Please enter a note",
83
+ currency: "Please select currency",
84
+ total: "Please enter net total",
85
+ subTotal: "Please enter sub total",
86
+ taxRate: "Please enter tax value",
87
+ customerPhone: "Please enter phone",
88
+ customerFirstName: "Please enter first name",
89
+ customerLastName: "Please enter last name",
90
+ customerAddress: "Please enter address",
91
+ customerCity: "Please enter city",
92
+ customerCountry: "Please enter country",
93
+ customerEmail: "Please enter email",
585
94
  services: {
586
- name: 'Item is required',
587
- description: 'Description is required',
588
- quantity: 'Quantity is required',
589
- price: 'Price is required',
590
- total: 'Total price is required',
95
+ name: "Item is required",
96
+ description: "Description is required",
97
+ quantity: "Quantity is required",
98
+ price: "Price is required",
99
+ total: "Total price is required",
591
100
  },
592
101
  products: {
593
- id: 'Please select a product',
594
- quantity: 'Please enter Quantity',
595
- price: 'Price is required',
596
- total: 'Total price is required',
102
+ id: "Please select a product",
103
+ quantity: "Please enter Quantity",
104
+ price: "Price is required",
105
+ total: "Total price is required",
597
106
  },
598
107
  };