Browse Source

Roles being assigned successsfully

JaseG256 6 years ago
parent
commit
2aa92da478

+ 1
- 1
ZipTeamOrange-ionic-UI/.sourcemaps/main.js.map
File diff suppressed because it is too large
View File


+ 41
- 0
ZipTeamOrange-ionic-UI/.vscode/typings/cordova-ionic/plugins/keyboard.d.ts View File

1
+// Type definitions for Cordova Keyboard plugin
2
+// Project: https://github.com/driftyco/ionic-plugins-keyboard
3
+// Definitions by: Hendrik Maus <https://github.com/hendrikmaus>
4
+// Definitions: https://github.com/borisyankov/DefinitelyTyped
5
+
6
+declare module Ionic {
7
+  interface Keyboard {
8
+
9
+    /**
10
+     * Hide the keyboard accessory bar with the next, previous and done buttons.
11
+     *
12
+     * @param hide
13
+     */
14
+    hideKeyboardAccessoryBar(hide:boolean): void;
15
+
16
+    /**
17
+     * Close the keyboard if it is open.
18
+     */
19
+    close(): void;
20
+    
21
+    /**
22
+     * Force keyboard to be shown on Android.
23
+     * This typically helps if autofocus on a text element does not pop up the keyboard automatically
24
+     * 
25
+     * Supported Platforms: Android, Blackberry 10
26
+     */
27
+    show(): void;
28
+
29
+    /**
30
+     * Disable native scrolling, useful if you are using JavaScript to scroll
31
+     *
32
+     * @param disbale
33
+     */
34
+    disableScroll(disbale:boolean): void;
35
+
36
+    /**
37
+     * Whether or not the keyboard is currently visible.
38
+     */
39
+    isVisible: boolean;
40
+  }
41
+}

+ 3208
- 0
ZipTeamOrange-ionic-UI/.vscode/typings/jquery/jquery.d.ts
File diff suppressed because it is too large
View File


+ 1
- 1
ZipTeamOrange-ionic-UI/src/pages/firstPage/first.ts View File

33
     this.authService.postData(createAccountInfo).then((result) => {
33
     this.authService.postData(createAccountInfo).then((result) => {
34
       this.responseData = result;
34
       this.responseData = result;
35
       console.log(createAccountInfo);
35
       console.log(createAccountInfo);
36
-      if(!this.responseData.createAccountInfo){
36
+      if(this.responseData.createAccountInfo){
37
         this.navCtrl.push(ChatPage);
37
         this.navCtrl.push(ChatPage);
38
       }else{
38
       }else{
39
         console.log("check your info");
39
         console.log("check your info");

+ 3
- 0
ZipTeamOrange-ionic-UI/typings/cordova-typings.d.ts View File

1
+
2
+/// <reference path="../.vscode/typings/cordova-ionic/plugins/keyboard.d.ts"/>
3
+/// <reference path="../.vscode/typings/jquery/jquery.d.ts"/>

+ 13
- 14
ZipTeamOrange-ionic-UI/www/build/main.js View File

52
     };
52
     };
53
     ChatPage = __decorate([
53
     ChatPage = __decorate([
54
         Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({
54
         Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({
55
-            selector: 'page-chat',template:/*ion-inline-start:"/Users/alizalang/Desktop/ZipTeam/ZipTeamOrange-ionic-UI/src/pages/chat/chat.html"*/'<!--\n  Generated template for the ChatPage page.\n\n  See http://ionicframework.com/docs/components/#navigation for more info on\n  Ionic pages and navigation.\n-->\n<ion-header>\n\n  <ion-navbar>\n    <ion-title>chatPage</ion-title>\n  </ion-navbar>\n\n</ion-header>\n<!-- *ngFor="let m of msg">{{ m }} -->\n\n<ion-content padding >\n  <div *ngFor="let m of msg">\n    {{ m.message }}\n  </div>\n\n  <form  #test1="ngForm" ng-submit="send(test1.value)">\n    <ion-textarea  type="text" name="message" [(ngModel)]="test" ></ion-textarea>\n    <button ion-button (click)="send(test1.value)"(click)="getMessages()">send</button>\n  </form>\n</ion-content>\n'/*ion-inline-end:"/Users/alizalang/Desktop/ZipTeam/ZipTeamOrange-ionic-UI/src/pages/chat/chat.html"*/,
55
+            selector: 'page-chat',template:/*ion-inline-start:"/Users/jasong/Labs/ZipTeam/ZipTeamOrange-ionic-UI/src/pages/chat/chat.html"*/'<!--\n  Generated template for the ChatPage page.\n\n  See http://ionicframework.com/docs/components/#navigation for more info on\n  Ionic pages and navigation.\n-->\n<ion-header>\n\n  <ion-navbar>\n    <ion-title>chatPage</ion-title>\n  </ion-navbar>\n\n</ion-header>\n<!-- *ngFor="let m of msg">{{ m }} -->\n\n<ion-content padding >\n  <div *ngFor="let m of msg">\n    {{ m.message }}\n  </div>\n\n  <form  #test1="ngForm" ng-submit="send(test1.value)">\n    <ion-textarea  type="text" name="message" [(ngModel)]="test" ></ion-textarea>\n    <button ion-button (click)="send(test1.value)"(click)="getMessages()">send</button>\n  </form>\n</ion-content>\n'/*ion-inline-end:"/Users/jasong/Labs/ZipTeam/ZipTeamOrange-ionic-UI/src/pages/chat/chat.html"*/,
56
         }),
56
         }),
57
-        __metadata("design:paramtypes", [typeof (_a = typeof __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["e" /* NavController */] !== "undefined" && __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["e" /* NavController */]) === "function" && _a || Object, typeof (_b = typeof __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["f" /* NavParams */] !== "undefined" && __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["f" /* NavParams */]) === "function" && _b || Object, typeof (_c = typeof __WEBPACK_IMPORTED_MODULE_2__providers_message_service_message_service__["a" /* MessageServiceProvider */] !== "undefined" && __WEBPACK_IMPORTED_MODULE_2__providers_message_service_message_service__["a" /* MessageServiceProvider */]) === "function" && _c || Object])
57
+        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["e" /* NavController */], __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["f" /* NavParams */], __WEBPACK_IMPORTED_MODULE_2__providers_message_service_message_service__["a" /* MessageServiceProvider */]])
58
     ], ChatPage);
58
     ], ChatPage);
59
     return ChatPage;
59
     return ChatPage;
60
-    var _a, _b, _c;
61
 }());
