├── .gitignore ├── UserFront ├── .metadata │ ├── .lock │ ├── .plugins │ │ ├── org.eclipse.jdt.core │ │ │ ├── index.db │ │ │ ├── externalFilesCache │ │ │ ├── javaLikeNames.txt │ │ │ ├── nonChainingJarsCache │ │ │ ├── assumedExternalFilesCache │ │ │ └── variablesAndContainers.dat │ │ ├── org.eclipse.rse.core │ │ │ ├── .log │ │ │ └── initializerMarks │ │ │ │ └── org.eclipse.rse.internal.core.RSELocalConnectionInitializer.mark │ │ ├── org.eclipse.core.resources │ │ │ ├── .root │ │ │ │ ├── .indexes │ │ │ │ │ ├── history.version │ │ │ │ │ ├── properties.version │ │ │ │ │ └── properties.index │ │ │ │ └── 1.tree │ │ │ └── .safetable │ │ │ │ └── org.eclipse.core.resources │ │ ├── org.eclipse.epp.logging.aeri.ide │ │ │ ├── com.genuitec.eclipse.aeri.server1 │ │ │ │ ├── http-cache.lucene60 │ │ │ │ │ ├── write.lock │ │ │ │ │ └── segments_1 │ │ │ │ ├── local-history.lucene60 │ │ │ │ │ ├── write.lock │ │ │ │ │ ├── _0.cfe │ │ │ │ │ ├── _0.cfs │ │ │ │ │ ├── _0.si │ │ │ │ │ └── segments_1 │ │ │ │ └── server-config.json │ │ │ └── org.eclipse.epp.logging.aeri.ide.server │ │ │ │ ├── http-cache.lucene60 │ │ │ │ ├── write.lock │ │ │ │ └── segments_1 │ │ │ │ ├── local-history.lucene60 │ │ │ │ ├── write.lock │ │ │ │ ├── _0.cfe │ │ │ │ ├── _0.cfs │ │ │ │ ├── _0.si │ │ │ │ └── segments_1 │ │ │ │ └── server-config.json │ │ ├── org.eclipse.ui.intro │ │ │ └── introstate │ │ ├── org.eclipse.pde.core │ │ │ └── .cache │ │ │ │ └── clean-cache.properties │ │ ├── org.springframework.ide.eclipse.aop.core │ │ │ └── .state │ │ ├── org.eclipse.jdt.ui │ │ │ ├── OpenTypeHistory.xml │ │ │ └── QualifiedTypeNameHistory.xml │ │ ├── org.eclipse.ui │ │ │ └── dialog_settings.xml │ │ ├── org.eclipse.tips.ide │ │ │ └── dialog_settings.xml │ │ ├── org.eclipse.m2e.logback.configuration │ │ │ ├── 0.log │ │ │ └── logback.1.9.1.20180912-1601.xml │ │ ├── org.eclipse.oomph.setup │ │ │ └── workspace.setup │ │ ├── org.eclipse.ui.workbench │ │ │ ├── dialog_settings.xml │ │ │ └── workingsets.xml │ │ └── org.springsource.ide.eclipse.dashboard.ui │ │ │ └── feeds │ │ │ └── dashboard.feeds.update │ │ │ └── 623127801.xml │ ├── version.ini │ ├── .mylyn │ │ └── repositories.xml.zip │ └── .log ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.properties │ │ └── maven-wrapper.jar ├── src │ ├── main │ │ ├── resources │ │ │ ├── static │ │ │ │ ├── images │ │ │ │ │ ├── bg.png │ │ │ │ │ └── banner.png │ │ │ │ ├── fonts │ │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ │ │ └── glyphicons-halflings-regular.woff2 │ │ │ │ ├── js │ │ │ │ │ ├── dataTables.bootstrap.min.js │ │ │ │ │ ├── dataTables.uikit.min.js │ │ │ │ │ ├── dataTables.jqueryui.min.js │ │ │ │ │ ├── main.js │ │ │ │ │ └── jquery.easing.min.js │ │ │ │ └── css │ │ │ │ │ ├── dataTables.uikit.min.css │ │ │ │ │ └── dataTables.bootstrap.min.css │ │ │ ├── application.properties │ │ │ └── templates │ │ │ │ ├── deposit.html │ │ │ │ ├── withdraw.html │ │ │ │ ├── index.html │ │ │ │ ├── toSomeoneElse.html │ │ │ │ ├── betweenAccounts.html │ │ │ │ ├── savingsAccount.html │ │ │ │ ├── appointment.html │ │ │ │ ├── primaryAccount.html │ │ │ │ ├── recipient.html │ │ │ │ ├── userFront.html │ │ │ │ └── profile.html │ │ └── java │ │ │ └── com │ │ │ └── userfront │ │ │ ├── Dao │ │ │ ├── RoleDao.java │ │ │ ├── PrimaryTransactionDao.java │ │ │ ├── SavingsTransactionDao.java │ │ │ ├── UserDao.java │ │ │ ├── PrimaryAccountDao.java │ │ │ ├── SavingsAccountDao.java │ │ │ ├── AppointmentDao.java │ │ │ └── RecipientDao.java │ │ │ ├── UserFrontApplication.java │ │ │ ├── service │ │ │ ├── AppointmentService.java │ │ │ ├── AccountService.java │ │ │ ├── UserService.java │ │ │ ├── UserServiceImpl │ │ │ │ ├── AppointmentServiceImpl.java │ │ │ │ ├── UserSecurityService.java │ │ │ │ ├── UserServiceImpl.java │ │ │ │ └── AccountServiceImpl.java │ │ │ └── TransactionService.java │ │ │ ├── domain │ │ │ ├── security │ │ │ │ ├── Authority.java │ │ │ │ ├── Role.java │ │ │ │ └── UserRole.java │ │ │ ├── PrimaryAccount.java │ │ │ ├── SavingsAccount.java │ │ │ ├── Recipient.java │ │ │ ├── Appointment.java │ │ │ ├── PrimaryTransaction.java │ │ │ └── SavingsTransaction.java │ │ │ ├── resource │ │ │ ├── AppointmentResource.java │ │ │ └── UserResource.java │ │ │ ├── controller │ │ │ ├── UserController.java │ │ │ ├── AppointmentController.java │ │ │ ├── HomeController.java │ │ │ ├── AccountController.java │ │ │ └── TransferController.java │ │ │ └── config │ │ │ ├── RequestFilter.java │ │ │ └── SecurityConfig.java │ └── test │ │ └── java │ │ └── com │ │ └── userfront │ │ └── UserFrontApplicationTests.java ├── .gitignore ├── pom.xml └── mvnw.cmd ├── AdminPortal ├── src │ ├── assets │ │ ├── .gitkeep │ │ └── fonts │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ └── glyphicons-halflings-regular.woff2 │ ├── app │ │ ├── app.component.css │ │ ├── login │ │ │ ├── login.component.css │ │ │ ├── login.component.spec.ts │ │ │ ├── login.component.html │ │ │ └── login.component.ts │ │ ├── navbar │ │ │ ├── navbar.component.css │ │ │ ├── navbar.component.spec.ts │ │ │ ├── navbar.component.ts │ │ │ └── navbar.component.html │ │ ├── appointment │ │ │ ├── appointment.component.css │ │ │ ├── appointment.component.spec.ts │ │ │ ├── appointment.component.html │ │ │ └── appointment.component.ts │ │ ├── user-account │ │ │ ├── user-account.component.css │ │ │ ├── user-account.component.spec.ts │ │ │ ├── user-account.component.html │ │ │ └── user-account.component.ts │ │ ├── primary-transaction │ │ │ ├── primary-transaction.component.css │ │ │ ├── primary-transaction.component.html │ │ │ ├── primary-transaction.component.spec.ts │ │ │ └── primary-transaction.component.ts │ │ ├── savings-transaction │ │ │ ├── savings-transaction.component.css │ │ │ ├── savings-transaction.component.html │ │ │ ├── savings-transaction.component.spec.ts │ │ │ └── savings-transaction.component.ts │ │ ├── app.component.html │ │ ├── app.component.ts │ │ ├── user.service.spec.ts │ │ ├── login.service.spec.ts │ │ ├── appointment.service.spec.ts │ │ ├── appointment.service.ts │ │ ├── login.service.ts │ │ ├── app.component.spec.ts │ │ ├── user.service.ts │ │ ├── app-routing.module.ts │ │ ├── app.routing.ts │ │ └── app.module.ts │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── favicon.ico │ ├── tsconfig.app.json │ ├── tsconfig.spec.json │ ├── tslint.json │ ├── browserslist │ ├── main.ts │ ├── index.html │ ├── test.ts │ ├── karma.conf.js │ ├── polyfills.ts │ └── styles.css ├── e2e │ ├── src │ │ ├── app.po.ts │ │ └── app.e2e-spec.ts │ ├── tsconfig.e2e.json │ └── protractor.conf.js ├── .editorconfig ├── tsconfig.json ├── .gitignore ├── README.md ├── package.json ├── tslint.json └── angular.json └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | /.metadata/ 2 | -------------------------------------------------------------------------------- /UserFront/.metadata/.lock: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /AdminPortal/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /AdminPortal/src/app/app.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /AdminPortal/src/app/login/login.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /AdminPortal/src/app/navbar/navbar.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /AdminPortal/src/app/appointment/appointment.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UserFront/.metadata/.plugins/org.eclipse.jdt.core/index.db: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UserFront/.metadata/.plugins/org.eclipse.rse.core/.log: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /AdminPortal/src/app/user-account/user-account.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /AdminPortal/src/app/primary-transaction/primary-transaction.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /AdminPortal/src/app/savings-transaction/savings-transaction.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UserFront/.metadata/.plugins/org.eclipse.jdt.core/externalFilesCache: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UserFront/.metadata/.plugins/org.eclipse.jdt.core/javaLikeNames.txt: -------------------------------------------------------------------------------- 1 | aj 2 | java -------------------------------------------------------------------------------- /UserFront/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UserFront/.metadata/.plugins/org.eclipse.jdt.core/assumedExternalFilesCache: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UserFront/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /UserFront/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /AdminPortal/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /UserFront/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/com.genuitec.eclipse.aeri.server1/http-cache.lucene60/write.lock: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UserFront/.metadata/.plugins/org.eclipse.ui.intro/introstate: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /UserFront/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/com.genuitec.eclipse.aeri.server1/local-history.lucene60/write.lock: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UserFront/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/http-cache.lucene60/write.lock: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UserFront/.metadata/.plugins/org.eclipse.rse.core/initializerMarks/org.eclipse.rse.internal.core.RSELocalConnectionInitializer.mark: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /AdminPortal/src/app/app.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 |
-------------------------------------------------------------------------------- /UserFront/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/write.lock: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UserFront/.metadata/.plugins/org.eclipse.pde.core/.cache/clean-cache.properties: -------------------------------------------------------------------------------- 1 | #Cached timestamps 2 | #Wed Nov 07 01:05:29 CET 2018 3 | -------------------------------------------------------------------------------- /AdminPortal/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Touiti/Online-Banking-Full-Stack-Web-Application/HEAD/AdminPortal/src/favicon.ico -------------------------------------------------------------------------------- /UserFront/.metadata/.plugins/org.springframework.ide.eclipse.aop.core/.state: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /UserFront/.metadata/version.ini: -------------------------------------------------------------------------------- 1 | #Wed Nov 07 01:04:53 CET 2018 2 | org.eclipse.core.runtime=2 3 | org.eclipse.platform=4.9.0.v20180906-0745 4 | -------------------------------------------------------------------------------- /UserFront/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index: -------------------------------------------------------------------------------- 1 | /org.eclipse.jdt.corestateVersionNumber33 -------------------------------------------------------------------------------- /UserFront/.metadata/.plugins/org.eclipse.core.resources/.root/1.tree: -------------------------------------------------------------------------------- 1 | org.eclipse.jdt.core -------------------------------------------------------------------------------- /UserFront/.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /UserFront/.metadata/.plugins/org.eclipse.ui/dialog_settings.xml: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | -------------------------------------------------------------------------------- /UserFront/.metadata/.plugins/org.eclipse.tips.ide/dialog_settings.xml: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | -------------------------------------------------------------------------------- /UserFront/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip 2 | -------------------------------------------------------------------------------- /UserFront/.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /UserFront/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Touiti/Online-Banking-Full-Stack-Web-Application/HEAD/UserFront/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /UserFront/.metadata/.mylyn/repositories.xml.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Touiti/Online-Banking-Full-Stack-Web-Application/HEAD/UserFront/.metadata/.mylyn/repositories.xml.zip -------------------------------------------------------------------------------- /UserFront/src/main/resources/static/images/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Touiti/Online-Banking-Full-Stack-Web-Application/HEAD/UserFront/src/main/resources/static/images/bg.png -------------------------------------------------------------------------------- /UserFront/src/main/resources/static/images/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Touiti/Online-Banking-Full-Stack-Web-Application/HEAD/UserFront/src/main/resources/static/images/banner.png -------------------------------------------------------------------------------- /AdminPortal/src/assets/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Touiti/Online-Banking-Full-Stack-Web-Application/HEAD/AdminPortal/src/assets/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /AdminPortal/src/assets/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Touiti/Online-Banking-Full-Stack-Web-Application/HEAD/AdminPortal/src/assets/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /AdminPortal/src/assets/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Touiti/Online-Banking-Full-Stack-Web-Application/HEAD/AdminPortal/src/assets/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /AdminPortal/src/assets/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Touiti/Online-Banking-Full-Stack-Web-Application/HEAD/AdminPortal/src/assets/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /UserFront/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat: -------------------------------------------------------------------------------- 1 | JRE_LIBJRE_SRC JRE_SRCROOT ASPECTJRT_LIB 2 | JUNIT_HOME ECLIPSE_HOMEJUNIT_SRC_HOMEM2_REPO -------------------------------------------------------------------------------- /UserFront/src/main/resources/static/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Touiti/Online-Banking-Full-Stack-Web-Application/HEAD/UserFront/src/main/resources/static/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /UserFront/src/main/resources/static/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Touiti/Online-Banking-Full-Stack-Web-Application/HEAD/UserFront/src/main/resources/static/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /UserFront/src/main/resources/static/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Touiti/Online-Banking-Full-Stack-Web-Application/HEAD/UserFront/src/main/resources/static/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /UserFront/src/main/resources/static/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Touiti/Online-Banking-Full-Stack-Web-Application/HEAD/UserFront/src/main/resources/static/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /UserFront/.metadata/.plugins/org.eclipse.m2e.logback.configuration/0.log: -------------------------------------------------------------------------------- 1 | 2018-11-07 01:05:09,711 [Worker-4: Loading available Gradle versions] INFO c.g.t.t.d.PublishedGradleVersions - Gradle version information cache is up-to-date. Trying to read. 2 | -------------------------------------------------------------------------------- /AdminPortal/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-root', 5 | templateUrl: './app.component.html', 6 | styleUrls: ['./app.component.css'] 7 | }) 8 | export class AppComponent {} 9 | -------------------------------------------------------------------------------- /AdminPortal/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "types": [] 6 | }, 7 | "exclude": [ 8 | "src/test.ts", 9 | "**/*.spec.ts" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /UserFront/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Touiti/Online-Banking-Full-Stack-Web-Application/HEAD/UserFront/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources -------------------------------------------------------------------------------- /AdminPortal/e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get('/'); 6 | } 7 | 8 | getParagraphText() { 9 | return element(by.css('app-root h1')).getText(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /UserFront/.metadata/.plugins/org.eclipse.oomph.setup/workspace.setup: -------------------------------------------------------------------------------- 1 | 2 | 7 | -------------------------------------------------------------------------------- /AdminPortal/e2e/tsconfig.e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "commonjs", 6 | "target": "es5", 7 | "types": [ 8 | "jasmine", 9 | "jasminewd2", 10 | "node" 11 | ] 12 | } 13 | } -------------------------------------------------------------------------------- /UserFront/src/main/java/com/userfront/Dao/RoleDao.java: -------------------------------------------------------------------------------- 1 | package com.userfront.Dao; 2 | 3 | import org.springframework.data.repository.CrudRepository; 4 | 5 | import com.userfront.domain.security.Role; 6 | 7 | public interface RoleDao extends CrudRepository { 8 | Role findByName(String name); 9 | } 10 | -------------------------------------------------------------------------------- /AdminPortal/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /UserFront/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/com.genuitec.eclipse.aeri.server1/http-cache.lucene60/segments_1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Touiti/Online-Banking-Full-Stack-Web-Application/HEAD/UserFront/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/com.genuitec.eclipse.aeri.server1/http-cache.lucene60/segments_1 -------------------------------------------------------------------------------- /UserFront/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/com.genuitec.eclipse.aeri.server1/local-history.lucene60/_0.cfe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Touiti/Online-Banking-Full-Stack-Web-Application/HEAD/UserFront/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/com.genuitec.eclipse.aeri.server1/local-history.lucene60/_0.cfe -------------------------------------------------------------------------------- /UserFront/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/com.genuitec.eclipse.aeri.server1/local-history.lucene60/_0.cfs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Touiti/Online-Banking-Full-Stack-Web-Application/HEAD/UserFront/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/com.genuitec.eclipse.aeri.server1/local-history.lucene60/_0.cfs -------------------------------------------------------------------------------- /UserFront/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/com.genuitec.eclipse.aeri.server1/local-history.lucene60/_0.si: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Touiti/Online-Banking-Full-Stack-Web-Application/HEAD/UserFront/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/com.genuitec.eclipse.aeri.server1/local-history.lucene60/_0.si -------------------------------------------------------------------------------- /UserFront/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/com.genuitec.eclipse.aeri.server1/local-history.lucene60/segments_1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Touiti/Online-Banking-Full-Stack-Web-Application/HEAD/UserFront/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/com.genuitec.eclipse.aeri.server1/local-history.lucene60/segments_1 -------------------------------------------------------------------------------- /UserFront/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/_0.cfe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Touiti/Online-Banking-Full-Stack-Web-Application/HEAD/UserFront/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/_0.cfe -------------------------------------------------------------------------------- /UserFront/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/_0.cfs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Touiti/Online-Banking-Full-Stack-Web-Application/HEAD/UserFront/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/_0.cfs -------------------------------------------------------------------------------- /UserFront/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/_0.si: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Touiti/Online-Banking-Full-Stack-Web-Application/HEAD/UserFront/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/_0.si -------------------------------------------------------------------------------- /UserFront/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/http-cache.lucene60/segments_1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Touiti/Online-Banking-Full-Stack-Web-Application/HEAD/UserFront/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/http-cache.lucene60/segments_1 -------------------------------------------------------------------------------- /UserFront/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/segments_1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Touiti/Online-Banking-Full-Stack-Web-Application/HEAD/UserFront/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/segments_1 -------------------------------------------------------------------------------- /AdminPortal/src/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/spec", 5 | "types": [ 6 | "jasmine", 7 | "node" 8 | ] 9 | }, 10 | "files": [ 11 | "test.ts", 12 | "polyfills.ts" 13 | ], 14 | "include": [ 15 | "**/*.spec.ts", 16 | "**/*.d.ts" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /AdminPortal/e2e/src/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { AppPage } from './app.po'; 2 | 3 | describe('workspace-project App', () => { 4 | let page: AppPage; 5 | 6 | beforeEach(() => { 7 | page = new AppPage(); 8 | }); 9 | 10 | it('should display welcome message', () => { 11 | page.navigateTo(); 12 | expect(page.getParagraphText()).toEqual('Welcome to AdminPortal!'); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /UserFront/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /AdminPortal/src/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tslint.json", 3 | "rules": { 4 | "directive-selector": [ 5 | true, 6 | "attribute", 7 | "app", 8 | "camelCase" 9 | ], 10 | "component-selector": [ 11 | true, 12 | "element", 13 | "app", 14 | "kebab-case" 15 | ] 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /UserFront/src/main/java/com/userfront/Dao/PrimaryTransactionDao.java: -------------------------------------------------------------------------------- 1 | package com.userfront.Dao; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.repository.CrudRepository; 6 | 7 | import com.userfront.domain.PrimaryTransaction; 8 | 9 | public interface PrimaryTransactionDao extends CrudRepository { 10 | 11 | List findAll(); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /UserFront/src/main/java/com/userfront/Dao/SavingsTransactionDao.java: -------------------------------------------------------------------------------- 1 | package com.userfront.Dao; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.repository.CrudRepository; 6 | 7 | import com.userfront.domain.SavingsTransaction; 8 | 9 | public interface SavingsTransactionDao extends CrudRepository { 10 | 11 | List findAll(); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /UserFront/src/main/java/com/userfront/Dao/UserDao.java: -------------------------------------------------------------------------------- 1 | package com.userfront.Dao; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.repository.CrudRepository; 6 | 7 | import com.userfront.domain.User; 8 | 9 | public interface UserDao extends CrudRepository { 10 | User findByUsername(String username); 11 | User findByEmail(String email); 12 | List findAll(); 13 | } 14 | -------------------------------------------------------------------------------- /AdminPortal/src/browserslist: -------------------------------------------------------------------------------- 1 | # This file is currently used by autoprefixer to adjust CSS to support the below specified browsers 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | # For IE 9-11 support, please uncomment the last line of the file and adjust as needed 5 | > 0.5% 6 | last 2 versions 7 | Firefox ESR 8 | not dead 9 | # IE 9-11 -------------------------------------------------------------------------------- /UserFront/src/main/java/com/userfront/UserFrontApplication.java: -------------------------------------------------------------------------------- 1 | package com.userfront; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class UserFrontApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(UserFrontApplication.class, args); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /UserFront/src/main/java/com/userfront/Dao/PrimaryAccountDao.java: -------------------------------------------------------------------------------- 1 | package com.userfront.Dao; 2 | 3 | import com.userfront.domain.PrimaryAccount; 4 | import org.springframework.data.repository.CrudRepository; 5 | 6 | /** 7 | * Created by MTouiti on 11/05/18. 8 | */ 9 | public interface PrimaryAccountDao extends CrudRepository { 10 | 11 | PrimaryAccount findByAccountNumber (int accountNumber); 12 | } 13 | -------------------------------------------------------------------------------- /UserFront/src/main/java/com/userfront/Dao/SavingsAccountDao.java: -------------------------------------------------------------------------------- 1 | package com.userfront.Dao; 2 | 3 | import com.userfront.domain.SavingsAccount; 4 | import org.springframework.data.repository.CrudRepository; 5 | 6 | /** 7 | * Created by MTouiti on 11/05/18. 8 | */ 9 | public interface SavingsAccountDao extends CrudRepository { 10 | 11 | SavingsAccount findByAccountNumber (int accountNumber); 12 | } 13 | -------------------------------------------------------------------------------- /AdminPortal/src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule) 12 | .catch(err => console.log(err)); 13 | -------------------------------------------------------------------------------- /UserFront/src/main/java/com/userfront/service/AppointmentService.java: -------------------------------------------------------------------------------- 1 | package com.userfront.service; 2 | 3 | import java.util.List; 4 | 5 | import com.userfront.domain.Appointment; 6 | 7 | public interface AppointmentService { 8 | Appointment createAppointment(Appointment appointment); 9 | 10 | List findAll(); 11 | 12 | Appointment findAppointment(Long id); 13 | 14 | void confirmAppointment(Long id); 15 | } 16 | -------------------------------------------------------------------------------- /UserFront/src/main/java/com/userfront/Dao/AppointmentDao.java: -------------------------------------------------------------------------------- 1 | package com.userfront.Dao; 2 | 3 | import java.util.List; 4 | import java.util.Optional; 5 | 6 | import org.springframework.data.repository.CrudRepository; 7 | 8 | import com.userfront.domain.Appointment; 9 | 10 | public interface AppointmentDao extends CrudRepository { 11 | 12 | List findAll(); 13 | Optional findById(Long id); 14 | } 15 | -------------------------------------------------------------------------------- /AdminPortal/src/app/user.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, inject } from '@angular/core/testing'; 2 | 3 | import { UserService } from './user.service'; 4 | 5 | describe('UserService', () => { 6 | beforeEach(() => { 7 | TestBed.configureTestingModule({ 8 | providers: [UserService] 9 | }); 10 | }); 11 | 12 | it('should be created', inject([UserService], (service: UserService) => { 13 | expect(service).toBeTruthy(); 14 | })); 15 | }); 16 | -------------------------------------------------------------------------------- /UserFront/src/test/java/com/userfront/UserFrontApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.userfront; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class UserFrontApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /AdminPortal/src/app/login.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, inject } from '@angular/core/testing'; 2 | 3 | import { LoginService } from './login.service'; 4 | 5 | describe('LoginService', () => { 6 | beforeEach(() => { 7 | TestBed.configureTestingModule({ 8 | providers: [LoginService] 9 | }); 10 | }); 11 | 12 | it('should be created', inject([LoginService], (service: LoginService) => { 13 | expect(service).toBeTruthy(); 14 | })); 15 | }); 16 | -------------------------------------------------------------------------------- /UserFront/src/main/java/com/userfront/Dao/RecipientDao.java: -------------------------------------------------------------------------------- 1 | package com.userfront.Dao; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.repository.CrudRepository; 6 | 7 | import com.userfront.domain.Recipient; 8 | 9 | public interface RecipientDao extends CrudRepository { 10 | List findAll(); 11 | 12 | Recipient findByName(String recipientName); 13 | 14 | void deleteByName(String recipientName); 15 | } 16 | -------------------------------------------------------------------------------- /AdminPortal/src/app/appointment.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, inject } from '@angular/core/testing'; 2 | 3 | import { AppointmentService } from './appointment.service'; 4 | 5 | describe('AppointmentService', () => { 6 | beforeEach(() => { 7 | TestBed.configureTestingModule({ 8 | providers: [AppointmentService] 9 | }); 10 | }); 11 | 12 | it('should be created', inject([AppointmentService], (service: AppointmentService) => { 13 | expect(service).toBeTruthy(); 14 | })); 15 | }); 16 | -------------------------------------------------------------------------------- /UserFront/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | -------------------------------------------------------------------------------- /AdminPortal/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "outDir": "./dist/out-tsc", 6 | "sourceMap": true, 7 | "declaration": false, 8 | "module": "es2015", 9 | "moduleResolution": "node", 10 | "emitDecoratorMetadata": true, 11 | "experimentalDecorators": true, 12 | "target": "es5", 13 | "typeRoots": [ 14 | "node_modules/@types" 15 | ], 16 | "lib": [ 17 | "es2017", 18 | "dom" 19 | ] 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /UserFront/src/main/java/com/userfront/service/AccountService.java: -------------------------------------------------------------------------------- 1 | package com.userfront.service; 2 | 3 | import java.security.Principal; 4 | 5 | import com.userfront.domain.PrimaryAccount; 6 | import com.userfront.domain.SavingsAccount; 7 | 8 | public interface AccountService { 9 | PrimaryAccount createPrimaryAccount(); 10 | SavingsAccount createSavingsAccount(); 11 | void deposit(String accountType, double amount, Principal principal); 12 | void withdraw(String accountType, double amount, Principal principal); 13 | } 14 | -------------------------------------------------------------------------------- /UserFront/src/main/java/com/userfront/domain/security/Authority.java: -------------------------------------------------------------------------------- 1 | package com.userfront.domain.security; 2 | 3 | import org.springframework.security.core.GrantedAuthority; 4 | 5 | /** 6 | * Created by MTouiti on 11/05/18. 7 | */ 8 | public class Authority implements GrantedAuthority{ 9 | 10 | private final String authority; 11 | 12 | public Authority(String authority) { 13 | this.authority = authority; 14 | } 15 | 16 | @Override 17 | public String getAuthority() { 18 | return authority; 19 | } 20 | } -------------------------------------------------------------------------------- /AdminPortal/src/app/appointment.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import {Http, Headers} from '@angular/http'; 3 | 4 | 5 | @Injectable() 6 | export class AppointmentService { 7 | 8 | constructor (private http:Http){} 9 | 10 | getAppointmentList() { 11 | let url = "http://localhost:8080/api/appointment/all"; 12 | return this.http.get(url, { withCredentials: true }); 13 | } 14 | 15 | confirmAppointment(id: number) { 16 | let url = "http://localhost:8080/api/appointment/"+id+"/confirm"; 17 | return this.http.get(url, { withCredentials: true }); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /AdminPortal/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AdminPortal 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | Loading... 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /AdminPortal/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | 8 | # dependencies 9 | /node_modules 10 | 11 | # IDEs and editors 12 | /.idea 13 | .project 14 | .classpath 15 | .c9/ 16 | *.launch 17 | .settings/ 18 | *.sublime-workspace 19 | 20 | # IDE - VSCode 21 | .vscode/* 22 | !.vscode/settings.json 23 | !.vscode/tasks.json 24 | !.vscode/launch.json 25 | !.vscode/extensions.json 26 | 27 | # misc 28 | /.sass-cache 29 | /connect.lock 30 | /coverage 31 | /libpeerconnection.log 32 | npm-debug.log 33 | yarn-error.log 34 | testem.log 35 | /typings 36 | 37 | # System Files 38 | .DS_Store 39 | Thumbs.db 40 | -------------------------------------------------------------------------------- /AdminPortal/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // This file can be replaced during build by using the `fileReplacements` array. 2 | // `ng build ---prod` replaces `environment.ts` with `environment.prod.ts`. 3 | // The list of file replacements can be found in `angular.json`. 4 | 5 | export const environment = { 6 | production: false 7 | }; 8 | 9 | /* 10 | * In development mode, to ignore zone related error stack frames such as 11 | * `zone.run`, `zoneDelegate.invokeTask` for easier debugging, you can 12 | * import the following file, but please comment it out in production mode 13 | * because it will have performance impact when throw error 14 | */ 15 | // import 'zone.js/dist/zone-error'; // Included with Angular CLI. 16 | -------------------------------------------------------------------------------- /UserFront/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /AdminPortal/src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'zone.js/dist/zone-testing'; 4 | import { getTestBed } from '@angular/core/testing'; 5 | import { 6 | BrowserDynamicTestingModule, 7 | platformBrowserDynamicTesting 8 | } from '@angular/platform-browser-dynamic/testing'; 9 | 10 | declare const require: any; 11 | 12 | // First, initialize the Angular testing environment. 13 | getTestBed().initTestEnvironment( 14 | BrowserDynamicTestingModule, 15 | platformBrowserDynamicTesting() 16 | ); 17 | // Then we find all the tests. 18 | const context = require.context('./', true, /\.spec\.ts$/); 19 | // And load the modules. 20 | context.keys().map(context); 21 | -------------------------------------------------------------------------------- /AdminPortal/src/app/login/login.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { LoginComponent } from './login.component'; 4 | 5 | describe('LoginComponent', () => { 6 | let component: LoginComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ LoginComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(LoginComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /AdminPortal/src/app/navbar/navbar.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { NavbarComponent } from './navbar.component'; 4 | 5 | describe('NavbarComponent', () => { 6 | let component: NavbarComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ NavbarComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(NavbarComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /AdminPortal/src/app/appointment/appointment.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { AppointmentComponent } from './appointment.component'; 4 | 5 | describe('AppointmentComponent', () => { 6 | let component: AppointmentComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ AppointmentComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(AppointmentComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /AdminPortal/src/app/user-account/user-account.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { UserAccountComponent } from './user-account.component'; 4 | 5 | describe('UserAccountComponent', () => { 6 | let component: UserAccountComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ UserAccountComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(UserAccountComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /AdminPortal/src/app/primary-transaction/primary-transaction.component.html: -------------------------------------------------------------------------------- 1 |

Primary Account Transaction List

2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
Post DateDescriptionTypeStatusAmountAvailable Balance
{{primaryTransaction.date | date: 'MM/dd/yyyy'}} {{primaryTransaction.desription}}{{primaryTransaction.type}}{{primaryTransaction.status}}{{primaryTransaction.amount}}{{primaryTransaction.availableBalance}}
-------------------------------------------------------------------------------- /AdminPortal/src/app/savings-transaction/savings-transaction.component.html: -------------------------------------------------------------------------------- 1 |

Savings Account Transaction List

2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
Post DateDescriptionTypeStatusAmountAvailable Balance
{{savingsTransaction.date | date: 'MM/dd/yyyy'}} {{savingsTransaction.desription}}{{savingsTransaction.type}}{{savingsTransaction.status}}{{savingsTransaction.amount}}{{savingsTransaction.availableBalance}}
-------------------------------------------------------------------------------- /UserFront/src/main/java/com/userfront/service/UserService.java: -------------------------------------------------------------------------------- 1 | package com.userfront.service; 2 | 3 | import java.util.List; 4 | import java.util.Set; 5 | 6 | import com.userfront.domain.User; 7 | import com.userfront.domain.security.UserRole; 8 | 9 | public interface UserService { 10 | User findByUsername(String username); 11 | 12 | User findByEmail(String email); 13 | 14 | boolean checkUserExists(String username, String email); 15 | 16 | boolean checkUsernameExists(String username); 17 | 18 | boolean checkEmailExists(String email); 19 | 20 | void save (User user); 21 | 22 | User createUser(User user, Set userRoles); 23 | 24 | User saveUser (User user); 25 | 26 | List findUserList(); 27 | 28 | void enableUser (String username); 29 | 30 | void disableUser (String username); 31 | } 32 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Professional Online Banking - Full Stack Web Application 2 | 3 | ## Description 4 | 5 | * Designed and developed an online banking using Java/J2EE, Spring, and Hibernate ORM. 6 | * Implemented cross-site scripting interceptors and session management techniques to secure data. 7 | * Enhanced database interaction using Hibernate annotations based mapping with MySQL. 8 | * Built a user friendly and responsive website to enhance user experience. 9 | 10 | ## Programming Language 11 | 12 | Java, JavaScript, SQL 13 | 14 | ## Technologies 15 | 16 | ### User Front 17 | 18 | * **Backend**: Spring Boot, Spring Security, Spring Data, Hibernate, maven. 19 | * **Frontend**: Thymeleaf, HTML5, CSS3, Bootstrap, JQuery 20 | * **Database**: MySQL 21 | 22 | ### Admin Portail 23 | 24 | * Angular, Typescript 25 | 26 | ## Tools/IDE 27 | 28 | Spring Tool Suite, Eclipse, MySQL 29 | -------------------------------------------------------------------------------- /AdminPortal/src/app/primary-transaction/primary-transaction.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { PrimaryTransactionComponent } from './primary-transaction.component'; 4 | 5 | describe('PrimaryTransactionComponent', () => { 6 | let component: PrimaryTransactionComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ PrimaryTransactionComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(PrimaryTransactionComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /AdminPortal/src/app/savings-transaction/savings-transaction.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { SavingsTransactionComponent } from './savings-transaction.component'; 4 | 5 | describe('SavingsTransactionComponent', () => { 6 | let component: SavingsTransactionComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ SavingsTransactionComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(SavingsTransactionComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /AdminPortal/e2e/protractor.conf.js: -------------------------------------------------------------------------------- 1 | // Protractor configuration file, see link for more information 2 | // https://github.com/angular/protractor/blob/master/lib/config.ts 3 | 4 | const { SpecReporter } = require('jasmine-spec-reporter'); 5 | 6 | exports.config = { 7 | allScriptsTimeout: 11000, 8 | specs: [ 9 | './src/**/*.e2e-spec.ts' 10 | ], 11 | capabilities: { 12 | 'browserName': 'chrome' 13 | }, 14 | directConnect: true, 15 | baseUrl: 'http://localhost:4200/', 16 | framework: 'jasmine', 17 | jasmineNodeOpts: { 18 | showColors: true, 19 | defaultTimeoutInterval: 30000, 20 | print: function() {} 21 | }, 22 | onPrepare() { 23 | require('ts-node').register({ 24 | project: require('path').join(__dirname, './tsconfig.e2e.json') 25 | }); 26 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); 27 | } 28 | }; -------------------------------------------------------------------------------- /AdminPortal/src/app/appointment/appointment.component.html: -------------------------------------------------------------------------------- 1 |

Appointment List Page

2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
Appointment IdUser NameDateDescriptionConfirmed?Action
{{appointment.id}}{{appointment.user.username}}{{appointment.date | date: 'MM/dd/yyyy - hh:mm'}}{{appointment.description}}{{appointment.confirmed}}Confirm
-------------------------------------------------------------------------------- /AdminPortal/src/app/login/login.component.html: -------------------------------------------------------------------------------- 1 |
2 | 17 |
18 |

Welcome to Admin Portal!

19 |
20 |
21 | 22 | -------------------------------------------------------------------------------- /AdminPortal/src/app/appointment/appointment.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import {AppointmentService} from '../appointment.service'; 3 | 4 | 5 | @Component({ 6 | selector: 'app-appointment', 7 | templateUrl: './appointment.component.html', 8 | styleUrls: ['./appointment.component.css'] 9 | }) 10 | export class AppointmentComponent implements OnInit { 11 | 12 | appointmentList: Object[]; 13 | 14 | constructor(private appointmentService: AppointmentService) { 15 | this.getAppointmentList(); 16 | } 17 | 18 | getAppointmentList() { 19 | this.appointmentService.getAppointmentList().subscribe( 20 | res => { 21 | this.appointmentList = JSON.parse(JSON.parse(JSON.stringify(res))._body); 22 | }, 23 | error => console.log(error) 24 | ) 25 | } 26 | 27 | confirmAppointment(id: number) { 28 | this.appointmentService.confirmAppointment(id).subscribe(); 29 | location.reload(); 30 | } 31 | 32 | ngOnInit() {} 33 | } 34 | -------------------------------------------------------------------------------- /AdminPortal/src/app/login.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | //import {Http, Headers} from '@angular/http'; 3 | import { Http, Headers, RequestOptions,Response} from '@angular/http'; 4 | import { map, filter, catchError, mergeMap } from 'rxjs/operators'; 5 | 6 | import {Observable} from 'rxjs'; 7 | 8 | import {HttpClientModule} from '@angular/common/http'; 9 | 10 | @Injectable() 11 | export class LoginService { 12 | 13 | constructor (private http: Http) {} 14 | 15 | sendCredential(username: string, password: string) { 16 | let url = "http://localhost:8080/index"; 17 | let params = 'username='+username+'&password='+password; 18 | let headers = new Headers( 19 | { 20 | 'Content-Type': 'application/x-www-form-urlencoded' 21 | // 'Access-Control-Allow-Credentials' : true 22 | }); 23 | return this.http.post(url, params, {headers: headers, withCredentials : true}); 24 | } 25 | 26 | logout() { 27 | let url = "http://localhost:8080/logout"; 28 | return this.http.get(url, { withCredentials: true }); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /AdminPortal/src/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | 4 | module.exports = function (config) { 5 | config.set({ 6 | basePath: '', 7 | frameworks: ['jasmine', '@angular-devkit/build-angular'], 8 | plugins: [ 9 | require('karma-jasmine'), 10 | require('karma-chrome-launcher'), 11 | require('karma-jasmine-html-reporter'), 12 | require('karma-coverage-istanbul-reporter'), 13 | require('@angular-devkit/build-angular/plugins/karma') 14 | ], 15 | client: { 16 | clearContext: false // leave Jasmine Spec Runner output visible in browser 17 | }, 18 | coverageIstanbulReporter: { 19 | dir: require('path').join(__dirname, '../coverage'), 20 | reports: ['html', 'lcovonly'], 21 | fixWebpackSourcePaths: true 22 | }, 23 | reporters: ['progress', 'kjhtml'], 24 | port: 9876, 25 | colors: true, 26 | logLevel: config.LOG_INFO, 27 | autoWatch: true, 28 | browsers: ['Chrome'], 29 | singleRun: false 30 | }); 31 | }; -------------------------------------------------------------------------------- /AdminPortal/src/app/navbar/navbar.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { LoginService } from '../login.service'; 3 | import { Router } from '@angular/router'; 4 | 5 | @Component({ 6 | selector: 'app-navbar', 7 | templateUrl: './navbar.component.html', 8 | styleUrls: ['./navbar.component.css'] 9 | }) 10 | export class NavbarComponent implements OnInit { 11 | 12 | loggedIn: boolean; 13 | 14 | constructor(private loginService: LoginService, private router : Router) { 15 | if(localStorage.getItem('PortalAdminHasLoggedIn') == '') { 16 | this.loggedIn = false; 17 | } else { 18 | this.loggedIn = true; 19 | } 20 | } 21 | 22 | logout(){ 23 | this.loginService.logout().subscribe( 24 | res => { 25 | console.log(res); 26 | localStorage.setItem('PortalAdminHasLoggedIn', ''); 27 | }, 28 | err => console.log(err) 29 | ); 30 | location.reload(); 31 | this.router.navigate(['/login']); 32 | } 33 | 34 | getDisplay() { 35 | if(!this.loggedIn){ 36 | return "none"; 37 | } else { 38 | return ""; 39 | } 40 | } 41 | 42 | ngOnInit() { 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /AdminPortal/README.md: -------------------------------------------------------------------------------- 1 | # AdminPortal 2 | 3 | This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 6.1.1. 4 | 5 | ## Development server 6 | 7 | Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. 8 | 9 | ## Code scaffolding 10 | 11 | Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. 12 | 13 | ## Build 14 | 15 | Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build. 16 | 17 | ## Running unit tests 18 | 19 | Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). 20 | 21 | ## Running end-to-end tests 22 | 23 | Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). 24 | 25 | ## Further help 26 | 27 | To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). 28 | -------------------------------------------------------------------------------- /AdminPortal/src/app/app.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, async } from '@angular/core/testing'; 2 | import { AppComponent } from './app.component'; 3 | describe('AppComponent', () => { 4 | beforeEach(async(() => { 5 | TestBed.configureTestingModule({ 6 | declarations: [ 7 | AppComponent 8 | ], 9 | }).compileComponents(); 10 | })); 11 | it('should create the app', async(() => { 12 | const fixture = TestBed.createComponent(AppComponent); 13 | const app = fixture.debugElement.componentInstance; 14 | expect(app).toBeTruthy(); 15 | })); 16 | it(`should have as title 'AdminPortal'`, async(() => { 17 | const fixture = TestBed.createComponent(AppComponent); 18 | const app = fixture.debugElement.componentInstance; 19 | expect(app.title).toEqual('AdminPortal'); 20 | })); 21 | it('should render title in a h1 tag', async(() => { 22 | const fixture = TestBed.createComponent(AppComponent); 23 | fixture.detectChanges(); 24 | const compiled = fixture.debugElement.nativeElement; 25 | expect(compiled.querySelector('h1').textContent).toContain('Welcome to AdminPortal!'); 26 | })); 27 | }); 28 | -------------------------------------------------------------------------------- /UserFront/src/main/java/com/userfront/domain/security/Role.java: -------------------------------------------------------------------------------- 1 | package com.userfront.domain.security; 2 | 3 | import javax.persistence.*; 4 | import java.util.HashSet; 5 | import java.util.Set; 6 | 7 | /** 8 | * Created by MTouiti on 11/05/18. 9 | */ 10 | 11 | @Entity 12 | public class Role { 13 | @Id 14 | // @GeneratedValue(strategy = GenerationType.AUTO) 15 | private int roleId; 16 | 17 | private String name; 18 | 19 | @OneToMany(mappedBy = "role", cascade = CascadeType.ALL, fetch = FetchType.LAZY) 20 | private Set userRoles = new HashSet<>(); 21 | 22 | public Role() { 23 | 24 | } 25 | 26 | public int getRoleId() { 27 | return roleId; 28 | } 29 | 30 | public void setRoleId(int roleId) { 31 | this.roleId = roleId; 32 | } 33 | 34 | public String getName() { 35 | return name; 36 | } 37 | 38 | public void setName(String name) { 39 | this.name = name; 40 | } 41 | 42 | public Set getUserRoles() { 43 | return userRoles; 44 | } 45 | 46 | public void setUserRoles(Set userRoles) { 47 | this.userRoles = userRoles; 48 | } 49 | 50 | 51 | } 52 | -------------------------------------------------------------------------------- /AdminPortal/src/app/primary-transaction/primary-transaction.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import {UserService} from '../user.service'; 3 | import { ActivatedRoute, Params } from '@angular/router'; 4 | 5 | @Component({ 6 | selector: 'app-primary-transaction', 7 | templateUrl: './primary-transaction.component.html', 8 | styleUrls: ['./primary-transaction.component.css'] 9 | }) 10 | export class PrimaryTransactionComponent implements OnInit { 11 | 12 | username:string; 13 | primaryTransactionList: Object[]; 14 | 15 | constructor(private route: ActivatedRoute, private userService: UserService) { 16 | this.route.params.forEach((params: Params) => { 17 | this.username = params['username']; 18 | }); 19 | 20 | this.getPrimaryTransactionList(); 21 | } 22 | 23 | getPrimaryTransactionList() { 24 | this.userService.getPrimaryTransactionList(this.username).subscribe( 25 | res => { 26 | console.log(JSON.parse(JSON.stringify(res))._body); 27 | this.primaryTransactionList = JSON.parse(JSON.parse(JSON.stringify(res))._body); 28 | }, 29 | error => console.log(error) 30 | ) 31 | } 32 | 33 | ngOnInit() {} 34 | 35 | } 36 | -------------------------------------------------------------------------------- /AdminPortal/src/app/savings-transaction/savings-transaction.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import {UserService} from '../user.service'; 3 | import { ActivatedRoute, Params } from '@angular/router'; 4 | 5 | 6 | @Component({ 7 | selector: 'app-savings-transaction', 8 | templateUrl: './savings-transaction.component.html', 9 | styleUrls: ['./savings-transaction.component.css'] 10 | }) 11 | export class SavingsTransactionComponent implements OnInit { 12 | 13 | username:string; 14 | savingsTransactionList: Object[]; 15 | 16 | constructor(private route: ActivatedRoute, private userService: UserService) { 17 | this.route.params.forEach((params: Params) => { 18 | this.username = params['username']; 19 | }); 20 | 21 | this.getSavingsTransactionList(); 22 | } 23 | 24 | getSavingsTransactionList() { 25 | this.userService.getSavingsTransactionList(this.username).subscribe( 26 | res => { 27 | console.log(JSON.parse(JSON.stringify(res))._body); 28 | this.savingsTransactionList = JSON.parse(JSON.parse(JSON.stringify(res))._body); 29 | }, 30 | error => console.log(error) 31 | ) 32 | } 33 | 34 | ngOnInit() {} 35 | } 36 | -------------------------------------------------------------------------------- /AdminPortal/src/app/login/login.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import {Observable} from 'rxjs'; 3 | import {LoginService} from '../login.service'; 4 | 5 | @Component({ 6 | selector: 'app-login', 7 | templateUrl: './login.component.html', 8 | styleUrls: ['./login.component.css'] 9 | }) 10 | export class LoginComponent implements OnInit { 11 | 12 | loggedIn: boolean; 13 | username: string; 14 | password: string; 15 | 16 | constructor (private loginService: LoginService) { 17 | if(localStorage.getItem('PortalAdminHasLoggedIn') == '' || localStorage.getItem('PortalAdminHasLoggedIn') == null) { 18 | this.loggedIn = false; 19 | } else { 20 | this.loggedIn = true; 21 | } 22 | } 23 | 24 | onSubmit() { 25 | this.loginService.sendCredential(this.username, this.password).subscribe( 26 | res => { 27 | if('http://localhost:8080/userFront' == res.url){ 28 | this.loggedIn=true; 29 | localStorage.setItem('PortalAdminHasLoggedIn', 'true'); 30 | location.reload(); 31 | } 32 | 33 | }, 34 | err => console.log(err) 35 | ); 36 | } 37 | 38 | ngOnInit() {} 39 | 40 | } 41 | -------------------------------------------------------------------------------- /UserFront/src/main/java/com/userfront/resource/AppointmentResource.java: -------------------------------------------------------------------------------- 1 | package com.userfront.resource; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.security.access.prepost.PreAuthorize; 7 | import org.springframework.web.bind.annotation.PathVariable; 8 | import org.springframework.web.bind.annotation.RequestMapping; 9 | import org.springframework.web.bind.annotation.RestController; 10 | 11 | import com.userfront.domain.Appointment; 12 | import com.userfront.service.AppointmentService; 13 | 14 | @RestController 15 | @RequestMapping("/api/appointment") 16 | @PreAuthorize("hasRole('ADMIN')") 17 | public class AppointmentResource { 18 | 19 | @Autowired 20 | private AppointmentService appointmentService; 21 | 22 | @RequestMapping("/all") 23 | public List findAppointmentList() { 24 | List appointmentList = appointmentService.findAll(); 25 | 26 | return appointmentList; 27 | } 28 | 29 | @RequestMapping("/{id}/confirm") 30 | public void confirmAppointment(@PathVariable("id") Long id) { 31 | appointmentService.confirmAppointment(id); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /AdminPortal/src/app/user.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import {Http, Headers} from '@angular/http'; 3 | 4 | 5 | @Injectable() 6 | export class UserService { 7 | 8 | constructor (private http:Http){} 9 | 10 | getUsers() { 11 | let url = "http://localhost:8080/api/user/all"; 12 | return this.http.get(url, { withCredentials: true }); 13 | } 14 | 15 | getPrimaryTransactionList(username: string) { 16 | let url = "http://localhost:8080/api/user/primary/transaction?username="+username; 17 | return this.http.get(url, { withCredentials: true }); 18 | } 19 | 20 | getSavingsTransactionList(username: string) { 21 | let url = "http://localhost:8080/api/user/savings/transaction?username="+username; 22 | return this.http.get(url, { withCredentials: true }); 23 | } 24 | 25 | enableUser (username: string) { 26 | let url = "http://localhost:8080/api/user/"+username+"/enable"; 27 | return this.http.get(url, { withCredentials: true }); 28 | } 29 | 30 | disableUser (username: string) { 31 | let url = "http://localhost:8080/api/user/"+username+"/disable"; 32 | return this.http.get(url, { withCredentials: true }); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /UserFront/src/main/java/com/userfront/service/UserServiceImpl/AppointmentServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.userfront.service.UserServiceImpl; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import com.userfront.Dao.AppointmentDao; 9 | import com.userfront.domain.Appointment; 10 | import com.userfront.service.AppointmentService; 11 | 12 | @Service 13 | public class AppointmentServiceImpl implements AppointmentService { 14 | 15 | @Autowired 16 | private AppointmentDao appointmentDao; 17 | 18 | public Appointment createAppointment(Appointment appointment) { 19 | return appointmentDao.save(appointment); 20 | } 21 | 22 | public List findAll() { 23 | return appointmentDao.findAll(); 24 | } 25 | 26 | public Appointment findAppointment(Long id) { 27 | return appointmentDao.findById(id) 28 | .orElse(new Appointment()); 29 | } 30 | 31 | public void confirmAppointment(Long id) { 32 | Appointment appointment = findAppointment(id); 33 | appointment.setConfirmed(true); 34 | appointmentDao.save(appointment); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /AdminPortal/src/app/user-account/user-account.component.html: -------------------------------------------------------------------------------- 1 |

User Account Page

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 |
User NameFirst NameLast NameEmailPhonePrimary AccountSavings AccountEnabledAction
{{user.username}}{{user.firstName}}{{user.lastName}}{{user.email}}{{user.phone}}{{user.primaryAccount.accountBalance}}{{user.savingsAccount.accountBalance}}{{user.enabled}}EnableDisable
32 | 33 | -------------------------------------------------------------------------------- /UserFront/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # ============================ 2 | # = DATA Source 3 | # ============================ 4 | 5 | # Set here configurations for the database connection 6 | 7 | # Connection url for the database "netgloo_blog" 8 | spring.datasource.url = jdbc:mysql://localhost:3306/OnlineBanking 9 | 10 | # Username and secret 11 | spring.datasource.username = root 12 | spring.datasource.password = root 13 | 14 | # keep the connection alive if idle for a long time (needed in production) 15 | spring.datasource.testWhileIdle = true 16 | spring.datasource.validationQuery = SELECT 1 17 | 18 | # ============================ 19 | # = JPA / HIBERNATE 20 | # ============================ 21 | 22 | # Use spring.jpa.properties.* for Hibernate native properties (the prefix is 23 | # stripped before adding them to the entity manager). 24 | 25 | # Show or not log for each sql query 26 | spring.jpa.show-sql = true 27 | 28 | # Hibernate ddl auto (create, create-drop, update): with "update" the database 29 | # schema will be automatically updated accordingly to java entities found in 30 | # the project 31 | spring.jpa.hibernate.ddl-auto = update 32 | 33 | # Allows Hibernate to generate SQL optimized for a particular DBMS 34 | spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect -------------------------------------------------------------------------------- /UserFront/src/main/java/com/userfront/service/UserServiceImpl/UserSecurityService.java: -------------------------------------------------------------------------------- 1 | package com.userfront.service.UserServiceImpl; 2 | 3 | import org.slf4j.Logger; 4 | import org.slf4j.LoggerFactory; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.security.core.userdetails.UserDetails; 7 | import org.springframework.security.core.userdetails.UserDetailsService; 8 | import org.springframework.security.core.userdetails.UsernameNotFoundException; 9 | import org.springframework.stereotype.Service; 10 | 11 | import com.userfront.Dao.UserDao; 12 | import com.userfront.domain.User; 13 | 14 | @Service 15 | public class UserSecurityService implements UserDetailsService { 16 | 17 | /** The application logger */ 18 | private static final Logger LOG = LoggerFactory.getLogger(UserSecurityService.class); 19 | 20 | @Autowired 21 | private UserDao userDao; 22 | 23 | @Override 24 | public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException { 25 | User user = userDao.findByUsername(username); 26 | if (null == user) { 27 | LOG.warn("Username {} not found", username); 28 | throw new UsernameNotFoundException("Username " + username + " not found"); 29 | } 30 | return user; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /AdminPortal/src/app/app-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { RouterModule, Routes } from '@angular/router'; 3 | 4 | import { LoginComponent } from './login/login.component'; 5 | import { UserAccountComponent } from './user-account/user-account.component'; 6 | import { PrimaryTransactionComponent } from './primary-transaction/primary-transaction.component'; 7 | import { SavingsTransactionComponent } from './savings-transaction/savings-transaction.component'; 8 | import { AppointmentComponent } from './appointment/appointment.component'; 9 | 10 | const routes: Routes = [ 11 | { 12 | path: '', 13 | redirectTo: '/login', 14 | pathMatch: 'full' 15 | }, 16 | { 17 | path: 'login', 18 | component: LoginComponent 19 | }, 20 | { 21 | path: 'userAccount', 22 | component: UserAccountComponent 23 | }, 24 | { 25 | path: 'primaryTransaction/:username', 26 | component: PrimaryTransactionComponent 27 | }, 28 | { 29 | path: 'savingsTransaction/:username', 30 | component: SavingsTransactionComponent 31 | }, 32 | { 33 | path: 'appointment', 34 | component: AppointmentComponent 35 | } 36 | ]; 37 | 38 | @NgModule({ 39 | imports: [ RouterModule.forRoot(routes) ], 40 | exports: [ RouterModule ] 41 | }) 42 | 43 | export class AppRoutingModule {} -------------------------------------------------------------------------------- /AdminPortal/src/app/app.routing.ts: -------------------------------------------------------------------------------- 1 | import { ModuleWithProviders } from '@angular/core'; 2 | import { Routes, RouterModule } from '@angular/router'; 3 | 4 | import { LoginComponent } from './login/login.component'; 5 | import { UserAccountComponent } from './user-account/user-account.component'; 6 | // import { PrimaryTransactionComponent } from './primary-transaction/primary-transaction.component'; 7 | // import { SavingsTransactionComponent } from './savings-transaction/savings-transaction.component'; 8 | // import { AppointmentComponent } from './appointment/appointment.component'; 9 | 10 | const appRoutes: Routes = [ 11 | { 12 | path: '', 13 | redirectTo: '/login', 14 | pathMatch: 'full' 15 | }, 16 | { 17 | path: 'login', 18 | component: LoginComponent 19 | }, 20 | { 21 | path: 'userAccount', 22 | component: UserAccountComponent 23 | } 24 | // { 25 | // path: 'primaryTransaction/:username', 26 | // component: PrimaryTransactionComponent 27 | // }, 28 | // { 29 | // path: 'savingsTransaction/:username', 30 | // component: SavingsTransactionComponent 31 | // }, 32 | // { 33 | // path: 'appointment', 34 | // component: AppointmentComponent 35 | // } 36 | ]; 37 | 38 | export const routing: ModuleWithProviders = RouterModule.forRoot(appRoutes); -------------------------------------------------------------------------------- /UserFront/src/main/java/com/userfront/domain/security/UserRole.java: -------------------------------------------------------------------------------- 1 | package com.userfront.domain.security; 2 | 3 | import com.userfront.domain.User; 4 | 5 | import javax.persistence.*; 6 | 7 | /** 8 | * Created by MTouiti on 11/05/18. 9 | */ 10 | 11 | @Entity 12 | @Table(name="user_role") 13 | public class UserRole { 14 | @Id 15 | @GeneratedValue(strategy = GenerationType.AUTO) 16 | private long userRoleId; 17 | 18 | public UserRole(User user, Role role) { 19 | this.user = user; 20 | this.role = role; 21 | } 22 | 23 | 24 | @ManyToOne(fetch = FetchType.EAGER) 25 | @JoinColumn(name = "user_id") 26 | private User user; 27 | 28 | 29 | @ManyToOne(fetch = FetchType.EAGER) 30 | @JoinColumn(name = "role_id") 31 | private Role role; 32 | 33 | public UserRole() {} 34 | 35 | public long getUserRoleId() { 36 | return userRoleId; 37 | } 38 | 39 | public void setUserRoleId(long userRoleId) { 40 | this.userRoleId = userRoleId; 41 | } 42 | 43 | public User getUser() { 44 | return user; 45 | } 46 | 47 | public void setUser(User user) { 48 | this.user = user; 49 | } 50 | 51 | public Role getRole() { 52 | return role; 53 | } 54 | 55 | public void setRole(Role role) { 56 | this.role = role; 57 | } 58 | 59 | 60 | } 61 | -------------------------------------------------------------------------------- /UserFront/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/com.genuitec.eclipse.aeri.server1/server-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "v1", 3 | "title": "Spring IDE", 4 | "timestamp": 1541549106158, 5 | "ttl": 10080, 6 | "helpUrl": "https://aer.ctrlflow.com/spring-ide/help", 7 | "feedbackUrl": "https://www.codetrails.com/error-analytics/", 8 | "aboutUrl": "https://www.codetrails.com/error-analytics/", 9 | "submitUrl": "https://aer.ctrlflow.com/spring-ide/community/new", 10 | "maxReportSize": 524288, 11 | "problemsUrl": "https://aer.ctrlflow.com/downloads/spring-ide/problems.zip", 12 | "problemsTtl": 20160, 13 | "interestUrl": "https://aer.ctrlflow.com/spring-ide/community/interest", 14 | "connectTimeout": 5, 15 | "socketTimeout": 10, 16 | "acceptedProducts": [ 17 | "*" 18 | ], 19 | "acceptedPlugins": [ 20 | "*" 21 | ], 22 | "acceptedPackages": [ 23 | "ch.qos.*", 24 | "com.sun.*", 25 | "java.*", 26 | "javafx.*", 27 | "javax.*", 28 | "org.apache.*", 29 | "org.eclipse.*", 30 | "org.osgi.*", 31 | "org.slf4j.*", 32 | "org.springframework.*", 33 | "sun.*" 34 | ], 35 | "requiredPackages": [ 36 | "org.springframework.*" 37 | ], 38 | "acceptOtherPackages": true, 39 | "acceptUiFreezes": true, 40 | "ignoredStatuses": [ 41 | ":java.net.*:" 42 | ], 43 | "problemsZipLastDownloadTimestamp": 0 44 | } -------------------------------------------------------------------------------- /AdminPortal/src/app/user-account/user-account.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { Router } from '@angular/router'; 3 | import {UserService} from '../user.service'; 4 | 5 | @Component({ 6 | selector: 'app-user-account', 7 | templateUrl: './user-account.component.html', 8 | styleUrls: ['./user-account.component.css'] 9 | }) 10 | export class UserAccountComponent implements OnInit { 11 | 12 | userList: Object[]; 13 | 14 | constructor(private userService: UserService, private router: Router) { 15 | this.getUsers(); 16 | } 17 | 18 | getUsers() { 19 | this.userService.getUsers().subscribe( 20 | res => { 21 | this.userList = JSON.parse(JSON.parse(JSON.stringify(res))._body); 22 | }, 23 | error => console.log(error) 24 | ) 25 | } 26 | 27 | onSelectPrimary(username: string) { 28 | this.router.navigate(['/primaryTransaction', username]); 29 | } 30 | 31 | onSelectSavings(username: string) { 32 | this.router.navigate(['/savingsTransaction', username]); 33 | } 34 | 35 | enableUser(username: string) { 36 | this.userService.enableUser(username).subscribe(); 37 | location.reload(); 38 | } 39 | 40 | disableUser(username: string) { 41 | this.userService.disableUser(username).subscribe(); 42 | location.reload(); 43 | } 44 | 45 | 46 | ngOnInit() { 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /AdminPortal/src/app/navbar/navbar.component.html: -------------------------------------------------------------------------------- 1 | 26 | 27 | -------------------------------------------------------------------------------- /AdminPortal/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { BrowserModule } from '@angular/platform-browser'; 2 | import { NgModule } from '@angular/core'; 3 | import { FormsModule } from '@angular/forms'; 4 | import { HttpModule } from '@angular/http'; 5 | import { AppRoutingModule} from './app-routing.module'; 6 | 7 | import { AppComponent } from './app.component'; 8 | import { NavbarComponent } from './navbar/navbar.component'; 9 | import { LoginComponent } from './login/login.component'; 10 | 11 | import { LoginService } from './login.service'; 12 | import { UserAccountComponent } from './user-account/user-account.component'; 13 | 14 | import {UserService} from './user.service'; 15 | import { PrimaryTransactionComponent } from './primary-transaction/primary-transaction.component'; 16 | import { SavingsTransactionComponent } from './savings-transaction/savings-transaction.component'; 17 | import { AppointmentComponent } from './appointment/appointment.component'; 18 | import {AppointmentService} from './appointment.service'; 19 | 20 | @NgModule({ 21 | declarations: [ 22 | AppComponent, 23 | NavbarComponent, 24 | LoginComponent, 25 | UserAccountComponent, 26 | PrimaryTransactionComponent, 27 | SavingsTransactionComponent, 28 | AppointmentComponent 29 | ], 30 | imports: [ 31 | BrowserModule, 32 | FormsModule, 33 | HttpModule, 34 | AppRoutingModule 35 | ], 36 | providers: [ 37 | LoginService, 38 | UserService, 39 | AppointmentService 40 | ], 41 | bootstrap: [AppComponent] 42 | }) 43 | export class AppModule { } 44 | -------------------------------------------------------------------------------- /AdminPortal/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "admin-portal", 3 | "version": "0.0.0", 4 | "scripts": { 5 | "ng": "ng", 6 | "start": "ng serve", 7 | "build": "ng build", 8 | "test": "ng test", 9 | "lint": "ng lint", 10 | "e2e": "ng e2e" 11 | }, 12 | "private": true, 13 | "dependencies": { 14 | "@angular/animations": "^6.1.0", 15 | "@angular/common": "^6.1.0", 16 | "@angular/compiler": "^6.1.0", 17 | "@angular/core": "^6.1.0", 18 | "@angular/forms": "^6.1.0", 19 | "@angular/http": "^6.1.0", 20 | "@angular/platform-browser": "^6.1.0", 21 | "@angular/platform-browser-dynamic": "^6.1.0", 22 | "@angular/router": "^6.1.0", 23 | "core-js": "^2.5.4", 24 | "parsejson": "0.0.3", 25 | "rxjs": "^6.0.0", 26 | "zone.js": "~0.8.26" 27 | }, 28 | "devDependencies": { 29 | "@angular-devkit/build-angular": "~0.7.0", 30 | "@angular/cli": "~6.1.1", 31 | "@angular/compiler-cli": "^6.1.0", 32 | "@angular/language-service": "^6.1.0", 33 | "@types/jasmine": "~2.8.6", 34 | "@types/jasminewd2": "~2.0.3", 35 | "@types/node": "~8.9.4", 36 | "codelyzer": "~4.2.1", 37 | "jasmine-core": "~2.99.1", 38 | "jasmine-spec-reporter": "~4.2.1", 39 | "karma": "~1.7.1", 40 | "karma-chrome-launcher": "~2.2.0", 41 | "karma-coverage-istanbul-reporter": "~2.0.0", 42 | "karma-jasmine": "~1.1.1", 43 | "karma-jasmine-html-reporter": "^0.2.2", 44 | "protractor": "^5.4.1", 45 | "ts-node": "~5.0.1", 46 | "tslint": "~5.9.1", 47 | "typescript": "~2.7.2" 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /UserFront/src/main/java/com/userfront/service/TransactionService.java: -------------------------------------------------------------------------------- 1 | package com.userfront.service; 2 | 3 | import java.security.Principal; 4 | import java.util.List; 5 | 6 | import com.userfront.domain.PrimaryAccount; 7 | import com.userfront.domain.PrimaryTransaction; 8 | import com.userfront.domain.Recipient; 9 | import com.userfront.domain.SavingsAccount; 10 | import com.userfront.domain.SavingsTransaction; 11 | 12 | public interface TransactionService { 13 | List findPrimaryTransactionList(String username); 14 | 15 | List findSavingsTransactionList(String username); 16 | 17 | void savePrimaryDepositTransaction(PrimaryTransaction primaryTransaction); 18 | 19 | void saveSavingsDepositTransaction(SavingsTransaction savingsTransaction); 20 | 21 | void savePrimaryWithdrawTransaction(PrimaryTransaction primaryTransaction); 22 | void saveSavingsWithdrawTransaction(SavingsTransaction savingsTransaction); 23 | 24 | void betweenAccountsTransfer(String transferFrom, String transferTo, String amount, PrimaryAccount primaryAccount, SavingsAccount savingsAccount) throws Exception; 25 | 26 | List findRecipientList(Principal principal); 27 | 28 | Recipient saveRecipient(Recipient recipient); 29 | 30 | Recipient findRecipientByName(String recipientName); 31 | 32 | void deleteRecipientByName(String recipientName); 33 | 34 | void toSomeoneElseTransfer(Recipient recipient, String accountType, String amount, PrimaryAccount primaryAccount, SavingsAccount savingsAccount); 35 | } 36 | -------------------------------------------------------------------------------- /UserFront/.metadata/.log: -------------------------------------------------------------------------------- 1 | !SESSION 2018-11-07 01:04:11.047 ----------------------------------------------- 2 | eclipse.buildId=4.9.0.I20180906-0745 3 | java.version=1.8.0_181 4 | java.vendor=Oracle Corporation 5 | BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US 6 | Framework arguments: -product org.eclipse.epp.package.jee.product 7 | Command-line arguments: -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.jee.product 8 | 9 | !ENTRY org.eclipse.jface 2 0 2018-11-07 01:05:03.776 10 | !MESSAGE Keybinding conflicts occurred. They may interfere with normal accelerator operation. 11 | !SUBENTRY 1 org.eclipse.jface 2 0 2018-11-07 01:05:03.776 12 | !MESSAGE A conflict occurred for CTRL+SHIFT+T: 13 | Binding(CTRL+SHIFT+T, 14 | ParameterizedCommand(Command(org.eclipse.jdt.ui.navigate.open.type,Open Type, 15 | Open a type in a Java editor, 16 | Category(org.eclipse.ui.category.navigate,Navigate,null,true), 17 | org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@71979130, 18 | ,,true),null), 19 | org.eclipse.ui.defaultAcceleratorConfiguration, 20 | org.eclipse.ui.contexts.window,,,system) 21 | Binding(CTRL+SHIFT+T, 22 | ParameterizedCommand(Command(org.eclipse.lsp4e.symbolinworkspace,Go to Symbol in Workspace, 23 | , 24 | Category(org.eclipse.lsp4e.category,Language Servers,null,true), 25 | org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@3b2317b7, 26 | ,,true),null), 27 | org.eclipse.ui.defaultAcceleratorConfiguration, 28 | org.eclipse.ui.contexts.window,,,system) 29 | 30 | !ENTRY org.eclipse.jface.text 2 0 2018-11-07 01:05:10.384 31 | !MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.boolean' 32 | -------------------------------------------------------------------------------- /UserFront/src/main/java/com/userfront/controller/UserController.java: -------------------------------------------------------------------------------- 1 | package com.userfront.controller; 2 | 3 | import java.security.Principal; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Controller; 7 | import org.springframework.ui.Model; 8 | import org.springframework.web.bind.annotation.ModelAttribute; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.RequestMethod; 11 | 12 | import com.userfront.domain.User; 13 | import com.userfront.service.UserService; 14 | 15 | @Controller 16 | @RequestMapping("/user") 17 | public class UserController { 18 | 19 | @Autowired 20 | private UserService userService; 21 | 22 | @RequestMapping(value = "/profile", method = RequestMethod.GET) 23 | public String profile(Principal principal, Model model) { 24 | User user = userService.findByUsername(principal.getName()); 25 | 26 | model.addAttribute("user", user); 27 | 28 | return "profile"; 29 | } 30 | 31 | @RequestMapping(value = "/profile", method = RequestMethod.POST) 32 | public String profilePost(@ModelAttribute("user") User newUser, Model model) { 33 | User user = userService.findByUsername(newUser.getUsername()); 34 | user.setUsername(newUser.getUsername()); 35 | user.setFirstName(newUser.getFirstName()); 36 | user.setLastName(newUser.getLastName()); 37 | user.setEmail(newUser.getEmail()); 38 | user.setPhone(newUser.getPhone()); 39 | 40 | model.addAttribute("user", user); 41 | 42 | userService.saveUser(user); 43 | 44 | return "profile"; 45 | } 46 | 47 | 48 | } 49 | 50 | -------------------------------------------------------------------------------- /UserFront/src/main/java/com/userfront/domain/PrimaryAccount.java: -------------------------------------------------------------------------------- 1 | package com.userfront.domain; 2 | 3 | import java.math.BigDecimal; 4 | import java.util.List; 5 | 6 | import javax.persistence.CascadeType; 7 | import javax.persistence.Entity; 8 | import javax.persistence.FetchType; 9 | import javax.persistence.GeneratedValue; 10 | import javax.persistence.GenerationType; 11 | import javax.persistence.Id; 12 | import javax.persistence.OneToMany; 13 | 14 | import com.fasterxml.jackson.annotation.JsonIgnore; 15 | 16 | @Entity 17 | public class PrimaryAccount { 18 | 19 | @Id 20 | @GeneratedValue(strategy = GenerationType.AUTO) 21 | private Long id; 22 | private int accountNumber; 23 | private BigDecimal accountBalance; 24 | 25 | @OneToMany(mappedBy = "primaryAccount", cascade = CascadeType.ALL, fetch = FetchType.LAZY) 26 | @JsonIgnore 27 | private List primaryTransactionList; 28 | 29 | public Long getId() { 30 | return id; 31 | } 32 | 33 | public void setId(Long id) { 34 | this.id = id; 35 | } 36 | 37 | public int getAccountNumber() { 38 | return accountNumber; 39 | } 40 | 41 | public void setAccountNumber(int accountNumber) { 42 | this.accountNumber = accountNumber; 43 | } 44 | 45 | public BigDecimal getAccountBalance() { 46 | return accountBalance; 47 | } 48 | 49 | public void setAccountBalance(BigDecimal accountBalance) { 50 | this.accountBalance = accountBalance; 51 | } 52 | 53 | public List getPrimaryTransactionList() { 54 | return primaryTransactionList; 55 | } 56 | 57 | public void setPrimaryTransactionList(List primaryTransactionList) { 58 | this.primaryTransactionList = primaryTransactionList; 59 | } 60 | 61 | 62 | } 63 | -------------------------------------------------------------------------------- /UserFront/src/main/java/com/userfront/domain/SavingsAccount.java: -------------------------------------------------------------------------------- 1 | package com.userfront.domain; 2 | 3 | import java.math.BigDecimal; 4 | import java.util.List; 5 | 6 | import javax.persistence.CascadeType; 7 | import javax.persistence.Entity; 8 | import javax.persistence.FetchType; 9 | import javax.persistence.GeneratedValue; 10 | import javax.persistence.GenerationType; 11 | import javax.persistence.Id; 12 | import javax.persistence.OneToMany; 13 | 14 | import com.fasterxml.jackson.annotation.JsonIgnore; 15 | 16 | @Entity 17 | public class SavingsAccount { 18 | 19 | @Id 20 | @GeneratedValue(strategy = GenerationType.AUTO) 21 | private Long id; 22 | private int accountNumber; 23 | private BigDecimal accountBalance; 24 | 25 | @OneToMany(mappedBy = "savingsAccount", cascade = CascadeType.ALL, fetch = FetchType.LAZY) 26 | @JsonIgnore 27 | private List savingsTransactionList; 28 | 29 | public Long getId() { 30 | return id; 31 | } 32 | 33 | public void setId(Long id) { 34 | this.id = id; 35 | } 36 | 37 | public int getAccountNumber() { 38 | return accountNumber; 39 | } 40 | 41 | public void setAccountNumber(int accountNumber) { 42 | this.accountNumber = accountNumber; 43 | } 44 | 45 | public BigDecimal getAccountBalance() { 46 | return accountBalance; 47 | } 48 | 49 | public void setAccountBalance(BigDecimal accountBalance) { 50 | this.accountBalance = accountBalance; 51 | } 52 | 53 | public List getSavingsTransactionList() { 54 | return savingsTransactionList; 55 | } 56 | 57 | public void setSavingsTransactionList(List savingsTransactionList) { 58 | this.savingsTransactionList = savingsTransactionList; 59 | } 60 | 61 | 62 | } 63 | -------------------------------------------------------------------------------- /UserFront/src/main/java/com/userfront/domain/Recipient.java: -------------------------------------------------------------------------------- 1 | package com.userfront.domain; 2 | 3 | import javax.persistence.Entity; 4 | import javax.persistence.GeneratedValue; 5 | import javax.persistence.GenerationType; 6 | import javax.persistence.Id; 7 | import javax.persistence.JoinColumn; 8 | import javax.persistence.ManyToOne; 9 | 10 | import com.fasterxml.jackson.annotation.JsonIgnore; 11 | 12 | @Entity 13 | public class Recipient { 14 | 15 | @Id 16 | @GeneratedValue(strategy = GenerationType.AUTO) 17 | private Long id; 18 | private String name; 19 | private String email; 20 | private String phone; 21 | private String accountNumber; 22 | private String description; 23 | 24 | @ManyToOne 25 | @JoinColumn(name = "user_id") 26 | @JsonIgnore 27 | private User user; 28 | 29 | public Long getId() { 30 | return id; 31 | } 32 | 33 | public void setId(Long id) { 34 | this.id = id; 35 | } 36 | 37 | public String getName() { 38 | return name; 39 | } 40 | 41 | public void setName(String name) { 42 | this.name = name; 43 | } 44 | 45 | public String getEmail() { 46 | return email; 47 | } 48 | 49 | public void setEmail(String email) { 50 | this.email = email; 51 | } 52 | 53 | public String getPhone() { 54 | return phone; 55 | } 56 | 57 | public void setPhone(String phone) { 58 | this.phone = phone; 59 | } 60 | 61 | public String getAccountNumber() { 62 | return accountNumber; 63 | } 64 | 65 | public void setAccountNumber(String accountNumber) { 66 | this.accountNumber = accountNumber; 67 | } 68 | 69 | public String getDescription() { 70 | return description; 71 | } 72 | 73 | public void setDescription(String description) { 74 | this.description = description; 75 | } 76 | 77 | public User getUser() { 78 | return user; 79 | } 80 | 81 | public void setUser(User user) { 82 | this.user = user; 83 | } 84 | 85 | 86 | } 87 | -------------------------------------------------------------------------------- /UserFront/src/main/resources/templates/deposit.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
7 |
8 |
9 |
10 |
11 | 12 | 17 |
18 |
19 | 20 |
21 | 22 | Amount $ 23 | 24 |
25 | 26 | 29 | 30 | 31 |
32 | 33 |
34 |
35 |
36 |
37 |
38 | 39 | 40 |
41 | 42 | 43 | -------------------------------------------------------------------------------- /UserFront/.metadata/.plugins/org.eclipse.m2e.logback.configuration/logback.1.9.1.20180912-1601.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | %date [%thread] %-5level %logger{35} - %msg%n 5 | 6 | 7 | OFF 8 | 9 | 10 | 11 | 12 | ${org.eclipse.m2e.log.dir}/0.log 13 | 14 | ${org.eclipse.m2e.log.dir}/%i.log 15 | 1 16 | 10 17 | 18 | 19 | 100MB 20 | 21 | 22 | %date [%thread] %-5level %logger{35} - %msg%n 23 | 24 | 25 | 26 | 27 | 28 | WARN 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /UserFront/src/main/java/com/userfront/domain/Appointment.java: -------------------------------------------------------------------------------- 1 | package com.userfront.domain; 2 | 3 | import java.util.Date; 4 | 5 | import javax.persistence.Entity; 6 | import javax.persistence.GeneratedValue; 7 | import javax.persistence.GenerationType; 8 | import javax.persistence.Id; 9 | import javax.persistence.JoinColumn; 10 | import javax.persistence.ManyToOne; 11 | 12 | @Entity 13 | public class Appointment { 14 | 15 | @Id 16 | @GeneratedValue(strategy = GenerationType.AUTO) 17 | private Long id; 18 | private Date date; 19 | private String location; 20 | private String description; 21 | private boolean confirmed; 22 | 23 | @ManyToOne 24 | @JoinColumn(name = "user_id") 25 | private User user; 26 | 27 | public Long getId() { 28 | return id; 29 | } 30 | 31 | public void setId(Long id) { 32 | this.id = id; 33 | } 34 | 35 | public Date getDate() { 36 | return date; 37 | } 38 | 39 | public void setDate(Date date) { 40 | this.date = date; 41 | } 42 | 43 | public String getLocation() { 44 | return location; 45 | } 46 | 47 | public void setLocation(String location) { 48 | this.location = location; 49 | } 50 | 51 | public String getDescription() { 52 | return description; 53 | } 54 | 55 | public void setDescription(String description) { 56 | this.description = description; 57 | } 58 | 59 | public boolean isConfirmed() { 60 | return confirmed; 61 | } 62 | 63 | public void setConfirmed(boolean confirmed) { 64 | this.confirmed = confirmed; 65 | } 66 | 67 | public User getUser() { 68 | return user; 69 | } 70 | 71 | public void setUser(User user) { 72 | this.user = user; 73 | } 74 | 75 | @Override 76 | public String toString() { 77 | return "Appointment{" + 78 | "id=" + id + 79 | ", date=" + date + 80 | ", location=" + location + "'" + 81 | ", description=" + description + "'" + 82 | ", confirmed=" + confirmed + 83 | ", user=" + user + 84 | "}"; 85 | } 86 | 87 | 88 | } 89 | -------------------------------------------------------------------------------- /UserFront/src/main/resources/templates/withdraw.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
7 |
8 |
9 |
10 |
11 | 12 | 17 |
18 |
19 | 20 |
21 | 22 | Amount $ 23 | 24 |
25 | 26 | 29 | 30 | 31 |
32 | 33 |
34 |
35 |
36 |
37 |
38 | 39 | 40 |
41 | 42 | 43 | -------------------------------------------------------------------------------- /UserFront/src/main/resources/static/js/dataTables.bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | DataTables Bootstrap 3 integration 3 | ©2011-2015 SpryMedia Ltd - datatables.net/license 4 | */ 5 | (function(b){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(a){return b(a,window,document)}):"object"===typeof exports?module.exports=function(a,d){a||(a=window);if(!d||!d.fn.dataTable)d=require("datatables.net")(a,d).$;return b(d,a,a.document)}:b(jQuery,window,document)})(function(b,a,d){var f=b.fn.dataTable;b.extend(!0,f.defaults,{dom:"<'row'<'col-sm-6'l><'col-sm-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-5'i><'col-sm-7'p>>",renderer:"bootstrap"});b.extend(f.ext.classes, 6 | {sWrapper:"dataTables_wrapper form-inline dt-bootstrap",sFilterInput:"form-control input-sm",sLengthSelect:"form-control input-sm",sProcessing:"dataTables_processing panel panel-default"});f.ext.renderer.pageButton.bootstrap=function(a,h,r,m,j,n){var o=new f.Api(a),s=a.oClasses,k=a.oLanguage.oPaginate,t=a.oLanguage.oAria.paginate||{},e,g,p=0,q=function(d,f){var l,h,i,c,m=function(a){a.preventDefault();!b(a.currentTarget).hasClass("disabled")&&o.page()!=a.data.action&&o.page(a.data.action).draw("page")}; 7 | l=0;for(h=f.length;l",{"class":s.sPageButton+" "+g,id:0===r&&"string"===typeof c?a.sTableId+"_"+c:null}).append(b("",{href:"#", 8 | "aria-controls":a.sTableId,"aria-label":t[c],"data-dt-idx":p,tabindex:a.iTabIndex}).html(e)).appendTo(d),a.oApi._fnBindAction(i,{action:c},m),p++)}},i;try{i=b(h).find(d.activeElement).data("dt-idx")}catch(u){}q(b(h).empty().html('
    ').children("ul"),m);i&&b(h).find("[data-dt-idx="+i+"]").focus()};return f}); 9 | -------------------------------------------------------------------------------- /UserFront/src/main/java/com/userfront/controller/AppointmentController.java: -------------------------------------------------------------------------------- 1 | package com.userfront.controller; 2 | 3 | import java.security.Principal; 4 | import java.text.ParseException; 5 | import java.text.SimpleDateFormat; 6 | import java.util.Date; 7 | 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.stereotype.Controller; 10 | import org.springframework.ui.Model; 11 | import org.springframework.web.bind.annotation.ModelAttribute; 12 | import org.springframework.web.bind.annotation.RequestMapping; 13 | import org.springframework.web.bind.annotation.RequestMethod; 14 | 15 | import com.userfront.domain.Appointment; 16 | import com.userfront.domain.User; 17 | import com.userfront.service.AppointmentService; 18 | import com.userfront.service.UserService; 19 | 20 | @Controller 21 | @RequestMapping("/appointment") 22 | public class AppointmentController { 23 | 24 | @Autowired 25 | private AppointmentService appointmentService; 26 | 27 | @Autowired 28 | private UserService userService; 29 | 30 | @RequestMapping(value = "/create",method = RequestMethod.GET) 31 | public String createAppointment(Model model) { 32 | Appointment appointment = new Appointment(); 33 | model.addAttribute("appointment", appointment); 34 | model.addAttribute("dateString", ""); 35 | 36 | return "appointment"; 37 | } 38 | 39 | @RequestMapping(value = "/create",method = RequestMethod.POST) 40 | public String createAppointmentPost(@ModelAttribute("appointment") Appointment appointment, @ModelAttribute("dateString") String date, Model model, Principal principal) throws ParseException { 41 | 42 | SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd hh:mm"); 43 | Date d1 = format1.parse( date ); 44 | appointment.setDate(d1); 45 | 46 | User user = userService.findByUsername(principal.getName()); 47 | appointment.setUser(user); 48 | 49 | appointmentService.createAppointment(appointment); 50 | 51 | return "redirect:/userFront"; 52 | } 53 | 54 | 55 | } 56 | -------------------------------------------------------------------------------- /UserFront/src/main/java/com/userfront/config/RequestFilter.java: -------------------------------------------------------------------------------- 1 | package com.userfront.config; 2 | 3 | import javax.servlet.Filter; 4 | import javax.servlet.FilterChain; 5 | import javax.servlet.FilterConfig; 6 | import javax.servlet.ServletRequest; 7 | import javax.servlet.ServletResponse; 8 | import javax.servlet.http.HttpServletRequest; 9 | import javax.servlet.http.HttpServletResponse; 10 | 11 | import org.springframework.core.Ordered; 12 | import org.springframework.core.annotation.Order; 13 | import org.springframework.stereotype.Component; 14 | 15 | @Component 16 | @Order(Ordered.HIGHEST_PRECEDENCE) 17 | public class RequestFilter implements Filter { 18 | 19 | public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) { 20 | HttpServletResponse response = (HttpServletResponse) res; 21 | HttpServletRequest request = (HttpServletRequest) req; 22 | 23 | response.setHeader("Access-Control-Allow-Origin", "http://localhost:4200"); 24 | response.setHeader("Access-Control-Allow-Methods", "POST, PUT, GET, OPTIONS, DELETE"); 25 | response.setHeader("Access-Control-Allow-Headers", "x-requested-with"); 26 | response.setHeader("Access-Control-Max-Age", "3600"); 27 | response.setHeader("Access-Control-Allow-Credentials", "true"); 28 | 29 | if (!(request.getMethod().equalsIgnoreCase("OPTIONS"))) { 30 | try { 31 | chain.doFilter(req, res); 32 | } catch(Exception e) { 33 | e.printStackTrace(); 34 | } 35 | } else { 36 | System.out.println("Pre-flight"); 37 | response.setHeader("Access-Control-Allow-Methods", "POST,GET,DELETE"); 38 | response.setHeader("Access-Control-Max-Age", "3600"); 39 | response.setHeader("Access-Control-Allow-Headers", "authorization, content-type," + 40 | "access-control-request-headers,access-control-request-method,accept,origin,authorization,x-requested-with"); 41 | response.setStatus(HttpServletResponse.SC_OK); 42 | } 43 | 44 | } 45 | 46 | public void init(FilterConfig filterConfig) {} 47 | 48 | public void destroy() {} 49 | 50 | } 51 | -------------------------------------------------------------------------------- /UserFront/src/main/java/com/userfront/resource/UserResource.java: -------------------------------------------------------------------------------- 1 | package com.userfront.resource; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.security.access.prepost.PreAuthorize; 7 | import org.springframework.web.bind.annotation.PathVariable; 8 | import org.springframework.web.bind.annotation.RequestMapping; 9 | import org.springframework.web.bind.annotation.RequestMethod; 10 | import org.springframework.web.bind.annotation.RequestParam; 11 | import org.springframework.web.bind.annotation.RestController; 12 | 13 | import com.userfront.domain.PrimaryTransaction; 14 | import com.userfront.domain.SavingsTransaction; 15 | import com.userfront.domain.User; 16 | import com.userfront.service.TransactionService; 17 | import com.userfront.service.UserService; 18 | 19 | @RestController 20 | @RequestMapping("/api") 21 | @PreAuthorize("hasRole('ADMIN')") 22 | public class UserResource { 23 | 24 | @Autowired 25 | private UserService userService; 26 | 27 | @Autowired 28 | private TransactionService transactionService; 29 | 30 | @RequestMapping(value = "/user/all", method = RequestMethod.GET) 31 | public List userList() { 32 | return userService.findUserList(); 33 | } 34 | 35 | @RequestMapping(value = "/user/primary/transaction", method = RequestMethod.GET) 36 | public List getPrimaryTransactionList(@RequestParam("username") String username) { 37 | return transactionService.findPrimaryTransactionList(username); 38 | } 39 | 40 | @RequestMapping(value = "/user/savings/transaction", method = RequestMethod.GET) 41 | public List getSavingsTransactionList(@RequestParam("username") String username) { 42 | return transactionService.findSavingsTransactionList(username); 43 | } 44 | 45 | @RequestMapping("/user/{username}/enable") 46 | public void enableUser(@PathVariable("username") String username) { 47 | userService.enableUser(username); 48 | } 49 | 50 | @RequestMapping("/user/{username}/disable") 51 | public void diableUser(@PathVariable("username") String username) { 52 | userService.disableUser(username); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /UserFront/src/main/resources/static/js/dataTables.uikit.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | DataTables UIkit 3 integration 3 | */ 4 | (function(b){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(a){return b(a,window,document)}):"object"===typeof exports?module.exports=function(a,c){a||(a=window);if(!c||!c.fn.dataTable)c=require("datatables.net")(a,c).$;return b(c,a,a.document)}:b(jQuery,window,document)})(function(b,a,c){var g=b.fn.dataTable;b.extend(!0,g.defaults,{dom:"<'row uk-grid'<'uk-width-1-2'l><'uk-width-1-2'f>><'row uk-grid dt-merge-grid'<'uk-width-1-1'tr>><'row uk-grid dt-merge-grid'<'uk-width-2-5'i><'uk-width-3-5'p>>", 5 | renderer:"uikit"});b.extend(g.ext.classes,{sWrapper:"dataTables_wrapper uk-form dt-uikit",sFilterInput:"uk-form-small",sLengthSelect:"uk-form-small",sProcessing:"dataTables_processing uk-panel"});g.ext.renderer.pageButton.uikit=function(a,h,r,m,j,n){var o=new g.Api(a),s=a.oClasses,k=a.oLanguage.oPaginate,t=a.oLanguage.oAria.paginate||{},f,d,p=0,q=function(c,g){var l,h,i,e,m=function(a){a.preventDefault();!b(a.currentTarget).hasClass("disabled")&&o.page()!=a.data.action&&o.page(a.data.action).draw("page")}; 6 | l=0;for(h=g.length;l';d=j';d=j",{"class":s.sPageButton+" "+d,id:0===r&&"string"===typeof e?a.sTableId+"_"+e:null}).append(b(-1!=d.indexOf("disabled")||-1!=d.indexOf("active")?"":"",{href:"#","aria-controls":a.sTableId,"aria-label":t[e],"data-dt-idx":p,tabindex:a.iTabIndex}).html(f)).appendTo(c),a.oApi._fnBindAction(i,{action:e},m),p++)}},i;try{i=b(h).find(c.activeElement).data("dt-idx")}catch(u){}q(b(h).empty().html('
      ').children("ul"), 8 | m);i&&b(h).find("[data-dt-idx="+i+"]").focus()};return g}); 9 | -------------------------------------------------------------------------------- /UserFront/src/main/resources/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | banner 7 | 44 | 45 |
      46 | 47 | 48 | -------------------------------------------------------------------------------- /UserFront/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.userFront 7 | userFront 8 | 0.0.1-SNAPSHOT 9 | jar 10 | 11 | UserFront 12 | User Frontend For Online Banking Project 13 | 14 | 15 | org.springframework.boot 16 | spring-boot-starter-parent 17 | 2.0.6.RELEASE 18 | 19 | 20 | 21 | 22 | UTF-8 23 | UTF-8 24 | 1.8 25 | 26 | 27 | 28 | 29 | org.springframework.boot 30 | spring-boot-starter-web 31 | 32 | 33 | 34 | org.springframework.boot 35 | spring-boot-starter-thymeleaf 36 | 37 | 38 | 39 | org.springframework.boot 40 | spring-boot-starter-jdbc 41 | 42 | 43 | 44 | org.springframework.boot 45 | spring-boot-starter-data-jpa 46 | 47 | 48 | 49 | mysql 50 | mysql-connector-java 51 | 52 | 53 | 54 | org.springframework.boot 55 | spring-boot-starter-security 56 | 57 | 58 | 59 | org.springframework.boot 60 | spring-boot-starter-test 61 | test 62 | 63 | 64 | 65 | 66 | 67 | 68 | org.springframework.boot 69 | spring-boot-maven-plugin 70 | 71 | 72 | 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /UserFront/src/main/resources/templates/toSomeoneElse.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
      7 |
      8 |
      9 |
      10 |
      11 | 12 | 16 |
      17 |
      18 | 19 |
      20 | 21 | 26 |
      27 |
      28 | 29 |
      30 | 31 | Amount $ 32 | 33 |
      34 | 35 | 38 | 39 | 40 |
      41 | 42 |
      43 |
      44 |
      45 |
      46 |
      47 | 48 | 49 |
      50 | 51 | 52 | -------------------------------------------------------------------------------- /UserFront/.metadata/.plugins/org.springsource.ide.eclipse.dashboard.ui/feeds/dashboard.feeds.update/623127801.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Spring Tool Suites Updates 5 | https://spring.io/tools 6 | This feeds imforms about important updates relevant to users of STS. 7 | Feeder 2.0.7(1195) http://reinventedsoftware.com/feeder/ 8 | http://blogs.law.harvard.edu/tech/rss 9 | en-us 10 | sts@springsource.com 11 | Thu, 20 Sep 2018 10:38:33 +0100 12 | Thu, 20 Sep 2018 10:38:33 +0100 13 | 14 | 15 | 16 | Thanks for installing STS 3.9.6 17 | http://spring.io/tools 18 |

      Pivotal has released an update to Spring Tool Suite (STS), the best Eclipse-powered development environment for building Spring powered enterprise application.

      19 |

      Please review the following documents:

      20 |
    • 3.9.6 New & Noteworthy
    • ]]>
      21 | Thu, 20 Sep 2018 12:13:33 +0100 22 | version=[3.9.6.201809180630-RELEASE,4.0.0) 23 | 24 | thanks-for-installing-sts-396 25 |
      26 | 27 | 28 | STS 3.9.6 has been released 29 | http://spring.io/tools 30 |

      Pivotal has released an update to Spring Tool Suite (STS), the best Eclipse-powered development environment for building Spring powered enterprise application.

      It is recommend to update as soon as possible.

      31 |

      Please review the following documents:

      32 |
    • 3.9.6 New & Noteworthy
    • ]]>
      33 | Thu, 20 Sep 2018 12:12:33 +0100 34 | version=[0,3.9.6.201809180630-RELEASE) 35 | severity=important 36 | sts-396-released 37 |
      38 | 39 |
      40 |
      41 | -------------------------------------------------------------------------------- /UserFront/src/main/resources/templates/betweenAccounts.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
      7 |
      8 |
      9 |
      10 |
      11 | 12 | 17 |
      18 |
      19 | 20 |
      21 | 22 | 27 |
      28 |
      29 | 30 |
      31 | 32 | Amount $ 33 | 34 |
      35 | 36 | 39 | 40 | 41 |
      42 | 43 |
      44 |
      45 |
      46 |
      47 |
      48 | 49 | 50 |
      51 | 52 | 53 | -------------------------------------------------------------------------------- /UserFront/src/main/resources/static/js/dataTables.jqueryui.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | DataTables jQuery UI integration 3 | ©2011-2014 SpryMedia Ltd - datatables.net/license 4 | */ 5 | (function(a){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(b){return a(b,window,document)}):"object"===typeof exports?module.exports=function(b,d){b||(b=window);if(!d||!d.fn.dataTable)d=require("datatables.net")(b,d).$;return a(d,b,b.document)}:a(jQuery,window,document)})(function(a){var b=a.fn.dataTable;a.extend(!0,b.defaults,{dom:'<"fg-toolbar ui-toolbar ui-widget-header ui-helper-clearfix ui-corner-tl ui-corner-tr"lfr>t<"fg-toolbar ui-toolbar ui-widget-header ui-helper-clearfix ui-corner-bl ui-corner-br"ip>', 6 | renderer:"jqueryui"});a.extend(b.ext.classes,{sWrapper:"dataTables_wrapper dt-jqueryui",sPageButton:"fg-button ui-button ui-state-default",sPageButtonActive:"ui-state-disabled",sPageButtonDisabled:"ui-state-disabled",sPaging:"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",sSortAsc:"ui-state-default sorting_asc",sSortDesc:"ui-state-default sorting_desc",sSortable:"ui-state-default sorting",sSortableAsc:"ui-state-default sorting_asc_disabled",sSortableDesc:"ui-state-default sorting_desc_disabled", 7 | sSortableNone:"ui-state-default sorting_disabled",sSortIcon:"DataTables_sort_icon",sScrollHead:"dataTables_scrollHead ui-state-default",sScrollFoot:"dataTables_scrollFoot ui-state-default",sHeaderTH:"ui-state-default",sFooterTH:"ui-state-default"});b.ext.renderer.header.jqueryui=function(b,h,e,c){var f="css_right ui-icon ui-icon-carat-2-n-s",g=-1!==a.inArray("asc",e.asSorting),i=-1!==a.inArray("desc",e.asSorting);!e.bSortable||!g&&!i?f="":g&&!i?f="css_right ui-icon ui-icon-carat-1-n":!g&&i&&(f="css_right ui-icon ui-icon-carat-1-s"); 8 | a("
      ").addClass("DataTables_sort_wrapper").append(h.contents()).append(a("").addClass(c.sSortIcon+" "+f)).appendTo(h);a(b.nTable).on("order.dt",function(a,g,i,j){b===g&&(a=e.idx,h.removeClass(c.sSortAsc+" "+c.sSortDesc).addClass("asc"==j[a]?c.sSortAsc:"desc"==j[a]?c.sSortDesc:e.sSortingClass),h.find("span."+c.sSortIcon).removeClass("css_right ui-icon ui-icon-triangle-1-n css_right ui-icon ui-icon-triangle-1-s css_right ui-icon ui-icon-carat-2-n-s css_right ui-icon ui-icon-carat-1-n css_right ui-icon ui-icon-carat-1-s").addClass("asc"== 9 | j[a]?"css_right ui-icon ui-icon-triangle-1-n":"desc"==j[a]?"css_right ui-icon ui-icon-triangle-1-s":f))})};b.TableTools&&a.extend(!0,b.TableTools.classes,{container:"DTTT_container ui-buttonset ui-buttonset-multi",buttons:{normal:"DTTT_button ui-button ui-state-default"},collection:{container:"DTTT_collection ui-buttonset ui-buttonset-multi"}});return b}); 10 | -------------------------------------------------------------------------------- /UserFront/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/server-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "v1", 3 | "title": "Eclipse", 4 | "timestamp": 1541549106175, 5 | "ttl": 10080, 6 | "helpUrl": "https://dev.eclipse.org/recommenders/community/aeri/v2/help/", 7 | "feedbackUrl": "https://www.codetrails.com/error-analytics/", 8 | "aboutUrl": "https://wiki.eclipse.org/EPP/Logging", 9 | "submitUrl": "https://dev.eclipse.org/recommenders/community/confess/0.6/reports/", 10 | "maxReportSize": 262144, 11 | "problemsUrl": "https://www.eclipse.org/downloads/download.php?r\u003d1\u0026file\u003d/technology/epp/logging/problems.zip", 12 | "problemsTtl": 20160, 13 | "interestUrl": "https://dev.eclipse.org/recommenders/community/confess/v2/interest", 14 | "connectTimeout": 10, 15 | "socketTimeout": 10, 16 | "acceptedProducts": [ 17 | "org.eclipse.*", 18 | "org.fordiac.*" 19 | ], 20 | "acceptedPlugins": [ 21 | "org.apache.log4j.*", 22 | "org.eclipse.*", 23 | "org.fordiac.*" 24 | ], 25 | "acceptedPackages": [ 26 | "ch.qos.*", 27 | "com.cforcoding.*", 28 | "com.google.*", 29 | "com.gradleware.tooling.*", 30 | "com.mountainminds.eclemma.*", 31 | "com.naef.*", 32 | "com.sun.*", 33 | "java.*", 34 | "javafx.*", 35 | "javax.*", 36 | "org.apache.*", 37 | "org.eclipse.*", 38 | "org.fordiac.*", 39 | "org.gradle.*", 40 | "org.jacoco.*", 41 | "org.osgi.*", 42 | "org.slf4j.*", 43 | "sun.*" 44 | ], 45 | "requiredPackages": [ 46 | "com.cforcoding.*", 47 | "com.gradleware.tooling.*", 48 | "com.mountainminds.eclemma.*", 49 | "com.naef.*", 50 | "org.eclipse.*", 51 | "org.fordiac.*", 52 | "org.gradle.*", 53 | "org.jacoco.*" 54 | ], 55 | "acceptOtherPackages": false, 56 | "acceptUiFreezes": true, 57 | "ignoredStatuses": [ 58 | ":java.io.IOException:There is not enough space on the disk", 59 | ":java.net.*:", 60 | "org.eclipse.core.filesystem::Could not delete*", 61 | "org.eclipse.core.filesystem::Could not move*", 62 | "org.eclipse.core.resources:org.eclipse.core.internal.resources.ResourceException:Resource is out of sync with the file system*", 63 | "org.eclipse.core.runtime::Invalid input url*", 64 | "org.eclipse.epp.mpc.ui:java.io.IOException:", 65 | "org.eclipse.equinox.p2.*::", 66 | "org.eclipse.jface:java.io.IOException:Unable to resolve plug-in*", 67 | "org.eclipse.oomph.setup.core:$org.apache.http.ConnectionClosedException:", 68 | "org.eclipse.pde.core::The current target platform contains errors*", 69 | "org.eclipse.ui::Conflicting handlers for*" 70 | ], 71 | "problemsZipLastDownloadTimestamp": 0 72 | } -------------------------------------------------------------------------------- /UserFront/src/main/java/com/userfront/controller/HomeController.java: -------------------------------------------------------------------------------- 1 | package com.userfront.controller; 2 | 3 | import java.security.Principal; 4 | import java.util.HashSet; 5 | import java.util.Set; 6 | 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Controller; 9 | import org.springframework.ui.Model; 10 | import org.springframework.web.bind.annotation.ModelAttribute; 11 | import org.springframework.web.bind.annotation.RequestMapping; 12 | import org.springframework.web.bind.annotation.RequestMethod; 13 | 14 | import com.userfront.Dao.RoleDao; 15 | import com.userfront.domain.PrimaryAccount; 16 | import com.userfront.domain.SavingsAccount; 17 | import com.userfront.domain.User; 18 | import com.userfront.domain.security.UserRole; 19 | import com.userfront.service.UserService; 20 | 21 | @Controller 22 | public class HomeController { 23 | 24 | @Autowired 25 | private UserService userService; 26 | 27 | @Autowired 28 | private RoleDao roleDao; 29 | 30 | @RequestMapping("/") 31 | public String home() { 32 | return "redirect:/index"; 33 | } 34 | 35 | @RequestMapping("/index") 36 | public String index() { 37 | return "index"; 38 | } 39 | 40 | @RequestMapping(value = "/signup", method = RequestMethod.GET) 41 | public String signup(Model model) { 42 | User user = new User(); 43 | 44 | model.addAttribute("user", user); 45 | 46 | return "signup"; 47 | } 48 | 49 | @RequestMapping(value = "/signup", method = RequestMethod.POST) 50 | public String signupPost(@ModelAttribute("user") User user, Model model) { 51 | 52 | if(userService.checkUserExists(user.getUsername(), user.getEmail())) { 53 | 54 | if(userService.checkEmailExists(user.getEmail())) { 55 | model.addAttribute("emailExists", true); 56 | } 57 | 58 | if(userService.checkUsernameExists(user.getUsername())) { 59 | model.addAttribute("usernameExists", true); 60 | } 61 | 62 | return "signup"; 63 | }else { 64 | 65 | Set userRoles = new HashSet<>(); 66 | userRoles.add(new UserRole(user, roleDao.findByName("ROLE_USER"))); 67 | userService.createUser(user, userRoles); 68 | 69 | return "redirect:/"; 70 | } 71 | } 72 | 73 | @RequestMapping("/userFront") 74 | public String userFront(Principal principal, Model model) { 75 | User user = userService.findByUsername(principal.getName()); 76 | PrimaryAccount primaryAccount = user.getPrimaryAccount(); 77 | SavingsAccount savingsAccount = user.getSavingsAccount(); 78 | 79 | model.addAttribute("primaryAccount", primaryAccount); 80 | model.addAttribute("savingsAccount", savingsAccount); 81 | 82 | return "userFront"; 83 | } 84 | 85 | } 86 | -------------------------------------------------------------------------------- /UserFront/src/main/java/com/userfront/domain/PrimaryTransaction.java: -------------------------------------------------------------------------------- 1 | package com.userfront.domain; 2 | 3 | import java.math.BigDecimal; 4 | import java.util.Date; 5 | 6 | import javax.persistence.Entity; 7 | import javax.persistence.GeneratedValue; 8 | import javax.persistence.GenerationType; 9 | import javax.persistence.Id; 10 | import javax.persistence.JoinColumn; 11 | import javax.persistence.ManyToOne; 12 | 13 | @Entity 14 | public class PrimaryTransaction { 15 | 16 | @Id 17 | @GeneratedValue(strategy = GenerationType.AUTO) 18 | private Long id; 19 | private Date date; 20 | private String description; 21 | private String type; 22 | private String status; 23 | private double amount; 24 | private BigDecimal availableBalance; 25 | 26 | @ManyToOne 27 | @JoinColumn(name = "primary_account_id") 28 | private PrimaryAccount primaryAccount; 29 | 30 | public PrimaryTransaction(){} 31 | 32 | public PrimaryTransaction(Date date, String description, String type, String status, double amount, 33 | BigDecimal availableBalance, PrimaryAccount primaryAccount) { 34 | super(); 35 | this.date = date; 36 | this.description = description; 37 | this.type = type; 38 | this.status = status; 39 | this.amount = amount; 40 | this.availableBalance = availableBalance; 41 | this.primaryAccount = primaryAccount; 42 | } 43 | 44 | public Long getId() { 45 | return id; 46 | } 47 | 48 | public void setId(Long id) { 49 | this.id = id; 50 | } 51 | 52 | public Date getDate() { 53 | return date; 54 | } 55 | 56 | public void setDate(Date date) { 57 | this.date = date; 58 | } 59 | 60 | public String getDesription() { 61 | return description; 62 | } 63 | 64 | public void setDesription(String description) { 65 | this.description = description; 66 | } 67 | 68 | public String getType() { 69 | return type; 70 | } 71 | 72 | public void setType(String type) { 73 | this.type = type; 74 | } 75 | 76 | public String getStatus() { 77 | return status; 78 | } 79 | 80 | public void setStatus(String status) { 81 | this.status = status; 82 | } 83 | 84 | public double getAmount() { 85 | return amount; 86 | } 87 | 88 | public void setAmount(double amount) { 89 | this.amount = amount; 90 | } 91 | 92 | public BigDecimal getAvailableBalance() { 93 | return availableBalance; 94 | } 95 | 96 | public void setAvailableBalance(BigDecimal availableBalance) { 97 | this.availableBalance = availableBalance; 98 | } 99 | 100 | public PrimaryAccount getPrimaryAccount() { 101 | return primaryAccount; 102 | } 103 | 104 | public void setPrimaryAccount(PrimaryAccount primaryAccount) { 105 | this.primaryAccount = primaryAccount; 106 | } 107 | 108 | 109 | } 110 | -------------------------------------------------------------------------------- /UserFront/src/main/java/com/userfront/domain/SavingsTransaction.java: -------------------------------------------------------------------------------- 1 | package com.userfront.domain; 2 | 3 | import java.math.BigDecimal; 4 | import java.util.Date; 5 | 6 | import javax.persistence.Entity; 7 | import javax.persistence.GeneratedValue; 8 | import javax.persistence.GenerationType; 9 | import javax.persistence.Id; 10 | import javax.persistence.JoinColumn; 11 | import javax.persistence.ManyToOne; 12 | 13 | @Entity 14 | public class SavingsTransaction { 15 | 16 | @Id 17 | @GeneratedValue(strategy = GenerationType.AUTO) 18 | private Long id; 19 | private Date date; 20 | private String description; 21 | private String type; 22 | private String status; 23 | private double amount; 24 | private BigDecimal availableBalance; 25 | 26 | @ManyToOne 27 | @JoinColumn(name = "savings_account_id") 28 | private SavingsAccount savingsAccount; 29 | 30 | public SavingsTransaction(){} 31 | 32 | public SavingsTransaction(Date date, String description, String type, String status, double amount, 33 | BigDecimal availableBalance, SavingsAccount savingsAccount) { 34 | super(); 35 | this.date = date; 36 | this.description = description; 37 | this.type = type; 38 | this.status = status; 39 | this.amount = amount; 40 | this.availableBalance = availableBalance; 41 | this.savingsAccount = savingsAccount; 42 | } 43 | 44 | public Long getId() { 45 | return id; 46 | } 47 | 48 | public void setId(Long id) { 49 | this.id = id; 50 | } 51 | 52 | public Date getDate() { 53 | return date; 54 | } 55 | 56 | public void setDate(Date date) { 57 | this.date = date; 58 | } 59 | 60 | public String getDesription() { 61 | return description; 62 | } 63 | 64 | public void setDesription(String description) { 65 | this.description = description; 66 | } 67 | 68 | public String getType() { 69 | return type; 70 | } 71 | 72 | public void setType(String type) { 73 | this.type = type; 74 | } 75 | 76 | public String getStatus() { 77 | return status; 78 | } 79 | 80 | public void setStatus(String status) { 81 | this.status = status; 82 | } 83 | 84 | public double getAmount() { 85 | return amount; 86 | } 87 | 88 | public void setAmount(double amount) { 89 | this.amount = amount; 90 | } 91 | 92 | public BigDecimal getAvailableBalance() { 93 | return availableBalance; 94 | } 95 | 96 | public void setAvailableBalance(BigDecimal availableBalance) { 97 | this.availableBalance = availableBalance; 98 | } 99 | 100 | public SavingsAccount getSavingsAccount() { 101 | return savingsAccount; 102 | } 103 | 104 | public void setSavingsAccount(SavingsAccount savingsAccount) { 105 | this.savingsAccount = savingsAccount; 106 | } 107 | 108 | 109 | } 110 | -------------------------------------------------------------------------------- /UserFront/src/main/resources/templates/savingsAccount.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
      7 |
      8 |
      9 | 10 |
      11 | 12 |
      13 | 14 |
      15 |
      16 |
      17 |
      18 |
      19 |
      20 |
      21 |
      22 |

      Savings Balance:

      23 |
      24 |
      25 |

      ...

      26 |
      27 |
      28 |
      29 | 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 |
      Post DateDescriptionTypeStatusAmountAvailable Balance
      ..................
      63 |
      64 |
      65 | 66 | 67 |
      68 | 69 | 70 | -------------------------------------------------------------------------------- /UserFront/src/main/resources/static/js/main.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by MTouiti on 10/29/18. 3 | */ 4 | 5 | (function ($) { 6 | $.toggleShowPassword = function (options) { 7 | var settings = $.extend({ 8 | field: "#password", 9 | control: "#toggle_show_password", 10 | }, options); 11 | 12 | var control = $(settings.control); 13 | var field = $(settings.field) 14 | 15 | control.bind('click', function () { 16 | if (control.is(':checked')) { 17 | field.attr('type', 'text'); 18 | } else { 19 | field.attr('type', 'password'); 20 | } 21 | }) 22 | }; 23 | 24 | $.transferDisplay = function () { 25 | $("#transferFrom").change(function() { 26 | if ($("#transferFrom").val() == 'Primary') { 27 | $('#transferTo').val('Savings'); 28 | } else if ($("#transferFrom").val() == 'Savings') { 29 | $('#transferTo').val('Primary'); 30 | } 31 | }); 32 | 33 | $("#transferTo").change(function() { 34 | if ($("#transferTo").val() == 'Primary') { 35 | $('#transferFrom').val('Savings'); 36 | } else if ($("#transferTo").val() == 'Savings') { 37 | $('#transferFrom').val('Primary'); 38 | } 39 | }); 40 | }; 41 | 42 | 43 | 44 | }(jQuery)); 45 | 46 | $(document).ready(function() { 47 | var confirm = function() { 48 | bootbox.confirm({ 49 | title: "Appointment Confirmation", 50 | message: "Do you really want to schedule this appointment?", 51 | buttons: { 52 | cancel: { 53 | label: ' Cancel' 54 | }, 55 | confirm: { 56 | label: ' Confirm' 57 | } 58 | }, 59 | callback: function (result) { 60 | if (result == true) { 61 | $('#appointmentForm').submit(); 62 | } else { 63 | console.log("Scheduling cancelled."); 64 | } 65 | } 66 | }); 67 | }; 68 | 69 | $.toggleShowPassword({ 70 | field: '#password', 71 | control: "#showPassword" 72 | }); 73 | 74 | $.transferDisplay(); 75 | 76 | $(".form_datetime").datetimepicker({ 77 | format: "yyyy-mm-dd hh:mm", 78 | autoclose: true, 79 | todayBtn: true, 80 | startDate: "2013-02-14 10:00", 81 | minuteStep: 10 82 | }); 83 | 84 | $('#submitAppointment').click(function () { 85 | confirm(); 86 | }); 87 | 88 | }); 89 | 90 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /UserFront/src/main/resources/templates/appointment.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
      7 |
      8 |
      9 |

      Schedule An Appointment

      10 |
      11 | 12 | 13 |
      14 | 15 |
      16 | 19 | 20 | 21 |
      22 |
      23 | 24 |
      25 | 26 | 34 |
      35 | 36 |
      37 | 38 | 39 |
      40 | 41 | 42 | 45 | 46 | Submit Scheduling 47 |
      48 | 49 |
      50 |
      51 |
      52 |
      53 |
      54 |
      55 | 56 |
      57 | 58 | 59 | -------------------------------------------------------------------------------- /UserFront/src/main/resources/templates/primaryAccount.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
      7 |
      8 |
      9 | 10 |
      11 | 12 |
      13 | 14 |
      15 |
      16 |
      17 |
      18 |
      19 |
      20 |
      21 |
      22 |

      Primary Balance:

      23 |
      24 |
      25 |

      ...

      27 |
      28 |
      29 |
      30 | 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 |
      Post DateDescriptionTypeStatusAmountAvailable Balance
      ..................
      65 |
      66 |
      67 | 68 | 69 |
      70 | 75 | 76 | -------------------------------------------------------------------------------- /UserFront/src/main/java/com/userfront/config/SecurityConfig.java: -------------------------------------------------------------------------------- 1 | package com.userfront.config; 2 | 3 | import java.security.SecureRandom; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.context.annotation.Bean; 7 | import org.springframework.context.annotation.Configuration; 8 | import org.springframework.core.env.Environment; 9 | import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; 10 | import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; 11 | import org.springframework.security.config.annotation.web.builders.HttpSecurity; 12 | import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; 13 | import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; 14 | import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; 15 | import org.springframework.security.web.util.matcher.AntPathRequestMatcher; 16 | 17 | import com.userfront.service.UserServiceImpl.UserSecurityService; 18 | 19 | @Configuration 20 | @EnableWebSecurity 21 | @EnableGlobalMethodSecurity(prePostEnabled=true) 22 | public class SecurityConfig extends WebSecurityConfigurerAdapter { 23 | 24 | @Autowired 25 | private Environment env; 26 | 27 | @Autowired 28 | private UserSecurityService userSecurityService; 29 | 30 | private static final String SALT = "salt"; // Salt should be protected carefully 31 | 32 | @Bean 33 | public BCryptPasswordEncoder passwordEncoder() { 34 | return new BCryptPasswordEncoder(12, new SecureRandom(SALT.getBytes())); 35 | } 36 | 37 | private static final String[] PUBLIC_MATCHERS = { 38 | "/webjars/**", 39 | "/css/**", 40 | "/js/**", 41 | "/images/**", 42 | "/", 43 | "/about/**", 44 | "/contact/**", 45 | "/error/**/*", 46 | "/console/**", 47 | "/signup" 48 | }; 49 | 50 | @Override 51 | protected void configure(HttpSecurity http) throws Exception { 52 | http 53 | .authorizeRequests(). 54 | // antMatchers("/**"). 55 | antMatchers(PUBLIC_MATCHERS). 56 | permitAll().anyRequest().authenticated(); 57 | 58 | http 59 | .csrf().disable().cors().disable() 60 | .formLogin().failureUrl("/index?error").defaultSuccessUrl("/userFront").loginPage("/index").permitAll() 61 | .and() 62 | .logout().logoutRequestMatcher(new AntPathRequestMatcher("/logout")).logoutSuccessUrl("/index?logout").deleteCookies("remember-me").permitAll() 63 | .and() 64 | .rememberMe(); 65 | } 66 | 67 | 68 | 69 | @Autowired 70 | public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception { 71 | // auth.inMemoryAuthentication().withUser("user").password("password").roles("USER"); //This is in-memory authentication 72 | auth.userDetailsService(userSecurityService).passwordEncoder(passwordEncoder()); 73 | } 74 | 75 | 76 | } 77 | -------------------------------------------------------------------------------- /UserFront/src/main/resources/static/css/dataTables.uikit.min.css: -------------------------------------------------------------------------------- 1 | table.dataTable{clear:both;margin-top:6px !important;margin-bottom:6px !important;max-width:none !important}table.dataTable td,table.dataTable th{-webkit-box-sizing:content-box;box-sizing:content-box}table.dataTable td.dataTables_empty,table.dataTable th.dataTables_empty{text-align:center}table.dataTable.nowrap th,table.dataTable.nowrap td{white-space:nowrap}div.dataTables_wrapper div.row.uk-grid.dt-merge-grid{margin-top:5px}div.dataTables_wrapper div.dataTables_length label{font-weight:normal;text-align:left;white-space:nowrap}div.dataTables_wrapper div.dataTables_length select{width:75px;display:inline-block}div.dataTables_wrapper div.dataTables_filter{text-align:right}div.dataTables_wrapper div.dataTables_filter label{font-weight:normal;white-space:nowrap;text-align:left}div.dataTables_wrapper div.dataTables_filter input{margin-left:0.5em;display:inline-block;width:auto}div.dataTables_wrapper div.dataTables_info{padding-top:8px;white-space:nowrap}div.dataTables_wrapper div.dataTables_paginate{margin:0;white-space:nowrap;text-align:right}div.dataTables_wrapper div.dataTables_paginate ul.pagination{margin:2px 0;white-space:nowrap}div.dataTables_wrapper div.dataTables_processing{position:absolute;top:50%;left:50%;width:200px;margin-left:-100px;margin-top:-26px;text-align:center;padding:1em 0}table.dataTable thead>tr>th,table.dataTable thead>tr>td{position:relative}table.dataTable thead>tr>th.sorting_asc,table.dataTable thead>tr>th.sorting_desc,table.dataTable thead>tr>th.sorting,table.dataTable thead>tr>td.sorting_asc,table.dataTable thead>tr>td.sorting_desc,table.dataTable thead>tr>td.sorting{padding-right:30px}table.dataTable thead>tr>th.sorting:after,table.dataTable thead>tr>th.sorting_asc:after,table.dataTable thead>tr>th.sorting_desc:after,table.dataTable thead>tr>td.sorting:after,table.dataTable thead>tr>td.sorting_asc:after,table.dataTable thead>tr>td.sorting_desc:after{position:absolute;top:7px;right:8px;display:block;font-family:'FontAwesome'}table.dataTable thead>tr>th.sorting:after,table.dataTable thead>tr>td.sorting:after{content:"\f0dc";color:#ddd;font-size:0.8em;padding-top:0.12em}table.dataTable thead>tr>th.sorting_asc:after,table.dataTable thead>tr>td.sorting_asc:after{content:"\f0de"}table.dataTable thead>tr>th.sorting_desc:after,table.dataTable thead>tr>td.sorting_desc:after{content:"\f0dd"}div.dataTables_scrollHead table.dataTable{margin-bottom:0 !important}div.dataTables_scrollBody table{border-top:none;margin-top:0 !important;margin-bottom:0 !important}div.dataTables_scrollBody table thead .sorting:after,div.dataTables_scrollBody table thead .sorting_asc:after,div.dataTables_scrollBody table thead .sorting_desc:after{display:none}div.dataTables_scrollBody table tbody tr:first-child th,div.dataTables_scrollBody table tbody tr:first-child td{border-top:none}div.dataTables_scrollFoot table{margin-top:0 !important;border-top:none}@media screen and (max-width: 767px){div.dataTables_wrapper div.dataTables_length,div.dataTables_wrapper div.dataTables_filter,div.dataTables_wrapper div.dataTables_info,div.dataTables_wrapper div.dataTables_paginate{text-align:center}}table.dataTable.uk-table-condensed>thead>tr>th{padding-right:20px}table.dataTable.uk-table-condensed .sorting:after,table.dataTable.uk-table-condensed .sorting_asc:after,table.dataTable.uk-table-condensed .sorting_desc:after{top:6px;right:6px} 2 | -------------------------------------------------------------------------------- /AdminPortal/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rulesDirectory": [ 3 | "node_modules/codelyzer" 4 | ], 5 | "rules": { 6 | "arrow-return-shorthand": true, 7 | "callable-types": true, 8 | "class-name": true, 9 | "comment-format": [ 10 | true, 11 | "check-space" 12 | ], 13 | "curly": true, 14 | "deprecation": { 15 | "severity": "warn" 16 | }, 17 | "eofline": true, 18 | "forin": true, 19 | "import-blacklist": [ 20 | true, 21 | "rxjs/Rx" 22 | ], 23 | "import-spacing": true, 24 | "indent": [ 25 | true, 26 | "spaces" 27 | ], 28 | "interface-over-type-literal": true, 29 | "label-position": true, 30 | "max-line-length": [ 31 | true, 32 | 140 33 | ], 34 | "member-access": false, 35 | "member-ordering": [ 36 | true, 37 | { 38 | "order": [ 39 | "static-field", 40 | "instance-field", 41 | "static-method", 42 | "instance-method" 43 | ] 44 | } 45 | ], 46 | "no-arg": true, 47 | "no-bitwise": true, 48 | "no-console": [ 49 | true, 50 | "debug", 51 | "info", 52 | "time", 53 | "timeEnd", 54 | "trace" 55 | ], 56 | "no-construct": true, 57 | "no-debugger": true, 58 | "no-duplicate-super": true, 59 | "no-empty": false, 60 | "no-empty-interface": true, 61 | "no-eval": true, 62 | "no-inferrable-types": [ 63 | true, 64 | "ignore-params" 65 | ], 66 | "no-misused-new": true, 67 | "no-non-null-assertion": true, 68 | "no-shadowed-variable": true, 69 | "no-string-literal": false, 70 | "no-string-throw": true, 71 | "no-switch-case-fall-through": true, 72 | "no-trailing-whitespace": true, 73 | "no-unnecessary-initializer": true, 74 | "no-unused-expression": true, 75 | "no-use-before-declare": true, 76 | "no-var-keyword": true, 77 | "object-literal-sort-keys": false, 78 | "one-line": [ 79 | true, 80 | "check-open-brace", 81 | "check-catch", 82 | "check-else", 83 | "check-whitespace" 84 | ], 85 | "prefer-const": true, 86 | "quotemark": [ 87 | true, 88 | "single" 89 | ], 90 | "radix": true, 91 | "semicolon": [ 92 | true, 93 | "always" 94 | ], 95 | "triple-equals": [ 96 | true, 97 | "allow-null-check" 98 | ], 99 | "typedef-whitespace": [ 100 | true, 101 | { 102 | "call-signature": "nospace", 103 | "index-signature": "nospace", 104 | "parameter": "nospace", 105 | "property-declaration": "nospace", 106 | "variable-declaration": "nospace" 107 | } 108 | ], 109 | "unified-signatures": true, 110 | "variable-name": false, 111 | "whitespace": [ 112 | true, 113 | "check-branch", 114 | "check-decl", 115 | "check-operator", 116 | "check-separator", 117 | "check-type" 118 | ], 119 | "no-output-on-prefix": true, 120 | "use-input-property-decorator": true, 121 | "use-output-property-decorator": true, 122 | "use-host-property-decorator": true, 123 | "no-input-rename": true, 124 | "no-output-rename": true, 125 | "use-life-cycle-interface": true, 126 | "use-pipe-transform-interface": true, 127 | "component-class-suffix": true, 128 | "directive-class-suffix": true 129 | } 130 | } 131 | -------------------------------------------------------------------------------- /AdminPortal/src/polyfills.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file includes polyfills needed by Angular and is loaded before the app. 3 | * You can add your own extra polyfills to this file. 4 | * 5 | * This file is divided into 2 sections: 6 | * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. 7 | * 2. Application imports. Files imported after ZoneJS that should be loaded before your main 8 | * file. 9 | * 10 | * The current setup is for so-called "evergreen" browsers; the last versions of browsers that 11 | * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), 12 | * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. 13 | * 14 | * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html 15 | */ 16 | 17 | /*************************************************************************************************** 18 | * BROWSER POLYFILLS 19 | */ 20 | 21 | /** IE9, IE10 and IE11 requires all of the following polyfills. **/ 22 | // import 'core-js/es6/symbol'; 23 | // import 'core-js/es6/object'; 24 | // import 'core-js/es6/function'; 25 | // import 'core-js/es6/parse-int'; 26 | // import 'core-js/es6/parse-float'; 27 | // import 'core-js/es6/number'; 28 | // import 'core-js/es6/math'; 29 | // import 'core-js/es6/string'; 30 | // import 'core-js/es6/date'; 31 | // import 'core-js/es6/array'; 32 | // import 'core-js/es6/regexp'; 33 | // import 'core-js/es6/map'; 34 | // import 'core-js/es6/weak-map'; 35 | // import 'core-js/es6/set'; 36 | 37 | /** IE10 and IE11 requires the following for NgClass support on SVG elements */ 38 | // import 'classlist.js'; // Run `npm install --save classlist.js`. 39 | 40 | /** IE10 and IE11 requires the following for the Reflect API. */ 41 | // import 'core-js/es6/reflect'; 42 | 43 | 44 | /** Evergreen browsers require these. **/ 45 | // Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove. 46 | import 'core-js/es7/reflect'; 47 | 48 | 49 | /** 50 | * Web Animations `@angular/platform-browser/animations` 51 | * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari. 52 | * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0). 53 | **/ 54 | // import 'web-animations-js'; // Run `npm install --save web-animations-js`. 55 | 56 | /** 57 | * By default, zone.js will patch all possible macroTask and DomEvents 58 | * user can disable parts of macroTask/DomEvents patch by setting following flags 59 | */ 60 | 61 | // (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame 62 | // (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick 63 | // (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames 64 | 65 | /* 66 | * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js 67 | * with the following flag, it will bypass `zone.js` patch for IE/Edge 68 | */ 69 | // (window as any).__Zone_enable_cross_context_check = true; 70 | 71 | /*************************************************************************************************** 72 | * Zone JS is required by default for Angular itself. 73 | */ 74 | import 'zone.js/dist/zone'; // Included with Angular CLI. 75 | 76 | 77 | 78 | /*************************************************************************************************** 79 | * APPLICATION IMPORTS 80 | */ 81 | -------------------------------------------------------------------------------- /UserFront/src/main/java/com/userfront/controller/AccountController.java: -------------------------------------------------------------------------------- 1 | package com.userfront.controller; 2 | 3 | import java.security.Principal; 4 | import java.util.List; 5 | 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Controller; 8 | import org.springframework.ui.Model; 9 | import org.springframework.web.bind.annotation.ModelAttribute; 10 | import org.springframework.web.bind.annotation.RequestMapping; 11 | import org.springframework.web.bind.annotation.RequestMethod; 12 | 13 | import com.userfront.domain.PrimaryAccount; 14 | import com.userfront.domain.PrimaryTransaction; 15 | import com.userfront.domain.SavingsAccount; 16 | import com.userfront.domain.SavingsTransaction; 17 | import com.userfront.domain.User; 18 | import com.userfront.service.AccountService; 19 | import com.userfront.service.TransactionService; 20 | import com.userfront.service.UserService; 21 | import com.userfront.service.UserServiceImpl.UserSecurityService; 22 | 23 | @Controller 24 | @RequestMapping("/account") 25 | public class AccountController { 26 | 27 | @Autowired 28 | private UserService userService; 29 | 30 | @Autowired 31 | private AccountService accountService; 32 | 33 | @Autowired 34 | private TransactionService transactionService; 35 | 36 | @RequestMapping("/primaryAccount") 37 | public String primaryAccount(Principal principal, Model model) { 38 | List primaryTransactionList = transactionService.findPrimaryTransactionList(principal.getName()); 39 | 40 | User user = userService.findByUsername(principal.getName()); 41 | PrimaryAccount primaryAccount = user.getPrimaryAccount(); 42 | 43 | model.addAttribute("primaryAccount", primaryAccount); 44 | model.addAttribute("primaryTransactionList", primaryTransactionList); 45 | 46 | return "primaryAccount"; 47 | } 48 | 49 | @RequestMapping("/savingsAccount") 50 | public String savingsAccount(Principal principal, Model model) { 51 | List savingsTransactionList = transactionService.findSavingsTransactionList(principal.getName()); 52 | 53 | User user = userService.findByUsername(principal.getName()); 54 | SavingsAccount savingsAccount = user.getSavingsAccount(); 55 | 56 | model.addAttribute("savingsAccount", savingsAccount); 57 | model.addAttribute("savingsTransactionList", savingsTransactionList); 58 | 59 | return "savingsAccount"; 60 | } 61 | 62 | @RequestMapping(value = "/deposit", method = RequestMethod.GET) 63 | public String deposit(Model model) { 64 | model.addAttribute("accountType", ""); 65 | model.addAttribute("amount", ""); 66 | 67 | return "deposit"; 68 | } 69 | 70 | @RequestMapping(value = "/deposit", method = RequestMethod.POST) 71 | public String depositPOST(@ModelAttribute("amount") String amount, @ModelAttribute("accountType") String accountType, Principal principal) { 72 | accountService.deposit(accountType, Double.parseDouble(amount), principal); 73 | 74 | return "redirect:/userFront"; 75 | } 76 | 77 | @RequestMapping(value = "/withdraw", method = RequestMethod.GET) 78 | public String withdraw(Model model) { 79 | model.addAttribute("accountType", ""); 80 | model.addAttribute("amount", ""); 81 | 82 | return "withdraw"; 83 | } 84 | 85 | @RequestMapping(value = "/withdraw", method = RequestMethod.POST) 86 | public String withdrawPOST(@ModelAttribute("amount") String amount, @ModelAttribute("accountType") String accountType, Principal principal) { 87 | accountService.withdraw(accountType, Double.parseDouble(amount), principal); 88 | 89 | return "redirect:/userFront"; 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /UserFront/src/main/java/com/userfront/service/UserServiceImpl/UserServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.userfront.service.UserServiceImpl; 2 | 3 | import java.util.List; 4 | import java.util.Set; 5 | 6 | import org.slf4j.Logger; 7 | import org.slf4j.LoggerFactory; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; 10 | import org.springframework.stereotype.Service; 11 | import org.springframework.transaction.annotation.Transactional; 12 | 13 | import com.userfront.Dao.RoleDao; 14 | import com.userfront.Dao.UserDao; 15 | import com.userfront.domain.User; 16 | import com.userfront.domain.security.UserRole; 17 | import com.userfront.service.AccountService; 18 | import com.userfront.service.UserService; 19 | 20 | @Service 21 | @Transactional 22 | public class UserServiceImpl implements UserService{ 23 | 24 | private static final Logger LOG = LoggerFactory.getLogger(UserService.class); 25 | 26 | @Autowired 27 | private UserDao userDao; 28 | 29 | @Autowired 30 | private RoleDao roleDao; 31 | 32 | @Autowired 33 | private BCryptPasswordEncoder passwordEncoder; 34 | 35 | @Autowired 36 | private AccountService accountService; 37 | 38 | public void save(User user) { 39 | userDao.save(user); 40 | } 41 | 42 | public User findByUsername(String username) { 43 | return userDao.findByUsername(username); 44 | } 45 | 46 | public User findByEmail(String email) { 47 | return userDao.findByEmail(email); 48 | } 49 | 50 | 51 | public User createUser(User user, Set userRoles) { 52 | User localUser = userDao.findByUsername(user.getUsername()); 53 | 54 | if (localUser != null) { 55 | LOG.info("User with username {} already exist. Nothing will be done. ", user.getUsername()); 56 | } else { 57 | String encryptedPassword = passwordEncoder.encode(user.getPassword()); 58 | user.setPassword(encryptedPassword); 59 | 60 | for (UserRole ur : userRoles) { 61 | roleDao.save(ur.getRole()); 62 | } 63 | 64 | user.getUserRoles().addAll(userRoles); 65 | 66 | user.setPrimaryAccount(accountService.createPrimaryAccount()); 67 | user.setSavingsAccount(accountService.createSavingsAccount()); 68 | 69 | localUser = userDao.save(user); 70 | } 71 | 72 | return localUser; 73 | } 74 | 75 | public boolean checkUserExists(String username, String email){ 76 | if (checkUsernameExists(username) || checkEmailExists(username)) { 77 | return true; 78 | } else { 79 | return false; 80 | } 81 | } 82 | 83 | public boolean checkUsernameExists(String username) { 84 | if (null != findByUsername(username)) { 85 | return true; 86 | } 87 | 88 | return false; 89 | } 90 | 91 | public boolean checkEmailExists(String email) { 92 | if (null != findByEmail(email)) { 93 | return true; 94 | } 95 | 96 | return false; 97 | } 98 | 99 | public User saveUser (User user) { 100 | return userDao.save(user); 101 | } 102 | 103 | public List findUserList() { 104 | return userDao.findAll(); 105 | } 106 | 107 | public void enableUser (String username) { 108 | User user = findByUsername(username); 109 | user.setEnabled(true); 110 | userDao.save(user); 111 | } 112 | 113 | public void disableUser (String username) { 114 | User user = findByUsername(username); 115 | user.setEnabled(false); 116 | System.out.println(user.isEnabled()); 117 | userDao.save(user); 118 | System.out.println(username + " is disabled."); 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /UserFront/src/main/resources/static/css/dataTables.bootstrap.min.css: -------------------------------------------------------------------------------- 1 | table.dataTable{clear:both;margin-top:6px !important;margin-bottom:6px !important;max-width:none !important;border-collapse:separate !important}table.dataTable td,table.dataTable th{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}table.dataTable td.dataTables_empty,table.dataTable th.dataTables_empty{text-align:center}table.dataTable.nowrap th,table.dataTable.nowrap td{white-space:nowrap}div.dataTables_wrapper div.dataTables_length label{font-weight:normal;text-align:left;white-space:nowrap}div.dataTables_wrapper div.dataTables_length select{width:75px;display:inline-block}div.dataTables_wrapper div.dataTables_filter{text-align:right}div.dataTables_wrapper div.dataTables_filter label{font-weight:normal;white-space:nowrap;text-align:left}div.dataTables_wrapper div.dataTables_filter input{margin-left:0.5em;display:inline-block;width:auto}div.dataTables_wrapper div.dataTables_info{padding-top:8px;white-space:nowrap}div.dataTables_wrapper div.dataTables_paginate{margin:0;white-space:nowrap;text-align:right}div.dataTables_wrapper div.dataTables_paginate ul.pagination{margin:2px 0;white-space:nowrap}div.dataTables_wrapper div.dataTables_processing{position:absolute;top:50%;left:50%;width:200px;margin-left:-100px;margin-top:-26px;text-align:center;padding:1em 0}table.dataTable thead>tr>th.sorting_asc,table.dataTable thead>tr>th.sorting_desc,table.dataTable thead>tr>th.sorting,table.dataTable thead>tr>td.sorting_asc,table.dataTable thead>tr>td.sorting_desc,table.dataTable thead>tr>td.sorting{padding-right:30px}table.dataTable thead>tr>th:active,table.dataTable thead>tr>td:active{outline:none}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc_disabled{cursor:pointer;position:relative}table.dataTable thead .sorting:after,table.dataTable thead .sorting_asc:after,table.dataTable thead .sorting_desc:after,table.dataTable thead .sorting_asc_disabled:after,table.dataTable thead .sorting_desc_disabled:after{position:absolute;bottom:8px;right:8px;display:block;font-family:'Glyphicons Halflings';opacity:0.5}table.dataTable thead .sorting:after{opacity:0.2;content:"\e150"}table.dataTable thead .sorting_asc:after{content:"\e155"}table.dataTable thead .sorting_desc:after{content:"\e156"}table.dataTable thead .sorting_asc_disabled:after,table.dataTable thead .sorting_desc_disabled:after{color:#eee}div.dataTables_scrollHead table.dataTable{margin-bottom:0 !important}div.dataTables_scrollBody table{border-top:none;margin-top:0 !important;margin-bottom:0 !important}div.dataTables_scrollBody table thead .sorting:after,div.dataTables_scrollBody table thead .sorting_asc:after,div.dataTables_scrollBody table thead .sorting_desc:after{display:none}div.dataTables_scrollBody table tbody tr:first-child th,div.dataTables_scrollBody table tbody tr:first-child td{border-top:none}div.dataTables_scrollFoot table{margin-top:0 !important;border-top:none}@media screen and (max-width: 767px){div.dataTables_wrapper div.dataTables_length,div.dataTables_wrapper div.dataTables_filter,div.dataTables_wrapper div.dataTables_info,div.dataTables_wrapper div.dataTables_paginate{text-align:center}}table.dataTable.table-condensed>thead>tr>th{padding-right:20px}table.dataTable.table-condensed .sorting:after,table.dataTable.table-condensed .sorting_asc:after,table.dataTable.table-condensed .sorting_desc:after{top:6px;right:6px}table.table-bordered.dataTable th,table.table-bordered.dataTable td{border-left-width:0}table.table-bordered.dataTable th:last-child,table.table-bordered.dataTable th:last-child,table.table-bordered.dataTable td:last-child,table.table-bordered.dataTable td:last-child{border-right-width:0}table.table-bordered.dataTable tbody th,table.table-bordered.dataTable tbody td{border-bottom-width:0}div.dataTables_scrollHead table.table-bordered{border-bottom-width:0}div.table-responsive>div.dataTables_wrapper>div.row{margin:0}div.table-responsive>div.dataTables_wrapper>div.row>div[class^="col-"]:first-child{padding-left:0}div.table-responsive>div.dataTables_wrapper>div.row>div[class^="col-"]:last-child{padding-right:0} 2 | -------------------------------------------------------------------------------- /UserFront/src/main/resources/templates/recipient.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
      7 |
      8 |
      9 |

      Recipient Information

      10 |
      11 | 12 | 13 |
      14 | 15 | 17 |
      18 |
      19 | 20 | 22 |
      23 |
      24 | 25 | 27 |
      28 |
      29 | 30 | 32 |
      33 |
      34 | 35 | 37 |
      38 | 39 | 42 | 43 | 44 |
      45 | 46 |
      47 |
      48 |
      49 |
      50 |
      51 |
      52 |

      List of Recipients

      53 |
      54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 |
      Recipient NameRecipient EmailRecipient PhoneRecipient Account NumberDescription
      ...............delete
      76 |
      77 |
      78 |
      79 | 80 | 81 |
      82 | 83 | 84 | -------------------------------------------------------------------------------- /AdminPortal/angular.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json", 3 | "version": 1, 4 | "newProjectRoot": "projects", 5 | "projects": { 6 | "AdminPortal": { 7 | "root": "", 8 | "sourceRoot": "src", 9 | "projectType": "application", 10 | "prefix": "app", 11 | "schematics": {}, 12 | "architect": { 13 | "build": { 14 | "builder": "@angular-devkit/build-angular:browser", 15 | "options": { 16 | "outputPath": "dist/AdminPortal", 17 | "index": "src/index.html", 18 | "main": "src/main.ts", 19 | "polyfills": "src/polyfills.ts", 20 | "tsConfig": "src/tsconfig.app.json", 21 | "assets": [ 22 | "src/favicon.ico", 23 | "src/assets" 24 | ], 25 | "styles": [ 26 | "src/styles.css" 27 | ], 28 | "scripts": [] 29 | }, 30 | "configurations": { 31 | "production": { 32 | "fileReplacements": [ 33 | { 34 | "replace": "src/environments/environment.ts", 35 | "with": "src/environments/environment.prod.ts" 36 | } 37 | ], 38 | "optimization": true, 39 | "outputHashing": "all", 40 | "sourceMap": false, 41 | "extractCss": true, 42 | "namedChunks": false, 43 | "aot": true, 44 | "extractLicenses": true, 45 | "vendorChunk": false, 46 | "buildOptimizer": true 47 | } 48 | } 49 | }, 50 | "serve": { 51 | "builder": "@angular-devkit/build-angular:dev-server", 52 | "options": { 53 | "browserTarget": "AdminPortal:build" 54 | }, 55 | "configurations": { 56 | "production": { 57 | "browserTarget": "AdminPortal:build:production" 58 | } 59 | } 60 | }, 61 | "extract-i18n": { 62 | "builder": "@angular-devkit/build-angular:extract-i18n", 63 | "options": { 64 | "browserTarget": "AdminPortal:build" 65 | } 66 | }, 67 | "test": { 68 | "builder": "@angular-devkit/build-angular:karma", 69 | "options": { 70 | "main": "src/test.ts", 71 | "polyfills": "src/polyfills.ts", 72 | "tsConfig": "src/tsconfig.spec.json", 73 | "karmaConfig": "src/karma.conf.js", 74 | "styles": [ 75 | "src/styles.css" 76 | ], 77 | "scripts": [], 78 | "assets": [ 79 | "src/favicon.ico", 80 | "src/assets" 81 | ] 82 | } 83 | }, 84 | "lint": { 85 | "builder": "@angular-devkit/build-angular:tslint", 86 | "options": { 87 | "tsConfig": [ 88 | "src/tsconfig.app.json", 89 | "src/tsconfig.spec.json" 90 | ], 91 | "exclude": [ 92 | "**/node_modules/**" 93 | ] 94 | } 95 | } 96 | } 97 | }, 98 | "AdminPortal-e2e": { 99 | "root": "e2e/", 100 | "projectType": "application", 101 | "architect": { 102 | "e2e": { 103 | "builder": "@angular-devkit/build-angular:protractor", 104 | "options": { 105 | "protractorConfig": "e2e/protractor.conf.js", 106 | "devServerTarget": "AdminPortal:serve" 107 | }, 108 | "configurations": { 109 | "production": { 110 | "devServerTarget": "AdminPortal:serve:production" 111 | } 112 | } 113 | }, 114 | "lint": { 115 | "builder": "@angular-devkit/build-angular:tslint", 116 | "options": { 117 | "tsConfig": "e2e/tsconfig.e2e.json", 118 | "exclude": [ 119 | "**/node_modules/**" 120 | ] 121 | } 122 | } 123 | } 124 | } 125 | }, 126 | "defaultProject": "AdminPortal" 127 | } -------------------------------------------------------------------------------- /AdminPortal/src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | /* You can add global styles to this file, and also import other style files */ 3 | @import url('http://fonts.googleapis.com/css?family=Raleway:400,200'); 4 | @import url('http://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css'); 5 | 6 | 7 | html { 8 | background: #ffffff; 9 | width: 100%; 10 | width: 100vw; 11 | height: 100%; 12 | height: 100vh; 13 | font-family: 'Raleway', sans-serif; 14 | } 15 | 16 | .clean-font { 17 | color: #8f8f8f; 18 | font-weight: 200; 19 | } 20 | 21 | .navbar.navbar-clean { 22 | background: #fff; 23 | border-radius: 0; 24 | border-bottom: 1px solid #bfbfbf; 25 | color: #8f8f8f; 26 | } 27 | 28 | .navbar.navbar-clean .navbar-brand { 29 | font-weight: 200; 30 | } 31 | 32 | .navbar.navbar-clean a { 33 | color: #8f8f8f; 34 | } 35 | 36 | .navbar.navbar-clean ul > li > a:hover, 37 | .navbar.navbar-clean li.open a { 38 | background: #fafafa; 39 | } 40 | 41 | .navbar.navbar-clean a i { 42 | position: relative; 43 | top: 1px; 44 | margin-left: 6px; 45 | } 46 | 47 | Required for Dropdowns 48 | .dropdown { 49 | position: relative; 50 | } 51 | .dropdown-toggle:focus { 52 | outline: 0; 53 | } 54 | .dropdown-menu { 55 | position: absolute; 56 | top: 100%; 57 | width: 100%; 58 | left: 0; 59 | z-index: 1000; 60 | display: none; 61 | float: left; 62 | min-width: 200px; 63 | padding: 5px 0; 64 | margin: 15px 0 0; 65 | list-style: none; 66 | font-size: 14px; 67 | text-align: left; 68 | background-color: #fafafa; 69 | border: 1px solid #bfbfbf; 70 | border-radius: 2px; 71 | box-shadow: none; 72 | } 73 | .dropdown-menu:before { 74 | content: "\00a0"; 75 | display: block; 76 | height: 10px; 77 | width: 10px; 78 | position: absolute; 79 | top: -6px; 80 | border: 1px solid #8f8f8f; 81 | border-right: 0; 82 | border-bottom: 0; 83 | background-color: #fafafa; 84 | left: 10px; 85 | -webkit-transform: rotate(48deg) skew(5deg); 86 | transform: rotate(48deg) skew(5deg); 87 | } 88 | 89 | li .dropdown-menu:before { 90 | height: 0; 91 | width: 0; 92 | } 93 | .dropdown-menu.pull-right { 94 | right: 0; 95 | left: auto; 96 | } 97 | .dropdown-menu .divider { 98 | height: 1px; 99 | margin: 9px 0; 100 | overflow: hidden; 101 | background-color: #bfbfbf; 102 | } 103 | .dropdown-menu > li > a { 104 | display: block; 105 | padding: 3px 20px; 106 | clear: both; 107 | font-weight: normal; 108 | text-decoration: none; 109 | line-height: 2; 110 | color: #8f8f8f; 111 | white-space: nowrap; 112 | } 113 | .dropdown-menu > li > a:hover, 114 | .dropdown-menu > li > a:focus { 115 | text-decoration: none; 116 | color: #808080; 117 | background-color: #f3f3f3; 118 | } 119 | .open > .dropdown-menu { 120 | display: block; 121 | } 122 | .open > a { 123 | outline: 0; 124 | } 125 | .dropdown-menu-right { 126 | left: auto; 127 | right: 0; 128 | } 129 | .dropdown-menu-left { 130 | left: 0; 131 | right: auto; 132 | } 133 | .dropdown-header { 134 | display: block; 135 | padding: 3px 20px; 136 | font-size: 12px; 137 | line-height: 1.42857143; 138 | color: #777777; 139 | white-space: nowrap; 140 | } 141 | .dropdown-backdrop { 142 | position: fixed; 143 | left: 0; 144 | right: 0; 145 | bottom: 0; 146 | top: 0; 147 | z-index: 990; 148 | } 149 | .pull-right > .dropdown-menu { 150 | right: 0; 151 | left: auto; 152 | } 153 | .dropup .caret, 154 | .navbar-fixed-bottom .dropdown .caret { 155 | border-top: 0; 156 | border-bottom: 4px solid; 157 | content: ""; 158 | } 159 | .dropup .dropdown-menu, 160 | .navbar-fixed-bottom .dropdown .dropdown-menu { 161 | top: auto; 162 | bottom: 100%; 163 | margin-bottom: 2px; 164 | } 165 | 166 | .form-signin { 167 | max-width: 380px; 168 | padding: 15px 35px 45px; 169 | margin: 0 auto; 170 | background-color: #fff; 171 | border: 1px solid rgba(0,0,0,0.1); 172 | } 173 | 174 | @media (min-width: 768px) { 175 | .navbar-right .dropdown-menu { 176 | left: auto; 177 | right: 0; 178 | } 179 | .navbar-right .dropdown-menu-left { 180 | left: 0; 181 | right: auto; 182 | } 183 | } 184 | .button-group, 185 | .button-group-vertical { 186 | position: relative; 187 | display: inline-block; 188 | vertical-align: middle; 189 | } 190 | .button-group > .button, 191 | .button-group-vertical > .button { 192 | position: relative; 193 | float: left; 194 | } 195 | -------------------------------------------------------------------------------- /UserFront/src/main/resources/templates/userFront.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
      7 |
      8 |
      9 |
      10 | 11 |
      12 | 13 |
      14 |
      15 |
      16 |
      17 |
      18 |
      19 | 20 |

      Primary Balance:

      21 |
      22 |
      23 |

      ...

      24 |
      25 |
      26 |
      27 | 28 | 33 | 34 |
      35 |
      36 |
      37 |
      38 |
      39 |

      Savings Balance:

      40 |
      41 |
      42 |

      ...

      43 |
      44 |
      45 |
      46 | 47 | 52 | 53 |
      54 |
      55 | 56 |
      57 |
      58 |
      59 |
      60 |
      61 | 62 |
      63 |
      64 |
      Deposit
      65 |
      66 |
      67 |
      68 | 69 | 74 | 75 |
      76 |
      77 |
      78 |
      79 |
      80 |
      81 |
      82 | 83 |
      84 |
      85 |
      Withdraw
      86 |
      87 |
      88 |
      89 | 90 | 95 | 96 |
      97 |
      98 |
      99 | 100 | 101 | 102 |
      103 | 104 | 105 |
      106 | 107 | 108 | -------------------------------------------------------------------------------- /UserFront/src/main/java/com/userfront/service/UserServiceImpl/AccountServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.userfront.service.UserServiceImpl; 2 | 3 | import java.math.BigDecimal; 4 | import java.security.Principal; 5 | import java.util.Date; 6 | 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Service; 9 | 10 | import com.userfront.Dao.PrimaryAccountDao; 11 | import com.userfront.Dao.SavingsAccountDao; 12 | import com.userfront.domain.PrimaryAccount; 13 | import com.userfront.domain.PrimaryTransaction; 14 | import com.userfront.domain.SavingsAccount; 15 | import com.userfront.domain.SavingsTransaction; 16 | import com.userfront.domain.User; 17 | import com.userfront.service.AccountService; 18 | import com.userfront.service.TransactionService; 19 | import com.userfront.service.UserService; 20 | 21 | @Service 22 | public class AccountServiceImpl implements AccountService { 23 | 24 | private static int nextAccountNumber = 11223145; 25 | 26 | @Autowired 27 | private PrimaryAccountDao primaryAccountDao; 28 | 29 | @Autowired 30 | private SavingsAccountDao savingsAccountDao; 31 | 32 | @Autowired 33 | private UserService userService; 34 | 35 | @Autowired 36 | private TransactionService transactionService; 37 | 38 | public PrimaryAccount createPrimaryAccount() { 39 | PrimaryAccount primaryAccount = new PrimaryAccount(); 40 | primaryAccount.setAccountBalance(new BigDecimal(0.0)); 41 | primaryAccount.setAccountNumber(accountGen()); 42 | 43 | primaryAccountDao.save(primaryAccount); 44 | 45 | return primaryAccountDao.findByAccountNumber(primaryAccount.getAccountNumber()); 46 | } 47 | 48 | public SavingsAccount createSavingsAccount() { 49 | SavingsAccount savingsAccount = new SavingsAccount(); 50 | savingsAccount.setAccountBalance(new BigDecimal(0.0)); 51 | savingsAccount.setAccountNumber(accountGen()); 52 | 53 | savingsAccountDao.save(savingsAccount); 54 | 55 | return savingsAccountDao.findByAccountNumber(savingsAccount.getAccountNumber()); 56 | } 57 | 58 | public void deposit(String accountType, double amount, Principal principal) { 59 | User user = userService.findByUsername(principal.getName()); 60 | 61 | if (accountType.equalsIgnoreCase("Primary")) { 62 | PrimaryAccount primaryAccount = user.getPrimaryAccount(); 63 | primaryAccount.setAccountBalance(primaryAccount.getAccountBalance().add(new BigDecimal(amount))); 64 | primaryAccountDao.save(primaryAccount); 65 | 66 | Date date = new Date(); 67 | 68 | PrimaryTransaction primaryTransaction = new PrimaryTransaction(date, "Deposit to Primary Account", "Account", "Finished", amount, primaryAccount.getAccountBalance(), primaryAccount); 69 | transactionService.savePrimaryDepositTransaction(primaryTransaction); 70 | 71 | } else if (accountType.equalsIgnoreCase("Savings")) { 72 | SavingsAccount savingsAccount = user.getSavingsAccount(); 73 | savingsAccount.setAccountBalance(savingsAccount.getAccountBalance().add(new BigDecimal(amount))); 74 | savingsAccountDao.save(savingsAccount); 75 | 76 | Date date = new Date(); 77 | SavingsTransaction savingsTransaction = new SavingsTransaction(date, "Deposit to savings Account", "Account", "Finished", amount, savingsAccount.getAccountBalance(), savingsAccount); 78 | transactionService.saveSavingsDepositTransaction(savingsTransaction); 79 | } 80 | } 81 | 82 | public void withdraw(String accountType, double amount, Principal principal) { 83 | User user = userService.findByUsername(principal.getName()); 84 | 85 | if (accountType.equalsIgnoreCase("Primary")) { 86 | PrimaryAccount primaryAccount = user.getPrimaryAccount(); 87 | primaryAccount.setAccountBalance(primaryAccount.getAccountBalance().subtract(new BigDecimal(amount))); 88 | primaryAccountDao.save(primaryAccount); 89 | 90 | Date date = new Date(); 91 | 92 | PrimaryTransaction primaryTransaction = new PrimaryTransaction(date, "Withdraw from Primary Account", "Account", "Finished", amount, primaryAccount.getAccountBalance(), primaryAccount); 93 | transactionService.savePrimaryWithdrawTransaction(primaryTransaction); 94 | } else if (accountType.equalsIgnoreCase("Savings")) { 95 | SavingsAccount savingsAccount = user.getSavingsAccount(); 96 | savingsAccount.setAccountBalance(savingsAccount.getAccountBalance().subtract(new BigDecimal(amount))); 97 | savingsAccountDao.save(savingsAccount); 98 | 99 | Date date = new Date(); 100 | SavingsTransaction savingsTransaction = new SavingsTransaction(date, "Withdraw from savings Account", "Account", "Finished", amount, savingsAccount.getAccountBalance(), savingsAccount); 101 | transactionService.saveSavingsWithdrawTransaction(savingsTransaction); 102 | } 103 | } 104 | 105 | 106 | private int accountGen() { 107 | return ++nextAccountNumber; 108 | } 109 | 110 | } 111 | -------------------------------------------------------------------------------- /UserFront/src/main/java/com/userfront/controller/TransferController.java: -------------------------------------------------------------------------------- 1 | package com.userfront.controller; 2 | 3 | import java.security.Principal; 4 | import java.util.List; 5 | 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Controller; 8 | import org.springframework.transaction.annotation.Transactional; 9 | import org.springframework.ui.Model; 10 | import org.springframework.web.bind.annotation.ModelAttribute; 11 | import org.springframework.web.bind.annotation.RequestMapping; 12 | import org.springframework.web.bind.annotation.RequestMethod; 13 | import org.springframework.web.bind.annotation.RequestParam; 14 | 15 | import com.userfront.domain.PrimaryAccount; 16 | import com.userfront.domain.Recipient; 17 | import com.userfront.domain.SavingsAccount; 18 | import com.userfront.domain.User; 19 | import com.userfront.service.TransactionService; 20 | import com.userfront.service.UserService; 21 | 22 | @Controller 23 | @RequestMapping("/transfer") 24 | public class TransferController { 25 | 26 | @Autowired 27 | private TransactionService transactionService; 28 | 29 | @Autowired 30 | private UserService userService; 31 | 32 | @RequestMapping(value = "/betweenAccounts", method = RequestMethod.GET) 33 | public String betweenAccounts(Model model) { 34 | model.addAttribute("transferFrom", ""); 35 | model.addAttribute("transferTo", ""); 36 | model.addAttribute("amount", ""); 37 | 38 | return "betweenAccounts"; 39 | } 40 | 41 | @RequestMapping(value = "/betweenAccounts", method = RequestMethod.POST) 42 | public String betweenAccountsPost( 43 | @ModelAttribute("transferFrom") String transferFrom, 44 | @ModelAttribute("transferTo") String transferTo, 45 | @ModelAttribute("amount") String amount, 46 | Principal principal 47 | ) throws Exception { 48 | User user = userService.findByUsername(principal.getName()); 49 | PrimaryAccount primaryAccount = user.getPrimaryAccount(); 50 | SavingsAccount savingsAccount = user.getSavingsAccount(); 51 | transactionService.betweenAccountsTransfer(transferFrom, transferTo, amount, primaryAccount, savingsAccount); 52 | 53 | return "redirect:/userFront"; 54 | } 55 | 56 | @RequestMapping(value = "/recipient", method = RequestMethod.GET) 57 | public String recipient(Model model, Principal principal) { 58 | List recipientList = transactionService.findRecipientList(principal); 59 | 60 | Recipient recipient = new Recipient(); 61 | 62 | model.addAttribute("recipientList", recipientList); 63 | model.addAttribute("recipient", recipient); 64 | 65 | return "recipient"; 66 | } 67 | 68 | @RequestMapping(value = "/recipient/save", method = RequestMethod.POST) 69 | public String recipientPost(@ModelAttribute("recipient") Recipient recipient, Principal principal) { 70 | 71 | User user = userService.findByUsername(principal.getName()); 72 | recipient.setUser(user); 73 | transactionService.saveRecipient(recipient); 74 | 75 | return "redirect:/transfer/recipient"; 76 | } 77 | 78 | @RequestMapping(value = "/recipient/edit", method = RequestMethod.GET) 79 | public String recipientEdit(@RequestParam(value = "recipientName") String recipientName, Model model, Principal principal){ 80 | 81 | Recipient recipient = transactionService.findRecipientByName(recipientName); 82 | List recipientList = transactionService.findRecipientList(principal); 83 | 84 | model.addAttribute("recipientList", recipientList); 85 | model.addAttribute("recipient", recipient); 86 | 87 | return "recipient"; 88 | } 89 | 90 | @RequestMapping(value = "/recipient/delete", method = RequestMethod.GET) 91 | @Transactional 92 | public String recipientDelete(@RequestParam(value = "recipientName") String recipientName, Model model, Principal principal){ 93 | 94 | transactionService.deleteRecipientByName(recipientName); 95 | 96 | List recipientList = transactionService.findRecipientList(principal); 97 | 98 | Recipient recipient = new Recipient(); 99 | model.addAttribute("recipient", recipient); 100 | model.addAttribute("recipientList", recipientList); 101 | 102 | 103 | return "recipient"; 104 | } 105 | 106 | @RequestMapping(value = "/toSomeoneElse",method = RequestMethod.GET) 107 | public String toSomeoneElse(Model model, Principal principal) { 108 | List recipientList = transactionService.findRecipientList(principal); 109 | 110 | model.addAttribute("recipientList", recipientList); 111 | model.addAttribute("accountType", ""); 112 | 113 | return "toSomeoneElse"; 114 | } 115 | 116 | @RequestMapping(value = "/toSomeoneElse",method = RequestMethod.POST) 117 | public String toSomeoneElsePost(@ModelAttribute("recipientName") String recipientName, @ModelAttribute("accountType") String accountType, @ModelAttribute("amount") String amount, Principal principal) { 118 | User user = userService.findByUsername(principal.getName()); 119 | Recipient recipient = transactionService.findRecipientByName(recipientName); 120 | transactionService.toSomeoneElseTransfer(recipient, accountType, amount, user.getPrimaryAccount(), user.getSavingsAccount()); 121 | 122 | return "redirect:/userFront"; 123 | } 124 | } 125 | -------------------------------------------------------------------------------- /UserFront/mvnw.cmd: -------------------------------------------------------------------------------- 1 | @REM ---------------------------------------------------------------------------- 2 | @REM Licensed to the Apache Software Foundation (ASF) under one 3 | @REM or more contributor license agreements. See the NOTICE file 4 | @REM distributed with this work for additional information 5 | @REM regarding copyright ownership. The ASF licenses this file 6 | @REM to you under the Apache License, Version 2.0 (the 7 | @REM "License"); you may not use this file except in compliance 8 | @REM with the License. You may obtain a copy of the License at 9 | @REM 10 | @REM http://www.apache.org/licenses/LICENSE-2.0 11 | @REM 12 | @REM Unless required by applicable law or agreed to in writing, 13 | @REM software distributed under the License is distributed on an 14 | @REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | @REM KIND, either express or implied. See the License for the 16 | @REM specific language governing permissions and limitations 17 | @REM under the License. 18 | @REM ---------------------------------------------------------------------------- 19 | 20 | @REM ---------------------------------------------------------------------------- 21 | @REM Maven2 Start Up Batch script 22 | @REM 23 | @REM Required ENV vars: 24 | @REM JAVA_HOME - location of a JDK home dir 25 | @REM 26 | @REM Optional ENV vars 27 | @REM M2_HOME - location of maven2's installed home dir 28 | @REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands 29 | @REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending 30 | @REM MAVEN_OPTS - parameters passed to the Java VM when running Maven 31 | @REM e.g. to debug Maven itself, use 32 | @REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 33 | @REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files 34 | @REM ---------------------------------------------------------------------------- 35 | 36 | @REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' 37 | @echo off 38 | @REM enable echoing my setting MAVEN_BATCH_ECHO to 'on' 39 | @if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% 40 | 41 | @REM set %HOME% to equivalent of $HOME 42 | if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") 43 | 44 | @REM Execute a user defined script before this one 45 | if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre 46 | @REM check for pre script, once with legacy .bat ending and once with .cmd ending 47 | if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" 48 | if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" 49 | :skipRcPre 50 | 51 | @setlocal 52 | 53 | set ERROR_CODE=0 54 | 55 | @REM To isolate internal variables from possible post scripts, we use another setlocal 56 | @setlocal 57 | 58 | @REM ==== START VALIDATION ==== 59 | if not "%JAVA_HOME%" == "" goto OkJHome 60 | 61 | echo. 62 | echo Error: JAVA_HOME not found in your environment. >&2 63 | echo Please set the JAVA_HOME variable in your environment to match the >&2 64 | echo location of your Java installation. >&2 65 | echo. 66 | goto error 67 | 68 | :OkJHome 69 | if exist "%JAVA_HOME%\bin\java.exe" goto init 70 | 71 | echo. 72 | echo Error: JAVA_HOME is set to an invalid directory. >&2 73 | echo JAVA_HOME = "%JAVA_HOME%" >&2 74 | echo Please set the JAVA_HOME variable in your environment to match the >&2 75 | echo location of your Java installation. >&2 76 | echo. 77 | goto error 78 | 79 | @REM ==== END VALIDATION ==== 80 | 81 | :init 82 | 83 | @REM Find the project base dir, i.e. the directory that contains the folder ".mvn". 84 | @REM Fallback to current working directory if not found. 85 | 86 | set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% 87 | IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir 88 | 89 | set EXEC_DIR=%CD% 90 | set WDIR=%EXEC_DIR% 91 | :findBaseDir 92 | IF EXIST "%WDIR%"\.mvn goto baseDirFound 93 | cd .. 94 | IF "%WDIR%"=="%CD%" goto baseDirNotFound 95 | set WDIR=%CD% 96 | goto findBaseDir 97 | 98 | :baseDirFound 99 | set MAVEN_PROJECTBASEDIR=%WDIR% 100 | cd "%EXEC_DIR%" 101 | goto endDetectBaseDir 102 | 103 | :baseDirNotFound 104 | set MAVEN_PROJECTBASEDIR=%EXEC_DIR% 105 | cd "%EXEC_DIR%" 106 | 107 | :endDetectBaseDir 108 | 109 | IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig 110 | 111 | @setlocal EnableExtensions EnableDelayedExpansion 112 | for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a 113 | @endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% 114 | 115 | :endReadAdditionalConfig 116 | 117 | SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" 118 | 119 | set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" 120 | set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain 121 | 122 | %MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* 123 | if ERRORLEVEL 1 goto error 124 | goto end 125 | 126 | :error 127 | set ERROR_CODE=1 128 | 129 | :end 130 | @endlocal & set ERROR_CODE=%ERROR_CODE% 131 | 132 | if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost 133 | @REM check for post script, once with legacy .bat ending and once with .cmd ending 134 | if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" 135 | if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" 136 | :skipRcPost 137 | 138 | @REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' 139 | if "%MAVEN_BATCH_PAUSE%" == "on" pause 140 | 141 | if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% 142 | 143 | exit /B %ERROR_CODE% 144 | -------------------------------------------------------------------------------- /UserFront/src/main/resources/static/js/jquery.easing.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ 3 | * 4 | * Uses the built in easing capabilities added In jQuery 1.1 5 | * to offer multiple easing options 6 | * 7 | * TERMS OF USE - EASING EQUATIONS 8 | * 9 | * Open source under the BSD License. 10 | * 11 | * Copyright © 2001 Robert Penner 12 | * All rights reserved. 13 | * 14 | * TERMS OF USE - jQuery Easing 15 | * 16 | * Open source under the BSD License. 17 | * 18 | * Copyright © 2008 George McGinley Smith 19 | * All rights reserved. 20 | * 21 | * Redistribution and use in source and binary forms, with or without modification, 22 | * are permitted provided that the following conditions are met: 23 | * 24 | * Redistributions of source code must retain the above copyright notice, this list of 25 | * conditions and the following disclaimer. 26 | * Redistributions in binary form must reproduce the above copyright notice, this list 27 | * of conditions and the following disclaimer in the documentation and/or other materials 28 | * provided with the distribution. 29 | * 30 | * Neither the name of the author nor the names of contributors may be used to endorse 31 | * or promote products derived from this software without specific prior written permission. 32 | * 33 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 34 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 35 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 36 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 37 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 38 | * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 39 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 40 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 41 | * OF THE POSSIBILITY OF SUCH DAMAGE. 42 | * 43 | */ 44 | jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,f,a,h,g){return jQuery.easing[jQuery.easing.def](e,f,a,h,g)},easeInQuad:function(e,f,a,h,g){return h*(f/=g)*f+a},easeOutQuad:function(e,f,a,h,g){return -h*(f/=g)*(f-2)+a},easeInOutQuad:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f+a}return -h/2*((--f)*(f-2)-1)+a},easeInCubic:function(e,f,a,h,g){return h*(f/=g)*f*f+a},easeOutCubic:function(e,f,a,h,g){return h*((f=f/g-1)*f*f+1)+a},easeInOutCubic:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f+a}return h/2*((f-=2)*f*f+2)+a},easeInQuart:function(e,f,a,h,g){return h*(f/=g)*f*f*f+a},easeOutQuart:function(e,f,a,h,g){return -h*((f=f/g-1)*f*f*f-1)+a},easeInOutQuart:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f+a}return -h/2*((f-=2)*f*f*f-2)+a},easeInQuint:function(e,f,a,h,g){return h*(f/=g)*f*f*f*f+a},easeOutQuint:function(e,f,a,h,g){return h*((f=f/g-1)*f*f*f*f+1)+a},easeInOutQuint:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f*f+a}return h/2*((f-=2)*f*f*f*f+2)+a},easeInSine:function(e,f,a,h,g){return -h*Math.cos(f/g*(Math.PI/2))+h+a},easeOutSine:function(e,f,a,h,g){return h*Math.sin(f/g*(Math.PI/2))+a},easeInOutSine:function(e,f,a,h,g){return -h/2*(Math.cos(Math.PI*f/g)-1)+a},easeInExpo:function(e,f,a,h,g){return(f==0)?a:h*Math.pow(2,10*(f/g-1))+a},easeOutExpo:function(e,f,a,h,g){return(f==g)?a+h:h*(-Math.pow(2,-10*f/g)+1)+a},easeInOutExpo:function(e,f,a,h,g){if(f==0){return a}if(f==g){return a+h}if((f/=g/2)<1){return h/2*Math.pow(2,10*(f-1))+a}return h/2*(-Math.pow(2,-10*--f)+2)+a},easeInCirc:function(e,f,a,h,g){return -h*(Math.sqrt(1-(f/=g)*f)-1)+a},easeOutCirc:function(e,f,a,h,g){return h*Math.sqrt(1-(f=f/g-1)*f)+a},easeInOutCirc:function(e,f,a,h,g){if((f/=g/2)<1){return -h/2*(Math.sqrt(1-f*f)-1)+a}return h/2*(Math.sqrt(1-(f-=2)*f)+1)+a},easeInElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g 2 | 3 | 4 | 5 | 6 |
      7 |
      8 |
      9 |

      My Profile

      10 |
      11 |
      12 | 13 | 14 |
      15 | 16 |
      17 |
      18 | 19 | 22 |
      23 |
      24 |
      25 | 26 |
      27 | 28 |
      29 |
      30 | 31 | 34 |
      35 |
      36 |
      37 | 38 |
      39 | 40 |
      41 |
      42 | 43 | 45 |
      46 |
      47 |
      48 | 49 |
      50 | Email already exists 52 |
      53 |
      54 | 56 | 58 |
      59 |
      60 |
      61 | 62 |
      63 | Username already exists 65 |
      66 |
      67 | 68 | 71 |
      72 |
      73 |
      74 | 75 |
      76 | 78 |
      79 | 80 |
      81 |
      82 |
      83 |
      84 |
      85 |

      Your Account Information

      86 |
      87 |
      88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 |
      Primary Account NumberSavings Account Number
      ......
      99 |
      100 |
      101 |
      102 |
      103 | 104 | 105 |
      106 | 107 | 108 | --------------------------------------------------------------------------------