<file_sep>package com.reportbuilder.repositories;

import com.reportbuilder.domains.Rule;
import org.springframework.data.jpa.repository.JpaRepository;

public interface RuleRepository extends JpaRepository<Rule, Integer> {
}
<file_sep>var gulp = require('gulp');

gulp.task('copy', function () {
    gulp.src(['./node_modules/angular/angular.min.js',
        './node_modules/angular-route/angular-route.min.js',
        './node_modules/angular-material/angular-material.min.js',
        './node_modules/angular-aria/angular-aria.min.js',
        './node_modules/angular-animate/angular-animate.min.js',
        './node_modules/lodash/lodash.min.js'])
        .pipe(gulp.dest('./src/main/resources/static/vendor/js'));

    gulp.src(['./node_modules/angular-material/angular-material.min.css'])
        .pipe(gulp.dest('./src/main/resources/static/vendor/css'));

    // gulp.src([//'./node_modules/ux-navigation/dist/fonts/**/*',
    //     './node_modules/uxicon/fonts/**/*'])
    //     .pipe(gulp.dest('./src/main/resources/static/vendor/css/fonts'));
    //
    // gulp.src(['./styleguide/images/**/*',])
    //     .pipe(gulp.dest('./src/main/resources/static/vendor/images'));
});

gulp.task('default', ['copy']);<file_sep>var app = angular.module('ReportBuilder', ['ngRoute', 'ngMaterial']);

app.config(function($routeProvider, $httpProvider) {
    $httpProvider.defaults.withCredentials = true;
    $routeProvider
        .when('/reportBuilder', {
           controller: 'reportBuilderCtrl as reportBuilder',
           templateUrl: 'reportBuilder.html'
        })
        .when('/reportViewer', {
            controller: 'reportViewerCtrl as reportViewer',
            templateUrl: 'reportViewer.html'
        })
        .otherwise({
           redirectTo: '/reportBuilder'
        })
});<file_sep>(function() {
    'use strict';

    app.controller('reportViewerCtrl', reportViewerCtrl);

    function reportViewerCtrl(ReportService){
        var reportViewer = this;
        reportViewer.report = ReportService.getReport()
    }
})();<file_sep>(function() {
    'use strict';

    app.controller('reportBuilderCtrl', reportBuilderCtrl);
    
    function reportBuilderCtrl($http, ReportService){
        var reportBuilder = this;
        reportBuilder.rules = []
        reportBuilder.currentItem = {}
        reportBuilder.currentItem.rule = {}
        reportBuilder.currentRule = 0
        reportBuilder.companyName = ""
        reportBuilder.reportItems = []
        reportBuilder.myDate = new Date();
        reportBuilder.isOpen = false;
        reportBuilder.showReport = false;
        reportBuilder.report = {companyName: null, date: null, introduction: null, reportItems: [], closing: null};

        $http.get('/getAllRules')
            .then(function(data) {
                    reportBuilder.rules = data.data

            },function(err) {
                console.error("Error ", err);
            });

        reportBuilder.addItem = function(){

            var rule = _.findIndex(reportBuilder.rules, ['id', parseInt(reportBuilder.currentItem.currentRule)]);
            reportBuilder.currentItem.rule = reportBuilder.rules[rule]
            reportBuilder.reportItems.push(reportBuilder.currentItem)
            reportBuilder.currentItem = {}
        }

        reportBuilder.generateReport = function() {
            reportBuilder.showReport = !reportBuilder.showReport;
            reportBuilder.report.companyName = reportBuilder.companyName;
            reportBuilder.report.date = reportBuilder.myDate;
            reportBuilder.report.introduction = reportBuilder.introduction;
            reportBuilder.report.closing = reportBuilder.closing;
            reportBuilder.report.reportItems = reportBuilder.reportItems;
            ReportService.setReport(reportBuilder.report)
            // reportBuilder.report = ReportService.getReport()

            location.assign('/#!/reportViewer')

        }
    }
})();<file_sep>reportbuilder.datasource.url=jdbc:mysql://localhost:3306/reportbuilder?useSSL=false
reportbuilder.datasource.username=root
reportbuilder.datasource.password=
reportbuilder.datasource.driverClassName=com.mysql.jdbc.Driver

spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect
<file_sep>app.factory("ReportService", function() {
    var report = {};

    return {
        getReport: function() {
            return report;
        },
        setReport: function(providedReport) {
            report = providedReport;
        }
    };
});