Merge branch 'samandar' into 'dev'
filter See merge request azizziy/cpost!24
This commit is contained in:
@@ -5,7 +5,7 @@ import omit from 'lodash.omit';
|
|||||||
|
|
||||||
export const customer_requests = {
|
export const customer_requests = {
|
||||||
async getAll(params?: {
|
async getAll(params?: {
|
||||||
cargoId?: string;
|
clientName?: string;
|
||||||
aviaCargoId?: string;
|
aviaCargoId?: string;
|
||||||
autoCargoId?: string;
|
autoCargoId?: string;
|
||||||
page?: number;
|
page?: number;
|
||||||
|
|||||||
@@ -1,28 +1,25 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import ActionPopMenu from '@/components/common/ActionPopMenu';
|
import ActionPopMenu from '@/components/common/ActionPopMenu';
|
||||||
import { MyTable, ColumnData } from '@/components/common/MyTable';
|
import { ColumnData, MyTable } from '@/components/common/MyTable';
|
||||||
import StatusChangePopup from '@/components/common/StatusChangePopup';
|
import StatusChangePopup from '@/components/common/StatusChangePopup';
|
||||||
import BaseButton from '@/components/ui-kit/BaseButton';
|
import BaseButton from '@/components/ui-kit/BaseButton';
|
||||||
import BaseIconButton from '@/components/ui-kit/BaseIconButton';
|
|
||||||
import BaseInput from '@/components/ui-kit/BaseInput';
|
import BaseInput from '@/components/ui-kit/BaseInput';
|
||||||
import BasePagination from '@/components/ui-kit/BasePagination';
|
import BasePagination from '@/components/ui-kit/BasePagination';
|
||||||
import { useAuthContext } from '@/context/auth-context';
|
import { useAuthContext } from '@/context/auth-context';
|
||||||
import { BoxStatus, BoxStatusList, IBox } from '@/data/box/box.model';
|
import { BoxStatus, BoxStatusList, IBox } from '@/data/box/box.model';
|
||||||
import { box_requests } from '@/data/box/box.requests';
|
import { box_requests } from '@/data/box/box.requests';
|
||||||
import { DEFAULT_PAGE_SIZE, pageLinks } from '@/helpers/constants';
|
import { DEFAULT_PAGE_SIZE, pageLinks } from '@/helpers/constants';
|
||||||
import useDebouncedInput from '@/hooks/useDebouncedInput';
|
|
||||||
import useInput from '@/hooks/useInput';
|
import useInput from '@/hooks/useInput';
|
||||||
import { useMyNavigation } from '@/hooks/useMyNavigation';
|
import { useMyNavigation } from '@/hooks/useMyNavigation';
|
||||||
import { useMyTranslation } from '@/hooks/useMyTranslation';
|
import { useMyTranslation } from '@/hooks/useMyTranslation';
|
||||||
import useRequest from '@/hooks/useRequest';
|
import useRequest from '@/hooks/useRequest';
|
||||||
import { file_service } from '@/services/file-service';
|
import { file_service } from '@/services/file-service';
|
||||||
import { notifyUnknownError } from '@/services/notification';
|
import { notifyUnknownError } from '@/services/notification';
|
||||||
import { getBoxStatusStyles, getStatusColor } from '@/theme/getStatusBoxStyles';
|
import { getStatusColor } from '@/theme/getStatusBoxStyles';
|
||||||
import { Add, AddCircleOutline, Circle, Delete, Download, Edit, FilterList, FilterListOff, Search, PlusOne } from '@mui/icons-material';
|
import { Add, Circle, Delete, Download, Edit, FilterList, FilterListOff, Search } from '@mui/icons-material';
|
||||||
import { Box, Button, Stack, Tooltip, Typography } from '@mui/material';
|
import { Box, Button, Stack, Typography } from '@mui/material';
|
||||||
import { useRouter } from 'next/navigation';
|
import { useEffect, useMemo, useState } from 'react';
|
||||||
import React, { useEffect, useMemo, useState } from 'react';
|
|
||||||
|
|
||||||
type Props = {};
|
type Props = {};
|
||||||
|
|
||||||
@@ -162,9 +159,11 @@ const DashboardBoxesPage = (props: Props) => {
|
|||||||
label: "Qo'shish",
|
label: "Qo'shish",
|
||||||
width: 120,
|
width: 120,
|
||||||
renderCell: data => {
|
renderCell: data => {
|
||||||
return <Button onClick={() => navigation.push(pageLinks.dashboard.boxes.edit(data.id))}>
|
return (
|
||||||
|
<Button onClick={() => navigation.push(pageLinks.dashboard.boxes.edit(data.id))}>
|
||||||
<Add />
|
<Add />
|
||||||
</Button>;
|
</Button>
|
||||||
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -179,7 +178,7 @@ const DashboardBoxesPage = (props: Props) => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataKey: 'packetNetWeight',
|
dataKey: 'packetNetWeight',
|
||||||
label: t("weight"),
|
label: t('weight'),
|
||||||
width: 120,
|
width: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -189,7 +188,7 @@ const DashboardBoxesPage = (props: Props) => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataKey: 'totalNetWeight',
|
dataKey: 'totalNetWeight',
|
||||||
label: t("party_weight"),
|
label: t('party_weight'),
|
||||||
width: 120,
|
width: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,17 +1,14 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import ActionPopMenu from '@/components/common/ActionPopMenu';
|
import ActionPopMenu from '@/components/common/ActionPopMenu';
|
||||||
import { MyTable, ColumnData } from '@/components/common/MyTable';
|
import { ColumnData, MyTable } from '@/components/common/MyTable';
|
||||||
import BaseButton from '@/components/ui-kit/BaseButton';
|
import BaseButton from '@/components/ui-kit/BaseButton';
|
||||||
import BaseIconButton from '@/components/ui-kit/BaseIconButton';
|
|
||||||
import BaseInput from '@/components/ui-kit/BaseInput';
|
import BaseInput from '@/components/ui-kit/BaseInput';
|
||||||
import BasePagination from '@/components/ui-kit/BasePagination';
|
import BasePagination from '@/components/ui-kit/BasePagination';
|
||||||
import { useAuthContext } from '@/context/auth-context';
|
import { useAuthContext } from '@/context/auth-context';
|
||||||
import { Customer } from '@/data/customers/customer.model';
|
import { Customer } from '@/data/customers/customer.model';
|
||||||
import { customer_requests } from '@/data/customers/customer.requests';
|
import { customer_requests } from '@/data/customers/customer.requests';
|
||||||
import { Party } from '@/data/party/party.model';
|
import { DEFAULT_PAGE_SIZE } from '@/helpers/constants';
|
||||||
import { party_requests } from '@/data/party/party.requests';
|
|
||||||
import { DEFAULT_PAGE_SIZE, pageLinks } from '@/helpers/constants';
|
|
||||||
import useInput from '@/hooks/useInput';
|
import useInput from '@/hooks/useInput';
|
||||||
import { useMyTranslation } from '@/hooks/useMyTranslation';
|
import { useMyTranslation } from '@/hooks/useMyTranslation';
|
||||||
import useRequest from '@/hooks/useRequest';
|
import useRequest from '@/hooks/useRequest';
|
||||||
@@ -20,9 +17,9 @@ import CreateClientModal from '@/routes/private/clients/CreateClientModal';
|
|||||||
import EditClientModal from '@/routes/private/clients/EditClientModal';
|
import EditClientModal from '@/routes/private/clients/EditClientModal';
|
||||||
import { file_service } from '@/services/file-service';
|
import { file_service } from '@/services/file-service';
|
||||||
import { notifyUnknownError } from '@/services/notification';
|
import { notifyUnknownError } from '@/services/notification';
|
||||||
import { Add, AddCircleOutline, Circle, Delete, Edit, FilterList, FilterListOff, Search } from '@mui/icons-material';
|
import { Add, Delete, Edit, FilterListOff, Search } from '@mui/icons-material';
|
||||||
import { Box, Stack, SvgIcon, Tooltip, Typography } from '@mui/material';
|
import { Box, Stack, Typography } from '@mui/material';
|
||||||
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
import { useCallback, useEffect, useMemo, useState } from 'react';
|
||||||
|
|
||||||
type Props = {};
|
type Props = {};
|
||||||
|
|
||||||
@@ -45,7 +42,7 @@ const DashboardClientsPage = (props: Props) => {
|
|||||||
() =>
|
() =>
|
||||||
customer_requests.getAll({
|
customer_requests.getAll({
|
||||||
page: page,
|
page: page,
|
||||||
cargoId: keyword,
|
clientName: keyword,
|
||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
selectData(data) {
|
selectData(data) {
|
||||||
@@ -341,7 +338,7 @@ const DashboardClientsPage = (props: Props) => {
|
|||||||
}}
|
}}
|
||||||
value={keyword}
|
value={keyword}
|
||||||
onChange={handleKeyword}
|
onChange={handleKeyword}
|
||||||
placeholder={"Kargo ID"}
|
placeholder={'Kargo ID'}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<BaseButton colorVariant='gray' startIcon={<FilterListOff />} size='small' onClick={resetFilter}>
|
<BaseButton colorVariant='gray' startIcon={<FilterListOff />} size='small' onClick={resetFilter}>
|
||||||
|
|||||||
Reference in New Issue
Block a user