diff --git a/src/components/CreateProject/ProjectTotalFee.tsx b/src/components/CreateProject/ProjectTotalFee.tsx index edc7a71..383c35b 100644 --- a/src/components/CreateProject/ProjectTotalFee.tsx +++ b/src/components/CreateProject/ProjectTotalFee.tsx @@ -39,12 +39,17 @@ const ProjectTotalFee: React.FC = ({ taskGroups }) => { })} - {t("Project Total Fee")} + {t("Sum of Payment Milestone Fee")} {moneyFormatter.format(projectTotal)} + + + {t("Expected Total Fee")} + {moneyFormatter.format(expectedTotalFee)} + {projectTotal !== expectedTotalFee && ( - {t("Project total fee should be same as the expected total fee!")} + {t("Sum of Payment Milestone Fee should be same as the expected total fee!")} )} diff --git a/src/components/InvoiceSearch/InvoiceSearch.tsx b/src/components/InvoiceSearch/InvoiceSearch.tsx index 2f337f0..0d84636 100644 --- a/src/components/InvoiceSearch/InvoiceSearch.tsx +++ b/src/components/InvoiceSearch/InvoiceSearch.tsx @@ -526,6 +526,7 @@ const InvoiceSearch: React.FC = ({ issuedInvoice, receivedInvoice, invoic items={filteredIvoices} columns={combinedColumns} + autoRedirectToFirstPage /> } {/* { diff --git a/src/components/ProjectSearch/ProjectSearch.tsx b/src/components/ProjectSearch/ProjectSearch.tsx index bedce36..2fee69e 100644 --- a/src/components/ProjectSearch/ProjectSearch.tsx +++ b/src/components/ProjectSearch/ProjectSearch.tsx @@ -34,7 +34,7 @@ const ProjectSearch: React.FC = ({ projects, projectCategories, abilities label: t("Client name"), paramName: "client", type: "autocomplete", - options: uniqBy(projects.map((project) => ({value: project.client, label: project.client})), "value"), + options: uniqBy(projects.map((project) => ({value: project.client, label: project.client})), "value").sort((a, b) => a.value >= b.value ? 1 : -1), }, { label: t("Project category"), diff --git a/src/components/SearchResults/SearchResults.tsx b/src/components/SearchResults/SearchResults.tsx index 4d7fd4c..1a57060 100644 --- a/src/components/SearchResults/SearchResults.tsx +++ b/src/components/SearchResults/SearchResults.tsx @@ -43,6 +43,7 @@ interface Props { items: T[]; columns: Column[]; noWrapper?: boolean; + autoRedirectToFirstPage?: boolean; } function isActionColumn( @@ -55,6 +56,7 @@ function SearchResults({ items, columns, noWrapper, + autoRedirectToFirstPage, }: Props) { const [page, setPage] = React.useState(0); const [rowsPerPage, setRowsPerPage] = React.useState(10); @@ -63,7 +65,7 @@ function SearchResults({ // When filtering the seraching critera, update the page to 0 // Please removce when the search Result has error useEffect(() => { - setPage(0); + if (autoRedirectToFirstPage === true) setPage(0); }, [items]); const handleChangePage: TablePaginationProps["onPageChange"] = (