Compare commits
No commits in common. "169353e1152c89d4ba60c2a6bc3cfe016bbc7fd7" and "cb837f5cf205d7ba5e9c51028c96b7069531330f" have entirely different histories.
169353e115
...
cb837f5cf2
@ -50,7 +50,7 @@ const CreateProgramModalComponent = ({ isOpen, onClose, onCreate, title = '', is
|
|||||||
<Divider sx={{ marginBottom: '0.75rem' }} />
|
<Divider sx={{ marginBottom: '0.75rem' }} />
|
||||||
|
|
||||||
{/* <Input */}
|
{/* <Input */}
|
||||||
<StyledTextField label='Название' onChange={(e) => setName(e.target.value)} />
|
<StyledTextField label='Название программы' onChange={(e) => setName(e.target.value)} />
|
||||||
<Stack
|
<Stack
|
||||||
direction='row'
|
direction='row'
|
||||||
spacing={0.75}
|
spacing={0.75}
|
||||||
|
|||||||
@ -27,7 +27,7 @@ export const ExportWithTextButton = (props) => {
|
|||||||
return (
|
return (
|
||||||
<PrimaryOutlinedButton {...props}>
|
<PrimaryOutlinedButton {...props}>
|
||||||
<Stack sx={{ flexDirection: 'row', alignItems: 'center', gap: '.375rem' }}>
|
<Stack sx={{ flexDirection: 'row', alignItems: 'center', gap: '.375rem' }}>
|
||||||
<ExportSvg size='1rem' color='#45881c' strokeWidth='.33px' />
|
<ExportSvg size='1rem' color='#45881c' strokeWidth={'.33px'} />
|
||||||
<span style={{ fontSize: '.88rem' }}>{props?.text || 'Экспорт'}</span>
|
<span style={{ fontSize: '.88rem' }}>{props?.text || 'Экспорт'}</span>
|
||||||
</Stack>
|
</Stack>
|
||||||
</PrimaryOutlinedButton>
|
</PrimaryOutlinedButton>
|
||||||
@ -49,17 +49,9 @@ export const ExportDefaultButton = (props) => {
|
|||||||
return (
|
return (
|
||||||
<DefaultOutlinedButton {...props}>
|
<DefaultOutlinedButton {...props}>
|
||||||
<Stack sx={{ flexDirection: 'row', alignItems: 'center', gap: '.375rem' }}>
|
<Stack sx={{ flexDirection: 'row', alignItems: 'center', gap: '.375rem' }}>
|
||||||
<ExportSvg color='#4a5565' strokeWidth='.33' size='1rem' />
|
<ExportSvg color='#4a5565' strokeWidth={'.33'} size='1rem' />
|
||||||
<span>{props?.text || 'Экспорт'}</span>
|
<span>{props?.text || 'Экспорт'}</span>
|
||||||
</Stack>
|
</Stack>
|
||||||
</DefaultOutlinedButton>
|
</DefaultOutlinedButton>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const ResetFiltersButton = ({ sx, ...props }) => {
|
|
||||||
return (
|
|
||||||
<DefaultOutlinedButton type='button' {...props} sx={{ height: '2.5rem', flexShrink: 0, ...sx }}>
|
|
||||||
Сбросить фильтры
|
|
||||||
</DefaultOutlinedButton>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { Autocomplete, FormLabel, Paper, Stack, TextField } from '@mui/material';
|
import { Autocomplete, FormLabel, Paper, Stack, TextField } from '@mui/material';
|
||||||
import { styled } from '@mui/material';
|
import { styled } from '@mui/material';
|
||||||
import { DatePicker } from '@mui/x-date-pickers/DatePicker';
|
import { DatePicker } from '@mui/x-date-pickers/DatePicker';
|
||||||
import { ResetFiltersButton } from '../../../../components/common/Buttons/ButtonsActions';
|
import { DefaultOutlinedButton } from '../../../../components/common/Buttons/Buttons';
|
||||||
import FilterFieldWrapper from './FilterFieldWrapper';
|
import FilterFieldWrapper from './FilterFieldWrapper';
|
||||||
|
|
||||||
const FormLabelStyled = styled(FormLabel)`
|
const FormLabelStyled = styled(FormLabel)`
|
||||||
@ -158,7 +158,9 @@ const AuditLogsFilters = ({
|
|||||||
</Stack>
|
</Stack>
|
||||||
|
|
||||||
<Stack direction={'row'} spacing={'1rem'} sx={{ width: '100%', alignItems: 'end' }}>
|
<Stack direction={'row'} spacing={'1rem'} sx={{ width: '100%', alignItems: 'end' }}>
|
||||||
<ResetFiltersButton onClick={onResetFilters} sx={{ flex: '0 0 auto' }} />
|
<DefaultOutlinedButton onClick={onResetFilters} sx={{ flex: '0 0 auto', height: '2.56rem' }}>
|
||||||
|
Сбросить фильтры
|
||||||
|
</DefaultOutlinedButton>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Paper>
|
</Paper>
|
||||||
);
|
);
|
||||||
|
|||||||
@ -4,7 +4,6 @@ import { useCallback, useEffect, useState } from 'react';
|
|||||||
import { toast } from 'react-toastify';
|
import { toast } from 'react-toastify';
|
||||||
import { SspApi } from '../../../../api/ssp';
|
import { SspApi } from '../../../../api/ssp';
|
||||||
import { useAuth } from '../../../../app/context/AuthProvider';
|
import { useAuth } from '../../../../app/context/AuthProvider';
|
||||||
import { ResetFiltersButton } from '../../../../components/common/Buttons/ButtonsActions';
|
|
||||||
import { PROJECT_STATUSES, ROLES_NAME_ID } from '../../../../constants/constants';
|
import { PROJECT_STATUSES, ROLES_NAME_ID } from '../../../../constants/constants';
|
||||||
|
|
||||||
const FILTER_PROJECT_STATUSES = ['created', 'agreed', 'archived'];
|
const FILTER_PROJECT_STATUSES = ['created', 'agreed', 'archived'];
|
||||||
@ -170,15 +169,26 @@ const TableFilters = ({ onBranchChange, onSearchChange, onStatusChange, selected
|
|||||||
))}
|
))}
|
||||||
</TextField>
|
</TextField>
|
||||||
|
|
||||||
<ResetFiltersButton
|
{(selectedBranches.length > 0 || searchQuery || selectedStatus) && (
|
||||||
onClick={() => {
|
<Box sx={{ display: 'flex', gap: 1, ml: 'auto' }}>
|
||||||
setBranchInputValue('');
|
<Chip
|
||||||
onBranchChange([]);
|
label='Сбросить фильтры'
|
||||||
onSearchChange('');
|
size='small'
|
||||||
onStatusChange('');
|
onClick={() => {
|
||||||
}}
|
setBranchInputValue('');
|
||||||
sx={{ ml: 'auto' }}
|
onBranchChange([]);
|
||||||
/>
|
onSearchChange('');
|
||||||
|
onStatusChange('');
|
||||||
|
}}
|
||||||
|
sx={{
|
||||||
|
cursor: 'pointer',
|
||||||
|
'&:hover': {
|
||||||
|
backgroundColor: 'action.hover',
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Box>
|
||||||
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
</Paper>
|
</Paper>
|
||||||
);
|
);
|
||||||
|
|||||||
@ -6,8 +6,7 @@ import { ProjectsApi } from '../../api/projects';
|
|||||||
import { SspApi } from '../../api/ssp';
|
import { SspApi } from '../../api/ssp';
|
||||||
import { useAuth } from '../../app/context/AuthProvider';
|
import { useAuth } from '../../app/context/AuthProvider';
|
||||||
import { HeaderSwitch } from '../../components/HeaderMenu/HeaderSwitch';
|
import { HeaderSwitch } from '../../components/HeaderMenu/HeaderSwitch';
|
||||||
import { PrimaryButton } from '../../components/common/Buttons/Buttons';
|
import { PrimaryButton, PrimaryOutlinedButton } from '../../components/common/Buttons/Buttons';
|
||||||
import { ResetFiltersButton } from '../../components/common/Buttons/ButtonsActions';
|
|
||||||
import { PaginatedList } from '../../components/common/PaginatedList';
|
import { PaginatedList } from '../../components/common/PaginatedList';
|
||||||
import { WhitePlus } from '../../components/common/icons/icons';
|
import { WhitePlus } from '../../components/common/icons/icons';
|
||||||
import { ROLES_NAME_ID } from '../../constants/constants';
|
import { ROLES_NAME_ID } from '../../constants/constants';
|
||||||
@ -241,7 +240,10 @@ export default function ProjectsPage() {
|
|||||||
sx={{ width: 200 }}
|
sx={{ width: 200 }}
|
||||||
renderInput={(params) => <TextField {...params} placeholder='Все' size='small' />}
|
renderInput={(params) => <TextField {...params} placeholder='Все' size='small' />}
|
||||||
/>
|
/>
|
||||||
<ResetFiltersButton onClick={handleClearFilters} />
|
<PrimaryOutlinedButton onClick={handleClearFilters} sx={{ height: '100%' }}>
|
||||||
|
{' '}
|
||||||
|
Сбросить
|
||||||
|
</PrimaryOutlinedButton>
|
||||||
</Box>
|
</Box>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@ -5,7 +5,6 @@ import { toast } from 'react-toastify';
|
|||||||
|
|
||||||
import { SspApi } from '../../api/ssp';
|
import { SspApi } from '../../api/ssp';
|
||||||
import { useAuth } from '../../app/context/AuthProvider';
|
import { useAuth } from '../../app/context/AuthProvider';
|
||||||
import { ResetFiltersButton } from '../../components/common/Buttons/ButtonsActions';
|
|
||||||
import { ROLES_NAME_ID } from '../../constants/constants';
|
import { ROLES_NAME_ID } from '../../constants/constants';
|
||||||
|
|
||||||
const SELECT_ALL_OPTION = { id: '__all__', title: 'Все ССП/РФ' };
|
const SELECT_ALL_OPTION = { id: '__all__', title: 'Все ССП/РФ' };
|
||||||
@ -147,12 +146,6 @@ export function SvodFilters({
|
|||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<ResetFiltersButton
|
|
||||||
onClick={() => {
|
|
||||||
setSearchInput('');
|
|
||||||
onChange({ year: new Date().getFullYear(), selectedOrganizations: [], search: '' });
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
{children}
|
{children}
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
|
|||||||
@ -8,7 +8,6 @@ import { blueColumn } from '../../components/RealtimeTable/constants/columnColor
|
|||||||
import { sectionCodeColor } from '../../components/RealtimeTable/constants/columnConfig';
|
import { sectionCodeColor } from '../../components/RealtimeTable/constants/columnConfig';
|
||||||
import { useSvod } from './SvodContext';
|
import { useSvod } from './SvodContext';
|
||||||
import { SvodFilters } from './SvodFilters';
|
import { SvodFilters } from './SvodFilters';
|
||||||
import { PrimaryButton, PrimaryOutlinedButton } from '../../components/common/Buttons/Buttons';
|
|
||||||
|
|
||||||
const SHEETS = [
|
const SHEETS = [
|
||||||
{ value: 'MAIN', label: 'Общий свод' },
|
{ value: 'MAIN', label: 'Общий свод' },
|
||||||
@ -376,15 +375,15 @@ export default function SvodPage() {
|
|||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
{sheet === 'FORM_3' ? (
|
{sheet === 'FORM_3' ? (
|
||||||
<PrimaryButton variant='contained' onClick={openFilteredProjects} sx={{ ml: 'auto', height: '2.5rem', flexShrink: 0 }}>
|
<Button variant='contained' onClick={openFilteredProjects} sx={{ ml: 'auto', height: '2.5rem', flexShrink: 0 }}>
|
||||||
Перейти к проектам
|
Перейти к проектам
|
||||||
</PrimaryButton>
|
</Button>
|
||||||
) : (
|
) : (
|
||||||
<PrimaryButton variant='contained' onClick={openFilteredTasks} sx={{ ml: 'auto', height: '2.5rem', flexShrink: 0 }}>
|
<Button variant='contained' onClick={openFilteredTasks} sx={{ ml: 'auto', height: '2.5rem', flexShrink: 0 }}>
|
||||||
Перейти к задачам
|
Перейти к задачам
|
||||||
</PrimaryButton>
|
</Button>
|
||||||
)}
|
)}
|
||||||
<PrimaryOutlinedButton
|
<Button
|
||||||
variant='outlined'
|
variant='outlined'
|
||||||
color='default'
|
color='default'
|
||||||
startIcon={<RefreshRoundedIcon />}
|
startIcon={<RefreshRoundedIcon />}
|
||||||
@ -392,7 +391,7 @@ export default function SvodPage() {
|
|||||||
onClick={refreshSummary}
|
onClick={refreshSummary}
|
||||||
sx={{ height: '2.5rem', flexShrink: 0 }}>
|
sx={{ height: '2.5rem', flexShrink: 0 }}>
|
||||||
Обновить
|
Обновить
|
||||||
</PrimaryOutlinedButton>
|
</Button>
|
||||||
</SvodFilters>
|
</SvodFilters>
|
||||||
</Paper>
|
</Paper>
|
||||||
{error ? (
|
{error ? (
|
||||||
|
|||||||
@ -6,8 +6,7 @@ import { SspApi } from '../../api/ssp';
|
|||||||
import { TasksApi } from '../../api/tasks';
|
import { TasksApi } from '../../api/tasks';
|
||||||
import { useAuth } from '../../app/context/AuthProvider';
|
import { useAuth } from '../../app/context/AuthProvider';
|
||||||
import { HeaderSwitch } from '../../components/HeaderMenu/HeaderSwitch';
|
import { HeaderSwitch } from '../../components/HeaderMenu/HeaderSwitch';
|
||||||
import { PrimaryButton } from '../../components/common/Buttons/Buttons';
|
import { PrimaryButton, PrimaryOutlinedButton } from '../../components/common/Buttons/Buttons';
|
||||||
import { ResetFiltersButton } from '../../components/common/Buttons/ButtonsActions';
|
|
||||||
import Modal from '../../components/common/Modal/Modal';
|
import Modal from '../../components/common/Modal/Modal';
|
||||||
import { OrgUnitsAutocompletePaper } from '../../components/common/OrgUnitsAutocompletePaper/OrgUnitsAutocompletePaper';
|
import { OrgUnitsAutocompletePaper } from '../../components/common/OrgUnitsAutocompletePaper/OrgUnitsAutocompletePaper';
|
||||||
import { renderOrgUnitValue } from '../../components/common/OrgUnitsAutocompletePaper/renderOrgUnitValue';
|
import { renderOrgUnitValue } from '../../components/common/OrgUnitsAutocompletePaper/renderOrgUnitValue';
|
||||||
@ -310,7 +309,9 @@ export default function TasksPage() {
|
|||||||
sx={{ width: 480, maxWidth: '100%' }}
|
sx={{ width: 480, maxWidth: '100%' }}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<ResetFiltersButton onClick={handleClearFilters} />
|
<PrimaryOutlinedButton onClick={handleClearFilters} sx={{ height: '2.5rem' }}>
|
||||||
|
Сбросить
|
||||||
|
</PrimaryOutlinedButton>
|
||||||
</Box>
|
</Box>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user