Browse Source

a release for felfel to shut up

master
JayPY Code 1 year ago
commit
343ec72847
112 changed files with 17551 additions and 0 deletions
  1. +18
    -0
      .browserslistrc
  2. +16
    -0
      .editorconfig
  3. +46
    -0
      .gitignore
  4. +27
    -0
      README.md
  5. +128
    -0
      angular.json
  6. +36
    -0
      e2e/protractor.conf.js
  7. +23
    -0
      e2e/src/app.e2e-spec.ts
  8. +11
    -0
      e2e/src/app.po.ts
  9. +14
    -0
      e2e/tsconfig.json
  10. +32
    -0
      karma.conf.js
  11. +13692
    -0
      package-lock.json
  12. +51
    -0
      package.json
  13. +26
    -0
      src/app.module.ts
  14. +6
    -0
      src/app/app.component.html
  15. +0
    -0
      src/app/app.component.scss
  16. +31
    -0
      src/app/app.component.spec.ts
  17. +18
    -0
      src/app/app.component.ts
  18. +0
    -0
      src/assets/.gitkeep
  19. BIN
      src/assets/aed-logo.png
  20. BIN
      src/assets/avatar.png
  21. BIN
      src/assets/background.png
  22. BIN
      src/assets/font.woff
  23. BIN
      src/assets/university-logo.png
  24. +11
    -0
      src/components/logo/app/app.component.html
  25. +12
    -0
      src/components/logo/app/app.component.scss
  26. +25
    -0
      src/components/logo/app/app.component.spec.ts
  27. +14
    -0
      src/components/logo/app/app.component.ts
  28. +14
    -0
      src/components/logo/logo.module.ts
  29. +170
    -0
      src/components/material.datepicker.adapter.ts
  30. +4
    -0
      src/components/splash/splash.component.html
  31. +19
    -0
      src/components/splash/splash.component.scss
  32. +25
    -0
      src/components/splash/splash.component.spec.ts
  33. +15
    -0
      src/components/splash/splash.component.ts
  34. +41
    -0
      src/components/view/app/app.component.html
  35. +114
    -0
      src/components/view/app/app.component.scss
  36. +25
    -0
      src/components/view/app/app.component.spec.ts
  37. +42
    -0
      src/components/view/app/app.component.ts
  38. +23
    -0
      src/components/view/material.ts
  39. +20
    -0
      src/components/view/view.module.ts
  40. +43
    -0
      src/database/drawer.list.ts
  41. +15
    -0
      src/database/user.permission.ts
  42. +3
    -0
      src/environments/environment.prod.ts
  43. +16
    -0
      src/environments/environment.ts
  44. BIN
      src/favicon.ico
  45. +14
    -0
      src/index.html
  46. +12
    -0
      src/main.ts
  47. +73
    -0
      src/polyfills.ts
  48. +35
    -0
      src/routes/auth/app/app.component.html
  49. +115
    -0
      src/routes/auth/app/app.component.scss
  50. +25
    -0
      src/routes/auth/app/app.component.spec.ts
  51. +39
    -0
      src/routes/auth/app/app.component.ts
  52. +23
    -0
      src/routes/auth/auth.module.ts
  53. +25
    -0
      src/routes/auth/material.ts
  54. +38
    -0
      src/routes/panel/calendar/app/app.component.html
  55. +23
    -0
      src/routes/panel/calendar/app/app.component.scss
  56. +25
    -0
      src/routes/panel/calendar/app/app.component.spec.ts
  57. +65
    -0
      src/routes/panel/calendar/app/app.component.ts
  58. +23
    -0
      src/routes/panel/calendar/calendar.module.ts
  59. +34
    -0
      src/routes/panel/calendar/dialog/dialog.component.html
  60. +29
    -0
      src/routes/panel/calendar/dialog/dialog.component.scss
  61. +25
    -0
      src/routes/panel/calendar/dialog/dialog.component.spec.ts
  62. +94
    -0
      src/routes/panel/calendar/dialog/dialog.component.ts
  63. +43
    -0
      src/routes/panel/calendar/material.ts
  64. +100
    -0
      src/routes/panel/chat/app/app.component.html
  65. +176
    -0
      src/routes/panel/chat/app/app.component.scss
  66. +25
    -0
      src/routes/panel/chat/app/app.component.spec.ts
  67. +35
    -0
      src/routes/panel/chat/app/app.component.ts
  68. +21
    -0
      src/routes/panel/chat/chat.module.ts
  69. +25
    -0
      src/routes/panel/chat/material.ts
  70. +24
    -0
      src/routes/panel/majors/app/app.component.html
  71. +22
    -0
      src/routes/panel/majors/app/app.component.scss
  72. +25
    -0
      src/routes/panel/majors/app/app.component.spec.ts
  73. +63
    -0
      src/routes/panel/majors/app/app.component.ts
  74. +14
    -0
      src/routes/panel/majors/dialog/dialog.component.html
  75. +29
    -0
      src/routes/panel/majors/dialog/dialog.component.scss
  76. +25
    -0
      src/routes/panel/majors/dialog/dialog.component.spec.ts
  77. +53
    -0
      src/routes/panel/majors/dialog/dialog.component.ts
  78. +23
    -0
      src/routes/panel/majors/majors.module.ts
  79. +30
    -0
      src/routes/panel/majors/material.ts
  80. +28
    -0
      src/routes/panel/panel.module.ts
  81. +50
    -0
      src/routes/panel/users/form/form.component.html
  82. +35
    -0
      src/routes/panel/users/form/form.component.scss
  83. +25
    -0
      src/routes/panel/users/form/form.component.spec.ts
  84. +25
    -0
      src/routes/panel/users/form/form.component.ts
  85. +33
    -0
      src/routes/panel/users/material.ts
  86. +57
    -0
      src/routes/panel/users/table/table.component.html
  87. +21
    -0
      src/routes/panel/users/table/table.component.scss
  88. +25
    -0
      src/routes/panel/users/table/table.component.spec.ts
  89. +33
    -0
      src/routes/panel/users/table/table.component.ts
  90. +25
    -0
      src/routes/panel/users/users.module.ts
  91. +31
    -0
      src/routes/panel/volunteer/material.ts
  92. +59
    -0
      src/routes/panel/volunteer/table/table.component.html
  93. +27
    -0
      src/routes/panel/volunteer/table/table.component.scss
  94. +25
    -0
      src/routes/panel/volunteer/table/table.component.spec.ts
  95. +66
    -0
      src/routes/panel/volunteer/table/table.component.ts
  96. +22
    -0
      src/routes/panel/volunteer/volunteer.module.ts
  97. +17
    -0
      src/routes/routes.module.ts
  98. +16
    -0
      src/services/excel/excel.service.spec.ts
  99. +23
    -0
      src/services/excel/excel.service.ts
  100. +20
    -0
      src/services/rayconnect/rayconnect.interface.ts