60
 }());
62
 
61
 
63
 //# sourceMappingURL=chat.js.map
62
 //# sourceMappingURL=chat.js.map
108
         this.authService.postData(createAccountInfo).then(function (result) {
107
         this.authService.postData(createAccountInfo).then(function (result) {
109
             _this.responseData = result;
108
             _this.responseData = result;
110
             console.log(createAccountInfo);
109
             console.log(createAccountInfo);
111
-            if (!_this.responseData.createAccountInfo) {
110
+            if (_this.responseData.createAccountInfo) {
112
                 _this.navCtrl.push(__WEBPACK_IMPORTED_MODULE_4__chat_chat__["a" /* ChatPage */]);
111
                 _this.navCtrl.push(__WEBPACK_IMPORTED_MODULE_4__chat_chat__["a" /* ChatPage */]);
113
             }
112
             }
114
             else {
113
             else {
122
     };
121
     };
123
     FirstPage = __decorate([
122
     FirstPage = __decorate([
124
         Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({
123
         Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({
125
-            selector: 'page-first',template:/*ion-inline-start:"/Users/alizalang/Desktop/ZipTeam/ZipTeamOrange-ionic-UI/src/pages/firstPage/first.html"*/'<!--\n  Generated template for the FirstPage page.\n\n  See http://ionicframework.com/docs/components/#navigation for more info on\n  Ionic pages and navigation.\n-->\n<ion-header>\n  <ion-navbar color="primary">\n    <button menuToggle ion- button icon-only>\n      <ion-icon name ="menu"></ion-icon>\n    </button>\n    <ion-title text-center>ZipTeamOrange</ion-title>\n  </ion-navbar>\n\n</ion-header>\n\n\n<ion-content padding>\n  <h4>Welcome to this page</h4>\n  <div class="login-box">\n    <form #registerForm="ngForm" ng-submit="loginButton(registerForm.value)" >\n      <ion-row>\n        <ion-col>\n          <ion-list inset>\n            <ion-item>\n              <ion-input type="text" placeholder="Username" name="userName" required [(ngModel)]="Username" ></ion-input>\n            </ion-item>\n            <ion-item>\n              <ion-input type="password" placeholder="Password" name="password" required [(ngModel)]="password"></ion-input>\n            </ion-item>\n          </ion-list>\n        </ion-col>\n      </ion-row>\n      <ion-row>\n        <ion-col class="signup-col">\n          <button ion-button class="submit-btn" full type="submit" [disabled]="!registerForm.form.valid" (click)="loginButton(registerForm.value)">Login</button>\n        </ion-col>\n      </ion-row>\n    </form>\n    <ion-row>\n      <ion-col color="secondary">\n        <button ion-button class="register-btn" block clear (click)="createAccount()">Create Account</button>\n      </ion-col>\n    </ion-row>\n  </div>\n  \n</ion-content>'/*ion-inline-end:"/Users/alizalang/Desktop/ZipTeam/ZipTeamOrange-ionic-UI/src/pages/firstPage/first.html"*/,
124
+            selector: 'page-first',template:/*ion-inline-start:"/Users/jasong/Labs/ZipTeam/ZipTeamOrange-ionic-UI/src/pages/firstPage/first.html"*/'<!--\n  Generated template for the FirstPage page.\n\n  See http://ionicframework.com/docs/components/#navigation for more info on\n  Ionic pages and navigation.\n-->\n<ion-header>\n  <ion-navbar color="primary">\n    <button menuToggle ion- button icon-only>\n      <ion-icon name ="menu"></ion-icon>\n    </button>\n    <ion-title text-center>ZipTeamOrange</ion-title>\n  </ion-navbar>\n\n</ion-header>\n\n\n<ion-content padding>\n  <h4>Welcome to this page</h4>\n  <div class="login-box">\n    <form #registerForm="ngForm" ng-submit="loginButton(registerForm.value)" >\n      <ion-row>\n        <ion-col>\n          <ion-list inset>\n            <ion-item>\n              <ion-input type="text" placeholder="Username" name="userName" required [(ngModel)]="Username" ></ion-input>\n            </ion-item>\n            <ion-item>\n              <ion-input type="password" placeholder="Password" name="password" required [(ngModel)]="password"></ion-input>\n            </ion-item>\n          </ion-list>\n        </ion-col>\n      </ion-row>\n      <ion-row>\n        <ion-col class="signup-col">\n          <button ion-button class="submit-btn" full type="submit" [disabled]="!registerForm.form.valid" (click)="loginButton(registerForm.value)">Login</button>\n        </ion-col>\n      </ion-row>\n    </form>\n    <ion-row>\n      <ion-col color="secondary">\n        <button ion-button class="register-btn" block clear (click)="createAccount()">Create Account</button>\n      </ion-col>\n    </ion-row>\n  </div>\n  \n</ion-content>'/*ion-inline-end:"/Users/jasong/Labs/ZipTeam/ZipTeamOrange-ionic-UI/src/pages/firstPage/first.html"*/,
126
         }),
125
         }),
127
-        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["e" /* NavController */], __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["f" /* NavParams */], __WEBPACK_IMPORTED_MODULE_3__providers_auth_service_auth_service__["a" /* AuthServiceProvider */]])
126
+        __metadata("design:paramtypes", [typeof (_a = typeof __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["e" /* NavController */] !== "undefined" && __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["e" /* NavController */]) === "function" && _a || Object, typeof (_b = typeof __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["f" /* NavParams */] !== "undefined" && __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["f" /* NavParams */]) === "function" && _b || Object, typeof (_c = typeof __WEBPACK_IMPORTED_MODULE_3__providers_auth_service_auth_service__["a" /* AuthServiceProvider */] !== "undefined" && __WEBPACK_IMPORTED_MODULE_3__providers_auth_service_auth_service__["a" /* AuthServiceProvider */]) === "function" && _c || Object])
128
     ], FirstPage);
127
     ], FirstPage);
129
     return FirstPage;
128
     return FirstPage;
129
+    var _a, _b, _c;
130
 }());
