Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding map height css changes, geojson active inactive status change #969

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected]/dist/index.css" />
<link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected]/dist/index.css" />
<link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected]/dist/index.css" />
<link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected].45-microplan/dist/index.css" />
<link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected].46-microplan/dist/index.css" />

<!-- added below css for hcm-workbench module inclusion-->
<!-- <link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected]/dist/index.css" /> -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import JSZip from "jszip";
import * as XLSX from "xlsx";
import axios from "axios";
import shp from "shpjs";
import { EXCEL, GEOJSON, SHAPEFILE, ACCEPT_HEADERS, LOCALITY, commonColumn } from "../configs/constants";
import { EXCEL, GEOJSON, SHAPEFILE, ACCEPT_HEADERS, LOCALITY, commonColumn, UPLOADED_DATA_ACTIVE_STATUS } from "../configs/constants";
import { addBoundaryData, fetchBoundaryData, filterBoundaries } from "./createTemplate";
import { handleExcelFile } from "./uploadUtils";

Expand Down Expand Up @@ -313,17 +313,29 @@ export const updateSessionUtils = {
if (processedData) return;
const mappedToList = upload?.resourceMapping.map((item) => item.mappedTo);
let sortedSecondList = Digit.Utils.microplan.sortSecondListBasedOnFirstListOrder(schemaKeys, upload?.resourceMapping);
const newFeatures = result["features"].map((item) => {
const newFeatures = [];
for (const item of result["features"]) {
let newProperties = {};
sortedSecondList
?.filter((resourse) => resourse.filestoreId === filestoreId)
.forEach((e) => {
newProperties[e["mappedTo"]] = item["properties"][e["mappedFrom"]];
});

sortedSecondList.forEach((e) => {
newProperties[e["mappedTo"]] = item["properties"][e["mappedFrom"]];
});
item["properties"] = newProperties;
return item;
});
upload.data.features = newFeatures;
newFeatures.push(item);
}
let filteredFeature = [];
for (const item of newFeatures) {
if (
schema?.activeInactiveField &&
schema?.schema?.Properties &&
Object.keys(schema.schema.Properties).includes(schema.activeInactiveField) &&
item?.properties?.[schema.activeInactiveField] !== additionalProps.t(UPLOADED_DATA_ACTIVE_STATUS)
) {
continue;
}
filteredFeature.push(item);
}
upload.data.features = filteredFeature;
siddhant-nawale-egov marked this conversation as resolved.
Show resolved Hide resolved
if (
additionalProps.hierarchyData?.every(
(item) =>
Expand Down
2 changes: 1 addition & 1 deletion health/micro-ui/web/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected]/dist/index.css" />
<!-- added below css for hcm-workbench module inclusion-->
<link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected]/dist/index.css" />
<link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected].45-microplan/dist/index.css"/>
<link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected].46-microplan/dist/index.css"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#00bcd1" />
<title>DIGIT</title>
Expand Down