flowcore-fn 10.1.1 → 10.1.2
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/dist/pkg-index.js +32 -3
- package/dist/pkg-index.mjs +32 -3
- package/package.json +1 -1
package/dist/pkg-index.js
CHANGED
|
@@ -3956,6 +3956,16 @@ function AddUserHierarchyNodeMappingModal({
|
|
|
3956
3956
|
};
|
|
3957
3957
|
loadData();
|
|
3958
3958
|
}, [isOpen]);
|
|
3959
|
+
const toApiDateTime = (value) => {
|
|
3960
|
+
if (!value) return null;
|
|
3961
|
+
if (typeof value === "string" && value.includes("T")) {
|
|
3962
|
+
const parsed = new Date(value);
|
|
3963
|
+
return Number.isNaN(parsed.getTime()) ? null : parsed.toISOString();
|
|
3964
|
+
}
|
|
3965
|
+
const [year, month, day] = value.split("-").map(Number);
|
|
3966
|
+
if (!year || !month || !day) return null;
|
|
3967
|
+
return new Date(Date.UTC(year, month - 1, day, 0, 0, 0, 0)).toISOString();
|
|
3968
|
+
};
|
|
3959
3969
|
const handleChange = (event) => setFormData((previous) => __spreadProps(__spreadValues({}, previous), { [event.target.name]: event.target.value }));
|
|
3960
3970
|
const handleSave = async () => {
|
|
3961
3971
|
if (!onSave) return;
|
|
@@ -3964,7 +3974,16 @@ function AddUserHierarchyNodeMappingModal({
|
|
|
3964
3974
|
return;
|
|
3965
3975
|
}
|
|
3966
3976
|
setIsSubmitting(true);
|
|
3967
|
-
const success = await onSave({
|
|
3977
|
+
const success = await onSave({
|
|
3978
|
+
externalUserId: Number(formData.externalUserId),
|
|
3979
|
+
workflowStepId: Number(formData.workflowStepId),
|
|
3980
|
+
hierarchyNodeId: Number(formData.hierarchyNodeId),
|
|
3981
|
+
roleCode: formData.roleCode,
|
|
3982
|
+
isPrimary: formData.isPrimary === "true",
|
|
3983
|
+
effectiveFrom: toApiDateTime(formData.effectiveFrom),
|
|
3984
|
+
effectiveTo: toApiDateTime(formData.effectiveTo),
|
|
3985
|
+
createdBy: "System"
|
|
3986
|
+
});
|
|
3968
3987
|
setIsSubmitting(false);
|
|
3969
3988
|
if (success) onClose();
|
|
3970
3989
|
};
|
|
@@ -4187,6 +4206,16 @@ function EditUserHierarchyNodeMappingModal({
|
|
|
4187
4206
|
[name]: value
|
|
4188
4207
|
}));
|
|
4189
4208
|
};
|
|
4209
|
+
const toApiDateTime = (value) => {
|
|
4210
|
+
if (!value) return null;
|
|
4211
|
+
if (typeof value === "string" && value.includes("T")) {
|
|
4212
|
+
const parsed = new Date(value);
|
|
4213
|
+
return Number.isNaN(parsed.getTime()) ? null : parsed.toISOString();
|
|
4214
|
+
}
|
|
4215
|
+
const [year, month, day] = value.split("-").map(Number);
|
|
4216
|
+
if (!year || !month || !day) return null;
|
|
4217
|
+
return new Date(Date.UTC(year, month - 1, day, 0, 0, 0, 0)).toISOString();
|
|
4218
|
+
};
|
|
4190
4219
|
const handleSubmit = async (event) => {
|
|
4191
4220
|
var _a, _b, _c;
|
|
4192
4221
|
event.preventDefault();
|
|
@@ -4202,8 +4231,8 @@ function EditUserHierarchyNodeMappingModal({
|
|
|
4202
4231
|
hierarchyNodeId: Number(formData.hierarchyNodeId),
|
|
4203
4232
|
roleCode: formData.roleCode,
|
|
4204
4233
|
isPrimary: formData.isPrimary === "true",
|
|
4205
|
-
effectiveFrom: formData.effectiveFrom,
|
|
4206
|
-
effectiveTo: formData.effectiveTo
|
|
4234
|
+
effectiveFrom: toApiDateTime(formData.effectiveFrom),
|
|
4235
|
+
effectiveTo: toApiDateTime(formData.effectiveTo),
|
|
4207
4236
|
isActive: (_c = (_b = selectedMapping.isActive) != null ? _b : selectedMapping.status) != null ? _c : true,
|
|
4208
4237
|
updatedBy: selectedMapping.updatedBy || selectedMapping.createdBy || "System"
|
|
4209
4238
|
});
|
package/dist/pkg-index.mjs
CHANGED
|
@@ -3822,6 +3822,16 @@ function AddUserHierarchyNodeMappingModal({
|
|
|
3822
3822
|
};
|
|
3823
3823
|
loadData();
|
|
3824
3824
|
}, [isOpen]);
|
|
3825
|
+
const toApiDateTime = (value) => {
|
|
3826
|
+
if (!value) return null;
|
|
3827
|
+
if (typeof value === "string" && value.includes("T")) {
|
|
3828
|
+
const parsed = new Date(value);
|
|
3829
|
+
return Number.isNaN(parsed.getTime()) ? null : parsed.toISOString();
|
|
3830
|
+
}
|
|
3831
|
+
const [year, month, day] = value.split("-").map(Number);
|
|
3832
|
+
if (!year || !month || !day) return null;
|
|
3833
|
+
return new Date(Date.UTC(year, month - 1, day, 0, 0, 0, 0)).toISOString();
|
|
3834
|
+
};
|
|
3825
3835
|
const handleChange = (event) => setFormData((previous) => __spreadProps(__spreadValues({}, previous), { [event.target.name]: event.target.value }));
|
|
3826
3836
|
const handleSave = async () => {
|
|
3827
3837
|
if (!onSave) return;
|
|
@@ -3830,7 +3840,16 @@ function AddUserHierarchyNodeMappingModal({
|
|
|
3830
3840
|
return;
|
|
3831
3841
|
}
|
|
3832
3842
|
setIsSubmitting(true);
|
|
3833
|
-
const success = await onSave({
|
|
3843
|
+
const success = await onSave({
|
|
3844
|
+
externalUserId: Number(formData.externalUserId),
|
|
3845
|
+
workflowStepId: Number(formData.workflowStepId),
|
|
3846
|
+
hierarchyNodeId: Number(formData.hierarchyNodeId),
|
|
3847
|
+
roleCode: formData.roleCode,
|
|
3848
|
+
isPrimary: formData.isPrimary === "true",
|
|
3849
|
+
effectiveFrom: toApiDateTime(formData.effectiveFrom),
|
|
3850
|
+
effectiveTo: toApiDateTime(formData.effectiveTo),
|
|
3851
|
+
createdBy: "System"
|
|
3852
|
+
});
|
|
3834
3853
|
setIsSubmitting(false);
|
|
3835
3854
|
if (success) onClose();
|
|
3836
3855
|
};
|
|
@@ -4051,6 +4070,16 @@ function EditUserHierarchyNodeMappingModal({
|
|
|
4051
4070
|
[name]: value
|
|
4052
4071
|
}));
|
|
4053
4072
|
};
|
|
4073
|
+
const toApiDateTime = (value) => {
|
|
4074
|
+
if (!value) return null;
|
|
4075
|
+
if (typeof value === "string" && value.includes("T")) {
|
|
4076
|
+
const parsed = new Date(value);
|
|
4077
|
+
return Number.isNaN(parsed.getTime()) ? null : parsed.toISOString();
|
|
4078
|
+
}
|
|
4079
|
+
const [year, month, day] = value.split("-").map(Number);
|
|
4080
|
+
if (!year || !month || !day) return null;
|
|
4081
|
+
return new Date(Date.UTC(year, month - 1, day, 0, 0, 0, 0)).toISOString();
|
|
4082
|
+
};
|
|
4054
4083
|
const handleSubmit = async (event) => {
|
|
4055
4084
|
var _a, _b, _c;
|
|
4056
4085
|
event.preventDefault();
|
|
@@ -4066,8 +4095,8 @@ function EditUserHierarchyNodeMappingModal({
|
|
|
4066
4095
|
hierarchyNodeId: Number(formData.hierarchyNodeId),
|
|
4067
4096
|
roleCode: formData.roleCode,
|
|
4068
4097
|
isPrimary: formData.isPrimary === "true",
|
|
4069
|
-
effectiveFrom: formData.effectiveFrom,
|
|
4070
|
-
effectiveTo: formData.effectiveTo
|
|
4098
|
+
effectiveFrom: toApiDateTime(formData.effectiveFrom),
|
|
4099
|
+
effectiveTo: toApiDateTime(formData.effectiveTo),
|
|
4071
4100
|
isActive: (_c = (_b = selectedMapping.isActive) != null ? _b : selectedMapping.status) != null ? _c : true,
|
|
4072
4101
|
updatedBy: selectedMapping.updatedBy || selectedMapping.createdBy || "System"
|
|
4073
4102
|
});
|