130
 }());
131
 
131
 
132
 //# sourceMappingURL=first.js.map
132
 //# sourceMappingURL=first.js.map
186
     };
186
     };
187
     SignUpPage = __decorate([
187
     SignUpPage = __decorate([
188
         Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({
188
         Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({
189
-            selector: 'page-sign-up',template:/*ion-inline-start:"/Users/alizalang/Desktop/ZipTeam/ZipTeamOrange-ionic-UI/src/pages/sign-up/sign-up.html"*/'<!--\n  Generated template for the SignUpPage page.\n\n  See http://ionicframework.com/docs/components/#navigation for more info on\n  Ionic pages and navigation.\n-->\n<ion-header>\n\n    <ion-navbar color="primary">\n      <ion-title>sign-up</ion-title>\n    </ion-navbar>\n  \n  </ion-header>\n  \n  \n  <ion-content padding>\n      <div class="signUp-box">\n      <form #registerForm="ngForm" ng-submit="save(registerForm.value)">\n        <ion-row>\n          <ion-col>\n            <ion-list inset>\n              <ion-item>\n                <ion-input type="text" placeholder="Username" name="userName" required [(ngModel)]="Username" ></ion-input>\n              </ion-item>\n              <ion-item>\n                  <ion-input type="text" placeholder="Email" name="email" required [(ngModel)]="Email" ></ion-input>\n                </ion-item>\n              <ion-item>\n                <ion-input type="password" placeholder="Password" name="password" required [(ngModel)]="password"></ion-input>\n              </ion-item>\n            </ion-list>\n          </ion-col>\n        </ion-row>\n        <ion-row>\n          <ion-col class="signup-col">\n            <button ion-button class="submit-btn" full type="submit" (click)="save(registerForm.value)" [disabled]="!registerForm.form.valid">Create Account</button>\n          </ion-col>\n        </ion-row>\n      </form>\n    \n    </div>\n  \n  </ion-content>\n  \n'/*ion-inline-end:"/Users/alizalang/Desktop/ZipTeam/ZipTeamOrange-ionic-UI/src/pages/sign-up/sign-up.html"*/,
189
+            selector: 'page-sign-up',template:/*ion-inline-start:"/Users/jasong/Labs/ZipTeam/ZipTeamOrange-ionic-UI/src/pages/sign-up/sign-up.html"*/'<!--\n  Generated template for the SignUpPage page.\n\n  See http://ionicframework.com/docs/components/#navigation for more info on\n  Ionic pages and navigation.\n-->\n<ion-header>\n\n    <ion-navbar color="primary">\n      <ion-title>sign-up</ion-title>\n    </ion-navbar>\n  \n  </ion-header>\n  \n  \n  <ion-content padding>\n      <div class="signUp-box">\n      <form #registerForm="ngForm" ng-submit="save(registerForm.value)">\n        <ion-row>\n          <ion-col>\n            <ion-list inset>\n              <ion-item>\n                <ion-input type="text" placeholder="Username" name="userName" required [(ngModel)]="Username" ></ion-input>\n              </ion-item>\n              <ion-item>\n                  <ion-input type="text" placeholder="Email" name="email" required [(ngModel)]="Email" ></ion-input>\n                </ion-item>\n              <ion-item>\n                <ion-input type="password" placeholder="Password" name="password" required [(ngModel)]="password"></ion-input>\n              </ion-item>\n            </ion-list>\n          </ion-col>\n        </ion-row>\n        <ion-row>\n          <ion-col class="signup-col">\n            <button ion-button class="submit-btn" full type="submit" (click)="save(registerForm.value)" [disabled]="!registerForm.form.valid">Create Account</button>\n          </ion-col>\n        </ion-row>\n      </form>\n    \n    </div>\n  \n  </ion-content>\n  \n'/*ion-inline-end:"/Users/jasong/Labs/ZipTeam/ZipTeamOrange-ionic-UI/src/pages/sign-up/sign-up.html"*/,
190
         }),
190
         }),
191
         __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["e" /* NavController */], __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["f" /* NavParams */], __WEBPACK_IMPORTED_MODULE_2__providers_api_service_api_service__["a" /* ApiServiceProvider */], __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["h" /* ToastController */]])
191
         __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["e" /* NavController */], __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["f" /* NavParams */], __WEBPACK_IMPORTED_MODULE_2__providers_api_service_api_service__["a" /* ApiServiceProvider */], __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["h" /* ToastController */]])
192
     ], SignUpPage);
192
     ], SignUpPage);
288
     };
288
     };
289
     MessageServiceProvider = __decorate([
289
     MessageServiceProvider = __decorate([
290
         Object(__WEBPACK_IMPORTED_MODULE_1__angular_core__["A" /* Injectable */])(),
290
         Object(__WEBPACK_IMPORTED_MODULE_1__angular_core__["A" /* Injectable */])(),
291
-        __metadata("design:paramtypes", [typeof (_a = typeof __WEBPACK_IMPORTED_MODULE_0__angular_common_http__["a" /* HttpClient */] !== "undefined" && __WEBPACK_IMPORTED_MODULE_0__angular_common_http__["a" /* HttpClient */]) === "function" && _a || Object])
291
+        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_0__angular_common_http__["a" /* HttpClient */]])
292
     ], MessageServiceProvider);
292
     ], MessageServiceProvider);
293
     return MessageServiceProvider;
293
     return MessageServiceProvider;
294
-    var _a;
295
 }());
294
 }());
296
 
295
 
297
 //# sourceMappingURL=message-service.js.map
296
 //# sourceMappingURL=message-service.js.map
431
         this.tab4Root = __WEBPACK_IMPORTED_MODULE_2__contact_contact__["a" /* ContactPage */];
430
         this.tab4Root = __WEBPACK_IMPORTED_MODULE_2__contact_contact__["a" /* ContactPage */];
432
     }
431
     }
433
     TabsPage = __decorate([
432
     TabsPage = __decorate([
434
-        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({template:/*ion-inline-start:"/Users/alizalang/Desktop/ZipTeam/ZipTeamOrange-ionic-UI/src/pages/tabs/tabs.html"*/'<ion-tabs>\n  <ion-tab [root]="tab1Root" tabTitle="Log"  tabIcon="sign-in"></ion-tab>\n  <ion-tab [root]="tab2Root" tabTitle="Home" tabIcon="home"></ion-tab>\n  <ion-tab [root]="tab3Root" tabTitle="About" tabIcon="information-circle"></ion-tab>\n  <ion-tab [root]="tab4Root" tabTitle="Contact" tabIcon="contacts"></ion-tab>\n</ion-tabs>\n'/*ion-inline-end:"/Users/alizalang/Desktop/ZipTeam/ZipTeamOrange-ionic-UI/src/pages/tabs/tabs.html"*/
433
+        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({template:/*ion-inline-start:"/Users/jasong/Labs/ZipTeam/ZipTeamOrange-ionic-UI/src/pages/tabs/tabs.html"*/'<ion-tabs>\n  <ion-tab [root]="tab1Root" tabTitle="Log"  tabIcon="sign-in"></ion-tab>\n  <ion-tab [root]="tab2Root" tabTitle="Home" tabIcon="home"></ion-tab>\n  <ion-tab [root]="tab3Root" tabTitle="About" tabIcon="information-circle"></ion-tab>\n  <ion-tab [root]="tab4Root" tabTitle="Contact" tabIcon="contacts"></ion-tab>\n</ion-tabs>\n'/*ion-inline-end:"/Users/jasong/Labs/ZipTeam/ZipTeamOrange-ionic-UI/src/pages/tabs/tabs.html"*/
435
         }),
434
         }),
436
         __metadata("design:paramtypes", [])
435
         __metadata("design:paramtypes", [])
437
     ], TabsPage);
436
     ], TabsPage);
