@tap-payments/auth-jsconnect 2.1.52-test → 2.1.53-test
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/build/features/app/connect/connectStore.js +3 -2
- package/build/features/connect/screens/Merchant/Merchant.js +12 -10
- package/package.json +1 -1
- package/build/features/individual/screens/IndividualList/BoardList.d.ts +0 -0
- package/build/features/individual/screens/IndividualList/BoardList.js +0 -1
- package/build/features/individual/screens/IndividualList/ShareholderList.d.ts +0 -0
- package/build/features/individual/screens/IndividualList/ShareholderList.js +0 -1
- package/build/features/individual/screens/IndividualList/UserList.d.ts +0 -0
- package/build/features/individual/screens/IndividualList/UserList.js +0 -1
- package/build/features/individual/screens/IndividualList/index.d.ts +0 -0
- package/build/features/individual/screens/IndividualList/index.js +0 -1
|
@@ -817,10 +817,10 @@ export var connectSlice = createSlice({
|
|
|
817
817
|
state.error = action.error.message;
|
|
818
818
|
})
|
|
819
819
|
.addCase(updateLeadIndividual.fulfilled, function (state, action) {
|
|
820
|
-
var _a, _b;
|
|
820
|
+
var _a, _b, _c;
|
|
821
821
|
state.loading = false;
|
|
822
822
|
state.error = null;
|
|
823
|
-
var
|
|
823
|
+
var _d = action.payload, formData = _d.formData, leadResponse = _d.leadResponse;
|
|
824
824
|
var brand = leadResponse.brand, rest = __rest(leadResponse, ["brand"]);
|
|
825
825
|
if (brand) {
|
|
826
826
|
var channel_services = brand.channel_services, terms = brand.terms;
|
|
@@ -832,6 +832,7 @@ export var connectSlice = createSlice({
|
|
|
832
832
|
state.data.brandData.termAndConditionChecked = !!termAndCondition;
|
|
833
833
|
}
|
|
834
834
|
var selectedBrand = ((_b = (_a = state.data.brandData) === null || _a === void 0 ? void 0 : _a.responseBody) === null || _b === void 0 ? void 0 : _b.brand_list[0]) || leadResponse.brand;
|
|
835
|
+
state.data.brandData.brandName = (_c = selectedBrand === null || selectedBrand === void 0 ? void 0 : selectedBrand.name) === null || _c === void 0 ? void 0 : _c.en;
|
|
835
836
|
state.data.brandData.segment = rest.segments_list.find(function (_a) {
|
|
836
837
|
var _b;
|
|
837
838
|
var id = _a.id;
|
|
@@ -36,17 +36,17 @@ var ListType;
|
|
|
36
36
|
ListType["BrandList"] = "BrandList";
|
|
37
37
|
})(ListType || (ListType = {}));
|
|
38
38
|
var Merchant = function (_a) {
|
|
39
|
-
var _b;
|
|
40
|
-
var
|
|
41
|
-
var
|
|
42
|
-
var
|
|
43
|
-
var
|
|
39
|
+
var _b, _c;
|
|
40
|
+
var _d = React.useState(false), brandNameChecking = _d[0], setBrandNameChecking = _d[1];
|
|
41
|
+
var _e = React.useState(false), isRequiredNewBrand = _e[0], setIsRequiredNewBrand = _e[1];
|
|
42
|
+
var _f = useAppSelector(connectSelector), data = _f.data, loading = _f.loading, error = _f.error;
|
|
43
|
+
var _g = data.brandData, brandName = _g.brandName, selectedBrandItem = _g.selectedBrandItem, termAndConditionChecked = _g.termAndConditionChecked, responseBody = _g.responseBody, salesChannels = _g.salesChannels, segment = _g.segment, teamSize = _g.teamSize;
|
|
44
44
|
var brandList = (responseBody || {}).brand_list;
|
|
45
|
-
var
|
|
45
|
+
var _h = React.useState(), listActive = _h[0], setListActive = _h[1];
|
|
46
46
|
var methods = useForm({
|
|
47
47
|
resolver: yupResolver(MerchantValidationSchema(isRequiredNewBrand)),
|
|
48
48
|
defaultValues: {
|
|
49
|
-
brandName: brandName,
|
|
49
|
+
brandName: brandName || ((_b = selectedBrandItem === null || selectedBrandItem === void 0 ? void 0 : selectedBrandItem.name) === null || _b === void 0 ? void 0 : _b.en),
|
|
50
50
|
selectedBrandItem: selectedBrandItem,
|
|
51
51
|
termAndConditionChecked: termAndConditionChecked,
|
|
52
52
|
salesChannels: salesChannels,
|
|
@@ -68,7 +68,9 @@ var Merchant = function (_a) {
|
|
|
68
68
|
React.useEffect(function () {
|
|
69
69
|
methods.setValue('segment', segment);
|
|
70
70
|
methods.setValue('teamSize', teamSize);
|
|
71
|
-
|
|
71
|
+
if (brandName)
|
|
72
|
+
methods.trigger('brandName');
|
|
73
|
+
}, [segment, teamSize, brandName]);
|
|
72
74
|
React.useEffect(function () {
|
|
73
75
|
if (error)
|
|
74
76
|
dispatch(clearError());
|
|
@@ -81,8 +83,8 @@ var Merchant = function (_a) {
|
|
|
81
83
|
if (termAndConditionChecked === true)
|
|
82
84
|
methods.setValue('termAndConditionChecked', termAndConditionChecked);
|
|
83
85
|
}, [termAndConditionChecked]);
|
|
84
|
-
var brandErrChecks = !!
|
|
85
|
-
var disabled = brandErrChecks || brandNameChecking || ((
|
|
86
|
+
var brandErrChecks = !methods.formState.isValid || !!methods.formState.errors.brandName || !!error;
|
|
87
|
+
var disabled = brandErrChecks || brandNameChecking || ((_c = data.brandData.responseBody) === null || _c === void 0 ? void 0 : _c.response_code) === '5';
|
|
86
88
|
var hasBrandList = (brandList === null || brandList === void 0 ? void 0 : brandList.length) > 0;
|
|
87
89
|
var isOtherBrand = (brandListItem === null || brandListItem === void 0 ? void 0 : brandListItem.id) === 'other' && hasBrandList;
|
|
88
90
|
var isNewBrand = (brandList === null || brandList === void 0 ? void 0 : brandList.length) === 0 || BrandList === undefined;
|
package/package.json
CHANGED
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|