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

Develop #1411

Merged
merged 2 commits into from
Oct 18, 2024
Merged

Develop #1411

Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -251,22 +251,7 @@ function CreateNewOrganization() {

const onSaveHandler = (event, toggle = false) => {
event?.preventDefault();
setShowDialog(false);
let validateFieldList = [];
// if (
// form.getFieldValue('socialMediaLinks')?.filter((link) => {
// if (link) return true;
// })?.length > 0
// ) {
// validateFieldList = validateFieldList?.concat(
// form
// .getFieldValue('socialMediaLinks')
// ?.filter((link) => {
// if (link) return true;
// })
// ?.map((link, index) => ['socialMediaLinks', index]),
// );
// }
let mandatoryFields = standardMandatoryFieldNames;
validateFieldList = validateFieldList?.concat(
formFields
Expand All @@ -290,6 +275,7 @@ function CreateNewOrganization() {
form
.validateFields(validateFieldList)
.then(async () => {
setShowDialog(false);
var values = form.getFieldsValue(true);
let organizationPayload = {};
Object.keys(values)?.map((object) => {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Dashboard/CreateNewPerson/CreateNewPerson.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ function CreateNewPerson() {

const onSaveHandler = (event) => {
event?.preventDefault();
setShowDialog(false);
let validateFieldList = [];
let mandatoryFields = formFieldProperties?.mandatoryFields?.standardFields?.map((field) => field?.fieldName);
validateFieldList = validateFieldList?.concat(
Expand All @@ -243,6 +242,7 @@ function CreateNewPerson() {
form
.validateFields(validateFieldList)
.then(async () => {
setShowDialog(false);
var values = form.getFieldsValue(true);
let personPayload = {};
Object.keys(values)?.map((object) => {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Dashboard/CreateNewPlace/CreateNewPlace.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -414,11 +414,11 @@ function CreateNewPlace() {

const onSaveHandler = (event) => {
event?.preventDefault();
setShowDialog(false);
var promise = new Promise(function (resolve, reject) {
form
.validateFields(publishValidateFields ?? [])
.then(async () => {
setShowDialog(false);
var values = form.getFieldsValue(true);

let placeObj,
Expand Down
Loading