Skip to content

Commit

Permalink
fix error message alignment (#362)
Browse files Browse the repository at this point in the history
* [INJIVER846] removed unused method

Signed-off-by: srikanth716 <[email protected]>

* [INJIVER846] refactor cliend Id validation

Signed-off-by: srikanth716 <[email protected]>

* [INJIVER-846] refactor config json

Signed-off-by: srikanth716 <[email protected]>

* [INJIVER-846] refactor configmaps on deployment

Signed-off-by: srikanth716 <[email protected]>

* [INJIVER-846] refactor configmaps on deployment

Signed-off-by: srikanth716 <[email protected]>

* [INJIVER-846] refactor configmaps on deployment

Signed-off-by: srikanth716 <[email protected]>

* [INJIVER-846] refactor configmaps on deployment

Signed-off-by: srikanth716 <[email protected]>

* [INJIVER-846] refactor configmaps on deployment

Signed-off-by: srikanth716 <[email protected]>

* [INJIVER-846] refactor configmaps on deployment

Signed-off-by: srikanth716 <[email protected]>

* [INJIVER-846] refactor configmaps on deployment

Signed-off-by: srikanth716 <[email protected]>

* refactor rerendering order and default order

Signed-off-by: srikanth716 <[email protected]>

* [INJIVER-1024] version upgrade to verify mock vc

Signed-off-by: srikanth716 <[email protected]>

* [INJIVER-1024] vc-verifier version downgrade

Signed-off-by: srikanth716 <[email protected]>

* [INJIVER-1024] vc-verifier version downgrade

Signed-off-by: srikanth716 <[email protected]>

* [INJIVER-846] fix nginx config to send large data and upgarding vc-verifier library

Signed-off-by: srikanth716 <[email protected]>

* [INJIVER-456] fix error message alignment

Signed-off-by: srikanth716 <[email protected]>

* [INJIVER-846] refactor default rendering order

Signed-off-by: srikanth716 <[email protected]>

---------

Signed-off-by: srikanth716 <[email protected]>
  • Loading branch information
srikanth716 authored Mar 7, 2025
1 parent 5fb4fe2 commit 48bfc23
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion verify-ui/src/components/commons/AlertMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const AlertMessage = (props:any) => {
return (
<>
<div
className={`fixed top-[100px] ${isRtl?'left-4 lg:left-[2]':'right-4 lg:right-[2]'} py-[22px] px-[18px] text-white rounded-[12px] shadow-lg ${backgroundColorMapping[alertInfo.severity ?? "success"]} ${alertInfo.open ? "" : "hidden"}`}>
className={`fixed top-[30px] ${isRtl?'left-1 lg:left-[2]':'right-1 lg:right-[2]'} py-[22px] px-[18px] text-white rounded-[12px] shadow-lg ${backgroundColorMapping[alertInfo.severity ?? "success"]} ${alertInfo.open ? "" : "hidden"}`}>
<div className="flex items-center">
<p id="alert-message">
{alertInfo.message}
Expand Down
20 changes: 11 additions & 9 deletions verify-ui/src/utils/commonUtils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { claim, credentialSubject, VCWrapper, Detail, QrData } from "../types/data-types";
import { claim, credentialSubject, VCWrapper, QrData } from "../types/data-types";
import { InsuranceCredentialRenderOrder, farmerLandCredentialRenderOrder, farmerCredentialRenderOrder, MosipVerifiableCredentialRenderOrder } from "./config";

export const getPresentationDefinition = (data: QrData) => {
Expand All @@ -16,9 +16,9 @@ export const getPresentationDefinition = (data: QrData) => {
);
};

export const getDetailsOrder = (vc: any): Detail[] => {
export const getDetailsOrder = (vc: any) => {
const type = vc.type[1];
const credential = vc.credentialSubject
const credential = vc.credentialSubject;
switch (type) {
case "InsuranceCredential":
case "LifeInsuranceCredential":
Expand Down Expand Up @@ -73,12 +73,14 @@ export const getDetailsOrder = (vc: any): Detail[] => {
return { key, value: "N/A" };
});
default:
return Object.keys(credential).map((key) => {
if (key in credential) {
return { key, value: credential[key as keyof credentialSubject] || "N/A" };
}
return { key, value: "N/A" };
});
return Object.keys(credential)
.filter((key) =>
key !== "id" &&
credential[key] !== null &&
credential[key] !== undefined &&
credential[key] !== ""
)
.map((key) => ({ key, value: credential[key] }));
}
};

Expand Down

0 comments on commit 48bfc23

Please sign in to comment.