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
7b92c526
Commit
7b92c526
authored
3 years ago
by
Sakthivel G
Browse files
Options
Download
Patches
Plain Diff
refactor: resolve console warnings
parent
768c1f87
master
accept_file_type
cards-value-changes
delete-form
delete-user
form-issue
inspector-model
label-change
No related merge requests found
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
src/components/common/Breadcrumbs.tsx
+39
-42
src/components/common/Breadcrumbs.tsx
src/components/common/Header.tsx
+3
-2
src/components/common/Header.tsx
src/components/form/AddForm.js
+1
-2
src/components/form/AddForm.js
src/components/form/ListForms.js
+1
-3
src/components/form/ListForms.js
src/components/form/MyApplications.js
+1
-2
src/components/form/MyApplications.js
src/components/form/fields/FileUpload.js
+2
-2
src/components/form/fields/FileUpload.js
src/components/login/Login.tsx
+1
-1
src/components/login/Login.tsx
src/components/modal/ModalOne.tsx
+1
-1
src/components/modal/ModalOne.tsx
src/components/status-bar/StatusBar.tsx
+0
-1
src/components/status-bar/StatusBar.tsx
src/components/tabs/TabOne.tsx
+0
-1
src/components/tabs/TabOne.tsx
src/layouts/Regulator/AllApplicationsTab.tsx
+2
-0
src/layouts/Regulator/AllApplicationsTab.tsx
src/pages/Inspector/InspectionSummary.tsx
+1
-1
src/pages/Inspector/InspectionSummary.tsx
src/pages/Regulator/RegulatorAllApplications.tsx
+2
-0
src/pages/Regulator/RegulatorAllApplications.tsx
src/pages/Reviewer/CreateUser.tsx
+6
-0
src/pages/Reviewer/CreateUser.tsx
with
60 additions
and
58 deletions
+60
-58
src/components/common/Breadcrumbs.tsx
+
39
−
42
View file @
7b92c526
import
{
title
}
from
"
process
"
;
import
{
Fragment
,
useEffect
,
useState
}
from
"
react
"
;
import
{
Fragment
}
from
"
react
"
;
import
{
Link
}
from
"
react-router-dom
"
;
export
interface
ITitle
{
title
:
string
,
url
:
string
,
icon
?:
string
title
:
string
;
url
:
string
;
icon
?:
string
;
}
interface
BreadcrumbsProps
{
data
:
ITitle
[]
historyData
:
any
,
data
:
ITitle
[]
;
historyData
:
any
;
}
export
const
Breadcrumbs
=
({
data
,
historyData
}:
BreadcrumbsProps
)
=>
{
return
(
<
Fragment
>
<
div
className
=
"d-flex align-items-center h100"
>
{
data
&&
data
.
length
&&
data
.
map
((
title
,
index
)
=>
{
return
(
<
div
className
=
"d-flex custom breadcrumb"
key
=
{
index
}
>
{
index
!==
0
&&
<
i
className
=
"fa fa-chevron-right arrow"
></
i
>
}
{
title
.
title
&&
(
!
title
.
url
||
title
.
url
===
'
none
'
)
&&
<
span
className
=
"d-flex ml-2 m-auto"
>
{
/* <i className="fa fa-chevron-right arrow"></i> */
}
<
span
className
=
"title"
>
{
title
.
title
}
</
span
>
</
span
>
}
{
title
.
url
&&
title
.
url
!==
'
none
'
&&
<
Link
to
=
{
title
.
url
}
className
=
"title active"
>
{
/* <i className="fa fa-chevron-right arrow"></i> */
}
{
title
.
title
}
</
Link
>
// <Link to={title.url} className={`${historyData.location.pathname.match(title.url)
// ? "title active"
// : "title"
// }`}>{title.title}</Link>
}
</
div
>
)
})
return
(
<
Fragment
>
<
div
className
=
"d-flex align-items-center h100"
>
{
data
&&
data
.
length
&&
data
.
map
((
title
,
index
)
=>
{
return
(
<
div
className
=
"d-flex custom breadcrumb"
key
=
{
index
}
>
{
index
!==
0
&&
<
i
className
=
"fa fa-chevron-right arrow"
></
i
>
}
{
title
.
title
&&
(
!
title
.
url
||
title
.
url
===
"
none
"
)
&&
(
<
span
className
=
"d-flex ml-2 m-auto"
>
{
/* <i className="fa fa-chevron-right arrow"></i> */
}
<
span
className
=
"title"
>
{
title
.
title
}
</
span
>
</
span
>
)
}
{
title
.
url
&&
title
.
url
!==
"
none
"
&&
(
<
Link
to
=
{
title
.
url
}
className
=
"title active"
>
{
/* <i className="fa fa-chevron-right arrow"></i> */
}
{
title
.
title
}
</
Link
>
)
// <Link to={title.url} className={`${historyData.location.pathname.match(title.url)
// ? "title active"
// : "title"
// }`}>{title.title}</Link>
}
</
div
>
</
Fragment
>
);
}
\ No newline at end of file
</
div
>
);
})
}
</
div
>
</
Fragment
>
);
};
This diff is collapsed.
Click to expand it.
src/components/common/Header.tsx
+
3
−
2
View file @
7b92c526
import
React
,
{
Component
,
Fragment
}
from
"
react
"
;
/* eslint-disable no-mixed-operators */
import
{
Component
,
Fragment
}
from
"
react
"
;
import
Auth
from
"
../../helpers/auth
"
;
import
{
Link
}
from
"
react-router-dom
"
;
import
{
UserService
}
from
"
../../services/user.service
"
;
...
...
@@ -51,7 +52,7 @@ class Header extends Component<LoginProps, LoginState> {
className
=
"row"
>
<
div
className
=
"col-6 pt-3"
>
<
img
src
=
"./../../img/smf-header-logo.svg"
className
=
"img-fluid"
alt
=
"
Responsive image
"
/>
<
img
src
=
"./../../img/smf-header-logo.svg"
className
=
"img-fluid"
alt
=
"
SMF logo
"
/>
</
div
>
<
div
className
=
"col-6 pt-3"
>
<
div
className
=
"dropdown"
>
...
...
This diff is collapsed.
Click to expand it.
src/components/form/AddForm.js
+
1
−
2
View file @
7b92c526
import
React
,
{
Component
,
Fragment
}
from
"
react
"
;
import
{
Link
}
from
"
react-router-dom
"
;
import
{
Component
,
Fragment
}
from
"
react
"
;
// import BrandNavBar from "../../dashboard/components/common/BrandNavBar";
// import HeaderNavBar from "../../dashboard/components/common/HeaderNavBar";
// import Sidebar from "../common/Sidebar";
...
...
This diff is collapsed.
Click to expand it.
src/components/form/ListForms.js
+
1
−
3
View file @
7b92c526
import
React
,
{
Component
,
Fragment
}
from
"
react
"
;
import
PropTypes
from
"
prop-types
"
;
import
{
Component
,
Fragment
}
from
"
react
"
;
import
{
Link
}
from
"
react-router-dom
"
;
import
{
FormService
}
from
"
../../services/form.service
"
;
import
{
APP
,
LANG
}
from
"
../../constants
"
;
import
Notify
from
"
../../helpers/notify
"
;
import
Header
from
"
./../common/Header
"
;
import
{
BtnTwo
}
from
"
../buttons
"
;
class
ListForms
extends
Component
{
...
...
This diff is collapsed.
Click to expand it.
src/components/form/MyApplications.js
+
1
−
2
View file @
7b92c526
import
React
,
{
Component
,
Fragment
}
from
"
react
"
;
import
{
Component
,
Fragment
}
from
"
react
"
;
import
PropTypes
from
"
prop-types
"
;
import
{
Link
}
from
"
react-router-dom
"
;
import
{
FormService
}
from
"
../../services/form.service
"
;
import
{
APP
}
from
"
../../constants
"
;
import
Notify
from
"
../../helpers/notify
"
;
...
...
This diff is collapsed.
Click to expand it.
src/components/form/fields/FileUpload.js
+
2
−
2
View file @
7b92c526
import
React
,
{
Component
}
from
"
react
"
;
import
{
Link
}
from
"
react
-router-dom
"
;
/* eslint-disable no-multi-str */
import
{
Component
}
from
"
react
"
;
// import LocalizedStrings from "react-localization";
// import { translations } from "./../../../../translations.js";
import
{
LANG
,
APP
}
from
"
./../../../constants/index
"
;
...
...
This diff is collapsed.
Click to expand it.
src/components/login/Login.tsx
+
1
−
1
View file @
7b92c526
import
React
,
{
Component
}
from
"
react
"
;
import
{
Component
}
from
"
react
"
;
import
{
UserService
}
from
"
../../services/user.service
"
;
import
Auth
from
"
../../helpers/auth
"
;
import
Notify
from
"
../../helpers/notify
"
;
...
...
This diff is collapsed.
Click to expand it.
src/components/modal/ModalOne.tsx
+
1
−
1
View file @
7b92c526
import
{
BtnOne
}
from
"
../buttons
"
;
import
styles
from
"
./ModalOne.module.css
"
;
/* eslint-disable @typescript-eslint/no-unused-vars */
import
btnStyle
from
"
../buttons/BtnOne.module.css
"
;
import
{
LANG
}
from
"
../../constants
"
;
...
...
This diff is collapsed.
Click to expand it.
src/components/status-bar/StatusBar.tsx
+
0
−
1
View file @
7b92c526
import
{
useEffect
}
from
"
react
"
;
import
{
LANG
}
from
"
../../constants
"
;
import
styles
from
"
./StatusBar.module.css
"
;
...
...
This diff is collapsed.
Click to expand it.
src/components/tabs/TabOne.tsx
+
0
−
1
View file @
7b92c526
import
{
useEffect
}
from
"
react
"
import
"
./TabOne.css
"
/**
...
...
This diff is collapsed.
Click to expand it.
src/layouts/Regulator/AllApplicationsTab.tsx
+
2
−
0
View file @
7b92c526
/*eslint-disable no-empty-pattern*/
import
{
useEffect
,
useState
}
from
"
react
"
;
import
{
useRecoilState
}
from
"
recoil
"
;
import
{
...
...
@@ -24,6 +25,7 @@ export const AllApplicationsTab = ({}: AllApplicationsTabProps) => {
if
(
selectedTabData
&&
selectedTabData
[
0
])
{
setData
(
selectedTabData
[
0
]);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
},
[
selectTab
]);
return
(
...
...
This diff is collapsed.
Click to expand it.
src/pages/Inspector/InspectionSummary.tsx
+
1
−
1
View file @
7b92c526
import
{
Fragment
,
useEffect
}
from
"
react
"
;
import
{
Fragment
}
from
"
react
"
;
import
Header
from
"
../../components/common/Header
"
;
import
{
useHistory
}
from
'
react-router-dom
'
;
import
{
InspectionSummaryLayout
}
from
"
../../layouts
"
;
...
...
This diff is collapsed.
Click to expand it.
src/pages/Regulator/RegulatorAllApplications.tsx
+
2
−
0
View file @
7b92c526
...
...
@@ -85,12 +85,14 @@ export const RegulatorAllApplications = ({
if
(
selectedTab
.
length
)
{
setSelectedTab
(
"
New
"
)
}
// eslint-disable-next-line react-hooks/exhaustive-deps
},
[]);
useEffect
(()
=>
{
if
(
currentData
.
length
&&
selectedTab
===
""
)
{
setSelectedTab
(
"
New
"
);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
},
[
currentData
]);
const
getSelectedTabData
=
()
=>
{
...
...
This diff is collapsed.
Click to expand it.
src/pages/Reviewer/CreateUser.tsx
+
6
−
0
View file @
7b92c526
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable no-mixed-operators */
import
{
Fragment
,
useEffect
,
useState
}
from
"
react
"
;
import
{
useHistory
}
from
"
react-router
"
;
import
{
BtnOne
,
BtnTwo
}
from
"
../../components/buttons
"
...
...
@@ -98,6 +100,7 @@ export const CreateUser = ({ data }: userProps) => {
])
setIsEditMode
(
false
)
}
// eslint-disable-next-line react-hooks/exhaustive-deps
},
[])
useEffect
(()
=>
{
...
...
@@ -106,6 +109,7 @@ export const CreateUser = ({ data }: userProps) => {
}
else
{
handlesRoles
(
false
)
}
// eslint-disable-next-line react-hooks/exhaustive-deps
},
[
isEditMode
])
const
handlesRoles
=
(
isEdit
:
boolean
)
=>
{
...
...
@@ -122,6 +126,7 @@ export const CreateUser = ({ data }: userProps) => {
return
{
...
r
,
isChecked
:
false
}
}
})
return
null
;
})
setRoles
(
rolesUpdated
)
}
else
{
...
...
@@ -199,6 +204,7 @@ export const CreateUser = ({ data }: userProps) => {
}
else
{
k
.
isChecked
=
false
}
return
null
;
});
// tempRoles[i].isChecked = !tempRoles[i].isChecked
...
...
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