Commit 40bddcd6 by aliarshad9691

Initial commit

parents
node_modules/
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
</state>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/VQode_Management.iml" filepath="$PROJECT_DIR$/.idea/VQode_Management.iml" />
</modules>
</component>
</project>
\ No newline at end of file
# This file contains information which helps Meteor properly upgrade your
# app when you run 'meteor update'. You should check it into version control
# with your project.
notices-for-0.9.0
notices-for-0.9.1
0.9.4-platform-file
notices-for-facebook-graph-api-2
1.2.0-standard-minifiers-package
1.2.0-meteor-platform-split
1.2.0-cordova-changes
1.2.0-breaking-changes
1.3.0-split-minifiers-package
1.4.0-remove-old-dev-bundle-link
1.4.1-add-shell-server-package
1.4.3-split-account-service-packages
1.5-add-dynamic-import-package
1.7-split-underscore-from-meteor-base
# This file contains a token that is unique to your project.
# Check it into your repository along with the rest of this directory.
# It can be used for purposes such as:
# - ensuring you don't accidentally deploy one app on top of another
# - providing package authors with aggregated statistics
mpqpxgdhktcn.kv50hc5rhcl
# Meteor packages used by this project, one per line.
# Check this file (and the other files in this directory) into your repository.
#
# 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand.
meteor-base@1.4.0 # Packages every Meteor app needs to have
mobile-experience@1.0.5 # Packages for a great mobile UX
mongo@1.5.0 # The database Meteor supports right now
reactive-var@1.0.11 # Reactive variable for tracker
tracker@1.2.0 # Meteor's client-side reactive programming library
standard-minifier-css@1.4.1 # CSS minifier run for production mode
standard-minifier-js@2.3.4 # JS minifier run for production mode
es5-shim@4.8.0 # ECMAScript 5 compatibility for older browsers
ecmascript@0.11.1 # Enable ECMAScript2015+ syntax in app code
shell-server@0.3.1 # Server-side component of the `meteor shell` command
autopublish@1.0.7 # Publish all data to the clients (for prototyping)
insecure@1.0.7 # Allow all DB writes from clients (for prototyping)
angular-compilers
server
browser
METEOR@1.7.0.4
allow-deny@1.1.0
angular-compilers@0.3.2
angular-html-compiler@0.3.2
angular-scss-compiler@0.3.2
angular-typescript-compiler@0.3.2
autopublish@1.0.7
autoupdate@1.4.1
babel-compiler@7.1.1
babel-runtime@1.2.4
base64@1.0.11
binary-heap@1.0.10
boilerplate-generator@1.5.0
callback-hook@1.1.0
check@1.3.1
ddp@1.4.0
ddp-client@2.3.3
ddp-common@1.4.0
ddp-server@2.2.0
diff-sequence@1.1.0
dynamic-import@0.4.1
ecmascript@0.11.1
ecmascript-runtime@0.7.0
ecmascript-runtime-client@0.7.2
ecmascript-runtime-server@0.7.1
ejson@1.1.0
es5-shim@4.8.0
geojson-utils@1.0.10
hot-code-push@1.0.4
http@1.4.1
id-map@1.1.0
insecure@1.0.7
launch-screen@1.1.1
livedata@1.0.18
logging@1.1.20
meteor@1.9.2
meteor-base@1.4.0
minifier-css@1.3.1
minifier-js@2.3.5
minimongo@1.4.4
mobile-experience@1.0.5
mobile-status-bar@1.0.14
modern-browsers@0.1.2
modules@0.12.2
modules-runtime@0.10.2
mongo@1.5.1
mongo-dev-server@1.1.0
mongo-id@1.0.7
npm-mongo@3.0.11
ordered-dict@1.1.0
promise@0.11.1
random@1.1.0
reactive-var@1.0.11
reload@1.2.0
retry@1.1.0
routepolicy@1.0.13
shell-server@0.3.1
socket-stream-client@0.2.2
standard-minifier-css@1.4.1
standard-minifier-js@2.3.4
tracker@1.2.0
underscore@1.0.10
url@1.2.0
webapp@1.6.2
webapp-hashing@1.0.9
import {Component, OnInit, ViewEncapsulation} from '@angular/core';
@Component({
selector: 'app',
templateUrl: 'app.html',
styleUrls: ['./app.scss'],
encapsulation: ViewEncapsulation.None
})
export class AppComponent implements OnInit {
ngOnInit() {
}
}
<mat-toolbar>
<span>BoilerPlate</span>
</mat-toolbar>
<router-outlet></router-outlet>
\ No newline at end of file
import {NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {AppComponent} from './app.component';
import {BrowserAnimationsModule} from "@angular/platform-browser/animations";
import {RoutesModule} from "./routes/routes.module";
import {SharedModule} from "./shared/shared.module";
@NgModule({
imports: [
BrowserModule,
BrowserAnimationsModule,
RoutesModule,
SharedModule
],
declarations: [
AppComponent
],
bootstrap: [
AppComponent
],
providers: []
})
export class AppModule {
}
.no-padding {
padding: 0px !important;
}
h1 {
font-size: 26px;
font-weight: bold;
}
h2 {
font-size: 18px;
font-weight: bold;
}
input[type='text'], input[type='password'] {
width: 100%;
border: 1px solid #ccc;
border-radius: 0px 5px 5px 0px;
padding: 10px;
font-size: 16px;
}
input[type='number'] {
font-size: 16px;
padding: 10px;
width: 100%;
}
textarea {
width: 100%;
font-size: 16px;
}
.btn-block {
width: 100%;
height: 100%;
}
.ui-dropdown-label {
font-size: 16px !important;
padding: 10px;
}
.ui-dropdown {
width: 100% !important;
}
.ui-inputgroup-addon {
display: flex;
align-items: center;
justify-content: center;
}
.ui-inputgroup-addon {
font-size: 20px;
}
.top50 {
margin-top: 50px;
}
.align-right {
float: right
}
.align-left {
float: left
}
.ui-button {
font-size: 16px;
}
.align-center {
text-align: center;
}
.ui-calendar, .ui-autocomplete {
width: 100%;
}
import {Injectable} from '@angular/core';
import {ActivatedRoute, ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot} from '@angular/router';
@Injectable()
export class AlreadyLoginGuard implements CanActivate {
constructor(private router: Router,
public activatedRoute: ActivatedRoute) {
}
canActivate(next: ActivatedRouteSnapshot,
state: RouterStateSnapshot) {
if(Meteor.user()){
this.router.navigate(['/']);
} else {
return true;
}
}
}
import {Injectable} from '@angular/core';
import {ActivatedRoute, ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot} from '@angular/router';
@Injectable()
export class AppGuard implements CanActivate {
constructor(private router: Router,
public activatedRoute: ActivatedRoute) {
// nothing in constructor
}
canActivate(next: ActivatedRouteSnapshot,
state: RouterStateSnapshot) {
if(Meteor.user()){
return true;
} else {
this.router.navigate(['/auth/login']);
}
}
}
import {CanDeactivate} from '@angular/router';
import {Observable} from 'rxjs/Observable';
export interface ComponentCanDeactivate {
canDeactivate: () => boolean | Observable<boolean>;
}
export class PendingChangesGuard implements CanDeactivate<ComponentCanDeactivate> {
canDeactivate(component): boolean | Observable<boolean> {
// if there are no pending changes, just allow deactivation; else confirm first
return component.canDeactivate() ?
true :
// NOTE: this warning message will only be shown when navigating elsewhere within your angular app;
// when navigating away from your angular app, the browser will show a generic warning message
// see http://stackoverflow.com/a/42207299/7307355
confirm('WARNING: You have unsaved changes. Press Cancel to go back and save these changes, or OK to lose these changes.');
}
}
import {Injectable} from '@angular/core';
import {ActivatedRoute, ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot} from '@angular/router';
@Injectable()
export class RoleGuard implements CanActivate {
constructor(private router: Router,
public activatedRoute: ActivatedRoute) {
// nothing in constructor
}
canActivate(next: ActivatedRouteSnapshot,
state: RouterStateSnapshot) {
if(Meteor.user()){
const roles = next.data["roles"];
if(roles.indexOf(Meteor.user().profile.role) > -1 ){
return true;
} else {
this.router.navigate(['/scores']);
}
} else {
this.router.navigate(['/auth/login']);
}
}
}
import {NgModule} from '@angular/core';
import {PreloadAllModules, RouterModule, Routes} from '@angular/router';
import {AppGuard} from './app.guard';
import {PendingChangesGuard} from './pending.changes.guard';
import {AlreadyLoginGuard} from "./already-login.guard";
import {RoleGuard} from "./role.guard";
declare global {
interface NodeModule {
dynamicImport(path: string): any;
}
}
export const routes: Routes = [];
@NgModule({
imports: [RouterModule.forRoot(routes, {preloadingStrategy: PreloadAllModules})],
exports: [RouterModule],
declarations: [],
providers: [AppGuard, PendingChangesGuard, AlreadyLoginGuard, RoleGuard]
})
export class RoutesModule {
}
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {FormsModule} from '@angular/forms';
import {MatTabsModule, MatToolbarModule} from "@angular/material";
@NgModule({
imports: [
CommonModule,
FormsModule,
MatToolbarModule
],
declarations: [],
exports: [CommonModule, FormsModule, MatToolbarModule, MatTabsModule],
providers: []
})
export class SharedModule {
}
import 'tslib';
import 'zone.js/dist/zone';
import 'zone.js/dist/long-stack-trace-zone';
import 'zone.js/dist/async-test';
import 'zone.js/dist/fake-async-test';
import 'zone.js/dist/sync-test';
import 'zone.js/dist/proxy';
import 'zone.js/dist/mocha-patch';
import 'core-js/es7/reflect';
import 'zone.js';
import 'core-js/es7/reflect';
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
\ No newline at end of file
<head>
<base href="/">
<title>Todos</title>
<link id="layout-css" rel="stylesheet" type="text/css" href="/layout-amber.css">
</head>
<body>
<app></app>
</body>
import './imports/polyfills';
import {Meteor} from 'meteor/meteor';
import 'zone.js';
import 'reflect-metadata';
import {enableProdMode} from '@angular/core';
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
import {AppModule} from './imports/app/app.module';
import "../node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css";
Meteor.startup(() => {
if (Meteor.isProduction) {
enableProdMode();
}
platformBrowserDynamic().bootstrapModule(AppModule);
});
\ No newline at end of file
declare module '*';
{
"name": "VQode_Management",
"private": true,
"scripts": {
"start": "meteor run",
"test": "meteor test --once --driver-package meteortesting:mocha",
"test-app": "TEST_WATCH=1 meteor test --full-app --driver-package meteortesting:mocha",
"visualize": "meteor --production --extra-packages bundle-visualizer"
},
"dependencies": {
"@angular/animations": "^6.0.5",
"@angular/cdk": "^6.4.3",
"@angular/forms": "6.0.2",
"@angular/material": "^6.4.3",
"@angular/platform-browser": "6.0.2",
"@angular/platform-browser-dynamic": "6.0.2",
"@angular/router": "6.0.2",
"@babel/runtime": "^7.0.0-beta.55",
"core-js": "2.5.6",
"fibers": "^3.0.0",
"meteor-node-stubs": "0.4.1",
"meteor-rxjs": "0.4.11",
"rxjs": "6.1.0",
"rxjs-compat": "6.1.0",
"systemjs": "^0.21.4",
"zone.js": "0.8.26"
},
"devDependencies": {
"@angular/common": "^6.0.2",
"@angular/compiler": "^6.0.2",
"@angular/compiler-cli": "^6.0.2",
"@angular/core": "^6.0.2",
"@types/chai": "4.1.2",
"@types/meteor": "1.4.13",
"@types/mocha": "2.2.48",
"@types/sinon": "4.3.0",
"chai": "4.1.2",
"phantomjs-prebuilt": "2.1.16",
"sinon": "4.4.6",
"typescript": "^3.0.1"
},
"meteor": {
"mainModule": {
"client": "client/main.ts",
"server": "server/main.ts"
},
"testModule": "tests/main.js"
}
}
import {Meteor} from 'meteor/meteor';
Meteor.startup(() => {
// code to run on server at startup
});
import assert from "assert";
describe("VQode_Management", function () {
it("package.json has correct name", async function () {
const { name } = await import("../package.json");
assert.strictEqual(name, "VQode_Management");
});
if (Meteor.isClient) {
it("client is not server", function () {
assert.strictEqual(Meteor.isServer, false);
});
}
if (Meteor.isServer) {
it("server is not client", function () {
assert.strictEqual(Meteor.isClient, false);
});
}
});
{
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"declaration": false,
"emitDecoratorMetadata": true,
"importHelpers": true,
"experimentalDecorators": true,
"lib": [
"dom",
"es2015"
],
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"target": "es5",
"skipLibCheck": true,
"stripInternal": true,
"noImplicitAny": false,
"types": [
"@types/meteor",
"@types/mocha",
"@types/chai",
"@types/sinon"
]
},
"include": [
"imports/**/*.ts",
"client/**/*.ts",
"server/**/*.ts"
],
"exclude": [
"node_modules"
],
"compileOnSave": false,
"atom": {
"rewriteTsconfig": false
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment