Skip to content

Commit 0219e1c

Browse files
committed
skip test tags on table generation
1 parent d27ddeb commit 0219e1c

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

HwProj.APIGateway/HwProj.APIGateway.API/TableGenerators/ExcelGenerator.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,13 @@ private static void AddHomeworksHeaders(ExcelWorksheet worksheet, CourseDTO cour
149149

150150
var title = course.Homeworks[i].Title;
151151
var publicationDate = course.Homeworks[i].PublicationDate;
152-
var tags = course.Homeworks[i].Tags.Where(t => !string.IsNullOrWhiteSpace(t)).ToList();
152+
var tags = course.Homeworks[i].Tags.Where(t => !string.IsNullOrWhiteSpace(t));
153153
var isTest = tags.Contains(HomeworkTags.Test);
154-
var tagsStr = $" ({tags.Select(GetTagLabel).Join(", ")})";
154+
var tagsToShow = tags.Where(t => t != HomeworkTags.Test).ToList();
155+
var tagsStr = $" ({tagsToShow.Select(GetTagLabel).Join(", ")})";
155156

156157
worksheet.Cells[position.Row, position.Column].Value
157-
= $"h/w {i + 1}: {title}, {publicationDate:dd.MM}{(tags.Count > 0 ? tagsStr : "")}";
158+
= $"h/w {i + 1}: {title}, {publicationDate:dd.MM}{(tagsToShow.Count > 0 ? tagsStr : "")}";
158159
worksheet.Cells[position.Row, position.Column, position.Row, position.Column + numberCellsToMerge - 1]
159160
.Merge = true;
160161
if (isTest)

hwproj.front/src/components/Solutions/ExportToYandex.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,15 +136,15 @@ const ExportToYandex: FC<ExportToYandexProps> = (props: ExportToYandexProps) =>
136136
Для загрузки таблицы необходимо пройти{" "}
137137
<Link href={yacRequestLink}>
138138
авторизацию
139-
</Link>.
139+
</Link>
140140
</Alert>
141141
}
142142
{isAuthorizationError &&
143143
<Alert severity="error" variant="standard">
144144
Авторизация не пройдена. Попробуйте{" "}
145145
<Link href={yacRequestLink}>
146146
еще раз
147-
</Link>.
147+
</Link>
148148
</Alert>
149149
}
150150
</Grid>

0 commit comments

Comments
 (0)