oa-componentbook 0.18.207 → 0.18.209

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.
@@ -82,6 +82,7 @@ function SparePartsWidget(_ref) {
82
82
  showPriceHistory,
83
83
  onViewPriceHistory,
84
84
  showGST,
85
+ showDiscount,
85
86
  showSparePartsInfo = true
86
87
  } = _ref;
87
88
  const sparePartList = [...scopeDetails.unCoveredScope, ...scopeDetails.coveredScope];
@@ -135,12 +136,22 @@ function SparePartsWidget(_ref) {
135
136
  render: (text, record) => renderCoverage(record.isCovered, record.className)
136
137
  });
137
138
  }
139
+ if (showDiscount) {
140
+ columns.push({
141
+ title: 'Discount',
142
+ dataIndex: 'discount',
143
+ width: '20%',
144
+ key: 'discount',
145
+ render: (text, record) => renderCost(text)
146
+ });
147
+ }
138
148
  if (showGST) {
139
149
  columns.push({
140
150
  title: 'GST (18%)',
141
151
  dataIndex: 'gstAmount',
142
152
  width: '20%',
143
- key: 'gstAmount'
153
+ key: 'gstAmount',
154
+ render: (text, record) => renderCost(text)
144
155
  });
145
156
  }
146
157
 
@@ -210,7 +221,8 @@ SparePartsWidget.propTypes = {
210
221
  showPriceHistory: _propTypes.default.bool,
211
222
  onViewPriceHistory: _propTypes.default.func,
212
223
  showSparePartsInfo: _propTypes.default.bool,
213
- showGST: _propTypes.default.bool
224
+ showGST: _propTypes.default.bool,
225
+ showDiscount: _propTypes.default.bool
214
226
  };
215
227
 
216
228
  // Define default props for SpareParts component
@@ -225,6 +237,7 @@ SparePartsWidget.defaultProps = {
225
237
  showPriceHistory: false,
226
238
  onViewPriceHistory: data => console.log(data),
227
239
  showSparePartsInfo: true,
228
- showGST: false
240
+ showGST: false,
241
+ showDiscount: false
229
242
  };
230
243
  var _default = exports.default = SparePartsWidget;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oa-componentbook",
3
- "version": "0.18.207",
3
+ "version": "0.18.209",
4
4
  "private": false,
5
5
  "description": "Reusable components",
6
6
  "main": "build/index.js",