Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
UPSMF
uphrh-smf-web
Commits
bcac76f2
Commit
bcac76f2
authored
2 years ago
by
BharathTarento
Browse files
Options
Download
Patches
Plain Diff
removed commented one and added constants in Lan
parent
5675701b
master
accept_file_type
cards-value-changes
delete-form
delete-user
form-issue
inspector-model
1 merge request
!2
card names healpers function
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/constants/LangConstants.ts
+8
-1
src/constants/LangConstants.ts
src/helpers/util.ts
+6
-6
src/helpers/util.ts
src/pages/Reviewer/ReviewerHome.tsx
+0
-22
src/pages/Reviewer/ReviewerHome.tsx
with
14 additions
and
29 deletions
+14
-29
src/constants/LangConstants.ts
+
8
−
1
View file @
bcac76f2
...
...
@@ -57,7 +57,14 @@ export const LANG = {
FORM_STATUS_TEXT
:
{
SENT_FOR_INSPECTION
:
"
Sent for assessment
"
,
INSPECTION_COMPLETED
:
"
Assessment completed
"
,
INSPECTOR_TOTAL_PENDING
:
"
Assessment total pending
"
,
UNDER_REVIEW
:
"
Under review
"
},
SEND_FOR_INSPECTION
:
"
Send for assessment
"
,
INSPECTOR_TOTAL_PENDING
:
"
Assessment total pending
"
METRIC_LABEL_KEY
:
{
UNDER_REVIEW
:
"
Underreview
"
,
SENT_FOR_INS
:
"
Sentforins
"
,
INS_COMPLETED
:
"
Inscompleted
"
,
INSPECTOR_TOTAL_PENDING
:
"
Inspector total pending
"
}
};
This diff is collapsed.
Click to expand it.
src/helpers/util.ts
+
6
−
6
View file @
bcac76f2
...
...
@@ -18,17 +18,17 @@ export const formatLabel = (labelStatus: string) => {
let
lowerLabel
=
labelStatus
.
toLowerCase
();
lowerLabel
=
lowerLabel
.
charAt
(
0
).
toUpperCase
()
+
lowerLabel
.
slice
(
1
);
switch
(
lowerLabel
)
{
case
"
Underreview
"
:
lowerLabel
=
"
Under review
"
;
case
`
${
LANG
.
METRIC_LABEL_KEY
.
UNDER_REVIEW
}
`
:
lowerLabel
=
`
${
LANG
.
FORM_STATUS_TEXT
.
UNDER_REVIEW
}
`
;
return
lowerLabel
;
case
"
Sentforins
"
:
case
`
${
LANG
.
METRIC_LABEL_KEY
.
SENT_FOR_INS
}
`
:
lowerLabel
=
`
${
LANG
.
FORM_STATUS_TEXT
.
SENT_FOR_INSPECTION
}
`
;
return
lowerLabel
;
case
"
Inscompleted
"
:
case
`
${
LANG
.
METRIC_LABEL_KEY
.
INS_COMPLETED
}
`
:
lowerLabel
=
`
${
LANG
.
FORM_STATUS_TEXT
.
INSPECTION_COMPLETED
}
`
;
return
lowerLabel
;
case
"
Inspector total pending
"
:
lowerLabel
=
`
${
LANG
.
INSPECTOR_TOTAL_PENDING
}
`
;
case
`
${
LANG
.
METRIC_LABEL_KEY
.
INSPECTOR_TOTAL_PENDING
}
`
:
lowerLabel
=
`
${
LANG
.
FORM_STATUS_TEXT
.
INSPECTOR_TOTAL_PENDING
}
`
;
return
lowerLabel
;
default
:
return
lowerLabel
;
...
...
This diff is collapsed.
Click to expand it.
src/pages/Reviewer/ReviewerHome.tsx
+
0
−
22
View file @
bcac76f2
...
...
@@ -116,28 +116,6 @@ export const ReviewerHome = ({ data }: ReviewerProps) => {
);
};
// Function to format the status label
// const formatLabel = (labelStatus: string) => {
// let lowerLabel = labelStatus.toLowerCase();
// lowerLabel = lowerLabel.charAt(0).toUpperCase() + lowerLabel.slice(1);
// switch (lowerLabel) {
// case "Underreview":
// lowerLabel = "Under review";
// return lowerLabel;
// case "Sentforins":
// lowerLabel = `${LANG.FORM_STATUS_TEXT.SENT_FOR_INSPECTION}`;
// return lowerLabel;
// case "Inscompleted":
// lowerLabel = `${LANG.FORM_STATUS_TEXT.INSPECTION_COMPLETED}`;
// return lowerLabel;
// case "Inspector total pending":
// lowerLabel = `${LANG.INSPECTOR_TOTAL_PENDING}`;
// return lowerLabel;
// default:
// return lowerLabel;
// }
// };
return
(
<
Fragment
>
<
div
className
=
"container-fluid"
>
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets