-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
461 lines (441 loc) · 11 KB
/
main.js
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
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
var departments = {
"Concept and Design" : {
name: "CD",
emails: ["rakshanaa", "anuj"]
},
"Envisage": {
name: "Envisage",
emails: ["adhitya", "pravallika"]
},
"Evolve": {
name: "Evolve",
emails: ["lsk", "sdheeraj"]
},
"Events": {
name: "Events",
emails: ["prateekm", "pooja","pruthviraj"]
},
"Finance": {
name: "Finance",
emails: ["samanth", "sowmith"]
},
"Operations and Infrastructure Planning": {
name: "O&IP",
emails: ["ramtikar", "hiteshmeena"]
},
"Publicity": {
name: "Publicity",
emails: ["py", "parthd"]
},
"Hospitality": {
name: "Hospitality",
emails: ["py", "parthd"]
},
"QMS": {
name: "QMS",
emails: ["namitha", "shiva.b"]
},
"Shows and Exhibitions": {
name: "Shows",
emails: ["ishasingh","meet"]
},
"Sponsorship and Public Relations": {
name: "Spons",
emails: ["siddhesh", "sabyasachi"]
},
"Webops": {
name: "Webops",
emails: ["akshayanand", "nilay"]
}
};
var apps = {
"Concept and Design": {
"Creative branding and Design Head": {
name: "Creative branding and Design Head",
app_name: 'Head_Creative Branding _ Design_Shaastra2019',
date: '16.04.2017'
},
"Creative branding and Design Coordinator": {
name: "Creative branding and Design Coordinator",
app_name: "Coordinator_Creative Branding and Design_Shaastra2019",
date: '16.04.2017'
},
"Creative Ambience Head": {
name: "Creative Ambience Head",
app_name: "Head_Creative Ambience_Shaastra2019",
date: '16.04.2017'
},
"Creative Ambience Coordinator": {
name: "Creative Ambience Coordinator",
app_name: "Coordinator_Creative Ambience_Shaastra2019.docx-3_merged",
date: '16.04.2017'
},
"VFX and Video Editing Head": {
name: "VFX and Video Editing Head",
app_name: "Head_VFX And Video Editing_Shaastra2019",
date: '16.04.2017'
},
"VFX and Video Editing Coordinator": {
name: "VFX and Video Editing Coordinator",
app_name: "Coordinator_VFX And Video Editing_Shaastra2019",
date: '16.04.2017'
},
"Media Head": {
name: "Media Head",
app_name: "Head_Media_Shaastra2019",
date: '16.04.2017'
},
"Media Coordinator": {
name: "Media Coordinator",
app_name: "Coordinator_Media_Shaastra2019",
date: '16.04.2017'
}
},
"Envisage":{
"Coordinator Application": {
name: "Coordinator Application",
app_name: "Shaastra2019_Envisage_CoordinatorApplication",
date: '16.04.2017'
}
},
"Events":{
"Coordinators":{
name: "Coordinators"
},
"Events Head":{
name: "Events Head"
},
"Techsoc":{
name: "Techsoc"
},
"Strategists":{
name: "Startegists"
}
},
"Evolve": {
"Summit Coordinator": {
name: "Summit Coordinator",
app_name: "Shaastra 2019_Evolve_Summit_CoordinatorApplication",
date: '16.04.2017'
},
"Spotlight Coordinator": {
name: "Spotlight Coordinator",
app_name: "Shaastra 2019_Evolve_Spotlight_CoordinatorApplication",
date: '16.04.2017'
},
"Relaunch Coordinator": {
name: "Relaunch Coordinator",
app_name: "Shaastra 2019_Evolve_Relaunch_CoordinatorApplication",
date: '16.04.2017'
},
"Summit Super Coordinator": {
name: "Summit Super Coordinator",
app_name: "Shaastra 2019_Evolve_Summit_SuperCoordinatorApplication",
date: '14.04.2017'
},
"Spotlight Super Coordinator": {
name: "Spotlight Super Coordinator",
app_name: "Shaastra 2019_Evolve_Spotlight_CoordinatorApplication",
date: '14.04.2017'
},
"Relaunch Super Coordinator": {
name: "Relaunch Super Coordinator",
app_name: "Shaastra 2019_Evolve_Relaunch_CoordinatorApplication",
date: '14.04.2017'
}
},
"Finance":{
"Finance Coordinator": {
name: "Finance Coordinator",
app_name: "Coordinator_Finance_Shaastra",
date: '16.04.2017'
},
"Finance Manager" : {
name: "Finance Manager",
app_name: "Manager_Finance_Shaastra",
date: '12.04.2017'
}
},
"Operations and Infrastructure Planning":{
"Operations Head": {
name: "Operations Head",
app_name: "OPERATONS HEAD APPLICATION",
date: '13.04.2017'
},
"Catering Head": {
name: "Catering Head",
app_name: "CATERING HEAD APPLICATION",
date: '13.04.2017'
},
"General Arrangements Coordinator": {
name: "General Arrangements Coordinator",
app_name: "GA COORDINATOR APPLICATION ",
date: '16.04.2017'
},
"Catering Coordinator": {
name: "Catering Coordinator",
app_name: "CATERING COORDINATOR APPLICATION",
date: '16.04.2017'
}
},
"Publicity":{
"Coordinator Application": {
name: "Coordinator Application",
app_name: "Shaastra 2019 Publicity Coordinator Application",
date: '16.04.2017'
},
"Strategist": {
name: "Strategist",
app_name: "Shaastra 2019 Publicity Strategist Application",
date: '16.04.2017'
}
},
"Hospitality":{
"Coordinator Application": {
name: "Coordinator Application",
app_name: "Hospitality_Coordinator_Shaastra19",
date: '16.04.2017'
},
"Head": {
name: "Head",
app_name: "Hospitality_Head_Shaastra19",
date: '16.04.2017'
}
},
"QMS":{
"QMS Asst Manager": {
name: "QMS Asst Manager",
app_name: "QMS_Asst Manager ( Event Verticals)",
date: '13.04.2017'
},
"QMS Manager": {
name: "QMS Manager",
app_name: "QMS_Manager ( Departments)",
date: '13.04.2017'
}
},
"Shows and Exhibitions":{
"Shows Coordinator": {
name: "Shows Coordinator",
app_name: "Shows_S_E_Coordinator",
date: '14.04.2017'
},
"Exhibitions Super Coordinator": {
name: "Exhibitions Super Coordinator",
app_name: "Exhibitions_S_E_Supercoordinator",
date: '14.04.2017'
},
"Tech and Innovation Fair Super Coordinator": {
name: "Tech and Innovation Fair Super Coordinator",
app_name: "TIF_S_E_Supercoordinator",
date: '14.04.2017'
},
"Tech Creation Super Coordinator": {
name: "Tech Creation Super Coordinator",
app_name: "Techcreation_S_E_Supercoordinator",
date: '14.04.2017'
},
"Exhibitions Coordinator": {
name: "Exhibitions Coordinator",
app_name: "Exhibitions_S_E_Coordinator",
date: '16.04.2017'
},
"Tech and Innovation Fair Coordinator": {
name: "Tech and Innovation Fair Coordinator",
app_name: "TIF_S_E_Coordinator",
date: '16.04.2017'
},
"Tech Creation Coordinator": {
name: "Tech Creation Coordinator",
app_name: "Techcreation_S_E_Coordinator",
date: '16.04.2017'
}
},
"Sponsorship and Public Relations":{
"Corporate Relations": {
name: "Corporate Relations",
app_name: "Corporate relations_Sponsorship _ PR_Coordinator",
date: '14.04.2017'
},
"PR Executives": {
name: "PR Executives",
app_name: "PR Executive_Sponsorship _ PR_Coordinator",
date: '18.04.2017'
},
"Engage and Endaevour": {
name: "Engage and Endaevour",
app_name: "Engage-Endeavour_Sponsorship _ PR",
date: '15.04.2017'
}
},
"Webops":{
"Frontend Coordinator": {
name: "Frontend Coordinator",
app_name: "Shaastra_2019_WebOps_Frontend_Application",
date: '27.05.2017'
},
"Backend Coordinator": {
name: "Backend Coordinator",
app_name: "Shaastra_2019_WebOps_BackendApplication",
date: '27.05.2017'
},
"Frontend Super Coordinator": {
name: "Frontend Super Coordinator",
app_name: "Shaastra_2019_WebOps_Frontend_Application",
date: '16.04.2017'
},
"Backend Super Coordinator": {
name: "Backend Super Coordinator",
app_name: "Shaastra_2019_WebOps_BackendApplication",
date: '16.04.2017'
},
"MobOps Super Coordinator": {
name: "MobOps Super Coordinator",
app_name: "Shaastra_2019_WebOps_Hybrid_Application",
date: '16.04.2017'
},
"MobOps Coordinator": {
name: "MobOps Coordinator",
app_name: "Shaastra_2019_WebOps_Hybrid_Application",
date: '16.04.2017'
}
}
}
var events = {
"Coordinators":{
"Events Coordinator": {
name: "Events Coordinator",
app_name: "Events Coordinator Application Shaastra 19",
date: '16.04.2017'
}
},
"Events Head":{
"Aerofest Head": {
name: "Aerofest Head",
app_name: "Aerofest Head Application Shaastra 19",
date: '16.04.2017'
},
"BEvents Head": {
name: "Bevents Head",
app_name: "BEvents Head Application Shaastra19",
date: '16.04.2017'
},
"Coding Head": {
name: "Coding Head",
app_name: "Coding Head Application Shaastra 19",
date: '16.04.2017'
},
"D_B Head": {
name: "D_B Head",
app_name: "D_B Head Application Shaastra 19",
date: '16.04.2017'
},
"Elecfest Head": {
name: "Elecfest Head",
app_name: "Elecfest Head Application Shaastra 19",
date: '16.04.2017'
},
"Flagships Head": {
name: "Flagships Head",
app_name: "Flagships Head Application Shaastra 19",
date: '16.04.2017'
},
"I_Q Head": {
name: "I_Q Head",
app_name: "I_Q Head Application Shaastra 19",
date: '16.04.2017'
},
"REvents Head": {
name: "REvents Head",
app_name: "REvents Head Application Shaastra19",
date: '16.04.2017'
},
"Workshops Head": {
name: "Workshops Head",
app_name: "Workshops Head Application Shaastra 19",
date: '16.04.2017'
}
},
"Techsoc":{
"TechSoc Head": {
name: "TechSoc Head",
app_name: "TechSoc Head Application Shaastra 19",
date: '16.04.2017'
},
},
"Strategists":{
"Strategist Head": {
name: "Strategist Head",
app_name: "Strategist Application Shaastra 19",
date: '16.04.2017'
}
}
};
var path = '';
var app = angular.module("CoordApps", ['ngMaterial']);
app.controller('app-controller', function($scope,$window){
this.display = false;
this.depts = departments;
this.app = apps;
this.event = events;
this.path = 'http://res.cloudinary.com/shaastra-apps/image/upload/';
this.posts = [];
$scope.display = false;
this.initValue = "--Select Department--";
var department, position;
this.department = '';
this.position = '';
this.vertical = '';
//
// this.setDept = function(){
// this.department = document.getElementById('dept').value;
// };
//
// this.setPos = function(){
// this.position = document.getElementById('position').value;
// }
this.showPDF = function(){
var app_name = '';
var j=0;
if($scope.vertical != null)
{
$scope.position = $scope.vertical;
}
for (var i=0; i<$scope.position.app_name.length; i++) {
if ($scope.position.app_name[i] === ' ') {
if (j>0) {
if (app_name[j-1] === '_') {
continue;
}
}
app_name = app_name + '_';
j++;
} else if ($scope.position.app_name[i] === '(' || $scope.position.app_name[i] === ')') {
continue;
} else {
app_name = app_name + $scope.position.app_name[i];
j++;
}
}
if (app_name[app_name.length-1] === '_') {
app_name = app_name.slice(0,-1);
}
$window.open(this.path + app_name +'.pdf', '_blank');
//path = './uploads/'+$scope.department+'/'+$scope.position.app_name+'.pdf';
//var win = window.open(path, '_blank');
//win.focus();
// var d = document.getElementById('dept').value;
// var p = document.getElementById('position').value;
//
// if(!(d === '--Select Department--' && p === '--Select Position--'))
// {
// path = './uploads/'+departments[d].name+'/'+apps[d][p]["app_name"]+'.pdf';
// var win = window.open(path, '_blank');
// win.focus();
// }
};
this.show = function()
{
this.display = true;
}
});