466
     }
465
     }
467
     AboutPage = __decorate([
466
     AboutPage = __decorate([
468
         Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({
467
         Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({
469
-            selector: 'page-about',template:/*ion-inline-start:"/Users/alizalang/Desktop/ZipTeam/ZipTeamOrange-ionic-UI/src/pages/about/about.html"*/'<ion-header>\n  <ion-navbar>\n    <ion-title>\n      About\n    </ion-title>\n  </ion-navbar>\n</ion-header>\n\n<ion-content padding>\n\n</ion-content>\n'/*ion-inline-end:"/Users/alizalang/Desktop/ZipTeam/ZipTeamOrange-ionic-UI/src/pages/about/about.html"*/
468
+            selector: 'page-about',template:/*ion-inline-start:"/Users/jasong/Labs/ZipTeam/ZipTeamOrange-ionic-UI/src/pages/about/about.html"*/'<ion-header>\n  <ion-navbar>\n    <ion-title>\n      About\n    </ion-title>\n  </ion-navbar>\n</ion-header>\n\n<ion-content padding>\n\n</ion-content>\n'/*ion-inline-end:"/Users/jasong/Labs/ZipTeam/ZipTeamOrange-ionic-UI/src/pages/about/about.html"*/
470
         }),
469
         }),
471
         __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["e" /* NavController */]])
470
         __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["e" /* NavController */]])
472
     ], AboutPage);
471
     ], AboutPage);
501
     }
500
     }
502
     ContactPage = __decorate([
501
     ContactPage = __decorate([
503
         Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({
502
         Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({
504
-            selector: 'page-contact',template:/*ion-inline-start:"/Users/alizalang/Desktop/ZipTeam/ZipTeamOrange-ionic-UI/src/pages/contact/contact.html"*/'<ion-header>\n  <ion-navbar>\n    <ion-title>\n      Contact\n    </ion-title>\n  </ion-navbar>\n</ion-header>\n\n<ion-content>\n  <ion-list>\n    <ion-list-header>Follow us on Twitter</ion-list-header>\n    <ion-item>\n      <ion-icon name="ionic" item-start></ion-icon>\n      @ionicframework\n    </ion-item>\n  </ion-list>\n</ion-content>\n'/*ion-inline-end:"/Users/alizalang/Desktop/ZipTeam/ZipTeamOrange-ionic-UI/src/pages/contact/contact.html"*/
503
+            selector: 'page-contact',template:/*ion-inline-start:"/Users/jasong/Labs/ZipTeam/ZipTeamOrange-ionic-UI/src/pages/contact/contact.html"*/'<ion-header>\n  <ion-navbar>\n    <ion-title>\n      Contact\n    </ion-title>\n  </ion-navbar>\n</ion-header>\n\n<ion-content>\n  <ion-list>\n    <ion-list-header>Follow us on Twitter</ion-list-header>\n    <ion-item>\n      <ion-icon name="ionic" item-start></ion-icon>\n      @ionicframework\n    </ion-item>\n  </ion-list>\n</ion-content>\n'/*ion-inline-end:"/Users/jasong/Labs/ZipTeam/ZipTeamOrange-ionic-UI/src/pages/contact/contact.html"*/
505
         }),
504
         }),
506
         __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["e" /* NavController */]])
505
         __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["e" /* NavController */]])
507
     ], ContactPage);
506
     ], ContactPage);
536
     }
535
     }
537
     HomePage = __decorate([
536
     HomePage = __decorate([
538
         Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({
537
         Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({
539
-            selector: 'page-home',template:/*ion-inline-start:"/Users/alizalang/Desktop/ZipTeam/ZipTeamOrange-ionic-UI/src/pages/home/home.html"*/'<ion-header>\n  <ion-navbar>\n    <ion-title>Home</ion-title>\n  </ion-navbar>\n</ion-header>\n\n<ion-content padding>\n  <h2>Welcome to Ionic!</h2>\n  <p>\n    This starter project comes with simple tabs-based layout for apps\n    that are going to primarily use a Tabbed UI.\n  </p>\n  <p>\n    Take a look at the <code>src/pages/</code> directory to add or change tabs,\n    update any existing page or create new pages.\n  </p>\n</ion-content>\n'/*ion-inline-end:"/Users/alizalang/Desktop/ZipTeam/ZipTeamOrange-ionic-UI/src/pages/home/home.html"*/
538
+            selector: 'page-home',template:/*ion-inline-start:"/Users/jasong/Labs/ZipTeam/ZipTeamOrange-ionic-UI/src/pages/home/home.html"*/'<ion-header>\n  <ion-navbar>\n    <ion-title>Home</ion-title>\n  </ion-navbar>\n</ion-header>\n\n<ion-content padding>\n  <h2>Welcome to Ionic!</h2>\n  <p>\n    This starter project comes with simple tabs-based layout for apps\n    that are going to primarily use a Tabbed UI.\n  </p>\n  <p>\n    Take a look at the <code>src/pages/</code> directory to add or change tabs,\n    update any existing page or create new pages.\n  </p>\n</ion-content>\n'/*ion-inline-end:"/Users/jasong/Labs/ZipTeam/ZipTeamOrange-ionic-UI/src/pages/home/home.html"*/
540
         }),
539
         }),
541
         __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["e" /* NavController */]])
540
         __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["e" /* NavController */]])
