Skip to content

Commit

Permalink
Issue #PS-000 fix: Resolved lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
itsvick committed Aug 10, 2024
1 parent a79547a commit 790110d
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 19 deletions.
12 changes: 6 additions & 6 deletions src/components/KaTableComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import { firstLetterInUpperCase } from "@/utils/Helper";
interface KaTableComponentProps {
columns: ITableProps["columns"];
data?: ITableProps["data"];
offset?: any;
limit?: any;
offset?: number;
limit?: number;
PagesSelector?: any;
PageSizeSelector?: any;
pageSizes?: any;
Expand Down Expand Up @@ -108,19 +108,19 @@ const KaTableComponent: React.FC<KaTableComponentProps> = ({
/>
);
}
if (props.column.key === DataKey?.UPDATEDAT) {
if (props.column.key === DataKey?.UPDATED_AT) {
return format(
props.rowData?.updatedAt,
DateFormat.YYYY_MM_DD,
);
} else if (props.column.key === DataKey?.CREATEDAT) {
} else if (props.column.key === DataKey?.CREATED_AT) {
return format(
props.rowData?.createdAt,
DateFormat.YYYY_MM_DD,
);
} else if (props.column.key === DataKey.CREATEDBY) {
} else if (props.column.key === DataKey.CREATED_BY) {
return <UserNameCell userId={props.rowData?.createdBy} />;
} else if (props.column.key === DataKey.UPDATEDBY) {
} else if (props.column.key === DataKey.UPDATED_BY) {
return <UserNameCell userId={props.rowData?.updatedBy} />;
}
if (props.column.key === DataKey.STATUS) {
Expand Down
16 changes: 10 additions & 6 deletions src/components/PageSelector.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
import FormControl from "@mui/material/FormControl";
import InputLabel from "@mui/material/InputLabel";
import MenuItem from "@mui/material/MenuItem";
import Select from "@mui/material/Select";
import React from "react";
import Select, { SelectChangeEvent } from "@mui/material/Select";
import { useTranslation } from "next-i18next";
import React from "react";


export interface IPageSelectorProps {
handleChange: (event: SelectChangeEvent) => void;
pageSize: number;
options: number[];
}

const PageSizeSelector = ({ handleChange, pageSize, options }: any) => {
const [open, setOpen] = React.useState(false);
Expand All @@ -19,7 +26,7 @@ const PageSizeSelector = ({ handleChange, pageSize, options }: any) => {

return (
<FormControl sx={{ m: 1, minWidth: 120 }}>
<InputLabel id="page-size-selector-label">Page Size</InputLabel>
<InputLabel id="page-size-selector-label">{t("COMMON.PAGE_SIZE")}</InputLabel>
<Select
labelId="page-size-selector-label"
id="page-size-selector"
Expand All @@ -30,9 +37,6 @@ const PageSizeSelector = ({ handleChange, pageSize, options }: any) => {
label={t("COMMON.PAGE_SIZE")}
onChange={handleChange}
>
<MenuItem value="">
{/* <em>None</em> */}
</MenuItem>
{options?.map((option: any) => (
<MenuItem key={option} value={option}>
{option}
Expand Down
1 change: 1 addition & 0 deletions src/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ input[type="number"]::-webkit-outer-spin-button {
margin: 0;
appearance: none;
}

.rjsf-default-submit {
display: none !important;
}
Expand Down
14 changes: 7 additions & 7 deletions src/utils/app.constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ export enum RoleId {
STUDENT = "493c04e2-a9db-47f2-b304-503da358d5f4",
TEACHER = "3bde0028-6900-4900-9d05-eeb608843718",
TEAM_LEADER = "9dd9328f-1bc7-444f-96e3-c5e1daa3514a",
ADMIN = "ee482faf-8a41-45fe-9656-5533dd6a787c",
ADMIN = "ee482faf-8a41-45fe-9656-5533dd6a787c"
}

export enum DataKey {
UPDATEDAT = "updatedAt",
CREATEDAT = "createdAt",
UPDATED_AT = "updatedAt",
CREATED_AT = "createdAt",
ACTIONS = "actions",
CREATEDBY = "createdBy",
UPDATEDBY = "updatedBy",
CREATED_BY = "createdBy",
UPDATED_BY = "updatedBy",
STATUS = "status",
NAME = "name",
}
Expand All @@ -58,8 +58,8 @@ export enum DateFormat {
export enum Numbers {
ZERO = 0,
ONE = 1,
TEN = 10,
FIVE = 5
FIVE = 5,
TEN = 10
}

export enum CohortTypes {
Expand Down

0 comments on commit 790110d

Please sign in to comment.