исправила цвета, сделала поярче breadcrumbs и исправила поиск в этапах
This commit is contained in:
parent
357dc9efaa
commit
f87098f11e
@ -322,15 +322,15 @@ export const config = {
|
||||
accessorKey: "data.q2.base_correction_comment",
|
||||
},
|
||||
"data.q2.revision_inc": {
|
||||
color_type: redColumn,
|
||||
color_type: yellowColumn,
|
||||
accessorKey: "data.q2.revision_inc",
|
||||
},
|
||||
"data.q2.revision_seq": {
|
||||
color_type: redColumn,
|
||||
color_type: yellowColumn,
|
||||
accessorKey: "data.q2.revision_seq",
|
||||
},
|
||||
"data.q2.revision_comment": {
|
||||
color_type: redColumn,
|
||||
color_type: yellowColumn,
|
||||
accessorKey: "data.q2.revision_comment",
|
||||
},
|
||||
"data.q2.new_plan": {
|
||||
@ -454,15 +454,15 @@ export const config = {
|
||||
accessorKey: "data.q3.base_correction_comment",
|
||||
},
|
||||
"data.q3.revision_inc": {
|
||||
color_type: redColumn,
|
||||
color_type: yellowColumn,
|
||||
accessorKey: "data.q3.revision_inc",
|
||||
},
|
||||
"data.q3.revision_seq": {
|
||||
color_type: redColumn,
|
||||
color_type: yellowColumn,
|
||||
accessorKey: "data.q3.revision_seq",
|
||||
},
|
||||
"data.q3.revision_comment": {
|
||||
color_type: redColumn,
|
||||
color_type: yellowColumn,
|
||||
accessorKey: "data.q3.revision_comment",
|
||||
},
|
||||
"data.q3.new_plan": {
|
||||
@ -578,15 +578,15 @@ export const config = {
|
||||
accessorKey: "data.q4.base_correction_comment",
|
||||
},
|
||||
"data.q4.revision_inc": {
|
||||
color_type: redColumn,
|
||||
color_type: yellowColumn,
|
||||
accessorKey: "data.q4.revision_inc",
|
||||
},
|
||||
"data.q4.revision_seq": {
|
||||
color_type: redColumn,
|
||||
color_type: yellowColumn,
|
||||
accessorKey: "data.q4.revision_seq",
|
||||
},
|
||||
"data.q4.revision_comment": {
|
||||
color_type: redColumn,
|
||||
color_type: yellowColumn,
|
||||
accessorKey: "data.q4.revision_comment",
|
||||
},
|
||||
"data.q4.new_plan": {
|
||||
@ -650,7 +650,7 @@ export const config = {
|
||||
accessorKey: "data.q4.actual_m3",
|
||||
},
|
||||
"data.q4.actual_spod": {
|
||||
color_type: whiteColumn,
|
||||
color_type: greenColumn,
|
||||
accessorKey: "data.q4.actual_spod",
|
||||
},
|
||||
"data.q4.actual_quarter": {
|
||||
|
||||
@ -322,15 +322,15 @@ export const config = {
|
||||
accessorKey: "data.q2.base_correction_comment",
|
||||
},
|
||||
"data.q2.revision_inc": {
|
||||
color_type: redColumn,
|
||||
color_type: yellowColumn,
|
||||
accessorKey: "data.q2.revision_inc",
|
||||
},
|
||||
"data.q2.revision_seq": {
|
||||
color_type: redColumn,
|
||||
color_type: yellowColumn,
|
||||
accessorKey: "data.q2.revision_seq",
|
||||
},
|
||||
"data.q2.revision_comment": {
|
||||
color_type: redColumn,
|
||||
color_type: yellowColumn,
|
||||
accessorKey: "data.q2.revision_comment",
|
||||
},
|
||||
"data.q2.new_plan": {
|
||||
@ -454,15 +454,15 @@ export const config = {
|
||||
accessorKey: "data.q3.base_correction_comment",
|
||||
},
|
||||
"data.q3.revision_inc": {
|
||||
color_type: redColumn,
|
||||
color_type: yellowColumn,
|
||||
accessorKey: "data.q3.revision_inc",
|
||||
},
|
||||
"data.q3.revision_seq": {
|
||||
color_type: redColumn,
|
||||
color_type: yellowColumn,
|
||||
accessorKey: "data.q3.revision_seq",
|
||||
},
|
||||
"data.q3.revision_comment": {
|
||||
color_type: redColumn,
|
||||
color_type: yellowColumn,
|
||||
accessorKey: "data.q3.revision_comment",
|
||||
},
|
||||
"data.q3.new_plan": {
|
||||
@ -578,15 +578,15 @@ export const config = {
|
||||
accessorKey: "data.q4.base_correction_comment",
|
||||
},
|
||||
"data.q4.revision_inc": {
|
||||
color_type: redColumn,
|
||||
color_type: yellowColumn,
|
||||
accessorKey: "data.q4.revision_inc",
|
||||
},
|
||||
"data.q4.revision_seq": {
|
||||
color_type: redColumn,
|
||||
color_type: yellowColumn,
|
||||
accessorKey: "data.q4.revision_seq",
|
||||
},
|
||||
"data.q4.revision_comment": {
|
||||
color_type: redColumn,
|
||||
color_type: yellowColumn,
|
||||
accessorKey: "data.q4.revision_comment",
|
||||
},
|
||||
"data.q4.new_plan": {
|
||||
|
||||
@ -19,7 +19,14 @@ const TaskBreadcrumbs = ({ task, taskId, sheetName, isProject = false, year }) =
|
||||
const taskLabel = isProject ? projectLabel : getTaskLabel(task) || `Задача №${taskId}`;
|
||||
const currentSheetLabel = isProject && /^\d{4}$/.test(String(year)) ? `${sheetName} · ${year}` : sheetName;
|
||||
return (
|
||||
<Breadcrumbs aria-label={isProject ? 'Навигация по проекту' : 'Навигация по задаче'} sx={{ fontSize: '0.875rem', '& .MuiBreadcrumbs-ol': { rowGap: '0.25rem' } }}>
|
||||
<Breadcrumbs
|
||||
aria-label={isProject ? 'Навигация по проекту' : 'Навигация по задаче'}
|
||||
sx={{
|
||||
fontSize: '0.875rem',
|
||||
'& .MuiBreadcrumbs-ol': { rowGap: '0.25rem' },
|
||||
'& .MuiLink-root, & .MuiTypography-root': { fontWeight: 600 },
|
||||
}}
|
||||
>
|
||||
<Link component={RouterLink} to={getListReturnUrl(isProject ? 'projects' : 'tasks', taskId)} color='inherit' underline='hover'>{isProject ? 'Проекты' : 'Задачи'}</Link>
|
||||
{sheetName ? (
|
||||
<Link component={RouterLink} to={`/${isProject ? 'project' : 'task'}/${taskId}`} color='inherit' underline='hover'>{taskLabel}</Link>
|
||||
|
||||
@ -8,7 +8,7 @@ export default function PhaseTemplatesFilters({ filters, sheets, changeFilter, l
|
||||
<Box sx={{ display: 'flex', gap: 2, flexWrap: 'wrap' }}>
|
||||
<TextField
|
||||
size='small'
|
||||
label='Поиск по названию или колонкам'
|
||||
label='Поиск по названию этапа'
|
||||
value={filters.search}
|
||||
onChange={(e) => changeFilter('search', e.target.value)}
|
||||
sx={{ minWidth: 270, flex: 1 }}
|
||||
|
||||
@ -50,17 +50,19 @@ export function usePhaseTemplates(isAdmin) {
|
||||
}, [isAdmin, load]);
|
||||
|
||||
const filteredRows = useMemo(
|
||||
() =>
|
||||
rows
|
||||
() => {
|
||||
const search = filters.search.trim().toLocaleLowerCase('ru-RU');
|
||||
|
||||
return rows
|
||||
.filter((row) => {
|
||||
if (filters.form_type && row.form_type !== filters.form_type) return false;
|
||||
if (filters.sheet && row.sheet !== filters.sheet) return false;
|
||||
if (filters.role && row.role !== filters.role) return false;
|
||||
if (filters.direction && (row.direction || 'none') !== filters.direction) return false;
|
||||
const text = [row.phase_code, ...(row.column_keys || [])].join(' ').toLocaleLowerCase('ru');
|
||||
return text.includes(filters.search.trim().toLocaleLowerCase('ru'));
|
||||
return String(row.phase_code || '').toLocaleLowerCase('ru-RU').includes(search);
|
||||
})
|
||||
.sort((a, b) => templateKey(a).localeCompare(templateKey(b), 'ru')),
|
||||
.sort((a, b) => templateKey(a).localeCompare(templateKey(b), 'ru'));
|
||||
},
|
||||
[rows, filters],
|
||||
);
|
||||
const sheets = [
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user