@medipass/utils 11.81.0 → 11.81.1
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.js +17 -12
- 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 +4 -5
- 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
|
@@ -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;
|