|
|
@ -31,25 +31,25 @@ const DialogForm = ({ openDialog, closeDialog, toggleDialog, typeDialog, dataEdi |
|
|
|
let data = ''; |
|
|
|
let data = ''; |
|
|
|
if (typeDialog === "Save") { |
|
|
|
if (typeDialog === "Save") { |
|
|
|
if (role_name === 'Super Admin') { |
|
|
|
if (role_name === 'Super Admin') { |
|
|
|
company_id = selectedCompany |
|
|
|
company_id = parseInt(selectedCompany) |
|
|
|
} |
|
|
|
} |
|
|
|
data = { |
|
|
|
data = { |
|
|
|
name: name, |
|
|
|
name: name, |
|
|
|
description: description, |
|
|
|
description: description, |
|
|
|
company_id: company_id |
|
|
|
company_id: parseInt(company_id) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
closeDialog('save', data); |
|
|
|
closeDialog('save', data); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
|
|
|
|
|
|
|
|
if (role_name === 'Super Admin') { |
|
|
|
if (role_name === 'Super Admin') { |
|
|
|
company_id = selectedCompany |
|
|
|
company_id = parseInt(selectedCompany) |
|
|
|
} |
|
|
|
} |
|
|
|
data = { |
|
|
|
data = { |
|
|
|
id, |
|
|
|
id, |
|
|
|
name: name, |
|
|
|
name: name, |
|
|
|
description: description, |
|
|
|
description: description, |
|
|
|
company_id: company_id |
|
|
|
company_id: parseInt(company_id) |
|
|
|
} |
|
|
|
} |
|
|
|
closeDialog('edit', data); |
|
|
|
closeDialog('edit', data); |
|
|
|
} |
|
|
|
} |
|
|
|