-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathempdata1.html
More file actions
228 lines (213 loc) · 7.4 KB
/
empdata1.html
File metadata and controls
228 lines (213 loc) · 7.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<table border="2">
<thead>
<tr>
<th>Name</th>
<th>Phone</th>
<th>Gender</th>
<th>Bank</th>
<th>Active Bank</th>
<th>Inactive Bank</th>
</tr>
</thead>
<tbody id="tablesss"></tbody>
</table>
<script>
var employe = [{
name: "prasannakumar",
id: 12345,
gender: "male",
mobile: 9248274823,
Bank_acc: [
{
"Bank_name": "SBI Bank",
"Account_no": "20113897522",
"IFSC_code": "SBIN0009771",
"date": "oct 10, 2021 11:02:05"
},
{
"Bank_name": "co-operative Bank",
"Account_no": "621585752225",
"IFSC_code": "SBIN0221455",
"date": "oct 20, 2021 11:02:05"
},
{
"Bank_name": "ICICI Bank",
"Account_no": "0280025452155",
"IFSC_code": "ICICI02800",
"date": "sep 20, 2021 11:02:05"
},
{
"Bank_name": "idfc Bank",
"Account_no": "15154221725",
"IFSC_code": "AXIS5331725",
"date": "sep 30, 2021 11:02:05"
},],
address: {
present: "30/14/02 ,Near SpourtSchool, R.T.C Colon, HYDERABAD-53312,telengana"
}
},
{
name: "phani varama",
id: 12346,
gender: "male",
mobile: 9248871823,
Bank_acc: [
{
"Bank_name": "SBI Bank",
"Account_no": "20113897522",
"IFSC_code": "SBIN0009771",
"date": "oct 10, 2021 11:02:05"
},
{
"Bank_name": "hdfc Bank",
"Account_no": "621585752225",
"IFSC_code": "SBIN0221455",
"date": "oct 02, 2021 11:02:05"
},
{
"Bank_name": "union Bank",
"Account_no": "0280025452155",
"IFSC_code": "ICICI02800",
"date": "oct 20, 2021 11:02:05"
},
{
"Bank_name": "yes Bank",
"Account_no": "15154221725",
"IFSC_code": "AXIS5331725",
"date": "sep 20, 2021 11:02:05"
},],
address: {
present: "11/01/01, Near suziki showroom,T.C Colony, HYDERABAD-533125,telengana"
}
}, {
name: "harish",
id: 12347,
gender: "male",
mobile: 9288175823,
Bank_acc: [
{
"Bank_name": "boroda Bank",
"Account_no": "20113897522",
"IFSC_code": "SBIN0009771",
"date": "oct 02, 2021 11:02:05"
},
{
"Bank_name": "kotak Bank",
"Account_no": "621585752225",
"IFSC_code": "SBIN0221455",
"date": "oct 20, 2021 11:02:05"
},
{
"Bank_name": "karnataka Bank",
"Account_no": "0280025452155",
"IFSC_code": "ICICI02800",
"date": "sep 29, 2021 11:02:05"
},
{
"Bank_name": "bandhan Bank",
"Account_no": "15154221725",
"IFSC_code": "AXIS5331725",
"date": "sep 20, 2021 11:02:05"
},],
address: {
present: "10/41/21, Near big-c,R.TColony, HYDERABAD-533125,telengana"
}
}, {
name: "mani",
id: 12348,
gender: "ale",
mobile: 9241284323,
Bank_acc: [
{
"Bank_name": "SBI Bank",
"Account_no": "20113897522",
"IFSC_code": "SBIN0009771",
"date": "oct 02, 2021 11:02:05"
},
{
"Bank_name": "SBH Bank",
"Account_no": "621585752225",
"IFSC_code": "SBIN0221455",
"date": "oct 20, 2021 11:02:05"
},
{
"Bank_name": "ICICI Bank",
"Account_no": "0280025452155",
"IFSC_code": "ICICI02800",
"date": "oct 28, 2021 11:02:05"
},
{
"Bank_name": "inidan Bank",
"Account_no": "15154221725",
"IFSC_code": "AXIS5331725",
"date": "sep 31, 2021 11:02:05"
},
{
"Bank_name": "inido Bank",
"Account_no": "15154221725",
"IFSC_code": "AXIS5331725",
"date": "sep 31, 2021 11:02:05"
}],
address: {
present: "35/04/58, Near Spourt School,R.C Colony, HYDERABAD-533125,telengana"
}
}
];
for (i = 0; i < employe.length; i++) {
// console.log(employe[i])
var banks = [];
var active=[];
var inactive=[];
var ac_no=[];
for (j = 0; j < employe[i].Bank_acc.length; j++) {
console.log(employe[i].Bank_acc[j].Bank_name);
var a = employe[i].Bank_acc[j].Bank_name;
var b = employe[i].Bank_acc[j].Account_no;
banks.push(a,b);//console.log(banks)
// ac_no.push(b);
// console.log(employe[i].Bank_acc[j].date)
let z = employe[i].Bank_acc[j].date
var date1 = new Date();
//console.log(x.last_date);
//var date2=parseInt(new date("update"));console.log(date2);
var date2 = new Date(z);
var result = Math.abs(date1 - date2) / 1000;
console.log(result);
var days = Math.floor(result / 86400);
console.log(days);
if (days <= 30) {
active.push(a);
// console.log("In in active account", banks)
}
else {
inactive.push(a);
// console.log("In active account", banks)
}
}
var row = `<tr>
<td>${employe[i].name}</td>
<td>${employe[i].mobile}</td>
<td>${employe[i].gender}</td>
<td>${banks}</td>
<td>${active}</td>
<td>${inactive}</td>
</tr>`
console.log(banks);
document.getElementById("tablesss").innerHTML += row
}
</script>
</body>
</html>
<!-- Registration form (min 8 fields)
validations for all input fields
date picker & validations
saving in local storage -->