Skip to content

Commit

Permalink
feat: Align components in approval pages of Lead (#366)
Browse files Browse the repository at this point in the history
* Feat dark mode (#363)

* feat: change theme to dark mode

* fix: dashboard table dark mode

* feat-dark mode

* feat:dark mode

* fix: lead page in dark mode

---------

Co-authored-by: AidrinVargheseEXP <aidrin.varghese@experionglobal.com>

* Update Allocate.tsx (#365)

---------

Co-authored-by: Aidrin Varghese <aidrinv2001@gmail.com>
Co-authored-by: AidrinVargheseEXP <aidrin.varghese@experionglobal.com>
  • Loading branch information
3 people authored Jul 16, 2024
1 parent 1e6d6b8 commit 981b1e5
Show file tree
Hide file tree
Showing 22 changed files with 195 additions and 489 deletions.
2 changes: 1 addition & 1 deletion exam_frontend/src/ExamRoutes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import PendingRequestPage from "./pages/PendingRequest/PendingRequestPage";
const ExamRoutes = () => {
const { setAuthenticated } = useAuth();

useLayoutEffect(() => {
useEffect(() => {
const storedValue = localStorage.getItem("jwt");
if (storedValue) {
setAuthenticated(true);
Expand Down
17 changes: 13 additions & 4 deletions exam_frontend/src/components/AssetTable/AssetTableHandler.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,23 @@ import {
} from "./api/getAssetDetails";
import moment from "moment";

interface Props{
userRole?:string;
isRejectedPage?:boolean;
queryParamProp?:string;
heading?:string;
isMyApprovalPage?:boolean;
}


const AssetTableHandler = ({
userRole,
isRejectedPage,
queryParamProp,
heading,
isMyApprovalPage,
assets,
}) => {

}:Props) => {
const [selectedRow, setSelectedRow] = useState(null);
const [drawerVisible, setDrawerVisible] = useState(false);
const [sortedColumn, setSortedColumn] = useState<string>("");
Expand Down Expand Up @@ -67,7 +76,7 @@ const AssetTableHandler = ({
assetData?.results?.map((item: AssetResult) => item.status) || [];
const businessUnitOptions =
assetData?.results?.map(
(item: AssetResult) => item.business_unit.business_unit_name
(item: AssetResult) => item.business_unit?.business_unit_name
) || [];

const { data: locationResults } = useQuery({
Expand Down Expand Up @@ -760,7 +769,7 @@ const AssetTableHandler = ({
status: result.status,
location: result.location?.location_name,
invoice_location: result.invoice_location?.location_name,
business_unit: result.business_unit.business_unit_name,
business_unit: result.business_unit?.business_unit_name,
os: result.os,
os_version: result.os_version,
mobile_os: result.mobile_os,
Expand Down
2 changes: 1 addition & 1 deletion exam_frontend/src/components/AssetTable/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,6 @@ export interface AssetTableProps {
assetPageDataFetch: any;
isAssetDataLoading: any;
totalItemCount: any;
userRole: any;
userRole?: string;
isMyApprovalPage: any;
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const AssetTableHandler = ({

const businessUnitOptions =
assetData?.results?.map(
(item: AssetResult) => item.business_unit.business_unit_name
(item: AssetResult) => item.business_unit?.business_unit_name
) || [];

const { data: locationResults } = useQuery({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const DashboardAssetHandler = ({

const businessUnitOptions =
assetData?.results?.map(
(item: AssetResult) => item.business_unit.business_unit_name
(item: AssetResult) => item.business_unit?.business_unit_name
) || [];

const { data: locationResults } = useQuery({
Expand Down Expand Up @@ -825,7 +825,7 @@ const DashboardAssetHandler = ({
status: result.status,
location: result.location?.location_name,
invoice_location: result.invoice_location?.location_name,
business_unit: result.business_unit.business_unit_name,
business_unit: result.business_unit?.business_unit_name,
os: result.os,
os_version: result.os_version,
mobile_os: result.mobile_os,
Expand Down
Loading

0 comments on commit 981b1e5

Please sign in to comment.