mirror of
https://github.com/bakhirev/assayo.git
synced 2025-02-22 21:12:19 +00:00
update
This commit is contained in:
parent
04cf07c913
commit
9787d34c90
File diff suppressed because one or more lines are too long
|
@ -48,7 +48,7 @@ export function getOption(value: any, index: number): IOption {
|
||||||
return {
|
return {
|
||||||
id: getId(value, index),
|
id: getId(value, index),
|
||||||
title,
|
title,
|
||||||
_textForSearch: title?.toLowerCase() || '',
|
_textForSearch: title?.toLowerCase ? title?.toLowerCase() : '',
|
||||||
source: value,
|
source: value,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*/
|
*/
|
||||||
export function getGithubPrInfo(text: string) {
|
export function getGithubPrInfo(text: string) {
|
||||||
const json = (text || '')
|
const json = (text || '')
|
||||||
.replace(/["']+/gim, '')
|
.replace(/["'\r\n]+/gim, '')
|
||||||
.replace('#', '#": "')
|
.replace('#', '#": "')
|
||||||
.replace(' in ', '", "in": "')
|
.replace(' in ', '", "in": "')
|
||||||
.replace(' from ', '", "from": "')
|
.replace(' from ', '", "from": "')
|
||||||
|
|
|
@ -34,7 +34,7 @@ const Department = observer(({
|
||||||
.filter((item: any) => item.totalDaysWorked > 10);
|
.filter((item: any) => item.totalDaysWorked > 10);
|
||||||
const options = Object.keys(byMonths).map((id: string) => ({ id }));
|
const options = Object.keys(byMonths).map((id: string) => ({ id }));
|
||||||
|
|
||||||
const [taskCode, setTaskCode] = useState(options[0].id);
|
const [taskCode, setTaskCode] = useState(options?.[0]?.id);
|
||||||
|
|
||||||
if (!content?.length) {
|
if (!content?.length) {
|
||||||
return <NothingFound />;
|
return <NothingFound />;
|
||||||
|
@ -56,32 +56,36 @@ const Department = observer(({
|
||||||
<Pagination />
|
<Pagination />
|
||||||
</DataLoader>
|
</DataLoader>
|
||||||
|
|
||||||
<Title title="page.team.department.months.title"/>
|
{taskCode ? (
|
||||||
<PageWrapper>
|
<>
|
||||||
<div className={style.table_filters}>
|
<Title title="page.team.department.months.title"/>
|
||||||
<SelectWithButtons
|
<PageWrapper>
|
||||||
title="page.team.tree.filters.author"
|
<div className={style.table_filters}>
|
||||||
value={taskCode}
|
<SelectWithButtons
|
||||||
className={style.table_filters_item}
|
title="page.team.tree.filters.author"
|
||||||
options={options}
|
value={taskCode}
|
||||||
onChange={(value: string) => {
|
className={style.table_filters_item}
|
||||||
console.log(value);
|
options={options}
|
||||||
setTaskCode(value);
|
onChange={(value: string) => {
|
||||||
}}
|
console.log(value);
|
||||||
/>
|
setTaskCode(value);
|
||||||
</div>
|
}}
|
||||||
</PageWrapper>
|
/>
|
||||||
<DataLoader
|
</div>
|
||||||
to="response"
|
</PageWrapper>
|
||||||
loader={(pagination?: IPaginationRequest, sort?: ISort[]) => getFakeLoader({
|
<DataLoader
|
||||||
content: byMonths[taskCode], pagination, sort, mode,
|
to="response"
|
||||||
})}
|
loader={(pagination?: IPaginationRequest, sort?: ISort[]) => getFakeLoader({
|
||||||
watch={taskCode}
|
content: byMonths[taskCode], pagination, sort, mode,
|
||||||
>
|
})}
|
||||||
<Months/>
|
watch={taskCode}
|
||||||
<Pagination />
|
>
|
||||||
</DataLoader>
|
<Months/>
|
||||||
<Description text={t('page.team.department.months.description')} />
|
<Pagination />
|
||||||
|
</DataLoader>
|
||||||
|
<Description text={t('page.team.department.months.description')} />
|
||||||
|
</>
|
||||||
|
) : null}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
|
@ -35,14 +35,14 @@ function Block({
|
||||||
title,
|
title,
|
||||||
recommendations,
|
recommendations,
|
||||||
}: BlockProps): React.ReactElement | null {
|
}: BlockProps): React.ReactElement | null {
|
||||||
const cards = recommendations.map((recommendation: any) => (
|
const cards = recommendations?.map((recommendation: any) => (
|
||||||
<CardForPrint
|
<CardForPrint
|
||||||
key={recommendation.description}
|
key={recommendation.description}
|
||||||
recommendation={recommendation}
|
recommendation={recommendation}
|
||||||
/>
|
/>
|
||||||
));
|
));
|
||||||
|
|
||||||
if (!cards.length) return null;
|
if (!cards?.length) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|
Loading…
Reference in a new issue