Skip to content

Commit

Permalink
fix:workorder overflow issue
Browse files Browse the repository at this point in the history
  • Loading branch information
zjy365 committed Oct 17, 2024
1 parent 3c67bd1 commit 46f46f6
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ const AppBaseInfo = ({ app }: { app: WorkOrderDB }) => {
</Icon>
<Text>{t('Description')}</Text>
</Flex>
<Flex mt="12px" p={'16px'} borderRadius={'4px'} bg="#F8FAFB">
<Text color={'#24282C'}>{app?.description} </Text>
<Flex mt="12px" p={'16px'} borderRadius={'4px'} bg="#F8FAFB" overflow={'hidden'}>
<Text color={'#24282C'}>{app?.description}</Text>
</Flex>
</Box>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ export default function OrderDetail({ orderId }: { orderId: string }) {
border={'1px solid #DEE0E2'}
borderRadius={'md'}
flexDirection={'column'}
overflow={'hidden'}
>
{workOrderDetail && workOrderDetail.dialogs?.length ? (
<AppMainInfo
Expand Down
19 changes: 15 additions & 4 deletions frontend/providers/workorder/src/pages/workorders/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,12 @@ function Home() {
const { Loading } = useLoading();
const { t } = useTranslation();
const [initialized, setInitialized] = useState(false);
const [page, setPage] = useState(1);
const [pageSize, setPageSize] = useState(10);
const router = useRouter();
const [page, setPage] = useState(() => {
const queryPage = Number(router.query.page);
return !isNaN(queryPage) && queryPage > 0 ? queryPage : 1;
});
const [pageSize, setPageSize] = useState(10);
const [orderStatus, setOrderStatus] = useState<WorkOrderStatus>(
(router.query?.status as WorkOrderStatus) || WorkOrderStatus.All
);
Expand Down Expand Up @@ -169,9 +172,17 @@ function Home() {
{!!data?.totalCount && (
<Pagination
totalItems={data?.totalCount || 0}
itemsPerPage={10}
itemsPerPage={pageSize}
currentPage={page}
setCurrentPage={setPage}
setCurrentPage={(page) => {
router.push({
query: {
...router.query,
page: page.toString()
}
});
setPage(page);
}}
/>
)}
</Flex>
Expand Down

0 comments on commit 46f46f6

Please sign in to comment.