+ 18
- 0
.browserslistrc View File

@ -0,0 +1,18 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries
# For the full list of supported browsers by the Angular framework, please see:
# https://angular.io/guide/browser-support
# You can see what browsers were selected by your queries by running:
# npx browserslist
last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR
not IE 9-10 # Angular support for IE 9-10 has been deprecated and will be removed as of Angular v11. To opt-in, remove the 'not' prefix on this line.
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.

+ 16
- 0
.editorconfig View File

@ -0,0 +1,16 @@
# Editor configuration, see https://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
[*.ts]
quote_type = single
[*.md]
max_line_length = off
trim_trailing_whitespace = false

+ 46
- 0
.gitignore View File

@ -0,0 +1,46 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.
# compiled output
/dist
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out
# dependencies
/node_modules
# profiling files
chrome-profiler-events*.json
speed-measure-plugin*.json
# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace
# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*
# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings
# System Files
.DS_Store
Thumbs.db

+ 27
- 0
README.md View File

@ -0,0 +1,27 @@
# KatebPanel
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.0.5.
## Development server
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.
## Code scaffolding
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`.
## Build
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.
## Running unit tests
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Running end-to-end tests
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
## Further help
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).

+ 128
- 0
angular.json View File

@ -0,0 +1,128 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"kateb-panel": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"style": "scss"
}
},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/kateb-panel",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"aot": true,
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.scss"
],
"scripts": []
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb",
"maximumError": "10kb"
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "kateb-panel:build"
},
"configurations": {
"production": {
"browserTarget": "kateb-panel:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "kateb-panel:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.scss"
],
"scripts": []
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"tsconfig.app.json",
"tsconfig.spec.json",
"e2e/tsconfig.json"
],
"exclude": [
"**/node_modules/**"
]
}
},
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "kateb-panel:serve"
},
"configurations": {
"production": {
"devServerTarget": "kateb-panel:serve:production"
}
}
}
}
}},
"defaultProject": "kateb-panel"
}

+ 36
- 0
e2e/protractor.conf.js View File

@ -0,0 +1,36 @@
// @ts-check
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts
const { SpecReporter, StacktraceOption } = require('jasmine-spec-reporter');
/**
* @type { import("protractor").Config }
*/
exports.config = {
allScriptsTimeout: 11000,
specs: [
'./src/**/*.e2e-spec.ts'
],
capabilities: {
browserName: 'chrome'
},
directConnect: true,
baseUrl: 'http://localhost:4200/',
framework: 'jasmine',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function() {}
},
onPrepare() {
require('ts-node').register({
project: require('path').join(__dirname, './tsconfig.json')
});
jasmine.getEnv().addReporter(new SpecReporter({
spec: {
displayStacktrace: StacktraceOption.PRETTY
}
}));
}
};

+ 23
- 0
e2e/src/app.e2e-spec.ts View File

@ -0,0 +1,23 @@
import { AppPage } from './app.po';
import { browser, logging } from 'protractor';
describe('workspace-project App', () => {
let page: AppPage;
beforeEach(() => {
page = new AppPage();
});
it('should display welcome message', () => {
page.navigateTo();
expect(page.getTitleText()).toEqual('kateb-panel app is running!');
});
afterEach(async () => {
// Assert that there are no errors emitted from the browser
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
expect(logs).not.toContain(jasmine.objectContaining({
level: logging.Level.SEVERE,
} as logging.Entry));
});
});

+ 11
- 0
e2e/src/app.po.ts View File

@ -0,0 +1,11 @@
import { browser, by, element } from 'protractor';
export class AppPage {
navigateTo(): Promise<unknown> {
return browser.get(browser.baseUrl) as Promise<unknown>;
}
getTitleText(): Promise<string> {
return element(by.css('app-root .content span')).getText() as Promise<string>;
}
}

+ 14
- 0
e2e/tsconfig.json View File

@ -0,0 +1,14 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "../tsconfig.base.json",
"compilerOptions": {
"outDir": "../out-tsc/e2e",
"module": "commonjs",
"target": "es2018",
"types": [
"jasmine",
"jasminewd2",
"node"
]
}
}

+ 32
- 0
karma.conf.js View File

@ -0,0 +1,32 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, './coverage/kateb-panel'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
restartOnFileChange: true
});
};

+ 13692
- 0
package-lock.json
File diff suppressed because it is too large
View File


+ 51
- 0
package.json View File

@ -0,0 +1,51 @@
{
"name": "kateb-panel",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "~10.0.6",
"@angular/cdk": "^10.1.3",
"@angular/common": "~10.0.6",
"@angular/compiler": "~10.0.6",
"@angular/core": "~10.0.6",
"@angular/forms": "~10.0.6",
"@angular/material": "^10.1.3",
"@angular/platform-browser": "~10.0.6",
"@angular/platform-browser-dynamic": "~10.0.6",
"@angular/router": "~10.0.6",
"jalali-moment": "^3.3.8",
"rayconnect-client": "^0.10.25",
"rxjs": "~6.5.5",
"tslib": "^2.0.0",
"xlsx": "^0.16.6",
"zone.js": "~0.10.3"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.1000.5",
"@angular/cli": "~10.0.5",
"@angular/compiler-cli": "~10.0.6",
"@types/node": "^12.11.1",
"@types/jasmine": "~3.5.0",
"@types/jasminewd2": "~2.0.3",
"codelyzer": "^6.0.0",
"jasmine-core": "~3.5.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~5.0.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~3.3.0",
"karma-jasmine-html-reporter": "^1.5.0",
"protractor": "~7.0.0",
"ts-node": "~8.3.0",
"tslint": "~6.1.0",
"typescript": "~3.9.5"
}
}

+ 26
- 0
src/app.module.ts View File

@ -0,0 +1,26 @@
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app/app.component';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { RouterModule } from '@angular/router';
import { SplashComponent } from './components/splash/splash.component';
import { LogoModule } from './components/logo/logo.module';
@NgModule({
declarations: [
AppComponent,
SplashComponent
],
imports: [
BrowserModule,
BrowserAnimationsModule,
LogoModule,
RouterModule.forRoot([
{ path: '', loadChildren: () => import('./routes/routes.module').then(m => m.RoutesModule) }
])
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }

+ 6
- 0
src/app/app.component.html View File

@ -0,0 +1,6 @@
<ng-container *ngIf="splash == false">
<router-outlet></router-outlet>
</ng-container>
<ng-container *ngIf="splash == true">
<app-splash></app-splash>
</ng-container>

+ 0
- 0
src/app/app.component.scss View File


+ 31
- 0
src/app/app.component.spec.ts View File

@ -0,0 +1,31 @@
import { TestBed, async } from '@angular/core/testing';
import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [
AppComponent
],
}).compileComponents();
}));
it('should create the app', () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app).toBeTruthy();
});
it(`should have as title 'kateb-panel'`, () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app.title).toEqual('kateb-panel');
});
it('should render title', () => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.nativeElement;
expect(compiled.querySelector('.content span').textContent).toContain('kateb-panel app is running!');
});
});

+ 18
- 0
src/app/app.component.ts View File

@ -0,0 +1,18 @@
import { Component, OnInit } from '@angular/core';
import { Rayconnect } from '../services/rayconnect/rayconnect.service';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent implements OnInit {
public splash: boolean = true;
constructor(private rayconnect: Rayconnect) { }
async ngOnInit(): Promise<void> {
await this.rayconnect.init()
await this.rayconnect.setProfile();
this.splash = false;
}
}

+ 0
- 0
src/assets/.gitkeep View File


BIN
src/assets/aed-logo.png View File

Before After
Width: 1531  |  Height: 510  |  Size: 87 KiB

BIN
src/assets/avatar.png View File

Before After
Width: 512  |  Height: 512  |  Size: 3.0 KiB

BIN
src/assets/background.png View File

Before After
Width: 1440  |  Height: 940  |  Size: 18 KiB

BIN
src/assets/font.woff View File


BIN
src/assets/university-logo.png View File

Before After
Width: 354  |  Height: 354  |  Size: 29 KiB

+ 11
- 0
src/components/logo/app/app.component.html View File

@ -0,0 +1,11 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 363.7 295.47">
<path
d="M421.55,167.71,365.2,198.46c5.84,1,15.51,3.62,22.12,11.64,6,7.25,6.71,15.59,7,33.61.18,13,.09,29.62-.84,49.2l28.67-30.63,23.23,1-.09-69.55a32.46,32.46,0,0,0-7.37-16.35A29.75,29.75,0,0,0,421.55,167.71Z"
transform="translate(-81.64 -94.64)" [ngStyle]="{'fill': secondary}" />
<path
d="M395.41,145.21l-62.15,33.25c-26.64-14.87-47.09-23.87-53.23-25.62a75.58,75.58,0,0,0-13.37-2.47c-1.41-.11-2.72-.16-4-.17a60.69,60.69,0,0,0-22.83,4.25c-9.22,4.17-73.64,33.43-79.69,39.53-.79.8-3.05,3-2.68,5.54a5.65,5.65,0,0,0,3,4.07c10.74,5.84,22.21,11.68,34.4,17.36,15.65,7.3,30.69,13.52,44.94,18.85a63.62,63.62,0,0,0,20.78,4A63,63,0,0,0,281,240.9l56.53-25.49c12.35-3.41,25.09,1.62,31.24,11.82,7.58,12.57,4,31.08-9.47,40.65-6.07,3.61-12.64,7.26-19.69,10.82-.32.16-3.68,1.84-7.35,3.58-13.64,6.47-29.36,12.57-37,15.49a97.86,97.86,0,0,1-33.87,5.94,100.26,100.26,0,0,1-30.54-5.17c-46.67-14.5-80.4-34-80.4-34a442.66,442.66,0,0,1-56.18-36.21c-6.37-4.87-9.14-9.66-11.58-20.69A44.08,44.08,0,0,1,81.88,194a41.92,41.92,0,0,1,17.21-29.19c61.6-34.52,109.75-57.28,131.66-64.65,14.85-5,25.49-5.55,31.75-5.5a90.87,90.87,0,0,1,29.34,5.13q19.64,7.19,40.37,15.88C354.8,125.18,375.87,135.14,395.41,145.21Z"
transform="translate(-81.64 -94.64)" [ngStyle]="{'fill': primary}" />
<path
d="M360.7,301.78l.63,55.25c-15.22,7.81-39.47,19.34-65.8,27.59-12.37,3.87-21.28,5.39-30.89,5.48-9.92.1-17.08-1.45-27-3.66l-2-.44c-17.34-4.06-36.66-11.59-45.43-15.1-8.35-3.34-19-7.74-31.23-13.23q-.28-27-.55-54c2.69,1.2,6.17,2.73,10.24,4.48.78.34,5.67,2.45,10.14,4.3,10,4.12,18.48,7.31,21.58,8.46,8,2.95,15.27,5.63,25.32,8.64,4.74,1.42,7.11,2.13,10,2.83a105.73,105.73,0,0,0,29,3.37,111,111,0,0,0,27.72-4.56c3.61-1,7.36-2.42,14.87-5.22,8.76-3.26,16.56-6.17,26.21-10.47C340.73,312.27,350.06,307.78,360.7,301.78Z"
transform="translate(-81.64 -94.64)" [ngStyle]="{'fill': secondary}" />
</svg>

+ 12
- 0
src/components/logo/app/app.component.scss View File

@ -0,0 +1,12 @@
svg {
display: block;
width: inherit;
height: inherit;
min-width: inherit;
min-height: inherit;
max-width: inherit;
max-width: inherit;
}

+ 25
- 0
src/components/logo/app/app.component.spec.ts View File

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { AppComponent } from './app.component';
describe('AppComponent', () => {
let component: AppComponent;
let fixture: ComponentFixture<AppComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ AppComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AppComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

+ 14
- 0
src/components/logo/app/app.component.ts View File

@ -0,0 +1,14 @@
import { Component, Input } from '@angular/core';
@Component({
selector: 'app-logo',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent {
@Input() primary: string = '#fbab18';
@Input() secondary: string = '#4c7ebf';
constructor() { }
}

+ 14
- 0
src/components/logo/logo.module.ts View File

@ -0,0 +1,14 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { AppComponent } from './app/app.component';
@NgModule({
declarations: [AppComponent],
imports: [
CommonModule
],
exports: [AppComponent]
})
export class LogoModule { }

+ 170
- 0
src/components/material.datepicker.adapter.ts View File

@ -0,0 +1,170 @@
import { DateAdapter } from "@angular/material/core";
import * as jalaliMoment from "jalali-moment";
export const PERSIAN_DATE_FORMATS = {
parse: {
dateInput: "jYYYY/jMM/jDD"
},
display: {
dateInput: "jYYYY/jMM/jDD",
monthYearLabel: "jYYYY jMMMM",
dateA11yLabel: "jYYYY/jMM/jDD",
monthYearA11yLabel: "jYYYY jMMMM"
}
};
export class MaterialPersianDateAdapter extends DateAdapter<jalaliMoment.Moment> {
constructor() {
super();
super.setLocale("fa");
}
getYear(date: jalaliMoment.Moment): number {
return this.clone(date).jYear();
}
getMonth(date: jalaliMoment.Moment): number {
return this.clone(date).jMonth();
}
getDate(date: jalaliMoment.Moment): number {
return this.clone(date).jDate();
}
getDayOfWeek(date: jalaliMoment.Moment): number {
return this.clone(date).day();
}
getMonthNames(style: "long" | "short" | "narrow"): string[] {
switch (style) {
case "long":
case "short":
return jalaliMoment.localeData("fa").jMonths().slice(0);
case "narrow":
return jalaliMoment.localeData("fa").jMonthsShort().slice(0);
}
}
getDateNames(): string[] {
const valuesArray = Array(31);
for (let i = 0; i < 31; i++) {
valuesArray[i] = String(i + 1);
}
return valuesArray;
}
getDayOfWeekNames(style: "long" | "short" | "narrow"): string[] {
switch (style) {
case "long":
return jalaliMoment.localeData("fa").weekdays().slice(0);
case "short":
return jalaliMoment.localeData("fa").weekdaysShort().slice(0);
case "narrow":
return ["ی", "د", "س", "چ", "پ", "ج", "ش"];
}
}
getYearName(date: jalaliMoment.Moment): string {
return this.clone(date).jYear().toString();
}
getFirstDayOfWeek(): number {
return jalaliMoment.localeData("fa").firstDayOfWeek();
}
getNumDaysInMonth(date: jalaliMoment.Moment): number {
return this.clone(date).jDaysInMonth();
}
clone(date: jalaliMoment.Moment): jalaliMoment.Moment {
return date.clone().locale("fa");
}
createDate(year: number, month: number, date: number): jalaliMoment.Moment {
if (month < 0 || month > 11) {
throw Error(
`Invalid month index "${month}". Month index has to be between 0 and 11.`
);
}
if (date < 1) {
throw Error(`Invalid date "${date}". Date has to be greater than 0.`);
}
const result = jalaliMoment()
.jYear(year).jMonth(month).jDate(date)
.hours(0).minutes(0).seconds(0).milliseconds(0)
.locale("fa");
if (this.getMonth(result) !== month) {
throw Error(`Invalid date ${date} for month with index ${month}.`);
}
if (!result.isValid()) {
throw Error(`Invalid date "${date}" for month with index "${month}".`);
}
return result;
}
today(): jalaliMoment.Moment {
return jalaliMoment().locale("fa");
}
parse(value: any, parseFormat: string | string[]): jalaliMoment.Moment | null {
if (value && typeof value === "string") {
return jalaliMoment(value, parseFormat, "fa");
}
return value ? jalaliMoment(value).locale("fa") : null;
}
format(date: jalaliMoment.Moment, displayFormat: string): string {
date = this.clone(date);
if (!this.isValid(date)) {
throw Error("JalaliMomentDateAdapter: Cannot format invalid date.");
}
return date.format(displayFormat);
}
addCalendarYears(date: jalaliMoment.Moment, years: number): jalaliMoment.Moment {
return this.clone(date).add(years, "jYear");
}
addCalendarMonths(date: jalaliMoment.Moment, months: number): jalaliMoment.Moment {
return this.clone(date).add(months, "jmonth");
}
addCalendarDays(date: jalaliMoment.Moment, days: number): jalaliMoment.Moment {
return this.clone(date).add(days, "jDay");
}
toIso8601(date: jalaliMoment.Moment): string {
return this.clone(date).format();
}
isDateInstance(obj: any): boolean {
return jalaliMoment.isMoment(obj);
}
isValid(date: jalaliMoment.Moment): boolean {
return this.clone(date).isValid();
}
invalid(): jalaliMoment.Moment {
return jalaliMoment.invalid();
}
deserialize(value: any): jalaliMoment.Moment | null {
let date;
if (value instanceof Date) {
date = jalaliMoment(value);
}
if (typeof value === "string") {
if (!value) {
return null;
}
date = jalaliMoment(value).locale("fa");
}
if (date && this.isValid(date)) {
return date;
}
return super.deserialize(value);
}
}

+ 4
- 0
src/components/splash/splash.component.html View File

@ -0,0 +1,4 @@
<main>
<app-logo secondary="#2962ff"></app-logo>
<span>سامانه مدیریت دانشجو و کارمندان کاتب</span>
</main>

+ 19
- 0
src/components/splash/splash.component.scss View File

@ -0,0 +1,19 @@
main {
width: 100vw;
height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
app-logo {
width: 128px;
height: 128px;
margin-bottom: 20px;
}
span {
font-size: large;
}
}

+ 25
- 0
src/components/splash/splash.component.spec.ts View File

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { SplashComponent } from './splash.component';
describe('SplashComponent', () => {
let component: SplashComponent;
let fixture: ComponentFixture<SplashComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ SplashComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(SplashComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

+ 15
- 0
src/components/splash/splash.component.ts View File

@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-splash',
templateUrl: './splash.component.html',
styleUrls: ['./splash.component.scss']
})
export class SplashComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
}

+ 41
- 0
src/components/view/app/app.component.html View File

@ -0,0 +1,41 @@
<main>
<mat-toolbar class="mat-elevation-z2" color="primary">
<ng-container *ngIf="mobileQuery.matches">
<button mat-icon-button (click)="toggleDrawer()">
<mat-icon>menu</mat-icon>
</button>
</ng-container>
<div class="app-info">
<app-logo primary="rgba(255, 255, 255, 0.5)" secondary="rgba(255, 255, 255, 0.3)"></app-logo>
<span>کـــاتـــبـــ</span>
</div>
</mat-toolbar>
<mat-drawer-container>
<mat-drawer [mode]="mobileQuery.matches ? 'over' : 'side'" [opened]="opened" (closedStart)="opened = false">
<section [ngClass]="{'show': rayconnect.profile}">
<ng-container *ngIf="rayconnect.profile">
<div class="avatar"></div>
<div class="column">
<span class="title">{{rayconnect.profile.profile.name}} {{rayconnect.profile.profile.family}}</span>
<span class="sub">دسترسی کاربر : {{rayconnect.profile.level.level}}</span>
</div>
</ng-container>
</section>
<mat-list>
<ng-container *ngFor="let item of items">
<mat-list-item matRipple [ngClass]="{'active': path.includes(item.path)}" [routerLink]="item.path">
<mat-icon fontSet="material-icons-outlined">{{item.icon}}</mat-icon>
<span>{{item.title}}</span>
</mat-list-item>
</ng-container>
</mat-list>
<footer>
<span>&copy; کاری از عصر ارتباطات دهکده</span>
<span>پنل مدیریت کاتب نسخه ی 0.0.1 (رستم دستان)</span>
</footer>
</mat-drawer>
<mat-drawer-content>
<router-outlet></router-outlet>
</mat-drawer-content>
</mat-drawer-container>
</main>

+ 114
- 0
src/components/view/app/app.component.scss View File

@ -0,0 +1,114 @@
main {
display: flex;
flex-direction: column;
height: 100vh;
}
mat-toolbar {
z-index: 2;
button[mat-icon-button] {
margin-left: 5px;
}
div.app-info {
display: flex;
flex-wrap: nowrap;
align-items: center;
app-logo {
width: 36px;
height: 36px;
}
span {
margin-right: 8px;
}
}
}
mat-drawer-container {
height: 100%;
mat-drawer {
min-width: 280px;
border-left-width: 0;
box-shadow: -3px 0 6px rgba($color: #000000, $alpha: 0.1);
section {
width: calc(100% - 40px);
height: 0;
background-color: #2962ff;
color: white;
padding: 0 20px;
display: flex;
flex-wrap: nowrap;
align-items: center;
transition: height 0.3s ease-out;
div.avatar {
width: 56px;
height: 56px;
border-radius: 50%;
background-color: white;
background-image: url("/assets/university-logo.png");
background-size: 75%;
background-repeat: no-repeat;
background-position: center center;
margin-left: 10px;
}
div.column {
display: flex;
flex-direction: column;
span.sub {
font-size: 12px;
color: rgba($color: white, $alpha: 0.5);
}
}
&.show {
height: 128px;
}
}
mat-list {
margin-bottom: auto;
}
mat-list-item {
cursor: pointer;
mat-icon {
margin-right: 10px;
margin-left: 12px;
}
span {
font-size: 14px;
}
}
mat-list-item.active {
color: #e91e63;
background-color: rgba(233, 30, 98, 0.1);
pointer-events: none;
}
footer {
display: flex;
flex-direction: column;
font-size: 12px;
padding: 0 20px;
margin-bottom: 20px;
}
}
}

+ 25
- 0
src/components/view/app/app.component.spec.ts View File

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { AppComponent } from './app.component';
describe('AppComponent', () => {
let component: AppComponent;
let fixture: ComponentFixture<AppComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ AppComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AppComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

+ 42
- 0
src/components/view/app/app.component.ts View File

@ -0,0 +1,42 @@
import { Component, OnInit, OnDestroy, ChangeDetectorRef } from '@angular/core';
import { Router } from '@angular/router';
import { MediaMatcher } from '@angular/cdk/layout';
import { Item, items } from '../../../database/drawer.list';
import { Rayconnect } from '../../../services/rayconnect/rayconnect.service';
@Component({
selector: 'app-app',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent implements OnInit, OnDestroy {
public items: Item[] = items;
public path: string = window.location.pathname;
public opened: boolean = false; // Toggle drawer
public mobileQuery: MediaQueryList;
private _mobileQueryListener: () => void;
constructor(private router: Router, private media: MediaMatcher, private cdr: ChangeDetectorRef, public rayconnect: Rayconnect) {
this.mobileQuery = media.matchMedia('(max-width: 600px)');
this.opened = !this.mobileQuery.matches;
this._mobileQueryListener = () => {
cdr.detectChanges();
this.opened = !this.mobileQuery.matches;
}
this.mobileQuery.addListener(this._mobileQueryListener);
}
ngOnInit(): void {
this.router.events.subscribe(() => {
this.path = window.location.pathname;
})
}
ngOnDestroy(): void {
this.mobileQuery.removeListener(this._mobileQueryListener);
}
toggleDrawer() {
this.opened = !this.opened;
}
}

+ 23
- 0
src/components/view/material.ts View File

@ -0,0 +1,23 @@
import { NgModule } from '@angular/core';
import { MatToolbarModule } from '@angular/material/toolbar';
import { MatSidenavModule } from '@angular/material/sidenav'
import { MatListModule } from '@angular/material/list';
import { MatIconModule } from '@angular/material/icon';
import { MatRippleModule } from '@angular/material/core';
import { MatButtonModule } from '@angular/material/button';
const modules = [
MatToolbarModule,
MatSidenavModule,
MatListModule,
MatIconModule,
MatRippleModule,
MatButtonModule
]
@NgModule({
imports: modules,
exports: modules,
})
export class MaterialModule { }

+ 20
- 0
src/components/view/view.module.ts View File

@ -0,0 +1,20 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { AppComponent } from './app/app.component';
import { MaterialModule } from './material';
import { RouterModule } from '@angular/router';
import { LogoModule } from '../logo/logo.module';
@NgModule({
declarations: [AppComponent],
imports: [
CommonModule,
MaterialModule,
RouterModule,
LogoModule
]
})
export class ViewModule { }
export default AppComponent;

+ 43
- 0
src/database/drawer.list.ts View File

@ -0,0 +1,43 @@
export interface Item {
title: string,
icon: string,
path: string,
}
export const items: Item[] = [
{
title: 'پیشخوان',
icon: 'home',
path: '/panel/dashboard'
},
{
title: 'تقویم ثبت نام',
icon: 'today',
path: '/panel/calendar'
},
{
title: 'گزارشات',
icon: 'insert_chart',
path: '/panel/reports'
},
{
title: 'کارمندان رایدا',
icon: 'person',
path: '/panel/users'
},
{
title: 'رشته های تحصیلی',
icon: 'school',
path: '/panel/majors'
},
{
title: 'داوطلبین',
icon: 'group',
path: '/panel/volunteers'
},
{
title: 'گفتگو با داوطلبین',
icon: 'forum',
path: '/panel/chat'
}
]

+ 15
- 0
src/database/user.permission.ts View File

@ -0,0 +1,15 @@
export interface Item {
title: string, // Persian title to show
value: string, // value for datbase
access: string[] // routes that user can access and if be [] = access to all
denice: string[] // routes that user can't access
}
export const items: Item[] = [
{
title: 'مدیر کل',
value: 'superadmin',
access: [],
denice: []
}
];

+ 3
- 0
src/environments/environment.prod.ts View File

@ -0,0 +1,3 @@
export const environment = {
production: true
};

+ 16
- 0
src/environments/environment.ts View File

@ -0,0 +1,16 @@
// This file can be replaced during build by using the `fileReplacements` array.
// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
// The list of file replacements can be found in `angular.json`.
export const environment = {
production: false
};
/*
* For easier debugging in development mode, you can import the following file
* to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
*
* This import should be commented out in production mode because it will have a negative impact
* on performance if an error is thrown.
*/
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.

BIN
src/favicon.ico View File

Before After
Width: 28  |  Height: 30  |  Size: 948 B

+ 14
- 0
src/index.html View File

@ -0,0 +1,14 @@
<!doctype html>
<html lang="fa" dir="rtl">
<head>
<meta charset="utf-8">
<title>KatebPanel</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons|Material+Icons+Outlined" rel="stylesheet">
</head>
<body>
<app-root></app-root>
</body>
</html>

+ 12
- 0
src/main.ts View File

@ -0,0 +1,12 @@
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app.module';
import { environment } from './environments/environment';
if (environment.production) {
enableProdMode();
}
platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.error(err));

+ 73
- 0
src/polyfills.ts View File

@ -0,0 +1,73 @@
/**
* This file includes polyfills needed by Angular and is loaded before the app.
* You can add your own extra polyfills to this file.
*
* This file is divided into 2 sections:
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
* file.
*
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
*
* Learn more in https://angular.io/guide/browser-support
*/
/***************************************************************************************************
* BROWSER POLYFILLS
*/
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`.
/**
* Web Animations `@angular/platform-browser/animations`
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
*/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
/**
* By default, zone.js will patch all possible macroTask and DomEvents
* user can disable parts of macroTask/DomEvents patch by setting following flags
* because those flags need to be set before `zone.js` being loaded, and webpack
* will put import in the top of bundle, so user need to create a separate file
* in this directory (for example: zone-flags.ts), and put the following flags
* into that file, and then add the following code before importing zone.js.
* import './zone-flags';
*
* The flags allowed in zone-flags.ts are listed here.
*
* The following flags will work for all browsers.
*
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
* (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
* (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
*
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
* with the following flag, it will bypass `zone.js` patch for IE/Edge
*
* (window as any).__Zone_enable_cross_context_check = true;
*
*/
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.
/***************************************************************************************************
* APPLICATION IMPORTS
*/
(window as any).global = window;
global.Buffer = global.Buffer || require('buffer').Buffer;
import * as process from 'process';
window['process'] = process;

