-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* user management screen * some changes to user screen * some name changes * user management screen * table rendered * Table rendering and other changes * roles default value set to all roles * checkpoint * EOD checkpoint * filter deafult changes and roles as list of roles * resolved comments after pull * index.html * resolved comments * changes in names * changes * changes * making api calls * EOD checkpoint * downloading * random commit * working user download screen * css styling and pull from console * some changes * changes --------- Co-authored-by: Nipun Arora <[email protected]>
- Loading branch information
1 parent
f887c42
commit f6da599
Showing
14 changed files
with
302 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,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].79-campaign/dist/index.css" /> | ||
<link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected].80-campaign/dist/index.css" /> | ||
|
||
|
||
<link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected]/dist/index.css" /> | ||
|
2 changes: 1 addition & 1 deletion
2
health/micro-ui/web/micro-ui-internals/packages/css/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@egovernments/digit-ui-css", | ||
"version": "1.0.79-campaign", | ||
"version": "1.0.80-campaign", | ||
"license": "MIT", | ||
"main": "dist/index.css", | ||
"author": "Jagankumar <[email protected]>", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -185,7 +185,7 @@ export const UICustomizations = { | |
} | ||
) | ||
}) | ||
|
||
return roles | ||
}, | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
...-ui/web/micro-ui-internals/packages/modules/microplan/src/hooks/services/SearchFileIds.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
import { UploadFileComposer } from "@egovernments/digit-ui-components"; | ||
import formatTimestamp from "../../utils/formatTimeStamp"; | ||
|
||
//returns [[FileId,auditDetails]] | ||
const SearchFileIds = async (body) => { | ||
try { | ||
const response = await Digit.CustomService.getResponse({ | ||
url: "/project-factory/v1/data/_search", | ||
useCache: false, | ||
method: "POST", | ||
userService: false, | ||
body:body, | ||
}); | ||
|
||
if (response?.ResourceDetails?.length === 0) { | ||
throw new Error("File not found for given microplan"); | ||
} | ||
let fileIds = [] | ||
let uuids = new Set(); //for making request to search user | ||
for (const ob of response?.ResourceDetails) { | ||
fileIds.push(ob?.processedFilestoreId); | ||
uuids.add(ob?.auditDetails?.lastModifiedBy); | ||
} | ||
|
||
uuids = [...uuids]; | ||
|
||
if (uuids.length === 0) { | ||
throw new Error("No UUIDs found to search for users"); | ||
} | ||
|
||
|
||
const response1 = await Digit.CustomService.getResponse({ | ||
url: "/user/_search", | ||
useCache: false, | ||
method: "POST", | ||
userService: false, | ||
body: { | ||
tenantId: Digit.ULBService.getCurrentTenantId(), | ||
pageSize: "100", | ||
uuid: uuids | ||
}, | ||
}); | ||
|
||
|
||
if (response1?.user?.length === 0) { | ||
throw new Error("No users found with the given uuid"); | ||
} | ||
let uuidName={}; | ||
for (const ob of response1?.user){ | ||
uuidName[ob.uuid]=ob.userName; | ||
} | ||
// let userNames = {} | ||
|
||
response?.ResourceDetails.forEach((ob) => { | ||
ob["username"] = uuidName[ob?.auditDetails?.lastModifiedBy]; // Set the username | ||
ob.auditDetails.lastmodtime = formatTimestamp(ob?.auditDetails?.lastModifiedTime); // Format and set the last modified time | ||
}); | ||
|
||
|
||
let res = {...response} | ||
|
||
return res | ||
} catch (error) { | ||
if (error?.response?.data?.Errors) { | ||
throw new Error(error.response.data.Errors[0].message); | ||
} | ||
throw new Error("An unknown error occurred"); | ||
} | ||
}; | ||
|
||
export default SearchFileIds; |
9 changes: 9 additions & 0 deletions
9
...h/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/hooks/useFileDownload.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { useQuery } from "react-query"; | ||
import SearchFileIds from "./services/SearchFileIds"; | ||
|
||
const useFileDownload = (data, config = {}) => { | ||
return useQuery(["SEARCH_FILES",data,config?.queryKey], () => SearchFileIds(data), { ...config }); | ||
}; | ||
|
||
export default useFileDownload; | ||
|
Oops, something went wrong.