Conversation
…nto Edit/TicketMOdel
…admin_ui into Edit/TicketMOdel
|
Feature
|
| {days < 0 && ( | ||
| <> | ||
| <AccessTimeIcon fontSize='small' color='success' /> | ||
| <Typography>{-1 * days} days left</Typography> |
There was a problem hiding this comment.
No need of multiplying it with -1 as its unnecessary. just -{days} days left should be fine
There was a problem hiding this comment.
here I am doing negative number convert into +ve
| @@ -0,0 +1,5 @@ | |||
| import { Overdue } from './components/Overduetime'; | |||
|
|
|||
| export const TicketAsTime = () => { | |||
There was a problem hiding this comment.
Why to create extra component if there are no extra changes done here? We can just use the Overdue component directly wherever required
| const [errorDepartment, setErrorDepartment] = useState<boolean>(false); | ||
| const { data: categoriesList, isLoading: listFetching } = | ||
| useCategories(departmentId); | ||
| const categoryOptions = useMemo(() => { |
There was a problem hiding this comment.
Add empty lines between hooks.
If we just don't need the raw categoriesList anywhere instead of manipulating it here inside useMemo you can convert it in your required format inside the useQuery hook itself using the 'select' option
There was a problem hiding this comment.
select give always manipulated data but this list data use different-different place with deifferent structure
like when it show in drop down [{value:"",lable:""}],
when it use to show category tabel required as it is as we fetch.
| assigned: 400, | ||
| inprogress: 122, | ||
| closed: 220, | ||
| resolved: 223, |
There was a problem hiding this comment.
Remove the dummy data now if not required
| return ( | ||
| <> | ||
| <PieChartDepartment | ||
| data1={data1} |
There was a problem hiding this comment.
Is the data not available for this chart?
No description provided.