Skip to content

Commit b204ebf

Browse files
committed
Fixed some bugs
1 parent e576211 commit b204ebf

16 files changed

+3832
-3359
lines changed

package-lock.json

Lines changed: 3462 additions & 3224 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -13,61 +13,65 @@
1313
},
1414
"private": true,
1515
"dependencies": {
16-
"@angular/animations": "~12.0.1",
17-
"@angular/cdk": "^12.0.3",
18-
"@angular/common": "~12.0.1",
19-
"@angular/core": "~12.0.1",
16+
"@angular/animations": "^12.0.5",
17+
"@angular/cdk": "^12.2.8",
18+
"@angular/common": "^12.0.5",
19+
"@angular/core": "^12.0.5",
2020
"@angular/fire": "^6.1.5",
21-
"@angular/forms": "~12.0.1",
22-
"@angular/material": "^12.0.3",
23-
"@angular/platform-browser": "~12.0.1",
24-
"@angular/platform-browser-dynamic": "~12.0.1",
25-
"@angular/router": "~12.0.1",
21+
"@angular/forms": "^12.0.5",
22+
"@angular/material": "^12.2.8",
23+
"@angular/platform-browser": "^12.0.5",
24+
"@angular/platform-browser-dynamic": "^12.0.5",
25+
"@angular/router": "^12.0.5",
2626
"@capacitor/app": "1.0.0",
2727
"@capacitor/core": "3.0.0",
28-
"@capacitor/filesystem": "^1.0.0",
28+
"@capacitor/filesystem": "^1.0.3",
2929
"@capacitor/haptics": "1.0.0",
3030
"@capacitor/keyboard": "1.0.0",
31-
"@capacitor/storage": "^1.0.0",
32-
"@ionic/angular": "^5.5.2",
31+
"@capacitor/storage": "^1.2.0",
32+
"@ionic/angular": "^5.8.1",
3333
"@ionic/pwa-elements": "^3.0.2",
34-
"angular-calendar": "^0.28.24",
34+
"angular-calendar": "^0.28.28",
3535
"chart.js": "^2.9.3",
36-
"firebase": "^8.6.3",
37-
"ng2-charts": "^2.3.0",
36+
"electron": "^13.5.1",
37+
"firebase": "^8.10.0",
38+
"moment": "^2.29.1",
39+
"ng2-charts": "^2.4.3",
40+
"ngx-electron": "^2.2.0",
3841
"rxjs": "~6.6.0",
39-
"tslib": "^2.0.0",
42+
"tslib": "^2.3.1",
4043
"zone.js": "~0.11.4"
4144
},
4245
"devDependencies": {
43-
"@angular-devkit/build-angular": "~12.0.1",
46+
"@angular-devkit/build-angular": "^12.0.5",
4447
"@angular-eslint/builder": "~12.0.0",
4548
"@angular-eslint/eslint-plugin": "~12.0.0",
4649
"@angular-eslint/eslint-plugin-template": "~12.0.0",
4750
"@angular-eslint/template-parser": "~12.0.0",
48-
"@angular/cli": "~12.0.1",
49-
"@angular/compiler": "~12.0.1",
50-
"@angular/compiler-cli": "~12.0.1",
51-
"@angular/language-service": "~12.0.1",
51+
"@angular/cli": "^12.0.5",
52+
"@angular/compiler": "^12.0.5",
53+
"@angular/compiler-cli": "^12.0.5",
54+
"@angular/language-service": "^12.0.5",
5255
"@capacitor/cli": "3.0.0",
5356
"@ionic/angular-toolkit": "^4.0.0",
57+
"@ionic/lab": "3.2.10",
5458
"@types/jasmine": "~3.6.0",
55-
"@types/jasminewd2": "~2.0.3",
56-
"@types/node": "^12.11.1",
59+
"@types/jasminewd2": "^2.0.10",
60+
"@types/node": "^12.20.27",
5761
"@typescript-eslint/eslint-plugin": "4.16.1",
5862
"@typescript-eslint/parser": "4.16.1",
59-
"eslint": "^7.6.0",
63+
"eslint": "^7.32.0",
6064
"eslint-plugin-import": "2.22.1",
6165
"eslint-plugin-jsdoc": "30.7.6",
6266
"eslint-plugin-prefer-arrow": "1.2.2",
6367
"jasmine-core": "~3.7.1",
6468
"jasmine-spec-reporter": "~5.0.0",
65-
"karma": "~6.3.2",
69+
"karma": "^6.3.4",
6670
"karma-chrome-launcher": "~3.1.0",
6771
"karma-coverage": "~2.0.3",
6872
"karma-coverage-istanbul-reporter": "~3.0.2",
6973
"karma-jasmine": "~4.0.0",
70-
"karma-jasmine-html-reporter": "^1.5.0",
74+
"karma-jasmine-html-reporter": "^1.7.0",
7175
"protractor": "~7.0.0",
7276
"ts-node": "~8.3.0",
7377
"typescript": "~4.2.4"

src/app/all-notifications/all-notifications.component.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,6 @@ export class AllNotificationsComponent implements OnInit {
149149
this.selectedNotificationSubtitle=date
150150
this.selectedNotificationBody=body
151151
this.selectedNotificationTags=tags;
152-
console.log(this.selectedNotificationTitle)
153-
console.log(this.selectedNotificationBody)
154-
console.log(this.selectedNotificationSubtitle)
155-
console.log(this.selectedNotificationTags)
156-
157152
}
158153
closeNotification(){
159154
var card = document.getElementById("hiddenInfoCard") as HTMLElement;

src/app/dashboard/dashboard.component.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<ion-content>
55
<ion-list id="inbox-list">
66
<ion-avatar>
7-
<img [src]="authService.getUserPhoto()" alt="User">
7+
<img [src]="authService.getUserPhoto()" referrerpolicy="no-referrer" alt="User">
88
</ion-avatar>
99
<ion-list-header>{{authService.getUserName()}}&nbsp;&nbsp;<ion-chip color="danger" outline>Live</ion-chip></ion-list-header>
1010
<ion-note>{{authService.getUserEmail()}}</ion-note>
@@ -44,9 +44,9 @@
4444
<ion-label>{{ label }}</ion-label>
4545
</ion-item>
4646
</ion-list>
47-
<ion-item>
48-
<ion-button (click)="authService.SignOut()" color="danger">Log Out</ion-button>
49-
</ion-item>
47+
<div class="uk-width-1-1">
48+
<ion-button (click)="authService.SignOut()" class="uk-width-1-1 logout">Log Out</ion-button>
49+
</div>
5050
</ion-content>
5151
</ion-menu>
5252
<ion-router-outlet id="main-content"></ion-router-outlet>

src/app/dashboard/dashboard.component.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,13 @@ ion-searchbar{
161161
height:100px;
162162
transform: translate(-50%,-50%);
163163
}
164+
.logout{
165+
--border-radius: 20px;
166+
border-radius: 20px;
167+
border:2px rgb(255, 87, 109) solid;
168+
--background: rgba(255, 87, 109,0.3);
169+
color:rgb(255, 87, 109);
170+
}
164171
@media (prefers-color-scheme:dark){
165172
#overlay{
166173
background-color: #07172cbd;

src/app/dashboard/dashboard.component.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ export class DashboardComponent implements OnInit {
5959

6060
constructor(public authService:AuthService,public dataProvider:DataProvider,public usersInfoService:UsersInfoService) {
6161
this.dataProvider.showOverlay=true;
62+
console.log(this.authService.userId);
6263
this.usersInfoService.getCurrentUserData().subscribe((value)=>{
6364
this.userAccessLevel=-1;
6465
this.dataProvider.accessLevel=-1;
@@ -78,7 +79,14 @@ export class DashboardComponent implements OnInit {
7879
this.dataProvider.showOverlay=false;
7980
})
8081
}
81-
82+
openNotification(title,date,body,tags){
83+
var card = document.getElementById("hiddenInfoCard") as HTMLElement;
84+
card.style.right="-10px";
85+
}
86+
closeNotification(){
87+
var card = document.getElementById("hiddenInfoCard") as HTMLElement;
88+
card.style.right="-60vw";
89+
}
8290
ngOnInit() {
8391
}
8492

src/app/home/home.component.html

Lines changed: 126 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,37 +44,87 @@
4444
<ion-row>
4545
<ion-col>
4646
<ion-label class="uk-width-expand sideDivider">
47-
<span class="txt3 success">Payroll</span>
47+
<span class="txt3 success">Projects in progress</span>
4848
<br>
49-
<span class="txt4 success"><span class="txt1">29</span> Calendar days</span>
49+
<span class="txt4 success"><span class="txt1">{{totalProjects}}</span></span>
5050
</ion-label>
5151
</ion-col>
5252
<ion-col>
5353
<ion-label class="uk-width-expand sideDivider">
54-
<span class="txt3 primary">Total Employees</span>
54+
<span class="txt3 primary">Leave taken</span>
5555
<br>
56-
<span class="txt1 primary">130</span>
56+
<span class="txt1 primary">{{totalLeavesTaken}}</span>
5757
</ion-label>
5858
</ion-col>
5959
<ion-col>
6060
<ion-label class="uk-width-expand sideDivider">
61-
<span class="txt3 warning">Working Days</span>
61+
<span class="txt3 warning">Working days</span>
6262
<br>
6363
<span class="txt1 warning">{{totalWorkingDays}} |</span><span class="warning"> and {{totalCompleteDays}} are complete</span>
6464
</ion-label>
6565
</ion-col>
6666
<ion-col>
6767
<ion-label class="uk-width-expand">
68-
<span class="txt3 danger">Payroll Processed</span>
68+
<span class="txt3 danger">Project Completed</span>
6969
<br>
70-
<span class="txt1 danger">121</span>
71-
<span class="txt3 danger">/130</span>
70+
<span class="txt1 danger">{{totalCompletedProjects}}</span>
7271
</ion-label>
7372
</ion-col>
7473
</ion-row>
7574
</ion-grid>
7675
</ion-card>
7776
</div>
77+
<div>
78+
<ion-reorder slot="end">
79+
<ion-icon name="swap-vertical-outline"></ion-icon>
80+
</ion-reorder>
81+
<ion-row>
82+
<ion-card class="uk-width-1-1">
83+
<ion-label class="txt2">Quick actions for you</ion-label>
84+
<ion-grid>
85+
<ion-row>
86+
<ion-col>
87+
<ion-item>
88+
<ion-label>Request A Leave </ion-label>
89+
<ion-icon slot="end" size="large" color="tertiary" name="card"></ion-icon>
90+
</ion-item>
91+
<ion-button [disabled]="!leaveFormAllowed" expand="block" color="tertiary" shape="round" (click)="openNotification()">
92+
Complete Action
93+
</ion-button>
94+
<ion-label color="danger" *ngIf="!leaveFormAllowed">You can't take a leave because you used all of them</ion-label>
95+
</ion-col>
96+
<ion-col>
97+
<ion-item>
98+
<ion-label>Submit a new project idea.</ion-label>
99+
<ion-icon slot="end" size="large" color="warning" name="document-text"></ion-icon>
100+
</ion-item>
101+
<ion-button expand="block" color="warning" shape="round">
102+
Generate Report
103+
</ion-button>
104+
</ion-col>
105+
<ion-col>
106+
<ion-item>
107+
<ion-label>Contact current project team.</ion-label>
108+
<ion-icon slot="end" size="large" color="primary" name="chatbox-ellipses"></ion-icon>
109+
</ion-item>
110+
<ion-button expand="block" color="primary" shape="round">
111+
Message Everyone
112+
</ion-button>
113+
</ion-col>
114+
<ion-col>
115+
<ion-item>
116+
<ion-label>Check code </ion-label>
117+
<ion-icon slot="end" size="large" color="danger" name="cellular"></ion-icon>
118+
</ion-item>
119+
<ion-button expand="block" color="danger" shape="round">
120+
Get Increment Score
121+
</ion-button>
122+
</ion-col>
123+
</ion-row>
124+
</ion-grid>
125+
</ion-card>
126+
</ion-row>
127+
</div>
78128
<div>
79129
<ion-reorder slot="end">
80130
<ion-icon name="swap-vertical-outline"></ion-icon>
@@ -252,3 +302,71 @@
252302
</ion-list>
253303
</div>
254304
</ion-content>
305+
<ion-card id="hiddenInfoCard">
306+
<ion-button (click)="closeNotification()" expand="full" fill="clear">
307+
<ion-icon name="close"></ion-icon>
308+
&nbsp;&nbsp;Close Panel
309+
</ion-button>
310+
<ion-label color="success" class="txt2 uk-align-center" style="width:max-content;">You have {{totalLeaveLeft}} leaves left for this annum</ion-label>
311+
<ion-card>
312+
<form [formGroup]="form" action="">
313+
<ion-input
314+
type="text"
315+
autofocus
316+
placeholder="Reason"
317+
inputmode="text"
318+
required
319+
formControlName="reason"
320+
max="20"
321+
clearInput="true"
322+
#reason
323+
></ion-input>
324+
<ion-textarea
325+
type="text"
326+
placeholder="Description"
327+
inputmode="text"
328+
required
329+
clearInput="true"
330+
#description
331+
formControlName="description"
332+
></ion-textarea>
333+
<ion-input
334+
type="number"
335+
placeholder="Total Leave Days"
336+
inputmode="text"
337+
required
338+
clearInput="true"
339+
[min]="1"
340+
[max]="totalLeaveLeft"
341+
#totalDays
342+
formControlName="totalDays"
343+
></ion-input>
344+
<ion-item>
345+
<ion-label>Start Date</ion-label>
346+
<ion-datetime
347+
value="1990-02-19"
348+
placeholder="Select Date"
349+
#startingDate
350+
required
351+
[min]="minDateInISO"
352+
(ionChange)="changedDate(startingDate.value)"
353+
formControlName="startingDate"></ion-datetime>
354+
</ion-item>
355+
<ion-item>
356+
<ion-label>Start Date</ion-label>
357+
<ion-datetime
358+
placeholder="Select Date"
359+
#endingDate
360+
required
361+
[disabled]="startingDate.value==''"
362+
[min]="minEndDateInISO"
363+
[max]="maxDateInISO"
364+
formControlName="endingDate"></ion-datetime>
365+
</ion-item>
366+
<ion-button class="uk-align-center" (click)="addLeaveRequest()" type="submit" [disabled]="isLoading || !form.valid"
367+
[ngClass]="isLoading || !form.valid ? 'disabled' : ''" shape="round" color="success">
368+
<ion-icon name="log-in-outline" size="large"></ion-icon>&nbsp;Sign Up
369+
</ion-button>
370+
</form>
371+
</ion-card>
372+
</ion-card>

src/app/home/home.component.scss

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,18 @@ td{
4747
.uk-table{
4848
transition: all 1s ease-in-out;
4949
}
50+
#hiddenInfoCard{
51+
--background: var(--ion-color-light-shade);
52+
position:absolute;
53+
top:0px;
54+
right:-60vw;
55+
width:50vw;
56+
z-index:500;
57+
height:100vh;
58+
overflow: hidden;
59+
transition: all 1s ease-in-out;
60+
}
61+
5062

5163

5264

0 commit comments

Comments
 (0)