-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
350 lines (315 loc) · 8.75 KB
/
index.html
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
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Google Sheets Integrierte Produktverfolgung</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="jquery.google.spreadsheet.js"></script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-61820447-7"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-61820447-7');
</script>
<style>
@charset "UTF-8";
@import url(https://fonts.googleapis.com/css?family=Open+Sans:300,400,700);
body {
font-family: 'Open Sans', sans-serif;
font-weight: 300;
line-height: 1.42em;
color:#A7A1AE;
background-color:#1F2739;
}
h1 {
font-size:3em;
font-weight: 300;
line-height:1em;
text-align: center;
color: #4DC3FA;
}
h2 {
font-size:1em;
font-weight: 300;
text-align: center;
display: block;
line-height:1em;
padding-bottom: 2em;
color: #FB667A;
}
h2 a {
font-weight: 700;
text-transform: uppercase;
color: #FB667A;
text-decoration: none;
}
.İptal{
color:red;
}
.Kontrol{
color:green;
}
.Beklemede{
color:purple;
}
.Onaybekliyor{
color:black;
}
.Sırada{
color:yellow;
}
.Aktif{
color:blue;
}
.blue { color: #185875; }
.yellow { color: #FFF842; }
.olay th h1, .container th h1 {
font-weight: bold;
font-size: 1em;
text-align: left;
color: #185875;
}
.olay td, .container td {
font-weight: normal;
font-size: 1em;
-webkit-box-shadow: 0 2px 2px -2px #0E1119;
-moz-box-shadow: 0 2px 2px -2px #0E1119;
box-shadow: 0 2px 2px -2px #0E1119;
}
.olay, .container {
text-align: left;
overflow: hidden;
width: 80%;
margin: 0 auto;
display: table;
padding: 0 0 8em 0;
}
.olay td, .olay th, .container td, .container th {
padding-bottom: 2%;
padding-top: 2%;
padding-left:2%;
}
.olay tr:nth-child(odd), .container tr:nth-child(odd) {
background-color: #323C50;
}
.olay tr:nth-child(even), .container tr:nth-child(even) {
background-color: #2C3446;
}
.olay th, .container th {
background-color: #1F2739;
}
.olay td:first-child, .container td:first-child { color: #FB667A; }
.olay tr:hover, .container tr:hover {
background-color: #464A52;
-webkit-box-shadow: 0 6px 6px -6px #0E1119;
-moz-box-shadow: 0 6px 6px -6px #0E1119;
box-shadow: 0 6px 6px -6px #0E1119;
}
.olay td:hover , .container td:hover {
background-color: #FFF842;
color: #403E10;
font-weight: bold;
box-shadow: #7F7C21 -1px 1px, #7F7C21 -2px 2px, #7F7C21 -3px 3px, #7F7C21 -4px 4px, #7F7C21 -5px 5px, #7F7C21 -6px 6px;
transform: translate3d(6px, -6px, 0);
transition-delay: 0s;
transition-duration: 0.4s;
transition-property: all;
transition-timing-function: line;
}
@media (max-width: 800px) {
.container td:nth-child(4),
.container th:nth-child(4) { }
}
</style>
</head>
<body>
<h1><span class="blue"><span class="yellow">Die Warenliste</pan></h1>
<h2><a href="https://docs.google.com/spreadsheets/d/1RlUqCfm5GKEoVBBddtyXQ-_I1n85rZTEQddG0r8FvD4/edit?usp=sharing" target="_blank">Klicken Sie hier</a>, um Produkte zu bearbeiten.</h2>
<table class="container">
<thead>
<tr>
<th><h1>Mitarbeiter</h1></th>
<th><h1>Artikel Nr.</h1></th>
<th><h1>Produkt</h1></th>
<th><h1>Live</h1></th>
<th><h1>Notiz</h1></th>
<th><h1>Status</h1></th>
</tr>
</thead>
<tbody class="ilk">
</tbody>
</table>
<table class="olay">
<thead>
<tr>
<th><h1>Status</h1></th>
<th><h1>Anzahl</h1></th>
</tr>
</thead>
<tbody>
<tr>
<td>Aktiv</td>
<td class="Aktifdurum">.</td>
</tr>
<tr>
<td>Ausstehend</td>
<td class="Beklemededurum">.</td>
</tr>
<tr>
<td>Warten auf die Genehmigung</td>
<td class="Onaybekliyordurum">.</td>
</tr>
<tr>
<td>in Reihe</td>
<td class="Sıradadurum">.</td>
</tr>
<tr>
<td>Abgesagt</td>
<td class="İptaldurum">.</td>
</tr>
<tr>
<td>Kontrolle</td>
<td class="Kontroldurum">.</td>
</tr>
</tbody>
</table>
<script>
var urls = [
/*
Bu şekilde URL alabilmek için yeni bi sheet oluştur sonra paylaş(share)
Sonra File -> Publish to web -> Publish
Sonrasında "Sheetin adres çubuğundaki url sinin" /spreadsheets/d/ ile /edit arasını alıp
https://docs.google.com/spreadsheet/pub?key= BURAYA &output=html
Yapıştır
*/
"https://docs.google.com/spreadsheet/pub?key=1RlUqCfm5GKEoVBBddtyXQ-_I1n85rZTEQddG0r8FvD4&output=html", //ege
'https://docs.google.com/spreadsheet/pub?key=1Dxed9WwEjQVxVZJTSJOAF8iHmIOz3QIW-FqvwBseQRM&output=html', //faruk
'https://docs.google.com/spreadsheet/pub?key=1ZE4BSBtEEDfYBZVJ1ilf7M7vaB33Zyh3qbzCElcIA2w&output=html', //ahmet
'https://docs.google.com/spreadsheet/pub?key=1hXmAkqvjIosWry8xWb5_WF4rPP3Vj-LxXi_P6vrxvIE&output=html' //mehmet
];
window.setInterval(function(){
$.each(urls, function( index, value ) {
var googleSpreadsheet = new GoogleSpreadsheet();
googleSpreadsheet.url(urls[index]);
googleSpreadsheet.load(function(result) {
/*
Birisini eklemek istersen urls ye dosyanın url sini ekle sonra aşşağıdaki
if e bi döngü daha ekle
else if(index == 4){
can = result.items.length;
}
gibi
*/
if(index == 0){
ege = result.items.length;
}else if(index == 1){
faruk = result.items.length;
}else if(index == 2){
ahmet = result.items.length;
}else if(index == 3){
mehmet = result.items.length;
}
$(function() {
$.each(result.items, function(i, item) {
if(result.items[i].status === "Aktiv"){
durum="Aktif"
}else if(result.items[i].status === "Ausstehend"){
durum="Beklemede";
}else if(result.items[i].status === "Warten auf die Genehmigung"){
durum="Onaybekliyor";
}else if(result.items[i].status === "in Reihe"){
durum="Sırada";
}else if(result.items[i].status === "Abgesagt"){
durum="İptal";
}else if(result.items[i].status === "Kontrolle"){
durum="Kontrol";
}else{
durum="";
}
/*
Bu döngüyede can'ı eklemen gerekiyor
else if(index == 4){
i = i + ahmet + faruk + ege + 1 + bi önceki kişinin adı (Mehmet)
url="Can"
}
*/
if(index == 0){
i = i + 1
url = "Ege"
}else if(index == 1){
i = i + ege + 1
url="Faruk"
}else if(index == 2){
i = i + ege + faruk + 1
url="Ahmet"
}else if(index == 3){
i = i + ahmet + faruk + ege + 1
url="Mehmet"
}
if($('.ilk').children().length < i){
var $tr = $('<tr>').append(
$('<td>').text(item.id),
$('<td>').text(item.artikelnr),
$('<td>').text(item.produkt),
$('<td>').text(item.live),
$('<td>').text(item.notiz),
$('<td class=' + durum + '>').text(item.status)
).appendTo('.ilk');
}else{
$('body > table.container > tbody > tr:nth-child('+ i +') > td:nth-child(1)').unbind('onclick').attr('onclick', "window.open('/Google-Sheets-Integrierte-Produktverfolgung/" + url + ".html')").text(item.id);
$('body > table.container > tbody > tr:nth-child('+ i +') > td:nth-child(2)').text(item.artikelnr);
$('body > table.container > tbody > tr:nth-child('+ i +') > td:nth-child(3)').text(item.produkt);
$('body > table.container > tbody > tr:nth-child('+ i +') > td:nth-child(4)').text(item.live);
$('body > table.container > tbody > tr:nth-child('+ i +') > td:nth-child(5)').text(item.notiz);
$('body > table.container > tbody > tr:nth-child('+ i +') > td:nth-child(6)').removeClass().addClass( durum ).text(item.status);
a = i + 1
/* Buraya'da + can yapman gerekliyor */
for (a; a == (ege + ahmet + faruk+ mehmet); a++) {
$('body > table.container > tbody > tr:nth-child('+ a +')').remove()
}
/*
Bu döngüyede can'ı eklemen gerekiyor
else if(index == 4){
i = i - ahmet - faruk - ege - 1 - bi önceki kişinin adı (Mehmet)
url="Can"
}
*/
if(index == 0){
i = i - 1
}else if(index == 1){
i = i - ege - 1
}else if(index == 2){
i = i - ege - faruk - 1
}else if(index == 3){
i = i - ege - ahmet - faruk - 1
}
if(result.items[i].status === "Aktiv"){
durum="Aktif"
}else if(result.items[i].status === "Ausstehend"){
durum="Beklemede";
}else if(result.items[i].status === "Warten auf die Genehmigung"){
durum="Onaybekliyor";
}else if(result.items[i].status === "in Reihe"){
durum="Sırada";
}else if(result.items[i].status === "Abgesagt"){
durum="İptal";
}else if(result.items[i].status === "Kontrolle"){
durum="Kontrol";
}else{
durum="";
}
}
});
});
});
});
},
/* Sitenin Yenilenme süresi (1sn'den az olmasın google captcha istiyo yoksa)*/
2000);
Durumlar = ["Aktif",'Beklemede','Onaybekliyor','Sırada','İptal','Kontrol']
</script>
<script src="durumlar.js"></script>
</body>
</html>