feat: Receivable aging summary front-end.

This commit is contained in:
Ahmed Bouhuolia
2020-06-14 14:19:18 +02:00
parent ac9c360629
commit f0c1985e43
45 changed files with 4150 additions and 538 deletions

View File

@@ -1,12 +1,16 @@
import React, { useState, useEffect } from 'react';
import {
Button,
MenuItem,
} from '@blueprintjs/core';
import { Select } from '@blueprintjs/select';
import { FormattedMessage as T } from 'react-intl';
export default function ListSelect ({
buttonProps,
defaultText,
noResultsText = (<T id="no_results" />),
isLoading = false,
labelProp,
selectedItem,
@@ -22,12 +26,17 @@ export default function ListSelect ({
}
}, [selectedItem, selectedItemProp, selectProps.items]);
const noResults = isLoading ?
('loading') : <MenuItem disabled={true} text={noResultsText} />;
return (
<Select
{...selectProps}
noResults={noResults}
>
<Button
text={currentItem ? currentItem[labelProp] : defaultText}
loading={isLoading}
{...buttonProps}
/>
</Select>