mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-07-02 03:02:19 +08:00
feat: action support refreshDataBlockRequest configuration (#3882)
* feat: action support refreshDataBlockRequest configuration * feat: refreshDataBlockRequest * fix: block templates * fix: bug * fix: bug * refactor: submitted * fix: bug * fix: bug * refactor: refreshDataBlockRequest * refactor: refreshDataBlockRequest * refactor: refreshDataBlockRequest * refactor: refreshDataBlockRequest * refactor: refreshDataBlockRequest * refactor: refreshDataBlockRequest * refactor: refreshDataBlockRequest * refactor: refreshDataBlockRequest * refactor: refreshDataBlockRequest * refactor: refreshDataBlockRequest * fix: bug * fix: bug * fix: bug * fix: bug --------- Co-authored-by: chenos <chenlinxh@gmail.com>
This commit is contained in:
parent
fcd2b766cf
commit
6e5a2c81b3
@ -189,7 +189,7 @@ export const useCreateActionProps = () => {
|
|||||||
const record = useCollectionRecord();
|
const record = useCollectionRecord();
|
||||||
const form = useForm();
|
const form = useForm();
|
||||||
const { field, resource, __parent } = useBlockRequestContext();
|
const { field, resource, __parent } = useBlockRequestContext();
|
||||||
const { setVisible } = useActionContext();
|
const { setVisible, setSubmitted, setFormValueChanged } = useActionContext();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const actionSchema = useFieldSchema();
|
const actionSchema = useFieldSchema();
|
||||||
const actionField = useField();
|
const actionField = useField();
|
||||||
@ -202,8 +202,6 @@ export const useCreateActionProps = () => {
|
|||||||
const filterKeys = actionField.componentProps.filterKeys?.checked || [];
|
const filterKeys = actionField.componentProps.filterKeys?.checked || [];
|
||||||
const dataLoadingMode = useDataLoadingMode();
|
const dataLoadingMode = useDataLoadingMode();
|
||||||
|
|
||||||
console.log('dataLoadingMode', dataLoadingMode);
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
async onClick() {
|
async onClick() {
|
||||||
const { onSuccess, skipValidator, triggerWorkflows } = actionSchema?.['x-action-settings'] ?? {};
|
const { onSuccess, skipValidator, triggerWorkflows } = actionSchema?.['x-action-settings'] ?? {};
|
||||||
@ -226,9 +224,11 @@ export const useCreateActionProps = () => {
|
|||||||
updateAssociationValues,
|
updateAssociationValues,
|
||||||
});
|
});
|
||||||
setVisible?.(false);
|
setVisible?.(false);
|
||||||
|
setSubmitted?.(true);
|
||||||
|
setFormValueChanged?.(false);
|
||||||
actionField.data.loading = false;
|
actionField.data.loading = false;
|
||||||
actionField.data.data = data;
|
actionField.data.data = data;
|
||||||
__parent?.service?.refresh?.();
|
// __parent?.service?.refresh?.();
|
||||||
if (!onSuccess?.successMessage) {
|
if (!onSuccess?.successMessage) {
|
||||||
message.success(t('Saved successfully'));
|
message.success(t('Saved successfully'));
|
||||||
await resetFormCorrectly(form);
|
await resetFormCorrectly(form);
|
||||||
@ -269,7 +269,7 @@ export const useCreateActionProps = () => {
|
|||||||
export const useAssociationCreateActionProps = () => {
|
export const useAssociationCreateActionProps = () => {
|
||||||
const form = useForm();
|
const form = useForm();
|
||||||
const { field, resource, __parent } = useBlockRequestContext();
|
const { field, resource, __parent } = useBlockRequestContext();
|
||||||
const { setVisible, fieldSchema } = useActionContext();
|
const { setVisible, fieldSchema, setSubmitted } = useActionContext();
|
||||||
const actionSchema = useFieldSchema();
|
const actionSchema = useFieldSchema();
|
||||||
const actionField = useField();
|
const actionField = useField();
|
||||||
const { fields, getField, getTreeParentField, name } = useCollection_deprecated();
|
const { fields, getField, getTreeParentField, name } = useCollection_deprecated();
|
||||||
@ -352,6 +352,7 @@ export const useAssociationCreateActionProps = () => {
|
|||||||
actionField.data.data = data;
|
actionField.data.data = data;
|
||||||
__parent?.service?.refresh?.();
|
__parent?.service?.refresh?.();
|
||||||
setVisible?.(false);
|
setVisible?.(false);
|
||||||
|
setSubmitted?.(true);
|
||||||
if (!onSuccess?.successMessage) {
|
if (!onSuccess?.successMessage) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -517,7 +518,7 @@ export const useCustomizeUpdateActionProps = () => {
|
|||||||
const { name, getField } = useCollection_deprecated();
|
const { name, getField } = useCollection_deprecated();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
async onClick() {
|
async onClick(e?, callBack?) {
|
||||||
const {
|
const {
|
||||||
assignedValues: originalAssignedValues = {},
|
assignedValues: originalAssignedValues = {},
|
||||||
onSuccess,
|
onSuccess,
|
||||||
@ -558,7 +559,10 @@ export const useCustomizeUpdateActionProps = () => {
|
|||||||
? triggerWorkflows.map((row) => [row.workflowKey, row.context].filter(Boolean).join('!')).join(',')
|
? triggerWorkflows.map((row) => [row.workflowKey, row.context].filter(Boolean).join('!')).join(',')
|
||||||
: undefined,
|
: undefined,
|
||||||
});
|
});
|
||||||
service?.refresh?.();
|
// service?.refresh?.();
|
||||||
|
if (callBack) {
|
||||||
|
callBack?.();
|
||||||
|
}
|
||||||
if (!(resource instanceof TableFieldResource)) {
|
if (!(resource instanceof TableFieldResource)) {
|
||||||
__parent?.service?.refresh?.();
|
__parent?.service?.refresh?.();
|
||||||
}
|
}
|
||||||
@ -670,7 +674,7 @@ export const useCustomizeBulkUpdateActionProps = () => {
|
|||||||
} finally {
|
} finally {
|
||||||
actionField.data.loading = false;
|
actionField.data.loading = false;
|
||||||
}
|
}
|
||||||
service?.refresh?.();
|
// service?.refresh?.();
|
||||||
if (!(resource instanceof TableFieldResource)) {
|
if (!(resource instanceof TableFieldResource)) {
|
||||||
__parent?.service?.refresh?.();
|
__parent?.service?.refresh?.();
|
||||||
}
|
}
|
||||||
@ -805,7 +809,7 @@ export const useUpdateActionProps = () => {
|
|||||||
const form = useForm();
|
const form = useForm();
|
||||||
const filterByTk = useFilterByTk();
|
const filterByTk = useFilterByTk();
|
||||||
const { field, resource, __parent } = useBlockRequestContext();
|
const { field, resource, __parent } = useBlockRequestContext();
|
||||||
const { setVisible } = useActionContext();
|
const { setVisible, setSubmitted, setFormValueChanged } = useActionContext();
|
||||||
const actionSchema = useFieldSchema();
|
const actionSchema = useFieldSchema();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const { fields, getField, name } = useCollection_deprecated();
|
const { fields, getField, name } = useCollection_deprecated();
|
||||||
@ -881,8 +885,10 @@ export const useUpdateActionProps = () => {
|
|||||||
: undefined,
|
: undefined,
|
||||||
});
|
});
|
||||||
actionField.data.loading = false;
|
actionField.data.loading = false;
|
||||||
__parent?.service?.refresh?.();
|
// __parent?.service?.refresh?.();
|
||||||
setVisible?.(false);
|
setVisible?.(false);
|
||||||
|
setSubmitted?.(true);
|
||||||
|
setFormValueChanged?.(false);
|
||||||
if (!onSuccess?.successMessage) {
|
if (!onSuccess?.successMessage) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -920,11 +926,11 @@ export const useUpdateActionProps = () => {
|
|||||||
export const useDestroyActionProps = () => {
|
export const useDestroyActionProps = () => {
|
||||||
const filterByTk = useFilterByTk();
|
const filterByTk = useFilterByTk();
|
||||||
const { resource, service, block, __parent } = useBlockRequestContext();
|
const { resource, service, block, __parent } = useBlockRequestContext();
|
||||||
const { setVisible } = useActionContext();
|
const { setVisible, setSubmitted } = useActionContext();
|
||||||
const data = useParamsFromRecord();
|
const data = useParamsFromRecord();
|
||||||
const actionSchema = useFieldSchema();
|
const actionSchema = useFieldSchema();
|
||||||
return {
|
return {
|
||||||
async onClick() {
|
async onClick(e?, callBack?) {
|
||||||
const { triggerWorkflows } = actionSchema?.['x-action-settings'] ?? {};
|
const { triggerWorkflows } = actionSchema?.['x-action-settings'] ?? {};
|
||||||
await resource.destroy({
|
await resource.destroy({
|
||||||
filterByTk,
|
filterByTk,
|
||||||
@ -941,13 +947,18 @@ export const useDestroyActionProps = () => {
|
|||||||
...service?.params?.[0],
|
...service?.params?.[0],
|
||||||
page: page - 1,
|
page: page - 1,
|
||||||
});
|
});
|
||||||
} else {
|
|
||||||
service?.refresh?.();
|
|
||||||
}
|
}
|
||||||
|
if (callBack) {
|
||||||
|
callBack?.();
|
||||||
|
}
|
||||||
|
// else {
|
||||||
|
// service?.refresh?.();
|
||||||
|
// }
|
||||||
|
setSubmitted?.(true);
|
||||||
if (block && block !== 'TableField') {
|
if (block && block !== 'TableField') {
|
||||||
__parent?.service?.refresh?.();
|
__parent?.service?.refresh?.();
|
||||||
setVisible?.(false);
|
setVisible?.(false);
|
||||||
|
setSubmitted?.(true);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@ -969,9 +980,9 @@ export const useRemoveActionProps = (associationName) => {
|
|||||||
export const useDisassociateActionProps = () => {
|
export const useDisassociateActionProps = () => {
|
||||||
const filterByTk = useFilterByTk();
|
const filterByTk = useFilterByTk();
|
||||||
const { resource, service, block, __parent } = useBlockRequestContext();
|
const { resource, service, block, __parent } = useBlockRequestContext();
|
||||||
const { setVisible } = useActionContext();
|
const { setVisible, setSubmitted, setFormValueChanged } = useActionContext();
|
||||||
return {
|
return {
|
||||||
async onClick() {
|
async onClick(e?, callBack?) {
|
||||||
await resource.remove({
|
await resource.remove({
|
||||||
values: [filterByTk],
|
values: [filterByTk],
|
||||||
});
|
});
|
||||||
@ -983,12 +994,15 @@ export const useDisassociateActionProps = () => {
|
|||||||
page: page - 1,
|
page: page - 1,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
service?.refresh?.();
|
if (callBack) {
|
||||||
|
callBack?.();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
setSubmitted?.(true);
|
||||||
if (block && block !== 'TableField') {
|
if (block && block !== 'TableField') {
|
||||||
__parent?.service?.refresh?.();
|
__parent?.service?.refresh?.();
|
||||||
setVisible?.(false);
|
setVisible?.(false);
|
||||||
|
setFormValueChanged?.(false);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@ -1018,8 +1032,9 @@ export const useDetailPrintActionProps = () => {
|
|||||||
export const useBulkDestroyActionProps = () => {
|
export const useBulkDestroyActionProps = () => {
|
||||||
const { field } = useBlockRequestContext();
|
const { field } = useBlockRequestContext();
|
||||||
const { resource, service } = useBlockRequestContext();
|
const { resource, service } = useBlockRequestContext();
|
||||||
|
const { setSubmitted } = useActionContext();
|
||||||
return {
|
return {
|
||||||
async onClick() {
|
async onClick(e?, callBack?) {
|
||||||
if (!field?.data?.selectedRowKeys?.length) {
|
if (!field?.data?.selectedRowKeys?.length) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1032,7 +1047,11 @@ export const useBulkDestroyActionProps = () => {
|
|||||||
if (currentPage === totalPage) {
|
if (currentPage === totalPage) {
|
||||||
service.params[0].page = currentPage - 1;
|
service.params[0].page = currentPage - 1;
|
||||||
}
|
}
|
||||||
service?.refresh?.();
|
if (callBack) {
|
||||||
|
callBack?.();
|
||||||
|
}
|
||||||
|
setSubmitted?.(true);
|
||||||
|
// service?.refresh?.();
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -920,5 +920,7 @@
|
|||||||
"Divide by": "除以",
|
"Divide by": "除以",
|
||||||
"Scientifix notation": "科学计数法",
|
"Scientifix notation": "科学计数法",
|
||||||
"Normal": "常规",
|
"Normal": "常规",
|
||||||
"Automatically generate default values":"随机生成默认值"
|
"Automatically generate default values": "随机生成默认值",
|
||||||
|
"Refresh data on close": "关闭后刷新数据",
|
||||||
|
"Refresh data on action": "执行后刷新数据"
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
import { useSchemaToolbar } from '../../../application';
|
import { useSchemaToolbar } from '../../../application';
|
||||||
import { SchemaSettings } from '../../../application/schema-settings/SchemaSettings';
|
import { SchemaSettings } from '../../../application/schema-settings/SchemaSettings';
|
||||||
import { ButtonEditor, RemoveButton, SecondConFirm } from '../../../schema-component/antd/action/Action.Designer';
|
import {
|
||||||
|
ButtonEditor,
|
||||||
|
RemoveButton,
|
||||||
|
SecondConFirm,
|
||||||
|
RefreshDataBlockRequest,
|
||||||
|
} from '../../../schema-component/antd/action/Action.Designer';
|
||||||
|
|
||||||
export const bulkDeleteActionSettings = new SchemaSettings({
|
export const bulkDeleteActionSettings = new SchemaSettings({
|
||||||
name: 'actionSettings:bulkDelete',
|
name: 'actionSettings:bulkDelete',
|
||||||
@ -17,6 +22,15 @@ export const bulkDeleteActionSettings = new SchemaSettings({
|
|||||||
name: 'secondConFirm',
|
name: 'secondConFirm',
|
||||||
Component: SecondConFirm,
|
Component: SecondConFirm,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'refreshDataBlockRequest',
|
||||||
|
Component: RefreshDataBlockRequest,
|
||||||
|
useComponentProps() {
|
||||||
|
return {
|
||||||
|
isPopupAction: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'remove',
|
name: 'remove',
|
||||||
sort: 100,
|
sort: 100,
|
||||||
|
@ -16,6 +16,7 @@ export const DestroyActionInitializer = (props) => {
|
|||||||
title: "{{t('Delete record')}}",
|
title: "{{t('Delete record')}}",
|
||||||
content: "{{t('Are you sure you want to delete it?')}}",
|
content: "{{t('Are you sure you want to delete it?')}}",
|
||||||
},
|
},
|
||||||
|
refreshDataBlockRequest: true,
|
||||||
},
|
},
|
||||||
'x-action-settings': {
|
'x-action-settings': {
|
||||||
triggerWorkflows: [],
|
triggerWorkflows: [],
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
import { useSchemaToolbar } from '../../../application';
|
import { useSchemaToolbar } from '../../../application';
|
||||||
import { SchemaSettings } from '../../../application/schema-settings/SchemaSettings';
|
import { SchemaSettings } from '../../../application/schema-settings/SchemaSettings';
|
||||||
import { useCollection_deprecated } from '../../../collection-manager';
|
import { useCollection_deprecated } from '../../../collection-manager';
|
||||||
import { ButtonEditor, SecondConFirm } from '../../../schema-component/antd/action/Action.Designer';
|
import {
|
||||||
|
ButtonEditor,
|
||||||
|
SecondConFirm,
|
||||||
|
RefreshDataBlockRequest,
|
||||||
|
} from '../../../schema-component/antd/action/Action.Designer';
|
||||||
import { SchemaSettingsLinkageRules } from '../../../schema-settings';
|
import { SchemaSettingsLinkageRules } from '../../../schema-settings';
|
||||||
|
|
||||||
export const deleteActionSettings = new SchemaSettings({
|
export const deleteActionSettings = new SchemaSettings({
|
||||||
@ -31,6 +35,15 @@ export const deleteActionSettings = new SchemaSettings({
|
|||||||
name: 'secondConFirm',
|
name: 'secondConFirm',
|
||||||
Component: SecondConFirm,
|
Component: SecondConFirm,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'refreshDataBlockRequest',
|
||||||
|
Component: RefreshDataBlockRequest,
|
||||||
|
useComponentProps() {
|
||||||
|
return {
|
||||||
|
isPopupAction: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'delete',
|
name: 'delete',
|
||||||
type: 'remove',
|
type: 'remove',
|
||||||
|
@ -16,6 +16,7 @@ export const DisassociateActionInitializer = (props) => {
|
|||||||
title: "{{t('Disassociate record')}}",
|
title: "{{t('Disassociate record')}}",
|
||||||
content: "{{t('Are you sure you want to disassociate it?')}}",
|
content: "{{t('Are you sure you want to disassociate it?')}}",
|
||||||
},
|
},
|
||||||
|
refreshDataBlockRequest: true,
|
||||||
},
|
},
|
||||||
'x-action-settings': {
|
'x-action-settings': {
|
||||||
triggerWorkflows: [],
|
triggerWorkflows: [],
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
import { useSchemaToolbar } from '../../../application';
|
import { useSchemaToolbar } from '../../../application';
|
||||||
import { SchemaSettings } from '../../../application/schema-settings/SchemaSettings';
|
import { SchemaSettings } from '../../../application/schema-settings/SchemaSettings';
|
||||||
import { useCollection_deprecated } from '../../../collection-manager';
|
import { useCollection_deprecated } from '../../../collection-manager';
|
||||||
import { ButtonEditor, SecondConFirm } from '../../../schema-component/antd/action/Action.Designer';
|
import {
|
||||||
|
ButtonEditor,
|
||||||
|
SecondConFirm,
|
||||||
|
RefreshDataBlockRequest,
|
||||||
|
} from '../../../schema-component/antd/action/Action.Designer';
|
||||||
import { SchemaSettingsLinkageRules } from '../../../schema-settings';
|
import { SchemaSettingsLinkageRules } from '../../../schema-settings';
|
||||||
|
|
||||||
export const disassociateActionSettings = new SchemaSettings({
|
export const disassociateActionSettings = new SchemaSettings({
|
||||||
@ -27,6 +31,15 @@ export const disassociateActionSettings = new SchemaSettings({
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'refreshDataBlockRequest',
|
||||||
|
Component: RefreshDataBlockRequest,
|
||||||
|
useComponentProps() {
|
||||||
|
return {
|
||||||
|
isPopupAction: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'secondConFirm',
|
name: 'secondConFirm',
|
||||||
Component: SecondConFirm,
|
Component: SecondConFirm,
|
||||||
|
@ -10,6 +10,7 @@ import {
|
|||||||
SecondConFirm,
|
SecondConFirm,
|
||||||
SkipValidation,
|
SkipValidation,
|
||||||
WorkflowConfig,
|
WorkflowConfig,
|
||||||
|
RefreshDataBlockRequest,
|
||||||
} from '../../../schema-component/antd/action/Action.Designer';
|
} from '../../../schema-component/antd/action/Action.Designer';
|
||||||
|
|
||||||
export const customizeSaveRecordActionSettings = new SchemaSettings({
|
export const customizeSaveRecordActionSettings = new SchemaSettings({
|
||||||
@ -47,6 +48,15 @@ export const customizeSaveRecordActionSettings = new SchemaSettings({
|
|||||||
name: 'bindWorkflow',
|
name: 'bindWorkflow',
|
||||||
Component: WorkflowConfig,
|
Component: WorkflowConfig,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'refreshDataBlockRequest',
|
||||||
|
Component: RefreshDataBlockRequest,
|
||||||
|
useComponentProps() {
|
||||||
|
return {
|
||||||
|
isPopupAction: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'delete',
|
name: 'delete',
|
||||||
sort: 100,
|
sort: 100,
|
||||||
|
@ -10,6 +10,7 @@ import {
|
|||||||
RemoveButton,
|
RemoveButton,
|
||||||
SecondConFirm,
|
SecondConFirm,
|
||||||
WorkflowConfig,
|
WorkflowConfig,
|
||||||
|
RefreshDataBlockRequest,
|
||||||
} from '../../../schema-component/antd/action/Action.Designer';
|
} from '../../../schema-component/antd/action/Action.Designer';
|
||||||
import { SchemaSettingsLinkageRules } from '../../../schema-settings';
|
import { SchemaSettingsLinkageRules } from '../../../schema-settings';
|
||||||
|
|
||||||
@ -56,6 +57,15 @@ export const customizeUpdateRecordActionSettings = new SchemaSettings({
|
|||||||
return isValid(fieldSchema?.['x-action-settings']?.triggerWorkflows);
|
return isValid(fieldSchema?.['x-action-settings']?.triggerWorkflows);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'refreshDataBlockRequest',
|
||||||
|
Component: RefreshDataBlockRequest,
|
||||||
|
useComponentProps() {
|
||||||
|
return {
|
||||||
|
isPopupAction: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'delete',
|
name: 'delete',
|
||||||
sort: 100,
|
sort: 100,
|
||||||
|
@ -12,6 +12,7 @@ export const PopupActionInitializer = (props) => {
|
|||||||
'x-component': props?.['x-component'] || 'Action.Link',
|
'x-component': props?.['x-component'] || 'Action.Link',
|
||||||
'x-component-props': {
|
'x-component-props': {
|
||||||
openMode: 'drawer',
|
openMode: 'drawer',
|
||||||
|
refreshDataBlockRequest: true,
|
||||||
},
|
},
|
||||||
properties: {
|
properties: {
|
||||||
drawer: {
|
drawer: {
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
import { useSchemaToolbar } from '../../../application';
|
import { useSchemaToolbar } from '../../../application';
|
||||||
import { SchemaSettings } from '../../../application/schema-settings/SchemaSettings';
|
import { SchemaSettings } from '../../../application/schema-settings/SchemaSettings';
|
||||||
import { useCollection_deprecated } from '../../../collection-manager';
|
import { useCollection_deprecated } from '../../../collection-manager';
|
||||||
import { ButtonEditor, RemoveButton } from '../../../schema-component/antd/action/Action.Designer';
|
import {
|
||||||
|
ButtonEditor,
|
||||||
|
RemoveButton,
|
||||||
|
RefreshDataBlockRequest,
|
||||||
|
} from '../../../schema-component/antd/action/Action.Designer';
|
||||||
import { SchemaSettingOpenModeSchemaItems } from '../../../schema-items';
|
import { SchemaSettingOpenModeSchemaItems } from '../../../schema-items';
|
||||||
import { SchemaSettingsLinkageRules } from '../../../schema-settings';
|
import { SchemaSettingsLinkageRules } from '../../../schema-settings';
|
||||||
|
|
||||||
|
@ -703,6 +703,19 @@ export const actionSettingsItems: SchemaSettingOptions['items'] = [
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'refreshDataBlockRequest',
|
||||||
|
Component: RefreshDataBlockRequest,
|
||||||
|
useComponentProps() {
|
||||||
|
return {
|
||||||
|
isPopupAction: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
useVisible() {
|
||||||
|
const fieldSchema = useFieldSchema();
|
||||||
|
return isValid(fieldSchema?.['x-action-settings']?.triggerWorkflows);
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'remove',
|
name: 'remove',
|
||||||
sort: 100,
|
sort: 100,
|
||||||
@ -792,5 +805,30 @@ export const ActionDesigner = (props) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export function RefreshDataBlockRequest(props) {
|
||||||
|
const { dn } = useDesignable();
|
||||||
|
const fieldSchema = useFieldSchema();
|
||||||
|
const { t } = useTranslation();
|
||||||
|
const { refreshDataBlockRequest } = fieldSchema?.['x-component-props'] || {};
|
||||||
|
return (
|
||||||
|
<SchemaSettingsSwitchItem
|
||||||
|
title={t('Refresh data on action')}
|
||||||
|
//兼容历史数据
|
||||||
|
checked={refreshDataBlockRequest !== false}
|
||||||
|
onChange={(value) => {
|
||||||
|
fieldSchema['x-component-props'] = fieldSchema['x-component-props'] || {};
|
||||||
|
fieldSchema['x-component-props'].refreshDataBlockRequest = value;
|
||||||
|
dn.emit('patch', {
|
||||||
|
schema: {
|
||||||
|
['x-uid']: fieldSchema['x-uid'],
|
||||||
|
'x-component-props': {
|
||||||
|
...fieldSchema['x-component-props'],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
ActionDesigner.ButtonEditor = ButtonEditor;
|
ActionDesigner.ButtonEditor = ButtonEditor;
|
||||||
ActionDesigner.RemoveButton = RemoveButton;
|
ActionDesigner.RemoveButton = RemoveButton;
|
||||||
|
@ -27,6 +27,7 @@ import { useGetAriaLabelOfAction } from './hooks/useGetAriaLabelOfAction';
|
|||||||
import { ComposedAction } from './types';
|
import { ComposedAction } from './types';
|
||||||
import { linkageAction } from './utils';
|
import { linkageAction } from './utils';
|
||||||
import { withDynamicSchemaProps } from '../../../application/hoc/withDynamicSchemaProps';
|
import { withDynamicSchemaProps } from '../../../application/hoc/withDynamicSchemaProps';
|
||||||
|
import { useDataBlockRequest } from '../../../data-source';
|
||||||
|
|
||||||
export const Action: ComposedAction = withDynamicSchemaProps(
|
export const Action: ComposedAction = withDynamicSchemaProps(
|
||||||
observer((props: any) => {
|
observer((props: any) => {
|
||||||
@ -65,6 +66,7 @@ export const Action: ComposedAction = withDynamicSchemaProps(
|
|||||||
const designerProps = fieldSchema['x-designer-props'];
|
const designerProps = fieldSchema['x-designer-props'];
|
||||||
const openMode = fieldSchema?.['x-component-props']?.['openMode'];
|
const openMode = fieldSchema?.['x-component-props']?.['openMode'];
|
||||||
const openSize = fieldSchema?.['x-component-props']?.['openSize'];
|
const openSize = fieldSchema?.['x-component-props']?.['openSize'];
|
||||||
|
const refreshDataBlockRequest = fieldSchema?.['x-component-props']?.['refreshDataBlockRequest'];
|
||||||
|
|
||||||
const disabled = form.disabled || field.disabled || field.data?.disabled || propsDisabled;
|
const disabled = form.disabled || field.disabled || field.data?.disabled || propsDisabled;
|
||||||
const linkageRules = useMemo(() => fieldSchema?.['x-linkage-rules'] || [], [fieldSchema?.['x-linkage-rules']]);
|
const linkageRules = useMemo(() => fieldSchema?.['x-linkage-rules'] || [], [fieldSchema?.['x-linkage-rules']]);
|
||||||
@ -75,7 +77,7 @@ export const Action: ComposedAction = withDynamicSchemaProps(
|
|||||||
const localVariables = useLocalVariables({ currentForm: { values: record } as any });
|
const localVariables = useLocalVariables({ currentForm: { values: record } as any });
|
||||||
const { getAriaLabel } = useGetAriaLabelOfAction(title);
|
const { getAriaLabel } = useGetAriaLabelOfAction(title);
|
||||||
const [btnHover, setBtnHover] = useState(popover);
|
const [btnHover, setBtnHover] = useState(popover);
|
||||||
|
const service = useDataBlockRequest();
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (popover) {
|
if (popover) {
|
||||||
setBtnHover(true);
|
setBtnHover(true);
|
||||||
@ -117,9 +119,16 @@ export const Action: ComposedAction = withDynamicSchemaProps(
|
|||||||
|
|
||||||
if (!disabled && aclCtx) {
|
if (!disabled && aclCtx) {
|
||||||
const onOk = () => {
|
const onOk = () => {
|
||||||
onClick?.(e);
|
if (onClick) {
|
||||||
|
onClick(e, () => {
|
||||||
|
if (refreshDataBlockRequest !== false) {
|
||||||
|
service?.refresh?.();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
setVisible(true);
|
setVisible(true);
|
||||||
run();
|
run();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
if (confirm?.content) {
|
if (confirm?.content) {
|
||||||
modal.confirm({
|
modal.confirm({
|
||||||
|
@ -1,15 +1,38 @@
|
|||||||
import { Schema } from '@formily/react';
|
import { Schema } from '@formily/react';
|
||||||
import { DrawerProps, ModalProps } from 'antd';
|
import { DrawerProps, ModalProps } from 'antd';
|
||||||
import React, { createContext } from 'react';
|
import React, { createContext, useEffect, useRef, useState } from 'react';
|
||||||
import { useActionContext } from './hooks';
|
import { useActionContext } from './hooks';
|
||||||
|
import { useDataBlockRequest } from '../../../data-source';
|
||||||
|
|
||||||
export const ActionContext = createContext<ActionContextProps>({});
|
export const ActionContext = createContext<ActionContextProps>({});
|
||||||
ActionContext.displayName = 'ActionContext';
|
ActionContext.displayName = 'ActionContext';
|
||||||
|
|
||||||
export const ActionContextProvider: React.FC<ActionContextProps & { value?: ActionContextProps }> = (props) => {
|
export const ActionContextProvider: React.FC<ActionContextProps & { value?: ActionContextProps }> = (props) => {
|
||||||
|
const [submitted, setSubmitted] = useState(false); //是否有提交记录
|
||||||
const contextProps = useActionContext();
|
const contextProps = useActionContext();
|
||||||
|
const { visible } = { ...props, ...props.value } || {};
|
||||||
|
const isFirstRender = useRef(true); // 使用ref跟踪是否为首次渲染
|
||||||
|
const service = useDataBlockRequest();
|
||||||
|
const { setSubmitted: setParentSubmitted } = { ...props, ...props.value, ...contextProps };
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (visible !== undefined) {
|
||||||
|
if (isFirstRender.current) {
|
||||||
|
isFirstRender.current = false;
|
||||||
|
} else {
|
||||||
|
if (visible === false && submitted) {
|
||||||
|
service.refresh();
|
||||||
|
setParentSubmitted?.(true); //传递给上一层
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return () => {
|
||||||
|
setSubmitted(false);
|
||||||
|
};
|
||||||
|
}, [visible]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ActionContext.Provider value={{ ...contextProps, ...props, ...props?.value }}>
|
<ActionContext.Provider value={{ ...contextProps, ...props, ...props?.value, submitted, setSubmitted }}>
|
||||||
{props.children}
|
{props.children}
|
||||||
</ActionContext.Provider>
|
</ActionContext.Provider>
|
||||||
);
|
);
|
||||||
@ -29,4 +52,6 @@ export interface ActionContextProps {
|
|||||||
fieldSchema?: Schema;
|
fieldSchema?: Schema;
|
||||||
drawerProps?: DrawerProps;
|
drawerProps?: DrawerProps;
|
||||||
modalProps?: ModalProps;
|
modalProps?: ModalProps;
|
||||||
|
submitted?: boolean;
|
||||||
|
setSubmitted?: (v: boolean) => void;
|
||||||
}
|
}
|
||||||
|
@ -130,7 +130,7 @@ const InternalCreateRecordAction = (props: any, ref) => {
|
|||||||
return (
|
return (
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
<div className={actionDesignerCss} ref={buttonRef as React.Ref<HTMLButtonElement>}>
|
<div className={actionDesignerCss} ref={buttonRef as React.Ref<HTMLButtonElement>}>
|
||||||
<ActionContextProvider value={{ ...ctx, visible, setVisible }}>
|
<ActionContextProvider value={{ ...ctx, fieldSchema, visible, setVisible }}>
|
||||||
<CreateAction
|
<CreateAction
|
||||||
{...props}
|
{...props}
|
||||||
onClick={(collectionData) => {
|
onClick={(collectionData) => {
|
||||||
|
@ -1,39 +1,40 @@
|
|||||||
import { ISchema } from '@formily/react';
|
import { ISchema } from '@formily/react';
|
||||||
import { uid } from '@formily/shared';
|
import { uid } from '@formily/shared';
|
||||||
import { useBulkDestroyActionProps, useDestroyActionProps, useUpdateActionProps } from '../../block-provider/hooks';
|
import { useBulkDestroyActionProps, useDestroyActionProps, useUpdateActionProps } from '../../block-provider/hooks';
|
||||||
import { useSchemaTemplateManager } from '../SchemaTemplateManagerProvider';
|
|
||||||
import { uiSchemaTemplatesCollection } from '../collections/uiSchemaTemplates';
|
import { uiSchemaTemplatesCollection } from '../collections/uiSchemaTemplates';
|
||||||
import { CollectionTitle } from './CollectionTitle';
|
import { CollectionTitle } from './CollectionTitle';
|
||||||
|
import { useBlockRequestContext } from '../../block-provider';
|
||||||
|
|
||||||
const useUpdateSchemaTemplateActionProps = () => {
|
const useUpdateSchemaTemplateActionProps = () => {
|
||||||
const props = useUpdateActionProps();
|
const props = useUpdateActionProps();
|
||||||
const { refresh } = useSchemaTemplateManager();
|
const { __parent } = useBlockRequestContext();
|
||||||
return {
|
return {
|
||||||
async onClick() {
|
async onClick() {
|
||||||
await props.onClick();
|
await props.onClick();
|
||||||
refresh();
|
__parent?.service?.refresh?.();
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
const useBulkDestroyTemplateProps = () => {
|
const useBulkDestroyTemplateProps = () => {
|
||||||
const props = useBulkDestroyActionProps();
|
const props = useBulkDestroyActionProps();
|
||||||
const { refresh } = useSchemaTemplateManager();
|
const { service } = useBlockRequestContext();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
async onClick() {
|
async onClick() {
|
||||||
await props.onClick();
|
await props.onClick();
|
||||||
refresh();
|
service?.refresh?.();
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
const useDestroyTemplateProps = () => {
|
const useDestroyTemplateProps = () => {
|
||||||
const props = useDestroyActionProps();
|
const props = useDestroyActionProps();
|
||||||
const { refresh } = useSchemaTemplateManager();
|
const { service } = useBlockRequestContext();
|
||||||
return {
|
return {
|
||||||
async onClick() {
|
async onClick() {
|
||||||
await props.onClick();
|
await props.onClick();
|
||||||
refresh();
|
service?.refresh?.();
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -122,6 +123,7 @@ export const uiSchemaTemplatesSchema: ISchema = {
|
|||||||
'x-component-props': {
|
'x-component-props': {
|
||||||
openMode: 'drawer',
|
openMode: 'drawer',
|
||||||
icon: 'EditOutlined',
|
icon: 'EditOutlined',
|
||||||
|
refreshDataBlockRequest: false,
|
||||||
},
|
},
|
||||||
properties: {
|
properties: {
|
||||||
drawer: {
|
drawer: {
|
||||||
|
@ -4,10 +4,8 @@ import {
|
|||||||
SchemaInitializerOpenModeSchemaItems,
|
SchemaInitializerOpenModeSchemaItems,
|
||||||
SchemaSettings,
|
SchemaSettings,
|
||||||
SchemaSettingsDivider,
|
SchemaSettingsDivider,
|
||||||
SchemaSettingsItemGroup,
|
|
||||||
SchemaSettingsRemove,
|
SchemaSettingsRemove,
|
||||||
SchemaSettingsSelectItem,
|
SchemaSettingsSelectItem,
|
||||||
useCompile,
|
|
||||||
useDesignable,
|
useDesignable,
|
||||||
useSchemaToolbar,
|
useSchemaToolbar,
|
||||||
} from '@nocobase/client';
|
} from '@nocobase/client';
|
||||||
|
@ -86,7 +86,7 @@ export const useCustomizeBulkEditActionProps = () => {
|
|||||||
const { rowKey } = tableBlockContext;
|
const { rowKey } = tableBlockContext;
|
||||||
const selectedRecordKeys =
|
const selectedRecordKeys =
|
||||||
tableBlockContext.field?.data?.selectedRowKeys ?? expressionScope?.selectedRecordKeys ?? {};
|
tableBlockContext.field?.data?.selectedRowKeys ?? expressionScope?.selectedRecordKeys ?? {};
|
||||||
const { setVisible, fieldSchema: actionSchema } = actionContext;
|
const { setVisible, fieldSchema: actionSchema, setSubmitted } = actionContext;
|
||||||
return {
|
return {
|
||||||
async onClick() {
|
async onClick() {
|
||||||
const { onSuccess, skipValidator, updateMode } = actionSchema?.['x-action-settings'] ?? {};
|
const { onSuccess, skipValidator, updateMode } = actionSchema?.['x-action-settings'] ?? {};
|
||||||
@ -130,8 +130,9 @@ export const useCustomizeBulkEditActionProps = () => {
|
|||||||
if (!(resource instanceof TableFieldResource)) {
|
if (!(resource instanceof TableFieldResource)) {
|
||||||
__parent?.__parent?.service?.refresh?.();
|
__parent?.__parent?.service?.refresh?.();
|
||||||
}
|
}
|
||||||
__parent?.service?.refresh?.();
|
// __parent?.service?.refresh?.();
|
||||||
setVisible?.(false);
|
setVisible?.(false);
|
||||||
|
setSubmitted(true);
|
||||||
if (!onSuccess?.successMessage) {
|
if (!onSuccess?.successMessage) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ import {
|
|||||||
AssignedFieldValues,
|
AssignedFieldValues,
|
||||||
useDesignable,
|
useDesignable,
|
||||||
useSchemaToolbar,
|
useSchemaToolbar,
|
||||||
|
RefreshDataBlockRequest,
|
||||||
} from '@nocobase/client';
|
} from '@nocobase/client';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
@ -139,6 +140,15 @@ const schemaSettingsItems: SchemaSettingsItemType[] = [
|
|||||||
return isValid(fieldSchema?.['x-action-settings']?.onSuccess);
|
return isValid(fieldSchema?.['x-action-settings']?.onSuccess);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'refreshDataBlockRequest',
|
||||||
|
Component: RefreshDataBlockRequest,
|
||||||
|
useComponentProps() {
|
||||||
|
return {
|
||||||
|
isPopupAction: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'remove',
|
name: 'remove',
|
||||||
sort: 100,
|
sort: 100,
|
||||||
|
@ -36,7 +36,7 @@ export const useCustomizeBulkUpdateActionProps = () => {
|
|||||||
const localVariables = useLocalVariables();
|
const localVariables = useLocalVariables();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
async onClick() {
|
async onClick(e, callBack) {
|
||||||
const {
|
const {
|
||||||
assignedValues: originalAssignedValues = {},
|
assignedValues: originalAssignedValues = {},
|
||||||
onSuccess,
|
onSuccess,
|
||||||
@ -98,7 +98,10 @@ export const useCustomizeBulkUpdateActionProps = () => {
|
|||||||
} finally {
|
} finally {
|
||||||
actionField.data.loading = false;
|
actionField.data.loading = false;
|
||||||
}
|
}
|
||||||
service?.refresh?.();
|
if (callBack) {
|
||||||
|
callBack?.();
|
||||||
|
}
|
||||||
|
// service?.refresh?.();
|
||||||
if (!(resource instanceof TableFieldResource)) {
|
if (!(resource instanceof TableFieldResource)) {
|
||||||
__parent?.service?.refresh?.();
|
__parent?.service?.refresh?.();
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@ export const useCustomizeRequestActionProps = () => {
|
|||||||
const { setVisible } = useActionContext();
|
const { setVisible } = useActionContext();
|
||||||
const { modal, message } = App.useApp();
|
const { modal, message } = App.useApp();
|
||||||
return {
|
return {
|
||||||
async onClick() {
|
async onClick(e?, callBack?) {
|
||||||
const { skipValidator, onSuccess } = actionSchema?.['x-action-settings'] ?? {};
|
const { skipValidator, onSuccess } = actionSchema?.['x-action-settings'] ?? {};
|
||||||
const xAction = actionSchema?.['x-action'];
|
const xAction = actionSchema?.['x-action'];
|
||||||
if (skipValidator !== true && xAction === 'customize:form:request') {
|
if (skipValidator !== true && xAction === 'customize:form:request') {
|
||||||
@ -56,7 +56,10 @@ export const useCustomizeRequestActionProps = () => {
|
|||||||
if (!(resource instanceof TableFieldResource)) {
|
if (!(resource instanceof TableFieldResource)) {
|
||||||
__parent?.service?.refresh?.();
|
__parent?.service?.refresh?.();
|
||||||
}
|
}
|
||||||
service?.refresh?.();
|
// service?.refresh?.();
|
||||||
|
if (callBack) {
|
||||||
|
callBack?.();
|
||||||
|
}
|
||||||
if (xAction === 'customize:form:request') {
|
if (xAction === 'customize:form:request') {
|
||||||
setVisible?.(false);
|
setVisible?.(false);
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@ import {
|
|||||||
SecondConFirm,
|
SecondConFirm,
|
||||||
useCollection,
|
useCollection,
|
||||||
useSchemaToolbar,
|
useSchemaToolbar,
|
||||||
|
RefreshDataBlockRequest,
|
||||||
} from '@nocobase/client';
|
} from '@nocobase/client';
|
||||||
import { CustomRequestACL, CustomRequestSettingsItem } from './components/CustomRequestActionDesigner';
|
import { CustomRequestACL, CustomRequestSettingsItem } from './components/CustomRequestActionDesigner';
|
||||||
import { useFieldSchema } from '@formily/react';
|
import { useFieldSchema } from '@formily/react';
|
||||||
@ -52,6 +53,15 @@ export const customizeCustomRequestActionSettings = new SchemaSettings({
|
|||||||
name: 'accessControl',
|
name: 'accessControl',
|
||||||
Component: CustomRequestACL,
|
Component: CustomRequestACL,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'refreshDataBlockRequest',
|
||||||
|
Component: RefreshDataBlockRequest,
|
||||||
|
useComponentProps() {
|
||||||
|
return {
|
||||||
|
isPopupAction: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'delete',
|
name: 'delete',
|
||||||
sort: 100,
|
sort: 100,
|
||||||
|
@ -92,7 +92,7 @@ export const useImportStartAction = () => {
|
|||||||
const { t } = useTranslation(NAMESPACE);
|
const { t } = useTranslation(NAMESPACE);
|
||||||
const { schema: importSchema } = useImportSchema(actionSchema);
|
const { schema: importSchema } = useImportSchema(actionSchema);
|
||||||
const form = useForm();
|
const form = useForm();
|
||||||
const { setVisible } = useActionContext();
|
const { setVisible, fieldSchema } = useActionContext();
|
||||||
const { setImportModalVisible, setImportStatus, setImportResult } = useImportContext();
|
const { setImportModalVisible, setImportStatus, setImportResult } = useImportContext();
|
||||||
return {
|
return {
|
||||||
async run() {
|
async run() {
|
||||||
|
@ -82,13 +82,13 @@ export function useRecordTriggerWorkflowsActionProps() {
|
|||||||
const actionField = useField();
|
const actionField = useField();
|
||||||
const actionSchema = useFieldSchema();
|
const actionSchema = useFieldSchema();
|
||||||
const { field, __parent } = useBlockRequestContext();
|
const { field, __parent } = useBlockRequestContext();
|
||||||
const { setVisible } = useActionContext();
|
const { setVisible, setSubmitted } = useActionContext();
|
||||||
const { modal } = App.useApp();
|
const { modal } = App.useApp();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const { onSuccess, triggerWorkflows } = actionSchema?.['x-action-settings'] ?? {};
|
const { onSuccess, triggerWorkflows } = actionSchema?.['x-action-settings'] ?? {};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
async onClick() {
|
async onClick(e?, callBack?) {
|
||||||
actionField.data = field.data || {};
|
actionField.data = field.data || {};
|
||||||
actionField.data.loading = true;
|
actionField.data.loading = true;
|
||||||
|
|
||||||
@ -100,8 +100,12 @@ export function useRecordTriggerWorkflowsActionProps() {
|
|||||||
? triggerWorkflows.map((row) => [row.workflowKey, row.context].filter(Boolean).join('!')).join(',')
|
? triggerWorkflows.map((row) => [row.workflowKey, row.context].filter(Boolean).join('!')).join(',')
|
||||||
: undefined,
|
: undefined,
|
||||||
});
|
});
|
||||||
__parent?.service?.refresh?.();
|
// __parent?.service?.refresh?.();
|
||||||
|
if (callBack) {
|
||||||
|
callBack();
|
||||||
|
}
|
||||||
setVisible?.(false);
|
setVisible?.(false);
|
||||||
|
setSubmitted?.(true);
|
||||||
if (!onSuccess?.successMessage) {
|
if (!onSuccess?.successMessage) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user