+ 35
- 0
src/routes/auth/app/app.component.html View File

@ -0,0 +1,35 @@
<section>
<header>
<app-logo></app-logo>
<h1>کـــــاتـــــبـــــ</h1>
<span>سامانه ثبت نامی کاتب کاری از رایدا</span>
</header>
<mat-card>
<h4>ورود به حساب کاربری</h4>
<p>برای ورود اطلاعات حساب کاربری خود را وارد کنید</p>
<form [formGroup]="form">
<mat-form-field appearance="outline">
<mat-label>نام کاربری</mat-label>
<input formControlName="username" matInput type="text" name="kateb-username" autocomplete="off">
</mat-form-field>
<mat-form-field appearance="outline">
<mat-label>کلمه عبور</mat-label>
<input formControlName="password" matInput type="password" name="kateb-username" autocomplete="off">
</mat-form-field>
<br>
<button mat-raised-button color="accent" [disabled]="form.disabled" (click)="submit()">
<mat-spinner *ngIf="form.disabled == true" color="accent" diameter="20"></mat-spinner>
<span *ngIf="form.disabled == false">ورود</span>
</button>
</form>
</mat-card>
<footer>
<div class="logo" style="background-image: url('/assets/aed-logo.png');"></div>
<div class="logo" style="background-image: url('/assets/university-logo.png');"></div>
<div class="copyright">
پنل مدیریت کاتب <br>نسخه 0.0.1 (رستم دستان)
</div>
</footer>
</section>

