@opexa/portal-components 0.0.572 → 0.0.574

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.
@@ -39,8 +39,10 @@ import { Select } from '../../../ui/Select/index.js';
39
39
  import { Tooltip } from '../../../ui/Tooltip/index.js';
40
40
  import { createPoll } from '../../../utils/createPoll.js';
41
41
  import { useSignUpDefaultPropsContext } from './SignUpDefaultContext.js';
42
+ import { useFeatureFlag } from '../../../client/hooks/useFeatureFlag.js';
42
43
  export function SignUpDefaultForm() {
43
44
  const signUpProps = useSignUpDefaultPropsContext();
45
+ const featureFlag = useFeatureFlag();
44
46
  const branchCollection = createListCollection({
45
47
  items: signUpProps.branches ?? [],
46
48
  itemToValue: (item) => item.code,
@@ -270,7 +272,12 @@ export function SignUpDefaultForm() {
270
272
  return;
271
273
  }
272
274
  globalStore.signUp.setOpen(false);
273
- globalStore.kyc.setOpen(true);
275
+ if (!featureFlag.enabled) {
276
+ globalStore.kyc.setOpen(true);
277
+ }
278
+ else {
279
+ globalStore.kycReminder.setOpen(true);
280
+ }
274
281
  step1Form.reset();
275
282
  step2Form.reset();
276
283
  setStep(1);
@@ -50,6 +50,7 @@ import { getMemberVerificationQueryKey } from '../../../utils/queryKeys.js';
50
50
  import { IdFrontImageField } from './IdFrontImageField/index.js';
51
51
  import { SelfieImageField } from './SelfieImageField/index.js';
52
52
  import { useSignUpKYCPropsContext } from './SignUpKYCContext.js';
53
+ import { useFeatureFlag } from '../../../client/hooks/useFeatureFlag.js';
53
54
  export function SignUpKYCForm() {
54
55
  const props = useSignUpKYCPropsContext();
55
56
  const branchCollection = createListCollection({
@@ -57,6 +58,7 @@ export function SignUpKYCForm() {
57
58
  itemToValue: (item) => item.code,
58
59
  itemToString: (item) => `${item.code} - ${item.name}`,
59
60
  });
61
+ const featureFlag = useFeatureFlag();
60
62
  const router = useRouter();
61
63
  const globalStore = useGlobalStore(useShallow((ctx) => ({
62
64
  signIn: ctx.signIn,
@@ -421,7 +423,12 @@ export function SignUpKYCForm() {
421
423
  await pollImageUpload();
422
424
  }
423
425
  dialog.setOpen(false);
424
- globalStore.kyc.setOpen(true);
426
+ if (!featureFlag.enabled) {
427
+ globalStore.kyc.setOpen(true);
428
+ }
429
+ else {
430
+ globalStore.kycReminder.setOpen(true);
431
+ }
425
432
  step1Form.reset();
426
433
  step2Form.reset();
427
434
  setStep(1);
@@ -35,10 +35,12 @@ import { Select } from '../../../ui/Select/index.js';
35
35
  import { Tooltip } from '../../../ui/Tooltip/index.js';
36
36
  import { createPoll } from '../../../utils/createPoll.js';
37
37
  import { useSignUpNameAndPasswordPropsContext } from './SignUpNameAndPasswordContext.js';
38
+ import { useFeatureFlag } from '../../../client/hooks/useFeatureFlag.js';
38
39
  export function SignUpNameAndPasswordForm() {
39
40
  const signUpProps = useSignUpNameAndPasswordPropsContext();
40
41
  const signInMutation = useSignInMutation();
41
42
  const signUpMutation = useSignUpByNameMutation();
43
+ const featureFlag = useFeatureFlag();
42
44
  const branchCollection = createListCollection({
43
45
  items: signUpProps.branches ?? [],
44
46
  itemToValue: (item) => item.code,
@@ -164,7 +166,12 @@ export function SignUpNameAndPasswordForm() {
164
166
  return;
165
167
  }
166
168
  globalStore.signUp.setOpen(false);
167
- globalStore.kyc.setOpen(true);
169
+ if (!featureFlag.enabled) {
170
+ globalStore.kyc.setOpen(true);
171
+ }
172
+ else {
173
+ globalStore.kycReminder.setOpen(true);
174
+ }
168
175
  form.reset();
169
176
  }
170
177
  catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opexa/portal-components",
3
- "version": "0.0.572",
3
+ "version": "0.0.574",
4
4
  "exports": {
5
5
  "./ui/*": {
6
6
  "types": "./dist/ui/*/index.d.ts",