Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bindu | BAH-3772 | Disable publish for the forms which are imported irrespective of the version #110

Merged
merged 1 commit into from
Jun 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/form-builder/components/FormDetailContainer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import Spinner from 'common/Spinner';
import EditModal from 'form-builder/components/EditModal.jsx';
import { UrlHelper } from 'form-builder/helpers/UrlHelper';
import isEmpty from 'lodash/isEmpty';

Check warning on line 22 in src/form-builder/components/FormDetailContainer.jsx

View workflow job for this annotation

GitHub Actions / Build & Package

'isEmpty' is defined but never used
import FormHelper from 'form-builder/helpers/formHelper';
import formHelper from '../helpers/formHelper';
import get from 'lodash/get';
Expand Down Expand Up @@ -170,7 +170,7 @@
const initialPrivileges = [];
const formId = this.state.formData.id;
const formVersion = this.state.formData.version;
const optionsUrl = `${formBuilderConstants.getFormPrivilegesUrl}?formId=${formId}&formVersion=${formVersion}`;

Check warning on line 173 in src/form-builder/components/FormDetailContainer.jsx

View workflow job for this annotation

GitHub Actions / Build & Package

Line 173 exceeds the maximum line length of 100
httpInterceptor.get(optionsUrl).then((initialPrivilegesFromDB) => {
initialPrivilegesFromDB.forEach((privilege) => {
initialPrivileges.push(privilege);
Expand All @@ -186,9 +186,9 @@
}
}

_getFormPrivilegesFromDB(formId, formVersion) {

Check warning on line 189 in src/form-builder/components/FormDetailContainer.jsx

View workflow job for this annotation

GitHub Actions / Build & Package

_getFormPrivilegesFromDB should be placed after getFormList
const initialPrivileges = [];
const optionsUrl = `${formBuilderConstants.getFormPrivilegesUrl}?formId=${formId}&formVersion=${formVersion}`;

Check warning on line 191 in src/form-builder/components/FormDetailContainer.jsx

View workflow job for this annotation

GitHub Actions / Build & Package

Line 191 exceeds the maximum line length of 100
httpInterceptor.get(optionsUrl).then((initialPrivilegesFromDB) => {
initialPrivilegesFromDB.forEach((privilege, key) => {
initialPrivileges.push(privilege);
Expand Down Expand Up @@ -387,7 +387,7 @@
return (
<button
className="publish-button"
disabled={isPublished || isEmpty(resourceData)}
disabled={isPublished}
onClick={this.onPublish}
>
Publish
Expand Down
Loading