Skip to content

Commit

Permalink
feat: remove non-implemented visualization request add
Browse files Browse the repository at this point in the history
  • Loading branch information
tomzemp committed Jan 29, 2024
1 parent 8380af8 commit 3cf877b
Showing 1 changed file with 3 additions and 30 deletions.
33 changes: 3 additions & 30 deletions src/components/edit/exchange-update/requests-overview.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,8 @@ import {
DataTableCell,
} from '@dhis2/ui'
import PropTypes from 'prop-types'
import React, { useState } from 'react'
import { useUserContext } from '../../../context/index.js'
import {
OpenFileDialog,
OU_LEVEL_PREFIX,
OU_GROUP_PREFIX,
} from '../shared/index.js'
import React from 'react'
import { OU_LEVEL_PREFIX, OU_GROUP_PREFIX } from '../shared/index.js'
import styles from './requests-overview.module.css'

const getOuText = ({ ouInfo }) => {
Expand Down Expand Up @@ -129,10 +124,7 @@ export const RequestsOverview = ({
setRequestEditMode,
deleteRequest,
}) => {
const [visualizationDialogOpen, setVisualizationDialogOpen] =
useState(false)
const { baseUrl } = useConfig()
const currentUser = useUserContext()

return (
<>
Expand Down Expand Up @@ -165,28 +157,9 @@ export const RequestsOverview = ({
</Table>
<ButtonStrip className={styles.buttonContainer}>
<Button small onClick={() => setRequestEditMode({}, true)}>
{i18n.t('Add request manually')}
</Button>
<Button
small
className={styles.requestActionButton}
onClick={() => setVisualizationDialogOpen(true)}
>
{i18n.t('Add request from visualization [TO DO]')}
{i18n.t('Add request')}
</Button>
</ButtonStrip>
<OpenFileDialog
type="visualization"
open={visualizationDialogOpen}
onClose={() => {
setVisualizationDialogOpen(false)
}}
onNew={() => {
console.log('Not supported')
}} // this prop is not relevant, but required
onFileSelect={() => {}}
currentUser={currentUser}
/>
</>
)
}
Expand Down

0 comments on commit 3cf877b

Please sign in to comment.