Browse Source

parseInt company_id

pull/1/head
wahyuun 9 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 = ''; 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);
} }

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

@ -116,7 +116,7 @@ const Satuan = ({ params, ...props }) => {
if (role_name !== "Super Admin") { if (role_name !== "Super Admin") {
payload.columns.push( 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 { } else {
payload.columns.push( payload.columns.push(

Loading…
Cancel
Save