Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
Component Sharing
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Gagandeep Singh Bhatia
Component Sharing
Commits
6395b421
Commit
6395b421
authored
Jul 02, 2024
by
Sonawane Amol Madhjuar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace CustomerExtrenalInfo.jsp
parent
de4f5303
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
28 deletions
+33
-28
Amol/VisionDIJSP/CustomerExtrenalInfo.jsp
Amol/VisionDIJSP/CustomerExtrenalInfo.jsp
+33
-28
No files found.
Amol/VisionDIJSP/CustomerExtrenalInfo.jsp
View file @
6395b421
...
...
@@ -18,6 +18,15 @@
button
:hover
{
background-color
:
darkblue
;
}
table
,
th
,
td
{
border
:
1px
solid
black
;
border-collapse
:
collapse
;
padding
:
8px
;
text-align
:
left
;
}
th
{
background-color
:
#f2f2f2
;
}
</style>
<script>
function
updateInputBox
()
{
...
...
@@ -28,6 +37,29 @@
function
getDetails
()
{
document
.
getElementById
(
"
detailsForm
"
).
submit
();
}
function
createTableFromJson
(
data
,
parentElement
)
{
for
(
var
key
in
data
)
{
if
(
data
.
hasOwnProperty
(
key
))
{
var
value
=
data
[
key
];
var
row
=
parentElement
.
insertRow
();
var
cell1
=
row
.
insertCell
(
0
);
var
cell2
=
row
.
insertCell
(
1
);
cell1
.
innerHTML
=
key
;
if
(
typeof
value
===
'
object
'
&&
value
!==
null
)
{
cell2
.
innerHTML
=
""
;
var
nestedTable
=
document
.
createElement
(
"
table
"
);
var
nestedBody
=
document
.
createElement
(
"
tbody
"
);
nestedTable
.
appendChild
(
nestedBody
);
createTableFromJson
(
value
,
nestedBody
);
cell2
.
appendChild
(
nestedTable
);
}
else
{
cell2
.
innerHTML
=
value
;
}
}
}
}
</script>
</head>
<body>
...
...
@@ -53,12 +85,9 @@
if
(
"pan"
.
equals
(
selectedOption
))
{
panNumber
=
dbAccess
.
getDBColumnValue
(
"CUSTOMER"
,
"PAN_NO"
,
"CUST_CODE = '"
+
custCode
+
"'"
,
userInfo
.
getTransDB
());
BaseLogger
.
log
(
"3"
,
null
,
null
,
"PanNumber:: "
+
panNumber
);
if
(
panNumber
!=
null
&&
!
panNumber
.
isEmpty
())
{
panVerificationResponse
=
dbAccess
.
getDBColumnValue
(
"CUST_EXT_INFO"
,
"INFO_RESPONSE"
,
"CUST_CODE = '"
+
custCode
+
"' AND INFO_TYPE = 'Pan Verification'"
,
userInfo
.
getTransDB
());
BaseLogger
.
log
(
"3"
,
null
,
null
,
"INFO_RESPONSE:: "
+
panVerificationResponse
);
if
(
panVerificationResponse
==
null
)
{
// Call the API if panVerificationResponse is null
...
...
@@ -150,31 +179,7 @@
</thead>
<tbody>
<script>
var
jsonData
=
<%=
panVerificationResponse
.
replaceAll
(
"\""
,
"\\\""
)
%>
;
function
createTableFromJson
(
data
,
parentElement
)
{
for
(
var
key
in
data
)
{
if
(
data
.
hasOwnProperty
(
key
))
{
var
value
=
data
[
key
];
var
row
=
parentElement
.
insertRow
();
var
cell1
=
row
.
insertCell
(
0
);
var
cell2
=
row
.
insertCell
(
1
);
cell1
.
innerHTML
=
key
;
if
(
typeof
value
===
'
object
'
&&
value
!==
null
)
{
cell2
.
innerHTML
=
""
;
var
nestedTable
=
document
.
createElement
(
"
table
"
);
var
nestedBody
=
document
.
createElement
(
"
tbody
"
);
nestedTable
.
appendChild
(
nestedBody
);
createTableFromJson
(
value
,
nestedBody
);
cell2
.
appendChild
(
nestedTable
);
}
else
{
cell2
.
innerHTML
=
value
;
}
}
}
}
var
jsonData
=
'
<%=
panVerificationResponse
.
replaceAll
(
"\""
,
"\\\""
)
%>
'
;
var
tableBody
=
document
.
getElementById
(
"
jsonData
"
).
getElementsByTagName
(
'
tbody
'
)[
0
];
createTableFromJson
(
JSON
.
parse
(
jsonData
),
tableBody
);
</script>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment