mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-08-17 21:25:54 +02:00
fix: add signer form not working properly for overlap contacts
This commit is contained in:
@@ -667,7 +667,15 @@ class AppendFormInForm extends Component {
|
||||
form.setACL(new Parse.ACL(ACL));
|
||||
}
|
||||
form.save(RowData).then(
|
||||
() => {
|
||||
(formd) => {
|
||||
const parseData = JSON.parse(JSON.stringify(formd));
|
||||
this.props.details({
|
||||
value: parseData[this.props.valueKey],
|
||||
label: parseData[this.props.displayKey]
|
||||
});
|
||||
if (this.props.closePopup) {
|
||||
this.props.closePopup();
|
||||
}
|
||||
let filtered = {};
|
||||
if (this.state.redirect_type === "clearData") {
|
||||
if (
|
||||
@@ -686,25 +694,21 @@ class AppendFormInForm extends Component {
|
||||
} else {
|
||||
RowData = {};
|
||||
}
|
||||
this.setState(
|
||||
{
|
||||
formData: filtered,
|
||||
active: true,
|
||||
loading: false,
|
||||
toastColor: "#5cb85c",
|
||||
toastDescription: this.state.successMassage
|
||||
},
|
||||
() => {
|
||||
this.props.removeState();
|
||||
this.props.removeLevel2State();
|
||||
this.props.removeLevel3State();
|
||||
var x = document.getElementById("snackbar");
|
||||
x.className = "show";
|
||||
setTimeout(function () {
|
||||
x.className = x.className.replace("show", "");
|
||||
}, 2000);
|
||||
}
|
||||
);
|
||||
this.setState({
|
||||
formData: filtered,
|
||||
active: true,
|
||||
loading: false,
|
||||
toastColor: "#5cb85c",
|
||||
toastDescription: "Record inserted successfully."
|
||||
});
|
||||
// this.props.removeState();
|
||||
// this.props.removeLevel2State();
|
||||
// this.props.removeLevel3State();
|
||||
// var x = document.getElementById("snackbar");
|
||||
// x.className = "show";
|
||||
// setTimeout(function () {
|
||||
// x.className = x.className.replace("show", "");
|
||||
// }, 2000);
|
||||
},
|
||||
(error) => {
|
||||
this.setState({
|
||||
|
||||
@@ -494,9 +494,9 @@ const MultiSelectField = (props) => {
|
||||
const handleNewDetails = (data) => {
|
||||
setState({ [`${props.name}_DD`]: [...state[`${props.name}_DD`], data] });
|
||||
if (selected.length > 0) {
|
||||
setSelected([data]);
|
||||
} else {
|
||||
setSelected([...selected, data]);
|
||||
} else {
|
||||
setSelected([data]);
|
||||
}
|
||||
};
|
||||
if (props.schema.uiLayout === "MultiDropdownList") {
|
||||
@@ -656,7 +656,7 @@ const MultiSelectField = (props) => {
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
backgroundColor: "rgba(255, 255, 255, 0.75)",
|
||||
zIndex: 10
|
||||
zIndex: 50
|
||||
}
|
||||
}}
|
||||
>
|
||||
|
||||
@@ -125,7 +125,26 @@ function Login(props) {
|
||||
) {
|
||||
_currentRole = userRoles[1];
|
||||
} else {
|
||||
_currentRole = userRoles[0];
|
||||
const rolesfiltered = userRoles.filter(
|
||||
(x) => x !== "contracts_Guest"
|
||||
);
|
||||
if (rolesfiltered.length > 0) {
|
||||
_currentRole = rolesfiltered[0];
|
||||
} else {
|
||||
setThirdpartyLoader(false);
|
||||
setState({
|
||||
...state,
|
||||
loading: false,
|
||||
toastColor: "#d9534f",
|
||||
toastDescription: `Does not have permissions to access this application.`
|
||||
});
|
||||
const x = document.getElementById("snackbar");
|
||||
x.className = "show";
|
||||
setTimeout(function () {
|
||||
x.className = x.className.replace("show", "");
|
||||
}, 2000);
|
||||
}
|
||||
// _currentRole = userRoles[0];
|
||||
}
|
||||
} else {
|
||||
_currentRole = userRoles[0];
|
||||
@@ -725,6 +744,7 @@ function Login(props) {
|
||||
};
|
||||
|
||||
const GetLoginData = async () => {
|
||||
setState({...state, loading: true})
|
||||
try {
|
||||
Parse.serverURL = localStorage.getItem("baseUrl");
|
||||
Parse.initialize(localStorage.getItem("parseAppId"));
|
||||
@@ -769,7 +789,26 @@ function Login(props) {
|
||||
) {
|
||||
_currentRole = userRoles[1];
|
||||
} else {
|
||||
_currentRole = userRoles[0];
|
||||
const rolesfiltered = userRoles.filter(
|
||||
(x) => x !== "contracts_Guest"
|
||||
);
|
||||
if (rolesfiltered.length > 0) {
|
||||
_currentRole = rolesfiltered[0];
|
||||
} else {
|
||||
setThirdpartyLoader(false);
|
||||
setState({
|
||||
...state,
|
||||
loading: false,
|
||||
toastColor: "#d9534f",
|
||||
toastDescription: `Does not have permissions to access this application.`
|
||||
});
|
||||
const x = document.getElementById("snackbar");
|
||||
x.className = "show";
|
||||
setTimeout(function () {
|
||||
x.className = x.className.replace("show", "");
|
||||
}, 2000);
|
||||
}
|
||||
// _currentRole = userRoles[0];
|
||||
}
|
||||
} else {
|
||||
_currentRole = userRoles[0];
|
||||
|
||||
Reference in New Issue
Block a user