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