542
     ], HomePage);
541
     ], HomePage);
695
         });
694
         });
696
     }
695
     }
697
     MyApp = __decorate([
696
     MyApp = __decorate([
698
-        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({template:/*ion-inline-start:"/Users/alizalang/Desktop/ZipTeam/ZipTeamOrange-ionic-UI/src/app/app.html"*/'<ion-nav [root]="rootPage"></ion-nav>\n'/*ion-inline-end:"/Users/alizalang/Desktop/ZipTeam/ZipTeamOrange-ionic-UI/src/app/app.html"*/
697
+        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({template:/*ion-inline-start:"/Users/jasong/Labs/ZipTeam/ZipTeamOrange-ionic-UI/src/app/app.html"*/'<ion-nav [root]="rootPage"></ion-nav>\n'/*ion-inline-end:"/Users/jasong/Labs/ZipTeam/ZipTeamOrange-ionic-UI/src/app/app.html"*/
699
         }),
698
         }),
700
         __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["g" /* Platform */], __WEBPACK_IMPORTED_MODULE_2__ionic_native_status_bar__["a" /* StatusBar */], __WEBPACK_IMPORTED_MODULE_3__ionic_native_splash_screen__["a" /* SplashScreen */]])
699
         __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["g" /* Platform */], __WEBPACK_IMPORTED_MODULE_2__ionic_native_status_bar__["a" /* StatusBar */], __WEBPACK_IMPORTED_MODULE_3__ionic_native_splash_screen__["a" /* SplashScreen */]])
701
     ], MyApp);
700
     ], MyApp);

+ 1
- 1
ZipTeamOrange-ionic-UI/www/build/main.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
ZipTeamOrange-ionic-UI/www/build/vendor.js.map
File diff suppressed because it is too large
View File


+ 4
- 0
ZipTeamOrange-server/pom.xml View File

48
 		</dependency>
48
 		</dependency>
49
 		<dependency>
49
 		<dependency>
50
 			<groupId>org.springframework.boot</groupId>
50
 			<groupId>org.springframework.boot</groupId>
51
+			<artifactId>spring-boot-starter-jdbc</artifactId>
52
+		</dependency>
53
+		<dependency>
54
+			<groupId>org.springframework.boot</groupId>
51
 			<artifactId>spring-boot-starter-data-rest</artifactId>
55
 			<artifactId>spring-boot-starter-data-rest</artifactId>
52
 		</dependency>
56
 		</dependency>
53
 
57
 

+ 1
- 0
ZipTeamOrange-server/src/main/java/ZipTeamOrange/Model/Message.java View File

2
 
2
 
3
 import ZipTeamOrange.model.Audit.DateAudit;
3
 import ZipTeamOrange.model.Audit.DateAudit;
4
 import ZipTeamOrange.model.Audit.UserDateAudit;
4
 import ZipTeamOrange.model.Audit.UserDateAudit;
5
+import org.springframework.data.rest.core.annotation.RepositoryRestResource;
5
 
6
 
6
 import javax.persistence.*;
7
 import javax.persistence.*;
7
 
8
 

+ 7
- 0
ZipTeamOrange-server/src/main/java/ZipTeamOrange/Model/Role.java View File

16
     @Column(length = 60)
16
     @Column(length = 60)
17
     private RoleName name;
17
     private RoleName name;
18
 
18
 
19
+//    ManyToMany()
20
+
19
     public Role() {
21
     public Role() {
20
 
22
 
21
     }
23
     }
39
     public void setName(RoleName name) {
41
     public void setName(RoleName name) {
40
         this.name = name;
42
         this.name = name;
41
     }
43
     }
44
+
45
+    @Override
46
+    public String toString() {
47
+        return name.toString();
48
+    }
42
 }
49
 }

+ 1
- 5
ZipTeamOrange-server/src/main/java/ZipTeamOrange/Model/User.java View File

35
     @NotBlank
35
     @NotBlank
36
     private String password;
36
     private String password;
37
 
37
 
38
-    @ManyToMany(fetch = FetchType.LAZY)
39
-    @JoinTable(name = "user_roles",
40
-            joinColumns = @JoinColumn(name = "user_id"),
41
-            inverseJoinColumns = @JoinColumn(name = "role_id"))
38
+    @ManyToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
42
     private Set<Role> roles = new HashSet<>();
39
     private Set<Role> roles = new HashSet<>();
43
 
40
 
44
 
41
 
57
     public User() {
54
     public User() {
58
     }
55
     }
59
 
56
 
