mirror of
https://github.com/bakhirev/assayo.git
synced 2025-02-22 13:02:18 +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 {
|
||||
id: getId(value, index),
|
||||
title,
|
||||
_textForSearch: title?.toLowerCase() || '',
|
||||
_textForSearch: title?.toLowerCase ? title?.toLowerCase() : '',
|
||||
source: value,
|
||||
};
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*/
|
||||
export function getGithubPrInfo(text: string) {
|
||||
const json = (text || '')
|
||||
.replace(/["']+/gim, '')
|
||||
.replace(/["'\r\n]+/gim, '')
|
||||
.replace('#', '#": "')
|
||||
.replace(' in ', '", "in": "')
|
||||
.replace(' from ', '", "from": "')
|
||||
|
|
|
@ -34,7 +34,7 @@ const Department = observer(({
|
|||
.filter((item: any) => item.totalDaysWorked > 10);
|
||||
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) {
|
||||
return <NothingFound />;
|
||||
|
@ -56,32 +56,36 @@ const Department = observer(({
|
|||
<Pagination />
|
||||
</DataLoader>
|
||||
|
||||
<Title title="page.team.department.months.title"/>
|
||||
<PageWrapper>
|
||||
<div className={style.table_filters}>
|
||||
<SelectWithButtons
|
||||
title="page.team.tree.filters.author"
|
||||
value={taskCode}
|
||||
className={style.table_filters_item}
|
||||
options={options}
|
||||
onChange={(value: string) => {
|
||||
console.log(value);
|
||||
setTaskCode(value);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</PageWrapper>
|
||||
<DataLoader
|
||||
to="response"
|
||||
loader={(pagination?: IPaginationRequest, sort?: ISort[]) => getFakeLoader({
|
||||
content: byMonths[taskCode], pagination, sort, mode,
|
||||
})}
|
||||
watch={taskCode}
|
||||
>
|
||||
<Months/>
|
||||
<Pagination />
|
||||
</DataLoader>
|
||||
<Description text={t('page.team.department.months.description')} />
|
||||
{taskCode ? (
|
||||
<>
|
||||
<Title title="page.team.department.months.title"/>
|
||||
<PageWrapper>
|
||||
<div className={style.table_filters}>
|
||||
<SelectWithButtons
|
||||
title="page.team.tree.filters.author"
|
||||
value={taskCode}
|
||||
className={style.table_filters_item}
|
||||
options={options}
|
||||
onChange={(value: string) => {
|
||||
console.log(value);
|
||||
setTaskCode(value);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</PageWrapper>
|
||||
<DataLoader
|
||||
to="response"
|
||||
loader={(pagination?: IPaginationRequest, sort?: ISort[]) => getFakeLoader({
|
||||
content: byMonths[taskCode], pagination, sort, mode,
|
||||
})}
|
||||
watch={taskCode}
|
||||
>
|
||||
<Months/>
|
||||
<Pagination />
|
||||
</DataLoader>
|
||||
<Description text={t('page.team.department.months.description')} />
|
||||
</>
|
||||
) : null}
|
||||
</>
|
||||
);
|
||||
});
|
||||
|
|
|
@ -35,14 +35,14 @@ function Block({
|
|||
title,
|
||||
recommendations,
|
||||
}: BlockProps): React.ReactElement | null {
|
||||
const cards = recommendations.map((recommendation: any) => (
|
||||
const cards = recommendations?.map((recommendation: any) => (
|
||||
<CardForPrint
|
||||
key={recommendation.description}
|
||||
recommendation={recommendation}
|
||||
/>
|
||||
));
|
||||
|
||||
if (!cards.length) return null;
|
||||
if (!cards?.length) return null;
|
||||
|
||||
return (
|
||||
<>
|
||||
|
|
Loading…
Reference in a new issue