+ 115
- 0
src/routes/auth/app/app.component.scss View File

@ -0,0 +1,115 @@
section {
position: relative;
width: 100vw;
height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
header {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin-top: 15vh;
margin-bottom: 7vh;
color: white;
app-logo {
width: 64px;
height: 64px;
}
h1 {
font-size: 2rem;
margin-bottom: 0;
margin-top: 5px;
}
span {
color: #ddd;
}
}
mat-card {
display: flex;
flex-direction: column;
min-width: 350px;
max-width: 400px;
h4 {
margin-bottom: 0;
}
p {
color: #777777;
font-size: 13px;
margin-bottom: 20px;
margin-top: 0;
}
mat-form-field {
width: 100%;
input {
direction: ltr;
text-align: left;
}
}
button {
height: 36px;
float: left;
margin-right: auto;
display: flex;
align-items: center;
justify-content: center;
}
}
&::before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
height: 50vh;
background-color: #2196f3;
z-index: -1;
}
}
footer {
display: flex;
flex-wrap: nowrap;
align-items: center;
// width: 96%;
// margin-top: auto;
min-width: 420px;
max-width: 420px;
margin-top: 20px;
margin-bottom: 20px;
div.logo {
height: 50px;
width: 110px;
background-size: contain;
background-position: center;
background-repeat: no-repeat;
}
div.copyright {
margin-right: auto;
font-size: 0.8rem;
}
}

