Skip to content

Commit

Permalink
Cleanup comments, add refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnDuprey committed Jul 3, 2024
1 parent 109692d commit 4c0e474
Showing 1 changed file with 3 additions and 40 deletions.
43 changes: 3 additions & 40 deletions src/views/cipp/ExtensionMappings.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,6 @@ export default function ExtensionMappings({ type, fieldMappings = false, autoMap
setMappingValue({})
})
}
/*const onNinjaOrgsSubmit = () => {
const originalFormat = ninjaMappingsArray.reduce((acc, item) => {
acc[item.Tenant?.customerId] = { label: item.ninjaName, value: item.ninjaId }
return acc
}, {})
setNinjaOrgsExtensionconfig({
path: 'api/ExecExtensionMapping?AddMapping=NinjaOrgs',
values: { mappings: originalFormat },
}).then(() => {
listNinjaOrgsBackend({ path: 'api/ExecExtensionMapping?List=NinjaOrgs' })
setMappingValue({})
})
}*/

const onOrgsAutomap = async (values) => {
if (autoMapSyncApi) {
Expand Down Expand Up @@ -89,32 +75,6 @@ export default function ExtensionMappings({ type, fieldMappings = false, autoMap
})
}

/*const onHaloAutomap = () => {
const newMappings = listBackendHaloResult.data?.Tenants.map(
(tenant) => {
const haloClient = listBackendHaloResult.data?.HaloClients.find(
(client) => client.name === tenant.displayName,
)
if (haloClient) {
console.log(haloClient)
console.log(tenant)
return {
Tenant: tenant,
haloName: haloClient.name,
haloId: haloClient.value,
}
}
},
//filter out any undefined values
).filter((item) => item !== undefined)
setHaloMappingsArray((currentHaloMappings) => [...currentHaloMappings, ...newMappings]).then(
() => {
listHaloBackend({ path: 'api/ExecExtensionMapping?List=Halo' })
},
)
setHaloAutoMap(true)
}*/

useEffect(() => {
if (listMappingBackendResult.isSuccess) {
setMappingArray(
Expand Down Expand Up @@ -232,6 +192,9 @@ export default function ExtensionMappings({ type, fieldMappings = false, autoMap
columns={columns}
data={mappingArray}
isModal={true}
refreshFunction={() =>
listMappingBackend({ path: `api/ExecExtensionMapping?List=${type}` })
}
/>
)
}
Expand Down

0 comments on commit 4c0e474

Please sign in to comment.