datastake-daf 0.6.722 → 0.6.723

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.
@@ -52205,7 +52205,7 @@ function NewAccount({
52205
52205
  const [accountUsed, setAccountUsed] = React.useState(false);
52206
52206
  const isEdit = React.useMemo(() => isOpen && typeof isOpen === "object", [isOpen]);
52207
52207
  React.useEffect(() => {
52208
- if (isOpen && typeof addAccountVisible === "object") {
52208
+ if (isOpen && typeof isOpen === "object") {
52209
52209
  MainForm.setFieldsValue({
52210
52210
  name: isOpen.name,
52211
52211
  email: isOpen?.admin?.email
@@ -52213,7 +52213,7 @@ function NewAccount({
52213
52213
  } else {
52214
52214
  MainForm.resetFields();
52215
52215
  }
52216
- }, [isOpen]);
52216
+ }, [isOpen, MainForm]);
52217
52217
  const onSubmit = () => {
52218
52218
  MainForm.validateFields().then(async val => {
52219
52219
  try {
@@ -54979,8 +54979,11 @@ function AdminAccountsScreen({
54979
54979
  AdminService,
54980
54980
  options,
54981
54981
  useQuery,
54982
- NewAccountModal
54982
+ NewAccountModal // If not provided, use DAF's default
54983
54983
  } = config;
54984
+
54985
+ // Use provided modal or fallback to DAF's default
54986
+ const AccountModal = NewAccountModal || NewAccount;
54984
54987
  const query = useQuery ? useQuery() : {
54985
54988
  get: () => null
54986
54989
  };
@@ -55027,12 +55030,15 @@ function AdminAccountsScreen({
55027
55030
  setAddAccountVisible
55028
55031
  }
55029
55032
  }
55030
- }), NewAccountModal && /*#__PURE__*/jsxRuntime.jsx(NewAccountModal, {
55033
+ }), /*#__PURE__*/jsxRuntime.jsx(AccountModal, {
55034
+ t: t,
55035
+ isOpen: addAccountVisible,
55036
+ onClose: () => setAddAccountVisible(false),
55037
+ accountTypes: accountTypes,
55031
55038
  fetchData: () => {
55032
55039
  // Refresh table data - handled by AccountTable internally
55033
55040
  },
55034
- addAccountVisible: addAccountVisible,
55035
- onClose: () => setAddAccountVisible(false)
55041
+ inviteAccount: data => AdminService.inviteAccount(data)
55036
55042
  })]
55037
55043
  });
55038
55044
  }