+ 25
- 0
src/routes/auth/app/app.component.spec.ts View File

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { AppComponent } from './app.component';
describe('AppComponent', () => {
let component: AppComponent;
let fixture: ComponentFixture<AppComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ AppComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AppComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

+ 39
- 0
src/routes/auth/app/app.component.ts View File

@ -0,0 +1,39 @@
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { FormGroup, FormControl, Validators } from '@angular/forms';
import { MatSnackBar } from '@angular/material/snack-bar';
import { Rayconnect } from '../../../services/rayconnect/rayconnect.service';
@Component({
selector: 'app-app',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent implements OnInit {
public form: FormGroup = new FormGroup({
username: new FormControl('', [Validators.required]),
password: new FormControl('', [Validators.required])
})
constructor(private rayconnect: Rayconnect, private snackbar: MatSnackBar, private router: Router) { }
ngOnInit(): void {
}
async submit() {
if (this.form.valid) {
this.form.disable();
try {
let res = await this.rayconnect.LoginWithPassword({ username: this.form.get('username').value, password: this.form.get('password').value });
this.snackbar.open(res['message'], 'باشه', { duration: 3000, direction: 'rtl' });
if (res['status'] == true) {
await this.rayconnect.setToken(res['data']['token']);
this.router.navigate(['/panel/dahboard']);
} else
this.form.enable();
} catch (error) {
}
}
}
}

+ 23
- 0
src/routes/auth/auth.module.ts View File

@ -0,0 +1,23 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MaterialModule } from './material';
import { LogoModule } from '../../components/logo/logo.module';
import { AppComponent } from './app/app.component';
@NgModule({
declarations: [AppComponent],
imports: [
CommonModule,
MaterialModule,
LogoModule,
FormsModule, ReactiveFormsModule,
RouterModule.forChild([
{ path: '', component: AppComponent }
])
]
})
export class AuthModule { }

+ 25
- 0
src/routes/auth/material.ts View File

@ -0,0 +1,25 @@
import { NgModule } from '@angular/core';
import { MatCardModule } from '@angular/material/card';
import { MatInputModule } from '@angular/material/input';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatButtonModule } from '@angular/material/button';
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
import { MatDividerModule } from '@angular/material/divider';
import { MatSnackBarModule } from '@angular/material/snack-bar';
const modules = [
MatCardModule,
MatInputModule,
MatFormFieldModule,
MatButtonModule,
MatProgressSpinnerModule,
MatDividerModule,
MatSnackBarModule
]