This commit is contained in:
a.bouhuolia
2021-08-06 10:12:53 +02:00
6 changed files with 25 additions and 15 deletions

View File

@@ -38,9 +38,6 @@ export function ItemsMultiSelect({
[isItemSelected],
);
// Count selected items.
const countSelected = localSelected.length;
// Handle item selected.
const handleItemSelect = useCallback(
({ id }) => {
@@ -77,13 +74,16 @@ export function ItemsMultiSelect({
[],
);
// Count selected items.
const countSelected = itemsSelected().length;
// Clear Button
const clearButton =
countSelected > 0 ? (
<Button
icon="cross"
minimal={true}
onClick={() => setLocalSelected([])}
// onClick={() => setLocalSelected([])}
/>
) : undefined;
@@ -98,9 +98,12 @@ export function ItemsMultiSelect({
items={items}
noResults={<MenuItem disabled={true} text={<T id={'No items'} />} />}
itemRenderer={itemRenderer}
popoverProps={{ minimal: true }}
popoverProps={{
minimal: true,
usePortal: false,
targetTagName: 'div ',
}}
selectedItems={itemsSelected()}
filterable={true}
fill={true}
onItemSelect={handleItemSelect}
itemPredicate={filterItemsPredicater}

View File

@@ -11,11 +11,7 @@ function Search({
openGlobalSearch,
closeGlobalSearch,
}) {
const items = [
{ title: 'The Shawshank Redemption', year: 1994 },
{ title: 'The Godfather', year: 1972 },
{ title: 'The Godfather: Part II', year: 1974 },
];
const items = [];
const renderSearch = (search, { handleClick }) => (
<MenuItem

View File

@@ -4,6 +4,7 @@ import { Formik, Form } from 'formik';
import { FormattedMessage as T } from 'components';
import { Button, Classes } from '@blueprintjs/core';
import { Intent } from '@blueprintjs/core';
import intl from 'react-intl-universal';
import 'style/pages/ReferenceNumber/ReferenceNumber.scss';
@@ -54,7 +55,9 @@ export default function ReferenceNumberForm({
<Form className={'reference-number-form'}>
<div className={Classes.DIALOG_BODY}>
<p className="paragraph">
Your invoice numbers are set on auto-increment mod. Are you sure changing this setting?
{intl.get(
'your_invoice_numbers_are_set_on_auto_increment_mod_are_you_sure_changing_this_setting',
)}
</p>
<ReferenceNumberFormContent />
</div>

View File

@@ -17,7 +17,7 @@ export default function ReferenceNumberFormContent() {
<FastField name={'incrementMode'}>
{({ form, field, meta: { error, touched } }) => (
<Radio
label="Auto-incrementing invoice number."
label={<T id={'auto_incrementing_number'} />}
value="auto-increment"
onChange={() => {
form.setFieldValue('incrementMode', 'auto');

View File

@@ -1194,5 +1194,9 @@
"Reports": "التقارير",
"New tasks": "مهام جديدة",
"sorry_about_that_something_went_wrong": "نتأسف بشأن ذلك! هناك خطأ ما",
"if_the_problem_stuck_please_contact_us_as_soon_as_possible": "إذا تكررت المشكلة اكتر من مرة ، الرجاء الاتصال بنا في أقرب وقت ممكن."
"if_the_problem_stuck_please_contact_us_as_soon_as_possible": "إذا تكررت المشكلة اكتر من مرة ، الرجاء الاتصال بنا في أقرب وقت ممكن.",
"non-inventory":"غير مخزون",
"terms_conditions":"الشروط والأحكام",
"your_invoice_numbers_are_set_on_auto_increment_mod_are_you_sure_changing_this_setting":"Your invoice numbers are set on auto-increment mod. Are you sure changing this setting?",
"auto_incrementing_number":"Auto-incrementing number"
}

View File

@@ -1181,5 +1181,9 @@
"Reports": "Reports",
"New tasks": "New tasks",
"sorry_about_that_something_went_wrong": "Sorry about that! Something went wrong",
"if_the_problem_stuck_please_contact_us_as_soon_as_possible": "If the problem stuck, please contact us as soon as possible."
"if_the_problem_stuck_please_contact_us_as_soon_as_possible": "If the problem stuck, please contact us as soon as possible.",
"non-inventory":"Non-Inventory",
"terms_conditions":"Terms conditions",
"your_invoice_numbers_are_set_on_auto_increment_mod_are_you_sure_changing_this_setting":"Your invoice numbers are set on auto-increment mod. Are you sure changing this setting?",
"auto_incrementing_number":"Auto-incrementing number"
}