60
-
61
     public User(String username, String email, String password) {
57
     public User(String username, String email, String password) {
62
         this.username = username;
58
         this.username = username;
63
         this.email = email;
59
         this.email = email;

+ 27
- 25
ZipTeamOrange-server/src/main/java/ZipTeamOrange/Repository/ChatRepository.java View File

1
-package ZipTeamOrange.repository;
2
-
3
-import ZipTeamOrange.model.Chat;
4
-import org.springframework.data.domain.Page;
5
-import org.springframework.data.domain.Pageable;
6
-import org.springframework.data.domain.Sort;
7
-import org.springframework.data.jpa.repository.JpaRepository;
8
-
9
-import java.util.List;
10
-import java.util.Optional;
11
-
12
-public interface ChatRepository extends JpaRepository<Chat, Long> {
13
-
14
-    Optional<Chat> findById(Long chatId);
15
-
16
-    Page<Chat> findByCreatedBy(Long userId, Pageable pageable);
17
-
18
-    long countByCreatedBy(Long userId);
19
-
20
-    List<Chat> findByIdIn(List<Long> chatIds);
21
-
22
-    List<Chat> findByIdIn(List<Long> chatIds, Sort sort);
23
-
24
-}
25
-
1
+//package ZipTeamOrange.repository;
2
+//
3
+//import ZipTeamOrange.model.Chat;
4
+//import org.springframework.data.domain.Page;
5
+//import org.springframework.data.domain.Pageable;
6
+//import org.springframework.data.domain.Sort;
7
+//import org.springframework.data.jpa.repository.JpaRepository;
8
+//import org.springframework.stereotype.Repository;
9
+//
10
+//import java.util.List;
11
+//import java.util.Optional;
12
+//
13
+//@Repository
14
+//public interface ChatRepository extends JpaRepository<Chat, Long> {
15
+//
16
+//    Optional<Chat> findById(Long chatId);
17
+//
18
+//    Page<Chat> findByCreatedBy(Long userId, Pageable pageable);
19
+//
20
+//    long countByCreatedBy(Long userId);
21
+//
22
+//    List<Chat> findByIdIn(List<Long> chatIds);
23
+//
24
+//    List<Chat> findByIdIn(List<Long> chatIds, Sort sort);
25
+//
26
+//}
27
+//

+ 34
- 30
ZipTeamOrange-server/src/main/java/ZipTeamOrange/Repository/MessageRepository.java View File

1
-package ZipTeamOrange.repository;
2
-
3
-import ZipTeamOrange.model.Chat;
4
-import ZipTeamOrange.model.Message;
5
-import org.springframework.data.domain.Page;
6
-import org.springframework.data.domain.Pageable;
7
-import org.springframework.data.domain.Sort;
8
-import org.springframework.data.jpa.repository.JpaRepository;
9
-import org.springframework.data.jpa.repository.Query;
10
-import org.springframework.data.repository.query.Param;
11
-
12
-import java.util.List;
13
-import java.util.Optional;
14
-
15
-public interface MessageRepository extends JpaRepository<Message, Long> {
16
-
17
-    Optional<Message> findById(Long messageId);
18
-
19
-    Page<Message> findByCreatedBy(Long userId, Pageable pageable);
20
-
21
-    long countByCreatedBy(Long userId);
22
-
23
-//    @Query("SELECT COUNT(m.id) from Message v where v.user.id = :userId")
24
-//    long countByUserId(@Param("userId") Long userId);
25
-
26
-    List<Message> findByIdIn(List<Long> messageIds);
27
-
28
-    List<Message> findByIdIn(List<Long> messageIds, Sort sort);
29
-
30
-}
1
+//package ZipTeamOrange.repository;
2
+//
3
+//import ZipTeamOrange.model.Chat;
4
+//import ZipTeamOrange.model.Message;
5
+//import org.springframework.data.domain.Page;
6
+//import org.springframework.data.domain.Pageable;
7
+//import org.springframework.data.domain.Sort;
8
+//import org.springframework.data.jpa.repository.JpaRepository;
9
+//import org.springframework.data.jpa.repository.Query;
10
+//import org.springframework.data.repository.query.Param;
11
+//import org.springframework.data.rest.core.annotation.RepositoryRestResource;
12
+//import org.springframework.stereotype.Repository;
13
+//
14
+//import java.util.List;
15
+//import java.util.Optional;
16
+//
17
+//@Repository
18
+//@RepositoryRestResource(collectionResourceRel = "message", path = "message")
19
+//public interface MessageRepository extends JpaRepository<Message, Long> {
20
+//
21
+//    Optional<Message> findById(Long messageId);
22
+//
23
+//    Page<Message> findByCreatedBy(Long userId, Pageable pageable);
24
+//
25
+//    long countByCreatedBy(Long userId);
26
+//
27
+////    @Query("SELECT COUNT(m.id) from Message v where v.user.id = :userId")
28
+////    long countByUserId(@Param("userId") Long userId);
29
+//
30
+//    List<Message> findByIdIn(List<Long> messageIds);
31
+//
32
+//    List<Message> findByIdIn(List<Long> messageIds, Sort sort);
33
+//
34
+//}

+ 3
- 1
ZipTeamOrange-server/src/main/java/ZipTeamOrange/Repository/RoleRepository.java View File

3
 import ZipTeamOrange.model.Role;
3
 import ZipTeamOrange.model.Role;
4
 import ZipTeamOrange.model.RoleName;
4
 import ZipTeamOrange.model.RoleName;
5
 import org.springframework.data.jpa.repository.JpaRepository;
5
 import org.springframework.data.jpa.repository.JpaRepository;
6
+import org.springframework.data.rest.core.annotation.RepositoryRestResource;
6
 import org.springframework.stereotype.Repository;
7
 import org.springframework.stereotype.Repository;
7
 
8
 
8
 import java.util.Optional;
9
 import java.util.Optional;
9
 
10
 
10
 @Repository
11
 @Repository
12
+@RepositoryRestResource(collectionResourceRel = "roles", path = "roles")
11
 public interface RoleRepository extends JpaRepository<Role, Long> {
13
 public interface RoleRepository extends JpaRepository<Role, Long> {
12
-    Optional<Role> findByName(RoleName roleName);
14
+    Role findByName(RoleName roleName);
13
 }
15
 }

+ 29
- 0
ZipTeamOrange-server/src/main/java/ZipTeamOrange/config/RoleLoader.java View File

1
+package ZipTeamOrange.config;
2
+
3
+import ZipTeamOrange.model.Role;
4
+import ZipTeamOrange.model.RoleName;
5
+import ZipTeamOrange.repository.RoleRepository;
6
+import org.springframework.beans.factory.annotation.Autowired;
7
+import org.springframework.boot.ApplicationArguments;
8
+import org.springframework.boot.ApplicationRunner;
9
+import org.springframework.stereotype.Component;
10
+
11
+@Component
12
+public class RoleLoader implements ApplicationRunner {
13
+
14
+    private RoleRepository role;
15
+
16
+    @Autowired
17
+    public RoleLoader(RoleRepository role){
18
+        this.role = role;
19
+
20
+    }
21
+    public void run(ApplicationArguments args) {
22
+        Role foo = new Role(RoleName.ROLE_USER);
23
+        this.role.save(foo);
24
+
25
+        foo = new Role(RoleName.ROLE_ADMIN);
26
+        this.role.save(foo);
27
+
28
+    }
29
+}

+ 31
- 0
ZipTeamOrange-server/src/main/java/ZipTeamOrange/config/UserLoader.java View File

1
+//package ZipTeamOrange.config;
2
+//
3
+//import ZipTeamOrange.model.Role;
4
+//import ZipTeamOrange.model.User;
5
+//import ZipTeamOrange.model.RoleName;
6
+//import ZipTeamOrange.repository.RoleRepository;
7
+//import ZipTeamOrange.repository.UserRepository;
8
+//import org.springframework.beans.factory.annotation.Autowired;
9
+//import org.springframework.boot.ApplicationArguments;
10
+//import org.springframework.boot.ApplicationRunner;
11
+//
12
+//public class UserLoader  implements ApplicationRunner {
13
+//
14
+//        private UserRepository userrepo;
15
+//        private RoleRepository rolerepo;
16
+//
17
+//        @Autowired
18
+//        public UserLoader(UserRepository userr){
19
+//            this.userrepo = userr;
20
+//
21
+//        }
22
+//        public void run(ApplicationArguments args) {
23
+//            User foo = new User("jason", "jason@foo.com", "password");
24
+//            Role r = rolerepo.getOne(1L);
25
+//            foo.getRoles().add(r);
26
+//
27
+//            this.userrepo.save(foo);
28
+//        }
29
+//    }
30
+//
31
+//

+ 3
- 3
ZipTeamOrange-server/src/main/java/ZipTeamOrange/controller/AuthController.java View File

82
 
82
 
83
         user.setPassword(passwordEncoder.encode(user.getPassword()));
83
         user.setPassword(passwordEncoder.encode(user.getPassword()));
84
 
84
 
85
-        Role userRole = roleRepository.findByName(RoleName.ROLE_USER)
86
-                .orElseThrow(() -> new AppException("User Role not set."));
85
+        Role userRole = roleRepository.findByName(RoleName.ROLE_USER);
86
+               // .orElseThrow(() -> new AppException("User Role not set."));
87
 
87
 
88
         user.setRoles(Collections.singleton(userRole));
88
         user.setRoles(Collections.singleton(userRole));
89
 
89
 
93
                 .fromCurrentContextPath().path("/api/users/{username}")
93
                 .fromCurrentContextPath().path("/api/users/{username}")
94
                 .buildAndExpand(result.getUsername()).toUri();
94
                 .buildAndExpand(result.getUsername()).toUri();
95
 
95
 
96
-        return ResponseEntity.created(location).body(new ApiResponse(true, "User registered successfully"));
96
+        return ResponseEntity.created(location).body(new ApiResponse(true, "User registered successfully: " + user.getRoles() ));
97
     }
97
     }
98
 }
98
 }