Browse Source

parseInt company_id

pull/1/head
wahyuun 10 months ago
parent
commit
3529975158
  1. 8
      src/views/SimproV2/Satuan/DialogForm.js
  2. 2
      src/views/SimproV2/Satuan/index.js

8
src/views/SimproV2/Satuan/DialogForm.js

@ -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);
}

2
src/views/SimproV2/Satuan/index.js

@ -116,7 +116,7 @@ const Satuan = ({ params, ...props }) => {
if (role_name !== "Super Admin") {
payload.columns.push(
{ "name": "company_id", "logic_operator": "=", "value": company_id, "operator": "AND" },
{ "name": "company_id", "logic_operator": "=", "value": parseInt(company_id), "operator": "AND" },
)
} else {
payload.columns.push(

Loading…
Cancel
Save