@medipass/utils 11.81.0 → 11.81.2-chore-update-react-places-autocomplete.0
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.
- package/babel.config.js +2 -2
- package/build-validation-schema.js +301 -269
- package/chart.js +12 -8
- package/claim-payment-status-formatted.js +1 -1
- package/claim-payment-status-icons.js +1 -1
- package/claim-payment-status-text-classes.js +1 -1
- package/datetime.js +10 -6
- package/document-types-formatted.js +1 -1
- package/document-types-icons.js +1 -1
- package/document-types-text-classes.js +1 -1
- package/documents/workflow-state-formatted-text-classes.js +1 -1
- package/documents/workflow-state-formatted.js +7 -5
- package/documents/workflow-state-icons.js +1 -1
- package/form-applications/assign-values-to-sections.js +6 -4
- package/funders.js +6 -4
- package/get-env.js +14 -23
- package/get-select-options.js +11 -9
- package/get-staff-type-display-name.js +1 -1
- package/google-addresses.d.ts +13 -8
- package/google-addresses.js +30 -37
- package/i18n/index.js +18 -17
- package/i18n/translations.js +1 -1
- package/index.js +41 -41
- package/intercom.js +16 -12
- package/masked.js +12 -8
- package/package.json +6 -6
- package/parse-health-fund-card-fields.js +1 -1
- package/practices-d6c480f1.js +2 -2
- package/products.js +8 -6
- package/redux-actions.js +15 -10
- package/redux-reducer.js +15 -11
- package/sanitise-url.js +6 -4
- package/scroll.js +1 -1
- package/sensitive-keys.js +1 -1
- package/sentry.js +48 -25
- package/service-items.js +26 -21
- package/status-icons.js +1 -1
- package/status-text-classes.js +1 -1
- package/test-framework/fixtures/billable-items.js +2 -2
- package/test-framework/fixtures/businesses.js +2 -2
- package/test-framework/fixtures/forms.js +2 -2
- package/test-framework/fixtures/health-fund-accounts.js +2 -2
- package/test-framework/fixtures/health-fund-settings.js +2 -2
- package/test-framework/fixtures/health-funds.js +3 -3
- package/test-framework/fixtures/index.js +37 -37
- package/test-framework/fixtures/members.js +2 -2
- package/test-framework/fixtures/modalities.js +2 -2
- package/test-framework/fixtures/patients.js +2 -2
- package/test-framework/fixtures/payment-methods.js +2 -2
- package/test-framework/fixtures/practices.js +4 -4
- package/test-framework/fixtures/products.js +3 -3
- package/test-framework/fixtures/professional-categories.js +2 -2
- package/test-framework/fixtures/services.js +4 -4
- package/test-framework/fixtures/specialties.js +2 -2
- package/test-framework/fixtures/staff.js +5 -5
- package/test-framework/fixtures/subscriptions.js +6 -6
- package/test-framework/fixtures/transactions.js +14 -14
- package/transaction-status-formatted.js +1 -1
- package/transaction-status-helpers.js +9 -7
- package/transaction-status-icons.js +1 -1
- package/transaction-status-text-classes.js +1 -1
- package/transaction-status.js +11 -9
- package/tsconfig.json +1 -1
- package/validate-form.js +37 -27
- package/validate.js +32 -11
- package/webpack-config.js +5 -3
- package/workflow-state-formatted-text-classes.js +1 -1
- package/workflow-state-formatted.js +7 -5
- package/test-framework/react.d.ts +0 -8
- package/test-framework/react.js +0 -39
package/service-items.js
CHANGED
|
@@ -2,16 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
6
|
+
var _get = require('lodash/get');
|
|
7
|
+
var _isEmpty = require('lodash/isEmpty');
|
|
8
|
+
var _difference = require('lodash/difference');
|
|
6
9
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var
|
|
10
|
-
var
|
|
10
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
|
+
|
|
12
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
13
|
+
var _get__default = /*#__PURE__*/_interopDefaultLegacy(_get);
|
|
14
|
+
var _isEmpty__default = /*#__PURE__*/_interopDefaultLegacy(_isEmpty);
|
|
15
|
+
var _difference__default = /*#__PURE__*/_interopDefaultLegacy(_difference);
|
|
11
16
|
|
|
12
17
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
13
18
|
|
|
14
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
19
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
15
20
|
function round(value, step) {
|
|
16
21
|
var inv = 1.0 / step;
|
|
17
22
|
return Math.round(value * inv) / inv;
|
|
@@ -21,7 +26,7 @@ var calculateTotalAmount = function calculateTotalAmount(serviceItems, opts) {
|
|
|
21
26
|
opts = {};
|
|
22
27
|
}
|
|
23
28
|
|
|
24
|
-
if (
|
|
29
|
+
if (_isEmpty__default["default"](serviceItems)) {
|
|
25
30
|
return 0;
|
|
26
31
|
}
|
|
27
32
|
|
|
@@ -36,7 +41,7 @@ var calculateTotalAmount = function calculateTotalAmount(serviceItems, opts) {
|
|
|
36
41
|
}
|
|
37
42
|
|
|
38
43
|
if (opts.includeDiscount && item.discountAmount) {
|
|
39
|
-
var discountAmount = parseFloat(
|
|
44
|
+
var discountAmount = parseFloat(_get__default["default"](item, 'discountAmount', '0'));
|
|
40
45
|
itemTotal -= discountAmount;
|
|
41
46
|
}
|
|
42
47
|
|
|
@@ -46,7 +51,7 @@ var calculateTotalAmount = function calculateTotalAmount(serviceItems, opts) {
|
|
|
46
51
|
};
|
|
47
52
|
var calculateTotalDiscountAmount = function calculateTotalDiscountAmount(serviceItems) {
|
|
48
53
|
return serviceItems.reduce(function (total, item) {
|
|
49
|
-
return total + parseFloat(
|
|
54
|
+
return total + parseFloat(_get__default["default"](item, 'discountAmount', '0'));
|
|
50
55
|
}, 0);
|
|
51
56
|
};
|
|
52
57
|
var calculateTotalGSTAmount = function calculateTotalGSTAmount(serviceItems, opts) {
|
|
@@ -115,11 +120,11 @@ var getItemValue = function getItemValue(item, opts) {
|
|
|
115
120
|
_ref2$useBenefitAsPri = _ref2.useBenefitAsPrice,
|
|
116
121
|
useBenefitAsPrice = _ref2$useBenefitAsPri === void 0 ? false : _ref2$useBenefitAsPri;
|
|
117
122
|
|
|
118
|
-
var benefit =
|
|
123
|
+
var benefit = _get__default["default"](item, 'benefit', 0);
|
|
119
124
|
|
|
120
125
|
var benefitAmount = (benefit / 100).toFixed(2);
|
|
121
126
|
|
|
122
|
-
var price =
|
|
127
|
+
var price = _get__default["default"](item, 'price');
|
|
123
128
|
|
|
124
129
|
var feeAmount = (price / 100).toFixed(2);
|
|
125
130
|
var option = {
|
|
@@ -141,9 +146,9 @@ var getItemValue = function getItemValue(item, opts) {
|
|
|
141
146
|
} : {});
|
|
142
147
|
};
|
|
143
148
|
function mapItemsToClaimItems(transaction) {
|
|
144
|
-
var claimItems =
|
|
149
|
+
var claimItems = _get__default["default"](transaction, 'claims[0].claimItems', []);
|
|
145
150
|
|
|
146
|
-
var items =
|
|
151
|
+
var items = _get__default["default"](transaction, 'items', []);
|
|
147
152
|
|
|
148
153
|
if (items.length === 0) {
|
|
149
154
|
return claimItems;
|
|
@@ -156,13 +161,13 @@ function mapItemsToClaimItems(transaction) {
|
|
|
156
161
|
return claimItem.itemId === item.itemId;
|
|
157
162
|
}) || {};
|
|
158
163
|
|
|
159
|
-
var isNonClaimable =
|
|
164
|
+
var isNonClaimable = _isEmpty__default["default"](claimItem);
|
|
160
165
|
|
|
161
166
|
return _objectSpread({}, item, {}, claimItem, {
|
|
162
|
-
displayName:
|
|
163
|
-
itemCode:
|
|
164
|
-
description:
|
|
165
|
-
notes:
|
|
167
|
+
displayName: _get__default["default"](item, 'displayName') || _get__default["default"](claimItem, 'displayName'),
|
|
168
|
+
itemCode: _get__default["default"](claimItem, 'icare.itemCode') || _get__default["default"](claimItem, 'itemCode'),
|
|
169
|
+
description: _get__default["default"](item, 'customDescription') || _get__default["default"](item, 'description') || _get__default["default"](claimItem, 'icare.description') || _get__default["default"](claimItem, 'description'),
|
|
170
|
+
notes: _get__default["default"](item, 'description'),
|
|
166
171
|
serviceDateString: (item == null ? void 0 : item.serviceDateString) || item.serviceDate,
|
|
167
172
|
isNonClaimable: isNonClaimable
|
|
168
173
|
});
|
|
@@ -175,7 +180,7 @@ function mapItemsToClaimItems(transaction) {
|
|
|
175
180
|
var newItemIds = newItems.map(function (newItem) {
|
|
176
181
|
return newItem.claimItemId;
|
|
177
182
|
});
|
|
178
|
-
var extraItemIds =
|
|
183
|
+
var extraItemIds = _difference__default["default"](claimItemIds, newItemIds) || [];
|
|
179
184
|
var extraItems = extraItemIds.map(function (extraItemId) {
|
|
180
185
|
// @ts-expect-error TS(7006): Parameter 'claimItem' implicitly has an 'any' type... Remove this comment to see the full error message
|
|
181
186
|
var claimItem = claimItems.find(function (claimItem) {
|
|
@@ -186,8 +191,8 @@ function mapItemsToClaimItems(transaction) {
|
|
|
186
191
|
return item.itemId === claimItem.itemId;
|
|
187
192
|
});
|
|
188
193
|
return _objectSpread({}, item, {}, claimItem, {
|
|
189
|
-
displayName:
|
|
190
|
-
itemCode:
|
|
194
|
+
displayName: _get__default["default"](claimItem, 'displayName'),
|
|
195
|
+
itemCode: _get__default["default"](claimItem, 'icare.itemCode') || _get__default["default"](claimItem, 'itemCode'),
|
|
191
196
|
description: undefined,
|
|
192
197
|
notes: undefined,
|
|
193
198
|
serviceDateString: (item == null ? void 0 : item.serviceDateString) || item.serviceDate,
|
package/status-icons.js
CHANGED
|
@@ -7,4 +7,4 @@ var constants = require('./constants.js');
|
|
|
7
7
|
var _statusIcons;
|
|
8
8
|
var statusIcons = (_statusIcons = {}, _statusIcons[constants.STATUSES.ACTIVE] = 'fa fa-check-circle', _statusIcons[constants.STATUSES.UNVERIFIED] = '', _statusIcons[constants.STATUSES.NEW] = '', _statusIcons[constants.STATUSES.DISABLED] = 'danger', _statusIcons[constants.STATUSES.INVITED] = '', _statusIcons[constants.STATUSES.CANCELLED] = '', _statusIcons[constants.STATUSES.COMPLETED] = '', _statusIcons[constants.STATUSES.ERRORED] = 'danger', _statusIcons[constants.STATUSES.PENDING] = 'fa fa-clock', _statusIcons[constants.STATUSES.EXPIRED] = 'fa fa-exclamation-triangle', _statusIcons);
|
|
9
9
|
|
|
10
|
-
exports
|
|
10
|
+
exports["default"] = statusIcons;
|
package/status-text-classes.js
CHANGED
|
@@ -7,4 +7,4 @@ var constants = require('./constants.js');
|
|
|
7
7
|
var _statusTextClasses;
|
|
8
8
|
var statusTextClasses = (_statusTextClasses = {}, _statusTextClasses[constants.STATUSES.ACTIVE] = 'success', _statusTextClasses[constants.STATUSES.UNVERIFIED] = 'warning', _statusTextClasses[constants.STATUSES.NEW] = 'primary', _statusTextClasses[constants.STATUSES.DISABLED] = 'danger', _statusTextClasses[constants.STATUSES.INVITED] = 'primary', _statusTextClasses[constants.STATUSES.CANCELLED] = 'danger', _statusTextClasses[constants.STATUSES.COMPLETED] = 'success', _statusTextClasses[constants.STATUSES.ERRORED] = 'danger', _statusTextClasses[constants.STATUSES.PENDING] = 'warning', _statusTextClasses[constants.STATUSES.EXPIRED] = 'danger', _statusTextClasses);
|
|
9
9
|
|
|
10
|
-
exports
|
|
10
|
+
exports["default"] = statusTextClasses;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var testFramework_fixtures_billableItems = require('../../billable-items-f8291b1e.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.defaultBillableItem =
|
|
9
|
+
exports.defaultBillableItem = testFramework_fixtures_billableItems.defaultBillableItem;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var testFramework_fixtures_businesses = require('../../businesses-e02c0f4b.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.defaultBusiness =
|
|
9
|
+
exports.defaultBusiness = testFramework_fixtures_businesses.defaultBusiness;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var testFramework_fixtures_forms = require('../../forms-e1c51a53.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.formDefault =
|
|
9
|
+
exports.formDefault = testFramework_fixtures_forms.formDefault;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var testFramework_fixtures_healthFundAccounts = require('../../health-fund-accounts-88eac93c.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.defaultHealthFundAccount =
|
|
9
|
+
exports.defaultHealthFundAccount = testFramework_fixtures_healthFundAccounts.defaultHealthFundAccount;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var testFramework_fixtures_healthFundSettings = require('../../health-fund-settings-e7a0f2ec.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.defaultHealthFundSetting =
|
|
9
|
+
exports.defaultHealthFundSetting = testFramework_fixtures_healthFundSettings.defaultHealthFundSetting;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var testFramework_fixtures_healthFunds = require('../../health-funds-7fea63a0.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.defaultHealthFund =
|
|
10
|
-
exports.medicareHealthFund =
|
|
9
|
+
exports.defaultHealthFund = testFramework_fixtures_healthFunds.defaultHealthFund;
|
|
10
|
+
exports.medicareHealthFund = testFramework_fixtures_healthFunds.medicareHealthFund;
|
|
@@ -2,44 +2,44 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var
|
|
16
|
-
var
|
|
17
|
-
var
|
|
18
|
-
var
|
|
19
|
-
var
|
|
20
|
-
var
|
|
21
|
-
var
|
|
22
|
-
var
|
|
5
|
+
var testFramework_fixtures_billableItems = require('../../billable-items-f8291b1e.js');
|
|
6
|
+
var testFramework_fixtures_businesses = require('../../businesses-e02c0f4b.js');
|
|
7
|
+
var testFramework_fixtures_forms = require('../../forms-e1c51a53.js');
|
|
8
|
+
var testFramework_fixtures_healthFundAccounts = require('../../health-fund-accounts-88eac93c.js');
|
|
9
|
+
var testFramework_fixtures_healthFundSettings = require('../../health-fund-settings-e7a0f2ec.js');
|
|
10
|
+
var testFramework_fixtures_healthFunds = require('../../health-funds-7fea63a0.js');
|
|
11
|
+
var testFramework_fixtures_members = require('../../members-8eb8d8d0.js');
|
|
12
|
+
var testFramework_fixtures_modalities = require('../../modalities-2dfbea63.js');
|
|
13
|
+
var testFramework_fixtures_patients = require('../../patients-dd3709c1.js');
|
|
14
|
+
var testFramework_fixtures_paymentMethods = require('../../payment-methods-d36bc018.js');
|
|
15
|
+
var testFramework_fixtures_practices = require('../../practices-d6c480f1.js');
|
|
16
|
+
var testFramework_fixtures_products = require('../../products-0a392564.js');
|
|
17
|
+
var testFramework_fixtures_professionalCategories = require('../../professional-categories-157d1767.js');
|
|
18
|
+
var testFramework_fixtures_services = require('../../services-f8480eba.js');
|
|
19
|
+
var testFramework_fixtures_specialties = require('../../specialties-25fbb171.js');
|
|
20
|
+
var testFramework_fixtures_staff = require('../../staff-646053b7.js');
|
|
21
|
+
var testFramework_fixtures_subscriptions = require('../../subscriptions-aef302aa.js');
|
|
22
|
+
var testFramework_fixtures_transactions = require('../../transactions-de03f65c.js');
|
|
23
23
|
|
|
24
24
|
var index = {
|
|
25
|
-
billableItems:
|
|
26
|
-
businesses:
|
|
27
|
-
forms:
|
|
28
|
-
healthFundAccounts:
|
|
29
|
-
healthFundSettings:
|
|
30
|
-
healthFunds:
|
|
31
|
-
members:
|
|
32
|
-
modalities:
|
|
33
|
-
patients:
|
|
34
|
-
paymentMethods:
|
|
35
|
-
practices:
|
|
36
|
-
products:
|
|
37
|
-
professionalCategories:
|
|
38
|
-
services:
|
|
39
|
-
specialties:
|
|
40
|
-
staff:
|
|
41
|
-
subscriptions:
|
|
42
|
-
transactions:
|
|
25
|
+
billableItems: testFramework_fixtures_billableItems.billableItems,
|
|
26
|
+
businesses: testFramework_fixtures_businesses.businesses,
|
|
27
|
+
forms: testFramework_fixtures_forms.forms,
|
|
28
|
+
healthFundAccounts: testFramework_fixtures_healthFundAccounts.healthFundAccounts,
|
|
29
|
+
healthFundSettings: testFramework_fixtures_healthFundSettings.healthFundSettings,
|
|
30
|
+
healthFunds: testFramework_fixtures_healthFunds.healthFunds,
|
|
31
|
+
members: testFramework_fixtures_members.members,
|
|
32
|
+
modalities: testFramework_fixtures_modalities.modalities,
|
|
33
|
+
patients: testFramework_fixtures_patients.patients,
|
|
34
|
+
paymentMethods: testFramework_fixtures_paymentMethods.paymentMethods,
|
|
35
|
+
practices: testFramework_fixtures_practices.practices,
|
|
36
|
+
products: testFramework_fixtures_products.products,
|
|
37
|
+
professionalCategories: testFramework_fixtures_professionalCategories.professionalCategories,
|
|
38
|
+
services: testFramework_fixtures_services.services,
|
|
39
|
+
specialties: testFramework_fixtures_specialties.specialties,
|
|
40
|
+
staff: testFramework_fixtures_staff.staff,
|
|
41
|
+
subscriptions: testFramework_fixtures_subscriptions.subscriptions,
|
|
42
|
+
transactions: testFramework_fixtures_transactions.transactions
|
|
43
43
|
};
|
|
44
44
|
|
|
45
|
-
exports
|
|
45
|
+
exports["default"] = index;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var testFramework_fixtures_members = require('../../members-8eb8d8d0.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.defaultMember =
|
|
9
|
+
exports.defaultMember = testFramework_fixtures_members.defaultMember;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var testFramework_fixtures_modalities = require('../../modalities-2dfbea63.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.defaultModality =
|
|
9
|
+
exports.defaultModality = testFramework_fixtures_modalities.defaultModality;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var testFramework_fixtures_patients = require('../../patients-dd3709c1.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.defaultPatient =
|
|
9
|
+
exports.defaultPatient = testFramework_fixtures_patients.defaultPatient;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var testFramework_fixtures_paymentMethods = require('../../payment-methods-d36bc018.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.defaultPaymentMethod =
|
|
9
|
+
exports.defaultPaymentMethod = testFramework_fixtures_paymentMethods.defaultPaymentMethod;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var testFramework_fixtures_practices = require('../../practices-d6c480f1.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.defaultPractice =
|
|
10
|
-
exports.defaultPractice2 =
|
|
11
|
-
exports.practices =
|
|
9
|
+
exports.defaultPractice = testFramework_fixtures_practices.defaultPractice;
|
|
10
|
+
exports.defaultPractice2 = testFramework_fixtures_practices.defaultPractice2;
|
|
11
|
+
exports.practices = testFramework_fixtures_practices.practices$1;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var testFramework_fixtures_products = require('../../products-0a392564.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.productBasic =
|
|
10
|
-
exports.productPro =
|
|
9
|
+
exports.productBasic = testFramework_fixtures_products.productBasic;
|
|
10
|
+
exports.productPro = testFramework_fixtures_products.productPro;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var testFramework_fixtures_professionalCategories = require('../../professional-categories-157d1767.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.defaultProfessionalCategory =
|
|
9
|
+
exports.defaultProfessionalCategory = testFramework_fixtures_professionalCategories.defaultProfessionalCategory;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var testFramework_fixtures_services = require('../../services-f8480eba.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.defaultService =
|
|
10
|
-
exports.defaultServiceItems =
|
|
11
|
-
exports.serviceWithMultipleClaimItems =
|
|
9
|
+
exports.defaultService = testFramework_fixtures_services.defaultService;
|
|
10
|
+
exports.defaultServiceItems = testFramework_fixtures_services.defaultServiceItems;
|
|
11
|
+
exports.serviceWithMultipleClaimItems = testFramework_fixtures_services.serviceWithMultipleClaimItems;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var testFramework_fixtures_specialties = require('../../specialties-25fbb171.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.defaultSpecialty =
|
|
9
|
+
exports.defaultSpecialty = testFramework_fixtures_specialties.defaultSpecialty;
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var testFramework_fixtures_staff = require('../../staff-646053b7.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.defaultPractitioner =
|
|
10
|
-
exports.defaultPractitioner2 =
|
|
11
|
-
exports.practitionerWithActivePendingProviderSet =
|
|
12
|
-
exports.practitionerWithPendingProviderSet =
|
|
9
|
+
exports.defaultPractitioner = testFramework_fixtures_staff.defaultPractitioner;
|
|
10
|
+
exports.defaultPractitioner2 = testFramework_fixtures_staff.defaultPractitioner2;
|
|
11
|
+
exports.practitionerWithActivePendingProviderSet = testFramework_fixtures_staff.practitionerWithActivePendingProviderSet;
|
|
12
|
+
exports.practitionerWithPendingProviderSet = testFramework_fixtures_staff.practitionerWithPendingProviderSet;
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var testFramework_fixtures_subscriptions = require('../../subscriptions-aef302aa.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.subscriptionBasic =
|
|
10
|
-
exports.subscriptionPro =
|
|
11
|
-
exports.subscriptionProEnded =
|
|
12
|
-
exports.subscriptionProUpcoming =
|
|
13
|
-
exports.subscriptionProWithoutPaymentMethod =
|
|
9
|
+
exports.subscriptionBasic = testFramework_fixtures_subscriptions.subscriptionBasic;
|
|
10
|
+
exports.subscriptionPro = testFramework_fixtures_subscriptions.subscriptionPro;
|
|
11
|
+
exports.subscriptionProEnded = testFramework_fixtures_subscriptions.subscriptionProEnded;
|
|
12
|
+
exports.subscriptionProUpcoming = testFramework_fixtures_subscriptions.subscriptionProUpcoming;
|
|
13
|
+
exports.subscriptionProWithoutPaymentMethod = testFramework_fixtures_subscriptions.subscriptionProWithoutPaymentMethod;
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var testFramework_fixtures_transactions = require('../../transactions-de03f65c.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.defaultTransaction =
|
|
10
|
-
exports.transactionForMemberRequestQuote =
|
|
11
|
-
exports.transactionForMemberRequestQuoteComplete =
|
|
12
|
-
exports.transactionQuoteDefault =
|
|
13
|
-
exports.transactionWithApprovedInPersonPayment =
|
|
14
|
-
exports.transactionWithApprovedPayment =
|
|
15
|
-
exports.transactionWithClaim =
|
|
16
|
-
exports.transactionWithMedicareClaim =
|
|
17
|
-
exports.transactionWithMultipleRefundedPayments =
|
|
18
|
-
exports.transactionWithOtherItems =
|
|
19
|
-
exports.transactionWithPendingMedicareClaim =
|
|
20
|
-
exports.transactionWithPendingMedicareClaimAndClaimant =
|
|
21
|
-
exports.transactionWithRefundedPayment =
|
|
9
|
+
exports.defaultTransaction = testFramework_fixtures_transactions.defaultTransaction;
|
|
10
|
+
exports.transactionForMemberRequestQuote = testFramework_fixtures_transactions.transactionForMemberRequestQuote;
|
|
11
|
+
exports.transactionForMemberRequestQuoteComplete = testFramework_fixtures_transactions.transactionForMemberRequestQuoteComplete;
|
|
12
|
+
exports.transactionQuoteDefault = testFramework_fixtures_transactions.transactionQuoteDefault;
|
|
13
|
+
exports.transactionWithApprovedInPersonPayment = testFramework_fixtures_transactions.transactionWithApprovedInPersonPayment;
|
|
14
|
+
exports.transactionWithApprovedPayment = testFramework_fixtures_transactions.transactionWithApprovedPayment;
|
|
15
|
+
exports.transactionWithClaim = testFramework_fixtures_transactions.transactionWithClaim;
|
|
16
|
+
exports.transactionWithMedicareClaim = testFramework_fixtures_transactions.transactionWithMedicareClaim;
|
|
17
|
+
exports.transactionWithMultipleRefundedPayments = testFramework_fixtures_transactions.transactionWithMultipleRefundedPayments;
|
|
18
|
+
exports.transactionWithOtherItems = testFramework_fixtures_transactions.transactionWithOtherItems;
|
|
19
|
+
exports.transactionWithPendingMedicareClaim = testFramework_fixtures_transactions.transactionWithPendingMedicareClaim;
|
|
20
|
+
exports.transactionWithPendingMedicareClaimAndClaimant = testFramework_fixtures_transactions.transactionWithPendingMedicareClaimAndClaimant;
|
|
21
|
+
exports.transactionWithRefundedPayment = testFramework_fixtures_transactions.transactionWithRefundedPayment;
|
|
@@ -10,4 +10,4 @@ var transactionStatusFormatted = {
|
|
|
10
10
|
PROVIDER: (_PROVIDER = {}, _PROVIDER[constants.TRANSACTION_STATUSES.PARTIALLY_REFUNDED] = 'Partial refund', _PROVIDER[constants.TRANSACTION_STATUSES.UNDER_REVIEW] = 'Under review', _PROVIDER[constants.TRANSACTION_STATUSES.ERRORED] = 'Errored', _PROVIDER)
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
exports
|
|
13
|
+
exports["default"] = transactionStatusFormatted;
|
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
var _capitalize = require('lodash/capitalize');
|
|
7
6
|
var constants = require('./constants.js');
|
|
8
|
-
var _capitalize = _interopDefault(require('lodash/capitalize'));
|
|
9
7
|
var claimPaymentStatusIcons = require('./claim-payment-status-icons.js');
|
|
10
8
|
var claimPaymentStatusTextClasses = require('./claim-payment-status-text-classes.js');
|
|
11
9
|
|
|
10
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
|
+
|
|
12
|
+
var _capitalize__default = /*#__PURE__*/_interopDefaultLegacy(_capitalize);
|
|
13
|
+
|
|
12
14
|
var getPaymentStatus = function getPaymentStatus(_ref) {
|
|
13
15
|
var paymentStatus = _ref.paymentStatus,
|
|
14
16
|
transactionStatus = _ref.transactionStatus,
|
|
@@ -27,7 +29,7 @@ var getPaymentStatus = function getPaymentStatus(_ref) {
|
|
|
27
29
|
return 'Paid in person';
|
|
28
30
|
}
|
|
29
31
|
|
|
30
|
-
return paymentStatus ?
|
|
32
|
+
return paymentStatus ? _capitalize__default["default"](paymentStatus) : 'Pending';
|
|
31
33
|
}; // @ts-expect-error TS(7031): Binding element 'paymentStatus' implicitly has an ... Remove this comment to see the full error message
|
|
32
34
|
|
|
33
35
|
var getPaymentTextClass = function getPaymentTextClass(_ref2) {
|
|
@@ -49,7 +51,7 @@ var getPaymentTextClass = function getPaymentTextClass(_ref2) {
|
|
|
49
51
|
} // @ts-expect-error TS(7053): Element implicitly has an 'any' type because expre... Remove this comment to see the full error message
|
|
50
52
|
|
|
51
53
|
|
|
52
|
-
return claimPaymentStatusTextClasses
|
|
54
|
+
return claimPaymentStatusTextClasses["default"][paymentStatus] || 'warning';
|
|
53
55
|
}; // @ts-expect-error TS(7031): Binding element 'paymentStatus' implicitly has an ... Remove this comment to see the full error message
|
|
54
56
|
|
|
55
57
|
var getPaymentIcon = function getPaymentIcon(_ref3) {
|
|
@@ -71,11 +73,11 @@ var getPaymentIcon = function getPaymentIcon(_ref3) {
|
|
|
71
73
|
} // @ts-expect-error TS(7053): Element implicitly has an 'any' type because expre... Remove this comment to see the full error message
|
|
72
74
|
|
|
73
75
|
|
|
74
|
-
return claimPaymentStatusIcons
|
|
76
|
+
return claimPaymentStatusIcons["default"][paymentStatus] || 'fa-clock';
|
|
75
77
|
};
|
|
76
78
|
var transactionStatusHelper = {};
|
|
77
79
|
|
|
78
|
-
exports
|
|
80
|
+
exports["default"] = transactionStatusHelper;
|
|
79
81
|
exports.getPaymentIcon = getPaymentIcon;
|
|
80
82
|
exports.getPaymentStatus = getPaymentStatus;
|
|
81
83
|
exports.getPaymentTextClass = getPaymentTextClass;
|
|
@@ -7,4 +7,4 @@ var constants = require('./constants.js');
|
|
|
7
7
|
var _transactionStatusIco;
|
|
8
8
|
var transactionStatusIcons = (_transactionStatusIco = {}, _transactionStatusIco[constants.TRANSACTION_STATUSES.COMPLETED] = 'fas fa-check', _transactionStatusIco[constants.TRANSACTION_STATUSES.CANCELLED] = 'fas fa-times', _transactionStatusIco[constants.TRANSACTION_STATUSES.PENDING] = 'fas fa-clock', _transactionStatusIco[constants.TRANSACTION_STATUSES.UNDER_REVIEW] = 'fas fa-clock', _transactionStatusIco[constants.TRANSACTION_STATUSES.PARTIALLY_REFUNDED] = 'fas fa-check', _transactionStatusIco[constants.TRANSACTION_STATUSES.REFUNDED] = 'fas fa-undo', _transactionStatusIco[constants.TRANSACTION_STATUSES.ERRORED] = 'fa fa-exclamation-triangle', _transactionStatusIco);
|
|
9
9
|
|
|
10
|
-
exports
|
|
10
|
+
exports["default"] = transactionStatusIcons;
|
|
@@ -7,4 +7,4 @@ var constants = require('./constants.js');
|
|
|
7
7
|
var _transactionStatusTex;
|
|
8
8
|
var transactionStatusTextClasses = (_transactionStatusTex = {}, _transactionStatusTex[constants.TRANSACTION_STATUSES.NEW] = 'primary', _transactionStatusTex[constants.TRANSACTION_STATUSES.PENDING] = 'warning', _transactionStatusTex[constants.TRANSACTION_STATUSES.REQUESTED] = 'warning', _transactionStatusTex[constants.TRANSACTION_STATUSES.COMPLETED] = 'success', _transactionStatusTex[constants.TRANSACTION_STATUSES.CANCELLED] = 'danger', _transactionStatusTex[constants.TRANSACTION_STATUSES.REFUNDED] = '', _transactionStatusTex[constants.TRANSACTION_STATUSES.PARTIALLY_REFUNDED] = 'success', _transactionStatusTex[constants.TRANSACTION_STATUSES.UNDER_REVIEW] = 'warning', _transactionStatusTex[constants.TRANSACTION_STATUSES.ERRORED] = 'danger', _transactionStatusTex[constants.TRANSACTION_STATUSES.SUBMITTED] = 'warning', _transactionStatusTex[constants.TRANSACTION_STATUSES.OUTSTANDING] = 'warning', _transactionStatusTex[constants.TRANSACTION_STATUSES.DECLINED] = 'danger', _transactionStatusTex[constants.TRANSACTION_STATUSES.APPROVED] = 'success', _transactionStatusTex[constants.TRANSACTION_STATUSES.ARCHIVED] = '', _transactionStatusTex);
|
|
9
9
|
|
|
10
|
-
exports
|
|
10
|
+
exports["default"] = transactionStatusTextClasses;
|
package/transaction-status.js
CHANGED
|
@@ -2,34 +2,36 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
var _get = require('lodash/get');
|
|
7
6
|
var constants = require('./constants.js');
|
|
8
|
-
var _get = _interopDefault(require('lodash/get'));
|
|
9
7
|
var funders = require('./funders.js');
|
|
10
8
|
|
|
9
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
10
|
+
|
|
11
|
+
var _get__default = /*#__PURE__*/_interopDefaultLegacy(_get);
|
|
12
|
+
|
|
11
13
|
function getOverrideStatus(transaction, defaultStatus) {
|
|
12
14
|
var status = defaultStatus;
|
|
13
15
|
|
|
14
|
-
if (funders.isMedicare(
|
|
15
|
-
var isClaimRejected =
|
|
16
|
+
if (funders.isMedicare(_get__default["default"](transaction, 'claims[0].funder.code'))) {
|
|
17
|
+
var isClaimRejected = _get__default["default"](transaction, 'claims[0].status') === constants.TRANSACTION_STATUSES.REJECTED;
|
|
16
18
|
var isTransactionCompleted = transaction.status === constants.TRANSACTION_STATUSES.COMPLETED;
|
|
17
19
|
|
|
18
|
-
var hasMedicareErrored =
|
|
20
|
+
var hasMedicareErrored = _get__default["default"](transaction, 'medicare.hasFatalError');
|
|
19
21
|
|
|
20
22
|
if (isClaimRejected && isTransactionCompleted && !hasMedicareErrored) {
|
|
21
23
|
status = constants.TRANSACTION_STATUSES.UNDER_REVIEW;
|
|
22
24
|
}
|
|
23
25
|
|
|
24
|
-
var isClaimPending =
|
|
26
|
+
var isClaimPending = _get__default["default"](transaction, 'claims[0].status') === constants.TRANSACTION_STATUSES.PENDING && transaction.status !== constants.TRANSACTION_STATUSES.CANCELLED;
|
|
25
27
|
|
|
26
28
|
if (isClaimPending) {
|
|
27
29
|
status = constants.TRANSACTION_STATUSES.PENDING;
|
|
28
30
|
}
|
|
29
31
|
}
|
|
30
32
|
|
|
31
|
-
if (funders.isIcare(
|
|
32
|
-
var _isClaimPending =
|
|
33
|
+
if (funders.isIcare(_get__default["default"](transaction, 'claims[0].funder.code')) && _get__default["default"](transaction, '_schemaVersion') === '2') {
|
|
34
|
+
var _isClaimPending = _get__default["default"](transaction, 'status') === constants.TRANSACTION_STATUSES.PENDING;
|
|
33
35
|
|
|
34
36
|
if (_isClaimPending) {
|
|
35
37
|
status = constants.TRANSACTION_STATUSES.SUBMITTED;
|